From a803758efcbf05bf95221f1aaab27648f483734b Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Sun, 4 Feb 2024 19:46:15 -0500 Subject: [PATCH] Refactor localized data. --- build/admin.asset.php | 2 +- build/admin.js | 2 +- build/blocks/event-date/index.asset.php | 2 +- build/blocks/event-date/index.js | 4 +- .../blocks/events-list/events-list.asset.php | 2 +- build/blocks/events-list/events-list.js | 4 +- build/blocks/events-list/index.asset.php | 2 +- build/blocks/events-list/index.js | 4 +- build/blocks/online-event/index.asset.php | 2 +- build/blocks/online-event/index.js | 2 +- .../online-event/online-event.asset.php | 2 +- build/blocks/online-event/online-event.js | 2 +- build/blocks/rsvp-response/index.asset.php | 2 +- build/blocks/rsvp-response/index.js | 2 +- .../rsvp-response/rsvp-response.asset.php | 2 +- build/blocks/rsvp-response/rsvp-response.js | 2 +- build/blocks/rsvp/index.asset.php | 2 +- build/blocks/rsvp/index.js | 4 +- build/blocks/rsvp/rsvp.asset.php | 2 +- build/blocks/rsvp/rsvp.js | 4 +- build/blocks/venue/index.asset.php | 2 +- build/blocks/venue/index.js | 2 +- build/blocks/venue/venue.asset.php | 2 +- build/blocks/venue/venue.js | 2 +- build/editor.asset.php | 2 +- build/editor.js | 2 +- build/modals.asset.php | 2 +- build/modals.js | 2 +- build/panels.asset.php | 2 +- build/panels.js | 2 +- includes/core/classes/class-assets.php | 56 +++++++++++-------- includes/core/classes/class-event.php | 12 ++-- includes/core/classes/class-utility.php | 14 +++++ src/admin.js | 4 +- src/blocks/event-date/edit.js | 6 +- src/blocks/rsvp/edit.js | 4 +- src/blocks/rsvp/rsvp.js | 8 +-- src/components/AnonymousRsvp.js | 2 +- src/components/EventsList.js | 4 +- src/components/OnlineEvent.js | 2 +- src/components/OnlineEventLink.js | 4 +- src/components/Rsvp.js | 8 +-- src/components/RsvpResponse.js | 4 +- src/components/RsvpResponseCard.js | 2 +- src/components/RsvpResponseContent.js | 4 +- src/components/RsvpResponseHeader.js | 4 +- src/components/RsvpResponseNavigation.js | 4 +- src/components/RsvpResponseNavigationItem.js | 2 +- src/components/TimeZone.js | 8 +-- src/helpers/datetime.js | 26 ++++----- src/helpers/event.js | 2 +- src/modals/email-communication/index.js | 4 +- 52 files changed, 137 insertions(+), 117 deletions(-) diff --git a/build/admin.asset.php b/build/admin.asset.php index 7a23850d2..ac8955958 100644 --- a/build/admin.asset.php +++ b/build/admin.asset.php @@ -1 +1 @@ - array('wp-blocks', 'wp-data', 'wp-dom-ready'), 'version' => '837da01438a0fcb9564f'); + array('wp-blocks', 'wp-data', 'wp-dom-ready'), 'version' => '3611bca17011dd4cf5be'); diff --git a/build/admin.js b/build/admin.js index a59fbea20..7e0fe851e 100644 --- a/build/admin.js +++ b/build/admin.js @@ -1 +1 @@ -(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var o in t)e.o(t,o)&&!e.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:t[o]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)};const r=window.wp.domReady;var t=e.n(r);const o=window.wp.blocks;function n(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,r)=>e&&e[r]),GatherPress)}window.wp.data,t()((()=>{Object.keys(n("unregister_blocks")).forEach((e=>{const r=n("unregister_blocks")[e];r&&void 0!==(0,o.getBlockType)(r)&&(0,o.unregisterBlockType)(r)}))}))})(); \ No newline at end of file +(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var o in t)e.o(t,o)&&!e.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:t[o]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)};const r=window.wp.domReady;var t=e.n(r);const o=window.wp.blocks;function s(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,r)=>e&&e[r]),GatherPress)}window.wp.data,t()((()=>{Object.keys(s("misc.unregisterBlocks")).forEach((e=>{const r=s("misc.unregisterBlocks")[e];r&&void 0!==(0,o.getBlockType)(r)&&(0,o.unregisterBlockType)(r)}))}))})(); \ No newline at end of file diff --git a/build/blocks/event-date/index.asset.php b/build/blocks/event-date/index.asset.php index 62deee5f5..7d704000a 100644 --- a/build/blocks/event-date/index.asset.php +++ b/build/blocks/event-date/index.asset.php @@ -1 +1 @@ - array('moment', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => 'a138a9ec998692e29dec'); + array('moment', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => 'ef3db1d7da77d8756201'); diff --git a/build/blocks/event-date/index.js b/build/blocks/event-date/index.js index 4679828a9..51ce6b38f 100644 --- a/build/blocks/event-date/index.js +++ b/build/blocks/event-date/index.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e,t={3484:(e,t,n)=>{const r=window.wp.blocks,a=window.React,o=window.moment;var i=n.n(o);const s=window.wp.i18n,l=window.wp.blockEditor,c=window.wp.components,m=window.wp.element,d=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const a=new CustomEvent(e,{detail:r});dispatchEvent(a)}},p=window.wp.data,u=window.wp.apiFetch;var f=n.n(u);function v(){(0,p.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function g(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function _(e,t){if("object"!=typeof GatherPress)return;const n=e.split("."),r=n.pop();n.reduce(((e,t)=>{var n;return null!==(n=e[t])&&void 0!==n?n:e[t]={}}),GatherPress)[r]=t}function h(){const e=i().tz(g("event_datetime.datetime_end"),D());return i().tz(D()).valueOf()>e.valueOf()}function E(){const e="gp_event_past",t=(0,p.dispatch)("core/notices");t.removeNotice(e),h()&&t.createNotice("warning",(0,s.__)("This event has already past.","gatherpress"),{id:e,isDismissible:!1})}const T="YYYY-MM-DDTHH:mm:ss",w="YYYY-MM-DD HH:mm:ss",z=i().tz(D()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(T),b=i().tz(z,D()).add(2,"hours").format(T);function S(){return x(g("settings.date_format"))+" "+x(g("settings.time_format"))}function D(e=g("event_datetime.timezone")){return i().tz.zone(e)?e:(0,s.__)("GMT","gatherpress")}function y(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,n=e.replace(t,"$1");return n!==e?"UTC"+n+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function O(e,t=null){!function(e){const t=i().tz(g("event_datetime.datetime_end"),D()).valueOf(),n=i().tz(e,D()).valueOf();n>=t&&k(i().tz(n,D()).add(2,"hours").format(T))}(e),_("event_datetime.datetime_start",e),"function"==typeof t&&t(e),v()}function k(e,t=null){!function(e){const t=i().tz(g("event_datetime.datetime_start"),D()).valueOf(),n=i().tz(e,D()).valueOf();n<=t&&O(i().tz(n,D()).subtract(2,"hours").format(T))}(e),_("event_datetime.datetime_end",e),null!==t&&t(e),v()}function P(){const e=(0,p.select)("core/editor").isSavingPost(),t=(0,p.select)("core/editor").isAutosavingPost();"gp_event"===(0,p.select)("core/editor").getCurrentPostType()&&e&&!t&&f()({path:"/gatherpress/v1/event/datetime/",method:"POST",data:{post_id:g("post_id"),datetime_start:i().tz(g("event_datetime.datetime_start"),D()).format(w),datetime_end:i().tz(g("event_datetime.datetime_end"),D()).format(w),timezone:g("event_datetime.timezone"),_wpnonce:g("nonce")}}).then((()=>{!function(){const e="gp_event_communcation",t=(0,p.dispatch)("core/notices");t.removeNotice(e),"publish"!==(0,p.select)("core/editor").getEditedPostAttribute("status")||h()||t.createNotice("success",(0,s.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{d({setOpen:!0})},label:(0,s.__)("Compose Message","gatherpress")}]})}()}))}function x(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map((e=>e in t?t[e]:e)).join("")}const C=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,a.createElement)("div",{style:{position:"relative"}},e.children,(0,a.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},M=window.wp.date,Y=e=>{const{dateTimeStart:t}=e;return i().tz(t,D()).format(S())},j=e=>{const{dateTimeEnd:t}=e;return i().tz(t,D()).format(S())},F=e=>{const{dateTimeStart:t,setDateTimeStart:n}=e,r=(0,M.getSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,a.createElement)(c.DateTimePicker,{currentDate:t,onChange:e=>O(e,n),is12Hour:o})},$=e=>{const{dateTimeEnd:t,setDateTimeEnd:n}=e,r=(0,M.getSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,a.createElement)(c.DateTimePicker,{currentDate:t,onChange:e=>k(e,n),is12Hour:o})},H=e=>{const{dateTimeStart:t,setDateTimeStart:n}=e;return(0,m.useEffect)((()=>{n(i().tz(function(){let e=g("event_datetime.datetime_start");return e=""!==e?i().tz(e,D()).format(T):z,_("event_datetime.datetime_start",e),e}(),D()).format(T)),d({setDateTimeStart:t}),E()})),(0,a.createElement)(c.PanelRow,null,(0,a.createElement)(c.Flex,{direction:"column",gap:"0"},(0,a.createElement)(c.FlexItem,null,(0,a.createElement)("label",{htmlFor:"gp-datetime-start"},(0,s.__)("Start","gatherpress"))),(0,a.createElement)(c.FlexItem,null,(0,a.createElement)(c.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,a.createElement)(c.Button,{id:"gp-datetime-start",onClick:n,"aria-expanded":e,isLink:!0},(0,a.createElement)(Y,{dateTimeStart:t})),renderContent:()=>(0,a.createElement)(F,{dateTimeStart:t,setDateTimeStart:n})}))))},I=e=>{const{dateTimeEnd:t,setDateTimeEnd:n}=e;return(0,m.useEffect)((()=>{n(i().tz(function(){let e=g("event_datetime.datetime_end");return e=""!==e?i().tz(e,D()).format(T):b,_("event_datetime.datetime_end",e),e}(),D()).format(T)),d({setDateTimeEnd:t}),E()})),(0,a.createElement)(c.PanelRow,null,(0,a.createElement)(c.Flex,{direction:"column",gap:"0"},(0,a.createElement)(c.FlexItem,null,(0,a.createElement)("label",{htmlFor:"gp-datetime-end"},(0,s.__)("End","gatherpress"))),(0,a.createElement)(c.FlexItem,null,(0,a.createElement)(c.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,a.createElement)(c.Button,{id:"gp-datetime-end",onClick:n,"aria-expanded":e,isLink:!0},(0,a.createElement)(j,{dateTimeEnd:t})),renderContent:()=>(0,a.createElement)($,{dateTimeEnd:t,setDateTimeEnd:n})}))))},G=e=>{const{timezone:t,setTimezone:n}=e,r=g("timezone_choices");return(0,m.useEffect)((()=>{n(g("event_datetime.timezone"))}),[n]),(0,m.useEffect)((()=>{d({setTimezone:g("event_datetime.timezone")})})),(0,a.createElement)(c.PanelRow,null,(0,a.createElement)(c.SelectControl,{label:(0,s.__)("Time Zone","gatherpress"),value:y(t),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,n=e.replace(t,"$1");if(n!==e){const r=e.replace(t,"$2").padStart(2,"0");let a=e.replace(t,"$3");return""===a&&(a=":00"),a=a.replace(".25",":15").replace(".5",":30").replace(".75",":45"),n+r+a}return e}(e),n(e),_("event_datetime.timezone",e),v()}},Object.keys(r).map((e=>(0,a.createElement)("optgroup",{key:e,label:e},Object.keys(r[e]).map((t=>(0,a.createElement)("option",{key:t,value:t},r[e][t]))))))))},N=()=>{const[e,t]=(0,m.useState)(),[n,r]=(0,m.useState)(),[o,i]=(0,m.useState)();return(0,p.subscribe)(P),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h3",null,(0,s.__)("Date & time","gatherpress")),(0,a.createElement)(H,{dateTimeStart:e,setDateTimeStart:t}),(0,a.createElement)(I,{dateTimeEnd:n,setDateTimeEnd:r}),(0,a.createElement)(G,{timezone:o,setTimezone:i}))},B=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/event-date","version":"1.0.0","title":"Event Date","category":"gatherpress","icon":"clock","example":{},"description":"Displays the date and time for an event.","attributes":{"eventEnd":{"type":"string"},"eventStart":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","render":"file:./render.php"}');(0,r.registerBlockType)(B,{edit:()=>{const e=(0,l.useBlockProps)(),[t,n]=(0,m.useState)(z),[r,o]=(0,m.useState)(b),[d,p]=(0,m.useState)(D());return((e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}})({setDateTimeEnd:o,setDateTimeStart:n,setTimezone:p}),(0,a.createElement)("div",{...e},(0,a.createElement)(C,null,(0,a.createElement)(c.Flex,{justify:"normal",align:"center",gap:"4"},(0,a.createElement)(c.FlexItem,{display:"flex",className:"gp-event-date__icon"},(0,a.createElement)(c.Icon,{icon:"clock"})),(0,a.createElement)(c.FlexItem,null,((e,t,n)=>{const r=x(g("settings.date_format")),a=x(g("settings.time_format")),o=g("settings.show_timezone")?"z":"",l=r+" "+a,c=D(n);let m=r+" "+a+" "+o;return i().tz(e,c).format(r)===i().tz(t,c).format(r)&&(m=a+" "+o),(0,s.sprintf)(/* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ -(0,s.__)("%1$s to %2$s %3$s"),i().tz(e,c).format(l),i().tz(t,c).format(m),(d=D(d=c),(0,s.__)("GMT","gatherpress")!==d?"":function(e=""){return e.replace(":","")}(g("event_datetime.timezone"))));var d})(t,r,d)),(0,a.createElement)(l.InspectorControls,null,(0,a.createElement)(c.PanelBody,null,(0,a.createElement)(N,null))))))},save:()=>null})}},n={};function r(e){var a=n[e];if(void 0!==a)return a.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,n,a,o)=>{if(!n){var i=1/0;for(m=0;m=o)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(s=!1,o0&&e[m-1][2]>o;m--)e[m]=e[m-1];e[m]=[n,a,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={591:0,42:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var a,o,[i,s,l]=n,c=0;if(i.some((t=>0!==e[t]))){for(a in s)r.o(s,a)&&(r.m[a]=s[a]);if(l)var m=l(r)}for(t&&t(n);cr(3484)));a=r.O(a)})(); \ No newline at end of file +(()=>{"use strict";var e,t={3484:(e,t,n)=>{const a=window.wp.blocks,r=window.React,i=window.moment;var o=n.n(i);const s=window.wp.i18n,l=window.wp.blockEditor,c=window.wp.components,m=window.wp.element,d=(e,t="")=>{for(const[n,a]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:a});dispatchEvent(r)}},p=window.wp.data,u=window.wp.apiFetch;var f=n.n(u);function v(){(0,p.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function g(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function h(e,t){if("object"!=typeof GatherPress)return;const n=e.split("."),a=n.pop();n.reduce(((e,t)=>{var n;return null!==(n=e[t])&&void 0!==n?n:e[t]={}}),GatherPress)[a]=t}function E(){const e=o().tz(g("eventDetails.dateTime.datetime_end"),S());return o().tz(S()).valueOf()>e.valueOf()}function T(){const e="gp_event_past",t=(0,p.dispatch)("core/notices");t.removeNotice(e),E()&&t.createNotice("warning",(0,s.__)("This event has already past.","gatherpress"),{id:e,isDismissible:!1})}const _="YYYY-MM-DDTHH:mm:ss",D="YYYY-MM-DD HH:mm:ss",w=o().tz(S()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(_),z=o().tz(w,S()).add(2,"hours").format(_);function b(){return x(g("settings.dateFormat"))+" "+x(g("settings.timeFormat"))}function S(e=g("eventDetails.dateTime.timezone")){return o().tz.zone(e)?e:(0,s.__)("GMT","gatherpress")}function y(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,n=e.replace(t,"$1");return n!==e?"UTC"+n+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function O(e,t=null){!function(e){const t=o().tz(g("eventDetails.dateTime.datetime_end"),S()).valueOf(),n=o().tz(e,S()).valueOf();n>=t&&k(o().tz(n,S()).add(2,"hours").format(_))}(e),h("event_datetime.datetime_start",e),"function"==typeof t&&t(e),v()}function k(e,t=null){!function(e){const t=o().tz(g("eventDetails.dateTime.datetime_start"),S()).valueOf(),n=o().tz(e,S()).valueOf();n<=t&&O(o().tz(n,S()).subtract(2,"hours").format(_))}(e),h("event_datetime.datetime_end",e),null!==t&&t(e),v()}function P(){const e=(0,p.select)("core/editor").isSavingPost(),t=(0,p.select)("core/editor").isAutosavingPost();"gp_event"===(0,p.select)("core/editor").getCurrentPostType()&&e&&!t&&f()({path:"/gatherpress/v1/event/datetime/",method:"POST",data:{post_id:g("eventDetails.postId"),datetime_start:o().tz(g("eventDetails.dateTime.datetime_start"),S()).format(D),datetime_end:o().tz(g("eventDetails.dateTime.datetime_end"),S()).format(D),timezone:g("eventDetails.dateTime.timezone"),_wpnonce:g("misc.nonce")}}).then((()=>{!function(){const e="gp_event_communcation",t=(0,p.dispatch)("core/notices");t.removeNotice(e),"publish"!==(0,p.select)("core/editor").getEditedPostAttribute("status")||E()||t.createNotice("success",(0,s.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{d({setOpen:!0})},label:(0,s.__)("Compose Message","gatherpress")}]})}()}))}function x(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map((e=>e in t?t[e]:e)).join("")}const C=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},M=window.wp.date,Y=e=>{const{dateTimeStart:t}=e;return o().tz(t,S()).format(b())},F=e=>{const{dateTimeEnd:t}=e;return o().tz(t,S()).format(b())},j=e=>{const{dateTimeStart:t,setDateTimeStart:n}=e,a=(0,M.getSettings)(),i=/a(?!\\)/i.test(a.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,r.createElement)(c.DateTimePicker,{currentDate:t,onChange:e=>O(e,n),is12Hour:i})},$=e=>{const{dateTimeEnd:t,setDateTimeEnd:n}=e,a=(0,M.getSettings)(),i=/a(?!\\)/i.test(a.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,r.createElement)(c.DateTimePicker,{currentDate:t,onChange:e=>k(e,n),is12Hour:i})},I=e=>{const{dateTimeStart:t,setDateTimeStart:n}=e;return(0,m.useEffect)((()=>{n(o().tz(function(){let e=g("eventDetails.dateTime.datetime_start");return e=""!==e?o().tz(e,S()).format(_):w,h("event_datetime.datetime_start",e),e}(),S()).format(_)),d({setDateTimeStart:t}),T()})),(0,r.createElement)(c.PanelRow,null,(0,r.createElement)(c.Flex,{direction:"column",gap:"0"},(0,r.createElement)(c.FlexItem,null,(0,r.createElement)("label",{htmlFor:"gp-datetime-start"},(0,s.__)("Start","gatherpress"))),(0,r.createElement)(c.FlexItem,null,(0,r.createElement)(c.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,r.createElement)(c.Button,{id:"gp-datetime-start",onClick:n,"aria-expanded":e,isLink:!0},(0,r.createElement)(Y,{dateTimeStart:t})),renderContent:()=>(0,r.createElement)(j,{dateTimeStart:t,setDateTimeStart:n})}))))},H=e=>{const{dateTimeEnd:t,setDateTimeEnd:n}=e;return(0,m.useEffect)((()=>{n(o().tz(function(){let e=g("eventDetails.dateTime.datetime_end");return e=""!==e?o().tz(e,S()).format(_):z,h("event_datetime.datetime_end",e),e}(),S()).format(_)),d({setDateTimeEnd:t}),T()})),(0,r.createElement)(c.PanelRow,null,(0,r.createElement)(c.Flex,{direction:"column",gap:"0"},(0,r.createElement)(c.FlexItem,null,(0,r.createElement)("label",{htmlFor:"gp-datetime-end"},(0,s.__)("End","gatherpress"))),(0,r.createElement)(c.FlexItem,null,(0,r.createElement)(c.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,r.createElement)(c.Button,{id:"gp-datetime-end",onClick:n,"aria-expanded":e,isLink:!0},(0,r.createElement)(F,{dateTimeEnd:t})),renderContent:()=>(0,r.createElement)($,{dateTimeEnd:t,setDateTimeEnd:n})}))))},G=e=>{const{timezone:t,setTimezone:n}=e,a=g("misc.timezoneChoices");return(0,m.useEffect)((()=>{n(g("eventDetails.dateTime.timezone"))}),[n]),(0,m.useEffect)((()=>{d({setTimezone:g("eventDetails.dateTime.timezone")})})),(0,r.createElement)(c.PanelRow,null,(0,r.createElement)(c.SelectControl,{label:(0,s.__)("Time Zone","gatherpress"),value:y(t),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,n=e.replace(t,"$1");if(n!==e){const a=e.replace(t,"$2").padStart(2,"0");let r=e.replace(t,"$3");return""===r&&(r=":00"),r=r.replace(".25",":15").replace(".5",":30").replace(".75",":45"),n+a+r}return e}(e),n(e),h("eventDetails.dateTime.timezone",e),v()}},Object.keys(a).map((e=>(0,r.createElement)("optgroup",{key:e,label:e},Object.keys(a[e]).map((t=>(0,r.createElement)("option",{key:t,value:t},a[e][t]))))))))},N=()=>{const[e,t]=(0,m.useState)(),[n,a]=(0,m.useState)(),[i,o]=(0,m.useState)();return(0,p.subscribe)(P),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("h3",null,(0,s.__)("Date & time","gatherpress")),(0,r.createElement)(I,{dateTimeStart:e,setDateTimeStart:t}),(0,r.createElement)(H,{dateTimeEnd:n,setDateTimeEnd:a}),(0,r.createElement)(G,{timezone:i,setTimezone:o}))},B=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/event-date","version":"1.0.0","title":"Event Date","category":"gatherpress","icon":"clock","example":{},"description":"Displays the date and time for an event.","attributes":{"eventEnd":{"type":"string"},"eventStart":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","render":"file:./render.php"}');(0,a.registerBlockType)(B,{edit:()=>{const e=(0,l.useBlockProps)(),[t,n]=(0,m.useState)(w),[a,i]=(0,m.useState)(z),[d,p]=(0,m.useState)(S());return((e,t="")=>{for(const[n,a]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{a(e.detail)}),!1)}})({setDateTimeEnd:i,setDateTimeStart:n,setTimezone:p}),(0,r.createElement)("div",{...e},(0,r.createElement)(C,null,(0,r.createElement)(c.Flex,{justify:"normal",align:"center",gap:"4"},(0,r.createElement)(c.FlexItem,{display:"flex",className:"gp-event-date__icon"},(0,r.createElement)(c.Icon,{icon:"clock"})),(0,r.createElement)(c.FlexItem,null,((e,t,n)=>{const a=x(g("settings.dateFormat")),r=x(g("settings.timeFormat")),i=g("settings.showTimezone")?"z":"",l=a+" "+r,c=S(n);let m=a+" "+r+" "+i;return o().tz(e,c).format(a)===o().tz(t,c).format(a)&&(m=r+" "+i),(0,s.sprintf)(/* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ +(0,s.__)("%1$s to %2$s %3$s"),o().tz(e,c).format(l),o().tz(t,c).format(m),(d=S(d=c),(0,s.__)("GMT","gatherpress")!==d?"":function(e=""){return e.replace(":","")}(g("eventDetails.dateTime.timezone"))));var d})(t,a,d)),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(N,null))))))},save:()=>null})}},n={};function a(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,a),i.exports}a.m=t,e=[],a.O=(t,n,r,i)=>{if(!n){var o=1/0;for(m=0;m=i)&&Object.keys(a.O).every((e=>a.O[e](n[l])))?n.splice(l--,1):(s=!1,i0&&e[m-1][2]>i;m--)e[m]=e[m-1];e[m]=[n,r,i]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={591:0,42:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[o,s,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(l)var m=l(a)}for(t&&t(n);ca(3484)));r=a.O(r)})(); \ No newline at end of file diff --git a/build/blocks/events-list/events-list.asset.php b/build/blocks/events-list/events-list.asset.php index f35c52014..722fcb12d 100644 --- a/build/blocks/events-list/events-list.asset.php +++ b/build/blocks/events-list/events-list.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'f7c3f6f593f30e15498a'); + array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'fbe1da406b8a2b8a50c9'); diff --git a/build/blocks/events-list/events-list.js b/build/blocks/events-list/events-list.js index 5353250d8..cf83186ce 100644 --- a/build/blocks/events-list/events-list.js +++ b/build/blocks/events-list/events-list.js @@ -1,2 +1,2 @@ -(()=>{var e={9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);r(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new l.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,l.isTag)(e)}function y(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function _(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?x(e.children):[];var l=new f(o);o.forEach((function(e){return e.parent=l})),n=l}else if(_(e)){o=t?x(e.children):[];var a=new m(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return l.test(e)||null===(t=null==(v=m.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=m.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),m.querySelectorAll(n);case o:case r:var h=s(e).querySelectorAll(p);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(v=s(e,r).querySelector(r)).childNodes;var v}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=s(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=s("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),i=o(n(484)),l=n(4606),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(y=d(y,{key:y.key||h})),o.push(c(y,v,h));continue}}if("text"!==v.type){var g=v,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(w=e(v.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(v.name,b,w),v,h))}else{var _=!v.data.trim().length;if(_&&v.parent&&!(0,l.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&_)continue;o.push(c(v.data,v,h))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var l=o(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=s.source}h.prototype.content=e;var v=[];function y(t){var n=new Error(s.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=p,n.source=e,!s.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(_(),!g(i))return y("property missing ':'");var o=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,l){if(l!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==a){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,l=i&&i().ownerDocument||document;r&&d.add(l.body,r),o&&d.add(l.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,l=e.children,a=n?{}:i.content,s=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,l);return this.props.overlayElement(c,d)}}]),t}(l.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){l&&(l.removeAttribute?l.removeAttribute("aria-hidden"):null!=l.length?l.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(l).forEach((function(e){return e.removeAttribute("aria-hidden")}))),l=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return l=t||l},t.validateElement=s,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){l=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),l=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function s(e){var t=e||l;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,l],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var l in o)r(i,o[l]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=s,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",s,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",s),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",s),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",s),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],l=null,a=!1;function s(){a=!0}function c(){if(a){if(a=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,r.default)(l)[0]||l).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,l=t.shiftKey,a=n[0],s=n[n.length-1],c=i();if(e===c){if(!l)return;o=s}if(s!==c||l||(o=a),a===c&&l&&(o=s),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=l?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=l?s:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(l)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(o,a))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=n(9196);const t=window.wp.domReady;var o=n.n(t);const r=window.wp.element,i=window.wp.components,l=window.wp.i18n;var a=n(3426);const s=a.default||a;var c=n(3253),u=n.n(c);const d=Math.min,p=Math.max,f=Math.round,m=Math.floor,h=e=>({x:e,y:e}),v={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function g(e,t,n){return p(e,d(t,n))}function b(e,t){return"function"==typeof e?e(t):e}function w(e){return e.split("-")[0]}function _(e){return e.split("-")[1]}function E(e){return"x"===e?"y":"x"}function x(e){return"y"===e?"height":"width"}function S(e){return["top","bottom"].includes(w(e))?"y":"x"}function O(e){return E(S(e))}function C(e){return e.replace(/start|end/g,(e=>y[e]))}function T(e){return e.replace(/left|right|bottom|top/g,(e=>v[e]))}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function A(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function N(e,t,n){let{reference:o,floating:r}=e;const i=S(t),l=O(t),a=x(l),s=w(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(s){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(_(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function R(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=b(t,e),m=k(f),h=a[p?"floating"===d?"reference":"floating":d],v=A(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===d?{...l.floating,x:o,y:r}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},_=A(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:g,strategy:s}):y);return{top:(v.top-_.top+m.top)/w.y,bottom:(_.bottom-v.bottom+m.bottom)/w.y,left:(v.left-_.left+m.left)/w.x,right:(_.right-v.right+m.right)/w.x}}const P=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=b(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=w(r),g=w(a)===a,E=await(null==s.isRTL?void 0:s.isRTL(c.floating)),S=p||(g||!h?[T(a)]:function(e){const t=T(e);return[C(e),t,C(t)]}(a));p||"none"===m||S.push(...function(e,t,n,o){const r=_(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(w(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(C)))),i}(a,h,m,E));const k=[a,...S],A=await R(t,v),N=[];let P=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&N.push(A[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=_(e),r=O(e),i=x(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=T(l)),[l,T(l)]}(r,l,E);N.push(A[e[0]],A[e[1]])}if(P=[...P,{placement:r,overflows:N}],!N.every((e=>e<=0))){var M,L;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(L=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(f){case"bestFit":{var D;const e=null==(D=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},M=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=w(n),a=_(n),s="y"===S(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=b(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),s?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},L=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=b(e,t),c={x:n,y:o},u=await R(t,s),d=S(w(r)),p=E(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=g(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";m=g(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function D(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function I(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return e instanceof Node||e instanceof j(e).Node}function H(e){return e instanceof Element||e instanceof j(e).Element}function B(e){return e instanceof HTMLElement||e instanceof j(e).HTMLElement}function U(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof j(e).ShadowRoot)}function W(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function z(e){return["table","td","th"].includes(D(e))}function V(e){const t=q(),n=G(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function q(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $(e){return["html","body","#document"].includes(D(e))}function G(e){return j(e).getComputedStyle(e)}function X(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Y(e){if("html"===D(e))return e;const t=e.assignedSlot||e.parentNode||U(e)&&e.host||I(e);return U(t)?t.host:t}function K(e){const t=Y(e);return $(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&W(t)?t:K(t)}function Z(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=K(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=j(r);return i?t.concat(l,l.visualViewport||[],W(r)?r:[],l.frameElement&&n?Z(l.frameElement):[]):t.concat(r,Z(r,[],n))}function J(e){const t=G(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=B(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=f(n)!==i||f(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function Q(e){return H(e)?e:e.contextElement}function ee(e){const t=Q(e);if(!B(t))return h(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=J(t);let l=(i?f(n.width):n.width)/o,a=(i?f(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const te=h(0);function ne(e){const t=j(e);return q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:te}function oe(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Q(e);let l=h(1);t&&(o?H(o)&&(l=ee(o)):l=ee(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==j(e))&&t}(i,n,o)?ne(i):h(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,u=r.width/l.x,d=r.height/l.y;if(i){const e=j(i),t=o&&H(o)?j(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=ee(n),t=n.getBoundingClientRect(),o=G(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=r,c+=i,n=j(n).frameElement}}return A({width:u,height:d,x:s,y:c})}function re(e){return oe(I(e)).left+X(e).scrollLeft}function ie(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=j(e),o=I(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=q();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=I(e),n=X(e),o=e.ownerDocument.body,r=p(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=p(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+re(e);const a=-n.scrollTop;return"rtl"===G(o).direction&&(l+=p(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(I(e));else if(H(t))o=function(e,t){const n=oe(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=B(e)?ee(e):h(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ne(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return A(o)}function le(e,t){const n=Y(e);return!(n===t||!H(n)||$(n))&&("fixed"===G(n).position||le(n,t))}function ae(e,t,n){const o=B(t),r=I(t),i="fixed"===n,l=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=h(0);if(o||!o&&!i)if(("body"!==D(t)||W(r))&&(a=X(t)),o){const e=oe(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=re(r));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function se(e,t){return B(e)&&"fixed"!==G(e).position?t?t(e):e.offsetParent:null}function ce(e,t){const n=j(e);if(!B(e))return n;let o=se(e,t);for(;o&&z(o)&&"static"===G(o).position;)o=se(o,t);return o&&("html"===D(o)||"body"===D(o)&&"static"===G(o).position&&!V(o))?n:o||function(e){let t=Y(e);for(;B(t)&&!$(t);){if(V(t))return t;t=Y(t)}return null}(e)||n}const ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=B(n),i=I(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=h(1);const s=h(0);if((r||!r&&"fixed"!==o)&&(("body"!==D(n)||W(i))&&(l=X(n)),B(n))){const e=oe(n);a=ee(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:I,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=Z(e,[],!1).filter((e=>H(e)&&"body"!==D(e))),r=null;const i="fixed"===G(e).position;let l=i?Y(e):e;for(;H(l)&&!$(l);){const t=G(l),n=V(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||W(l)&&!n&&le(e,l))?o=o.filter((e=>e!==l)):r=t,l=Y(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=ie(t,n,r);return e.top=p(o.top,e.top),e.right=d(o.right,e.right),e.bottom=d(o.bottom,e.bottom),e.left=p(o.left,e.left),e}),ie(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ce,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ce,i=this.getDimensions;return{reference:ae(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return J(e)},getScale:ee,isElement:H,isRTL:function(e){return"rtl"===G(e).direction}};const de=(e,t,n)=>{const o=new Map,r={platform:ue,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=N(c,o,s),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},ve={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},ye=(0,e.createContext)({getTooltipData:()=>ve});function ge(t="DEFAULT_TOOLTIP_ID"){return(0,e.useContext)(ye).getTooltipData(t)}const be="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,we=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},_e=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(we(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ee=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:l=[M(Number(r)),P({fallbackAxisSideDirection:"start"}),L({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const s=l;return n?(s.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:u=0}=b(c,e)||{};if(null==s)return{};const p=k(u),f={x:t,y:n},m=O(o),h=x(m),v=await i.getDimensions(s),y="y"===m,w=y?"top":"left",E=y?"bottom":"right",S=y?"clientHeight":"clientWidth",C=r.reference[h]+r.reference[m]-f[m]-r.floating[h],T=f[m]-r.reference[m],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=A?A[S]:0;N&&await(null==i.isElement?void 0:i.isElement(A))||(N=l.floating[S]||r.floating[h]);const R=C/2-T/2,P=N/2-v[h]/2-1,M=d(p[w],P),L=d(p[E],P),D=M,j=N-v[h]-L,I=N/2-v[h]/2+R,F=g(D,I,j),H=!a.arrow&&null!=_(o)&&I!=F&&r.reference[h]/2-(I{var r,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):de(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var xe={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Se={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Oe=({forwardRef:t,id:n,className:o,classNameArrow:r,variant:i="dark",anchorId:l,anchorSelect:a,place:s="top",offset:c=10,events:u=["hover"],openOnClick:f=!1,positionStrategy:h="absolute",middlewares:v,wrapper:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:P,afterShow:M,afterHide:L,content:D,contentWrapperRef:j,isOpen:F,setIsOpen:H,activeAnchor:B,setActiveAnchor:U,border:W,opacity:z,arrowColor:V,role:q="tooltip"})=>{var $;const G=(0,e.useRef)(null),X=(0,e.useRef)(null),Y=(0,e.useRef)(null),K=(0,e.useRef)(null),J=(0,e.useRef)(null),[ee,te]=(0,e.useState)(s),[ne,re]=(0,e.useState)({}),[ie,le]=(0,e.useState)({}),[ae,se]=(0,e.useState)(!1),[ce,ue]=(0,e.useState)(!1),[de,fe]=(0,e.useState)(null),me=(0,e.useRef)(!1),ve=(0,e.useRef)(null),{anchorRefs:ye,setActiveAnchor:we}=ge(n),Oe=(0,e.useRef)(!1),[Ce,Te]=(0,e.useState)([]),ke=(0,e.useRef)(!1),Ae=f||u.includes("click"),Ne=Ae||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Re=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Ae&&Object.assign(Re,{mouseenter:!1,focus:!1,click:!0});const Pe=k?{...k}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!k&&Ae&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Ne||!1};N&&(Object.assign(Re,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),be((()=>(ke.current=!0,()=>{ke.current=!1})),[]);const Le=e=>{ke.current&&(e&&ue(!0),setTimeout((()=>{ke.current&&(null==H||H(e),void 0===F&&se(e))}),10))};(0,e.useEffect)((()=>{if(void 0===F)return()=>null;F&&ue(!0);const e=setTimeout((()=>{se(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,e.useEffect)((()=>{if(ae!==me.current)if(J.current&&clearTimeout(J.current),me.current=ae,ae)null==M||M();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();J.current=setTimeout((()=>{ue(!1),fe(null),null==L||L()}),e+25)}}),[ae]);const De=(e=g)=>{Y.current&&clearTimeout(Y.current),Y.current=setTimeout((()=>{Le(!0)}),e)},je=(e=b)=>{K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{Oe.current||Le(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return U(null),void we({current:null});g?De():Le(!0),U(n),we({current:n}),K.current&&clearTimeout(K.current)},Fe=()=>{x?je(b||100):b?je():Le(!1),Y.current&&clearTimeout(Y.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Ee({place:null!==(n=null==de?void 0:de.place)&&void 0!==n?n:s,offset:c,elementReference:o,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:v,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),ve.current=n},Ue=e=>{var t;if(!ae)return;const n=e.target;(null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...Ce].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),Y.current&&clearTimeout(Y.current))},We=he(Ie,50,!0),ze=he(Fe,50,!0),Ve=(0,e.useCallback)((()=>{var e,t;const n=null!==(e=null==de?void 0:de.position)&&void 0!==e?e:P;n?He(n):w?ve.current&&He(ve.current):(null==B?void 0:B.isConnected)&&Ee({place:null!==(t=null==de?void 0:de.place)&&void 0!==t?t:s,offset:c,elementReference:B,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:v,border:W}).then((e=>{ke.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place))}))}),[ae,B,D,R,s,null==de?void 0:de.place,c,h,P,null==de?void 0:de.position,w]);(0,e.useEffect)((()=>{var e,t;const n=new Set(ye);Ce.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${l}']`);o&&n.add({current:o});const r=()=>{Le(!1)},i=_e(B),a=_e(G.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let s=null;Me.resize?window.addEventListener("resize",r):B&&G.current&&(s=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,c=Q(e),u=r||i?[...c?Z(c):[],...Z(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=c&&a?function(e,t){let n,o=null;const r=I(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const v={rootMargin:-m(u)+"px "+-m(r.clientWidth-(c+f))+"px "+-m(r.clientHeight-(u+h))+"px "+-m(c)+"px",threshold:p(0,d(1,s))||1};let y=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!y)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}y=!1}try{o=new IntersectionObserver(g,{...v,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,v)}o.observe(e)}(!0),i}(c,n):null;let h,v=-1,y=null;l&&(y=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{y&&y.observe(t)}))),n()})),c&&!s&&y.observe(c),y.observe(t));let g=s?oe(e):null;return s&&function t(){const o=oe(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,h=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),y&&y.disconnect(),y=null,s&&cancelAnimationFrame(h)}}(B,G.current,Ve,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",c),Me.clickOutsideAnchor&&window.addEventListener("click",Ue);const u=[],f=e=>{ae&&(null==e?void 0:e.target)===B||Ie(e)},h=e=>{ae&&(null==e?void 0:e.target)===B&&Fe()},v=["mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(Re).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:We}):y.includes(e)&&u.push({event:e,listener:f}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:ze}):y.includes(e)&&u.push({event:e,listener:h}))})),w&&u.push({event:"mousemove",listener:Be});const g=()=>{Oe.current=!0},b=()=>{Oe.current=!1,Fe()};return x&&!Ne&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.addEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==s||s(),Me.clickOutsideAnchor&&window.removeEventListener("click",Ue),Me.escape&&window.removeEventListener("keydown",c),x&&!Ne&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.removeEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[B,Ve,ce,ye,Ce,T,k,A,Ae]),(0,e.useEffect)((()=>{var e,t;let o=null!==(t=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:a)&&void 0!==t?t:"";!o&&n&&(o=`[data-tooltip-id='${n}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===n&&t.push(e.target),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(ue(!1),Le(!1),U(null),Y.current&&clearTimeout(Y.current),K.current&&clearTimeout(K.current),!0)}))}if(o)try{const n=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...n.filter((e=>e.matches(o)))),t.push(...n.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(t.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...t]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[n,a,null==de?void 0:de.anchorSelect,B]),(0,e.useEffect)((()=>{Ve()}),[Ve]),(0,e.useEffect)((()=>{if(!(null==j?void 0:j.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ve()))}));return e.observe(j.current),()=>{e.disconnect()}}),[D,null==j?void 0:j.current]),(0,e.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...Ce,t];B&&n.includes(B)||U(null!==(e=Ce[0])&&void 0!==e?e:t)}),[l,Ce,B]),(0,e.useEffect)((()=>()=>{Y.current&&clearTimeout(Y.current),K.current&&clearTimeout(K.current)}),[]),(0,e.useEffect)((()=>{var e;let t=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:a;if(!t&&n&&(t=`[data-tooltip-id='${n}']`),t)try{const e=Array.from(document.querySelectorAll(t));Te(e)}catch(e){Te([])}}),[n,a,null==de?void 0:de.anchorSelect]);const qe=null!==($=null==de?void 0:de.content)&&void 0!==$?$:D,$e=ae&&Object.keys(ne).length>0;return(0,e.useImperativeHandle)(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):Le(!1)},activeAnchor:B,place:ee,isOpen:Boolean(ce&&!_&&qe&&$e)}))),ce&&!_&&qe?e.createElement(y,{id:n,role:q,className:pe("react-tooltip",xe.tooltip,Se.tooltip,Se[i],o,`react-tooltip__place-${ee}`,xe[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&xe.fixed,x&&xe.clickable),onTransitionEnd:e=>{J.current&&clearTimeout(J.current),ae||"opacity"!==e.propertyName||(ue(!1),fe(null),null==L||L())},style:{...R,...ne,opacity:void 0!==z&&$e?z:void 0},ref:G},qe,e.createElement(y,{className:pe("react-tooltip-arrow",xe.arrow,Se.arrow,r,E&&xe.noArrow),style:{...ie,background:V?`linear-gradient(to right bottom, transparent 50%, ${V} 50%)`:void 0},ref:X})):null},Ce=({content:t})=>e.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),Te=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ke=e.forwardRef((({id:t,anchorId:n,anchorSelect:o,content:r,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:v="absolute",middlewares:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N=!1,style:R,position:P,isOpen:M,disableStyleInjection:L=!1,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:B,role:U="tooltip"},W)=>{const[z,V]=(0,e.useState)(r),[q,$]=(0,e.useState)(i),[G,X]=(0,e.useState)(u),[Y,K]=(0,e.useState)(c),[Z,J]=(0,e.useState)(d),[Q,ee]=(0,e.useState)(g),[te,ne]=(0,e.useState)(b),[oe,re]=(0,e.useState)(w),[ie,le]=(0,e.useState)(_),[ae,se]=(0,e.useState)(p),[ce,ue]=(0,e.useState)(m),[de,fe]=(0,e.useState)(v),[me,he]=(0,e.useState)(null),[ve,ye]=(0,e.useState)(null),be=(0,e.useRef)(L),{anchorRefs:we,activeAnchor:_e}=ge(t),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),xe=e=>{const t={place:e=>{var t;X(null!==(t=e)&&void 0!==t?t:u)},content:e=>{V(null!=e?e:r)},html:e=>{$(null!=e?e:i)},variant:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;se(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");ue(null!=t?t:m)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:v)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{re(null===e?w:"true"===e)},hidden:e=>{le(null===e?_:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,e.useEffect)((()=>{V(r)}),[r]),(0,e.useEffect)((()=>{$(i)}),[i]),(0,e.useEffect)((()=>{X(u)}),[u]),(0,e.useEffect)((()=>{K(c)}),[c]),(0,e.useEffect)((()=>{J(d)}),[d]),(0,e.useEffect)((()=>{ee(g)}),[g]),(0,e.useEffect)((()=>{ne(b)}),[b]),(0,e.useEffect)((()=>{re(w)}),[w]),(0,e.useEffect)((()=>{le(_)}),[_]),(0,e.useEffect)((()=>{fe(v)}),[v]),(0,e.useEffect)((()=>{be.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,e.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,e.useEffect)((()=>{var e;const r=new Set(we);let i=o;if(!i&&t&&(i=`[data-tooltip-id='${t}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${n}']`);if(l&&r.add({current:l}),!r.size)return()=>null;const a=null!==(e=null!=ve?ve:l)&&void 0!==e?e:_e.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(a);xe(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Ee(a);xe(e),s.observe(a,c)}return()=>{s.disconnect()}}),[we,_e,ve,n,o]),(0,e.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Te("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),j&&!Te("opacity",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`opacity\`.`)}),[]);let Se=f;const ke=(0,e.useRef)(null);if(l){const t=l({content:null!=z?z:null,activeAnchor:ve});Se=t?e.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},t):null}else z&&(Se=z);q&&(Se=e.createElement(Ce,{content:q}));const Ae={forwardRef:W,id:t,anchorId:n,anchorSelect:o,className:pe(a,me),classNameArrow:s,content:Se,contentWrapperRef:ke,place:G,variant:Y,offset:Z,wrapper:ae,events:ce,openOnClick:h,positionStrategy:de,middlewares:y,delayShow:Q,delayHide:te,float:oe,hidden:ie,noArrow:E,clickable:x,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:P,isOpen:M,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:B,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:U};return e.createElement(Oe,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||me({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||me({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Ae=window.wp.apiFetch;var Ne=n.n(Ae);const Re=({type:t="upcoming",status:n="no_status"})=>{const o={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,l.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,l.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Not Attending","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,l.__)("Went","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")}}};return(0,e.createElement)("div",{className:"gp-status__response"},(0,e.createElement)("span",{className:o[t][n].icon}),(0,e.createElement)("strong",null,o[t][n].text))};function Pe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const Me=({eventId:t,currentUser:n="",type:o,enableAnonymousRsvp:a})=>{const[c,d]=(0,r.useState)(n.status),[p,f]=(0,r.useState)(Number(n.anonymous)),[m,h]=(0,r.useState)(n.guests),[v,y]=(0,r.useState)("hidden"),[g,b]=(0,r.useState)("false"),[w,_]=(0,r.useState)(!1);if("past"===o)return"";"undefined"==typeof adminpage&&u().setAppElement(".gp-enabled");const E=e=>{e.preventDefault(),_(!1)},x=async(e,n,o,r=0,i=!0)=>{e.preventDefault(),"attending"!==n&&(r=0),Ne()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:t,status:n,guests:r,anonymous:o,_wpnonce:Pe("nonce")}}).then((t=>{if(t.success){d(t.status),h(t.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,o]of Object.entries(t.responses))n[e]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:t.status,setRsvpResponse:t.responses,setRsvpCount:n,setRsvpSeeAllLink:n[t.status]>8,setOnlineEventLink:t.online_link},t.event_id),i&&E(e)}}))},S=e=>{switch(e){case"attending":return(0,l.__)("You're attending","gatherpress");case"waiting_list":return(0,l.__)("You're wait listed","gatherpress");case"not_attending":return(0,l.__)("You're not attending","gatherpress")}return(0,l.__)("RSVP to this event","gatherpress")};return(0,e.createElement)("div",{className:"gp-rsvp"},(0,e.createElement)(i.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":g,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(y("hidden"===v?"show":"hidden"),b("false"===g?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),_(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,l.__)("Edit RSVP","gatherpress")}return(0,l.__)("RSVP","gatherpress")})(c))),(0,e.createElement)(u(),{isOpen:w,onRequestClose:E,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,l.__)("Edit RSVP","gatherpress")},""===n&&(0,e.createElement)((()=>(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},(0,l.__)("Login Required","gatherpress")),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},(0,l.__)("You must ","gatherpress"),(0,e.createElement)("a",{href:Pe("login_url")},(0,l.__)("Login","gatherpress")),(0,l.__)(" to RSVP to events.","gatherpress")),""!==Pe("registration_url")&&(0,e.createElement)("div",{className:"gp-modal__text"},(0,e.createElement)("a",{href:Pe("registration_url")},(0,l.__)("Register","gatherpress")),(0,l.__)(" if you do not have an account.","gatherpress"))),(0,e.createElement)(i.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,l.__)("Close","gatherpress")))))),null),""!==n&&(0,e.createElement)((({status:t})=>{let n="",o="";return"not_attending"===t||"no_status"===t?(n="attending",o=(0,l.__)("Attend","gatherpress")):(n="not_attending",o=(0,l.__)("Not Attending","gatherpress")),(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},S(c)?S(c):(0,e.createElement)(i.Spinner,null)),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},s((0,l.sprintf)(/* translators: %s: button label. */ -(0,l.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+o+""))),a?(0,e.createElement)("div",{className:"gp-modal__anonymous"},(0,e.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);f(t),x(e,c,t,m,!1)},checked:p}),(0,e.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,l.__)("Only admins will see your identity.","gatherpress")},(0,l.__)("List me as anonymous.","gatherpress")),(0,e.createElement)(ke,{id:"gp-anonymous-tooltip"})):(0,e.createElement)(e.Fragment,null)),(0,e.createElement)(i.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,e.createElement)("a",{href:"#",onClick:e=>x(e,n,p),className:"gp-buttons__button wp-block-button__link"},o)),(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,l.__)("Close","gatherpress")))))}),{status:c}))),"no_status"!==c&&(0,e.createElement)("div",{className:"gp-status"},(0,e.createElement)(Re,{type:o,status:c}),0{const[l,a]=(0,r.useState)(i);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:a},t);let s="";return"object"==typeof l&&void 0!==l[n]&&(i=[...l[n].responses],o&&(i=i.splice(0,o)),s=i.map(((t,n)=>{const{name:o,photo:r}=t;return(0,e.createElement)("figure",{key:n,className:"gp-rsvp-response__member-avatar"},(0,e.createElement)("img",{alt:o,title:o,src:r}))}))),(0,e.createElement)(e.Fragment,null,s)},De=t=>{const{type:n,event:o,eventOptions:r}=t,i="default"===r.imageSize?"featured_image":"featured_image_"+r.imageSize,l=s(o[i]),a="gp-events-list";let c="location";const u=o.venue?.is_online_event;return u&&(c="video-alt2"),(0,e.createElement)("div",{className:`${a}`},(0,e.createElement)("div",{className:`${a}__header`},(0,e.createElement)("div",{className:`${a}__info`},r.showFeaturedImage&&(0,e.createElement)("figure",{className:`${a}__image`},(0,e.createElement)("a",{href:o.permalink},l)),(0,e.createElement)("div",{className:`${a}__datetime`},(0,e.createElement)("strong",null,o.datetime_start)),(0,e.createElement)("div",{className:`${a}__title`},(0,e.createElement)("a",{href:o.permalink},s(o.title))),o.venue&&r.showVenue&&(0,e.createElement)("div",{className:`${a}__venue`},(0,e.createElement)("span",{className:`dashicons dashicons-${c}`}),!u&&(0,e.createElement)("a",{href:o.venue.permalink},s(o.venue.name)),u&&(0,e.createElement)("span",null,s(o.venue.name))),r.showDescription&&(0,e.createElement)("div",{className:`${a}__content`},(0,e.createElement)("div",{className:`${a}__excerpt`},s(o.excerpt.split(" ").splice(0,parseInt(r.descriptionLimit)).join(" ")+"[…]"))))),(0,e.createElement)("div",{className:`${a}__footer`},r.showRsvpResponse&&(0,e.createElement)("div",{className:"gp-rsvp-response__items"},(0,e.createElement)(Le,{eventId:o.ID,value:"attending",responses:o.responses,limit:"3"})),"upcoming"===n&&r.showRsvp&&(0,e.createElement)(Me,{eventId:o.ID,currentUser:o.current_user,type:n,enableAnonymousRsvp:o.enable_anonymous_rsvp}),"past"===n&&r.showRsvp&&""!==o.current_user&&(0,e.createElement)(Re,{type:n,status:o.current_user?.status})))},je=t=>{const{eventOptions:n,maxNumberOfEvents:o,datetimeFormat:a,type:s,topics:c,venues:u}=t,[d,p]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1),h=d.map((t=>(0,e.createElement)(De,{key:t.ID,eventOptions:n,type:s,event:t})));return(0,r.useEffect)((()=>{let e="",t="";if("object"==typeof c&&(e=c.map((e=>e.slug))?.join(",")),"object"==typeof u&&(t=u.map((e=>e.slug))?.join(",")),Pe("is_user_logged_in"))Ne()({path:`/gatherpress/v1/event/events-list?event_list_type=${s}&max_number=${o}&datetime_format=${a}&topics=${e}&venues=${t}`}).then((e=>{m(!0),p(e)}));else{const n=Pe("event_rest_api")+`/events-list?event_list_type=${s}&max_number=${o}&datetime_format=${a}&topics=${e}&venues=${t}`;fetch(n).then((e=>e.json())).then((e=>{m(!0),p(e)}))}}),[p,o,a,s,c,u]),(0,e.createElement)("div",{className:`gp-${s}-events-list`},!f&&(0,e.createElement)(i.Spinner,null),f&&0===d.length&&(()=>{const t="upcoming"===s?(0,l.__)("There are no upcoming events.","gatherpress"):(0,l.__)("There are no past events.","gatherpress");return(0,e.createElement)("div",{className:`gp-${s}-events__no_events_message`},t)})(),f&&h)};o()((()=>{const t=document.querySelectorAll('[data-gp_block_name="events-list"]');for(let s=0;s{var e={9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);r(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new l.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,l.isTag)(e)}function y(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function _(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?x(e.children):[];var l=new f(o);o.forEach((function(e){return e.parent=l})),n=l}else if(_(e)){o=t?x(e.children):[];var a=new m(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return l.test(e)||null===(t=null==(v=m.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=m.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),m.querySelectorAll(n);case o:case r:var h=s(e).querySelectorAll(p);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(v=s(e,r).querySelector(r)).childNodes;var v}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=s(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=s("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),i=o(n(484)),l=n(4606),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(y=d(y,{key:y.key||h})),o.push(c(y,v,h));continue}}if("text"!==v.type){var g=v,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(w=e(v.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(v.name,b,w),v,h))}else{var _=!v.data.trim().length;if(_&&v.parent&&!(0,l.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&_)continue;o.push(c(v.data,v,h))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var l=o(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=s.source}h.prototype.content=e;var v=[];function y(t){var n=new Error(s.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=p,n.source=e,!s.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(_(),!g(i))return y("property missing ':'");var o=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,l){if(l!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==a){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,l=i&&i().ownerDocument||document;r&&d.add(l.body,r),o&&d.add(l.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,l=e.children,a=n?{}:i.content,s=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,l);return this.props.overlayElement(c,d)}}]),t}(l.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){l&&(l.removeAttribute?l.removeAttribute("aria-hidden"):null!=l.length?l.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(l).forEach((function(e){return e.removeAttribute("aria-hidden")}))),l=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return l=t||l},t.validateElement=s,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){l=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),l=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function s(e){var t=e||l;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,l],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var l in o)r(i,o[l]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=s,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",s,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",s),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",s),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",s),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],l=null,a=!1;function s(){a=!0}function c(){if(a){if(a=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,r.default)(l)[0]||l).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,l=t.shiftKey,a=n[0],s=n[n.length-1],c=i();if(e===c){if(!l)return;o=s}if(s!==c||l||(o=a),a===c&&l&&(o=s),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=l?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=l?s:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(l)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(o,a))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=n(9196);const t=window.wp.domReady;var o=n.n(t);const r=window.wp.element,i=window.wp.components,l=window.wp.i18n;var a=n(3426);const s=a.default||a;var c=n(3253),u=n.n(c);const d=Math.min,p=Math.max,f=Math.round,m=Math.floor,h=e=>({x:e,y:e}),v={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function g(e,t,n){return p(e,d(t,n))}function b(e,t){return"function"==typeof e?e(t):e}function w(e){return e.split("-")[0]}function _(e){return e.split("-")[1]}function E(e){return"x"===e?"y":"x"}function x(e){return"y"===e?"height":"width"}function S(e){return["top","bottom"].includes(w(e))?"y":"x"}function O(e){return E(S(e))}function C(e){return e.replace(/start|end/g,(e=>y[e]))}function T(e){return e.replace(/left|right|bottom|top/g,(e=>v[e]))}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function A(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function N(e,t,n){let{reference:o,floating:r}=e;const i=S(t),l=O(t),a=x(l),s=w(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(s){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(_(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function R(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=b(t,e),m=k(f),h=a[p?"floating"===d?"reference":"floating":d],v=A(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===d?{...l.floating,x:o,y:r}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},_=A(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:g,strategy:s}):y);return{top:(v.top-_.top+m.top)/w.y,bottom:(_.bottom-v.bottom+m.bottom)/w.y,left:(v.left-_.left+m.left)/w.x,right:(_.right-v.right+m.right)/w.x}}const P=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=b(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=w(r),g=w(a)===a,E=await(null==s.isRTL?void 0:s.isRTL(c.floating)),S=p||(g||!h?[T(a)]:function(e){const t=T(e);return[C(e),t,C(t)]}(a));p||"none"===m||S.push(...function(e,t,n,o){const r=_(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(w(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(C)))),i}(a,h,m,E));const k=[a,...S],A=await R(t,v),N=[];let P=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&N.push(A[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=_(e),r=O(e),i=x(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=T(l)),[l,T(l)]}(r,l,E);N.push(A[e[0]],A[e[1]])}if(P=[...P,{placement:r,overflows:N}],!N.every((e=>e<=0))){var M,L;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(L=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(f){case"bestFit":{var D;const e=null==(D=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},M=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=w(n),a=_(n),s="y"===S(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=b(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),s?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},L=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=b(e,t),c={x:n,y:o},u=await R(t,s),d=S(w(r)),p=E(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=g(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";m=g(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function D(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function I(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return e instanceof Node||e instanceof j(e).Node}function H(e){return e instanceof Element||e instanceof j(e).Element}function U(e){return e instanceof HTMLElement||e instanceof j(e).HTMLElement}function B(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof j(e).ShadowRoot)}function W(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function z(e){return["table","td","th"].includes(D(e))}function V(e){const t=q(),n=G(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function q(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $(e){return["html","body","#document"].includes(D(e))}function G(e){return j(e).getComputedStyle(e)}function X(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Y(e){if("html"===D(e))return e;const t=e.assignedSlot||e.parentNode||B(e)&&e.host||I(e);return B(t)?t.host:t}function K(e){const t=Y(e);return $(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&W(t)?t:K(t)}function Z(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=K(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=j(r);return i?t.concat(l,l.visualViewport||[],W(r)?r:[],l.frameElement&&n?Z(l.frameElement):[]):t.concat(r,Z(r,[],n))}function J(e){const t=G(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=U(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=f(n)!==i||f(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function Q(e){return H(e)?e:e.contextElement}function ee(e){const t=Q(e);if(!U(t))return h(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=J(t);let l=(i?f(n.width):n.width)/o,a=(i?f(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const te=h(0);function ne(e){const t=j(e);return q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:te}function oe(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Q(e);let l=h(1);t&&(o?H(o)&&(l=ee(o)):l=ee(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==j(e))&&t}(i,n,o)?ne(i):h(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,u=r.width/l.x,d=r.height/l.y;if(i){const e=j(i),t=o&&H(o)?j(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=ee(n),t=n.getBoundingClientRect(),o=G(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=r,c+=i,n=j(n).frameElement}}return A({width:u,height:d,x:s,y:c})}function re(e){return oe(I(e)).left+X(e).scrollLeft}function ie(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=j(e),o=I(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=q();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=I(e),n=X(e),o=e.ownerDocument.body,r=p(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=p(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+re(e);const a=-n.scrollTop;return"rtl"===G(o).direction&&(l+=p(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(I(e));else if(H(t))o=function(e,t){const n=oe(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=U(e)?ee(e):h(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ne(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return A(o)}function le(e,t){const n=Y(e);return!(n===t||!H(n)||$(n))&&("fixed"===G(n).position||le(n,t))}function ae(e,t,n){const o=U(t),r=I(t),i="fixed"===n,l=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=h(0);if(o||!o&&!i)if(("body"!==D(t)||W(r))&&(a=X(t)),o){const e=oe(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=re(r));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function se(e,t){return U(e)&&"fixed"!==G(e).position?t?t(e):e.offsetParent:null}function ce(e,t){const n=j(e);if(!U(e))return n;let o=se(e,t);for(;o&&z(o)&&"static"===G(o).position;)o=se(o,t);return o&&("html"===D(o)||"body"===D(o)&&"static"===G(o).position&&!V(o))?n:o||function(e){let t=Y(e);for(;U(t)&&!$(t);){if(V(t))return t;t=Y(t)}return null}(e)||n}const ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=U(n),i=I(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=h(1);const s=h(0);if((r||!r&&"fixed"!==o)&&(("body"!==D(n)||W(i))&&(l=X(n)),U(n))){const e=oe(n);a=ee(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:I,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=Z(e,[],!1).filter((e=>H(e)&&"body"!==D(e))),r=null;const i="fixed"===G(e).position;let l=i?Y(e):e;for(;H(l)&&!$(l);){const t=G(l),n=V(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||W(l)&&!n&&le(e,l))?o=o.filter((e=>e!==l)):r=t,l=Y(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=ie(t,n,r);return e.top=p(o.top,e.top),e.right=d(o.right,e.right),e.bottom=d(o.bottom,e.bottom),e.left=p(o.left,e.left),e}),ie(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ce,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ce,i=this.getDimensions;return{reference:ae(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return J(e)},getScale:ee,isElement:H,isRTL:function(e){return"rtl"===G(e).direction}};const de=(e,t,n)=>{const o=new Map,r={platform:ue,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=N(c,o,s),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},ve={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},ye=(0,e.createContext)({getTooltipData:()=>ve});function ge(t="DEFAULT_TOOLTIP_ID"){return(0,e.useContext)(ye).getTooltipData(t)}const be="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,we=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},_e=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(we(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ee=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:l=[M(Number(r)),P({fallbackAxisSideDirection:"start"}),L({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const s=l;return n?(s.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:u=0}=b(c,e)||{};if(null==s)return{};const p=k(u),f={x:t,y:n},m=O(o),h=x(m),v=await i.getDimensions(s),y="y"===m,w=y?"top":"left",E=y?"bottom":"right",S=y?"clientHeight":"clientWidth",C=r.reference[h]+r.reference[m]-f[m]-r.floating[h],T=f[m]-r.reference[m],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=A?A[S]:0;N&&await(null==i.isElement?void 0:i.isElement(A))||(N=l.floating[S]||r.floating[h]);const R=C/2-T/2,P=N/2-v[h]/2-1,M=d(p[w],P),L=d(p[E],P),D=M,j=N-v[h]-L,I=N/2-v[h]/2+R,F=g(D,I,j),H=!a.arrow&&null!=_(o)&&I!=F&&r.reference[h]/2-(I{var r,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):de(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var xe={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Se={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Oe=({forwardRef:t,id:n,className:o,classNameArrow:r,variant:i="dark",anchorId:l,anchorSelect:a,place:s="top",offset:c=10,events:u=["hover"],openOnClick:f=!1,positionStrategy:h="absolute",middlewares:v,wrapper:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:P,afterShow:M,afterHide:L,content:D,contentWrapperRef:j,isOpen:F,setIsOpen:H,activeAnchor:U,setActiveAnchor:B,border:W,opacity:z,arrowColor:V,role:q="tooltip"})=>{var $;const G=(0,e.useRef)(null),X=(0,e.useRef)(null),Y=(0,e.useRef)(null),K=(0,e.useRef)(null),J=(0,e.useRef)(null),[ee,te]=(0,e.useState)(s),[ne,re]=(0,e.useState)({}),[ie,le]=(0,e.useState)({}),[ae,se]=(0,e.useState)(!1),[ce,ue]=(0,e.useState)(!1),[de,fe]=(0,e.useState)(null),me=(0,e.useRef)(!1),ve=(0,e.useRef)(null),{anchorRefs:ye,setActiveAnchor:we}=ge(n),Oe=(0,e.useRef)(!1),[Ce,Te]=(0,e.useState)([]),ke=(0,e.useRef)(!1),Ae=f||u.includes("click"),Ne=Ae||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Re=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Ae&&Object.assign(Re,{mouseenter:!1,focus:!1,click:!0});const Pe=k?{...k}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!k&&Ae&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Ne||!1};N&&(Object.assign(Re,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),be((()=>(ke.current=!0,()=>{ke.current=!1})),[]);const Le=e=>{ke.current&&(e&&ue(!0),setTimeout((()=>{ke.current&&(null==H||H(e),void 0===F&&se(e))}),10))};(0,e.useEffect)((()=>{if(void 0===F)return()=>null;F&&ue(!0);const e=setTimeout((()=>{se(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,e.useEffect)((()=>{if(ae!==me.current)if(J.current&&clearTimeout(J.current),me.current=ae,ae)null==M||M();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();J.current=setTimeout((()=>{ue(!1),fe(null),null==L||L()}),e+25)}}),[ae]);const De=(e=g)=>{Y.current&&clearTimeout(Y.current),Y.current=setTimeout((()=>{Le(!0)}),e)},je=(e=b)=>{K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{Oe.current||Le(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return B(null),void we({current:null});g?De():Le(!0),B(n),we({current:n}),K.current&&clearTimeout(K.current)},Fe=()=>{x?je(b||100):b?je():Le(!1),Y.current&&clearTimeout(Y.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Ee({place:null!==(n=null==de?void 0:de.place)&&void 0!==n?n:s,offset:c,elementReference:o,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:v,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place)}))},Ue=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),ve.current=n},Be=e=>{var t;if(!ae)return;const n=e.target;(null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...Ce].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),Y.current&&clearTimeout(Y.current))},We=he(Ie,50,!0),ze=he(Fe,50,!0),Ve=(0,e.useCallback)((()=>{var e,t;const n=null!==(e=null==de?void 0:de.position)&&void 0!==e?e:P;n?He(n):w?ve.current&&He(ve.current):(null==U?void 0:U.isConnected)&&Ee({place:null!==(t=null==de?void 0:de.place)&&void 0!==t?t:s,offset:c,elementReference:U,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:v,border:W}).then((e=>{ke.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place))}))}),[ae,U,D,R,s,null==de?void 0:de.place,c,h,P,null==de?void 0:de.position,w]);(0,e.useEffect)((()=>{var e,t;const n=new Set(ye);Ce.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${l}']`);o&&n.add({current:o});const r=()=>{Le(!1)},i=_e(U),a=_e(G.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let s=null;Me.resize?window.addEventListener("resize",r):U&&G.current&&(s=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,c=Q(e),u=r||i?[...c?Z(c):[],...Z(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=c&&a?function(e,t){let n,o=null;const r=I(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const v={rootMargin:-m(u)+"px "+-m(r.clientWidth-(c+f))+"px "+-m(r.clientHeight-(u+h))+"px "+-m(c)+"px",threshold:p(0,d(1,s))||1};let y=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!y)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}y=!1}try{o=new IntersectionObserver(g,{...v,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,v)}o.observe(e)}(!0),i}(c,n):null;let h,v=-1,y=null;l&&(y=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{y&&y.observe(t)}))),n()})),c&&!s&&y.observe(c),y.observe(t));let g=s?oe(e):null;return s&&function t(){const o=oe(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,h=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),y&&y.disconnect(),y=null,s&&cancelAnimationFrame(h)}}(U,G.current,Ve,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",c),Me.clickOutsideAnchor&&window.addEventListener("click",Be);const u=[],f=e=>{ae&&(null==e?void 0:e.target)===U||Ie(e)},h=e=>{ae&&(null==e?void 0:e.target)===U&&Fe()},v=["mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(Re).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:We}):y.includes(e)&&u.push({event:e,listener:f}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:ze}):y.includes(e)&&u.push({event:e,listener:h}))})),w&&u.push({event:"mousemove",listener:Ue});const g=()=>{Oe.current=!0},b=()=>{Oe.current=!1,Fe()};return x&&!Ne&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.addEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==s||s(),Me.clickOutsideAnchor&&window.removeEventListener("click",Be),Me.escape&&window.removeEventListener("keydown",c),x&&!Ne&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.removeEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[U,Ve,ce,ye,Ce,T,k,A,Ae]),(0,e.useEffect)((()=>{var e,t;let o=null!==(t=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:a)&&void 0!==t?t:"";!o&&n&&(o=`[data-tooltip-id='${n}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===n&&t.push(e.target),"childList"===e.type){if(U){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,U))&&(ue(!1),Le(!1),B(null),Y.current&&clearTimeout(Y.current),K.current&&clearTimeout(K.current),!0)}))}if(o)try{const n=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...n.filter((e=>e.matches(o)))),t.push(...n.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(t.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...t]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[n,a,null==de?void 0:de.anchorSelect,U]),(0,e.useEffect)((()=>{Ve()}),[Ve]),(0,e.useEffect)((()=>{if(!(null==j?void 0:j.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ve()))}));return e.observe(j.current),()=>{e.disconnect()}}),[D,null==j?void 0:j.current]),(0,e.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...Ce,t];U&&n.includes(U)||B(null!==(e=Ce[0])&&void 0!==e?e:t)}),[l,Ce,U]),(0,e.useEffect)((()=>()=>{Y.current&&clearTimeout(Y.current),K.current&&clearTimeout(K.current)}),[]),(0,e.useEffect)((()=>{var e;let t=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:a;if(!t&&n&&(t=`[data-tooltip-id='${n}']`),t)try{const e=Array.from(document.querySelectorAll(t));Te(e)}catch(e){Te([])}}),[n,a,null==de?void 0:de.anchorSelect]);const qe=null!==($=null==de?void 0:de.content)&&void 0!==$?$:D,$e=ae&&Object.keys(ne).length>0;return(0,e.useImperativeHandle)(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):Le(!1)},activeAnchor:U,place:ee,isOpen:Boolean(ce&&!_&&qe&&$e)}))),ce&&!_&&qe?e.createElement(y,{id:n,role:q,className:pe("react-tooltip",xe.tooltip,Se.tooltip,Se[i],o,`react-tooltip__place-${ee}`,xe[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&xe.fixed,x&&xe.clickable),onTransitionEnd:e=>{J.current&&clearTimeout(J.current),ae||"opacity"!==e.propertyName||(ue(!1),fe(null),null==L||L())},style:{...R,...ne,opacity:void 0!==z&&$e?z:void 0},ref:G},qe,e.createElement(y,{className:pe("react-tooltip-arrow",xe.arrow,Se.arrow,r,E&&xe.noArrow),style:{...ie,background:V?`linear-gradient(to right bottom, transparent 50%, ${V} 50%)`:void 0},ref:X})):null},Ce=({content:t})=>e.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),Te=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ke=e.forwardRef((({id:t,anchorId:n,anchorSelect:o,content:r,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:v="absolute",middlewares:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N=!1,style:R,position:P,isOpen:M,disableStyleInjection:L=!1,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:U,role:B="tooltip"},W)=>{const[z,V]=(0,e.useState)(r),[q,$]=(0,e.useState)(i),[G,X]=(0,e.useState)(u),[Y,K]=(0,e.useState)(c),[Z,J]=(0,e.useState)(d),[Q,ee]=(0,e.useState)(g),[te,ne]=(0,e.useState)(b),[oe,re]=(0,e.useState)(w),[ie,le]=(0,e.useState)(_),[ae,se]=(0,e.useState)(p),[ce,ue]=(0,e.useState)(m),[de,fe]=(0,e.useState)(v),[me,he]=(0,e.useState)(null),[ve,ye]=(0,e.useState)(null),be=(0,e.useRef)(L),{anchorRefs:we,activeAnchor:_e}=ge(t),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),xe=e=>{const t={place:e=>{var t;X(null!==(t=e)&&void 0!==t?t:u)},content:e=>{V(null!=e?e:r)},html:e=>{$(null!=e?e:i)},variant:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;se(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");ue(null!=t?t:m)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:v)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{re(null===e?w:"true"===e)},hidden:e=>{le(null===e?_:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,e.useEffect)((()=>{V(r)}),[r]),(0,e.useEffect)((()=>{$(i)}),[i]),(0,e.useEffect)((()=>{X(u)}),[u]),(0,e.useEffect)((()=>{K(c)}),[c]),(0,e.useEffect)((()=>{J(d)}),[d]),(0,e.useEffect)((()=>{ee(g)}),[g]),(0,e.useEffect)((()=>{ne(b)}),[b]),(0,e.useEffect)((()=>{re(w)}),[w]),(0,e.useEffect)((()=>{le(_)}),[_]),(0,e.useEffect)((()=>{fe(v)}),[v]),(0,e.useEffect)((()=>{be.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,e.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,e.useEffect)((()=>{var e;const r=new Set(we);let i=o;if(!i&&t&&(i=`[data-tooltip-id='${t}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${n}']`);if(l&&r.add({current:l}),!r.size)return()=>null;const a=null!==(e=null!=ve?ve:l)&&void 0!==e?e:_e.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(a);xe(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Ee(a);xe(e),s.observe(a,c)}return()=>{s.disconnect()}}),[we,_e,ve,n,o]),(0,e.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Te("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),j&&!Te("opacity",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`opacity\`.`)}),[]);let Se=f;const ke=(0,e.useRef)(null);if(l){const t=l({content:null!=z?z:null,activeAnchor:ve});Se=t?e.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},t):null}else z&&(Se=z);q&&(Se=e.createElement(Ce,{content:q}));const Ae={forwardRef:W,id:t,anchorId:n,anchorSelect:o,className:pe(a,me),classNameArrow:s,content:Se,contentWrapperRef:ke,place:G,variant:Y,offset:Z,wrapper:ae,events:ce,openOnClick:h,positionStrategy:de,middlewares:y,delayShow:Q,delayHide:te,float:oe,hidden:ie,noArrow:E,clickable:x,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:P,isOpen:M,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:U,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:B};return e.createElement(Oe,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||me({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||me({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Ae=window.wp.apiFetch;var Ne=n.n(Ae);const Re=({type:t="upcoming",status:n="no_status"})=>{const o={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,l.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,l.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Not Attending","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,l.__)("Went","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")}}};return(0,e.createElement)("div",{className:"gp-status__response"},(0,e.createElement)("span",{className:o[t][n].icon}),(0,e.createElement)("strong",null,o[t][n].text))};function Pe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const Me=({eventId:t,currentUser:n="",type:o,enableAnonymousRsvp:a})=>{const[c,d]=(0,r.useState)(n.status),[p,f]=(0,r.useState)(Number(n.anonymous)),[m,h]=(0,r.useState)(n.guests),[v,y]=(0,r.useState)("hidden"),[g,b]=(0,r.useState)("false"),[w,_]=(0,r.useState)(!1);if("past"===o)return"";"undefined"==typeof adminpage&&u().setAppElement(".gp-enabled");const E=e=>{e.preventDefault(),_(!1)},x=async(e,n,o,r=0,i=!0)=>{e.preventDefault(),"attending"!==n&&(r=0),Ne()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:t,status:n,guests:r,anonymous:o,_wpnonce:Pe("misc.nonce")}}).then((t=>{if(t.success){d(t.status),h(t.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,o]of Object.entries(t.responses))n[e]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:t.status,setRsvpResponse:t.responses,setRsvpCount:n,setRsvpSeeAllLink:n[t.status]>8,setOnlineEventLink:t.online_link},t.event_id),i&&E(e)}}))},S=e=>{switch(e){case"attending":return(0,l.__)("You're attending","gatherpress");case"waiting_list":return(0,l.__)("You're wait listed","gatherpress");case"not_attending":return(0,l.__)("You're not attending","gatherpress")}return(0,l.__)("RSVP to this event","gatherpress")};return(0,e.createElement)("div",{className:"gp-rsvp"},(0,e.createElement)(i.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":g,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(y("hidden"===v?"show":"hidden"),b("false"===g?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),_(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,l.__)("Edit RSVP","gatherpress")}return(0,l.__)("RSVP","gatherpress")})(c))),(0,e.createElement)(u(),{isOpen:w,onRequestClose:E,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,l.__)("Edit RSVP","gatherpress")},""===n&&(0,e.createElement)((()=>(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},(0,l.__)("Login Required","gatherpress")),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},(0,l.__)("You must ","gatherpress"),(0,e.createElement)("a",{href:Pe("urls.loginUrl")},(0,l.__)("Login","gatherpress")),(0,l.__)(" to RSVP to events.","gatherpress")),""!==Pe("urls.registrationUrl")&&(0,e.createElement)("div",{className:"gp-modal__text"},(0,e.createElement)("a",{href:Pe("urls.registrationUrl")},(0,l.__)("Register","gatherpress")),(0,l.__)(" if you do not have an account.","gatherpress"))),(0,e.createElement)(i.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,l.__)("Close","gatherpress")))))),null),""!==n&&(0,e.createElement)((({status:t})=>{let n="",o="";return"not_attending"===t||"no_status"===t?(n="attending",o=(0,l.__)("Attend","gatherpress")):(n="not_attending",o=(0,l.__)("Not Attending","gatherpress")),(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},S(c)?S(c):(0,e.createElement)(i.Spinner,null)),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},s((0,l.sprintf)(/* translators: %s: button label. */ +(0,l.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+o+""))),a?(0,e.createElement)("div",{className:"gp-modal__anonymous"},(0,e.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);f(t),x(e,c,t,m,!1)},checked:p}),(0,e.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,l.__)("Only admins will see your identity.","gatherpress")},(0,l.__)("List me as anonymous.","gatherpress")),(0,e.createElement)(ke,{id:"gp-anonymous-tooltip"})):(0,e.createElement)(e.Fragment,null)),(0,e.createElement)(i.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,e.createElement)("a",{href:"#",onClick:e=>x(e,n,p),className:"gp-buttons__button wp-block-button__link"},o)),(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,l.__)("Close","gatherpress")))))}),{status:c}))),"no_status"!==c&&(0,e.createElement)("div",{className:"gp-status"},(0,e.createElement)(Re,{type:o,status:c}),0{const[l,a]=(0,r.useState)(i);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:a},t);let s="";return"object"==typeof l&&void 0!==l[n]&&(i=[...l[n].responses],o&&(i=i.splice(0,o)),s=i.map(((t,n)=>{const{name:o,photo:r}=t;return(0,e.createElement)("figure",{key:n,className:"gp-rsvp-response__member-avatar"},(0,e.createElement)("img",{alt:o,title:o,src:r}))}))),(0,e.createElement)(e.Fragment,null,s)},De=t=>{const{type:n,event:o,eventOptions:r}=t,i="default"===r.imageSize?"featured_image":"featured_image_"+r.imageSize,l=s(o[i]),a="gp-events-list";let c="location";const u=o.venue?.is_online_event;return u&&(c="video-alt2"),(0,e.createElement)("div",{className:`${a}`},(0,e.createElement)("div",{className:`${a}__header`},(0,e.createElement)("div",{className:`${a}__info`},r.showFeaturedImage&&(0,e.createElement)("figure",{className:`${a}__image`},(0,e.createElement)("a",{href:o.permalink},l)),(0,e.createElement)("div",{className:`${a}__datetime`},(0,e.createElement)("strong",null,o.datetime_start)),(0,e.createElement)("div",{className:`${a}__title`},(0,e.createElement)("a",{href:o.permalink},s(o.title))),o.venue&&r.showVenue&&(0,e.createElement)("div",{className:`${a}__venue`},(0,e.createElement)("span",{className:`dashicons dashicons-${c}`}),!u&&(0,e.createElement)("a",{href:o.venue.permalink},s(o.venue.name)),u&&(0,e.createElement)("span",null,s(o.venue.name))),r.showDescription&&(0,e.createElement)("div",{className:`${a}__content`},(0,e.createElement)("div",{className:`${a}__excerpt`},s(o.excerpt.split(" ").splice(0,parseInt(r.descriptionLimit)).join(" ")+"[…]"))))),(0,e.createElement)("div",{className:`${a}__footer`},r.showRsvpResponse&&(0,e.createElement)("div",{className:"gp-rsvp-response__items"},(0,e.createElement)(Le,{eventId:o.ID,value:"attending",responses:o.responses,limit:"3"})),"upcoming"===n&&r.showRsvp&&(0,e.createElement)(Me,{eventId:o.ID,currentUser:o.current_user,type:n,enableAnonymousRsvp:o.enable_anonymous_rsvp}),"past"===n&&r.showRsvp&&""!==o.current_user&&(0,e.createElement)(Re,{type:n,status:o.current_user?.status})))},je=t=>{const{eventOptions:n,maxNumberOfEvents:o,datetimeFormat:a,type:s,topics:c,venues:u}=t,[d,p]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1),h=d.map((t=>(0,e.createElement)(De,{key:t.ID,eventOptions:n,type:s,event:t})));return(0,r.useEffect)((()=>{let e="",t="";if("object"==typeof c&&(e=c.map((e=>e.slug))?.join(",")),"object"==typeof u&&(t=u.map((e=>e.slug))?.join(",")),Pe("eventDetails.currentUser"))Ne()({path:`/gatherpress/v1/event/events-list?event_list_type=${s}&max_number=${o}&datetime_format=${a}&topics=${e}&venues=${t}`}).then((e=>{m(!0),p(e)}));else{const n=Pe("urls.eventRestApi")+`/events-list?event_list_type=${s}&max_number=${o}&datetime_format=${a}&topics=${e}&venues=${t}`;fetch(n).then((e=>e.json())).then((e=>{m(!0),p(e)}))}}),[p,o,a,s,c,u]),(0,e.createElement)("div",{className:`gp-${s}-events-list`},!f&&(0,e.createElement)(i.Spinner,null),f&&0===d.length&&(()=>{const t="upcoming"===s?(0,l.__)("There are no upcoming events.","gatherpress"):(0,l.__)("There are no past events.","gatherpress");return(0,e.createElement)("div",{className:`gp-${s}-events__no_events_message`},t)})(),f&&h)};o()((()=>{const t=document.querySelectorAll('[data-gp_block_name="events-list"]');for(let s=0;s array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '93ccc8cad8799a601345'); + array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'ba97ccc3dedd4c9ea53a'); diff --git a/build/blocks/events-list/index.js b/build/blocks/events-list/index.js index 1ff0949f7..3e297de69 100644 --- a/build/blocks/events-list/index.js +++ b/build/blocks/events-list/index.js @@ -1,2 +1,2 @@ -(()=>{var e,t={8207:(e,t,n)=>{"use strict";const o=window.wp.blocks;var r=n(9196);const i=window.lodash;var s=n(3967),a=n.n(s),l=n(3426);const c=l.default||l,u=window.wp.i18n,d=window.wp.blockEditor,p=window.wp.components,f=window.wp.coreData,m=window.wp.data,h=window.wp.element;var v=n(3253),y=n.n(v);const g=Math.min,b=Math.max,_=Math.round,w=Math.floor,E=e=>({x:e,y:e}),x={left:"right",right:"left",bottom:"top",top:"bottom"},S={start:"end",end:"start"};function O(e,t,n){return b(e,g(t,n))}function C(e,t){return"function"==typeof e?e(t):e}function k(e){return e.split("-")[0]}function T(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function R(e){return"y"===e?"height":"width"}function N(e){return["top","bottom"].includes(k(e))?"y":"x"}function P(e){return A(N(e))}function M(e){return e.replace(/start|end/g,(e=>S[e]))}function L(e){return e.replace(/left|right|bottom|top/g,(e=>x[e]))}function D(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function j(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function I(e,t,n){let{reference:o,floating:r}=e;const i=N(t),s=P(t),a=R(s),l=k(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(l){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(T(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function F(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=C(t,e),m=D(f),h=a[p?"floating"===d?"reference":"floating":d],v=j(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{...s.floating,x:o,y:r}:s.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},_=j(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-_.top+m.top)/b.y,bottom:(_.bottom-v.bottom+m.bottom)/b.y,left:(v.left-_.left+m.left)/b.x,right:(_.right-v.right+m.right)/b.x}}const H=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=C(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=k(r),g=k(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),_=p||(g||!h?[L(a)]:function(e){const t=L(e);return[M(e),t,M(t)]}(a));p||"none"===m||_.push(...function(e,t,n,o){const r=T(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(k(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(M)))),i}(a,h,m,b));const w=[a,..._],E=await F(t,v),x=[];let S=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&x.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=T(e),r=P(e),i=R(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=L(s)),[s,L(s)]}(r,s,b);x.push(E[e[0]],E[e[1]])}if(S=[...S,{placement:r,overflows:x}],!x.every((e=>e<=0))){var O,A;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(A=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},B=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=k(n),a=T(n),l="y"===N(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=C(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},U=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=C(e,t),c={x:n,y:o},u=await F(t,l),d=N(k(r)),p=A(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=O(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";m=O(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function W(e){return q(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function z(e){var t;return null==(t=(q(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function q(e){return e instanceof Node||e instanceof V(e).Node}function $(e){return e instanceof Element||e instanceof V(e).Element}function G(e){return e instanceof HTMLElement||e instanceof V(e).HTMLElement}function X(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof V(e).ShadowRoot)}function Y(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function K(e){return["table","td","th"].includes(W(e))}function Z(e){const t=J(),n=ee(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function J(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Q(e){return["html","body","#document"].includes(W(e))}function ee(e){return V(e).getComputedStyle(e)}function te(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ne(e){if("html"===W(e))return e;const t=e.assignedSlot||e.parentNode||X(e)&&e.host||z(e);return X(t)?t.host:t}function oe(e){const t=ne(e);return Q(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&Y(t)?t:oe(t)}function re(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=oe(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=V(r);return i?t.concat(s,s.visualViewport||[],Y(r)?r:[],s.frameElement&&n?re(s.frameElement):[]):t.concat(r,re(r,[],n))}function ie(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=G(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=_(n)!==i||_(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function se(e){return $(e)?e:e.contextElement}function ae(e){const t=se(e);if(!G(t))return E(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=ie(t);let s=(i?_(n.width):n.width)/o,a=(i?_(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const le=E(0);function ce(e){const t=V(e);return J()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:le}function ue(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=se(e);let s=E(1);t&&(o?$(o)&&(s=ae(o)):s=ae(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==V(e))&&t}(i,n,o)?ce(i):E(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=V(i),t=o&&$(o)?V(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=ae(n),t=n.getBoundingClientRect(),o=ee(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=r,c+=i,n=V(n).frameElement}}return j({width:u,height:d,x:l,y:c})}function de(e){return ue(z(e)).left+te(e).scrollLeft}function pe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=V(e),o=z(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const e=J();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)o=function(e){const t=z(e),n=te(e),o=e.ownerDocument.body,r=b(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=b(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+de(e);const a=-n.scrollTop;return"rtl"===ee(o).direction&&(s+=b(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(z(e));else if($(t))o=function(e,t){const n=ue(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=G(e)?ae(e):E(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ce(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return j(o)}function fe(e,t){const n=ne(e);return!(n===t||!$(n)||Q(n))&&("fixed"===ee(n).position||fe(n,t))}function me(e,t,n){const o=G(t),r=z(t),i="fixed"===n,s=ue(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=E(0);if(o||!o&&!i)if(("body"!==W(t)||Y(r))&&(a=te(t)),o){const e=ue(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&(l.x=de(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function he(e,t){return G(e)&&"fixed"!==ee(e).position?t?t(e):e.offsetParent:null}function ve(e,t){const n=V(e);if(!G(e))return n;let o=he(e,t);for(;o&&K(o)&&"static"===ee(o).position;)o=he(o,t);return o&&("html"===W(o)||"body"===W(o)&&"static"===ee(o).position&&!Z(o))?n:o||function(e){let t=ne(e);for(;G(t)&&!Q(t);){if(Z(t))return t;t=ne(t)}return null}(e)||n}const ye={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=G(n),i=z(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=E(1);const l=E(0);if((r||!r&&"fixed"!==o)&&(("body"!==W(n)||Y(i))&&(s=te(n)),G(n))){const e=ue(n);a=ae(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},getDocumentElement:z,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=re(e,[],!1).filter((e=>$(e)&&"body"!==W(e))),r=null;const i="fixed"===ee(e).position;let s=i?ne(e):e;for(;$(s)&&!Q(s);){const t=ee(s),n=Z(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||Y(s)&&!n&&fe(e,s))?o=o.filter((e=>e!==s)):r=t,s=ne(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],a=i.reduce(((e,n)=>{const o=pe(t,n,r);return e.top=b(o.top,e.top),e.right=g(o.right,e.right),e.bottom=g(o.bottom,e.bottom),e.left=b(o.left,e.left),e}),pe(t,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ve,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ve,i=this.getDimensions;return{reference:me(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return ie(e)},getScale:ae,isElement:$,isRTL:function(e){return"rtl"===ee(e).direction}};const ge=(e,t,n)=>{const o=new Map,r={platform:ye,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=I(c,o,l),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},Ee={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},xe=(0,r.createContext)({getTooltipData:()=>Ee});function Se(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(xe).getTooltipData(e)}const Oe="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,Ce=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ke=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Ce(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Te=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:s=[B(Number(r)),H({fallbackAxisSideDirection:"start"}),U({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const l=s;return n?(l.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:a}=e,{element:l,padding:u=0}=C(c,e)||{};if(null==l)return{};const d=D(u),p={x:t,y:n},f=P(o),m=R(f),h=await i.getDimensions(l),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",_=v?"clientHeight":"clientWidth",w=r.reference[m]+r.reference[f]-p[f]-r.floating[m],E=p[f]-r.reference[f],x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let S=x?x[_]:0;S&&await(null==i.isElement?void 0:i.isElement(x))||(S=s.floating[_]||r.floating[m]);const k=w/2-E/2,A=S/2-h[m]/2-1,N=g(d[y],A),M=g(d[b],A),L=N,j=S-h[m]-M,I=S/2-h[m]/2+k,F=O(L,I,j),H=!a.arrow&&null!=T(o)&&I!=F&&r.reference[m]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:a},{x:l,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):ge(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var Ae={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Re={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Ne=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:i="dark",anchorId:a,anchorSelect:l,place:c="top",offset:u=10,events:d=["hover"],openOnClick:p=!1,positionStrategy:f="absolute",middlewares:m,wrapper:h,delayShow:v=0,delayHide:y=0,float:_=!1,hidden:E=!1,noArrow:x=!1,clickable:S=!1,closeOnEsc:O=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:P,position:M,afterShow:L,afterHide:D,content:j,contentWrapperRef:I,isOpen:F,setIsOpen:H,activeAnchor:B,setActiveAnchor:U,border:W,opacity:V,arrowColor:q,role:$="tooltip"})=>{var G;const X=(0,r.useRef)(null),Y=(0,r.useRef)(null),K=(0,r.useRef)(null),Z=(0,r.useRef)(null),J=(0,r.useRef)(null),[Q,ee]=(0,r.useState)(c),[te,ne]=(0,r.useState)({}),[oe,ie]=(0,r.useState)({}),[ae,le]=(0,r.useState)(!1),[ce,de]=(0,r.useState)(!1),[pe,fe]=(0,r.useState)(null),me=(0,r.useRef)(!1),he=(0,r.useRef)(null),{anchorRefs:ve,setActiveAnchor:ye}=Se(t),ge=(0,r.useRef)(!1),[be,_e]=(0,r.useState)([]),Ee=(0,r.useRef)(!1),xe=p||d.includes("click"),Ce=xe||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ne=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&xe&&Object.assign(Ne,{mouseenter:!1,focus:!1,click:!0});const Pe=A?{...A}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!A&&xe&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=R?{...R}:{escape:O||!1,scroll:C||!1,resize:k||!1,clickOutsideAnchor:Ce||!1};N&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Oe((()=>(Ee.current=!0,()=>{Ee.current=!1})),[]);const Le=e=>{Ee.current&&(e&&de(!0),setTimeout((()=>{Ee.current&&(null==H||H(e),void 0===F&&le(e))}),10))};(0,r.useEffect)((()=>{if(void 0===F)return()=>null;F&&de(!0);const e=setTimeout((()=>{le(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,r.useEffect)((()=>{if(ae!==me.current)if(J.current&&clearTimeout(J.current),me.current=ae,ae)null==L||L();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();J.current=setTimeout((()=>{de(!1),fe(null),null==D||D()}),e+25)}}),[ae]);const De=(e=v)=>{K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{Le(!0)}),e)},je=(e=y)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{ge.current||Le(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return U(null),void ye({current:null});v?De():Le(!0),U(n),ye({current:n}),Z.current&&clearTimeout(Z.current)},Fe=()=>{S?je(y||100):y?je():Le(!1),K.current&&clearTimeout(K.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Te({place:null!==(n=null==pe?void 0:pe.place)&&void 0!==n?n:c,offset:u,elementReference:o,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:f,middlewares:m,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&ne(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ee(e.place)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),he.current=n},Ue=e=>{var t;if(!ae)return;const n=e.target;(null===(t=X.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${a}']`),...be].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),K.current&&clearTimeout(K.current))},We=we(Ie,50,!0),Ve=we(Fe,50,!0),ze=(0,r.useCallback)((()=>{var e,t;const n=null!==(e=null==pe?void 0:pe.position)&&void 0!==e?e:M;n?He(n):_?he.current&&He(he.current):(null==B?void 0:B.isConnected)&&Te({place:null!==(t=null==pe?void 0:pe.place)&&void 0!==t?t:c,offset:u,elementReference:B,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:f,middlewares:m,border:W}).then((e=>{Ee.current&&(Object.keys(e.tooltipStyles).length&&ne(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ee(e.place))}))}),[ae,B,j,P,c,null==pe?void 0:pe.place,u,f,M,null==pe?void 0:pe.position,_]);(0,r.useEffect)((()=>{var e,t;const n=new Set(ve);be.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${a}']`);o&&n.add({current:o});const r=()=>{Le(!1)},i=ke(B),s=ke(X.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r));let l=null;Me.resize?window.addEventListener("resize",r):B&&X.current&&(l=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=se(e),u=r||i?[...c?re(c):[],...re(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,o=null;const r=z(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(a||t(),!d||!p)return;const f={rootMargin:-w(u)+"px "+-w(r.clientWidth-(c+d))+"px "+-w(r.clientHeight-(u+p))+"px "+-w(c)+"px",threshold:b(0,g(1,l))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==l){if(!m)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),100)}m=!1}try{o=new IntersectionObserver(h,{...f,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(h,f)}o.observe(e)}(!0),i}(c,n):null;let p,f=-1,m=null;s&&(m=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{m&&m.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let h=l?ue(e):null;return l&&function t(){const o=ue(e);!h||o.x===h.x&&o.y===h.y&&o.width===h.width&&o.height===h.height||n(),h=o,p=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(p)}}(B,X.current,ze,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",c),Me.clickOutsideAnchor&&window.addEventListener("click",Ue);const u=[],d=e=>{ae&&(null==e?void 0:e.target)===B||Ie(e)},p=e=>{ae&&(null==e?void 0:e.target)===B&&Fe()},f=["mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:We}):m.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:Ve}):m.includes(e)&&u.push({event:e,listener:p}))})),_&&u.push({event:"mousemove",listener:Be});const h=()=>{ge.current=!0},v=()=>{ge.current=!1,Fe()};return S&&!Ce&&(null===(e=X.current)||void 0===e||e.addEventListener("mouseenter",h),null===(t=X.current)||void 0===t||t.addEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==l||l(),Me.clickOutsideAnchor&&window.removeEventListener("click",Ue),Me.escape&&window.removeEventListener("keydown",c),S&&!Ce&&(null===(e=X.current)||void 0===e||e.removeEventListener("mouseenter",h),null===(t=X.current)||void 0===t||t.removeEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[B,ze,ce,ve,be,T,A,R,xe]),(0,r.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===t&&n.push(e.target),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(de(!1),Le(!1),U(null),K.current&&clearTimeout(K.current),Z.current&&clearTimeout(Z.current),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&_e((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[t,l,null==pe?void 0:pe.anchorSelect,B]),(0,r.useEffect)((()=>{ze()}),[ze]),(0,r.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>ze()))}));return e.observe(I.current),()=>{e.disconnect()}}),[j,null==I?void 0:I.current]),(0,r.useEffect)((()=>{var e;const t=document.querySelector(`[id='${a}']`),n=[...be,t];B&&n.includes(B)||U(null!==(e=be[0])&&void 0!==e?e:t)}),[a,be,B]),(0,r.useEffect)((()=>()=>{K.current&&clearTimeout(K.current),Z.current&&clearTimeout(Z.current)}),[]),(0,r.useEffect)((()=>{var e;let n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));_e(e)}catch(e){_e([])}}),[t,l,null==pe?void 0:pe.anchorSelect]);const qe=null!==(G=null==pe?void 0:pe.content)&&void 0!==G?G:j,$e=ae&&Object.keys(te).length>0;return(0,r.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):Le(!1)},activeAnchor:B,place:Q,isOpen:Boolean(ce&&!E&&qe&&$e)}))),ce&&!E&&qe?r.createElement(h,{id:t,role:$,className:s("react-tooltip",Ae.tooltip,Re.tooltip,Re[i],n,`react-tooltip__place-${Q}`,Ae[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===f&&Ae.fixed,S&&Ae.clickable),onTransitionEnd:e=>{J.current&&clearTimeout(J.current),ae||"opacity"!==e.propertyName||(de(!1),fe(null),null==D||D())},style:{...P,...te,opacity:void 0!==V&&$e?V:void 0},ref:X},qe,r.createElement(h,{className:s("react-tooltip-arrow",Ae.arrow,Re.arrow,o,x&&Ae.noArrow),style:{...oe,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Y})):null},Pe=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Me=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Le=r.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:i,render:a,className:l,classNameArrow:c,variant:u="dark",place:d="top",offset:p=10,wrapper:f="div",children:m=null,events:h=["hover"],openOnClick:v=!1,positionStrategy:y="absolute",middlewares:g,delayShow:b=0,delayHide:_=0,float:w=!1,hidden:E=!1,noArrow:x=!1,clickable:S=!1,closeOnEsc:O=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N=!1,style:P,position:M,isOpen:L,disableStyleInjection:D=!1,border:j,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,role:W="tooltip"},V)=>{const[z,q]=(0,r.useState)(o),[$,G]=(0,r.useState)(i),[X,Y]=(0,r.useState)(d),[K,Z]=(0,r.useState)(u),[J,Q]=(0,r.useState)(p),[ee,te]=(0,r.useState)(b),[ne,oe]=(0,r.useState)(_),[re,ie]=(0,r.useState)(w),[se,ae]=(0,r.useState)(E),[le,ce]=(0,r.useState)(f),[ue,de]=(0,r.useState)(h),[pe,fe]=(0,r.useState)(y),[me,he]=(0,r.useState)(null),[ve,ye]=(0,r.useState)(null),ge=(0,r.useRef)(D),{anchorRefs:be,activeAnchor:_e}=Se(e),we=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Ee=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:d)},content:e=>{q(null!=e?e:o)},html:e=>{G(null!=e?e:i)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:u)},offset:e=>{Q(null===e?p:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:h)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{te(null===e?b:Number(e))},"delay-hide":e=>{oe(null===e?_:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{ae(null===e?E:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,r.useEffect)((()=>{q(o)}),[o]),(0,r.useEffect)((()=>{G(i)}),[i]),(0,r.useEffect)((()=>{Y(d)}),[d]),(0,r.useEffect)((()=>{Z(u)}),[u]),(0,r.useEffect)((()=>{Q(p)}),[p]),(0,r.useEffect)((()=>{te(b)}),[b]),(0,r.useEffect)((()=>{oe(_)}),[_]),(0,r.useEffect)((()=>{ie(w)}),[w]),(0,r.useEffect)((()=>{ae(E)}),[E]),(0,r.useEffect)((()=>{fe(y)}),[y]),(0,r.useEffect)((()=>{ge.current!==D&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[D]),(0,r.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===D,disableBase:D}}))}),[]),(0,r.useEffect)((()=>{var o;const r=new Set(be);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const a=null!==(o=null!=ve?ve:s)&&void 0!==o?o:_e.current,l=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=we(a);Ee(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=we(a);Ee(e),l.observe(a,c)}return()=>{l.disconnect()}}),[be,_e,ve,t,n]),(0,r.useEffect)((()=>{(null==P?void 0:P.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),j&&!Me("border",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`border\`.`),(null==P?void 0:P.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!Me("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let xe=m;const Oe=(0,r.useRef)(null);if(a){const e=a({content:null!=z?z:null,activeAnchor:ve});xe=e?r.createElement("div",{ref:Oe,className:"react-tooltip-content-wrapper"},e):null}else z&&(xe=z);$&&(xe=r.createElement(Pe,{content:$}));const Ce={forwardRef:V,id:e,anchorId:t,anchorSelect:n,className:s(l,me),classNameArrow:c,content:xe,contentWrapperRef:Oe,place:X,variant:K,offset:J,wrapper:le,events:ue,openOnClick:v,positionStrategy:pe,middlewares:g,delayShow:ee,delayHide:ne,float:re,hidden:se,noArrow:x,clickable:S,closeOnEsc:O,closeOnScroll:C,closeOnResize:k,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:P,position:M,isOpen:L,border:j,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:W};return r.createElement(Ne,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||_e({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||_e({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const De=window.wp.apiFetch;var je=n.n(De);const Ie=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,u.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,u.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Not Attending","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,u.__)("Went","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Didn't Go","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Didn't Go","gatherpress")}}};return(0,r.createElement)("div",{className:"gp-status__response"},(0,r.createElement)("span",{className:n[e][t].icon}),(0,r.createElement)("strong",null,n[e][t].text))};function Fe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const He=({eventId:e,currentUser:t="",type:n,enableAnonymousRsvp:o})=>{const[i,s]=(0,h.useState)(t.status),[a,l]=(0,h.useState)(Number(t.anonymous)),[d,f]=(0,h.useState)(t.guests),[m,v]=(0,h.useState)("hidden"),[g,b]=(0,h.useState)("false"),[_,w]=(0,h.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&y().setAppElement(".gp-enabled");const E=e=>{e.preventDefault(),w(!1)},x=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),je()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:Fe("nonce")}}).then((e=>{if(e.success){s(e.status),f(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&E(t)}}))},S=e=>{switch(e){case"attending":return(0,u.__)("You're attending","gatherpress");case"waiting_list":return(0,u.__)("You're wait listed","gatherpress");case"not_attending":return(0,u.__)("You're not attending","gatherpress")}return(0,u.__)("RSVP to this event","gatherpress")};return(0,r.createElement)("div",{className:"gp-rsvp"},(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":g,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(v("hidden"===m?"show":"hidden"),b("false"===g?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),w(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,u.__)("Edit RSVP","gatherpress")}return(0,u.__)("RSVP","gatherpress")})(i))),(0,r.createElement)(y(),{isOpen:_,onRequestClose:E,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,u.__)("Edit RSVP","gatherpress")},""===t&&(0,r.createElement)((()=>(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},(0,u.__)("Login Required","gatherpress")),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},(0,u.__)("You must ","gatherpress"),(0,r.createElement)("a",{href:Fe("login_url")},(0,u.__)("Login","gatherpress")),(0,u.__)(" to RSVP to events.","gatherpress")),""!==Fe("registration_url")&&(0,r.createElement)("div",{className:"gp-modal__text"},(0,r.createElement)("a",{href:Fe("registration_url")},(0,u.__)("Register","gatherpress")),(0,u.__)(" if you do not have an account.","gatherpress"))),(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,u.__)("Close","gatherpress")))))),null),""!==t&&(0,r.createElement)((({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,u.__)("Attend","gatherpress")):(t="not_attending",n=(0,u.__)("Not Attending","gatherpress")),(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},S(i)?S(i):(0,r.createElement)(p.Spinner,null)),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},c((0,u.sprintf)(/* translators: %s: button label. */ -(0,u.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))),o?(0,r.createElement)("div",{className:"gp-modal__anonymous"},(0,r.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);l(t),x(e,i,t,d,!1)},checked:a}),(0,r.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,u.__)("Only admins will see your identity.","gatherpress")},(0,u.__)("List me as anonymous.","gatherpress")),(0,r.createElement)(Le,{id:"gp-anonymous-tooltip"})):(0,r.createElement)(r.Fragment,null)),(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,r.createElement)("a",{href:"#",onClick:e=>x(e,t,a),className:"gp-buttons__button wp-block-button__link"},n)),(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,u.__)("Close","gatherpress")))))}),{status:i}))),"no_status"!==i&&(0,r.createElement)("div",{className:"gp-status"},(0,r.createElement)(Ie,{type:n,status:i}),0{const[i,s]=(0,h.useState)(o);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:s},e);let a="";return"object"==typeof i&&void 0!==i[t]&&(o=[...i[t].responses],n&&(o=o.splice(0,n)),a=o.map(((e,t)=>{const{name:n,photo:o}=e;return(0,r.createElement)("figure",{key:t,className:"gp-rsvp-response__member-avatar"},(0,r.createElement)("img",{alt:n,title:n,src:o}))}))),(0,r.createElement)(r.Fragment,null,a)},Ue=e=>{const{type:t,event:n,eventOptions:o}=e,i="default"===o.imageSize?"featured_image":"featured_image_"+o.imageSize,s=c(n[i]),a="gp-events-list";let l="location";const u=n.venue?.is_online_event;return u&&(l="video-alt2"),(0,r.createElement)("div",{className:`${a}`},(0,r.createElement)("div",{className:`${a}__header`},(0,r.createElement)("div",{className:`${a}__info`},o.showFeaturedImage&&(0,r.createElement)("figure",{className:`${a}__image`},(0,r.createElement)("a",{href:n.permalink},s)),(0,r.createElement)("div",{className:`${a}__datetime`},(0,r.createElement)("strong",null,n.datetime_start)),(0,r.createElement)("div",{className:`${a}__title`},(0,r.createElement)("a",{href:n.permalink},c(n.title))),n.venue&&o.showVenue&&(0,r.createElement)("div",{className:`${a}__venue`},(0,r.createElement)("span",{className:`dashicons dashicons-${l}`}),!u&&(0,r.createElement)("a",{href:n.venue.permalink},c(n.venue.name)),u&&(0,r.createElement)("span",null,c(n.venue.name))),o.showDescription&&(0,r.createElement)("div",{className:`${a}__content`},(0,r.createElement)("div",{className:`${a}__excerpt`},c(n.excerpt.split(" ").splice(0,parseInt(o.descriptionLimit)).join(" ")+"[…]"))))),(0,r.createElement)("div",{className:`${a}__footer`},o.showRsvpResponse&&(0,r.createElement)("div",{className:"gp-rsvp-response__items"},(0,r.createElement)(Be,{eventId:n.ID,value:"attending",responses:n.responses,limit:"3"})),"upcoming"===t&&o.showRsvp&&(0,r.createElement)(He,{eventId:n.ID,currentUser:n.current_user,type:t,enableAnonymousRsvp:n.enable_anonymous_rsvp}),"past"===t&&o.showRsvp&&""!==n.current_user&&(0,r.createElement)(Ie,{type:t,status:n.current_user?.status})))},We=e=>{const{eventOptions:t,maxNumberOfEvents:n,datetimeFormat:o,type:i,topics:s,venues:a}=e,[l,c]=(0,h.useState)([]),[d,f]=(0,h.useState)(!1),m=l.map((e=>(0,r.createElement)(Ue,{key:e.ID,eventOptions:t,type:i,event:e})));return(0,h.useEffect)((()=>{let e="",t="";if("object"==typeof s&&(e=s.map((e=>e.slug))?.join(",")),"object"==typeof a&&(t=a.map((e=>e.slug))?.join(",")),Fe("is_user_logged_in"))je()({path:`/gatherpress/v1/event/events-list?event_list_type=${i}&max_number=${n}&datetime_format=${o}&topics=${e}&venues=${t}`}).then((e=>{f(!0),c(e)}));else{const r=Fe("event_rest_api")+`/events-list?event_list_type=${i}&max_number=${n}&datetime_format=${o}&topics=${e}&venues=${t}`;fetch(r).then((e=>e.json())).then((e=>{f(!0),c(e)}))}}),[c,n,o,i,s,a]),(0,r.createElement)("div",{className:`gp-${i}-events-list`},!d&&(0,r.createElement)(p.Spinner,null),d&&0===l.length&&(()=>{const e="upcoming"===i?(0,u.__)("There are no upcoming events.","gatherpress"):(0,u.__)("There are no past events.","gatherpress");return(0,r.createElement)("div",{className:`gp-${i}-events__no_events_message`},e)})(),d&&m)},Ve=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},ze=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/events-list","version":"1.0.0","title":"Events List","category":"gatherpress","icon":"list-view","example":{},"description":"Displays events that are either upcoming or have occurred in the past.","attributes":{"eventOptions":{"type":"object","default":{"descriptionLimit":55,"imageSize":"default","showRsvpResponse":true,"showFeaturedImage":true,"showDescription":true,"showRsvp":true,"showVenue":true}},"datetimeFormat":{"type":"string","default":"D, M j, Y, g:i a T"},"maxNumberOfEvents":{"type":"integer","default":5},"topics":{"type":"array","items":{"type":"object"}},"venues":{"type":"array","items":{"type":"object"}},"type":{"type":"string","default":"upcoming"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./events-list.js","render":"file:./render.php"}');(0,o.registerBlockType)(ze,{edit:e=>{var t,n,o;const{attributes:s,setAttributes:l}=e,h=(0,d.useBlockProps)(),{topics:v,venues:y}=s,{topicsList:g}=(0,m.useSelect)((e=>{const{getEntityRecords:t}=e(f.store);return{topicsList:t("taxonomy","gp_topic",{per_page:-1,context:"view"})}}),[]),{venueList:b}=(0,m.useSelect)((e=>{const{getEntityRecords:t}=e(f.store);return{venueList:t("taxonomy","_gp_venue",{per_page:-1,context:"view"})}}),[]),_=null!==(t=g?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==t?t:{},w=null!==(n=b?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d.InspectorControls,null,(0,r.createElement)(p.PanelBody,null,(0,r.createElement)("p",null,(0,u.__)("Event List type","gatherpress")),(0,r.createElement)(p.ButtonGroup,{className:"block-editor-block-styles__variants"},(0,r.createElement)(p.Button,{className:a()("block-editor-block-styles__item",{"is-active":"upcoming"===s.type}),variant:"secondary",label:(0,u.__)("Upcoming","gatherpress"),onClick:()=>{l({type:"upcoming"})}},(0,r.createElement)(p.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,u.__)("Upcoming","gatherpress"))),(0,r.createElement)(p.Button,{className:a()("block-editor-block-styles__item",{"is-active":"past"===s.type}),variant:"secondary",label:(0,u.__)("Past","gatherpress"),onClick:()=>{l({type:"past"})}},(0,r.createElement)(p.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,u.__)("Past","gatherpress"))))),(0,r.createElement)(p.PanelBody,null,(0,r.createElement)(p.TextControl,{label:(0,u.__)("Date & time format","gatherpress"),value:s.datetimeFormat,help:c((0,u.__)('For more information read the Documentation on date and time formatting.',"gatherpress")),onChange:e=>l({datetimeFormat:e})}),(0,r.createElement)(p.RangeControl,{label:(0,u.__)("Maximum number of events to display","gatherpress"),min:1,max:10,value:parseInt(s.maxNumberOfEvents,10),onChange:e=>l({maxNumberOfEvents:e})}),(0,r.createElement)(p.FormTokenField,{key:"query-controls-topics-select",label:(0,u.__)("Topics","gatherpress"),value:v&&v.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(_),onChange:e=>{if(e.some((e=>"string"==typeof e&&!_[e])))return;const t=e.map((e=>"string"==typeof e?_[e]:e));if((0,i.includes)(t,null))return!1;l({topics:t})},maxSuggestions:20}),(0,r.createElement)(p.FormTokenField,{key:"query-controls-venues-select",label:(0,u.__)("Venues","gatherpress"),value:y&&y.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(w),onChange:e=>{if(e.some((e=>"string"==typeof e&&!w[e])))return;const t=e.map((e=>"string"==typeof e?w[e]:e));if((0,i.includes)(t,null))return!1;l({venues:t})},maxSuggestions:20})),(0,r.createElement)(p.PanelBody,null,(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide All RSVP Responses","gatherpress"),help:s.eventOptions.showRsvpResponse?(0,u.__)("Show All RSVP Responses","gatherpress"):(0,u.__)("Hide All RSVP Responses","gatherpress"),checked:null===(o=s.eventOptions.showRsvpResponse)||void 0===o||o,onChange:e=>{l({eventOptions:{...s.eventOptions,showRsvpResponse:e}})}}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide My RSVP Response"),help:s.eventOptions.showRsvp?(0,u.__)("Show My RSVP Response"):(0,u.__)("Hide My RSVP Response"),checked:s.eventOptions.showRsvp,onChange:e=>{l({eventOptions:{...s.eventOptions,showRsvp:e}})}}),(0,r.createElement)(p.SelectControl,{label:(0,u.__)("Image Size Options","gatherpress"),value:s.eventOptions.imageSize,options:[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Large",value:"large"}],onChange:e=>l({eventOptions:{...s.eventOptions,imageSize:e}})}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide Featured Image","gatherpress"),help:s.eventOptions.showFeaturedImage?(0,u.__)("Show Featured Image","gatherpress"):(0,u.__)("Hide Featured Image","gatherpress"),checked:s.eventOptions.showFeaturedImage,onChange:e=>{l({eventOptions:{...s.eventOptions,showFeaturedImage:e}})}}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide Description","gatherpress"),help:s.eventOptions.showDescription?(0,u.__)("Show Description","gatherpress"):(0,u.__)("Hide Description","gatherpress"),checked:s.eventOptions.showDescription,onChange:e=>{l({eventOptions:{...s.eventOptions,showDescription:e}})}}),(0,r.createElement)(p.TextControl,{label:(0,u.__)("Description Limit"),help:(0,u.__)("Limit the amount of words that display underneath the title of the event"),value:parseInt(s.eventOptions.descriptionLimit),onChange:e=>l({eventOptions:{...s.eventOptions,descriptionLimit:e}}),min:0,max:55,type:"number"}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Event Venue"),help:s.eventOptions.showVenue?(0,u.__)("Show Event Venue"):(0,u.__)("Hide Event Venue"),checked:s.eventOptions.showVenue,onChange:e=>{l({eventOptions:{...s.eventOptions,showVenue:e}})}}))),(0,r.createElement)("div",{...h},(0,r.createElement)(Ve,null,(0,r.createElement)(We,{eventOptions:s.eventOptions,maxNumberOfEvents:s.maxNumberOfEvents,datetimeFormat:s.datetimeFormat,type:s.type,topics:s.topics,venues:s.venues}))))},save:()=>null})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),s=n(7790);r(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,s.isTag)(e)}function y(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function _(e){return e.type===s.ElementType.Directive}function w(e){return e.type===s.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?x(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(w(e)){o=t?x(e.children):[];var a=new m(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,a=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return s.test(e)||null===(t=null==(v=m.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=m.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),m.querySelectorAll(n);case o:case r:var h=l(e).querySelectorAll(p);return a.test(e)&&s.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(v=l(e,r).querySelector(r)).childNodes;var v}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),i=n(1507),s=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],s=["input","select","textarea"],a={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=l(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=l("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),i=o(n(484)),s=n(4606),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||s.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(y=d(y,{key:y.key||h})),o.push(c(y,v,h));continue}}if("text"!==v.type){var g=v,b={};l(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var _=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(_=e(v.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(v.name,b,_),v,h))}else{var w=!v.data.trim().length;if(w&&v.parent&&!(0,s.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&w)continue;o.push(c(v.data,v,h))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var s=o(n(3670));t.domToReact=s.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var l={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=l.source}h.prototype.content=e;var v=[];function y(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function _(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(w(),!g(i))return y("property missing ':'");var o=g(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),l}}return b(),function(){var e,t=[];for(_(t);e=E();)!1!==e&&(t.push(e),_(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==a){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,a=n?{}:i.content,l=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return s=t||s},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),s=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],s=null,a=!1;function l(){a=!0}function c(){if(a){if(a=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,a=n[0],l=n[n.length-1],c=i();if(e===c){if(!s)return;o=l}if(l!==c||s||(o=a),a===c&&s&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?l:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:l,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(i,l)).replace(o,a))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var s=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={672:0,783:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[s,a,l]=n,c=0;if(s.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(l)var u=l(o)}for(t&&t(n);co(8207)));r=o.O(r)})(); \ No newline at end of file +(()=>{var e,t={8207:(e,t,n)=>{"use strict";const o=window.wp.blocks;var r=n(9196);const i=window.lodash;var s=n(3967),a=n.n(s),l=n(3426);const c=l.default||l,u=window.wp.i18n,d=window.wp.blockEditor,p=window.wp.components,f=window.wp.coreData,m=window.wp.data,h=window.wp.element;var v=n(3253),y=n.n(v);const g=Math.min,b=Math.max,_=Math.round,w=Math.floor,E=e=>({x:e,y:e}),x={left:"right",right:"left",bottom:"top",top:"bottom"},S={start:"end",end:"start"};function O(e,t,n){return b(e,g(t,n))}function C(e,t){return"function"==typeof e?e(t):e}function k(e){return e.split("-")[0]}function T(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function R(e){return"y"===e?"height":"width"}function N(e){return["top","bottom"].includes(k(e))?"y":"x"}function P(e){return A(N(e))}function M(e){return e.replace(/start|end/g,(e=>S[e]))}function D(e){return e.replace(/left|right|bottom|top/g,(e=>x[e]))}function L(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function j(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function I(e,t,n){let{reference:o,floating:r}=e;const i=N(t),s=P(t),a=R(s),l=k(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(l){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(T(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function F(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=C(t,e),m=L(f),h=a[p?"floating"===d?"reference":"floating":d],v=j(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{...s.floating,x:o,y:r}:s.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},_=j(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-_.top+m.top)/b.y,bottom:(_.bottom-v.bottom+m.bottom)/b.y,left:(v.left-_.left+m.left)/b.x,right:(_.right-v.right+m.right)/b.x}}const H=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=C(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=k(r),g=k(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),_=p||(g||!h?[D(a)]:function(e){const t=D(e);return[M(e),t,M(t)]}(a));p||"none"===m||_.push(...function(e,t,n,o){const r=T(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(k(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(M)))),i}(a,h,m,b));const w=[a,..._],E=await F(t,v),x=[];let S=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&x.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=T(e),r=P(e),i=R(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=D(s)),[s,D(s)]}(r,s,b);x.push(E[e[0]],E[e[1]])}if(S=[...S,{placement:r,overflows:x}],!x.every((e=>e<=0))){var O,A;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(A=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},B=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=k(n),a=T(n),l="y"===N(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=C(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},U=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=C(e,t),c={x:n,y:o},u=await F(t,l),d=N(k(r)),p=A(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=O(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";m=O(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function W(e){return q(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function z(e){var t;return null==(t=(q(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function q(e){return e instanceof Node||e instanceof V(e).Node}function $(e){return e instanceof Element||e instanceof V(e).Element}function G(e){return e instanceof HTMLElement||e instanceof V(e).HTMLElement}function X(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof V(e).ShadowRoot)}function Y(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function K(e){return["table","td","th"].includes(W(e))}function Z(e){const t=J(),n=ee(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function J(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Q(e){return["html","body","#document"].includes(W(e))}function ee(e){return V(e).getComputedStyle(e)}function te(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ne(e){if("html"===W(e))return e;const t=e.assignedSlot||e.parentNode||X(e)&&e.host||z(e);return X(t)?t.host:t}function oe(e){const t=ne(e);return Q(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&Y(t)?t:oe(t)}function re(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=oe(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=V(r);return i?t.concat(s,s.visualViewport||[],Y(r)?r:[],s.frameElement&&n?re(s.frameElement):[]):t.concat(r,re(r,[],n))}function ie(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=G(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=_(n)!==i||_(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function se(e){return $(e)?e:e.contextElement}function ae(e){const t=se(e);if(!G(t))return E(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=ie(t);let s=(i?_(n.width):n.width)/o,a=(i?_(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const le=E(0);function ce(e){const t=V(e);return J()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:le}function ue(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=se(e);let s=E(1);t&&(o?$(o)&&(s=ae(o)):s=ae(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==V(e))&&t}(i,n,o)?ce(i):E(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=V(i),t=o&&$(o)?V(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=ae(n),t=n.getBoundingClientRect(),o=ee(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=r,c+=i,n=V(n).frameElement}}return j({width:u,height:d,x:l,y:c})}function de(e){return ue(z(e)).left+te(e).scrollLeft}function pe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=V(e),o=z(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const e=J();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)o=function(e){const t=z(e),n=te(e),o=e.ownerDocument.body,r=b(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=b(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+de(e);const a=-n.scrollTop;return"rtl"===ee(o).direction&&(s+=b(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(z(e));else if($(t))o=function(e,t){const n=ue(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=G(e)?ae(e):E(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ce(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return j(o)}function fe(e,t){const n=ne(e);return!(n===t||!$(n)||Q(n))&&("fixed"===ee(n).position||fe(n,t))}function me(e,t,n){const o=G(t),r=z(t),i="fixed"===n,s=ue(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=E(0);if(o||!o&&!i)if(("body"!==W(t)||Y(r))&&(a=te(t)),o){const e=ue(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&(l.x=de(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function he(e,t){return G(e)&&"fixed"!==ee(e).position?t?t(e):e.offsetParent:null}function ve(e,t){const n=V(e);if(!G(e))return n;let o=he(e,t);for(;o&&K(o)&&"static"===ee(o).position;)o=he(o,t);return o&&("html"===W(o)||"body"===W(o)&&"static"===ee(o).position&&!Z(o))?n:o||function(e){let t=ne(e);for(;G(t)&&!Q(t);){if(Z(t))return t;t=ne(t)}return null}(e)||n}const ye={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=G(n),i=z(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=E(1);const l=E(0);if((r||!r&&"fixed"!==o)&&(("body"!==W(n)||Y(i))&&(s=te(n)),G(n))){const e=ue(n);a=ae(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},getDocumentElement:z,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=re(e,[],!1).filter((e=>$(e)&&"body"!==W(e))),r=null;const i="fixed"===ee(e).position;let s=i?ne(e):e;for(;$(s)&&!Q(s);){const t=ee(s),n=Z(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||Y(s)&&!n&&fe(e,s))?o=o.filter((e=>e!==s)):r=t,s=ne(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],a=i.reduce(((e,n)=>{const o=pe(t,n,r);return e.top=b(o.top,e.top),e.right=g(o.right,e.right),e.bottom=g(o.bottom,e.bottom),e.left=b(o.left,e.left),e}),pe(t,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ve,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ve,i=this.getDimensions;return{reference:me(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return ie(e)},getScale:ae,isElement:$,isRTL:function(e){return"rtl"===ee(e).direction}};const ge=(e,t,n)=>{const o=new Map,r={platform:ye,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=I(c,o,l),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},Ee={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},xe=(0,r.createContext)({getTooltipData:()=>Ee});function Se(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(xe).getTooltipData(e)}const Oe="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,Ce=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ke=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Ce(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Te=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:s=[B(Number(r)),H({fallbackAxisSideDirection:"start"}),U({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const l=s;return n?(l.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:a}=e,{element:l,padding:u=0}=C(c,e)||{};if(null==l)return{};const d=L(u),p={x:t,y:n},f=P(o),m=R(f),h=await i.getDimensions(l),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",_=v?"clientHeight":"clientWidth",w=r.reference[m]+r.reference[f]-p[f]-r.floating[m],E=p[f]-r.reference[f],x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let S=x?x[_]:0;S&&await(null==i.isElement?void 0:i.isElement(x))||(S=s.floating[_]||r.floating[m]);const k=w/2-E/2,A=S/2-h[m]/2-1,N=g(d[y],A),M=g(d[b],A),D=N,j=S-h[m]-M,I=S/2-h[m]/2+k,F=O(D,I,j),H=!a.arrow&&null!=T(o)&&I!=F&&r.reference[m]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:a},{x:l,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):ge(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var Ae={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Re={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Ne=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:i="dark",anchorId:a,anchorSelect:l,place:c="top",offset:u=10,events:d=["hover"],openOnClick:p=!1,positionStrategy:f="absolute",middlewares:m,wrapper:h,delayShow:v=0,delayHide:y=0,float:_=!1,hidden:E=!1,noArrow:x=!1,clickable:S=!1,closeOnEsc:O=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:P,position:M,afterShow:D,afterHide:L,content:j,contentWrapperRef:I,isOpen:F,setIsOpen:H,activeAnchor:B,setActiveAnchor:U,border:W,opacity:V,arrowColor:q,role:$="tooltip"})=>{var G;const X=(0,r.useRef)(null),Y=(0,r.useRef)(null),K=(0,r.useRef)(null),Z=(0,r.useRef)(null),J=(0,r.useRef)(null),[Q,ee]=(0,r.useState)(c),[te,ne]=(0,r.useState)({}),[oe,ie]=(0,r.useState)({}),[ae,le]=(0,r.useState)(!1),[ce,de]=(0,r.useState)(!1),[pe,fe]=(0,r.useState)(null),me=(0,r.useRef)(!1),he=(0,r.useRef)(null),{anchorRefs:ve,setActiveAnchor:ye}=Se(t),ge=(0,r.useRef)(!1),[be,_e]=(0,r.useState)([]),Ee=(0,r.useRef)(!1),xe=p||d.includes("click"),Ce=xe||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ne=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&xe&&Object.assign(Ne,{mouseenter:!1,focus:!1,click:!0});const Pe=A?{...A}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!A&&xe&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=R?{...R}:{escape:O||!1,scroll:C||!1,resize:k||!1,clickOutsideAnchor:Ce||!1};N&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Oe((()=>(Ee.current=!0,()=>{Ee.current=!1})),[]);const De=e=>{Ee.current&&(e&&de(!0),setTimeout((()=>{Ee.current&&(null==H||H(e),void 0===F&&le(e))}),10))};(0,r.useEffect)((()=>{if(void 0===F)return()=>null;F&&de(!0);const e=setTimeout((()=>{le(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,r.useEffect)((()=>{if(ae!==me.current)if(J.current&&clearTimeout(J.current),me.current=ae,ae)null==D||D();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();J.current=setTimeout((()=>{de(!1),fe(null),null==L||L()}),e+25)}}),[ae]);const Le=(e=v)=>{K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{De(!0)}),e)},je=(e=y)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{ge.current||De(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return U(null),void ye({current:null});v?Le():De(!0),U(n),ye({current:n}),Z.current&&clearTimeout(Z.current)},Fe=()=>{S?je(y||100):y?je():De(!1),K.current&&clearTimeout(K.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Te({place:null!==(n=null==pe?void 0:pe.place)&&void 0!==n?n:c,offset:u,elementReference:o,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:f,middlewares:m,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&ne(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ee(e.place)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),he.current=n},Ue=e=>{var t;if(!ae)return;const n=e.target;(null===(t=X.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${a}']`),...be].some((e=>null==e?void 0:e.contains(n)))||(De(!1),K.current&&clearTimeout(K.current))},We=we(Ie,50,!0),Ve=we(Fe,50,!0),ze=(0,r.useCallback)((()=>{var e,t;const n=null!==(e=null==pe?void 0:pe.position)&&void 0!==e?e:M;n?He(n):_?he.current&&He(he.current):(null==B?void 0:B.isConnected)&&Te({place:null!==(t=null==pe?void 0:pe.place)&&void 0!==t?t:c,offset:u,elementReference:B,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:f,middlewares:m,border:W}).then((e=>{Ee.current&&(Object.keys(e.tooltipStyles).length&&ne(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ee(e.place))}))}),[ae,B,j,P,c,null==pe?void 0:pe.place,u,f,M,null==pe?void 0:pe.position,_]);(0,r.useEffect)((()=>{var e,t;const n=new Set(ve);be.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${a}']`);o&&n.add({current:o});const r=()=>{De(!1)},i=ke(B),s=ke(X.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r));let l=null;Me.resize?window.addEventListener("resize",r):B&&X.current&&(l=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=se(e),u=r||i?[...c?re(c):[],...re(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,o=null;const r=z(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(a||t(),!d||!p)return;const f={rootMargin:-w(u)+"px "+-w(r.clientWidth-(c+d))+"px "+-w(r.clientHeight-(u+p))+"px "+-w(c)+"px",threshold:b(0,g(1,l))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==l){if(!m)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),100)}m=!1}try{o=new IntersectionObserver(h,{...f,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(h,f)}o.observe(e)}(!0),i}(c,n):null;let p,f=-1,m=null;s&&(m=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{m&&m.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let h=l?ue(e):null;return l&&function t(){const o=ue(e);!h||o.x===h.x&&o.y===h.y&&o.width===h.width&&o.height===h.height||n(),h=o,p=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(p)}}(B,X.current,ze,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&De(!1)};Me.escape&&window.addEventListener("keydown",c),Me.clickOutsideAnchor&&window.addEventListener("click",Ue);const u=[],d=e=>{ae&&(null==e?void 0:e.target)===B||Ie(e)},p=e=>{ae&&(null==e?void 0:e.target)===B&&Fe()},f=["mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:We}):m.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:Ve}):m.includes(e)&&u.push({event:e,listener:p}))})),_&&u.push({event:"mousemove",listener:Be});const h=()=>{ge.current=!0},v=()=>{ge.current=!1,Fe()};return S&&!Ce&&(null===(e=X.current)||void 0===e||e.addEventListener("mouseenter",h),null===(t=X.current)||void 0===t||t.addEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==l||l(),Me.clickOutsideAnchor&&window.removeEventListener("click",Ue),Me.escape&&window.removeEventListener("keydown",c),S&&!Ce&&(null===(e=X.current)||void 0===e||e.removeEventListener("mouseenter",h),null===(t=X.current)||void 0===t||t.removeEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[B,ze,ce,ve,be,T,A,R,xe]),(0,r.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===t&&n.push(e.target),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(de(!1),De(!1),U(null),K.current&&clearTimeout(K.current),Z.current&&clearTimeout(Z.current),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&_e((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[t,l,null==pe?void 0:pe.anchorSelect,B]),(0,r.useEffect)((()=>{ze()}),[ze]),(0,r.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>ze()))}));return e.observe(I.current),()=>{e.disconnect()}}),[j,null==I?void 0:I.current]),(0,r.useEffect)((()=>{var e;const t=document.querySelector(`[id='${a}']`),n=[...be,t];B&&n.includes(B)||U(null!==(e=be[0])&&void 0!==e?e:t)}),[a,be,B]),(0,r.useEffect)((()=>()=>{K.current&&clearTimeout(K.current),Z.current&&clearTimeout(Z.current)}),[]),(0,r.useEffect)((()=>{var e;let n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));_e(e)}catch(e){_e([])}}),[t,l,null==pe?void 0:pe.anchorSelect]);const qe=null!==(G=null==pe?void 0:pe.content)&&void 0!==G?G:j,$e=ae&&Object.keys(te).length>0;return(0,r.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?Le(e.delay):De(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):De(!1)},activeAnchor:B,place:Q,isOpen:Boolean(ce&&!E&&qe&&$e)}))),ce&&!E&&qe?r.createElement(h,{id:t,role:$,className:s("react-tooltip",Ae.tooltip,Re.tooltip,Re[i],n,`react-tooltip__place-${Q}`,Ae[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===f&&Ae.fixed,S&&Ae.clickable),onTransitionEnd:e=>{J.current&&clearTimeout(J.current),ae||"opacity"!==e.propertyName||(de(!1),fe(null),null==L||L())},style:{...P,...te,opacity:void 0!==V&&$e?V:void 0},ref:X},qe,r.createElement(h,{className:s("react-tooltip-arrow",Ae.arrow,Re.arrow,o,x&&Ae.noArrow),style:{...oe,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Y})):null},Pe=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Me=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),De=r.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:i,render:a,className:l,classNameArrow:c,variant:u="dark",place:d="top",offset:p=10,wrapper:f="div",children:m=null,events:h=["hover"],openOnClick:v=!1,positionStrategy:y="absolute",middlewares:g,delayShow:b=0,delayHide:_=0,float:w=!1,hidden:E=!1,noArrow:x=!1,clickable:S=!1,closeOnEsc:O=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N=!1,style:P,position:M,isOpen:D,disableStyleInjection:L=!1,border:j,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,role:W="tooltip"},V)=>{const[z,q]=(0,r.useState)(o),[$,G]=(0,r.useState)(i),[X,Y]=(0,r.useState)(d),[K,Z]=(0,r.useState)(u),[J,Q]=(0,r.useState)(p),[ee,te]=(0,r.useState)(b),[ne,oe]=(0,r.useState)(_),[re,ie]=(0,r.useState)(w),[se,ae]=(0,r.useState)(E),[le,ce]=(0,r.useState)(f),[ue,de]=(0,r.useState)(h),[pe,fe]=(0,r.useState)(y),[me,he]=(0,r.useState)(null),[ve,ye]=(0,r.useState)(null),ge=(0,r.useRef)(L),{anchorRefs:be,activeAnchor:_e}=Se(e),we=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Ee=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:d)},content:e=>{q(null!=e?e:o)},html:e=>{G(null!=e?e:i)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:u)},offset:e=>{Q(null===e?p:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:h)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{te(null===e?b:Number(e))},"delay-hide":e=>{oe(null===e?_:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{ae(null===e?E:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,r.useEffect)((()=>{q(o)}),[o]),(0,r.useEffect)((()=>{G(i)}),[i]),(0,r.useEffect)((()=>{Y(d)}),[d]),(0,r.useEffect)((()=>{Z(u)}),[u]),(0,r.useEffect)((()=>{Q(p)}),[p]),(0,r.useEffect)((()=>{te(b)}),[b]),(0,r.useEffect)((()=>{oe(_)}),[_]),(0,r.useEffect)((()=>{ie(w)}),[w]),(0,r.useEffect)((()=>{ae(E)}),[E]),(0,r.useEffect)((()=>{fe(y)}),[y]),(0,r.useEffect)((()=>{ge.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,r.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,r.useEffect)((()=>{var o;const r=new Set(be);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const a=null!==(o=null!=ve?ve:s)&&void 0!==o?o:_e.current,l=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=we(a);Ee(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=we(a);Ee(e),l.observe(a,c)}return()=>{l.disconnect()}}),[be,_e,ve,t,n]),(0,r.useEffect)((()=>{(null==P?void 0:P.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),j&&!Me("border",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`border\`.`),(null==P?void 0:P.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!Me("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let xe=m;const Oe=(0,r.useRef)(null);if(a){const e=a({content:null!=z?z:null,activeAnchor:ve});xe=e?r.createElement("div",{ref:Oe,className:"react-tooltip-content-wrapper"},e):null}else z&&(xe=z);$&&(xe=r.createElement(Pe,{content:$}));const Ce={forwardRef:V,id:e,anchorId:t,anchorSelect:n,className:s(l,me),classNameArrow:c,content:xe,contentWrapperRef:Oe,place:X,variant:K,offset:J,wrapper:le,events:ue,openOnClick:v,positionStrategy:pe,middlewares:g,delayShow:ee,delayHide:ne,float:re,hidden:se,noArrow:x,clickable:S,closeOnEsc:O,closeOnScroll:C,closeOnResize:k,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:P,position:M,isOpen:D,border:j,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:W};return r.createElement(Ne,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||_e({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||_e({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Le=window.wp.apiFetch;var je=n.n(Le);const Ie=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,u.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,u.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Not Attending","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,u.__)("Went","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Didn't Go","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Didn't Go","gatherpress")}}};return(0,r.createElement)("div",{className:"gp-status__response"},(0,r.createElement)("span",{className:n[e][t].icon}),(0,r.createElement)("strong",null,n[e][t].text))};function Fe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const He=({eventId:e,currentUser:t="",type:n,enableAnonymousRsvp:o})=>{const[i,s]=(0,h.useState)(t.status),[a,l]=(0,h.useState)(Number(t.anonymous)),[d,f]=(0,h.useState)(t.guests),[m,v]=(0,h.useState)("hidden"),[g,b]=(0,h.useState)("false"),[_,w]=(0,h.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&y().setAppElement(".gp-enabled");const E=e=>{e.preventDefault(),w(!1)},x=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),je()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:Fe("misc.nonce")}}).then((e=>{if(e.success){s(e.status),f(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&E(t)}}))},S=e=>{switch(e){case"attending":return(0,u.__)("You're attending","gatherpress");case"waiting_list":return(0,u.__)("You're wait listed","gatherpress");case"not_attending":return(0,u.__)("You're not attending","gatherpress")}return(0,u.__)("RSVP to this event","gatherpress")};return(0,r.createElement)("div",{className:"gp-rsvp"},(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":g,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(v("hidden"===m?"show":"hidden"),b("false"===g?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),w(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,u.__)("Edit RSVP","gatherpress")}return(0,u.__)("RSVP","gatherpress")})(i))),(0,r.createElement)(y(),{isOpen:_,onRequestClose:E,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,u.__)("Edit RSVP","gatherpress")},""===t&&(0,r.createElement)((()=>(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},(0,u.__)("Login Required","gatherpress")),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},(0,u.__)("You must ","gatherpress"),(0,r.createElement)("a",{href:Fe("urls.loginUrl")},(0,u.__)("Login","gatherpress")),(0,u.__)(" to RSVP to events.","gatherpress")),""!==Fe("urls.registrationUrl")&&(0,r.createElement)("div",{className:"gp-modal__text"},(0,r.createElement)("a",{href:Fe("urls.registrationUrl")},(0,u.__)("Register","gatherpress")),(0,u.__)(" if you do not have an account.","gatherpress"))),(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,u.__)("Close","gatherpress")))))),null),""!==t&&(0,r.createElement)((({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,u.__)("Attend","gatherpress")):(t="not_attending",n=(0,u.__)("Not Attending","gatherpress")),(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},S(i)?S(i):(0,r.createElement)(p.Spinner,null)),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},c((0,u.sprintf)(/* translators: %s: button label. */ +(0,u.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))),o?(0,r.createElement)("div",{className:"gp-modal__anonymous"},(0,r.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);l(t),x(e,i,t,d,!1)},checked:a}),(0,r.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,u.__)("Only admins will see your identity.","gatherpress")},(0,u.__)("List me as anonymous.","gatherpress")),(0,r.createElement)(De,{id:"gp-anonymous-tooltip"})):(0,r.createElement)(r.Fragment,null)),(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,r.createElement)("a",{href:"#",onClick:e=>x(e,t,a),className:"gp-buttons__button wp-block-button__link"},n)),(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,u.__)("Close","gatherpress")))))}),{status:i}))),"no_status"!==i&&(0,r.createElement)("div",{className:"gp-status"},(0,r.createElement)(Ie,{type:n,status:i}),0{const[i,s]=(0,h.useState)(o);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:s},e);let a="";return"object"==typeof i&&void 0!==i[t]&&(o=[...i[t].responses],n&&(o=o.splice(0,n)),a=o.map(((e,t)=>{const{name:n,photo:o}=e;return(0,r.createElement)("figure",{key:t,className:"gp-rsvp-response__member-avatar"},(0,r.createElement)("img",{alt:n,title:n,src:o}))}))),(0,r.createElement)(r.Fragment,null,a)},Ue=e=>{const{type:t,event:n,eventOptions:o}=e,i="default"===o.imageSize?"featured_image":"featured_image_"+o.imageSize,s=c(n[i]),a="gp-events-list";let l="location";const u=n.venue?.is_online_event;return u&&(l="video-alt2"),(0,r.createElement)("div",{className:`${a}`},(0,r.createElement)("div",{className:`${a}__header`},(0,r.createElement)("div",{className:`${a}__info`},o.showFeaturedImage&&(0,r.createElement)("figure",{className:`${a}__image`},(0,r.createElement)("a",{href:n.permalink},s)),(0,r.createElement)("div",{className:`${a}__datetime`},(0,r.createElement)("strong",null,n.datetime_start)),(0,r.createElement)("div",{className:`${a}__title`},(0,r.createElement)("a",{href:n.permalink},c(n.title))),n.venue&&o.showVenue&&(0,r.createElement)("div",{className:`${a}__venue`},(0,r.createElement)("span",{className:`dashicons dashicons-${l}`}),!u&&(0,r.createElement)("a",{href:n.venue.permalink},c(n.venue.name)),u&&(0,r.createElement)("span",null,c(n.venue.name))),o.showDescription&&(0,r.createElement)("div",{className:`${a}__content`},(0,r.createElement)("div",{className:`${a}__excerpt`},c(n.excerpt.split(" ").splice(0,parseInt(o.descriptionLimit)).join(" ")+"[…]"))))),(0,r.createElement)("div",{className:`${a}__footer`},o.showRsvpResponse&&(0,r.createElement)("div",{className:"gp-rsvp-response__items"},(0,r.createElement)(Be,{eventId:n.ID,value:"attending",responses:n.responses,limit:"3"})),"upcoming"===t&&o.showRsvp&&(0,r.createElement)(He,{eventId:n.ID,currentUser:n.current_user,type:t,enableAnonymousRsvp:n.enable_anonymous_rsvp}),"past"===t&&o.showRsvp&&""!==n.current_user&&(0,r.createElement)(Ie,{type:t,status:n.current_user?.status})))},We=e=>{const{eventOptions:t,maxNumberOfEvents:n,datetimeFormat:o,type:i,topics:s,venues:a}=e,[l,c]=(0,h.useState)([]),[d,f]=(0,h.useState)(!1),m=l.map((e=>(0,r.createElement)(Ue,{key:e.ID,eventOptions:t,type:i,event:e})));return(0,h.useEffect)((()=>{let e="",t="";if("object"==typeof s&&(e=s.map((e=>e.slug))?.join(",")),"object"==typeof a&&(t=a.map((e=>e.slug))?.join(",")),Fe("eventDetails.currentUser"))je()({path:`/gatherpress/v1/event/events-list?event_list_type=${i}&max_number=${n}&datetime_format=${o}&topics=${e}&venues=${t}`}).then((e=>{f(!0),c(e)}));else{const r=Fe("urls.eventRestApi")+`/events-list?event_list_type=${i}&max_number=${n}&datetime_format=${o}&topics=${e}&venues=${t}`;fetch(r).then((e=>e.json())).then((e=>{f(!0),c(e)}))}}),[c,n,o,i,s,a]),(0,r.createElement)("div",{className:`gp-${i}-events-list`},!d&&(0,r.createElement)(p.Spinner,null),d&&0===l.length&&(()=>{const e="upcoming"===i?(0,u.__)("There are no upcoming events.","gatherpress"):(0,u.__)("There are no past events.","gatherpress");return(0,r.createElement)("div",{className:`gp-${i}-events__no_events_message`},e)})(),d&&m)},Ve=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},ze=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/events-list","version":"1.0.0","title":"Events List","category":"gatherpress","icon":"list-view","example":{},"description":"Displays events that are either upcoming or have occurred in the past.","attributes":{"eventOptions":{"type":"object","default":{"descriptionLimit":55,"imageSize":"default","showRsvpResponse":true,"showFeaturedImage":true,"showDescription":true,"showRsvp":true,"showVenue":true}},"datetimeFormat":{"type":"string","default":"D, M j, Y, g:i a T"},"maxNumberOfEvents":{"type":"integer","default":5},"topics":{"type":"array","items":{"type":"object"}},"venues":{"type":"array","items":{"type":"object"}},"type":{"type":"string","default":"upcoming"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./events-list.js","render":"file:./render.php"}');(0,o.registerBlockType)(ze,{edit:e=>{var t,n,o;const{attributes:s,setAttributes:l}=e,h=(0,d.useBlockProps)(),{topics:v,venues:y}=s,{topicsList:g}=(0,m.useSelect)((e=>{const{getEntityRecords:t}=e(f.store);return{topicsList:t("taxonomy","gp_topic",{per_page:-1,context:"view"})}}),[]),{venueList:b}=(0,m.useSelect)((e=>{const{getEntityRecords:t}=e(f.store);return{venueList:t("taxonomy","_gp_venue",{per_page:-1,context:"view"})}}),[]),_=null!==(t=g?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==t?t:{},w=null!==(n=b?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d.InspectorControls,null,(0,r.createElement)(p.PanelBody,null,(0,r.createElement)("p",null,(0,u.__)("Event List type","gatherpress")),(0,r.createElement)(p.ButtonGroup,{className:"block-editor-block-styles__variants"},(0,r.createElement)(p.Button,{className:a()("block-editor-block-styles__item",{"is-active":"upcoming"===s.type}),variant:"secondary",label:(0,u.__)("Upcoming","gatherpress"),onClick:()=>{l({type:"upcoming"})}},(0,r.createElement)(p.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,u.__)("Upcoming","gatherpress"))),(0,r.createElement)(p.Button,{className:a()("block-editor-block-styles__item",{"is-active":"past"===s.type}),variant:"secondary",label:(0,u.__)("Past","gatherpress"),onClick:()=>{l({type:"past"})}},(0,r.createElement)(p.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,u.__)("Past","gatherpress"))))),(0,r.createElement)(p.PanelBody,null,(0,r.createElement)(p.TextControl,{label:(0,u.__)("Date & time format","gatherpress"),value:s.datetimeFormat,help:c((0,u.__)('For more information read the Documentation on date and time formatting.',"gatherpress")),onChange:e=>l({datetimeFormat:e})}),(0,r.createElement)(p.RangeControl,{label:(0,u.__)("Maximum number of events to display","gatherpress"),min:1,max:10,value:parseInt(s.maxNumberOfEvents,10),onChange:e=>l({maxNumberOfEvents:e})}),(0,r.createElement)(p.FormTokenField,{key:"query-controls-topics-select",label:(0,u.__)("Topics","gatherpress"),value:v&&v.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(_),onChange:e=>{if(e.some((e=>"string"==typeof e&&!_[e])))return;const t=e.map((e=>"string"==typeof e?_[e]:e));if((0,i.includes)(t,null))return!1;l({topics:t})},maxSuggestions:20}),(0,r.createElement)(p.FormTokenField,{key:"query-controls-venues-select",label:(0,u.__)("Venues","gatherpress"),value:y&&y.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(w),onChange:e=>{if(e.some((e=>"string"==typeof e&&!w[e])))return;const t=e.map((e=>"string"==typeof e?w[e]:e));if((0,i.includes)(t,null))return!1;l({venues:t})},maxSuggestions:20})),(0,r.createElement)(p.PanelBody,null,(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide All RSVP Responses","gatherpress"),help:s.eventOptions.showRsvpResponse?(0,u.__)("Show All RSVP Responses","gatherpress"):(0,u.__)("Hide All RSVP Responses","gatherpress"),checked:null===(o=s.eventOptions.showRsvpResponse)||void 0===o||o,onChange:e=>{l({eventOptions:{...s.eventOptions,showRsvpResponse:e}})}}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide My RSVP Response"),help:s.eventOptions.showRsvp?(0,u.__)("Show My RSVP Response"):(0,u.__)("Hide My RSVP Response"),checked:s.eventOptions.showRsvp,onChange:e=>{l({eventOptions:{...s.eventOptions,showRsvp:e}})}}),(0,r.createElement)(p.SelectControl,{label:(0,u.__)("Image Size Options","gatherpress"),value:s.eventOptions.imageSize,options:[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Large",value:"large"}],onChange:e=>l({eventOptions:{...s.eventOptions,imageSize:e}})}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide Featured Image","gatherpress"),help:s.eventOptions.showFeaturedImage?(0,u.__)("Show Featured Image","gatherpress"):(0,u.__)("Hide Featured Image","gatherpress"),checked:s.eventOptions.showFeaturedImage,onChange:e=>{l({eventOptions:{...s.eventOptions,showFeaturedImage:e}})}}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide Description","gatherpress"),help:s.eventOptions.showDescription?(0,u.__)("Show Description","gatherpress"):(0,u.__)("Hide Description","gatherpress"),checked:s.eventOptions.showDescription,onChange:e=>{l({eventOptions:{...s.eventOptions,showDescription:e}})}}),(0,r.createElement)(p.TextControl,{label:(0,u.__)("Description Limit"),help:(0,u.__)("Limit the amount of words that display underneath the title of the event"),value:parseInt(s.eventOptions.descriptionLimit),onChange:e=>l({eventOptions:{...s.eventOptions,descriptionLimit:e}}),min:0,max:55,type:"number"}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Event Venue"),help:s.eventOptions.showVenue?(0,u.__)("Show Event Venue"):(0,u.__)("Hide Event Venue"),checked:s.eventOptions.showVenue,onChange:e=>{l({eventOptions:{...s.eventOptions,showVenue:e}})}}))),(0,r.createElement)("div",{...h},(0,r.createElement)(Ve,null,(0,r.createElement)(We,{eventOptions:s.eventOptions,maxNumberOfEvents:s.maxNumberOfEvents,datetimeFormat:s.datetimeFormat,type:s.type,topics:s.topics,venues:s.venues}))))},save:()=>null})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),s=n(7790);r(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,s.isTag)(e)}function y(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function _(e){return e.type===s.ElementType.Directive}function w(e){return e.type===s.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?x(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(w(e)){o=t?x(e.children):[];var a=new m(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,a=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return s.test(e)||null===(t=null==(v=m.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=m.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),m.querySelectorAll(n);case o:case r:var h=l(e).querySelectorAll(p);return a.test(e)&&s.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(v=l(e,r).querySelector(r)).childNodes;var v}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),i=n(1507),s=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],s=["input","select","textarea"],a={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=l(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=l("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),i=o(n(484)),s=n(4606),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||s.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(y=d(y,{key:y.key||h})),o.push(c(y,v,h));continue}}if("text"!==v.type){var g=v,b={};l(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var _=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(_=e(v.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(v.name,b,_),v,h))}else{var w=!v.data.trim().length;if(w&&v.parent&&!(0,s.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&w)continue;o.push(c(v.data,v,h))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var s=o(n(3670));t.domToReact=s.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var l={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=l.source}h.prototype.content=e;var v=[];function y(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function _(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(w(),!g(i))return y("property missing ':'");var o=g(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),l}}return b(),function(){var e,t=[];for(_(t);e=E();)!1!==e&&(t.push(e),_(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==a){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,a=n?{}:i.content,l=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return s=t||s},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),s=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],s=null,a=!1;function l(){a=!0}function c(){if(a){if(a=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,a=n[0],l=n[n.length-1],c=i();if(e===c){if(!s)return;o=l}if(l!==c||s||(o=a),a===c&&s&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?l:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:l,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(i,l)).replace(o,a))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var s=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={672:0,783:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[s,a,l]=n,c=0;if(s.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(l)var u=l(o)}for(t&&t(n);co(8207)));r=o.O(r)})(); \ No newline at end of file diff --git a/build/blocks/online-event/index.asset.php b/build/blocks/online-event/index.asset.php index a0fdd06f0..1a9a319b7 100644 --- a/build/blocks/online-event/index.asset.php +++ b/build/blocks/online-event/index.asset.php @@ -1 +1 @@ - array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'dee033fed01949d66fbc'); + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '2706407f4eae073ce3d1'); diff --git a/build/blocks/online-event/index.js b/build/blocks/online-event/index.js index fbd2371c2..befef25e6 100644 --- a/build/blocks/online-event/index.js +++ b/build/blocks/online-event/index.js @@ -1 +1 @@ -(()=>{var e,t={3850:(e,t,n)=>{"use strict";const o=window.wp.blocks,r=window.React,l=window.wp.blockEditor,i=window.wp.components,s=window.wp.data,c=Math.min,a=Math.max,u=Math.round,d=Math.floor,f=e=>({x:e,y:e}),p={left:"right",right:"left",bottom:"top",top:"bottom"},m={start:"end",end:"start"};function v(e,t,n){return a(e,c(t,n))}function y(e,t){return"function"==typeof e?e(t):e}function h(e){return e.split("-")[0]}function g(e){return e.split("-")[1]}function w(e){return"x"===e?"y":"x"}function b(e){return"y"===e?"height":"width"}function x(e){return["top","bottom"].includes(h(e))?"y":"x"}function E(e){return w(x(e))}function _(e){return e.replace(/start|end/g,(e=>m[e]))}function S(e){return e.replace(/left|right|bottom|top/g,(e=>p[e]))}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function O(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function T(e,t,n){let{reference:o,floating:r}=e;const l=x(t),i=E(t),s=b(i),c=h(t),a="y"===l,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let p;switch(c){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(g(t)){case"start":p[i]-=f*(n&&a?-1:1);break;case"end":p[i]+=f*(n&&a?-1:1)}return p}async function A(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:l,rects:i,elements:s,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=y(t,e),m=k(p),v=s[f?"floating"===d?"reference":"floating":d],h=O(await l.getClippingRect({element:null==(n=await(null==l.isElement?void 0:l.isElement(v)))||n?v:v.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:a,rootBoundary:u,strategy:c})),g="floating"===d?{...i.floating,x:o,y:r}:i.reference,w=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await(null==l.isElement?void 0:l.isElement(w))&&await(null==l.getScale?void 0:l.getScale(w))||{x:1,y:1},x=O(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:w,strategy:c}):g);return{top:(h.top-x.top+m.top)/b.y,bottom:(x.bottom-h.bottom+m.bottom)/b.y,left:(h.left-x.left+m.left)/b.x,right:(x.right-h.right+m.right)/b.x}}const R=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:l,rects:i,initialPlacement:s,platform:c,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...w}=y(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const x=h(r),k=h(s)===s,O=await(null==c.isRTL?void 0:c.isRTL(a.floating)),T=f||(k||!v?[S(s)]:function(e){const t=S(e);return[_(e),t,_(t)]}(s));f||"none"===m||T.push(...function(e,t,n,o){const r=g(e);let l=function(e,t,n){const o=["left","right"],r=["right","left"],l=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?l:i;default:return[]}}(h(e),"start"===n,o);return r&&(l=l.map((e=>e+"-"+r)),t&&(l=l.concat(l.map(_)))),l}(s,v,m,O));const R=[s,...T],L=await A(t,w),C=[];let N=(null==(o=l.flip)?void 0:o.overflows)||[];if(u&&C.push(L[x]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=g(e),r=E(e),l=b(r);let i="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=S(i)),[i,S(i)]}(r,i,O);C.push(L[e[0]],L[e[1]])}if(N=[...N,{placement:r,overflows:C}],!C.every((e=>e<=0))){var D,j;const e=((null==(D=l.flip)?void 0:D.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:N},reset:{placement:t}};let n=null==(j=N.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:j.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=N.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},L=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,l=await(null==o.isRTL?void 0:o.isRTL(r.floating)),i=h(n),s=g(n),c="y"===x(n),a=["left","top"].includes(i)?-1:1,u=l&&c?-1:1,d=y(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),c?{x:p*u,y:f*a}:{x:f*a,y:p*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},C=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=y(e,t),a={x:n,y:o},u=await A(t,c),d=x(h(r)),f=w(d);let p=a[f],m=a[d];if(l){const e="y"===f?"bottom":"right";p=v(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";m=v(m+u["y"===d?"top":"left"],m,m-u[e])}const g=s.fn({...t,[f]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}};function N(e){return P(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(P(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function P(e){return e instanceof Node||e instanceof D(e).Node}function $(e){return e instanceof Element||e instanceof D(e).Element}function B(e){return e instanceof HTMLElement||e instanceof D(e).HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof D(e).ShadowRoot)}function F(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function H(e){return["table","td","th"].includes(N(e))}function z(e){const t=W(),n=q(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function W(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function M(e){return["html","body","#document"].includes(N(e))}function q(e){return D(e).getComputedStyle(e)}function V(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function K(e){if("html"===N(e))return e;const t=e.assignedSlot||e.parentNode||I(e)&&e.host||j(e);return I(t)?t.host:t}function X(e){const t=K(e);return M(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&F(t)?t:X(t)}function G(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=X(e),l=r===(null==(o=e.ownerDocument)?void 0:o.body),i=D(r);return l?t.concat(i,i.visualViewport||[],F(r)?r:[],i.frameElement&&n?G(i.frameElement):[]):t.concat(r,G(r,[],n))}function Y(e){const t=q(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=B(e),l=r?e.offsetWidth:n,i=r?e.offsetHeight:o,s=u(n)!==l||u(o)!==i;return s&&(n=l,o=i),{width:n,height:o,$:s}}function U(e){return $(e)?e:e.contextElement}function Z(e){const t=U(e);if(!B(t))return f(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:l}=Y(t);let i=(l?u(n.width):n.width)/o,s=(l?u(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const J=f(0);function Q(e){const t=D(e);return W()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:J}function ee(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),l=U(e);let i=f(1);t&&(o?$(o)&&(i=Z(o)):i=Z(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==D(e))&&t}(l,n,o)?Q(l):f(0);let c=(r.left+s.x)/i.x,a=(r.top+s.y)/i.y,u=r.width/i.x,d=r.height/i.y;if(l){const e=D(l),t=o&&$(o)?D(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=Z(n),t=n.getBoundingClientRect(),o=q(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,a*=e.y,u*=e.x,d*=e.y,c+=r,a+=l,n=D(n).frameElement}}return O({width:u,height:d,x:c,y:a})}function te(e){return ee(j(e)).left+V(e).scrollLeft}function ne(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=D(e),o=j(e),r=n.visualViewport;let l=o.clientWidth,i=o.clientHeight,s=0,c=0;if(r){l=r.width,i=r.height;const e=W();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,c=r.offsetTop)}return{width:l,height:i,x:s,y:c}}(e,n);else if("document"===t)o=function(e){const t=j(e),n=V(e),o=e.ownerDocument.body,r=a(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=a(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+te(e);const s=-n.scrollTop;return"rtl"===q(o).direction&&(i+=a(t.clientWidth,o.clientWidth)-r),{width:r,height:l,x:i,y:s}}(j(e));else if($(t))o=function(e,t){const n=ee(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,l=B(e)?Z(e):f(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:r*l.x,y:o*l.y}}(t,n);else{const n=Q(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return O(o)}function oe(e,t){const n=K(e);return!(n===t||!$(n)||M(n))&&("fixed"===q(n).position||oe(n,t))}function re(e,t,n){const o=B(t),r=j(t),l="fixed"===n,i=ee(e,!0,l,t);let s={scrollLeft:0,scrollTop:0};const c=f(0);if(o||!o&&!l)if(("body"!==N(t)||F(r))&&(s=V(t)),o){const e=ee(t,!0,l,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=te(r));return{x:i.left+s.scrollLeft-c.x,y:i.top+s.scrollTop-c.y,width:i.width,height:i.height}}function le(e,t){return B(e)&&"fixed"!==q(e).position?t?t(e):e.offsetParent:null}function ie(e,t){const n=D(e);if(!B(e))return n;let o=le(e,t);for(;o&&H(o)&&"static"===q(o).position;)o=le(o,t);return o&&("html"===N(o)||"body"===N(o)&&"static"===q(o).position&&!z(o))?n:o||function(e){let t=K(e);for(;B(t)&&!M(t);){if(z(t))return t;t=K(t)}return null}(e)||n}const se={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=B(n),l=j(n);if(n===l)return t;let i={scrollLeft:0,scrollTop:0},s=f(1);const c=f(0);if((r||!r&&"fixed"!==o)&&(("body"!==N(n)||F(l))&&(i=V(n)),B(n))){const e=ee(n);s=Z(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-i.scrollLeft*s.x+c.x,y:t.y*s.y-i.scrollTop*s.y+c.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const l=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=G(e,[],!1).filter((e=>$(e)&&"body"!==N(e))),r=null;const l="fixed"===q(e).position;let i=l?K(e):e;for(;$(i)&&!M(i);){const t=q(i),n=z(i);n||"fixed"!==t.position||(r=null),(l?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||F(i)&&!n&&oe(e,i))?o=o.filter((e=>e!==i)):r=t,i=K(i)}return t.set(e,o),o}(t,this._c):[].concat(n),o],i=l[0],s=l.reduce(((e,n)=>{const o=ne(t,n,r);return e.top=a(o.top,e.top),e.right=c(o.right,e.right),e.bottom=c(o.bottom,e.bottom),e.left=a(o.left,e.left),e}),ne(t,i,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ie,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ie,l=this.getDimensions;return{reference:re(t,await r(n),o),floating:{x:0,y:0,...await l(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return Y(e)},getScale:Z,isElement:$,isRTL:function(e){return"rtl"===q(e).direction}};const ce=(e,t,n)=>{const o=new Map,r={platform:se,...n},l={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:l=[],platform:i}=n,s=l.filter(Boolean),c=await(null==i.isRTL?void 0:i.isRTL(t));let a=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=T(a,o,c),f=o,p={},m=0;for(let n=0;n{let o=null;return function(...r){const l=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(l,t)),n||(o&&clearTimeout(o),o=setTimeout(l,t))}},pe={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},me=(0,r.createContext)({getTooltipData:()=>pe});function ve(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(me).getTooltipData(e)}const ye="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,he=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ge=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(he(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},we=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:l="absolute",middlewares:i=[L(Number(r)),R({fallbackAxisSideDirection:"start"}),C({padding:5})],border:s})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=i;return n?(a.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:l,elements:i,middlewareData:s}=e,{element:a,padding:d=0}=y(u,e)||{};if(null==a)return{};const f=k(d),p={x:t,y:n},m=E(o),h=b(m),w=await l.getDimensions(a),x="y"===m,_=x?"top":"left",S=x?"bottom":"right",O=x?"clientHeight":"clientWidth",T=r.reference[h]+r.reference[m]-p[m]-r.floating[h],A=p[m]-r.reference[m],R=await(null==l.getOffsetParent?void 0:l.getOffsetParent(a));let L=R?R[O]:0;L&&await(null==l.isElement?void 0:l.isElement(R))||(L=i.floating[O]||r.floating[h]);const C=T/2-A/2,N=L/2-w[h]/2-1,D=c(f[_],N),j=c(f[S],N),P=D,$=L-w[h]-j,B=L/2-w[h]/2+C,I=v(P,B,$),F=!s.arrow&&null!=g(o)&&B!=I&&r.reference[h]/2-(B{var r,l;const i={left:`${e}px`,top:`${t}px`,border:s},{x:c,y:a}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(l={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==l?l:"bottom",d=s&&{borderBottom:s,borderRight:s};let f=0;if(s){const e=`${s}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):ce(e,t,{placement:"bottom",strategy:l,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u};var be={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},xe={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Ee=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:l="dark",anchorId:i,anchorSelect:s,place:u="top",offset:f=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:y,wrapper:h,delayShow:g=0,delayHide:w=0,float:b=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:k=!1,closeOnResize:O=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:L,style:C,position:N,afterShow:D,afterHide:P,content:$,contentWrapperRef:B,isOpen:I,setIsOpen:F,activeAnchor:H,setActiveAnchor:z,border:W,opacity:M,arrowColor:q,role:V="tooltip"})=>{var K;const X=(0,r.useRef)(null),Y=(0,r.useRef)(null),Z=(0,r.useRef)(null),J=(0,r.useRef)(null),Q=(0,r.useRef)(null),[te,ne]=(0,r.useState)(u),[oe,re]=(0,r.useState)({}),[le,ie]=(0,r.useState)({}),[se,ce]=(0,r.useState)(!1),[ue,de]=(0,r.useState)(!1),[pe,me]=(0,r.useState)(null),he=(0,r.useRef)(!1),Ee=(0,r.useRef)(null),{anchorRefs:_e,setActiveAnchor:Se}=ve(t),ke=(0,r.useRef)(!1),[Oe,Te]=(0,r.useState)([]),Ae=(0,r.useRef)(!1),Re=m||p.includes("click"),Le=Re||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ce=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Re&&Object.assign(Ce,{mouseenter:!1,focus:!1,click:!0});const Ne=A?{...A}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!A&&Re&&Object.assign(Ne,{mouseleave:!1,blur:!1});const De=R?{...R}:{escape:S||!1,scroll:k||!1,resize:O||!1,clickOutsideAnchor:Le||!1};L&&(Object.assign(Ce,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ne,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(De,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),ye((()=>(Ae.current=!0,()=>{Ae.current=!1})),[]);const je=e=>{Ae.current&&(e&&de(!0),setTimeout((()=>{Ae.current&&(null==F||F(e),void 0===I&&ce(e))}),10))};(0,r.useEffect)((()=>{if(void 0===I)return()=>null;I&&de(!0);const e=setTimeout((()=>{ce(I)}),10);return()=>{clearTimeout(e)}}),[I]),(0,r.useEffect)((()=>{if(se!==he.current)if(Q.current&&clearTimeout(Q.current),he.current=se,se)null==D||D();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();Q.current=setTimeout((()=>{de(!1),me(null),null==P||P()}),e+25)}}),[se]);const Pe=(e=g)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{je(!0)}),e)},$e=(e=w)=>{J.current&&clearTimeout(J.current),J.current=setTimeout((()=>{ke.current||je(!1)}),e)},Be=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return z(null),void Se({current:null});g?Pe():je(!0),z(n),Se({current:n}),J.current&&clearTimeout(J.current)},Ie=()=>{_?$e(w||100):w?$e():je(!1),Z.current&&clearTimeout(Z.current)},Fe=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};we({place:null!==(n=null==pe?void 0:pe.place)&&void 0!==n?n:u,offset:f,elementReference:o,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:v,middlewares:y,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ne(e.place)}))},He=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Fe(n),Ee.current=n},ze=e=>{var t;if(!se)return;const n=e.target;(null===(t=X.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...Oe].some((e=>null==e?void 0:e.contains(n)))||(je(!1),Z.current&&clearTimeout(Z.current))},We=fe(Be,50,!0),Me=fe(Ie,50,!0),qe=(0,r.useCallback)((()=>{var e,t;const n=null!==(e=null==pe?void 0:pe.position)&&void 0!==e?e:N;n?Fe(n):b?Ee.current&&Fe(Ee.current):(null==H?void 0:H.isConnected)&&we({place:null!==(t=null==pe?void 0:pe.place)&&void 0!==t?t:u,offset:f,elementReference:H,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:v,middlewares:y,border:W}).then((e=>{Ae.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ne(e.place))}))}),[se,H,$,C,u,null==pe?void 0:pe.place,f,v,N,null==pe?void 0:pe.position,b]);(0,r.useEffect)((()=>{var e,t;const n=new Set(_e);Oe.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${i}']`);o&&n.add({current:o});const r=()=>{je(!1)},l=ge(H),s=ge(X.current);De.scroll&&(window.addEventListener("scroll",r),null==l||l.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r));let u=null;De.resize?window.addEventListener("resize",r):H&&X.current&&(u=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,f=U(e),p=r||l?[...f?G(f):[],...G(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));const m=f&&s?function(e,t){let n,o=null;const r=j(e);function l(){clearTimeout(n),o&&o.disconnect(),o=null}return function i(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),l();const{left:f,top:p,width:m,height:v}=e.getBoundingClientRect();if(s||t(),!m||!v)return;const y={rootMargin:-d(p)+"px "+-d(r.clientWidth-(f+m))+"px "+-d(r.clientHeight-(p+v))+"px "+-d(f)+"px",threshold:a(0,c(1,u))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==u){if(!h)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}h=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),l}(f,n):null;let v,y=-1,h=null;i&&(h=new ResizeObserver((e=>{let[o]=e;o&&o.target===f&&h&&(h.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{h&&h.observe(t)}))),n()})),f&&!u&&h.observe(f),h.observe(t));let g=u?ee(e):null;return u&&function t(){const o=ee(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,v=requestAnimationFrame(t)}(),n(),()=>{p.forEach((e=>{r&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),m&&m(),h&&h.disconnect(),h=null,u&&cancelAnimationFrame(v)}}(H,X.current,qe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&je(!1)};De.escape&&window.addEventListener("keydown",f),De.clickOutsideAnchor&&window.addEventListener("click",ze);const p=[],m=e=>{se&&(null==e?void 0:e.target)===H||Be(e)},v=e=>{se&&(null==e?void 0:e.target)===H&&Ie()},y=["mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(Ce).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:We}):h.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:Me}):h.includes(e)&&p.push({event:e,listener:v}))})),b&&p.push({event:"mousemove",listener:He});const g=()=>{ke.current=!0},w=()=>{ke.current=!1,Ie()};return _&&!Le&&(null===(e=X.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=X.current)||void 0===t||t.addEventListener("mouseleave",w)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;De.scroll&&(window.removeEventListener("scroll",r),null==l||l.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r)),De.resize?window.removeEventListener("resize",r):null==u||u(),De.clickOutsideAnchor&&window.removeEventListener("click",ze),De.escape&&window.removeEventListener("keydown",f),_&&!Le&&(null===(e=X.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=X.current)||void 0===t||t.removeEventListener("mouseleave",w)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[H,qe,ue,_e,Oe,T,A,R,Re]),(0,r.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:s)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===t&&n.push(e.target),"childList"===e.type){if(H){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,H))&&(de(!1),je(!1),z(null),Z.current&&clearTimeout(Z.current),J.current&&clearTimeout(J.current),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[t,s,null==pe?void 0:pe.anchorSelect,H]),(0,r.useEffect)((()=>{qe()}),[qe]),(0,r.useEffect)((()=>{if(!(null==B?void 0:B.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>qe()))}));return e.observe(B.current),()=>{e.disconnect()}}),[$,null==B?void 0:B.current]),(0,r.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...Oe,t];H&&n.includes(H)||z(null!==(e=Oe[0])&&void 0!==e?e:t)}),[i,Oe,H]),(0,r.useEffect)((()=>()=>{Z.current&&clearTimeout(Z.current),J.current&&clearTimeout(J.current)}),[]),(0,r.useEffect)((()=>{var e;let n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:s;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));Te(e)}catch(e){Te([])}}),[t,s,null==pe?void 0:pe.anchorSelect]);const Ve=null!==(K=null==pe?void 0:pe.content)&&void 0!==K?K:$,Ke=se&&Object.keys(oe).length>0;return(0,r.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}me(null!=e?e:null),(null==e?void 0:e.delay)?Pe(e.delay):je(!0)},close:e=>{(null==e?void 0:e.delay)?$e(e.delay):je(!1)},activeAnchor:H,place:te,isOpen:Boolean(ue&&!x&&Ve&&Ke)}))),ue&&!x&&Ve?r.createElement(h,{id:t,role:V,className:ae("react-tooltip",be.tooltip,xe.tooltip,xe[l],n,`react-tooltip__place-${te}`,be[Ke?"show":"closing"],Ke?"react-tooltip__show":"react-tooltip__closing","fixed"===v&&be.fixed,_&&be.clickable),onTransitionEnd:e=>{Q.current&&clearTimeout(Q.current),se||"opacity"!==e.propertyName||(de(!1),me(null),null==P||P())},style:{...C,...oe,opacity:void 0!==M&&Ke?M:void 0},ref:X},Ve,r.createElement(h,{className:ae("react-tooltip-arrow",be.arrow,xe.arrow,o,E&&be.noArrow),style:{...le,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Y})):null},_e=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Se=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ke=r.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:l,render:i,className:s,classNameArrow:c,variant:a="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:v=!1,positionStrategy:y="absolute",middlewares:h,delayShow:g=0,delayHide:w=0,float:b=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:k=!1,closeOnResize:O=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:L=!1,style:C,position:N,isOpen:D,disableStyleInjection:j=!1,border:P,opacity:$,arrowColor:B,setIsOpen:I,afterShow:F,afterHide:H,role:z="tooltip"},W)=>{const[M,q]=(0,r.useState)(o),[V,K]=(0,r.useState)(l),[X,G]=(0,r.useState)(u),[Y,U]=(0,r.useState)(a),[Z,J]=(0,r.useState)(d),[Q,ee]=(0,r.useState)(g),[te,ne]=(0,r.useState)(w),[oe,re]=(0,r.useState)(b),[le,ie]=(0,r.useState)(x),[se,ce]=(0,r.useState)(f),[ue,de]=(0,r.useState)(m),[fe,pe]=(0,r.useState)(y),[me,ye]=(0,r.useState)(null),[he,ge]=(0,r.useState)(null),we=(0,r.useRef)(j),{anchorRefs:be,activeAnchor:xe}=ve(e),ke=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Oe=e=>{const t={place:e=>{var t;G(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:o)},html:e=>{K(null!=e?e:l)},variant:e=>{var t;U(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:m)},"position-strategy":e=>{var t;pe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?w:Number(e))},float:e=>{re(null===e?b:"true"===e)},hidden:e=>{ie(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,r.useEffect)((()=>{q(o)}),[o]),(0,r.useEffect)((()=>{K(l)}),[l]),(0,r.useEffect)((()=>{G(u)}),[u]),(0,r.useEffect)((()=>{U(a)}),[a]),(0,r.useEffect)((()=>{J(d)}),[d]),(0,r.useEffect)((()=>{ee(g)}),[g]),(0,r.useEffect)((()=>{ne(w)}),[w]),(0,r.useEffect)((()=>{re(b)}),[b]),(0,r.useEffect)((()=>{ie(x)}),[x]),(0,r.useEffect)((()=>{pe(y)}),[y]),(0,r.useEffect)((()=>{we.current!==j&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[j]),(0,r.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===j,disableBase:j}}))}),[]),(0,r.useEffect)((()=>{var o;const r=new Set(be);let l=n;if(!l&&e&&(l=`[data-tooltip-id='${e}']`),l)try{document.querySelectorAll(l).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`)}const i=document.querySelector(`[id='${t}']`);if(i&&r.add({current:i}),!r.size)return()=>null;const s=null!==(o=null!=he?he:i)&&void 0!==o?o:xe.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=ke(s);Oe(n)}))})),a={attributes:!0,childList:!1,subtree:!1};if(s){const e=ke(s);Oe(e),c.observe(s,a)}return()=>{c.disconnect()}}),[be,xe,he,t,n]),(0,r.useEffect)((()=>{(null==C?void 0:C.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),P&&!Se("border",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`border\`.`),(null==C?void 0:C.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),$&&!Se("opacity",`${$}`)&&console.warn(`[react-tooltip] "${$}" is not a valid \`opacity\`.`)}),[]);let Te=p;const Ae=(0,r.useRef)(null);if(i){const e=i({content:null!=M?M:null,activeAnchor:he});Te=e?r.createElement("div",{ref:Ae,className:"react-tooltip-content-wrapper"},e):null}else M&&(Te=M);V&&(Te=r.createElement(_e,{content:V}));const Re={forwardRef:W,id:e,anchorId:t,anchorSelect:n,className:ae(s,me),classNameArrow:c,content:Te,contentWrapperRef:Ae,place:X,variant:Y,offset:Z,wrapper:se,events:ue,openOnClick:v,positionStrategy:fe,middlewares:h,delayShow:Q,delayHide:te,float:oe,hidden:le,noArrow:E,clickable:_,closeOnEsc:S,closeOnScroll:k,closeOnResize:O,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:L,style:C,position:N,isOpen:D,border:P,opacity:$,arrowColor:B,setIsOpen:I,afterShow:F,afterHide:H,activeAnchor:he,setActiveAnchor:e=>ge(e),role:z};return r.createElement(Ee,{...Re})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||de({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||de({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Oe=window.wp.i18n,Te=window.wp.element,Ae=(e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}};function Re(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const Le=({onlineEventLinkDefault:e=""})=>{const t=(0,Oe.__)("Online event","gatherpress"),[n,o]=(0,Te.useState)(e);return Ae({setOnlineEventLink:o},Re("post_id")),(0,r.createElement)(i.Flex,{justify:"normal",gap:"3"},(0,r.createElement)(i.FlexItem,{display:"flex"},(0,r.createElement)(i.Icon,{icon:"video-alt2"})),(0,r.createElement)(i.FlexItem,null,!n&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-online-event-tooltip","data-tooltip-content":(0,Oe.__)("Link active for attendees during event.","gatherpress")},t),(0,r.createElement)(ke,{id:"gp-online-event-tooltip"})),n&&(0,r.createElement)("a",{href:n,rel:"noreferrer",target:"_blank"},t)))},Ce=()=>{const{editPost:e,unlockPostSaving:t}=(0,s.useDispatch)("core/editor"),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link)),[o,l]=(0,Te.useState)(n);return Ae({setOnlineEventLink:l},Re("post_id")),(0,r.createElement)(i.TextControl,{label:(0,Oe.__)("Online event link","gatherpress"),value:o,placeholder:(0,Oe.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{_online_event_link:n}}),l(n),((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setOnlineEventLink:n},Re("post_id")),t()})(n)}})},Ne=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},De=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/online-event","version":"1.0.0","title":"Online Event","category":"gatherpress","icon":"video-alt2","example":{},"description":"Utilized for virtual events, offering the capability to share a direct link to an event.","attributes":{"blockId":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./online-event.js","render":"file:./render.php"}');(0,o.registerBlockType)(De,{edit:({isSelected:e})=>{const t=(0,l.useBlockProps)(),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(i.PanelBody,null,(0,r.createElement)(i.PanelRow,null,(0,r.createElement)(Ce,null)))),(0,r.createElement)("div",{...t},(0,r.createElement)(Ne,{isSelected:e},(0,r.createElement)(Le,{onlineEventLinkDefault:n}))))},save:()=>null})},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=l)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(s=!1,l0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[n,r,l]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={143:0,139:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,l,[i,s,c]=n,a=0;if(i.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(c)var u=c(o)}for(t&&t(n);ao(3850)));r=o.O(r)})(); \ No newline at end of file +(()=>{var e,t={3850:(e,t,n)=>{"use strict";const o=window.wp.blocks,r=window.React,l=window.wp.blockEditor,i=window.wp.components,s=window.wp.data,c=Math.min,a=Math.max,u=Math.round,d=Math.floor,f=e=>({x:e,y:e}),p={left:"right",right:"left",bottom:"top",top:"bottom"},m={start:"end",end:"start"};function v(e,t,n){return a(e,c(t,n))}function y(e,t){return"function"==typeof e?e(t):e}function h(e){return e.split("-")[0]}function g(e){return e.split("-")[1]}function w(e){return"x"===e?"y":"x"}function b(e){return"y"===e?"height":"width"}function x(e){return["top","bottom"].includes(h(e))?"y":"x"}function E(e){return w(x(e))}function _(e){return e.replace(/start|end/g,(e=>m[e]))}function S(e){return e.replace(/left|right|bottom|top/g,(e=>p[e]))}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function O(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function T(e,t,n){let{reference:o,floating:r}=e;const l=x(t),i=E(t),s=b(i),c=h(t),a="y"===l,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let p;switch(c){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(g(t)){case"start":p[i]-=f*(n&&a?-1:1);break;case"end":p[i]+=f*(n&&a?-1:1)}return p}async function A(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:l,rects:i,elements:s,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=y(t,e),m=k(p),v=s[f?"floating"===d?"reference":"floating":d],h=O(await l.getClippingRect({element:null==(n=await(null==l.isElement?void 0:l.isElement(v)))||n?v:v.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:a,rootBoundary:u,strategy:c})),g="floating"===d?{...i.floating,x:o,y:r}:i.reference,w=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await(null==l.isElement?void 0:l.isElement(w))&&await(null==l.getScale?void 0:l.getScale(w))||{x:1,y:1},x=O(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:w,strategy:c}):g);return{top:(h.top-x.top+m.top)/b.y,bottom:(x.bottom-h.bottom+m.bottom)/b.y,left:(h.left-x.left+m.left)/b.x,right:(x.right-h.right+m.right)/b.x}}const R=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:l,rects:i,initialPlacement:s,platform:c,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...w}=y(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const x=h(r),k=h(s)===s,O=await(null==c.isRTL?void 0:c.isRTL(a.floating)),T=f||(k||!v?[S(s)]:function(e){const t=S(e);return[_(e),t,_(t)]}(s));f||"none"===m||T.push(...function(e,t,n,o){const r=g(e);let l=function(e,t,n){const o=["left","right"],r=["right","left"],l=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?l:i;default:return[]}}(h(e),"start"===n,o);return r&&(l=l.map((e=>e+"-"+r)),t&&(l=l.concat(l.map(_)))),l}(s,v,m,O));const R=[s,...T],L=await A(t,w),C=[];let D=(null==(o=l.flip)?void 0:o.overflows)||[];if(u&&C.push(L[x]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=g(e),r=E(e),l=b(r);let i="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=S(i)),[i,S(i)]}(r,i,O);C.push(L[e[0]],L[e[1]])}if(D=[...D,{placement:r,overflows:C}],!C.every((e=>e<=0))){var N,j;const e=((null==(N=l.flip)?void 0:N.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(j=D.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:j.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=D.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},L=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,l=await(null==o.isRTL?void 0:o.isRTL(r.floating)),i=h(n),s=g(n),c="y"===x(n),a=["left","top"].includes(i)?-1:1,u=l&&c?-1:1,d=y(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),c?{x:p*u,y:f*a}:{x:f*a,y:p*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},C=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=y(e,t),a={x:n,y:o},u=await A(t,c),d=x(h(r)),f=w(d);let p=a[f],m=a[d];if(l){const e="y"===f?"bottom":"right";p=v(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";m=v(m+u["y"===d?"top":"left"],m,m-u[e])}const g=s.fn({...t,[f]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}};function D(e){return P(e)?(e.nodeName||"").toLowerCase():"#document"}function N(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(P(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function P(e){return e instanceof Node||e instanceof N(e).Node}function I(e){return e instanceof Element||e instanceof N(e).Element}function $(e){return e instanceof HTMLElement||e instanceof N(e).HTMLElement}function B(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof N(e).ShadowRoot)}function F(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function H(e){return["table","td","th"].includes(D(e))}function z(e){const t=W(),n=q(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function W(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function M(e){return["html","body","#document"].includes(D(e))}function q(e){return N(e).getComputedStyle(e)}function V(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function K(e){if("html"===D(e))return e;const t=e.assignedSlot||e.parentNode||B(e)&&e.host||j(e);return B(t)?t.host:t}function X(e){const t=K(e);return M(t)?e.ownerDocument?e.ownerDocument.body:e.body:$(t)&&F(t)?t:X(t)}function G(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=X(e),l=r===(null==(o=e.ownerDocument)?void 0:o.body),i=N(r);return l?t.concat(i,i.visualViewport||[],F(r)?r:[],i.frameElement&&n?G(i.frameElement):[]):t.concat(r,G(r,[],n))}function Y(e){const t=q(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=$(e),l=r?e.offsetWidth:n,i=r?e.offsetHeight:o,s=u(n)!==l||u(o)!==i;return s&&(n=l,o=i),{width:n,height:o,$:s}}function U(e){return I(e)?e:e.contextElement}function Z(e){const t=U(e);if(!$(t))return f(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:l}=Y(t);let i=(l?u(n.width):n.width)/o,s=(l?u(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const J=f(0);function Q(e){const t=N(e);return W()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:J}function ee(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),l=U(e);let i=f(1);t&&(o?I(o)&&(i=Z(o)):i=Z(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==N(e))&&t}(l,n,o)?Q(l):f(0);let c=(r.left+s.x)/i.x,a=(r.top+s.y)/i.y,u=r.width/i.x,d=r.height/i.y;if(l){const e=N(l),t=o&&I(o)?N(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=Z(n),t=n.getBoundingClientRect(),o=q(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,a*=e.y,u*=e.x,d*=e.y,c+=r,a+=l,n=N(n).frameElement}}return O({width:u,height:d,x:c,y:a})}function te(e){return ee(j(e)).left+V(e).scrollLeft}function ne(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=N(e),o=j(e),r=n.visualViewport;let l=o.clientWidth,i=o.clientHeight,s=0,c=0;if(r){l=r.width,i=r.height;const e=W();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,c=r.offsetTop)}return{width:l,height:i,x:s,y:c}}(e,n);else if("document"===t)o=function(e){const t=j(e),n=V(e),o=e.ownerDocument.body,r=a(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=a(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+te(e);const s=-n.scrollTop;return"rtl"===q(o).direction&&(i+=a(t.clientWidth,o.clientWidth)-r),{width:r,height:l,x:i,y:s}}(j(e));else if(I(t))o=function(e,t){const n=ee(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,l=$(e)?Z(e):f(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:r*l.x,y:o*l.y}}(t,n);else{const n=Q(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return O(o)}function oe(e,t){const n=K(e);return!(n===t||!I(n)||M(n))&&("fixed"===q(n).position||oe(n,t))}function re(e,t,n){const o=$(t),r=j(t),l="fixed"===n,i=ee(e,!0,l,t);let s={scrollLeft:0,scrollTop:0};const c=f(0);if(o||!o&&!l)if(("body"!==D(t)||F(r))&&(s=V(t)),o){const e=ee(t,!0,l,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=te(r));return{x:i.left+s.scrollLeft-c.x,y:i.top+s.scrollTop-c.y,width:i.width,height:i.height}}function le(e,t){return $(e)&&"fixed"!==q(e).position?t?t(e):e.offsetParent:null}function ie(e,t){const n=N(e);if(!$(e))return n;let o=le(e,t);for(;o&&H(o)&&"static"===q(o).position;)o=le(o,t);return o&&("html"===D(o)||"body"===D(o)&&"static"===q(o).position&&!z(o))?n:o||function(e){let t=K(e);for(;$(t)&&!M(t);){if(z(t))return t;t=K(t)}return null}(e)||n}const se={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=$(n),l=j(n);if(n===l)return t;let i={scrollLeft:0,scrollTop:0},s=f(1);const c=f(0);if((r||!r&&"fixed"!==o)&&(("body"!==D(n)||F(l))&&(i=V(n)),$(n))){const e=ee(n);s=Z(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-i.scrollLeft*s.x+c.x,y:t.y*s.y-i.scrollTop*s.y+c.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const l=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=G(e,[],!1).filter((e=>I(e)&&"body"!==D(e))),r=null;const l="fixed"===q(e).position;let i=l?K(e):e;for(;I(i)&&!M(i);){const t=q(i),n=z(i);n||"fixed"!==t.position||(r=null),(l?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||F(i)&&!n&&oe(e,i))?o=o.filter((e=>e!==i)):r=t,i=K(i)}return t.set(e,o),o}(t,this._c):[].concat(n),o],i=l[0],s=l.reduce(((e,n)=>{const o=ne(t,n,r);return e.top=a(o.top,e.top),e.right=c(o.right,e.right),e.bottom=c(o.bottom,e.bottom),e.left=a(o.left,e.left),e}),ne(t,i,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ie,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ie,l=this.getDimensions;return{reference:re(t,await r(n),o),floating:{x:0,y:0,...await l(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return Y(e)},getScale:Z,isElement:I,isRTL:function(e){return"rtl"===q(e).direction}};const ce=(e,t,n)=>{const o=new Map,r={platform:se,...n},l={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:l=[],platform:i}=n,s=l.filter(Boolean),c=await(null==i.isRTL?void 0:i.isRTL(t));let a=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=T(a,o,c),f=o,p={},m=0;for(let n=0;n{let o=null;return function(...r){const l=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(l,t)),n||(o&&clearTimeout(o),o=setTimeout(l,t))}},pe={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},me=(0,r.createContext)({getTooltipData:()=>pe});function ve(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(me).getTooltipData(e)}const ye="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,he=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ge=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(he(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},we=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:l="absolute",middlewares:i=[L(Number(r)),R({fallbackAxisSideDirection:"start"}),C({padding:5})],border:s})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=i;return n?(a.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:l,elements:i,middlewareData:s}=e,{element:a,padding:d=0}=y(u,e)||{};if(null==a)return{};const f=k(d),p={x:t,y:n},m=E(o),h=b(m),w=await l.getDimensions(a),x="y"===m,_=x?"top":"left",S=x?"bottom":"right",O=x?"clientHeight":"clientWidth",T=r.reference[h]+r.reference[m]-p[m]-r.floating[h],A=p[m]-r.reference[m],R=await(null==l.getOffsetParent?void 0:l.getOffsetParent(a));let L=R?R[O]:0;L&&await(null==l.isElement?void 0:l.isElement(R))||(L=i.floating[O]||r.floating[h]);const C=T/2-A/2,D=L/2-w[h]/2-1,N=c(f[_],D),j=c(f[S],D),P=N,I=L-w[h]-j,$=L/2-w[h]/2+C,B=v(P,$,I),F=!s.arrow&&null!=g(o)&&$!=B&&r.reference[h]/2-(${var r,l;const i={left:`${e}px`,top:`${t}px`,border:s},{x:c,y:a}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(l={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==l?l:"bottom",d=s&&{borderBottom:s,borderRight:s};let f=0;if(s){const e=`${s}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):ce(e,t,{placement:"bottom",strategy:l,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u};var be={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},xe={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Ee=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:l="dark",anchorId:i,anchorSelect:s,place:u="top",offset:f=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:y,wrapper:h,delayShow:g=0,delayHide:w=0,float:b=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:k=!1,closeOnResize:O=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:L,style:C,position:D,afterShow:N,afterHide:P,content:I,contentWrapperRef:$,isOpen:B,setIsOpen:F,activeAnchor:H,setActiveAnchor:z,border:W,opacity:M,arrowColor:q,role:V="tooltip"})=>{var K;const X=(0,r.useRef)(null),Y=(0,r.useRef)(null),Z=(0,r.useRef)(null),J=(0,r.useRef)(null),Q=(0,r.useRef)(null),[te,ne]=(0,r.useState)(u),[oe,re]=(0,r.useState)({}),[le,ie]=(0,r.useState)({}),[se,ce]=(0,r.useState)(!1),[ue,de]=(0,r.useState)(!1),[pe,me]=(0,r.useState)(null),he=(0,r.useRef)(!1),Ee=(0,r.useRef)(null),{anchorRefs:_e,setActiveAnchor:Se}=ve(t),ke=(0,r.useRef)(!1),[Oe,Te]=(0,r.useState)([]),Ae=(0,r.useRef)(!1),Re=m||p.includes("click"),Le=Re||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ce=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Re&&Object.assign(Ce,{mouseenter:!1,focus:!1,click:!0});const De=A?{...A}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!A&&Re&&Object.assign(De,{mouseleave:!1,blur:!1});const Ne=R?{...R}:{escape:S||!1,scroll:k||!1,resize:O||!1,clickOutsideAnchor:Le||!1};L&&(Object.assign(Ce,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(De,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Ne,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),ye((()=>(Ae.current=!0,()=>{Ae.current=!1})),[]);const je=e=>{Ae.current&&(e&&de(!0),setTimeout((()=>{Ae.current&&(null==F||F(e),void 0===B&&ce(e))}),10))};(0,r.useEffect)((()=>{if(void 0===B)return()=>null;B&&de(!0);const e=setTimeout((()=>{ce(B)}),10);return()=>{clearTimeout(e)}}),[B]),(0,r.useEffect)((()=>{if(se!==he.current)if(Q.current&&clearTimeout(Q.current),he.current=se,se)null==N||N();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();Q.current=setTimeout((()=>{de(!1),me(null),null==P||P()}),e+25)}}),[se]);const Pe=(e=g)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{je(!0)}),e)},Ie=(e=w)=>{J.current&&clearTimeout(J.current),J.current=setTimeout((()=>{ke.current||je(!1)}),e)},$e=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return z(null),void Se({current:null});g?Pe():je(!0),z(n),Se({current:n}),J.current&&clearTimeout(J.current)},Be=()=>{_?Ie(w||100):w?Ie():je(!1),Z.current&&clearTimeout(Z.current)},Fe=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};we({place:null!==(n=null==pe?void 0:pe.place)&&void 0!==n?n:u,offset:f,elementReference:o,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:v,middlewares:y,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ne(e.place)}))},He=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Fe(n),Ee.current=n},ze=e=>{var t;if(!se)return;const n=e.target;(null===(t=X.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...Oe].some((e=>null==e?void 0:e.contains(n)))||(je(!1),Z.current&&clearTimeout(Z.current))},We=fe($e,50,!0),Me=fe(Be,50,!0),qe=(0,r.useCallback)((()=>{var e,t;const n=null!==(e=null==pe?void 0:pe.position)&&void 0!==e?e:D;n?Fe(n):b?Ee.current&&Fe(Ee.current):(null==H?void 0:H.isConnected)&&we({place:null!==(t=null==pe?void 0:pe.place)&&void 0!==t?t:u,offset:f,elementReference:H,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:v,middlewares:y,border:W}).then((e=>{Ae.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ne(e.place))}))}),[se,H,I,C,u,null==pe?void 0:pe.place,f,v,D,null==pe?void 0:pe.position,b]);(0,r.useEffect)((()=>{var e,t;const n=new Set(_e);Oe.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${i}']`);o&&n.add({current:o});const r=()=>{je(!1)},l=ge(H),s=ge(X.current);Ne.scroll&&(window.addEventListener("scroll",r),null==l||l.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r));let u=null;Ne.resize?window.addEventListener("resize",r):H&&X.current&&(u=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,f=U(e),p=r||l?[...f?G(f):[],...G(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));const m=f&&s?function(e,t){let n,o=null;const r=j(e);function l(){clearTimeout(n),o&&o.disconnect(),o=null}return function i(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),l();const{left:f,top:p,width:m,height:v}=e.getBoundingClientRect();if(s||t(),!m||!v)return;const y={rootMargin:-d(p)+"px "+-d(r.clientWidth-(f+m))+"px "+-d(r.clientHeight-(p+v))+"px "+-d(f)+"px",threshold:a(0,c(1,u))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==u){if(!h)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}h=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),l}(f,n):null;let v,y=-1,h=null;i&&(h=new ResizeObserver((e=>{let[o]=e;o&&o.target===f&&h&&(h.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{h&&h.observe(t)}))),n()})),f&&!u&&h.observe(f),h.observe(t));let g=u?ee(e):null;return u&&function t(){const o=ee(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,v=requestAnimationFrame(t)}(),n(),()=>{p.forEach((e=>{r&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),m&&m(),h&&h.disconnect(),h=null,u&&cancelAnimationFrame(v)}}(H,X.current,qe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&je(!1)};Ne.escape&&window.addEventListener("keydown",f),Ne.clickOutsideAnchor&&window.addEventListener("click",ze);const p=[],m=e=>{se&&(null==e?void 0:e.target)===H||$e(e)},v=e=>{se&&(null==e?void 0:e.target)===H&&Be()},y=["mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(Ce).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:We}):h.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(De).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:Me}):h.includes(e)&&p.push({event:e,listener:v}))})),b&&p.push({event:"mousemove",listener:He});const g=()=>{ke.current=!0},w=()=>{ke.current=!1,Be()};return _&&!Le&&(null===(e=X.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=X.current)||void 0===t||t.addEventListener("mouseleave",w)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Ne.scroll&&(window.removeEventListener("scroll",r),null==l||l.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r)),Ne.resize?window.removeEventListener("resize",r):null==u||u(),Ne.clickOutsideAnchor&&window.removeEventListener("click",ze),Ne.escape&&window.removeEventListener("keydown",f),_&&!Le&&(null===(e=X.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=X.current)||void 0===t||t.removeEventListener("mouseleave",w)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[H,qe,ue,_e,Oe,T,A,R,Re]),(0,r.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:s)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===t&&n.push(e.target),"childList"===e.type){if(H){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,H))&&(de(!1),je(!1),z(null),Z.current&&clearTimeout(Z.current),J.current&&clearTimeout(J.current),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[t,s,null==pe?void 0:pe.anchorSelect,H]),(0,r.useEffect)((()=>{qe()}),[qe]),(0,r.useEffect)((()=>{if(!(null==$?void 0:$.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>qe()))}));return e.observe($.current),()=>{e.disconnect()}}),[I,null==$?void 0:$.current]),(0,r.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...Oe,t];H&&n.includes(H)||z(null!==(e=Oe[0])&&void 0!==e?e:t)}),[i,Oe,H]),(0,r.useEffect)((()=>()=>{Z.current&&clearTimeout(Z.current),J.current&&clearTimeout(J.current)}),[]),(0,r.useEffect)((()=>{var e;let n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:s;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));Te(e)}catch(e){Te([])}}),[t,s,null==pe?void 0:pe.anchorSelect]);const Ve=null!==(K=null==pe?void 0:pe.content)&&void 0!==K?K:I,Ke=se&&Object.keys(oe).length>0;return(0,r.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}me(null!=e?e:null),(null==e?void 0:e.delay)?Pe(e.delay):je(!0)},close:e=>{(null==e?void 0:e.delay)?Ie(e.delay):je(!1)},activeAnchor:H,place:te,isOpen:Boolean(ue&&!x&&Ve&&Ke)}))),ue&&!x&&Ve?r.createElement(h,{id:t,role:V,className:ae("react-tooltip",be.tooltip,xe.tooltip,xe[l],n,`react-tooltip__place-${te}`,be[Ke?"show":"closing"],Ke?"react-tooltip__show":"react-tooltip__closing","fixed"===v&&be.fixed,_&&be.clickable),onTransitionEnd:e=>{Q.current&&clearTimeout(Q.current),se||"opacity"!==e.propertyName||(de(!1),me(null),null==P||P())},style:{...C,...oe,opacity:void 0!==M&&Ke?M:void 0},ref:X},Ve,r.createElement(h,{className:ae("react-tooltip-arrow",be.arrow,xe.arrow,o,E&&be.noArrow),style:{...le,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Y})):null},_e=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Se=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ke=r.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:l,render:i,className:s,classNameArrow:c,variant:a="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:v=!1,positionStrategy:y="absolute",middlewares:h,delayShow:g=0,delayHide:w=0,float:b=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:k=!1,closeOnResize:O=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:L=!1,style:C,position:D,isOpen:N,disableStyleInjection:j=!1,border:P,opacity:I,arrowColor:$,setIsOpen:B,afterShow:F,afterHide:H,role:z="tooltip"},W)=>{const[M,q]=(0,r.useState)(o),[V,K]=(0,r.useState)(l),[X,G]=(0,r.useState)(u),[Y,U]=(0,r.useState)(a),[Z,J]=(0,r.useState)(d),[Q,ee]=(0,r.useState)(g),[te,ne]=(0,r.useState)(w),[oe,re]=(0,r.useState)(b),[le,ie]=(0,r.useState)(x),[se,ce]=(0,r.useState)(f),[ue,de]=(0,r.useState)(m),[fe,pe]=(0,r.useState)(y),[me,ye]=(0,r.useState)(null),[he,ge]=(0,r.useState)(null),we=(0,r.useRef)(j),{anchorRefs:be,activeAnchor:xe}=ve(e),ke=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Oe=e=>{const t={place:e=>{var t;G(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:o)},html:e=>{K(null!=e?e:l)},variant:e=>{var t;U(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:m)},"position-strategy":e=>{var t;pe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?w:Number(e))},float:e=>{re(null===e?b:"true"===e)},hidden:e=>{ie(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,r.useEffect)((()=>{q(o)}),[o]),(0,r.useEffect)((()=>{K(l)}),[l]),(0,r.useEffect)((()=>{G(u)}),[u]),(0,r.useEffect)((()=>{U(a)}),[a]),(0,r.useEffect)((()=>{J(d)}),[d]),(0,r.useEffect)((()=>{ee(g)}),[g]),(0,r.useEffect)((()=>{ne(w)}),[w]),(0,r.useEffect)((()=>{re(b)}),[b]),(0,r.useEffect)((()=>{ie(x)}),[x]),(0,r.useEffect)((()=>{pe(y)}),[y]),(0,r.useEffect)((()=>{we.current!==j&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[j]),(0,r.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===j,disableBase:j}}))}),[]),(0,r.useEffect)((()=>{var o;const r=new Set(be);let l=n;if(!l&&e&&(l=`[data-tooltip-id='${e}']`),l)try{document.querySelectorAll(l).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`)}const i=document.querySelector(`[id='${t}']`);if(i&&r.add({current:i}),!r.size)return()=>null;const s=null!==(o=null!=he?he:i)&&void 0!==o?o:xe.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=ke(s);Oe(n)}))})),a={attributes:!0,childList:!1,subtree:!1};if(s){const e=ke(s);Oe(e),c.observe(s,a)}return()=>{c.disconnect()}}),[be,xe,he,t,n]),(0,r.useEffect)((()=>{(null==C?void 0:C.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),P&&!Se("border",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`border\`.`),(null==C?void 0:C.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!Se("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let Te=p;const Ae=(0,r.useRef)(null);if(i){const e=i({content:null!=M?M:null,activeAnchor:he});Te=e?r.createElement("div",{ref:Ae,className:"react-tooltip-content-wrapper"},e):null}else M&&(Te=M);V&&(Te=r.createElement(_e,{content:V}));const Re={forwardRef:W,id:e,anchorId:t,anchorSelect:n,className:ae(s,me),classNameArrow:c,content:Te,contentWrapperRef:Ae,place:X,variant:Y,offset:Z,wrapper:se,events:ue,openOnClick:v,positionStrategy:fe,middlewares:h,delayShow:Q,delayHide:te,float:oe,hidden:le,noArrow:E,clickable:_,closeOnEsc:S,closeOnScroll:k,closeOnResize:O,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:L,style:C,position:D,isOpen:N,border:P,opacity:I,arrowColor:$,setIsOpen:B,afterShow:F,afterHide:H,activeAnchor:he,setActiveAnchor:e=>ge(e),role:z};return r.createElement(Ee,{...Re})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||de({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||de({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Oe=window.wp.i18n,Te=window.wp.element,Ae=(e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}};function Re(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const Le=({onlineEventLinkDefault:e=""})=>{const t=(0,Oe.__)("Online event","gatherpress"),[n,o]=(0,Te.useState)(e);return Ae({setOnlineEventLink:o},Re("eventDetails.postId")),(0,r.createElement)(i.Flex,{justify:"normal",gap:"3"},(0,r.createElement)(i.FlexItem,{display:"flex"},(0,r.createElement)(i.Icon,{icon:"video-alt2"})),(0,r.createElement)(i.FlexItem,null,!n&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-online-event-tooltip","data-tooltip-content":(0,Oe.__)("Link active for attendees during event.","gatherpress")},t),(0,r.createElement)(ke,{id:"gp-online-event-tooltip"})),n&&(0,r.createElement)("a",{href:n,rel:"noreferrer",target:"_blank"},t)))},Ce=()=>{const{editPost:e,unlockPostSaving:t}=(0,s.useDispatch)("core/editor"),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link)),[o,l]=(0,Te.useState)(n);return Ae({setOnlineEventLink:l},Re("eventDetails.postId")),(0,r.createElement)(i.TextControl,{label:(0,Oe.__)("Online event link","gatherpress"),value:o,placeholder:(0,Oe.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{_online_event_link:n}}),l(n),((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setOnlineEventLink:n},Re("eventDetails.postId")),t()})(n)}})},De=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},Ne=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/online-event","version":"1.0.0","title":"Online Event","category":"gatherpress","icon":"video-alt2","example":{},"description":"Utilized for virtual events, offering the capability to share a direct link to an event.","attributes":{"blockId":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./online-event.js","render":"file:./render.php"}');(0,o.registerBlockType)(Ne,{edit:({isSelected:e})=>{const t=(0,l.useBlockProps)(),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(i.PanelBody,null,(0,r.createElement)(i.PanelRow,null,(0,r.createElement)(Ce,null)))),(0,r.createElement)("div",{...t},(0,r.createElement)(De,{isSelected:e},(0,r.createElement)(Le,{onlineEventLinkDefault:n}))))},save:()=>null})},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=l)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(s=!1,l0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[n,r,l]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={143:0,139:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,l,[i,s,c]=n,a=0;if(i.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(c)var u=c(o)}for(t&&t(n);ao(3850)));r=o.O(r)})(); \ No newline at end of file diff --git a/build/blocks/online-event/online-event.asset.php b/build/blocks/online-event/online-event.asset.php index 8cb08722e..f2441fbb7 100644 --- a/build/blocks/online-event/online-event.asset.php +++ b/build/blocks/online-event/online-event.asset.php @@ -1 +1 @@ - array('react', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '30855694722e6ec8899b'); + array('react', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'fc0087c5b56d9367eea5'); diff --git a/build/blocks/online-event/online-event.js b/build/blocks/online-event/online-event.js index 5f6e3b014..2f5729830 100644 --- a/build/blocks/online-event/online-event.js +++ b/build/blocks/online-event/online-event.js @@ -1 +1 @@ -(()=>{var e={3967:(e,t)=>{var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React,t=window.wp.domReady;var n=o.n(t);const r=window.wp.element,l=Math.min,i=Math.max,c=Math.round,s=Math.floor,a=e=>({x:e,y:e}),u={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function f(e,t,o){return i(e,l(t,o))}function p(e,t){return"function"==typeof e?e(t):e}function m(e){return e.split("-")[0]}function v(e){return e.split("-")[1]}function y(e){return"x"===e?"y":"x"}function h(e){return"y"===e?"height":"width"}function w(e){return["top","bottom"].includes(m(e))?"y":"x"}function g(e){return y(w(e))}function b(e){return e.replace(/start|end/g,(e=>d[e]))}function x(e){return e.replace(/left|right|bottom|top/g,(e=>u[e]))}function E(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function _(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function S(e,t,o){let{reference:n,floating:r}=e;const l=w(t),i=g(t),c=h(i),s=m(t),a="y"===l,u=n.x+n.width/2-r.width/2,d=n.y+n.height/2-r.height/2,f=n[c]/2-r[c]/2;let p;switch(s){case"top":p={x:u,y:n.y-r.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-r.width,y:d};break;default:p={x:n.x,y:n.y}}switch(v(t)){case"start":p[i]-=f*(o&&a?-1:1);break;case"end":p[i]+=f*(o&&a?-1:1)}return p}async function A(e,t){var o;void 0===t&&(t={});const{x:n,y:r,platform:l,rects:i,elements:c,strategy:s}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=p(t,e),v=E(m),y=c[f?"floating"===d?"reference":"floating":d],h=_(await l.getClippingRect({element:null==(o=await(null==l.isElement?void 0:l.isElement(y)))||o?y:y.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:s})),w="floating"===d?{...i.floating,x:n,y:r}:i.reference,g=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c.floating)),b=await(null==l.isElement?void 0:l.isElement(g))&&await(null==l.getScale?void 0:l.getScale(g))||{x:1,y:1},x=_(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:g,strategy:s}):w);return{top:(h.top-x.top+v.top)/b.y,bottom:(x.bottom-h.bottom+v.bottom)/b.y,left:(h.left-x.left+v.left)/b.x,right:(x.right-h.right+v.right)/b.x}}const R=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,middlewareData:l,rects:i,initialPlacement:c,platform:s,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:E=!0,..._}=p(e,t);if(null!=(o=l.arrow)&&o.alignmentOffset)return{};const S=m(r),R=m(c)===c,T=await(null==s.isRTL?void 0:s.isRTL(a.floating)),k=f||(R||!E?[x(c)]:function(e){const t=x(e);return[b(e),t,b(t)]}(c));f||"none"===w||k.push(...function(e,t,o,n){const r=v(e);let l=function(e,t,o){const n=["left","right"],r=["right","left"],l=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return o?t?r:n:t?n:r;case"left":case"right":return t?l:i;default:return[]}}(m(e),"start"===o,n);return r&&(l=l.map((e=>e+"-"+r)),t&&(l=l.concat(l.map(b)))),l}(c,E,w,T));const O=[c,...k],L=await A(t,_),C=[];let N=(null==(n=l.flip)?void 0:n.overflows)||[];if(u&&C.push(L[S]),d){const e=function(e,t,o){void 0===o&&(o=!1);const n=v(e),r=g(e),l=h(r);let i="x"===r?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=x(i)),[i,x(i)]}(r,i,T);C.push(L[e[0]],L[e[1]])}if(N=[...N,{placement:r,overflows:C}],!C.every((e=>e<=0))){var D,j;const e=((null==(D=l.flip)?void 0:D.index)||0)+1,t=O[e];if(t)return{data:{index:e,overflows:N},reset:{placement:t}};let o=null==(j=N.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:j.placement;if(!o)switch(y){case"bestFit":{var $;const e=null==($=N.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:$[0];e&&(o=e);break}case"initialPlacement":o=c}if(r!==o)return{reset:{placement:o}}}return{}}}},T=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:o,y:n}=t,r=await async function(e,t){const{placement:o,platform:n,elements:r}=e,l=await(null==n.isRTL?void 0:n.isRTL(r.floating)),i=m(o),c=v(o),s="y"===w(o),a=["left","top"].includes(i)?-1:1,u=l&&s?-1:1,d=p(t,e);let{mainAxis:f,crossAxis:y,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return c&&"number"==typeof h&&(y="end"===c?-1*h:h),s?{x:y*u,y:f*a}:{x:f*a,y:y*u}}(t,e);return{x:o+r.x,y:n+r.y,data:r}}}},k=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:c={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...s}=p(e,t),a={x:o,y:n},u=await A(t,s),d=w(m(r)),v=y(d);let h=a[v],g=a[d];if(l){const e="y"===v?"bottom":"right";h=f(h+u["y"===v?"top":"left"],h,h-u[e])}if(i){const e="y"===d?"bottom":"right";g=f(g+u["y"===d?"top":"left"],g,g-u[e])}const b=c.fn({...t,[v]:h,[d]:g});return{...b,data:{x:b.x-o,y:b.y-n}}}}};function O(e){return N(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function C(e){var t;return null==(t=(N(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function N(e){return e instanceof Node||e instanceof L(e).Node}function D(e){return e instanceof Element||e instanceof L(e).Element}function j(e){return e instanceof HTMLElement||e instanceof L(e).HTMLElement}function $(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof L(e).ShadowRoot)}function P(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(r)}function B(e){return["table","td","th"].includes(O(e))}function I(e){const t=F(),o=W(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function F(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function H(e){return["html","body","#document"].includes(O(e))}function W(e){return L(e).getComputedStyle(e)}function z(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function M(e){if("html"===O(e))return e;const t=e.assignedSlot||e.parentNode||$(e)&&e.host||C(e);return $(t)?t.host:t}function q(e){const t=M(e);return H(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&P(t)?t:q(t)}function V(e,t,o){var n;void 0===t&&(t=[]),void 0===o&&(o=!0);const r=q(e),l=r===(null==(n=e.ownerDocument)?void 0:n.body),i=L(r);return l?t.concat(i,i.visualViewport||[],P(r)?r:[],i.frameElement&&o?V(i.frameElement):[]):t.concat(r,V(r,[],o))}function K(e){const t=W(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=j(e),l=r?e.offsetWidth:o,i=r?e.offsetHeight:n,s=c(o)!==l||c(n)!==i;return s&&(o=l,n=i),{width:o,height:n,$:s}}function X(e){return D(e)?e:e.contextElement}function G(e){const t=X(e);if(!j(t))return a(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:l}=K(t);let i=(l?c(o.width):o.width)/n,s=(l?c(o.height):o.height)/r;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const Y=a(0);function Z(e){const t=L(e);return F()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Y}function J(e,t,o,n){void 0===t&&(t=!1),void 0===o&&(o=!1);const r=e.getBoundingClientRect(),l=X(e);let i=a(1);t&&(n?D(n)&&(i=G(n)):i=G(e));const c=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==L(e))&&t}(l,o,n)?Z(l):a(0);let s=(r.left+c.x)/i.x,u=(r.top+c.y)/i.y,d=r.width/i.x,f=r.height/i.y;if(l){const e=L(l),t=n&&D(n)?L(n):n;let o=e.frameElement;for(;o&&n&&t!==e;){const e=G(o),t=o.getBoundingClientRect(),n=W(o),r=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,u*=e.y,d*=e.x,f*=e.y,s+=r,u+=l,o=L(o).frameElement}}return _({width:d,height:f,x:s,y:u})}function U(e){return J(C(e)).left+z(e).scrollLeft}function Q(e,t,o){let n;if("viewport"===t)n=function(e,t){const o=L(e),n=C(e),r=o.visualViewport;let l=n.clientWidth,i=n.clientHeight,c=0,s=0;if(r){l=r.width,i=r.height;const e=F();(!e||e&&"fixed"===t)&&(c=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:c,y:s}}(e,o);else if("document"===t)n=function(e){const t=C(e),o=z(e),n=e.ownerDocument.body,r=i(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),l=i(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let c=-o.scrollLeft+U(e);const s=-o.scrollTop;return"rtl"===W(n).direction&&(c+=i(t.clientWidth,n.clientWidth)-r),{width:r,height:l,x:c,y:s}}(C(e));else if(D(t))n=function(e,t){const o=J(e,!0,"fixed"===t),n=o.top+e.clientTop,r=o.left+e.clientLeft,l=j(e)?G(e):a(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:r*l.x,y:n*l.y}}(t,o);else{const o=Z(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return _(n)}function ee(e,t){const o=M(e);return!(o===t||!D(o)||H(o))&&("fixed"===W(o).position||ee(o,t))}function te(e,t,o){const n=j(t),r=C(t),l="fixed"===o,i=J(e,!0,l,t);let c={scrollLeft:0,scrollTop:0};const s=a(0);if(n||!n&&!l)if(("body"!==O(t)||P(r))&&(c=z(t)),n){const e=J(t,!0,l,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=U(r));return{x:i.left+c.scrollLeft-s.x,y:i.top+c.scrollTop-s.y,width:i.width,height:i.height}}function oe(e,t){return j(e)&&"fixed"!==W(e).position?t?t(e):e.offsetParent:null}function ne(e,t){const o=L(e);if(!j(e))return o;let n=oe(e,t);for(;n&&B(n)&&"static"===W(n).position;)n=oe(n,t);return n&&("html"===O(n)||"body"===O(n)&&"static"===W(n).position&&!I(n))?o:n||function(e){let t=M(e);for(;j(t)&&!H(t);){if(I(t))return t;t=M(t)}return null}(e)||o}const re={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:o,strategy:n}=e;const r=j(o),l=C(o);if(o===l)return t;let i={scrollLeft:0,scrollTop:0},c=a(1);const s=a(0);if((r||!r&&"fixed"!==n)&&(("body"!==O(o)||P(l))&&(i=z(o)),j(o))){const e=J(o);c=G(o),s.x=e.x+o.clientLeft,s.y=e.y+o.clientTop}return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-i.scrollLeft*c.x+s.x,y:t.y*c.y-i.scrollTop*c.y+s.y}},getDocumentElement:C,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const c=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let n=V(e,[],!1).filter((e=>D(e)&&"body"!==O(e))),r=null;const l="fixed"===W(e).position;let i=l?M(e):e;for(;D(i)&&!H(i);){const t=W(i),o=I(i);o||"fixed"!==t.position||(r=null),(l?!o&&!r:!o&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||P(i)&&!o&&ee(e,i))?n=n.filter((e=>e!==i)):r=t,i=M(i)}return t.set(e,n),n}(t,this._c):[].concat(o),n],s=c[0],a=c.reduce(((e,o)=>{const n=Q(t,o,r);return e.top=i(n.top,e.top),e.right=l(n.right,e.right),e.bottom=l(n.bottom,e.bottom),e.left=i(n.left,e.left),e}),Q(t,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ne,getElementRects:async function(e){let{reference:t,floating:o,strategy:n}=e;const r=this.getOffsetParent||ne,l=this.getDimensions;return{reference:te(t,await r(o),n),floating:{x:0,y:0,...await l(o)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return K(e)},getScale:G,isElement:D,isRTL:function(e){return"rtl"===W(e).direction}};const le=(e,t,o)=>{const n=new Map,r={platform:re,...o},l={...r.platform,_c:n};return(async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:l=[],platform:i}=o,c=l.filter(Boolean),s=await(null==i.isRTL?void 0:i.isRTL(t));let a=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=S(a,n,s),f=n,p={},m=0;for(let o=0;o{let n=null;return function(...r){const l=()=>{n=null,o||e.apply(this,r)};o&&!n&&(e.apply(this,r),n=setTimeout(l,t)),o||(n&&clearTimeout(n),n=setTimeout(l,t))}},ue={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},de=(0,e.createContext)({getTooltipData:()=>ue});function fe(t="DEFAULT_TOOLTIP_ID"){return(0,e.useContext)(de).getTooltipData(t)}const pe="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,me=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const o=t.getPropertyValue(e);return"auto"===o||"scroll"===o}))},ve=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(me(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},ye=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:o=null,place:n="top",offset:r=10,strategy:i="absolute",middlewares:c=[T(Number(r)),R({fallbackAxisSideDirection:"start"}),k({padding:5})],border:s})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:n};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:n};const a=c;return o?(a.push({name:"arrow",options:u={element:o,padding:5},async fn(e){const{x:t,y:o,placement:n,rects:r,platform:i,elements:c,middlewareData:s}=e,{element:a,padding:d=0}=p(u,e)||{};if(null==a)return{};const m=E(d),y={x:t,y:o},w=g(n),b=h(w),x=await i.getDimensions(a),_="y"===w,S=_?"top":"left",A=_?"bottom":"right",R=_?"clientHeight":"clientWidth",T=r.reference[b]+r.reference[w]-y[w]-r.floating[b],k=y[w]-r.reference[w],O=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let L=O?O[R]:0;L&&await(null==i.isElement?void 0:i.isElement(O))||(L=c.floating[R]||r.floating[b]);const C=T/2-k/2,N=L/2-x[b]/2-1,D=l(m[S],N),j=l(m[A],N),$=D,P=L-x[b]-j,B=L/2-x[b]/2+C,I=f($,B,P),F=!s.arrow&&null!=v(n)&&B!=I&&r.reference[b]/2-(B<$?D:j)-x[b]/2<0,H=F?B<$?B-$:B-P:0;return{[w]:y[w]+H,data:{[w]:I,centerOffset:B-I-H,...F&&{alignmentOffset:H}},reset:F}}}),le(e,t,{placement:n,strategy:i,middleware:a}).then((({x:e,y:t,placement:o,middlewareData:n})=>{var r,l;const i={left:`${e}px`,top:`${t}px`,border:s},{x:c,y:a}=null!==(r=n.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(l={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==l?l:"bottom",d=s&&{borderBottom:s,borderRight:s};let f=0;if(s){const e=`${s}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:o}}))):le(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})));var u};var he={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},we={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const ge=({forwardRef:t,id:o,className:n,classNameArrow:r,variant:c="dark",anchorId:a,anchorSelect:u,place:d="top",offset:f=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:y,wrapper:h,delayShow:w=0,delayHide:g=0,float:b=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:A=!1,closeOnResize:R=!1,openEvents:T,closeEvents:k,globalCloseEvents:O,imperativeModeOnly:L,style:N,position:D,afterShow:j,afterHide:$,content:P,contentWrapperRef:B,isOpen:I,setIsOpen:F,activeAnchor:H,setActiveAnchor:W,border:z,opacity:M,arrowColor:q,role:K="tooltip"})=>{var G;const Y=(0,e.useRef)(null),Z=(0,e.useRef)(null),U=(0,e.useRef)(null),Q=(0,e.useRef)(null),ee=(0,e.useRef)(null),[te,oe]=(0,e.useState)(d),[ne,re]=(0,e.useState)({}),[le,ce]=(0,e.useState)({}),[se,ue]=(0,e.useState)(!1),[de,me]=(0,e.useState)(!1),[ge,be]=(0,e.useState)(null),xe=(0,e.useRef)(!1),Ee=(0,e.useRef)(null),{anchorRefs:_e,setActiveAnchor:Se}=fe(o),Ae=(0,e.useRef)(!1),[Re,Te]=(0,e.useState)([]),ke=(0,e.useRef)(!1),Oe=m||p.includes("click"),Le=Oe||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ce=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Oe&&Object.assign(Ce,{mouseenter:!1,focus:!1,click:!0});const Ne=k?{...k}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!k&&Oe&&Object.assign(Ne,{mouseleave:!1,blur:!1});const De=O?{...O}:{escape:S||!1,scroll:A||!1,resize:R||!1,clickOutsideAnchor:Le||!1};L&&(Object.assign(Ce,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ne,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(De,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),pe((()=>(ke.current=!0,()=>{ke.current=!1})),[]);const je=e=>{ke.current&&(e&&me(!0),setTimeout((()=>{ke.current&&(null==F||F(e),void 0===I&&ue(e))}),10))};(0,e.useEffect)((()=>{if(void 0===I)return()=>null;I&&me(!0);const e=setTimeout((()=>{ue(I)}),10);return()=>{clearTimeout(e)}}),[I]),(0,e.useEffect)((()=>{if(se!==xe.current)if(ee.current&&clearTimeout(ee.current),xe.current=se,se)null==j||j();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,o,n]=t;return"s"!==n&&"ms"!==n?0:Number(o)*("ms"===n?1:1e3)})();ee.current=setTimeout((()=>{me(!1),be(null),null==$||$()}),e+25)}}),[se]);const $e=(e=w)=>{U.current&&clearTimeout(U.current),U.current=setTimeout((()=>{je(!0)}),e)},Pe=(e=g)=>{Q.current&&clearTimeout(Q.current),Q.current=setTimeout((()=>{Ae.current||je(!1)}),e)},Be=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==o?void 0:o.isConnected))return W(null),void Se({current:null});w?$e():je(!0),W(o),Se({current:o}),Q.current&&clearTimeout(Q.current)},Ie=()=>{_?Pe(g||100):g?Pe():je(!1),U.current&&clearTimeout(U.current)},Fe=({x:e,y:t})=>{var o;const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};ye({place:null!==(o=null==ge?void 0:ge.place)&&void 0!==o?o:d,offset:f,elementReference:n,tooltipReference:Y.current,tooltipArrowReference:Z.current,strategy:v,middlewares:y,border:z}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ce(e.tooltipArrowStyles),oe(e.place)}))},He=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};Fe(o),Ee.current=o},We=e=>{var t;if(!se)return;const o=e.target;(null===(t=Y.current)||void 0===t?void 0:t.contains(o))||[document.querySelector(`[id='${a}']`),...Re].some((e=>null==e?void 0:e.contains(o)))||(je(!1),U.current&&clearTimeout(U.current))},ze=ae(Be,50,!0),Me=ae(Ie,50,!0),qe=(0,e.useCallback)((()=>{var e,t;const o=null!==(e=null==ge?void 0:ge.position)&&void 0!==e?e:D;o?Fe(o):b?Ee.current&&Fe(Ee.current):(null==H?void 0:H.isConnected)&&ye({place:null!==(t=null==ge?void 0:ge.place)&&void 0!==t?t:d,offset:f,elementReference:H,tooltipReference:Y.current,tooltipArrowReference:Z.current,strategy:v,middlewares:y,border:z}).then((e=>{ke.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ce(e.tooltipArrowStyles),oe(e.place))}))}),[se,H,P,N,d,null==ge?void 0:ge.place,f,v,D,null==ge?void 0:ge.position,b]);(0,e.useEffect)((()=>{var e,t;const o=new Set(_e);Re.forEach((e=>{o.add({current:e})}));const n=document.querySelector(`[id='${a}']`);n&&o.add({current:n});const r=()=>{je(!1)},c=ve(H),u=ve(Y.current);De.scroll&&(window.addEventListener("scroll",r),null==c||c.addEventListener("scroll",r),null==u||u.addEventListener("scroll",r));let d=null;De.resize?window.addEventListener("resize",r):H&&Y.current&&(d=function(e,t,o,n){void 0===n&&(n={});const{ancestorScroll:r=!0,ancestorResize:c=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:d=!1}=n,f=X(e),p=r||c?[...f?V(f):[],...V(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",o,{passive:!0}),c&&e.addEventListener("resize",o)}));const m=f&&u?function(e,t){let o,n=null;const r=C(e);function c(){clearTimeout(o),n&&n.disconnect(),n=null}return function a(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),c();const{left:f,top:p,width:m,height:v}=e.getBoundingClientRect();if(u||t(),!m||!v)return;const y={rootMargin:-s(p)+"px "+-s(r.clientWidth-(f+m))+"px "+-s(r.clientHeight-(p+v))+"px "+-s(f)+"px",threshold:i(0,l(1,d))||1};let h=!0;function w(e){const t=e[0].intersectionRatio;if(t!==d){if(!h)return a();t?a(!1,t):o=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{n=new IntersectionObserver(w,{...y,root:r.ownerDocument})}catch(e){n=new IntersectionObserver(w,y)}n.observe(e)}(!0),c}(f,o):null;let v,y=-1,h=null;a&&(h=new ResizeObserver((e=>{let[n]=e;n&&n.target===f&&h&&(h.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{h&&h.observe(t)}))),o()})),f&&!d&&h.observe(f),h.observe(t));let w=d?J(e):null;return d&&function t(){const n=J(e);!w||n.x===w.x&&n.y===w.y&&n.width===w.width&&n.height===w.height||o(),w=n,v=requestAnimationFrame(t)}(),o(),()=>{p.forEach((e=>{r&&e.removeEventListener("scroll",o),c&&e.removeEventListener("resize",o)})),m&&m(),h&&h.disconnect(),h=null,d&&cancelAnimationFrame(v)}}(H,Y.current,qe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&je(!1)};De.escape&&window.addEventListener("keydown",f),De.clickOutsideAnchor&&window.addEventListener("click",We);const p=[],m=e=>{se&&(null==e?void 0:e.target)===H||Be(e)},v=e=>{se&&(null==e?void 0:e.target)===H&&Ie()},y=["mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(Ce).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:ze}):h.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:Me}):h.includes(e)&&p.push({event:e,listener:v}))})),b&&p.push({event:"mousemove",listener:He});const w=()=>{Ae.current=!0},g=()=>{Ae.current=!1,Ie()};return _&&!Le&&(null===(e=Y.current)||void 0===e||e.addEventListener("mouseenter",w),null===(t=Y.current)||void 0===t||t.addEventListener("mouseleave",g)),p.forEach((({event:e,listener:t})=>{o.forEach((o=>{var n;null===(n=o.current)||void 0===n||n.addEventListener(e,t)}))})),()=>{var e,t;De.scroll&&(window.removeEventListener("scroll",r),null==c||c.removeEventListener("scroll",r),null==u||u.removeEventListener("scroll",r)),De.resize?window.removeEventListener("resize",r):null==d||d(),De.clickOutsideAnchor&&window.removeEventListener("click",We),De.escape&&window.removeEventListener("keydown",f),_&&!Le&&(null===(e=Y.current)||void 0===e||e.removeEventListener("mouseenter",w),null===(t=Y.current)||void 0===t||t.removeEventListener("mouseleave",g)),p.forEach((({event:e,listener:t})=>{o.forEach((o=>{var n;null===(n=o.current)||void 0===n||n.removeEventListener(e,t)}))}))}}),[H,qe,de,_e,Re,T,k,O,Oe]),(0,e.useEffect)((()=>{var e,t;let n=null!==(t=null!==(e=null==ge?void 0:ge.anchorSelect)&&void 0!==e?e:u)&&void 0!==t?t:"";!n&&o&&(n=`[data-tooltip-id='${o}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===o&&t.push(e.target),"childList"===e.type){if(H){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(n)try{r.push(...t.filter((e=>e.matches(n)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(n)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,H))&&(me(!1),je(!1),W(null),U.current&&clearTimeout(U.current),Q.current&&clearTimeout(Q.current),!0)}))}if(n)try{const o=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...o.filter((e=>e.matches(n)))),t.push(...o.flatMap((e=>[...e.querySelectorAll(n)])))}catch(e){}}})),(t.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...t]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[o,u,null==ge?void 0:ge.anchorSelect,H]),(0,e.useEffect)((()=>{qe()}),[qe]),(0,e.useEffect)((()=>{if(!(null==B?void 0:B.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>qe()))}));return e.observe(B.current),()=>{e.disconnect()}}),[P,null==B?void 0:B.current]),(0,e.useEffect)((()=>{var e;const t=document.querySelector(`[id='${a}']`),o=[...Re,t];H&&o.includes(H)||W(null!==(e=Re[0])&&void 0!==e?e:t)}),[a,Re,H]),(0,e.useEffect)((()=>()=>{U.current&&clearTimeout(U.current),Q.current&&clearTimeout(Q.current)}),[]),(0,e.useEffect)((()=>{var e;let t=null!==(e=null==ge?void 0:ge.anchorSelect)&&void 0!==e?e:u;if(!t&&o&&(t=`[data-tooltip-id='${o}']`),t)try{const e=Array.from(document.querySelectorAll(t));Te(e)}catch(e){Te([])}}),[o,u,null==ge?void 0:ge.anchorSelect]);const Ve=null!==(G=null==ge?void 0:ge.content)&&void 0!==G?G:P,Ke=se&&Object.keys(ne).length>0;return(0,e.useImperativeHandle)(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}be(null!=e?e:null),(null==e?void 0:e.delay)?$e(e.delay):je(!0)},close:e=>{(null==e?void 0:e.delay)?Pe(e.delay):je(!1)},activeAnchor:H,place:te,isOpen:Boolean(de&&!x&&Ve&&Ke)}))),de&&!x&&Ve?e.createElement(h,{id:o,role:K,className:ie("react-tooltip",he.tooltip,we.tooltip,we[c],n,`react-tooltip__place-${te}`,he[Ke?"show":"closing"],Ke?"react-tooltip__show":"react-tooltip__closing","fixed"===v&&he.fixed,_&&he.clickable),onTransitionEnd:e=>{ee.current&&clearTimeout(ee.current),se||"opacity"!==e.propertyName||(me(!1),be(null),null==$||$())},style:{...N,...ne,opacity:void 0!==M&&Ke?M:void 0},ref:Y},Ve,e.createElement(h,{className:ie("react-tooltip-arrow",he.arrow,we.arrow,r,E&&he.noArrow),style:{...le,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Z})):null},be=({content:t})=>e.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),xe=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Ee=e.forwardRef((({id:t,anchorId:o,anchorSelect:n,content:r,html:l,render:i,className:c,classNameArrow:s,variant:a="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:v=!1,positionStrategy:y="absolute",middlewares:h,delayShow:w=0,delayHide:g=0,float:b=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:A=!1,closeOnResize:R=!1,openEvents:T,closeEvents:k,globalCloseEvents:O,imperativeModeOnly:L=!1,style:C,position:N,isOpen:D,disableStyleInjection:j=!1,border:$,opacity:P,arrowColor:B,setIsOpen:I,afterShow:F,afterHide:H,role:W="tooltip"},z)=>{const[M,q]=(0,e.useState)(r),[V,K]=(0,e.useState)(l),[X,G]=(0,e.useState)(u),[Y,Z]=(0,e.useState)(a),[J,U]=(0,e.useState)(d),[Q,ee]=(0,e.useState)(w),[te,oe]=(0,e.useState)(g),[ne,re]=(0,e.useState)(b),[le,ce]=(0,e.useState)(x),[se,ae]=(0,e.useState)(f),[ue,de]=(0,e.useState)(m),[pe,me]=(0,e.useState)(y),[ve,ye]=(0,e.useState)(null),[he,we]=(0,e.useState)(null),Ee=(0,e.useRef)(j),{anchorRefs:_e,activeAnchor:Se}=fe(t),Ae=e=>null==e?void 0:e.getAttributeNames().reduce(((t,o)=>{var n;return o.startsWith("data-tooltip-")&&(t[o.replace(/^data-tooltip-/,"")]=null!==(n=null==e?void 0:e.getAttribute(o))&&void 0!==n?n:null),t}),{}),Re=e=>{const t={place:e=>{var t;G(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:r)},html:e=>{K(null!=e?e:l)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{U(null===e?d:Number(e))},wrapper:e=>{var t;ae(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:m)},"position-strategy":e=>{var t;me(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ee(null===e?w:Number(e))},"delay-hide":e=>{oe(null===e?g:Number(e))},float:e=>{re(null===e?b:"true"===e)},hidden:e=>{ce(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,o])=>{var n;null===(n=t[e])||void 0===n||n.call(t,o)}))};(0,e.useEffect)((()=>{q(r)}),[r]),(0,e.useEffect)((()=>{K(l)}),[l]),(0,e.useEffect)((()=>{G(u)}),[u]),(0,e.useEffect)((()=>{Z(a)}),[a]),(0,e.useEffect)((()=>{U(d)}),[d]),(0,e.useEffect)((()=>{ee(w)}),[w]),(0,e.useEffect)((()=>{oe(g)}),[g]),(0,e.useEffect)((()=>{re(b)}),[b]),(0,e.useEffect)((()=>{ce(x)}),[x]),(0,e.useEffect)((()=>{me(y)}),[y]),(0,e.useEffect)((()=>{Ee.current!==j&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[j]),(0,e.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===j,disableBase:j}}))}),[]),(0,e.useEffect)((()=>{var e;const r=new Set(_e);let l=n;if(!l&&t&&(l=`[data-tooltip-id='${t}']`),l)try{document.querySelectorAll(l).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`)}const i=document.querySelector(`[id='${o}']`);if(i&&r.add({current:i}),!r.size)return()=>null;const c=null!==(e=null!=he?he:i)&&void 0!==e?e:Se.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!c||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=Ae(c);Re(o)}))})),a={attributes:!0,childList:!1,subtree:!1};if(c){const e=Ae(c);Re(e),s.observe(c,a)}return()=>{s.disconnect()}}),[_e,Se,he,o,n]),(0,e.useEffect)((()=>{(null==C?void 0:C.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),$&&!xe("border",`${$}`)&&console.warn(`[react-tooltip] "${$}" is not a valid \`border\`.`),(null==C?void 0:C.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),P&&!xe("opacity",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`opacity\`.`)}),[]);let Te=p;const ke=(0,e.useRef)(null);if(i){const t=i({content:null!=M?M:null,activeAnchor:he});Te=t?e.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},t):null}else M&&(Te=M);V&&(Te=e.createElement(be,{content:V}));const Oe={forwardRef:z,id:t,anchorId:o,anchorSelect:n,className:ie(c,ve),classNameArrow:s,content:Te,contentWrapperRef:ke,place:X,variant:Y,offset:J,wrapper:se,events:ue,openOnClick:v,positionStrategy:pe,middlewares:h,delayShow:Q,delayHide:te,float:ne,hidden:le,noArrow:E,clickable:_,closeOnEsc:S,closeOnScroll:A,closeOnResize:R,openEvents:T,closeEvents:k,globalCloseEvents:O,imperativeModeOnly:L,style:C,position:N,isOpen:D,border:$,opacity:P,arrowColor:B,setIsOpen:I,afterShow:F,afterHide:H,activeAnchor:he,setActiveAnchor:e=>we(e),role:W};return e.createElement(ge,{...Oe})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||se({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||se({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const _e=window.wp.i18n,Se=window.wp.components;window.wp.data;const Ae=({onlineEventLinkDefault:t=""})=>{const o=(0,_e.__)("Online event","gatherpress"),[n,l]=(0,r.useState)(t);return((e,t="")=>{for(const[o,n]of Object.entries(e)){let e=o;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}})({setOnlineEventLink:l},function(e){if("object"==typeof GatherPress)return"post_id".split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}()),(0,e.createElement)(Se.Flex,{justify:"normal",gap:"3"},(0,e.createElement)(Se.FlexItem,{display:"flex"},(0,e.createElement)(Se.Icon,{icon:"video-alt2"})),(0,e.createElement)(Se.FlexItem,null,!n&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-online-event-tooltip","data-tooltip-content":(0,_e.__)("Link active for attendees during event.","gatherpress")},o),(0,e.createElement)(Ee,{id:"gp-online-event-tooltip"})),n&&(0,e.createElement)("a",{href:n,rel:"noreferrer",target:"_blank"},o)))};n()((()=>{const t=document.querySelectorAll('[data-gp_block_name="online-event"]');for(let n=0;n{var e={3967:(e,t)=>{var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React,t=window.wp.domReady;var n=o.n(t);const r=window.wp.element,l=Math.min,i=Math.max,c=Math.round,s=Math.floor,a=e=>({x:e,y:e}),u={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function f(e,t,o){return i(e,l(t,o))}function p(e,t){return"function"==typeof e?e(t):e}function m(e){return e.split("-")[0]}function v(e){return e.split("-")[1]}function y(e){return"x"===e?"y":"x"}function h(e){return"y"===e?"height":"width"}function w(e){return["top","bottom"].includes(m(e))?"y":"x"}function g(e){return y(w(e))}function b(e){return e.replace(/start|end/g,(e=>d[e]))}function x(e){return e.replace(/left|right|bottom|top/g,(e=>u[e]))}function E(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function _(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function S(e,t,o){let{reference:n,floating:r}=e;const l=w(t),i=g(t),c=h(i),s=m(t),a="y"===l,u=n.x+n.width/2-r.width/2,d=n.y+n.height/2-r.height/2,f=n[c]/2-r[c]/2;let p;switch(s){case"top":p={x:u,y:n.y-r.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-r.width,y:d};break;default:p={x:n.x,y:n.y}}switch(v(t)){case"start":p[i]-=f*(o&&a?-1:1);break;case"end":p[i]+=f*(o&&a?-1:1)}return p}async function A(e,t){var o;void 0===t&&(t={});const{x:n,y:r,platform:l,rects:i,elements:c,strategy:s}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=p(t,e),v=E(m),y=c[f?"floating"===d?"reference":"floating":d],h=_(await l.getClippingRect({element:null==(o=await(null==l.isElement?void 0:l.isElement(y)))||o?y:y.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:s})),w="floating"===d?{...i.floating,x:n,y:r}:i.reference,g=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c.floating)),b=await(null==l.isElement?void 0:l.isElement(g))&&await(null==l.getScale?void 0:l.getScale(g))||{x:1,y:1},x=_(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:g,strategy:s}):w);return{top:(h.top-x.top+v.top)/b.y,bottom:(x.bottom-h.bottom+v.bottom)/b.y,left:(h.left-x.left+v.left)/b.x,right:(x.right-h.right+v.right)/b.x}}const R=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,middlewareData:l,rects:i,initialPlacement:c,platform:s,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:E=!0,..._}=p(e,t);if(null!=(o=l.arrow)&&o.alignmentOffset)return{};const S=m(r),R=m(c)===c,T=await(null==s.isRTL?void 0:s.isRTL(a.floating)),k=f||(R||!E?[x(c)]:function(e){const t=x(e);return[b(e),t,b(t)]}(c));f||"none"===w||k.push(...function(e,t,o,n){const r=v(e);let l=function(e,t,o){const n=["left","right"],r=["right","left"],l=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return o?t?r:n:t?n:r;case"left":case"right":return t?l:i;default:return[]}}(m(e),"start"===o,n);return r&&(l=l.map((e=>e+"-"+r)),t&&(l=l.concat(l.map(b)))),l}(c,E,w,T));const O=[c,...k],L=await A(t,_),C=[];let N=(null==(n=l.flip)?void 0:n.overflows)||[];if(u&&C.push(L[S]),d){const e=function(e,t,o){void 0===o&&(o=!1);const n=v(e),r=g(e),l=h(r);let i="x"===r?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=x(i)),[i,x(i)]}(r,i,T);C.push(L[e[0]],L[e[1]])}if(N=[...N,{placement:r,overflows:C}],!C.every((e=>e<=0))){var D,j;const e=((null==(D=l.flip)?void 0:D.index)||0)+1,t=O[e];if(t)return{data:{index:e,overflows:N},reset:{placement:t}};let o=null==(j=N.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:j.placement;if(!o)switch(y){case"bestFit":{var $;const e=null==($=N.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:$[0];e&&(o=e);break}case"initialPlacement":o=c}if(r!==o)return{reset:{placement:o}}}return{}}}},T=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:o,y:n}=t,r=await async function(e,t){const{placement:o,platform:n,elements:r}=e,l=await(null==n.isRTL?void 0:n.isRTL(r.floating)),i=m(o),c=v(o),s="y"===w(o),a=["left","top"].includes(i)?-1:1,u=l&&s?-1:1,d=p(t,e);let{mainAxis:f,crossAxis:y,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return c&&"number"==typeof h&&(y="end"===c?-1*h:h),s?{x:y*u,y:f*a}:{x:f*a,y:y*u}}(t,e);return{x:o+r.x,y:n+r.y,data:r}}}},k=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:c={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...s}=p(e,t),a={x:o,y:n},u=await A(t,s),d=w(m(r)),v=y(d);let h=a[v],g=a[d];if(l){const e="y"===v?"bottom":"right";h=f(h+u["y"===v?"top":"left"],h,h-u[e])}if(i){const e="y"===d?"bottom":"right";g=f(g+u["y"===d?"top":"left"],g,g-u[e])}const b=c.fn({...t,[v]:h,[d]:g});return{...b,data:{x:b.x-o,y:b.y-n}}}}};function O(e){return N(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function C(e){var t;return null==(t=(N(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function N(e){return e instanceof Node||e instanceof L(e).Node}function D(e){return e instanceof Element||e instanceof L(e).Element}function j(e){return e instanceof HTMLElement||e instanceof L(e).HTMLElement}function $(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof L(e).ShadowRoot)}function P(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(r)}function I(e){return["table","td","th"].includes(O(e))}function B(e){const t=F(),o=W(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function F(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function H(e){return["html","body","#document"].includes(O(e))}function W(e){return L(e).getComputedStyle(e)}function z(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function M(e){if("html"===O(e))return e;const t=e.assignedSlot||e.parentNode||$(e)&&e.host||C(e);return $(t)?t.host:t}function q(e){const t=M(e);return H(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&P(t)?t:q(t)}function V(e,t,o){var n;void 0===t&&(t=[]),void 0===o&&(o=!0);const r=q(e),l=r===(null==(n=e.ownerDocument)?void 0:n.body),i=L(r);return l?t.concat(i,i.visualViewport||[],P(r)?r:[],i.frameElement&&o?V(i.frameElement):[]):t.concat(r,V(r,[],o))}function K(e){const t=W(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=j(e),l=r?e.offsetWidth:o,i=r?e.offsetHeight:n,s=c(o)!==l||c(n)!==i;return s&&(o=l,n=i),{width:o,height:n,$:s}}function X(e){return D(e)?e:e.contextElement}function G(e){const t=X(e);if(!j(t))return a(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:l}=K(t);let i=(l?c(o.width):o.width)/n,s=(l?c(o.height):o.height)/r;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const Y=a(0);function Z(e){const t=L(e);return F()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Y}function J(e,t,o,n){void 0===t&&(t=!1),void 0===o&&(o=!1);const r=e.getBoundingClientRect(),l=X(e);let i=a(1);t&&(n?D(n)&&(i=G(n)):i=G(e));const c=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==L(e))&&t}(l,o,n)?Z(l):a(0);let s=(r.left+c.x)/i.x,u=(r.top+c.y)/i.y,d=r.width/i.x,f=r.height/i.y;if(l){const e=L(l),t=n&&D(n)?L(n):n;let o=e.frameElement;for(;o&&n&&t!==e;){const e=G(o),t=o.getBoundingClientRect(),n=W(o),r=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,u*=e.y,d*=e.x,f*=e.y,s+=r,u+=l,o=L(o).frameElement}}return _({width:d,height:f,x:s,y:u})}function U(e){return J(C(e)).left+z(e).scrollLeft}function Q(e,t,o){let n;if("viewport"===t)n=function(e,t){const o=L(e),n=C(e),r=o.visualViewport;let l=n.clientWidth,i=n.clientHeight,c=0,s=0;if(r){l=r.width,i=r.height;const e=F();(!e||e&&"fixed"===t)&&(c=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:c,y:s}}(e,o);else if("document"===t)n=function(e){const t=C(e),o=z(e),n=e.ownerDocument.body,r=i(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),l=i(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let c=-o.scrollLeft+U(e);const s=-o.scrollTop;return"rtl"===W(n).direction&&(c+=i(t.clientWidth,n.clientWidth)-r),{width:r,height:l,x:c,y:s}}(C(e));else if(D(t))n=function(e,t){const o=J(e,!0,"fixed"===t),n=o.top+e.clientTop,r=o.left+e.clientLeft,l=j(e)?G(e):a(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:r*l.x,y:n*l.y}}(t,o);else{const o=Z(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return _(n)}function ee(e,t){const o=M(e);return!(o===t||!D(o)||H(o))&&("fixed"===W(o).position||ee(o,t))}function te(e,t,o){const n=j(t),r=C(t),l="fixed"===o,i=J(e,!0,l,t);let c={scrollLeft:0,scrollTop:0};const s=a(0);if(n||!n&&!l)if(("body"!==O(t)||P(r))&&(c=z(t)),n){const e=J(t,!0,l,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=U(r));return{x:i.left+c.scrollLeft-s.x,y:i.top+c.scrollTop-s.y,width:i.width,height:i.height}}function oe(e,t){return j(e)&&"fixed"!==W(e).position?t?t(e):e.offsetParent:null}function ne(e,t){const o=L(e);if(!j(e))return o;let n=oe(e,t);for(;n&&I(n)&&"static"===W(n).position;)n=oe(n,t);return n&&("html"===O(n)||"body"===O(n)&&"static"===W(n).position&&!B(n))?o:n||function(e){let t=M(e);for(;j(t)&&!H(t);){if(B(t))return t;t=M(t)}return null}(e)||o}const re={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:o,strategy:n}=e;const r=j(o),l=C(o);if(o===l)return t;let i={scrollLeft:0,scrollTop:0},c=a(1);const s=a(0);if((r||!r&&"fixed"!==n)&&(("body"!==O(o)||P(l))&&(i=z(o)),j(o))){const e=J(o);c=G(o),s.x=e.x+o.clientLeft,s.y=e.y+o.clientTop}return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-i.scrollLeft*c.x+s.x,y:t.y*c.y-i.scrollTop*c.y+s.y}},getDocumentElement:C,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const c=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let n=V(e,[],!1).filter((e=>D(e)&&"body"!==O(e))),r=null;const l="fixed"===W(e).position;let i=l?M(e):e;for(;D(i)&&!H(i);){const t=W(i),o=B(i);o||"fixed"!==t.position||(r=null),(l?!o&&!r:!o&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||P(i)&&!o&&ee(e,i))?n=n.filter((e=>e!==i)):r=t,i=M(i)}return t.set(e,n),n}(t,this._c):[].concat(o),n],s=c[0],a=c.reduce(((e,o)=>{const n=Q(t,o,r);return e.top=i(n.top,e.top),e.right=l(n.right,e.right),e.bottom=l(n.bottom,e.bottom),e.left=i(n.left,e.left),e}),Q(t,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ne,getElementRects:async function(e){let{reference:t,floating:o,strategy:n}=e;const r=this.getOffsetParent||ne,l=this.getDimensions;return{reference:te(t,await r(o),n),floating:{x:0,y:0,...await l(o)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return K(e)},getScale:G,isElement:D,isRTL:function(e){return"rtl"===W(e).direction}};const le=(e,t,o)=>{const n=new Map,r={platform:re,...o},l={...r.platform,_c:n};return(async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:l=[],platform:i}=o,c=l.filter(Boolean),s=await(null==i.isRTL?void 0:i.isRTL(t));let a=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=S(a,n,s),f=n,p={},m=0;for(let o=0;o{let n=null;return function(...r){const l=()=>{n=null,o||e.apply(this,r)};o&&!n&&(e.apply(this,r),n=setTimeout(l,t)),o||(n&&clearTimeout(n),n=setTimeout(l,t))}},ue={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},de=(0,e.createContext)({getTooltipData:()=>ue});function fe(t="DEFAULT_TOOLTIP_ID"){return(0,e.useContext)(de).getTooltipData(t)}const pe="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,me=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const o=t.getPropertyValue(e);return"auto"===o||"scroll"===o}))},ve=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(me(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},ye=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:o=null,place:n="top",offset:r=10,strategy:i="absolute",middlewares:c=[T(Number(r)),R({fallbackAxisSideDirection:"start"}),k({padding:5})],border:s})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:n};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:n};const a=c;return o?(a.push({name:"arrow",options:u={element:o,padding:5},async fn(e){const{x:t,y:o,placement:n,rects:r,platform:i,elements:c,middlewareData:s}=e,{element:a,padding:d=0}=p(u,e)||{};if(null==a)return{};const m=E(d),y={x:t,y:o},w=g(n),b=h(w),x=await i.getDimensions(a),_="y"===w,S=_?"top":"left",A=_?"bottom":"right",R=_?"clientHeight":"clientWidth",T=r.reference[b]+r.reference[w]-y[w]-r.floating[b],k=y[w]-r.reference[w],O=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let L=O?O[R]:0;L&&await(null==i.isElement?void 0:i.isElement(O))||(L=c.floating[R]||r.floating[b]);const C=T/2-k/2,N=L/2-x[b]/2-1,D=l(m[S],N),j=l(m[A],N),$=D,P=L-x[b]-j,I=L/2-x[b]/2+C,B=f($,I,P),F=!s.arrow&&null!=v(n)&&I!=B&&r.reference[b]/2-(I<$?D:j)-x[b]/2<0,H=F?I<$?I-$:I-P:0;return{[w]:y[w]+H,data:{[w]:B,centerOffset:I-B-H,...F&&{alignmentOffset:H}},reset:F}}}),le(e,t,{placement:n,strategy:i,middleware:a}).then((({x:e,y:t,placement:o,middlewareData:n})=>{var r,l;const i={left:`${e}px`,top:`${t}px`,border:s},{x:c,y:a}=null!==(r=n.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(l={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==l?l:"bottom",d=s&&{borderBottom:s,borderRight:s};let f=0;if(s){const e=`${s}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:o}}))):le(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})));var u};var he={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},we={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const ge=({forwardRef:t,id:o,className:n,classNameArrow:r,variant:c="dark",anchorId:a,anchorSelect:u,place:d="top",offset:f=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:y,wrapper:h,delayShow:w=0,delayHide:g=0,float:b=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:A=!1,closeOnResize:R=!1,openEvents:T,closeEvents:k,globalCloseEvents:O,imperativeModeOnly:L,style:N,position:D,afterShow:j,afterHide:$,content:P,contentWrapperRef:I,isOpen:B,setIsOpen:F,activeAnchor:H,setActiveAnchor:W,border:z,opacity:M,arrowColor:q,role:K="tooltip"})=>{var G;const Y=(0,e.useRef)(null),Z=(0,e.useRef)(null),U=(0,e.useRef)(null),Q=(0,e.useRef)(null),ee=(0,e.useRef)(null),[te,oe]=(0,e.useState)(d),[ne,re]=(0,e.useState)({}),[le,ce]=(0,e.useState)({}),[se,ue]=(0,e.useState)(!1),[de,me]=(0,e.useState)(!1),[ge,be]=(0,e.useState)(null),xe=(0,e.useRef)(!1),Ee=(0,e.useRef)(null),{anchorRefs:_e,setActiveAnchor:Se}=fe(o),Ae=(0,e.useRef)(!1),[Re,Te]=(0,e.useState)([]),ke=(0,e.useRef)(!1),Oe=m||p.includes("click"),Le=Oe||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ce=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Oe&&Object.assign(Ce,{mouseenter:!1,focus:!1,click:!0});const Ne=k?{...k}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!k&&Oe&&Object.assign(Ne,{mouseleave:!1,blur:!1});const De=O?{...O}:{escape:S||!1,scroll:A||!1,resize:R||!1,clickOutsideAnchor:Le||!1};L&&(Object.assign(Ce,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ne,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(De,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),pe((()=>(ke.current=!0,()=>{ke.current=!1})),[]);const je=e=>{ke.current&&(e&&me(!0),setTimeout((()=>{ke.current&&(null==F||F(e),void 0===B&&ue(e))}),10))};(0,e.useEffect)((()=>{if(void 0===B)return()=>null;B&&me(!0);const e=setTimeout((()=>{ue(B)}),10);return()=>{clearTimeout(e)}}),[B]),(0,e.useEffect)((()=>{if(se!==xe.current)if(ee.current&&clearTimeout(ee.current),xe.current=se,se)null==j||j();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,o,n]=t;return"s"!==n&&"ms"!==n?0:Number(o)*("ms"===n?1:1e3)})();ee.current=setTimeout((()=>{me(!1),be(null),null==$||$()}),e+25)}}),[se]);const $e=(e=w)=>{U.current&&clearTimeout(U.current),U.current=setTimeout((()=>{je(!0)}),e)},Pe=(e=g)=>{Q.current&&clearTimeout(Q.current),Q.current=setTimeout((()=>{Ae.current||je(!1)}),e)},Ie=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==o?void 0:o.isConnected))return W(null),void Se({current:null});w?$e():je(!0),W(o),Se({current:o}),Q.current&&clearTimeout(Q.current)},Be=()=>{_?Pe(g||100):g?Pe():je(!1),U.current&&clearTimeout(U.current)},Fe=({x:e,y:t})=>{var o;const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};ye({place:null!==(o=null==ge?void 0:ge.place)&&void 0!==o?o:d,offset:f,elementReference:n,tooltipReference:Y.current,tooltipArrowReference:Z.current,strategy:v,middlewares:y,border:z}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ce(e.tooltipArrowStyles),oe(e.place)}))},He=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};Fe(o),Ee.current=o},We=e=>{var t;if(!se)return;const o=e.target;(null===(t=Y.current)||void 0===t?void 0:t.contains(o))||[document.querySelector(`[id='${a}']`),...Re].some((e=>null==e?void 0:e.contains(o)))||(je(!1),U.current&&clearTimeout(U.current))},ze=ae(Ie,50,!0),Me=ae(Be,50,!0),qe=(0,e.useCallback)((()=>{var e,t;const o=null!==(e=null==ge?void 0:ge.position)&&void 0!==e?e:D;o?Fe(o):b?Ee.current&&Fe(Ee.current):(null==H?void 0:H.isConnected)&&ye({place:null!==(t=null==ge?void 0:ge.place)&&void 0!==t?t:d,offset:f,elementReference:H,tooltipReference:Y.current,tooltipArrowReference:Z.current,strategy:v,middlewares:y,border:z}).then((e=>{ke.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ce(e.tooltipArrowStyles),oe(e.place))}))}),[se,H,P,N,d,null==ge?void 0:ge.place,f,v,D,null==ge?void 0:ge.position,b]);(0,e.useEffect)((()=>{var e,t;const o=new Set(_e);Re.forEach((e=>{o.add({current:e})}));const n=document.querySelector(`[id='${a}']`);n&&o.add({current:n});const r=()=>{je(!1)},c=ve(H),u=ve(Y.current);De.scroll&&(window.addEventListener("scroll",r),null==c||c.addEventListener("scroll",r),null==u||u.addEventListener("scroll",r));let d=null;De.resize?window.addEventListener("resize",r):H&&Y.current&&(d=function(e,t,o,n){void 0===n&&(n={});const{ancestorScroll:r=!0,ancestorResize:c=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:d=!1}=n,f=X(e),p=r||c?[...f?V(f):[],...V(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",o,{passive:!0}),c&&e.addEventListener("resize",o)}));const m=f&&u?function(e,t){let o,n=null;const r=C(e);function c(){clearTimeout(o),n&&n.disconnect(),n=null}return function a(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),c();const{left:f,top:p,width:m,height:v}=e.getBoundingClientRect();if(u||t(),!m||!v)return;const y={rootMargin:-s(p)+"px "+-s(r.clientWidth-(f+m))+"px "+-s(r.clientHeight-(p+v))+"px "+-s(f)+"px",threshold:i(0,l(1,d))||1};let h=!0;function w(e){const t=e[0].intersectionRatio;if(t!==d){if(!h)return a();t?a(!1,t):o=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{n=new IntersectionObserver(w,{...y,root:r.ownerDocument})}catch(e){n=new IntersectionObserver(w,y)}n.observe(e)}(!0),c}(f,o):null;let v,y=-1,h=null;a&&(h=new ResizeObserver((e=>{let[n]=e;n&&n.target===f&&h&&(h.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{h&&h.observe(t)}))),o()})),f&&!d&&h.observe(f),h.observe(t));let w=d?J(e):null;return d&&function t(){const n=J(e);!w||n.x===w.x&&n.y===w.y&&n.width===w.width&&n.height===w.height||o(),w=n,v=requestAnimationFrame(t)}(),o(),()=>{p.forEach((e=>{r&&e.removeEventListener("scroll",o),c&&e.removeEventListener("resize",o)})),m&&m(),h&&h.disconnect(),h=null,d&&cancelAnimationFrame(v)}}(H,Y.current,qe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&je(!1)};De.escape&&window.addEventListener("keydown",f),De.clickOutsideAnchor&&window.addEventListener("click",We);const p=[],m=e=>{se&&(null==e?void 0:e.target)===H||Ie(e)},v=e=>{se&&(null==e?void 0:e.target)===H&&Be()},y=["mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(Ce).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:ze}):h.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:Me}):h.includes(e)&&p.push({event:e,listener:v}))})),b&&p.push({event:"mousemove",listener:He});const w=()=>{Ae.current=!0},g=()=>{Ae.current=!1,Be()};return _&&!Le&&(null===(e=Y.current)||void 0===e||e.addEventListener("mouseenter",w),null===(t=Y.current)||void 0===t||t.addEventListener("mouseleave",g)),p.forEach((({event:e,listener:t})=>{o.forEach((o=>{var n;null===(n=o.current)||void 0===n||n.addEventListener(e,t)}))})),()=>{var e,t;De.scroll&&(window.removeEventListener("scroll",r),null==c||c.removeEventListener("scroll",r),null==u||u.removeEventListener("scroll",r)),De.resize?window.removeEventListener("resize",r):null==d||d(),De.clickOutsideAnchor&&window.removeEventListener("click",We),De.escape&&window.removeEventListener("keydown",f),_&&!Le&&(null===(e=Y.current)||void 0===e||e.removeEventListener("mouseenter",w),null===(t=Y.current)||void 0===t||t.removeEventListener("mouseleave",g)),p.forEach((({event:e,listener:t})=>{o.forEach((o=>{var n;null===(n=o.current)||void 0===n||n.removeEventListener(e,t)}))}))}}),[H,qe,de,_e,Re,T,k,O,Oe]),(0,e.useEffect)((()=>{var e,t;let n=null!==(t=null!==(e=null==ge?void 0:ge.anchorSelect)&&void 0!==e?e:u)&&void 0!==t?t:"";!n&&o&&(n=`[data-tooltip-id='${o}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===o&&t.push(e.target),"childList"===e.type){if(H){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(n)try{r.push(...t.filter((e=>e.matches(n)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(n)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,H))&&(me(!1),je(!1),W(null),U.current&&clearTimeout(U.current),Q.current&&clearTimeout(Q.current),!0)}))}if(n)try{const o=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...o.filter((e=>e.matches(n)))),t.push(...o.flatMap((e=>[...e.querySelectorAll(n)])))}catch(e){}}})),(t.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...t]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[o,u,null==ge?void 0:ge.anchorSelect,H]),(0,e.useEffect)((()=>{qe()}),[qe]),(0,e.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>qe()))}));return e.observe(I.current),()=>{e.disconnect()}}),[P,null==I?void 0:I.current]),(0,e.useEffect)((()=>{var e;const t=document.querySelector(`[id='${a}']`),o=[...Re,t];H&&o.includes(H)||W(null!==(e=Re[0])&&void 0!==e?e:t)}),[a,Re,H]),(0,e.useEffect)((()=>()=>{U.current&&clearTimeout(U.current),Q.current&&clearTimeout(Q.current)}),[]),(0,e.useEffect)((()=>{var e;let t=null!==(e=null==ge?void 0:ge.anchorSelect)&&void 0!==e?e:u;if(!t&&o&&(t=`[data-tooltip-id='${o}']`),t)try{const e=Array.from(document.querySelectorAll(t));Te(e)}catch(e){Te([])}}),[o,u,null==ge?void 0:ge.anchorSelect]);const Ve=null!==(G=null==ge?void 0:ge.content)&&void 0!==G?G:P,Ke=se&&Object.keys(ne).length>0;return(0,e.useImperativeHandle)(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}be(null!=e?e:null),(null==e?void 0:e.delay)?$e(e.delay):je(!0)},close:e=>{(null==e?void 0:e.delay)?Pe(e.delay):je(!1)},activeAnchor:H,place:te,isOpen:Boolean(de&&!x&&Ve&&Ke)}))),de&&!x&&Ve?e.createElement(h,{id:o,role:K,className:ie("react-tooltip",he.tooltip,we.tooltip,we[c],n,`react-tooltip__place-${te}`,he[Ke?"show":"closing"],Ke?"react-tooltip__show":"react-tooltip__closing","fixed"===v&&he.fixed,_&&he.clickable),onTransitionEnd:e=>{ee.current&&clearTimeout(ee.current),se||"opacity"!==e.propertyName||(me(!1),be(null),null==$||$())},style:{...N,...ne,opacity:void 0!==M&&Ke?M:void 0},ref:Y},Ve,e.createElement(h,{className:ie("react-tooltip-arrow",he.arrow,we.arrow,r,E&&he.noArrow),style:{...le,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Z})):null},be=({content:t})=>e.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),xe=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Ee=e.forwardRef((({id:t,anchorId:o,anchorSelect:n,content:r,html:l,render:i,className:c,classNameArrow:s,variant:a="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:v=!1,positionStrategy:y="absolute",middlewares:h,delayShow:w=0,delayHide:g=0,float:b=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:A=!1,closeOnResize:R=!1,openEvents:T,closeEvents:k,globalCloseEvents:O,imperativeModeOnly:L=!1,style:C,position:N,isOpen:D,disableStyleInjection:j=!1,border:$,opacity:P,arrowColor:I,setIsOpen:B,afterShow:F,afterHide:H,role:W="tooltip"},z)=>{const[M,q]=(0,e.useState)(r),[V,K]=(0,e.useState)(l),[X,G]=(0,e.useState)(u),[Y,Z]=(0,e.useState)(a),[J,U]=(0,e.useState)(d),[Q,ee]=(0,e.useState)(w),[te,oe]=(0,e.useState)(g),[ne,re]=(0,e.useState)(b),[le,ce]=(0,e.useState)(x),[se,ae]=(0,e.useState)(f),[ue,de]=(0,e.useState)(m),[pe,me]=(0,e.useState)(y),[ve,ye]=(0,e.useState)(null),[he,we]=(0,e.useState)(null),Ee=(0,e.useRef)(j),{anchorRefs:_e,activeAnchor:Se}=fe(t),Ae=e=>null==e?void 0:e.getAttributeNames().reduce(((t,o)=>{var n;return o.startsWith("data-tooltip-")&&(t[o.replace(/^data-tooltip-/,"")]=null!==(n=null==e?void 0:e.getAttribute(o))&&void 0!==n?n:null),t}),{}),Re=e=>{const t={place:e=>{var t;G(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:r)},html:e=>{K(null!=e?e:l)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{U(null===e?d:Number(e))},wrapper:e=>{var t;ae(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:m)},"position-strategy":e=>{var t;me(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ee(null===e?w:Number(e))},"delay-hide":e=>{oe(null===e?g:Number(e))},float:e=>{re(null===e?b:"true"===e)},hidden:e=>{ce(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,o])=>{var n;null===(n=t[e])||void 0===n||n.call(t,o)}))};(0,e.useEffect)((()=>{q(r)}),[r]),(0,e.useEffect)((()=>{K(l)}),[l]),(0,e.useEffect)((()=>{G(u)}),[u]),(0,e.useEffect)((()=>{Z(a)}),[a]),(0,e.useEffect)((()=>{U(d)}),[d]),(0,e.useEffect)((()=>{ee(w)}),[w]),(0,e.useEffect)((()=>{oe(g)}),[g]),(0,e.useEffect)((()=>{re(b)}),[b]),(0,e.useEffect)((()=>{ce(x)}),[x]),(0,e.useEffect)((()=>{me(y)}),[y]),(0,e.useEffect)((()=>{Ee.current!==j&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[j]),(0,e.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===j,disableBase:j}}))}),[]),(0,e.useEffect)((()=>{var e;const r=new Set(_e);let l=n;if(!l&&t&&(l=`[data-tooltip-id='${t}']`),l)try{document.querySelectorAll(l).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`)}const i=document.querySelector(`[id='${o}']`);if(i&&r.add({current:i}),!r.size)return()=>null;const c=null!==(e=null!=he?he:i)&&void 0!==e?e:Se.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!c||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=Ae(c);Re(o)}))})),a={attributes:!0,childList:!1,subtree:!1};if(c){const e=Ae(c);Re(e),s.observe(c,a)}return()=>{s.disconnect()}}),[_e,Se,he,o,n]),(0,e.useEffect)((()=>{(null==C?void 0:C.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),$&&!xe("border",`${$}`)&&console.warn(`[react-tooltip] "${$}" is not a valid \`border\`.`),(null==C?void 0:C.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),P&&!xe("opacity",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`opacity\`.`)}),[]);let Te=p;const ke=(0,e.useRef)(null);if(i){const t=i({content:null!=M?M:null,activeAnchor:he});Te=t?e.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},t):null}else M&&(Te=M);V&&(Te=e.createElement(be,{content:V}));const Oe={forwardRef:z,id:t,anchorId:o,anchorSelect:n,className:ie(c,ve),classNameArrow:s,content:Te,contentWrapperRef:ke,place:X,variant:Y,offset:J,wrapper:se,events:ue,openOnClick:v,positionStrategy:pe,middlewares:h,delayShow:Q,delayHide:te,float:ne,hidden:le,noArrow:E,clickable:_,closeOnEsc:S,closeOnScroll:A,closeOnResize:R,openEvents:T,closeEvents:k,globalCloseEvents:O,imperativeModeOnly:L,style:C,position:N,isOpen:D,border:$,opacity:P,arrowColor:I,setIsOpen:B,afterShow:F,afterHide:H,activeAnchor:he,setActiveAnchor:e=>we(e),role:W};return e.createElement(ge,{...Oe})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||se({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||se({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const _e=window.wp.i18n,Se=window.wp.components;window.wp.data;const Ae=({onlineEventLinkDefault:t=""})=>{const o=(0,_e.__)("Online event","gatherpress"),[n,l]=(0,r.useState)(t);return((e,t="")=>{for(const[o,n]of Object.entries(e)){let e=o;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}})({setOnlineEventLink:l},function(e){if("object"==typeof GatherPress)return"eventDetails.postId".split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}()),(0,e.createElement)(Se.Flex,{justify:"normal",gap:"3"},(0,e.createElement)(Se.FlexItem,{display:"flex"},(0,e.createElement)(Se.Icon,{icon:"video-alt2"})),(0,e.createElement)(Se.FlexItem,null,!n&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-online-event-tooltip","data-tooltip-content":(0,_e.__)("Link active for attendees during event.","gatherpress")},o),(0,e.createElement)(Ee,{id:"gp-online-event-tooltip"})),n&&(0,e.createElement)("a",{href:n,rel:"noreferrer",target:"_blank"},o)))};n()((()=>{const t=document.querySelectorAll('[data-gp_block_name="online-event"]');for(let n=0;n array('react', 'wp-block-editor', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '4fba8d3ea0e493a2f3f3'); + array('react', 'wp-block-editor', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'cfe9fb966eeff6781cd7'); diff --git a/build/blocks/rsvp-response/index.js b/build/blocks/rsvp-response/index.js index 531e4e70d..00e52e475 100644 --- a/build/blocks/rsvp-response/index.js +++ b/build/blocks/rsvp-response/index.js @@ -1 +1 @@ -(()=>{"use strict";var e,t={7386:(e,t,s)=>{const n=window.wp.blocks,r=window.React,a=window.wp.blockEditor,i=window.wp.element,l=window.wp.i18n,o=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}};function p(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const c=({item:e,activeItem:t=!1,count:s,onTitleClick:n,defaultLimit:a})=>{const{title:l,value:o}=e,c=!(0===s&&"attending"!==o),m=t?"span":"a",v=p("post_id"),u=s>a;return(0,i.useEffect)((()=>{t&&((e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:n});dispatchEvent(r)}})({setRsvpSeeAllLink:u},v)})),c?(0,r.createElement)("div",{className:"gp-rsvp-response__navigation-item"},(0,r.createElement)(m,{className:"gp-rsvp-response__anchor","data-item":o,"data-toggle":"tab",href:"#",role:"tab","aria-controls":`#gp-rsvp-${o}`,onClick:e=>n(e,o)},l),(0,r.createElement)("span",{className:"gp-rsvp-response__count"},"(",s,")")):""},m=({items:e,activeValue:t,onTitleClick:n,defaultLimit:a})=>{const l={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,t]of Object.entries(p("responses")))l[e]=t.count;const[m,v]=(0,i.useState)(l),[u,d]=(0,i.useState)(!1),[g,_]=(0,i.useState)(!0),f=g?"span":"a";o({setRsvpCount:v},p("post_id"));let h=0;const E=e.map(((e,s)=>{const i=e.value===t;return i&&(h=s),(0,r.createElement)(c,{key:s,item:e,count:m[e.value],activeItem:i,onTitleClick:n,defaultLimit:a})}));return(0,i.useEffect)((()=>{s.g.document.addEventListener("click",(({target:e})=>{e.closest(".gp-rsvp-response__navigation-active")||d(!1)})),s.g.document.addEventListener("keydown",(({key:e})=>{"Escape"===e&&d(!1)}))})),(0,i.useEffect)((()=>{0===m.not_attending&&0===m.waiting_list?_(!0):_(!1)}),[m]),(0,r.createElement)("div",{className:"gp-rsvp-response__navigation-wrapper"},(0,r.createElement)("div",null,(0,r.createElement)(f,{href:"#",className:"gp-rsvp-response__navigation-active",onClick:e=>(e=>{e.preventDefault(),d(!u)})(e)},e[h].title)," ",(0,r.createElement)("span",null,"(",m[t],")")),!g&&u&&(0,r.createElement)("nav",{className:"gp-rsvp-response__navigation"},E))},v=({items:e,activeValue:t,onTitleClick:s,rsvpLimit:n,setRsvpLimit:a,defaultLimit:c})=>{let v;v=!1===n?(0,l.__)("See fewer","gatherpress"):(0,l.__)("See all","gatherpress");const[u,d]=(0,i.useState)(p("responses")[t].count>c);return o({setRsvpSeeAllLink:d},p("post_id")),(0,r.createElement)("div",{className:"gp-rsvp-response__header"},(0,r.createElement)("div",{className:"dashicons dashicons-groups"}),(0,r.createElement)(m,{items:e,activeValue:t,onTitleClick:s,defaultLimit:c}),u&&(0,r.createElement)("div",{className:"gp-rsvp-response__see-all"},(0,r.createElement)("a",{href:"#",onClick:e=>(e=>{e.preventDefault(),a(!1===n&&c)})(e)},v)))},u=({value:e,limit:t,responses:s=[]})=>{let n="";return"object"==typeof s&&void 0!==s[e]&&(s=[...s[e].responses],t&&(s=s.splice(0,t)),n=s.map(((e,t)=>{const{profile:s,name:n,photo:a,role:i}=e;let{guests:l}=e;return l=l?" +"+l+" guest(s)":"",(0,r.createElement)("div",{key:t,className:"gp-rsvp-response__item"},(0,r.createElement)("figure",{className:"gp-rsvp-response__member-avatar"},""!==s?(0,r.createElement)("a",{href:s},(0,r.createElement)("img",{alt:n,title:n,src:a})):(0,r.createElement)("img",{alt:n,title:n,src:a})),(0,r.createElement)("div",{className:"gp-rsvp-response__member-info"},(0,r.createElement)("div",{className:"gp-rsvp-response__member-name"},""!==s?(0,r.createElement)("a",{href:s,title:n},n):(0,r.createElement)("span",null,n)),(0,r.createElement)("div",{className:"gp-rsvp-response__member-role"},i),(0,r.createElement)("small",{className:"gp-rsvp-response__guests"},l)))}))),(0,r.createElement)(r.Fragment,null,"attending"===e&&0===n.length&&(0,r.createElement)("div",{className:"gp-rsvp-response__no-responses"},!1===p("has_event_past")?(0,l.__)("No one is attending this event yet.","gatherpress"):(0,l.__)("No one went to this event.","gatherpress")),n)},d=({items:e,activeValue:t,limit:s=!1})=>{const n=p("post_id"),[a,l]=(0,i.useState)(p("responses"));o({setRsvpResponse:l},n);const c=e.map(((e,n)=>{const{value:i}=e;return i===t?(0,r.createElement)("div",{key:n,className:"gp-rsvp-response__items",id:`gp-rsvp-${i}`,role:"tabpanel","aria-labelledby":`gp-rsvp-${i}-tab`},(0,r.createElement)(u,{value:i,limit:s,responses:a})):""}));return(0,r.createElement)("div",{className:"gp-rsvp-response__content"},c)},g=()=>{const e="attending",t=p("has_event_past"),s=[{title:!1===t?(0,l.__)("Attending","gatherpress"):(0,l.__)("Went","gatherpress"),value:"attending"},{title:!1===t?(0,l.__)("Waiting List","gatherpress"):(0,l.__)("Wait Listed","gatherpress"),value:"waiting_list"},{title:!1===t?(0,l.__)("Not Attending","gatherpress"):(0,l.__)("Didn't Go","gatherpress"),value:"not_attending"}],[n,a]=(0,i.useState)(e),[c,m]=(0,i.useState)(8);return o({setRsvpStatus:a},p("post_id")),s.some((e=>e.value===n))||a(e),(0,r.createElement)("div",{className:"gp-rsvp-response"},(0,r.createElement)(v,{items:s,activeValue:n,onTitleClick:(e,t)=>{e.preventDefault(),a(t)},rsvpLimit:c,setRsvpLimit:m,defaultLimit:8}),(0,r.createElement)(d,{items:s,activeValue:n,limit:c}))},_=e=>{const{isSelected:t}=e,s=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:s}}))},f=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/rsvp-response","version":"1.0.0","title":"RSVP Response","category":"gatherpress","icon":"groups","example":{},"description":"Displays a list of members who have confirmed their attendance for an event.","attributes":{"blockId":{"type":"string"},"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./rsvp-response.js","render":"file:./render.php"}');(0,n.registerBlockType)(f,{edit:()=>{const e=(0,a.useBlockProps)();return(0,r.createElement)("div",{...e},(0,r.createElement)(_,null,(0,r.createElement)(g,null)))},save:()=>null})}},s={};function n(e){var r=s[e];if(void 0!==r)return r.exports;var a=s[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=(t,s,r,a)=>{if(!s){var i=1/0;for(c=0;c=a)&&Object.keys(n.O).every((e=>n.O[e](s[o])))?s.splice(o--,1):(l=!1,a0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[s,r,a]},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={304:0,952:0};n.O.j=t=>0===e[t];var t=(t,s)=>{var r,a,[i,l,o]=s,p=0;if(i.some((t=>0!==e[t]))){for(r in l)n.o(l,r)&&(n.m[r]=l[r]);if(o)var c=o(n)}for(t&&t(s);pn(7386)));r=n.O(r)})(); \ No newline at end of file +(()=>{"use strict";var e,t={7386:(e,t,s)=>{const n=window.wp.blocks,a=window.React,r=window.wp.blockEditor,i=window.wp.element,l=window.wp.i18n,o=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}};function p(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const c=({item:e,activeItem:t=!1,count:s,onTitleClick:n,defaultLimit:r})=>{const{title:l,value:o}=e,c=!(0===s&&"attending"!==o),v=t?"span":"a",m=p("eventDetails.postId"),u=s>r;return(0,i.useEffect)((()=>{t&&((e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const a=new CustomEvent(e,{detail:n});dispatchEvent(a)}})({setRsvpSeeAllLink:u},m)})),c?(0,a.createElement)("div",{className:"gp-rsvp-response__navigation-item"},(0,a.createElement)(v,{className:"gp-rsvp-response__anchor","data-item":o,"data-toggle":"tab",href:"#",role:"tab","aria-controls":`#gp-rsvp-${o}`,onClick:e=>n(e,o)},l),(0,a.createElement)("span",{className:"gp-rsvp-response__count"},"(",s,")")):""},v=({items:e,activeValue:t,onTitleClick:n,defaultLimit:r})=>{const l={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,t]of Object.entries(p("eventDetails.responses")))l[e]=t.count;const[v,m]=(0,i.useState)(l),[u,d]=(0,i.useState)(!1),[g,_]=(0,i.useState)(!0),f=g?"span":"a";o({setRsvpCount:m},p("eventDetails.postId"));let h=0;const E=e.map(((e,s)=>{const i=e.value===t;return i&&(h=s),(0,a.createElement)(c,{key:s,item:e,count:v[e.value],activeItem:i,onTitleClick:n,defaultLimit:r})}));return(0,i.useEffect)((()=>{s.g.document.addEventListener("click",(({target:e})=>{e.closest(".gp-rsvp-response__navigation-active")||d(!1)})),s.g.document.addEventListener("keydown",(({key:e})=>{"Escape"===e&&d(!1)}))})),(0,i.useEffect)((()=>{0===v.not_attending&&0===v.waiting_list?_(!0):_(!1)}),[v]),(0,a.createElement)("div",{className:"gp-rsvp-response__navigation-wrapper"},(0,a.createElement)("div",null,(0,a.createElement)(f,{href:"#",className:"gp-rsvp-response__navigation-active",onClick:e=>(e=>{e.preventDefault(),d(!u)})(e)},e[h].title)," ",(0,a.createElement)("span",null,"(",v[t],")")),!g&&u&&(0,a.createElement)("nav",{className:"gp-rsvp-response__navigation"},E))},m=({items:e,activeValue:t,onTitleClick:s,rsvpLimit:n,setRsvpLimit:r,defaultLimit:c})=>{let m;m=!1===n?(0,l.__)("See fewer","gatherpress"):(0,l.__)("See all","gatherpress");const[u,d]=(0,i.useState)(p("eventDetails.responses")[t].count>c);return o({setRsvpSeeAllLink:d},p("eventDetails.postId")),(0,a.createElement)("div",{className:"gp-rsvp-response__header"},(0,a.createElement)("div",{className:"dashicons dashicons-groups"}),(0,a.createElement)(v,{items:e,activeValue:t,onTitleClick:s,defaultLimit:c}),u&&(0,a.createElement)("div",{className:"gp-rsvp-response__see-all"},(0,a.createElement)("a",{href:"#",onClick:e=>(e=>{e.preventDefault(),r(!1===n&&c)})(e)},m)))},u=({value:e,limit:t,responses:s=[]})=>{let n="";return"object"==typeof s&&void 0!==s[e]&&(s=[...s[e].responses],t&&(s=s.splice(0,t)),n=s.map(((e,t)=>{const{profile:s,name:n,photo:r,role:i}=e;let{guests:l}=e;return l=l?" +"+l+" guest(s)":"",(0,a.createElement)("div",{key:t,className:"gp-rsvp-response__item"},(0,a.createElement)("figure",{className:"gp-rsvp-response__member-avatar"},""!==s?(0,a.createElement)("a",{href:s},(0,a.createElement)("img",{alt:n,title:n,src:r})):(0,a.createElement)("img",{alt:n,title:n,src:r})),(0,a.createElement)("div",{className:"gp-rsvp-response__member-info"},(0,a.createElement)("div",{className:"gp-rsvp-response__member-name"},""!==s?(0,a.createElement)("a",{href:s,title:n},n):(0,a.createElement)("span",null,n)),(0,a.createElement)("div",{className:"gp-rsvp-response__member-role"},i),(0,a.createElement)("small",{className:"gp-rsvp-response__guests"},l)))}))),(0,a.createElement)(a.Fragment,null,"attending"===e&&0===n.length&&(0,a.createElement)("div",{className:"gp-rsvp-response__no-responses"},!1===p("eventDetails.hasEventPast")?(0,l.__)("No one is attending this event yet.","gatherpress"):(0,l.__)("No one went to this event.","gatherpress")),n)},d=({items:e,activeValue:t,limit:s=!1})=>{const n=p("eventDetails.postId"),[r,l]=(0,i.useState)(p("eventDetails.responses"));o({setRsvpResponse:l},n);const c=e.map(((e,n)=>{const{value:i}=e;return i===t?(0,a.createElement)("div",{key:n,className:"gp-rsvp-response__items",id:`gp-rsvp-${i}`,role:"tabpanel","aria-labelledby":`gp-rsvp-${i}-tab`},(0,a.createElement)(u,{value:i,limit:s,responses:r})):""}));return(0,a.createElement)("div",{className:"gp-rsvp-response__content"},c)},g=()=>{const e="attending",t=p("eventDetails.hasEventPast"),s=[{title:!1===t?(0,l.__)("Attending","gatherpress"):(0,l.__)("Went","gatherpress"),value:"attending"},{title:!1===t?(0,l.__)("Waiting List","gatherpress"):(0,l.__)("Wait Listed","gatherpress"),value:"waiting_list"},{title:!1===t?(0,l.__)("Not Attending","gatherpress"):(0,l.__)("Didn't Go","gatherpress"),value:"not_attending"}],[n,r]=(0,i.useState)(e),[c,v]=(0,i.useState)(8);return o({setRsvpStatus:r},p("eventDetails.postId")),s.some((e=>e.value===n))||r(e),(0,a.createElement)("div",{className:"gp-rsvp-response"},(0,a.createElement)(m,{items:s,activeValue:n,onTitleClick:(e,t)=>{e.preventDefault(),r(t)},rsvpLimit:c,setRsvpLimit:v,defaultLimit:8}),(0,a.createElement)(d,{items:s,activeValue:n,limit:c}))},_=e=>{const{isSelected:t}=e,s=t?"none":"block";return(0,a.createElement)("div",{style:{position:"relative"}},e.children,(0,a.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:s}}))},f=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/rsvp-response","version":"1.0.0","title":"RSVP Response","category":"gatherpress","icon":"groups","example":{},"description":"Displays a list of members who have confirmed their attendance for an event.","attributes":{"blockId":{"type":"string"},"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./rsvp-response.js","render":"file:./render.php"}');(0,n.registerBlockType)(f,{edit:()=>{const e=(0,r.useBlockProps)();return(0,a.createElement)("div",{...e},(0,a.createElement)(_,null,(0,a.createElement)(g,null)))},save:()=>null})}},s={};function n(e){var a=s[e];if(void 0!==a)return a.exports;var r=s[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.m=t,e=[],n.O=(t,s,a,r)=>{if(!s){var i=1/0;for(c=0;c=r)&&Object.keys(n.O).every((e=>n.O[e](s[o])))?s.splice(o--,1):(l=!1,r0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[s,a,r]},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={304:0,952:0};n.O.j=t=>0===e[t];var t=(t,s)=>{var a,r,[i,l,o]=s,p=0;if(i.some((t=>0!==e[t]))){for(a in l)n.o(l,a)&&(n.m[a]=l[a]);if(o)var c=o(n)}for(t&&t(s);pn(7386)));a=n.O(a)})(); \ No newline at end of file diff --git a/build/blocks/rsvp-response/rsvp-response.asset.php b/build/blocks/rsvp-response/rsvp-response.asset.php index 10eb0e9f1..ce5f31c34 100644 --- a/build/blocks/rsvp-response/rsvp-response.asset.php +++ b/build/blocks/rsvp-response/rsvp-response.asset.php @@ -1 +1 @@ - array('react', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '8e9a4cb0b0342929cbe6'); + array('react', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '38f08cb039d0f0a3112c'); diff --git a/build/blocks/rsvp-response/rsvp-response.js b/build/blocks/rsvp-response/rsvp-response.js index a6997dd83..6eccaae7f 100644 --- a/build/blocks/rsvp-response/rsvp-response.js +++ b/build/blocks/rsvp-response/rsvp-response.js @@ -1 +1 @@ -(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const t=window.React,s=window.wp.domReady;var n=e.n(s);const a=window.wp.element,r=window.wp.i18n,i=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}};function l(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const o=({item:e,activeItem:s=!1,count:n,onTitleClick:r,defaultLimit:i})=>{const{title:o,value:c}=e,p=!(0===n&&"attending"!==c),m=s?"span":"a",v=l("post_id"),u=n>i;return(0,a.useEffect)((()=>{s&&((e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const a=new CustomEvent(e,{detail:n});dispatchEvent(a)}})({setRsvpSeeAllLink:u},v)})),p?(0,t.createElement)("div",{className:"gp-rsvp-response__navigation-item"},(0,t.createElement)(m,{className:"gp-rsvp-response__anchor","data-item":c,"data-toggle":"tab",href:"#",role:"tab","aria-controls":`#gp-rsvp-${c}`,onClick:e=>r(e,c)},o),(0,t.createElement)("span",{className:"gp-rsvp-response__count"},"(",n,")")):""},c=({items:s,activeValue:n,onTitleClick:r,defaultLimit:c})=>{const p={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,t]of Object.entries(l("responses")))p[e]=t.count;const[m,v]=(0,a.useState)(p),[u,d]=(0,a.useState)(!1),[_,g]=(0,a.useState)(!0),f=_?"span":"a";i({setRsvpCount:v},l("post_id"));let E=0;const h=s.map(((e,s)=>{const a=e.value===n;return a&&(E=s),(0,t.createElement)(o,{key:s,item:e,count:m[e.value],activeItem:a,onTitleClick:r,defaultLimit:c})}));return(0,a.useEffect)((()=>{e.g.document.addEventListener("click",(({target:e})=>{e.closest(".gp-rsvp-response__navigation-active")||d(!1)})),e.g.document.addEventListener("keydown",(({key:e})=>{"Escape"===e&&d(!1)}))})),(0,a.useEffect)((()=>{0===m.not_attending&&0===m.waiting_list?g(!0):g(!1)}),[m]),(0,t.createElement)("div",{className:"gp-rsvp-response__navigation-wrapper"},(0,t.createElement)("div",null,(0,t.createElement)(f,{href:"#",className:"gp-rsvp-response__navigation-active",onClick:e=>(e=>{e.preventDefault(),d(!u)})(e)},s[E].title)," ",(0,t.createElement)("span",null,"(",m[n],")")),!_&&u&&(0,t.createElement)("nav",{className:"gp-rsvp-response__navigation"},h))},p=({items:e,activeValue:s,onTitleClick:n,rsvpLimit:o,setRsvpLimit:p,defaultLimit:m})=>{let v;v=!1===o?(0,r.__)("See fewer","gatherpress"):(0,r.__)("See all","gatherpress");const[u,d]=(0,a.useState)(l("responses")[s].count>m);return i({setRsvpSeeAllLink:d},l("post_id")),(0,t.createElement)("div",{className:"gp-rsvp-response__header"},(0,t.createElement)("div",{className:"dashicons dashicons-groups"}),(0,t.createElement)(c,{items:e,activeValue:s,onTitleClick:n,defaultLimit:m}),u&&(0,t.createElement)("div",{className:"gp-rsvp-response__see-all"},(0,t.createElement)("a",{href:"#",onClick:e=>(e=>{e.preventDefault(),p(!1===o&&m)})(e)},v)))},m=({value:e,limit:s,responses:n=[]})=>{let a="";return"object"==typeof n&&void 0!==n[e]&&(n=[...n[e].responses],s&&(n=n.splice(0,s)),a=n.map(((e,s)=>{const{profile:n,name:a,photo:r,role:i}=e;let{guests:l}=e;return l=l?" +"+l+" guest(s)":"",(0,t.createElement)("div",{key:s,className:"gp-rsvp-response__item"},(0,t.createElement)("figure",{className:"gp-rsvp-response__member-avatar"},""!==n?(0,t.createElement)("a",{href:n},(0,t.createElement)("img",{alt:a,title:a,src:r})):(0,t.createElement)("img",{alt:a,title:a,src:r})),(0,t.createElement)("div",{className:"gp-rsvp-response__member-info"},(0,t.createElement)("div",{className:"gp-rsvp-response__member-name"},""!==n?(0,t.createElement)("a",{href:n,title:a},a):(0,t.createElement)("span",null,a)),(0,t.createElement)("div",{className:"gp-rsvp-response__member-role"},i),(0,t.createElement)("small",{className:"gp-rsvp-response__guests"},l)))}))),(0,t.createElement)(t.Fragment,null,"attending"===e&&0===a.length&&(0,t.createElement)("div",{className:"gp-rsvp-response__no-responses"},!1===l("has_event_past")?(0,r.__)("No one is attending this event yet.","gatherpress"):(0,r.__)("No one went to this event.","gatherpress")),a)},v=({items:e,activeValue:s,limit:n=!1})=>{const r=l("post_id"),[o,c]=(0,a.useState)(l("responses"));i({setRsvpResponse:c},r);const p=e.map(((e,a)=>{const{value:r}=e;return r===s?(0,t.createElement)("div",{key:a,className:"gp-rsvp-response__items",id:`gp-rsvp-${r}`,role:"tabpanel","aria-labelledby":`gp-rsvp-${r}-tab`},(0,t.createElement)(m,{value:r,limit:n,responses:o})):""}));return(0,t.createElement)("div",{className:"gp-rsvp-response__content"},p)},u=()=>{const e="attending",s=l("has_event_past"),n=[{title:!1===s?(0,r.__)("Attending","gatherpress"):(0,r.__)("Went","gatherpress"),value:"attending"},{title:!1===s?(0,r.__)("Waiting List","gatherpress"):(0,r.__)("Wait Listed","gatherpress"),value:"waiting_list"},{title:!1===s?(0,r.__)("Not Attending","gatherpress"):(0,r.__)("Didn't Go","gatherpress"),value:"not_attending"}],[o,c]=(0,a.useState)(e),[m,u]=(0,a.useState)(8);return i({setRsvpStatus:c},l("post_id")),n.some((e=>e.value===o))||c(e),(0,t.createElement)("div",{className:"gp-rsvp-response"},(0,t.createElement)(p,{items:n,activeValue:o,onTitleClick:(e,t)=>{e.preventDefault(),c(t)},rsvpLimit:m,setRsvpLimit:u,defaultLimit:8}),(0,t.createElement)(v,{items:n,activeValue:o,limit:m}))};n()((()=>{const e=document.querySelectorAll('[data-gp_block_name="rsvp-response"]');for(let s=0;s{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const t=window.React,s=window.wp.domReady;var n=e.n(s);const a=window.wp.element,r=window.wp.i18n,i=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}};function l(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const o=({item:e,activeItem:s=!1,count:n,onTitleClick:r,defaultLimit:i})=>{const{title:o,value:c}=e,p=!(0===n&&"attending"!==c),m=s?"span":"a",v=l("eventDetails.postId"),u=n>i;return(0,a.useEffect)((()=>{s&&((e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const a=new CustomEvent(e,{detail:n});dispatchEvent(a)}})({setRsvpSeeAllLink:u},v)})),p?(0,t.createElement)("div",{className:"gp-rsvp-response__navigation-item"},(0,t.createElement)(m,{className:"gp-rsvp-response__anchor","data-item":c,"data-toggle":"tab",href:"#",role:"tab","aria-controls":`#gp-rsvp-${c}`,onClick:e=>r(e,c)},o),(0,t.createElement)("span",{className:"gp-rsvp-response__count"},"(",n,")")):""},c=({items:s,activeValue:n,onTitleClick:r,defaultLimit:c})=>{const p={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,t]of Object.entries(l("eventDetails.responses")))p[e]=t.count;const[m,v]=(0,a.useState)(p),[u,d]=(0,a.useState)(!1),[g,_]=(0,a.useState)(!0),E=g?"span":"a";i({setRsvpCount:v},l("eventDetails.postId"));let f=0;const h=s.map(((e,s)=>{const a=e.value===n;return a&&(f=s),(0,t.createElement)(o,{key:s,item:e,count:m[e.value],activeItem:a,onTitleClick:r,defaultLimit:c})}));return(0,a.useEffect)((()=>{e.g.document.addEventListener("click",(({target:e})=>{e.closest(".gp-rsvp-response__navigation-active")||d(!1)})),e.g.document.addEventListener("keydown",(({key:e})=>{"Escape"===e&&d(!1)}))})),(0,a.useEffect)((()=>{0===m.not_attending&&0===m.waiting_list?_(!0):_(!1)}),[m]),(0,t.createElement)("div",{className:"gp-rsvp-response__navigation-wrapper"},(0,t.createElement)("div",null,(0,t.createElement)(E,{href:"#",className:"gp-rsvp-response__navigation-active",onClick:e=>(e=>{e.preventDefault(),d(!u)})(e)},s[f].title)," ",(0,t.createElement)("span",null,"(",m[n],")")),!g&&u&&(0,t.createElement)("nav",{className:"gp-rsvp-response__navigation"},h))},p=({items:e,activeValue:s,onTitleClick:n,rsvpLimit:o,setRsvpLimit:p,defaultLimit:m})=>{let v;v=!1===o?(0,r.__)("See fewer","gatherpress"):(0,r.__)("See all","gatherpress");const[u,d]=(0,a.useState)(l("eventDetails.responses")[s].count>m);return i({setRsvpSeeAllLink:d},l("eventDetails.postId")),(0,t.createElement)("div",{className:"gp-rsvp-response__header"},(0,t.createElement)("div",{className:"dashicons dashicons-groups"}),(0,t.createElement)(c,{items:e,activeValue:s,onTitleClick:n,defaultLimit:m}),u&&(0,t.createElement)("div",{className:"gp-rsvp-response__see-all"},(0,t.createElement)("a",{href:"#",onClick:e=>(e=>{e.preventDefault(),p(!1===o&&m)})(e)},v)))},m=({value:e,limit:s,responses:n=[]})=>{let a="";return"object"==typeof n&&void 0!==n[e]&&(n=[...n[e].responses],s&&(n=n.splice(0,s)),a=n.map(((e,s)=>{const{profile:n,name:a,photo:r,role:i}=e;let{guests:l}=e;return l=l?" +"+l+" guest(s)":"",(0,t.createElement)("div",{key:s,className:"gp-rsvp-response__item"},(0,t.createElement)("figure",{className:"gp-rsvp-response__member-avatar"},""!==n?(0,t.createElement)("a",{href:n},(0,t.createElement)("img",{alt:a,title:a,src:r})):(0,t.createElement)("img",{alt:a,title:a,src:r})),(0,t.createElement)("div",{className:"gp-rsvp-response__member-info"},(0,t.createElement)("div",{className:"gp-rsvp-response__member-name"},""!==n?(0,t.createElement)("a",{href:n,title:a},a):(0,t.createElement)("span",null,a)),(0,t.createElement)("div",{className:"gp-rsvp-response__member-role"},i),(0,t.createElement)("small",{className:"gp-rsvp-response__guests"},l)))}))),(0,t.createElement)(t.Fragment,null,"attending"===e&&0===a.length&&(0,t.createElement)("div",{className:"gp-rsvp-response__no-responses"},!1===l("eventDetails.hasEventPast")?(0,r.__)("No one is attending this event yet.","gatherpress"):(0,r.__)("No one went to this event.","gatherpress")),a)},v=({items:e,activeValue:s,limit:n=!1})=>{const r=l("eventDetails.postId"),[o,c]=(0,a.useState)(l("eventDetails.responses"));i({setRsvpResponse:c},r);const p=e.map(((e,a)=>{const{value:r}=e;return r===s?(0,t.createElement)("div",{key:a,className:"gp-rsvp-response__items",id:`gp-rsvp-${r}`,role:"tabpanel","aria-labelledby":`gp-rsvp-${r}-tab`},(0,t.createElement)(m,{value:r,limit:n,responses:o})):""}));return(0,t.createElement)("div",{className:"gp-rsvp-response__content"},p)},u=()=>{const e="attending",s=l("eventDetails.hasEventPast"),n=[{title:!1===s?(0,r.__)("Attending","gatherpress"):(0,r.__)("Went","gatherpress"),value:"attending"},{title:!1===s?(0,r.__)("Waiting List","gatherpress"):(0,r.__)("Wait Listed","gatherpress"),value:"waiting_list"},{title:!1===s?(0,r.__)("Not Attending","gatherpress"):(0,r.__)("Didn't Go","gatherpress"),value:"not_attending"}],[o,c]=(0,a.useState)(e),[m,u]=(0,a.useState)(8);return i({setRsvpStatus:c},l("eventDetails.postId")),n.some((e=>e.value===o))||c(e),(0,t.createElement)("div",{className:"gp-rsvp-response"},(0,t.createElement)(p,{items:n,activeValue:o,onTitleClick:(e,t)=>{e.preventDefault(),c(t)},rsvpLimit:m,setRsvpLimit:u,defaultLimit:8}),(0,t.createElement)(v,{items:n,activeValue:o,limit:m}))};n()((()=>{const e=document.querySelectorAll('[data-gp_block_name="rsvp-response"]');for(let s=0;s array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '73fa6f8b6deb8ce18c34'); + array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '28c8b0073f79ab1397f1'); diff --git a/build/blocks/rsvp/index.js b/build/blocks/rsvp/index.js index 2b8026cb3..9b6d327d2 100644 --- a/build/blocks/rsvp/index.js +++ b/build/blocks/rsvp/index.js @@ -1,2 +1,2 @@ -(()=>{var e,t={9299:(e,t,n)=>{"use strict";const o=window.wp.blocks;var r=n(9196);const i=window.wp.blockEditor;var l=n(3253),a=n.n(l),s=n(3426);const c=s.default||s,u=Math.min,d=Math.max,p=Math.round,f=Math.floor,m=e=>({x:e,y:e}),h={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function v(e,t,n){return d(e,u(t,n))}function g(e,t){return"function"==typeof e?e(t):e}function b(e){return e.split("-")[0]}function w(e){return e.split("-")[1]}function _(e){return"x"===e?"y":"x"}function E(e){return"y"===e?"height":"width"}function x(e){return["top","bottom"].includes(b(e))?"y":"x"}function S(e){return _(x(e))}function O(e){return e.replace(/start|end/g,(e=>y[e]))}function C(e){return e.replace(/left|right|bottom|top/g,(e=>h[e]))}function T(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function k(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function A(e,t,n){let{reference:o,floating:r}=e;const i=x(t),l=S(t),a=E(l),s=b(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(s){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(w(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function N(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=g(t,e),m=T(f),h=a[p?"floating"===d?"reference":"floating":d],y=k(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===d?{...l.floating,x:o,y:r}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},_=k(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:s}):v);return{top:(y.top-_.top+m.top)/w.y,bottom:(_.bottom-y.bottom+m.bottom)/w.y,left:(y.left-_.left+m.left)/w.x,right:(_.right-y.right+m.right)/w.x}}const R=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...y}=g(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=b(r),_=b(a)===a,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),T=p||(_||!h?[C(a)]:function(e){const t=C(e);return[O(e),t,O(t)]}(a));p||"none"===m||T.push(...function(e,t,n,o){const r=w(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(b(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(O)))),i}(a,h,m,x));const k=[a,...T],A=await N(t,y),R=[];let P=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&R.push(A[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=w(e),r=S(e),i=E(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=C(l)),[l,C(l)]}(r,l,x);R.push(A[e[0]],A[e[1]])}if(P=[...P,{placement:r,overflows:R}],!R.every((e=>e<=0))){var M,L;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(L=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(f){case"bestFit":{var D;const e=null==(D=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},P=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=b(n),a=w(n),s="y"===x(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=g(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),s?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},M=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=g(e,t),c={x:n,y:o},u=await N(t,s),d=x(b(r)),p=_(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=v(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";m=v(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function L(e){return I(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(I(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function I(e){return e instanceof Node||e instanceof D(e).Node}function F(e){return e instanceof Element||e instanceof D(e).Element}function H(e){return e instanceof HTMLElement||e instanceof D(e).HTMLElement}function B(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof D(e).ShadowRoot)}function U(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function W(e){return["table","td","th"].includes(L(e))}function z(e){const t=V(),n=$(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function V(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function q(e){return["html","body","#document"].includes(L(e))}function $(e){return D(e).getComputedStyle(e)}function G(e){return F(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function X(e){if("html"===L(e))return e;const t=e.assignedSlot||e.parentNode||B(e)&&e.host||j(e);return B(t)?t.host:t}function Y(e){const t=X(e);return q(t)?e.ownerDocument?e.ownerDocument.body:e.body:H(t)&&U(t)?t:Y(t)}function K(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Y(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=D(r);return i?t.concat(l,l.visualViewport||[],U(r)?r:[],l.frameElement&&n?K(l.frameElement):[]):t.concat(r,K(r,[],n))}function Z(e){const t=$(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=H(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=p(n)!==i||p(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function J(e){return F(e)?e:e.contextElement}function Q(e){const t=J(e);if(!H(t))return m(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Z(t);let l=(i?p(n.width):n.width)/o,a=(i?p(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const ee=m(0);function te(e){const t=D(e);return V()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ee}function ne(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=J(e);let l=m(1);t&&(o?F(o)&&(l=Q(o)):l=Q(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==D(e))&&t}(i,n,o)?te(i):m(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,u=r.width/l.x,d=r.height/l.y;if(i){const e=D(i),t=o&&F(o)?D(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=Q(n),t=n.getBoundingClientRect(),o=$(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=r,c+=i,n=D(n).frameElement}}return k({width:u,height:d,x:s,y:c})}function oe(e){return ne(j(e)).left+G(e).scrollLeft}function re(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=D(e),o=j(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=V();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=j(e),n=G(e),o=e.ownerDocument.body,r=d(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=d(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+oe(e);const a=-n.scrollTop;return"rtl"===$(o).direction&&(l+=d(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(j(e));else if(F(t))o=function(e,t){const n=ne(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=H(e)?Q(e):m(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=te(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return k(o)}function ie(e,t){const n=X(e);return!(n===t||!F(n)||q(n))&&("fixed"===$(n).position||ie(n,t))}function le(e,t,n){const o=H(t),r=j(t),i="fixed"===n,l=ne(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=m(0);if(o||!o&&!i)if(("body"!==L(t)||U(r))&&(a=G(t)),o){const e=ne(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=oe(r));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function ae(e,t){return H(e)&&"fixed"!==$(e).position?t?t(e):e.offsetParent:null}function se(e,t){const n=D(e);if(!H(e))return n;let o=ae(e,t);for(;o&&W(o)&&"static"===$(o).position;)o=ae(o,t);return o&&("html"===L(o)||"body"===L(o)&&"static"===$(o).position&&!z(o))?n:o||function(e){let t=X(e);for(;H(t)&&!q(t);){if(z(t))return t;t=X(t)}return null}(e)||n}const ce={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=H(n),i=j(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=m(1);const s=m(0);if((r||!r&&"fixed"!==o)&&(("body"!==L(n)||U(i))&&(l=G(n)),H(n))){const e=ne(n);a=Q(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=K(e,[],!1).filter((e=>F(e)&&"body"!==L(e))),r=null;const i="fixed"===$(e).position;let l=i?X(e):e;for(;F(l)&&!q(l);){const t=$(l),n=z(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||U(l)&&!n&&ie(e,l))?o=o.filter((e=>e!==l)):r=t,l=X(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=re(t,n,r);return e.top=d(o.top,e.top),e.right=u(o.right,e.right),e.bottom=u(o.bottom,e.bottom),e.left=d(o.left,e.left),e}),re(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:se,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||se,i=this.getDimensions;return{reference:le(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return Z(e)},getScale:Q,isElement:F,isRTL:function(e){return"rtl"===$(e).direction}};const ue=(e,t,n)=>{const o=new Map,r={platform:ce,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=A(c,o,s),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},he={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},ye=(0,r.createContext)({getTooltipData:()=>he});function ve(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(ye).getTooltipData(e)}const ge="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,be=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},we=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(be(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},_e=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:l=[P(Number(r)),R({fallbackAxisSideDirection:"start"}),M({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const s=l;return n?(s.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:d=0}=g(c,e)||{};if(null==s)return{};const p=T(d),f={x:t,y:n},m=S(o),h=E(m),y=await i.getDimensions(s),b="y"===m,_=b?"top":"left",x=b?"bottom":"right",O=b?"clientHeight":"clientWidth",C=r.reference[h]+r.reference[m]-f[m]-r.floating[h],k=f[m]-r.reference[m],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=A?A[O]:0;N&&await(null==i.isElement?void 0:i.isElement(A))||(N=l.floating[O]||r.floating[h]);const R=C/2-k/2,P=N/2-y[h]/2-1,M=u(p[_],P),L=u(p[x],P),D=M,j=N-y[h]-L,I=N/2-y[h]/2+R,F=v(D,I,j),H=!a.arrow&&null!=w(o)&&I!=F&&r.reference[h]/2-(I{var r,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):ue(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var Ee={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},xe={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Se=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:i="dark",anchorId:l,anchorSelect:a,place:s="top",offset:c=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:h="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:P,afterShow:M,afterHide:L,content:D,contentWrapperRef:I,isOpen:F,setIsOpen:H,activeAnchor:B,setActiveAnchor:U,border:W,opacity:z,arrowColor:V,role:q="tooltip"})=>{var $;const G=(0,r.useRef)(null),X=(0,r.useRef)(null),Y=(0,r.useRef)(null),Z=(0,r.useRef)(null),Q=(0,r.useRef)(null),[ee,te]=(0,r.useState)(s),[oe,re]=(0,r.useState)({}),[ie,le]=(0,r.useState)({}),[ae,se]=(0,r.useState)(!1),[ce,ue]=(0,r.useState)(!1),[pe,fe]=(0,r.useState)(null),he=(0,r.useRef)(!1),ye=(0,r.useRef)(null),{anchorRefs:be,setActiveAnchor:Se}=ve(t),Oe=(0,r.useRef)(!1),[Ce,Te]=(0,r.useState)([]),ke=(0,r.useRef)(!1),Ae=m||p.includes("click"),Ne=Ae||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Re=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Ae&&Object.assign(Re,{mouseenter:!1,focus:!1,click:!0});const Pe=k?{...k}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!k&&Ae&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Ne||!1};N&&(Object.assign(Re,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),ge((()=>(ke.current=!0,()=>{ke.current=!1})),[]);const Le=e=>{ke.current&&(e&&ue(!0),setTimeout((()=>{ke.current&&(null==H||H(e),void 0===F&&se(e))}),10))};(0,r.useEffect)((()=>{if(void 0===F)return()=>null;F&&ue(!0);const e=setTimeout((()=>{se(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,r.useEffect)((()=>{if(ae!==he.current)if(Q.current&&clearTimeout(Q.current),he.current=ae,ae)null==M||M();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();Q.current=setTimeout((()=>{ue(!1),fe(null),null==L||L()}),e+25)}}),[ae]);const De=(e=g)=>{Y.current&&clearTimeout(Y.current),Y.current=setTimeout((()=>{Le(!0)}),e)},je=(e=b)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{Oe.current||Le(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return U(null),void Se({current:null});g?De():Le(!0),U(n),Se({current:n}),Z.current&&clearTimeout(Z.current)},Fe=()=>{x?je(b||100):b?je():Le(!1),Y.current&&clearTimeout(Y.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};_e({place:null!==(n=null==pe?void 0:pe.place)&&void 0!==n?n:s,offset:c,elementReference:o,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:y,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),ye.current=n},Ue=e=>{var t;if(!ae)return;const n=e.target;(null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...Ce].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),Y.current&&clearTimeout(Y.current))},We=me(Ie,50,!0),ze=me(Fe,50,!0),Ve=(0,r.useCallback)((()=>{var e,t;const n=null!==(e=null==pe?void 0:pe.position)&&void 0!==e?e:P;n?He(n):w?ye.current&&He(ye.current):(null==B?void 0:B.isConnected)&&_e({place:null!==(t=null==pe?void 0:pe.place)&&void 0!==t?t:s,offset:c,elementReference:B,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:y,border:W}).then((e=>{ke.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place))}))}),[ae,B,D,R,s,null==pe?void 0:pe.place,c,h,P,null==pe?void 0:pe.position,w]);(0,r.useEffect)((()=>{var e,t;const n=new Set(be);Ce.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${l}']`);o&&n.add({current:o});const r=()=>{Le(!1)},i=we(B),a=we(G.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let s=null;Me.resize?window.addEventListener("resize",r):B&&G.current&&(s=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,c=J(e),p=r||i?[...c?K(c):[],...K(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const m=c&&a?function(e,t){let n,o=null;const r=j(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:c,top:p,width:m,height:h}=e.getBoundingClientRect();if(a||t(),!m||!h)return;const y={rootMargin:-f(p)+"px "+-f(r.clientWidth-(c+m))+"px "+-f(r.clientHeight-(p+h))+"px "+-f(c)+"px",threshold:d(0,u(1,s))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),i}(c,n):null;let h,y=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),c&&!s&&v.observe(c),v.observe(t));let g=s?ne(e):null;return s&&function t(){const o=ne(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,h=requestAnimationFrame(t)}(),n(),()=>{p.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),m&&m(),v&&v.disconnect(),v=null,s&&cancelAnimationFrame(h)}}(B,G.current,Ve,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",c),Me.clickOutsideAnchor&&window.addEventListener("click",Ue);const p=[],m=e=>{ae&&(null==e?void 0:e.target)===B||Ie(e)},h=e=>{ae&&(null==e?void 0:e.target)===B&&Fe()},y=["mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Re).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:We}):v.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:ze}):v.includes(e)&&p.push({event:e,listener:h}))})),w&&p.push({event:"mousemove",listener:Be});const g=()=>{Oe.current=!0},b=()=>{Oe.current=!1,Fe()};return x&&!Ne&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.addEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==s||s(),Me.clickOutsideAnchor&&window.removeEventListener("click",Ue),Me.escape&&window.removeEventListener("keydown",c),x&&!Ne&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.removeEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[B,Ve,ce,be,Ce,T,k,A,Ae]),(0,r.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:a)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===t&&n.push(e.target),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(ue(!1),Le(!1),U(null),Y.current&&clearTimeout(Y.current),Z.current&&clearTimeout(Z.current),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[t,a,null==pe?void 0:pe.anchorSelect,B]),(0,r.useEffect)((()=>{Ve()}),[Ve]),(0,r.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ve()))}));return e.observe(I.current),()=>{e.disconnect()}}),[D,null==I?void 0:I.current]),(0,r.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...Ce,t];B&&n.includes(B)||U(null!==(e=Ce[0])&&void 0!==e?e:t)}),[l,Ce,B]),(0,r.useEffect)((()=>()=>{Y.current&&clearTimeout(Y.current),Z.current&&clearTimeout(Z.current)}),[]),(0,r.useEffect)((()=>{var e;let n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:a;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));Te(e)}catch(e){Te([])}}),[t,a,null==pe?void 0:pe.anchorSelect]);const qe=null!==($=null==pe?void 0:pe.content)&&void 0!==$?$:D,$e=ae&&Object.keys(oe).length>0;return(0,r.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):Le(!1)},activeAnchor:B,place:ee,isOpen:Boolean(ce&&!_&&qe&&$e)}))),ce&&!_&&qe?r.createElement(v,{id:t,role:q,className:de("react-tooltip",Ee.tooltip,xe.tooltip,xe[i],n,`react-tooltip__place-${ee}`,Ee[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&Ee.fixed,x&&Ee.clickable),onTransitionEnd:e=>{Q.current&&clearTimeout(Q.current),ae||"opacity"!==e.propertyName||(ue(!1),fe(null),null==L||L())},style:{...R,...oe,opacity:void 0!==z&&$e?z:void 0},ref:G},qe,r.createElement(v,{className:de("react-tooltip-arrow",Ee.arrow,xe.arrow,o,E&&Ee.noArrow),style:{...ie,background:V?`linear-gradient(to right bottom, transparent 50%, ${V} 50%)`:void 0},ref:X})):null},Oe=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Ce=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Te=r.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N=!1,style:R,position:P,isOpen:M,disableStyleInjection:L=!1,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:B,role:U="tooltip"},W)=>{const[z,V]=(0,r.useState)(o),[q,$]=(0,r.useState)(i),[G,X]=(0,r.useState)(u),[Y,K]=(0,r.useState)(c),[Z,J]=(0,r.useState)(d),[Q,ee]=(0,r.useState)(g),[te,ne]=(0,r.useState)(b),[oe,re]=(0,r.useState)(w),[ie,le]=(0,r.useState)(_),[ae,se]=(0,r.useState)(p),[ce,ue]=(0,r.useState)(m),[pe,fe]=(0,r.useState)(y),[me,he]=(0,r.useState)(null),[ye,ge]=(0,r.useState)(null),be=(0,r.useRef)(L),{anchorRefs:we,activeAnchor:_e}=ve(e),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),xe=e=>{const t={place:e=>{var t;X(null!==(t=e)&&void 0!==t?t:u)},content:e=>{V(null!=e?e:o)},html:e=>{$(null!=e?e:i)},variant:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;se(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");ue(null!=t?t:m)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{re(null===e?w:"true"===e)},hidden:e=>{le(null===e?_:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,r.useEffect)((()=>{V(o)}),[o]),(0,r.useEffect)((()=>{$(i)}),[i]),(0,r.useEffect)((()=>{X(u)}),[u]),(0,r.useEffect)((()=>{K(c)}),[c]),(0,r.useEffect)((()=>{J(d)}),[d]),(0,r.useEffect)((()=>{ee(g)}),[g]),(0,r.useEffect)((()=>{ne(b)}),[b]),(0,r.useEffect)((()=>{re(w)}),[w]),(0,r.useEffect)((()=>{le(_)}),[_]),(0,r.useEffect)((()=>{fe(y)}),[y]),(0,r.useEffect)((()=>{be.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,r.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,r.useEffect)((()=>{var o;const r=new Set(we);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&r.add({current:l}),!r.size)return()=>null;const a=null!==(o=null!=ye?ye:l)&&void 0!==o?o:_e.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(a);xe(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Ee(a);xe(e),s.observe(a,c)}return()=>{s.disconnect()}}),[we,_e,ye,t,n]),(0,r.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Ce("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),j&&!Ce("opacity",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`opacity\`.`)}),[]);let Te=f;const ke=(0,r.useRef)(null);if(l){const e=l({content:null!=z?z:null,activeAnchor:ye});Te=e?r.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},e):null}else z&&(Te=z);q&&(Te=r.createElement(Oe,{content:q}));const Ae={forwardRef:W,id:e,anchorId:t,anchorSelect:n,className:de(a,me),classNameArrow:s,content:Te,contentWrapperRef:ke,place:G,variant:Y,offset:Z,wrapper:ae,events:ce,openOnClick:h,positionStrategy:pe,middlewares:v,delayShow:Q,delayHide:te,float:oe,hidden:ie,noArrow:E,clickable:x,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:P,isOpen:M,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:B,activeAnchor:ye,setActiveAnchor:e=>ge(e),role:U};return r.createElement(Se,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||fe({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||fe({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const ke=window.wp.element,Ae=window.wp.i18n,Ne=window.wp.components,Re=window.wp.apiFetch;var Pe=n.n(Re);const Me=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Ae.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,Ae.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Ae.__)("Not Attending","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Ae.__)("Went","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,Ae.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Ae.__)("Didn't Go","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,Ae.__)("Didn't Go","gatherpress")}}};return(0,r.createElement)("div",{className:"gp-status__response"},(0,r.createElement)("span",{className:n[e][t].icon}),(0,r.createElement)("strong",null,n[e][t].text))};function Le(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const De=({eventId:e,currentUser:t="",type:n,enableAnonymousRsvp:o})=>{const[i,l]=(0,ke.useState)(t.status),[s,u]=(0,ke.useState)(Number(t.anonymous)),[d,p]=(0,ke.useState)(t.guests),[f,m]=(0,ke.useState)("hidden"),[h,y]=(0,ke.useState)("false"),[v,g]=(0,ke.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&a().setAppElement(".gp-enabled");const b=e=>{e.preventDefault(),g(!1)},w=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),Pe()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:Le("nonce")}}).then((e=>{if(e.success){l(e.status),p(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&b(t)}}))},_=e=>{switch(e){case"attending":return(0,Ae.__)("You're attending","gatherpress");case"waiting_list":return(0,Ae.__)("You're wait listed","gatherpress");case"not_attending":return(0,Ae.__)("You're not attending","gatherpress")}return(0,Ae.__)("RSVP to this event","gatherpress")};return(0,r.createElement)("div",{className:"gp-rsvp"},(0,r.createElement)(Ne.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":h,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(m("hidden"===f?"show":"hidden"),y("false"===h?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),g(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,Ae.__)("Edit RSVP","gatherpress")}return(0,Ae.__)("RSVP","gatherpress")})(i))),(0,r.createElement)(a(),{isOpen:v,onRequestClose:b,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,Ae.__)("Edit RSVP","gatherpress")},""===t&&(0,r.createElement)((()=>(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},(0,Ae.__)("Login Required","gatherpress")),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},(0,Ae.__)("You must ","gatherpress"),(0,r.createElement)("a",{href:Le("login_url")},(0,Ae.__)("Login","gatherpress")),(0,Ae.__)(" to RSVP to events.","gatherpress")),""!==Le("registration_url")&&(0,r.createElement)("div",{className:"gp-modal__text"},(0,r.createElement)("a",{href:Le("registration_url")},(0,Ae.__)("Register","gatherpress")),(0,Ae.__)(" if you do not have an account.","gatherpress"))),(0,r.createElement)(Ne.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:b,className:"gp-buttons__button wp-block-button__link"},(0,Ae.__)("Close","gatherpress")))))),null),""!==t&&(0,r.createElement)((({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,Ae.__)("Attend","gatherpress")):(t="not_attending",n=(0,Ae.__)("Not Attending","gatherpress")),(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},_(i)?_(i):(0,r.createElement)(Ne.Spinner,null)),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},c((0,Ae.sprintf)(/* translators: %s: button label. */ -(0,Ae.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))),o?(0,r.createElement)("div",{className:"gp-modal__anonymous"},(0,r.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);u(t),w(e,i,t,d,!1)},checked:s}),(0,r.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,Ae.__)("Only admins will see your identity.","gatherpress")},(0,Ae.__)("List me as anonymous.","gatherpress")),(0,r.createElement)(Te,{id:"gp-anonymous-tooltip"})):(0,r.createElement)(r.Fragment,null)),(0,r.createElement)(Ne.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,r.createElement)("a",{href:"#",onClick:e=>w(e,t,s),className:"gp-buttons__button wp-block-button__link"},n)),(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:b,className:"gp-buttons__button wp-block-button__link"},(0,Ae.__)("Close","gatherpress")))))}),{status:i}))),"no_status"!==i&&(0,r.createElement)("div",{className:"gp-status"},(0,r.createElement)(Me,{type:n,status:i}),0{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},Ie=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/rsvp","version":"1.0.0","title":"RSVP","category":"gatherpress","icon":"insert","example":{},"description":"Enables members to easily confirm their attendance for an event.","attributes":{"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./rsvp.js","render":"file:./render.php"}');(0,o.registerBlockType)(Ie,{edit:()=>{const e=(0,i.useBlockProps)(),t=Le("post_id"),n=Le("current_user");return(0,r.createElement)("div",{...e},(0,r.createElement)(je,null,(0,r.createElement)(De,{eventId:t,currentUser:n,type:"upcoming"})))},save:()=>null})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);r(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new l.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function _(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?x(e.children):[];var l=new f(o);o.forEach((function(e){return e.parent=l})),n=l}else if(_(e)){o=t?x(e.children):[];var a=new m(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return l.test(e)||null===(t=null==(y=m.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=m.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),m.querySelectorAll(n);case o:case r:var h=s(e).querySelectorAll(p);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(y=s(e,r).querySelector(r)).childNodes;var y}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=s(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=s("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),i=o(n(484)),l=n(4606),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(v=d(v,{key:v.key||h})),o.push(c(v,y,h));continue}}if("text"!==y.type){var g=y,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(y.name,b,w),y,h))}else{var _=!y.data.trim().length;if(_&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if((null==n?void 0:n.trim)&&_)continue;o.push(c(y.data,y,h))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var l=o(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=s.source}h.prototype.content=e;var y=[];function v(t){var n=new Error(s.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=p,n.source=e,!s.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(_(),!g(i))return v("property missing ':'");var o=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,l){if(l!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==a){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,l=i&&i().ownerDocument||document;r&&d.add(l.body,r),o&&d.add(l.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,l=e.children,a=n?{}:i.content,s=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,l);return this.props.overlayElement(c,d)}}]),t}(l.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){l&&(l.removeAttribute?l.removeAttribute("aria-hidden"):null!=l.length?l.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(l).forEach((function(e){return e.removeAttribute("aria-hidden")}))),l=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return l=t||l},t.validateElement=s,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){l=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),l=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function s(e){var t=e||l;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,l],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var l in o)r(i,o[l]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=s,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",s,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",s),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",s),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",s),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],l=null,a=!1;function s(){a=!0}function c(){if(a){if(a=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,r.default)(l)[0]||l).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,l=t.shiftKey,a=n[0],s=n[n.length-1],c=i();if(e===c){if(!l)return;o=s}if(s!==c||l||(o=a),a===c&&l&&(o=s),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=l?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=l?s:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(l)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(o,a))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var l=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[s])))?n.splice(s--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={498:0,939:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[l,a,s]=n,c=0;if(l.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(s)var u=s(o)}for(t&&t(n);co(9299)));r=o.O(r)})(); \ No newline at end of file +(()=>{var e,t={9299:(e,t,n)=>{"use strict";const o=window.wp.blocks;var r=n(9196);const i=window.wp.blockEditor;var l=n(3253),a=n.n(l),s=n(3426);const c=s.default||s,u=Math.min,d=Math.max,p=Math.round,f=Math.floor,m=e=>({x:e,y:e}),h={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function v(e,t,n){return d(e,u(t,n))}function g(e,t){return"function"==typeof e?e(t):e}function b(e){return e.split("-")[0]}function w(e){return e.split("-")[1]}function _(e){return"x"===e?"y":"x"}function E(e){return"y"===e?"height":"width"}function x(e){return["top","bottom"].includes(b(e))?"y":"x"}function S(e){return _(x(e))}function O(e){return e.replace(/start|end/g,(e=>y[e]))}function C(e){return e.replace(/left|right|bottom|top/g,(e=>h[e]))}function T(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function k(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function A(e,t,n){let{reference:o,floating:r}=e;const i=x(t),l=S(t),a=E(l),s=b(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(s){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(w(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function N(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=g(t,e),m=T(f),h=a[p?"floating"===d?"reference":"floating":d],y=k(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===d?{...l.floating,x:o,y:r}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},_=k(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:s}):v);return{top:(y.top-_.top+m.top)/w.y,bottom:(_.bottom-y.bottom+m.bottom)/w.y,left:(y.left-_.left+m.left)/w.x,right:(_.right-y.right+m.right)/w.x}}const R=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...y}=g(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=b(r),_=b(a)===a,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),T=p||(_||!h?[C(a)]:function(e){const t=C(e);return[O(e),t,O(t)]}(a));p||"none"===m||T.push(...function(e,t,n,o){const r=w(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(b(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(O)))),i}(a,h,m,x));const k=[a,...T],A=await N(t,y),R=[];let P=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&R.push(A[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=w(e),r=S(e),i=E(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=C(l)),[l,C(l)]}(r,l,x);R.push(A[e[0]],A[e[1]])}if(P=[...P,{placement:r,overflows:R}],!R.every((e=>e<=0))){var M,L;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(L=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(f){case"bestFit":{var D;const e=null==(D=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},P=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=b(n),a=w(n),s="y"===x(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=g(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),s?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},M=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=g(e,t),c={x:n,y:o},u=await N(t,s),d=x(b(r)),p=_(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=v(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";m=v(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function L(e){return I(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(I(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function I(e){return e instanceof Node||e instanceof D(e).Node}function F(e){return e instanceof Element||e instanceof D(e).Element}function H(e){return e instanceof HTMLElement||e instanceof D(e).HTMLElement}function B(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof D(e).ShadowRoot)}function U(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function W(e){return["table","td","th"].includes(L(e))}function z(e){const t=V(),n=$(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function V(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function q(e){return["html","body","#document"].includes(L(e))}function $(e){return D(e).getComputedStyle(e)}function G(e){return F(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function X(e){if("html"===L(e))return e;const t=e.assignedSlot||e.parentNode||B(e)&&e.host||j(e);return B(t)?t.host:t}function Y(e){const t=X(e);return q(t)?e.ownerDocument?e.ownerDocument.body:e.body:H(t)&&U(t)?t:Y(t)}function K(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Y(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=D(r);return i?t.concat(l,l.visualViewport||[],U(r)?r:[],l.frameElement&&n?K(l.frameElement):[]):t.concat(r,K(r,[],n))}function Z(e){const t=$(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=H(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=p(n)!==i||p(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function J(e){return F(e)?e:e.contextElement}function Q(e){const t=J(e);if(!H(t))return m(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Z(t);let l=(i?p(n.width):n.width)/o,a=(i?p(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const ee=m(0);function te(e){const t=D(e);return V()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ee}function ne(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=J(e);let l=m(1);t&&(o?F(o)&&(l=Q(o)):l=Q(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==D(e))&&t}(i,n,o)?te(i):m(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,u=r.width/l.x,d=r.height/l.y;if(i){const e=D(i),t=o&&F(o)?D(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=Q(n),t=n.getBoundingClientRect(),o=$(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=r,c+=i,n=D(n).frameElement}}return k({width:u,height:d,x:s,y:c})}function oe(e){return ne(j(e)).left+G(e).scrollLeft}function re(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=D(e),o=j(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=V();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=j(e),n=G(e),o=e.ownerDocument.body,r=d(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=d(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+oe(e);const a=-n.scrollTop;return"rtl"===$(o).direction&&(l+=d(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(j(e));else if(F(t))o=function(e,t){const n=ne(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=H(e)?Q(e):m(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=te(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return k(o)}function ie(e,t){const n=X(e);return!(n===t||!F(n)||q(n))&&("fixed"===$(n).position||ie(n,t))}function le(e,t,n){const o=H(t),r=j(t),i="fixed"===n,l=ne(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=m(0);if(o||!o&&!i)if(("body"!==L(t)||U(r))&&(a=G(t)),o){const e=ne(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=oe(r));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function ae(e,t){return H(e)&&"fixed"!==$(e).position?t?t(e):e.offsetParent:null}function se(e,t){const n=D(e);if(!H(e))return n;let o=ae(e,t);for(;o&&W(o)&&"static"===$(o).position;)o=ae(o,t);return o&&("html"===L(o)||"body"===L(o)&&"static"===$(o).position&&!z(o))?n:o||function(e){let t=X(e);for(;H(t)&&!q(t);){if(z(t))return t;t=X(t)}return null}(e)||n}const ce={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=H(n),i=j(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=m(1);const s=m(0);if((r||!r&&"fixed"!==o)&&(("body"!==L(n)||U(i))&&(l=G(n)),H(n))){const e=ne(n);a=Q(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=K(e,[],!1).filter((e=>F(e)&&"body"!==L(e))),r=null;const i="fixed"===$(e).position;let l=i?X(e):e;for(;F(l)&&!q(l);){const t=$(l),n=z(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||U(l)&&!n&&ie(e,l))?o=o.filter((e=>e!==l)):r=t,l=X(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=re(t,n,r);return e.top=d(o.top,e.top),e.right=u(o.right,e.right),e.bottom=u(o.bottom,e.bottom),e.left=d(o.left,e.left),e}),re(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:se,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||se,i=this.getDimensions;return{reference:le(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return Z(e)},getScale:Q,isElement:F,isRTL:function(e){return"rtl"===$(e).direction}};const ue=(e,t,n)=>{const o=new Map,r={platform:ce,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=A(c,o,s),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},he={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},ye=(0,r.createContext)({getTooltipData:()=>he});function ve(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(ye).getTooltipData(e)}const ge="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,be=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},we=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(be(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},_e=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:l=[P(Number(r)),R({fallbackAxisSideDirection:"start"}),M({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const s=l;return n?(s.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:d=0}=g(c,e)||{};if(null==s)return{};const p=T(d),f={x:t,y:n},m=S(o),h=E(m),y=await i.getDimensions(s),b="y"===m,_=b?"top":"left",x=b?"bottom":"right",O=b?"clientHeight":"clientWidth",C=r.reference[h]+r.reference[m]-f[m]-r.floating[h],k=f[m]-r.reference[m],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=A?A[O]:0;N&&await(null==i.isElement?void 0:i.isElement(A))||(N=l.floating[O]||r.floating[h]);const R=C/2-k/2,P=N/2-y[h]/2-1,M=u(p[_],P),L=u(p[x],P),D=M,j=N-y[h]-L,I=N/2-y[h]/2+R,F=v(D,I,j),H=!a.arrow&&null!=w(o)&&I!=F&&r.reference[h]/2-(I{var r,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):ue(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var Ee={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},xe={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Se=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:i="dark",anchorId:l,anchorSelect:a,place:s="top",offset:c=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:h="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:P,afterShow:M,afterHide:L,content:D,contentWrapperRef:I,isOpen:F,setIsOpen:H,activeAnchor:B,setActiveAnchor:U,border:W,opacity:z,arrowColor:V,role:q="tooltip"})=>{var $;const G=(0,r.useRef)(null),X=(0,r.useRef)(null),Y=(0,r.useRef)(null),Z=(0,r.useRef)(null),Q=(0,r.useRef)(null),[ee,te]=(0,r.useState)(s),[oe,re]=(0,r.useState)({}),[ie,le]=(0,r.useState)({}),[ae,se]=(0,r.useState)(!1),[ce,ue]=(0,r.useState)(!1),[pe,fe]=(0,r.useState)(null),he=(0,r.useRef)(!1),ye=(0,r.useRef)(null),{anchorRefs:be,setActiveAnchor:Se}=ve(t),Oe=(0,r.useRef)(!1),[Ce,Te]=(0,r.useState)([]),ke=(0,r.useRef)(!1),Ae=m||p.includes("click"),Ne=Ae||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Re=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Ae&&Object.assign(Re,{mouseenter:!1,focus:!1,click:!0});const Pe=k?{...k}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!k&&Ae&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Ne||!1};N&&(Object.assign(Re,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),ge((()=>(ke.current=!0,()=>{ke.current=!1})),[]);const Le=e=>{ke.current&&(e&&ue(!0),setTimeout((()=>{ke.current&&(null==H||H(e),void 0===F&&se(e))}),10))};(0,r.useEffect)((()=>{if(void 0===F)return()=>null;F&&ue(!0);const e=setTimeout((()=>{se(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,r.useEffect)((()=>{if(ae!==he.current)if(Q.current&&clearTimeout(Q.current),he.current=ae,ae)null==M||M();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();Q.current=setTimeout((()=>{ue(!1),fe(null),null==L||L()}),e+25)}}),[ae]);const De=(e=g)=>{Y.current&&clearTimeout(Y.current),Y.current=setTimeout((()=>{Le(!0)}),e)},je=(e=b)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{Oe.current||Le(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return U(null),void Se({current:null});g?De():Le(!0),U(n),Se({current:n}),Z.current&&clearTimeout(Z.current)},Fe=()=>{x?je(b||100):b?je():Le(!1),Y.current&&clearTimeout(Y.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};_e({place:null!==(n=null==pe?void 0:pe.place)&&void 0!==n?n:s,offset:c,elementReference:o,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:y,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),ye.current=n},Ue=e=>{var t;if(!ae)return;const n=e.target;(null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...Ce].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),Y.current&&clearTimeout(Y.current))},We=me(Ie,50,!0),ze=me(Fe,50,!0),Ve=(0,r.useCallback)((()=>{var e,t;const n=null!==(e=null==pe?void 0:pe.position)&&void 0!==e?e:P;n?He(n):w?ye.current&&He(ye.current):(null==B?void 0:B.isConnected)&&_e({place:null!==(t=null==pe?void 0:pe.place)&&void 0!==t?t:s,offset:c,elementReference:B,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:y,border:W}).then((e=>{ke.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place))}))}),[ae,B,D,R,s,null==pe?void 0:pe.place,c,h,P,null==pe?void 0:pe.position,w]);(0,r.useEffect)((()=>{var e,t;const n=new Set(be);Ce.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${l}']`);o&&n.add({current:o});const r=()=>{Le(!1)},i=we(B),a=we(G.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let s=null;Me.resize?window.addEventListener("resize",r):B&&G.current&&(s=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,c=J(e),p=r||i?[...c?K(c):[],...K(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const m=c&&a?function(e,t){let n,o=null;const r=j(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:c,top:p,width:m,height:h}=e.getBoundingClientRect();if(a||t(),!m||!h)return;const y={rootMargin:-f(p)+"px "+-f(r.clientWidth-(c+m))+"px "+-f(r.clientHeight-(p+h))+"px "+-f(c)+"px",threshold:d(0,u(1,s))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),i}(c,n):null;let h,y=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),c&&!s&&v.observe(c),v.observe(t));let g=s?ne(e):null;return s&&function t(){const o=ne(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,h=requestAnimationFrame(t)}(),n(),()=>{p.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),m&&m(),v&&v.disconnect(),v=null,s&&cancelAnimationFrame(h)}}(B,G.current,Ve,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",c),Me.clickOutsideAnchor&&window.addEventListener("click",Ue);const p=[],m=e=>{ae&&(null==e?void 0:e.target)===B||Ie(e)},h=e=>{ae&&(null==e?void 0:e.target)===B&&Fe()},y=["mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Re).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:We}):v.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:ze}):v.includes(e)&&p.push({event:e,listener:h}))})),w&&p.push({event:"mousemove",listener:Be});const g=()=>{Oe.current=!0},b=()=>{Oe.current=!1,Fe()};return x&&!Ne&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.addEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==s||s(),Me.clickOutsideAnchor&&window.removeEventListener("click",Ue),Me.escape&&window.removeEventListener("keydown",c),x&&!Ne&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.removeEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[B,Ve,ce,be,Ce,T,k,A,Ae]),(0,r.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:a)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===t&&n.push(e.target),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(ue(!1),Le(!1),U(null),Y.current&&clearTimeout(Y.current),Z.current&&clearTimeout(Z.current),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[t,a,null==pe?void 0:pe.anchorSelect,B]),(0,r.useEffect)((()=>{Ve()}),[Ve]),(0,r.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ve()))}));return e.observe(I.current),()=>{e.disconnect()}}),[D,null==I?void 0:I.current]),(0,r.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...Ce,t];B&&n.includes(B)||U(null!==(e=Ce[0])&&void 0!==e?e:t)}),[l,Ce,B]),(0,r.useEffect)((()=>()=>{Y.current&&clearTimeout(Y.current),Z.current&&clearTimeout(Z.current)}),[]),(0,r.useEffect)((()=>{var e;let n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:a;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));Te(e)}catch(e){Te([])}}),[t,a,null==pe?void 0:pe.anchorSelect]);const qe=null!==($=null==pe?void 0:pe.content)&&void 0!==$?$:D,$e=ae&&Object.keys(oe).length>0;return(0,r.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):Le(!1)},activeAnchor:B,place:ee,isOpen:Boolean(ce&&!_&&qe&&$e)}))),ce&&!_&&qe?r.createElement(v,{id:t,role:q,className:de("react-tooltip",Ee.tooltip,xe.tooltip,xe[i],n,`react-tooltip__place-${ee}`,Ee[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&Ee.fixed,x&&Ee.clickable),onTransitionEnd:e=>{Q.current&&clearTimeout(Q.current),ae||"opacity"!==e.propertyName||(ue(!1),fe(null),null==L||L())},style:{...R,...oe,opacity:void 0!==z&&$e?z:void 0},ref:G},qe,r.createElement(v,{className:de("react-tooltip-arrow",Ee.arrow,xe.arrow,o,E&&Ee.noArrow),style:{...ie,background:V?`linear-gradient(to right bottom, transparent 50%, ${V} 50%)`:void 0},ref:X})):null},Oe=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Ce=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Te=r.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N=!1,style:R,position:P,isOpen:M,disableStyleInjection:L=!1,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:B,role:U="tooltip"},W)=>{const[z,V]=(0,r.useState)(o),[q,$]=(0,r.useState)(i),[G,X]=(0,r.useState)(u),[Y,K]=(0,r.useState)(c),[Z,J]=(0,r.useState)(d),[Q,ee]=(0,r.useState)(g),[te,ne]=(0,r.useState)(b),[oe,re]=(0,r.useState)(w),[ie,le]=(0,r.useState)(_),[ae,se]=(0,r.useState)(p),[ce,ue]=(0,r.useState)(m),[pe,fe]=(0,r.useState)(y),[me,he]=(0,r.useState)(null),[ye,ge]=(0,r.useState)(null),be=(0,r.useRef)(L),{anchorRefs:we,activeAnchor:_e}=ve(e),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),xe=e=>{const t={place:e=>{var t;X(null!==(t=e)&&void 0!==t?t:u)},content:e=>{V(null!=e?e:o)},html:e=>{$(null!=e?e:i)},variant:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;se(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");ue(null!=t?t:m)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{re(null===e?w:"true"===e)},hidden:e=>{le(null===e?_:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,r.useEffect)((()=>{V(o)}),[o]),(0,r.useEffect)((()=>{$(i)}),[i]),(0,r.useEffect)((()=>{X(u)}),[u]),(0,r.useEffect)((()=>{K(c)}),[c]),(0,r.useEffect)((()=>{J(d)}),[d]),(0,r.useEffect)((()=>{ee(g)}),[g]),(0,r.useEffect)((()=>{ne(b)}),[b]),(0,r.useEffect)((()=>{re(w)}),[w]),(0,r.useEffect)((()=>{le(_)}),[_]),(0,r.useEffect)((()=>{fe(y)}),[y]),(0,r.useEffect)((()=>{be.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,r.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,r.useEffect)((()=>{var o;const r=new Set(we);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&r.add({current:l}),!r.size)return()=>null;const a=null!==(o=null!=ye?ye:l)&&void 0!==o?o:_e.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(a);xe(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Ee(a);xe(e),s.observe(a,c)}return()=>{s.disconnect()}}),[we,_e,ye,t,n]),(0,r.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Ce("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),j&&!Ce("opacity",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`opacity\`.`)}),[]);let Te=f;const ke=(0,r.useRef)(null);if(l){const e=l({content:null!=z?z:null,activeAnchor:ye});Te=e?r.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},e):null}else z&&(Te=z);q&&(Te=r.createElement(Oe,{content:q}));const Ae={forwardRef:W,id:e,anchorId:t,anchorSelect:n,className:de(a,me),classNameArrow:s,content:Te,contentWrapperRef:ke,place:G,variant:Y,offset:Z,wrapper:ae,events:ce,openOnClick:h,positionStrategy:pe,middlewares:v,delayShow:Q,delayHide:te,float:oe,hidden:ie,noArrow:E,clickable:x,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:P,isOpen:M,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:B,activeAnchor:ye,setActiveAnchor:e=>ge(e),role:U};return r.createElement(Se,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||fe({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||fe({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const ke=window.wp.element,Ae=window.wp.i18n,Ne=window.wp.components,Re=window.wp.apiFetch;var Pe=n.n(Re);const Me=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Ae.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,Ae.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Ae.__)("Not Attending","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Ae.__)("Went","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,Ae.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Ae.__)("Didn't Go","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,Ae.__)("Didn't Go","gatherpress")}}};return(0,r.createElement)("div",{className:"gp-status__response"},(0,r.createElement)("span",{className:n[e][t].icon}),(0,r.createElement)("strong",null,n[e][t].text))};function Le(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const De=({eventId:e,currentUser:t="",type:n,enableAnonymousRsvp:o})=>{const[i,l]=(0,ke.useState)(t.status),[s,u]=(0,ke.useState)(Number(t.anonymous)),[d,p]=(0,ke.useState)(t.guests),[f,m]=(0,ke.useState)("hidden"),[h,y]=(0,ke.useState)("false"),[v,g]=(0,ke.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&a().setAppElement(".gp-enabled");const b=e=>{e.preventDefault(),g(!1)},w=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),Pe()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:Le("misc.nonce")}}).then((e=>{if(e.success){l(e.status),p(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&b(t)}}))},_=e=>{switch(e){case"attending":return(0,Ae.__)("You're attending","gatherpress");case"waiting_list":return(0,Ae.__)("You're wait listed","gatherpress");case"not_attending":return(0,Ae.__)("You're not attending","gatherpress")}return(0,Ae.__)("RSVP to this event","gatherpress")};return(0,r.createElement)("div",{className:"gp-rsvp"},(0,r.createElement)(Ne.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":h,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(m("hidden"===f?"show":"hidden"),y("false"===h?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),g(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,Ae.__)("Edit RSVP","gatherpress")}return(0,Ae.__)("RSVP","gatherpress")})(i))),(0,r.createElement)(a(),{isOpen:v,onRequestClose:b,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,Ae.__)("Edit RSVP","gatherpress")},""===t&&(0,r.createElement)((()=>(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},(0,Ae.__)("Login Required","gatherpress")),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},(0,Ae.__)("You must ","gatherpress"),(0,r.createElement)("a",{href:Le("urls.loginUrl")},(0,Ae.__)("Login","gatherpress")),(0,Ae.__)(" to RSVP to events.","gatherpress")),""!==Le("urls.registrationUrl")&&(0,r.createElement)("div",{className:"gp-modal__text"},(0,r.createElement)("a",{href:Le("urls.registrationUrl")},(0,Ae.__)("Register","gatherpress")),(0,Ae.__)(" if you do not have an account.","gatherpress"))),(0,r.createElement)(Ne.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:b,className:"gp-buttons__button wp-block-button__link"},(0,Ae.__)("Close","gatherpress")))))),null),""!==t&&(0,r.createElement)((({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,Ae.__)("Attend","gatherpress")):(t="not_attending",n=(0,Ae.__)("Not Attending","gatherpress")),(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},_(i)?_(i):(0,r.createElement)(Ne.Spinner,null)),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},c((0,Ae.sprintf)(/* translators: %s: button label. */ +(0,Ae.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))),o?(0,r.createElement)("div",{className:"gp-modal__anonymous"},(0,r.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);u(t),w(e,i,t,d,!1)},checked:s}),(0,r.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,Ae.__)("Only admins will see your identity.","gatherpress")},(0,Ae.__)("List me as anonymous.","gatherpress")),(0,r.createElement)(Te,{id:"gp-anonymous-tooltip"})):(0,r.createElement)(r.Fragment,null)),(0,r.createElement)(Ne.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,r.createElement)("a",{href:"#",onClick:e=>w(e,t,s),className:"gp-buttons__button wp-block-button__link"},n)),(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:b,className:"gp-buttons__button wp-block-button__link"},(0,Ae.__)("Close","gatherpress")))))}),{status:i}))),"no_status"!==i&&(0,r.createElement)("div",{className:"gp-status"},(0,r.createElement)(Me,{type:n,status:i}),0{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},Ie=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/rsvp","version":"1.0.0","title":"RSVP","category":"gatherpress","icon":"insert","example":{},"description":"Enables members to easily confirm their attendance for an event.","attributes":{"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./rsvp.js","render":"file:./render.php"}');(0,o.registerBlockType)(Ie,{edit:()=>{const e=(0,i.useBlockProps)(),t=Le("eventDetails.postId"),n=Le("eventDetails.currentUser");return(0,r.createElement)("div",{...e},(0,r.createElement)(je,null,(0,r.createElement)(De,{eventId:t,currentUser:n,type:"upcoming"})))},save:()=>null})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);r(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new l.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function _(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?x(e.children):[];var l=new f(o);o.forEach((function(e){return e.parent=l})),n=l}else if(_(e)){o=t?x(e.children):[];var a=new m(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return l.test(e)||null===(t=null==(y=m.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=m.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),m.querySelectorAll(n);case o:case r:var h=s(e).querySelectorAll(p);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(y=s(e,r).querySelector(r)).childNodes;var y}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=s(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=s("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),i=o(n(484)),l=n(4606),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(v=d(v,{key:v.key||h})),o.push(c(v,y,h));continue}}if("text"!==y.type){var g=y,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(y.name,b,w),y,h))}else{var _=!y.data.trim().length;if(_&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if((null==n?void 0:n.trim)&&_)continue;o.push(c(y.data,y,h))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var l=o(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=s.source}h.prototype.content=e;var y=[];function v(t){var n=new Error(s.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=p,n.source=e,!s.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(_(),!g(i))return v("property missing ':'");var o=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,l){if(l!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==a){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,l=i&&i().ownerDocument||document;r&&d.add(l.body,r),o&&d.add(l.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,l=e.children,a=n?{}:i.content,s=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,l);return this.props.overlayElement(c,d)}}]),t}(l.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){l&&(l.removeAttribute?l.removeAttribute("aria-hidden"):null!=l.length?l.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(l).forEach((function(e){return e.removeAttribute("aria-hidden")}))),l=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return l=t||l},t.validateElement=s,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){l=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),l=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function s(e){var t=e||l;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,l],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var l in o)r(i,o[l]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=s,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",s,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",s),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",s),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",s),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],l=null,a=!1;function s(){a=!0}function c(){if(a){if(a=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,r.default)(l)[0]||l).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,l=t.shiftKey,a=n[0],s=n[n.length-1],c=i();if(e===c){if(!l)return;o=s}if(s!==c||l||(o=a),a===c&&l&&(o=s),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=l?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=l?s:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(l)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(o,a))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var l=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[s])))?n.splice(s--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={498:0,939:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[l,a,s]=n,c=0;if(l.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(s)var u=s(o)}for(t&&t(n);co(9299)));r=o.O(r)})(); \ No newline at end of file diff --git a/build/blocks/rsvp/rsvp.asset.php b/build/blocks/rsvp/rsvp.asset.php index fe0e9278a..42ad0617b 100644 --- a/build/blocks/rsvp/rsvp.asset.php +++ b/build/blocks/rsvp/rsvp.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '65433b4e1a5e00a44efb'); + array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '553a14b837989606e72d'); diff --git a/build/blocks/rsvp/rsvp.js b/build/blocks/rsvp/rsvp.js index 569b2b74c..3d48393d4 100644 --- a/build/blocks/rsvp/rsvp.js +++ b/build/blocks/rsvp/rsvp.js @@ -1,2 +1,2 @@ -(()=>{var e={9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);r(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new l.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function _(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?x(e.children):[];var l=new f(o);o.forEach((function(e){return e.parent=l})),n=l}else if(_(e)){o=t?x(e.children):[];var a=new m(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return l.test(e)||null===(t=null==(y=m.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=m.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),m.querySelectorAll(n);case o:case r:var h=s(e).querySelectorAll(p);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(y=s(e,r).querySelector(r)).childNodes;var y}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=s(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=s("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),i=o(n(484)),l=n(4606),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(v=d(v,{key:v.key||h})),o.push(c(v,y,h));continue}}if("text"!==y.type){var g=y,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(y.name,b,w),y,h))}else{var _=!y.data.trim().length;if(_&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if((null==n?void 0:n.trim)&&_)continue;o.push(c(y.data,y,h))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var l=o(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=s.source}h.prototype.content=e;var y=[];function v(t){var n=new Error(s.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=p,n.source=e,!s.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(_(),!g(i))return v("property missing ':'");var o=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,l){if(l!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==a){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,l=i&&i().ownerDocument||document;r&&d.add(l.body,r),o&&d.add(l.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,l=e.children,a=n?{}:i.content,s=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,l);return this.props.overlayElement(c,d)}}]),t}(l.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){l&&(l.removeAttribute?l.removeAttribute("aria-hidden"):null!=l.length?l.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(l).forEach((function(e){return e.removeAttribute("aria-hidden")}))),l=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return l=t||l},t.validateElement=s,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){l=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),l=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function s(e){var t=e||l;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,l],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var l in o)r(i,o[l]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=s,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",s,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",s),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",s),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",s),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],l=null,a=!1;function s(){a=!0}function c(){if(a){if(a=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,r.default)(l)[0]||l).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,l=t.shiftKey,a=n[0],s=n[n.length-1],c=i();if(e===c){if(!l)return;o=s}if(s!==c||l||(o=a),a===c&&l&&(o=s),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=l?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=l?s:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(l)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(o,a))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=n(9196);const t=window.wp.domReady;var o=n.n(t);const r=window.wp.element;var i=n(3253),l=n.n(i),a=n(3426);const s=a.default||a,c=Math.min,u=Math.max,d=Math.round,p=Math.floor,f=e=>({x:e,y:e}),m={left:"right",right:"left",bottom:"top",top:"bottom"},h={start:"end",end:"start"};function y(e,t,n){return u(e,c(t,n))}function v(e,t){return"function"==typeof e?e(t):e}function g(e){return e.split("-")[0]}function b(e){return e.split("-")[1]}function w(e){return"x"===e?"y":"x"}function _(e){return"y"===e?"height":"width"}function E(e){return["top","bottom"].includes(g(e))?"y":"x"}function x(e){return w(E(e))}function S(e){return e.replace(/start|end/g,(e=>h[e]))}function O(e){return e.replace(/left|right|bottom|top/g,(e=>m[e]))}function C(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function T(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function k(e,t,n){let{reference:o,floating:r}=e;const i=E(t),l=x(t),a=_(l),s=g(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(s){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(b(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function A(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=v(t,e),m=C(f),h=a[p?"floating"===d?"reference":"floating":d],y=T(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{...l.floating,x:o,y:r}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},_=T(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:s}):g);return{top:(y.top-_.top+m.top)/w.y,bottom:(_.bottom-y.bottom+m.bottom)/w.y,left:(y.left-_.left+m.left)/w.x,right:(_.right-y.right+m.right)/w.x}}const R=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...y}=v(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const w=g(r),E=g(a)===a,C=await(null==s.isRTL?void 0:s.isRTL(c.floating)),T=p||(E||!h?[O(a)]:function(e){const t=O(e);return[S(e),t,S(t)]}(a));p||"none"===m||T.push(...function(e,t,n,o){const r=b(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(g(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(S)))),i}(a,h,m,C));const k=[a,...T],R=await A(t,y),N=[];let P=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&N.push(R[w]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=b(e),r=x(e),i=_(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=O(l)),[l,O(l)]}(r,l,C);N.push(R[e[0]],R[e[1]])}if(P=[...P,{placement:r,overflows:N}],!N.every((e=>e<=0))){var M,L;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(L=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(f){case"bestFit":{var D;const e=null==(D=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},N=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=g(n),a=b(n),s="y"===E(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=v(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),s?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},P=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=v(e,t),c={x:n,y:o},u=await A(t,s),d=E(g(r)),p=w(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=y(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";m=y(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function M(e){return j(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function D(e){var t;return null==(t=(j(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function j(e){return e instanceof Node||e instanceof L(e).Node}function I(e){return e instanceof Element||e instanceof L(e).Element}function F(e){return e instanceof HTMLElement||e instanceof L(e).HTMLElement}function H(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof L(e).ShadowRoot)}function B(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function U(e){return["table","td","th"].includes(M(e))}function W(e){const t=z(),n=V(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function z(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function q(e){return["html","body","#document"].includes(M(e))}function V(e){return L(e).getComputedStyle(e)}function $(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function G(e){if("html"===M(e))return e;const t=e.assignedSlot||e.parentNode||H(e)&&e.host||D(e);return H(t)?t.host:t}function X(e){const t=G(e);return q(t)?e.ownerDocument?e.ownerDocument.body:e.body:F(t)&&B(t)?t:X(t)}function Y(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=X(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=L(r);return i?t.concat(l,l.visualViewport||[],B(r)?r:[],l.frameElement&&n?Y(l.frameElement):[]):t.concat(r,Y(r,[],n))}function K(e){const t=V(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=F(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=d(n)!==i||d(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function Z(e){return I(e)?e:e.contextElement}function J(e){const t=Z(e);if(!F(t))return f(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=K(t);let l=(i?d(n.width):n.width)/o,a=(i?d(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Q=f(0);function ee(e){const t=L(e);return z()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Q}function te(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Z(e);let l=f(1);t&&(o?I(o)&&(l=J(o)):l=J(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==L(e))&&t}(i,n,o)?ee(i):f(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,u=r.width/l.x,d=r.height/l.y;if(i){const e=L(i),t=o&&I(o)?L(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=J(n),t=n.getBoundingClientRect(),o=V(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=r,c+=i,n=L(n).frameElement}}return T({width:u,height:d,x:s,y:c})}function ne(e){return te(D(e)).left+$(e).scrollLeft}function oe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=L(e),o=D(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=z();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=D(e),n=$(e),o=e.ownerDocument.body,r=u(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=u(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+ne(e);const a=-n.scrollTop;return"rtl"===V(o).direction&&(l+=u(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(D(e));else if(I(t))o=function(e,t){const n=te(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=F(e)?J(e):f(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ee(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return T(o)}function re(e,t){const n=G(e);return!(n===t||!I(n)||q(n))&&("fixed"===V(n).position||re(n,t))}function ie(e,t,n){const o=F(t),r=D(t),i="fixed"===n,l=te(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=f(0);if(o||!o&&!i)if(("body"!==M(t)||B(r))&&(a=$(t)),o){const e=te(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=ne(r));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function le(e,t){return F(e)&&"fixed"!==V(e).position?t?t(e):e.offsetParent:null}function ae(e,t){const n=L(e);if(!F(e))return n;let o=le(e,t);for(;o&&U(o)&&"static"===V(o).position;)o=le(o,t);return o&&("html"===M(o)||"body"===M(o)&&"static"===V(o).position&&!W(o))?n:o||function(e){let t=G(e);for(;F(t)&&!q(t);){if(W(t))return t;t=G(t)}return null}(e)||n}const se={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=F(n),i=D(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=f(1);const s=f(0);if((r||!r&&"fixed"!==o)&&(("body"!==M(n)||B(i))&&(l=$(n)),F(n))){const e=te(n);a=J(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:D,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=Y(e,[],!1).filter((e=>I(e)&&"body"!==M(e))),r=null;const i="fixed"===V(e).position;let l=i?G(e):e;for(;I(l)&&!q(l);){const t=V(l),n=W(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||B(l)&&!n&&re(e,l))?o=o.filter((e=>e!==l)):r=t,l=G(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=oe(t,n,r);return e.top=u(o.top,e.top),e.right=c(o.right,e.right),e.bottom=c(o.bottom,e.bottom),e.left=u(o.left,e.left),e}),oe(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ae,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ae,i=this.getDimensions;return{reference:ie(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return K(e)},getScale:J,isElement:I,isRTL:function(e){return"rtl"===V(e).direction}};const ce=(e,t,n)=>{const o=new Map,r={platform:se,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=k(c,o,s),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},me={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},he=(0,e.createContext)({getTooltipData:()=>me});function ye(t="DEFAULT_TOOLTIP_ID"){return(0,e.useContext)(he).getTooltipData(t)}const ve="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,ge=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},be=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(ge(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},we=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:l=[N(Number(r)),R({fallbackAxisSideDirection:"start"}),P({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const s=l;return n?(s.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:d=0}=v(u,e)||{};if(null==s)return{};const p=C(d),f={x:t,y:n},m=x(o),h=_(m),g=await i.getDimensions(s),w="y"===m,E=w?"top":"left",S=w?"bottom":"right",O=w?"clientHeight":"clientWidth",T=r.reference[h]+r.reference[m]-f[m]-r.floating[h],k=f[m]-r.reference[m],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let R=A?A[O]:0;R&&await(null==i.isElement?void 0:i.isElement(A))||(R=l.floating[O]||r.floating[h]);const N=T/2-k/2,P=R/2-g[h]/2-1,M=c(p[E],P),L=c(p[S],P),D=M,j=R-g[h]-L,I=R/2-g[h]/2+N,F=y(D,I,j),H=!a.arrow&&null!=b(o)&&I!=F&&r.reference[h]/2-(I{var r,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):ce(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u};var _e={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Ee={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const xe=({forwardRef:t,id:n,className:o,classNameArrow:r,variant:i="dark",anchorId:l,anchorSelect:a,place:s="top",offset:d=10,events:f=["hover"],openOnClick:m=!1,positionStrategy:h="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,afterShow:M,afterHide:L,content:j,contentWrapperRef:I,isOpen:F,setIsOpen:H,activeAnchor:B,setActiveAnchor:U,border:W,opacity:z,arrowColor:q,role:V="tooltip"})=>{var $;const G=(0,e.useRef)(null),X=(0,e.useRef)(null),K=(0,e.useRef)(null),J=(0,e.useRef)(null),Q=(0,e.useRef)(null),[ee,ne]=(0,e.useState)(s),[oe,re]=(0,e.useState)({}),[ie,le]=(0,e.useState)({}),[ae,se]=(0,e.useState)(!1),[ce,de]=(0,e.useState)(!1),[pe,me]=(0,e.useState)(null),he=(0,e.useRef)(!1),ge=(0,e.useRef)(null),{anchorRefs:xe,setActiveAnchor:Se}=ye(n),Oe=(0,e.useRef)(!1),[Ce,Te]=(0,e.useState)([]),ke=(0,e.useRef)(!1),Ae=m||f.includes("click"),Re=Ae||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ne=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Ae&&Object.assign(Ne,{mouseenter:!1,focus:!1,click:!0});const Pe=k?{...k}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!k&&Ae&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Re||!1};R&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),ve((()=>(ke.current=!0,()=>{ke.current=!1})),[]);const Le=e=>{ke.current&&(e&&de(!0),setTimeout((()=>{ke.current&&(null==H||H(e),void 0===F&&se(e))}),10))};(0,e.useEffect)((()=>{if(void 0===F)return()=>null;F&&de(!0);const e=setTimeout((()=>{se(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,e.useEffect)((()=>{if(ae!==he.current)if(Q.current&&clearTimeout(Q.current),he.current=ae,ae)null==M||M();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();Q.current=setTimeout((()=>{de(!1),me(null),null==L||L()}),e+25)}}),[ae]);const De=(e=g)=>{K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{Le(!0)}),e)},je=(e=b)=>{J.current&&clearTimeout(J.current),J.current=setTimeout((()=>{Oe.current||Le(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return U(null),void Se({current:null});g?De():Le(!0),U(n),Se({current:n}),J.current&&clearTimeout(J.current)},Fe=()=>{x?je(b||100):b?je():Le(!1),K.current&&clearTimeout(K.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};we({place:null!==(n=null==pe?void 0:pe.place)&&void 0!==n?n:s,offset:d,elementReference:o,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:y,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),ne(e.place)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),ge.current=n},Ue=e=>{var t;if(!ae)return;const n=e.target;(null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...Ce].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),K.current&&clearTimeout(K.current))},We=fe(Ie,50,!0),ze=fe(Fe,50,!0),qe=(0,e.useCallback)((()=>{var e,t;const n=null!==(e=null==pe?void 0:pe.position)&&void 0!==e?e:P;n?He(n):w?ge.current&&He(ge.current):(null==B?void 0:B.isConnected)&&we({place:null!==(t=null==pe?void 0:pe.place)&&void 0!==t?t:s,offset:d,elementReference:B,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:y,border:W}).then((e=>{ke.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),ne(e.place))}))}),[ae,B,j,N,s,null==pe?void 0:pe.place,d,h,P,null==pe?void 0:pe.position,w]);(0,e.useEffect)((()=>{var e,t;const n=new Set(xe);Ce.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${l}']`);o&&n.add({current:o});const r=()=>{Le(!1)},i=be(B),a=be(G.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let s=null;Me.resize?window.addEventListener("resize",r):B&&G.current&&(s=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,d=Z(e),f=r||i?[...d?Y(d):[],...Y(t)]:[];f.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const m=d&&a?function(e,t){let n,o=null;const r=D(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:d,top:f,width:m,height:h}=e.getBoundingClientRect();if(a||t(),!m||!h)return;const y={rootMargin:-p(f)+"px "+-p(r.clientWidth-(d+m))+"px "+-p(r.clientHeight-(f+h))+"px "+-p(d)+"px",threshold:u(0,c(1,s))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),i}(d,n):null;let h,y=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),d&&!s&&v.observe(d),v.observe(t));let g=s?te(e):null;return s&&function t(){const o=te(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,h=requestAnimationFrame(t)}(),n(),()=>{f.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),m&&m(),v&&v.disconnect(),v=null,s&&cancelAnimationFrame(h)}}(B,G.current,qe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const d=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",d),Me.clickOutsideAnchor&&window.addEventListener("click",Ue);const f=[],m=e=>{ae&&(null==e?void 0:e.target)===B||Ie(e)},h=e=>{ae&&(null==e?void 0:e.target)===B&&Fe()},y=["mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?f.push({event:e,listener:We}):v.includes(e)&&f.push({event:e,listener:m}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(y.includes(e)?f.push({event:e,listener:ze}):v.includes(e)&&f.push({event:e,listener:h}))})),w&&f.push({event:"mousemove",listener:Be});const g=()=>{Oe.current=!0},b=()=>{Oe.current=!1,Fe()};return x&&!Re&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.addEventListener("mouseleave",b)),f.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==s||s(),Me.clickOutsideAnchor&&window.removeEventListener("click",Ue),Me.escape&&window.removeEventListener("keydown",d),x&&!Re&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.removeEventListener("mouseleave",b)),f.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[B,qe,ce,xe,Ce,T,k,A,Ae]),(0,e.useEffect)((()=>{var e,t;let o=null!==(t=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:a)&&void 0!==t?t:"";!o&&n&&(o=`[data-tooltip-id='${n}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===n&&t.push(e.target),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(de(!1),Le(!1),U(null),K.current&&clearTimeout(K.current),J.current&&clearTimeout(J.current),!0)}))}if(o)try{const n=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...n.filter((e=>e.matches(o)))),t.push(...n.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(t.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...t]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[n,a,null==pe?void 0:pe.anchorSelect,B]),(0,e.useEffect)((()=>{qe()}),[qe]),(0,e.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>qe()))}));return e.observe(I.current),()=>{e.disconnect()}}),[j,null==I?void 0:I.current]),(0,e.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...Ce,t];B&&n.includes(B)||U(null!==(e=Ce[0])&&void 0!==e?e:t)}),[l,Ce,B]),(0,e.useEffect)((()=>()=>{K.current&&clearTimeout(K.current),J.current&&clearTimeout(J.current)}),[]),(0,e.useEffect)((()=>{var e;let t=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:a;if(!t&&n&&(t=`[data-tooltip-id='${n}']`),t)try{const e=Array.from(document.querySelectorAll(t));Te(e)}catch(e){Te([])}}),[n,a,null==pe?void 0:pe.anchorSelect]);const Ve=null!==($=null==pe?void 0:pe.content)&&void 0!==$?$:j,$e=ae&&Object.keys(oe).length>0;return(0,e.useImperativeHandle)(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}me(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):Le(!1)},activeAnchor:B,place:ee,isOpen:Boolean(ce&&!_&&Ve&&$e)}))),ce&&!_&&Ve?e.createElement(v,{id:n,role:V,className:ue("react-tooltip",_e.tooltip,Ee.tooltip,Ee[i],o,`react-tooltip__place-${ee}`,_e[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&_e.fixed,x&&_e.clickable),onTransitionEnd:e=>{Q.current&&clearTimeout(Q.current),ae||"opacity"!==e.propertyName||(de(!1),me(null),null==L||L())},style:{...N,...oe,opacity:void 0!==z&&$e?z:void 0},ref:G},Ve,e.createElement(v,{className:ue("react-tooltip-arrow",_e.arrow,Ee.arrow,r,E&&_e.noArrow),style:{...ie,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:X})):null},Se=({content:t})=>e.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),Oe=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Ce=e.forwardRef((({id:t,anchorId:n,anchorSelect:o,content:r,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R=!1,style:N,position:P,isOpen:M,disableStyleInjection:L=!1,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:B,role:U="tooltip"},W)=>{const[z,q]=(0,e.useState)(r),[V,$]=(0,e.useState)(i),[G,X]=(0,e.useState)(u),[Y,K]=(0,e.useState)(c),[Z,J]=(0,e.useState)(d),[Q,ee]=(0,e.useState)(g),[te,ne]=(0,e.useState)(b),[oe,re]=(0,e.useState)(w),[ie,le]=(0,e.useState)(_),[ae,se]=(0,e.useState)(p),[ce,de]=(0,e.useState)(m),[pe,fe]=(0,e.useState)(y),[me,he]=(0,e.useState)(null),[ve,ge]=(0,e.useState)(null),be=(0,e.useRef)(L),{anchorRefs:we,activeAnchor:_e}=ye(t),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Ce=e=>{const t={place:e=>{var t;X(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:r)},html:e=>{$(null!=e?e:i)},variant:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;se(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:m)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{re(null===e?w:"true"===e)},hidden:e=>{le(null===e?_:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,e.useEffect)((()=>{q(r)}),[r]),(0,e.useEffect)((()=>{$(i)}),[i]),(0,e.useEffect)((()=>{X(u)}),[u]),(0,e.useEffect)((()=>{K(c)}),[c]),(0,e.useEffect)((()=>{J(d)}),[d]),(0,e.useEffect)((()=>{ee(g)}),[g]),(0,e.useEffect)((()=>{ne(b)}),[b]),(0,e.useEffect)((()=>{re(w)}),[w]),(0,e.useEffect)((()=>{le(_)}),[_]),(0,e.useEffect)((()=>{fe(y)}),[y]),(0,e.useEffect)((()=>{be.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,e.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,e.useEffect)((()=>{var e;const r=new Set(we);let i=o;if(!i&&t&&(i=`[data-tooltip-id='${t}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${n}']`);if(l&&r.add({current:l}),!r.size)return()=>null;const a=null!==(e=null!=ve?ve:l)&&void 0!==e?e:_e.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(a);Ce(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Ee(a);Ce(e),s.observe(a,c)}return()=>{s.disconnect()}}),[we,_e,ve,n,o]),(0,e.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Oe("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),j&&!Oe("opacity",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`opacity\`.`)}),[]);let Te=f;const ke=(0,e.useRef)(null);if(l){const t=l({content:null!=z?z:null,activeAnchor:ve});Te=t?e.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},t):null}else z&&(Te=z);V&&(Te=e.createElement(Se,{content:V}));const Ae={forwardRef:W,id:t,anchorId:n,anchorSelect:o,className:ue(a,me),classNameArrow:s,content:Te,contentWrapperRef:ke,place:G,variant:Y,offset:Z,wrapper:ae,events:ce,openOnClick:h,positionStrategy:pe,middlewares:v,delayShow:Q,delayHide:te,float:oe,hidden:ie,noArrow:E,clickable:x,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,isOpen:M,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:B,activeAnchor:ve,setActiveAnchor:e=>ge(e),role:U};return e.createElement(xe,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||pe({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||pe({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Te=window.wp.i18n,ke=window.wp.components,Ae=window.wp.apiFetch;var Re=n.n(Ae);const Ne=({type:t="upcoming",status:n="no_status"})=>{const o={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Te.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,Te.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Te.__)("Not Attending","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Te.__)("Went","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,Te.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Te.__)("Didn't Go","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,Te.__)("Didn't Go","gatherpress")}}};return(0,e.createElement)("div",{className:"gp-status__response"},(0,e.createElement)("span",{className:o[t][n].icon}),(0,e.createElement)("strong",null,o[t][n].text))};function Pe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const Me=({eventId:t,currentUser:n="",type:o,enableAnonymousRsvp:i})=>{const[a,c]=(0,r.useState)(n.status),[u,d]=(0,r.useState)(Number(n.anonymous)),[p,f]=(0,r.useState)(n.guests),[m,h]=(0,r.useState)("hidden"),[y,v]=(0,r.useState)("false"),[g,b]=(0,r.useState)(!1);if("past"===o)return"";"undefined"==typeof adminpage&&l().setAppElement(".gp-enabled");const w=e=>{e.preventDefault(),b(!1)},_=async(e,n,o,r=0,i=!0)=>{e.preventDefault(),"attending"!==n&&(r=0),Re()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:t,status:n,guests:r,anonymous:o,_wpnonce:Pe("nonce")}}).then((t=>{if(t.success){c(t.status),f(t.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,o]of Object.entries(t.responses))n[e]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:t.status,setRsvpResponse:t.responses,setRsvpCount:n,setRsvpSeeAllLink:n[t.status]>8,setOnlineEventLink:t.online_link},t.event_id),i&&w(e)}}))},E=e=>{switch(e){case"attending":return(0,Te.__)("You're attending","gatherpress");case"waiting_list":return(0,Te.__)("You're wait listed","gatherpress");case"not_attending":return(0,Te.__)("You're not attending","gatherpress")}return(0,Te.__)("RSVP to this event","gatherpress")};return(0,e.createElement)("div",{className:"gp-rsvp"},(0,e.createElement)(ke.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":y,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(h("hidden"===m?"show":"hidden"),v("false"===y?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),b(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,Te.__)("Edit RSVP","gatherpress")}return(0,Te.__)("RSVP","gatherpress")})(a))),(0,e.createElement)(l(),{isOpen:g,onRequestClose:w,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,Te.__)("Edit RSVP","gatherpress")},""===n&&(0,e.createElement)((()=>(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},(0,Te.__)("Login Required","gatherpress")),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},(0,Te.__)("You must ","gatherpress"),(0,e.createElement)("a",{href:Pe("login_url")},(0,Te.__)("Login","gatherpress")),(0,Te.__)(" to RSVP to events.","gatherpress")),""!==Pe("registration_url")&&(0,e.createElement)("div",{className:"gp-modal__text"},(0,e.createElement)("a",{href:Pe("registration_url")},(0,Te.__)("Register","gatherpress")),(0,Te.__)(" if you do not have an account.","gatherpress"))),(0,e.createElement)(ke.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:w,className:"gp-buttons__button wp-block-button__link"},(0,Te.__)("Close","gatherpress")))))),null),""!==n&&(0,e.createElement)((({status:t})=>{let n="",o="";return"not_attending"===t||"no_status"===t?(n="attending",o=(0,Te.__)("Attend","gatherpress")):(n="not_attending",o=(0,Te.__)("Not Attending","gatherpress")),(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},E(a)?E(a):(0,e.createElement)(ke.Spinner,null)),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},s((0,Te.sprintf)(/* translators: %s: button label. */ -(0,Te.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+o+""))),i?(0,e.createElement)("div",{className:"gp-modal__anonymous"},(0,e.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);d(t),_(e,a,t,p,!1)},checked:u}),(0,e.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,Te.__)("Only admins will see your identity.","gatherpress")},(0,Te.__)("List me as anonymous.","gatherpress")),(0,e.createElement)(Ce,{id:"gp-anonymous-tooltip"})):(0,e.createElement)(e.Fragment,null)),(0,e.createElement)(ke.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,e.createElement)("a",{href:"#",onClick:e=>_(e,n,u),className:"gp-buttons__button wp-block-button__link"},o)),(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:w,className:"gp-buttons__button wp-block-button__link"},(0,Te.__)("Close","gatherpress")))))}),{status:a}))),"no_status"!==a&&(0,e.createElement)("div",{className:"gp-status"},(0,e.createElement)(Ne,{type:o,status:a}),0{const t=document.querySelectorAll('[data-gp_block_name="rsvp"]'),n=!0===Pe("has_event_past")?"past":"upcoming";for(let o=0;o{var e={9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);r(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new l.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function _(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?x(e.children):[];var l=new f(o);o.forEach((function(e){return e.parent=l})),n=l}else if(_(e)){o=t?x(e.children):[];var a=new m(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return l.test(e)||null===(t=null==(y=m.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=m.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),m.querySelectorAll(n);case o:case r:var h=s(e).querySelectorAll(p);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(y=s(e,r).querySelector(r)).childNodes;var y}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=s(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=s("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),i=o(n(484)),l=n(4606),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(v=d(v,{key:v.key||h})),o.push(c(v,y,h));continue}}if("text"!==y.type){var g=y,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(y.name,b,w),y,h))}else{var _=!y.data.trim().length;if(_&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if((null==n?void 0:n.trim)&&_)continue;o.push(c(y.data,y,h))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var l=o(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=s.source}h.prototype.content=e;var y=[];function v(t){var n=new Error(s.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=p,n.source=e,!s.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(_(),!g(i))return v("property missing ':'");var o=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,l){if(l!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==a){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,l=i&&i().ownerDocument||document;r&&d.add(l.body,r),o&&d.add(l.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,l=e.children,a=n?{}:i.content,s=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,l);return this.props.overlayElement(c,d)}}]),t}(l.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){l&&(l.removeAttribute?l.removeAttribute("aria-hidden"):null!=l.length?l.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(l).forEach((function(e){return e.removeAttribute("aria-hidden")}))),l=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return l=t||l},t.validateElement=s,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){l=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),l=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function s(e){var t=e||l;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,l],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var l in o)r(i,o[l]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=s,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",s,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",s),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",s),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",s),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],l=null,a=!1;function s(){a=!0}function c(){if(a){if(a=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,r.default)(l)[0]||l).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,l=t.shiftKey,a=n[0],s=n[n.length-1],c=i();if(e===c){if(!l)return;o=s}if(s!==c||l||(o=a),a===c&&l&&(o=s),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=l?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=l?s:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(l)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(o,a))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=n(9196);const t=window.wp.domReady;var o=n.n(t);const r=window.wp.element;var i=n(3253),l=n.n(i),a=n(3426);const s=a.default||a,c=Math.min,u=Math.max,d=Math.round,p=Math.floor,f=e=>({x:e,y:e}),m={left:"right",right:"left",bottom:"top",top:"bottom"},h={start:"end",end:"start"};function y(e,t,n){return u(e,c(t,n))}function v(e,t){return"function"==typeof e?e(t):e}function g(e){return e.split("-")[0]}function b(e){return e.split("-")[1]}function w(e){return"x"===e?"y":"x"}function _(e){return"y"===e?"height":"width"}function E(e){return["top","bottom"].includes(g(e))?"y":"x"}function x(e){return w(E(e))}function S(e){return e.replace(/start|end/g,(e=>h[e]))}function O(e){return e.replace(/left|right|bottom|top/g,(e=>m[e]))}function C(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function T(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function k(e,t,n){let{reference:o,floating:r}=e;const i=E(t),l=x(t),a=_(l),s=g(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(s){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(b(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function A(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=v(t,e),m=C(f),h=a[p?"floating"===d?"reference":"floating":d],y=T(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{...l.floating,x:o,y:r}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},_=T(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:s}):g);return{top:(y.top-_.top+m.top)/w.y,bottom:(_.bottom-y.bottom+m.bottom)/w.y,left:(y.left-_.left+m.left)/w.x,right:(_.right-y.right+m.right)/w.x}}const R=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...y}=v(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const w=g(r),E=g(a)===a,C=await(null==s.isRTL?void 0:s.isRTL(c.floating)),T=p||(E||!h?[O(a)]:function(e){const t=O(e);return[S(e),t,S(t)]}(a));p||"none"===m||T.push(...function(e,t,n,o){const r=b(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(g(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(S)))),i}(a,h,m,C));const k=[a,...T],R=await A(t,y),N=[];let P=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&N.push(R[w]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=b(e),r=x(e),i=_(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=O(l)),[l,O(l)]}(r,l,C);N.push(R[e[0]],R[e[1]])}if(P=[...P,{placement:r,overflows:N}],!N.every((e=>e<=0))){var M,L;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(L=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(f){case"bestFit":{var D;const e=null==(D=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},N=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=g(n),a=b(n),s="y"===E(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=v(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),s?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},P=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=v(e,t),c={x:n,y:o},u=await A(t,s),d=E(g(r)),p=w(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=y(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";m=y(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function M(e){return j(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function D(e){var t;return null==(t=(j(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function j(e){return e instanceof Node||e instanceof L(e).Node}function I(e){return e instanceof Element||e instanceof L(e).Element}function F(e){return e instanceof HTMLElement||e instanceof L(e).HTMLElement}function H(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof L(e).ShadowRoot)}function U(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function B(e){return["table","td","th"].includes(M(e))}function W(e){const t=z(),n=V(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function z(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function q(e){return["html","body","#document"].includes(M(e))}function V(e){return L(e).getComputedStyle(e)}function $(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function G(e){if("html"===M(e))return e;const t=e.assignedSlot||e.parentNode||H(e)&&e.host||D(e);return H(t)?t.host:t}function X(e){const t=G(e);return q(t)?e.ownerDocument?e.ownerDocument.body:e.body:F(t)&&U(t)?t:X(t)}function Y(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=X(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=L(r);return i?t.concat(l,l.visualViewport||[],U(r)?r:[],l.frameElement&&n?Y(l.frameElement):[]):t.concat(r,Y(r,[],n))}function K(e){const t=V(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=F(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=d(n)!==i||d(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function Z(e){return I(e)?e:e.contextElement}function J(e){const t=Z(e);if(!F(t))return f(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=K(t);let l=(i?d(n.width):n.width)/o,a=(i?d(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Q=f(0);function ee(e){const t=L(e);return z()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Q}function te(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Z(e);let l=f(1);t&&(o?I(o)&&(l=J(o)):l=J(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==L(e))&&t}(i,n,o)?ee(i):f(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,u=r.width/l.x,d=r.height/l.y;if(i){const e=L(i),t=o&&I(o)?L(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=J(n),t=n.getBoundingClientRect(),o=V(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=r,c+=i,n=L(n).frameElement}}return T({width:u,height:d,x:s,y:c})}function ne(e){return te(D(e)).left+$(e).scrollLeft}function oe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=L(e),o=D(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=z();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=D(e),n=$(e),o=e.ownerDocument.body,r=u(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=u(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+ne(e);const a=-n.scrollTop;return"rtl"===V(o).direction&&(l+=u(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(D(e));else if(I(t))o=function(e,t){const n=te(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=F(e)?J(e):f(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ee(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return T(o)}function re(e,t){const n=G(e);return!(n===t||!I(n)||q(n))&&("fixed"===V(n).position||re(n,t))}function ie(e,t,n){const o=F(t),r=D(t),i="fixed"===n,l=te(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=f(0);if(o||!o&&!i)if(("body"!==M(t)||U(r))&&(a=$(t)),o){const e=te(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=ne(r));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function le(e,t){return F(e)&&"fixed"!==V(e).position?t?t(e):e.offsetParent:null}function ae(e,t){const n=L(e);if(!F(e))return n;let o=le(e,t);for(;o&&B(o)&&"static"===V(o).position;)o=le(o,t);return o&&("html"===M(o)||"body"===M(o)&&"static"===V(o).position&&!W(o))?n:o||function(e){let t=G(e);for(;F(t)&&!q(t);){if(W(t))return t;t=G(t)}return null}(e)||n}const se={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=F(n),i=D(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=f(1);const s=f(0);if((r||!r&&"fixed"!==o)&&(("body"!==M(n)||U(i))&&(l=$(n)),F(n))){const e=te(n);a=J(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:D,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=Y(e,[],!1).filter((e=>I(e)&&"body"!==M(e))),r=null;const i="fixed"===V(e).position;let l=i?G(e):e;for(;I(l)&&!q(l);){const t=V(l),n=W(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||U(l)&&!n&&re(e,l))?o=o.filter((e=>e!==l)):r=t,l=G(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=oe(t,n,r);return e.top=u(o.top,e.top),e.right=c(o.right,e.right),e.bottom=c(o.bottom,e.bottom),e.left=u(o.left,e.left),e}),oe(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ae,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ae,i=this.getDimensions;return{reference:ie(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return K(e)},getScale:J,isElement:I,isRTL:function(e){return"rtl"===V(e).direction}};const ce=(e,t,n)=>{const o=new Map,r={platform:se,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=k(c,o,s),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},me={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},he=(0,e.createContext)({getTooltipData:()=>me});function ye(t="DEFAULT_TOOLTIP_ID"){return(0,e.useContext)(he).getTooltipData(t)}const ve="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,ge=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},be=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(ge(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},we=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:l=[N(Number(r)),R({fallbackAxisSideDirection:"start"}),P({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const s=l;return n?(s.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:d=0}=v(u,e)||{};if(null==s)return{};const p=C(d),f={x:t,y:n},m=x(o),h=_(m),g=await i.getDimensions(s),w="y"===m,E=w?"top":"left",S=w?"bottom":"right",O=w?"clientHeight":"clientWidth",T=r.reference[h]+r.reference[m]-f[m]-r.floating[h],k=f[m]-r.reference[m],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let R=A?A[O]:0;R&&await(null==i.isElement?void 0:i.isElement(A))||(R=l.floating[O]||r.floating[h]);const N=T/2-k/2,P=R/2-g[h]/2-1,M=c(p[E],P),L=c(p[S],P),D=M,j=R-g[h]-L,I=R/2-g[h]/2+N,F=y(D,I,j),H=!a.arrow&&null!=b(o)&&I!=F&&r.reference[h]/2-(I{var r,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):ce(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u};var _e={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Ee={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const xe=({forwardRef:t,id:n,className:o,classNameArrow:r,variant:i="dark",anchorId:l,anchorSelect:a,place:s="top",offset:d=10,events:f=["hover"],openOnClick:m=!1,positionStrategy:h="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,afterShow:M,afterHide:L,content:j,contentWrapperRef:I,isOpen:F,setIsOpen:H,activeAnchor:U,setActiveAnchor:B,border:W,opacity:z,arrowColor:q,role:V="tooltip"})=>{var $;const G=(0,e.useRef)(null),X=(0,e.useRef)(null),K=(0,e.useRef)(null),J=(0,e.useRef)(null),Q=(0,e.useRef)(null),[ee,ne]=(0,e.useState)(s),[oe,re]=(0,e.useState)({}),[ie,le]=(0,e.useState)({}),[ae,se]=(0,e.useState)(!1),[ce,de]=(0,e.useState)(!1),[pe,me]=(0,e.useState)(null),he=(0,e.useRef)(!1),ge=(0,e.useRef)(null),{anchorRefs:xe,setActiveAnchor:Se}=ye(n),Oe=(0,e.useRef)(!1),[Ce,Te]=(0,e.useState)([]),ke=(0,e.useRef)(!1),Ae=m||f.includes("click"),Re=Ae||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ne=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Ae&&Object.assign(Ne,{mouseenter:!1,focus:!1,click:!0});const Pe=k?{...k}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!k&&Ae&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Re||!1};R&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),ve((()=>(ke.current=!0,()=>{ke.current=!1})),[]);const Le=e=>{ke.current&&(e&&de(!0),setTimeout((()=>{ke.current&&(null==H||H(e),void 0===F&&se(e))}),10))};(0,e.useEffect)((()=>{if(void 0===F)return()=>null;F&&de(!0);const e=setTimeout((()=>{se(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,e.useEffect)((()=>{if(ae!==he.current)if(Q.current&&clearTimeout(Q.current),he.current=ae,ae)null==M||M();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();Q.current=setTimeout((()=>{de(!1),me(null),null==L||L()}),e+25)}}),[ae]);const De=(e=g)=>{K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{Le(!0)}),e)},je=(e=b)=>{J.current&&clearTimeout(J.current),J.current=setTimeout((()=>{Oe.current||Le(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return B(null),void Se({current:null});g?De():Le(!0),B(n),Se({current:n}),J.current&&clearTimeout(J.current)},Fe=()=>{x?je(b||100):b?je():Le(!1),K.current&&clearTimeout(K.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};we({place:null!==(n=null==pe?void 0:pe.place)&&void 0!==n?n:s,offset:d,elementReference:o,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:y,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),ne(e.place)}))},Ue=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),ge.current=n},Be=e=>{var t;if(!ae)return;const n=e.target;(null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...Ce].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),K.current&&clearTimeout(K.current))},We=fe(Ie,50,!0),ze=fe(Fe,50,!0),qe=(0,e.useCallback)((()=>{var e,t;const n=null!==(e=null==pe?void 0:pe.position)&&void 0!==e?e:P;n?He(n):w?ge.current&&He(ge.current):(null==U?void 0:U.isConnected)&&we({place:null!==(t=null==pe?void 0:pe.place)&&void 0!==t?t:s,offset:d,elementReference:U,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:y,border:W}).then((e=>{ke.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),ne(e.place))}))}),[ae,U,j,N,s,null==pe?void 0:pe.place,d,h,P,null==pe?void 0:pe.position,w]);(0,e.useEffect)((()=>{var e,t;const n=new Set(xe);Ce.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${l}']`);o&&n.add({current:o});const r=()=>{Le(!1)},i=be(U),a=be(G.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let s=null;Me.resize?window.addEventListener("resize",r):U&&G.current&&(s=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,d=Z(e),f=r||i?[...d?Y(d):[],...Y(t)]:[];f.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const m=d&&a?function(e,t){let n,o=null;const r=D(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:d,top:f,width:m,height:h}=e.getBoundingClientRect();if(a||t(),!m||!h)return;const y={rootMargin:-p(f)+"px "+-p(r.clientWidth-(d+m))+"px "+-p(r.clientHeight-(f+h))+"px "+-p(d)+"px",threshold:u(0,c(1,s))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),i}(d,n):null;let h,y=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),d&&!s&&v.observe(d),v.observe(t));let g=s?te(e):null;return s&&function t(){const o=te(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,h=requestAnimationFrame(t)}(),n(),()=>{f.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),m&&m(),v&&v.disconnect(),v=null,s&&cancelAnimationFrame(h)}}(U,G.current,qe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const d=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",d),Me.clickOutsideAnchor&&window.addEventListener("click",Be);const f=[],m=e=>{ae&&(null==e?void 0:e.target)===U||Ie(e)},h=e=>{ae&&(null==e?void 0:e.target)===U&&Fe()},y=["mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?f.push({event:e,listener:We}):v.includes(e)&&f.push({event:e,listener:m}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(y.includes(e)?f.push({event:e,listener:ze}):v.includes(e)&&f.push({event:e,listener:h}))})),w&&f.push({event:"mousemove",listener:Ue});const g=()=>{Oe.current=!0},b=()=>{Oe.current=!1,Fe()};return x&&!Re&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.addEventListener("mouseleave",b)),f.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==s||s(),Me.clickOutsideAnchor&&window.removeEventListener("click",Be),Me.escape&&window.removeEventListener("keydown",d),x&&!Re&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.removeEventListener("mouseleave",b)),f.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[U,qe,ce,xe,Ce,T,k,A,Ae]),(0,e.useEffect)((()=>{var e,t;let o=null!==(t=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:a)&&void 0!==t?t:"";!o&&n&&(o=`[data-tooltip-id='${n}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===n&&t.push(e.target),"childList"===e.type){if(U){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,U))&&(de(!1),Le(!1),B(null),K.current&&clearTimeout(K.current),J.current&&clearTimeout(J.current),!0)}))}if(o)try{const n=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...n.filter((e=>e.matches(o)))),t.push(...n.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(t.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...t]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[n,a,null==pe?void 0:pe.anchorSelect,U]),(0,e.useEffect)((()=>{qe()}),[qe]),(0,e.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>qe()))}));return e.observe(I.current),()=>{e.disconnect()}}),[j,null==I?void 0:I.current]),(0,e.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...Ce,t];U&&n.includes(U)||B(null!==(e=Ce[0])&&void 0!==e?e:t)}),[l,Ce,U]),(0,e.useEffect)((()=>()=>{K.current&&clearTimeout(K.current),J.current&&clearTimeout(J.current)}),[]),(0,e.useEffect)((()=>{var e;let t=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:a;if(!t&&n&&(t=`[data-tooltip-id='${n}']`),t)try{const e=Array.from(document.querySelectorAll(t));Te(e)}catch(e){Te([])}}),[n,a,null==pe?void 0:pe.anchorSelect]);const Ve=null!==($=null==pe?void 0:pe.content)&&void 0!==$?$:j,$e=ae&&Object.keys(oe).length>0;return(0,e.useImperativeHandle)(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}me(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):Le(!1)},activeAnchor:U,place:ee,isOpen:Boolean(ce&&!_&&Ve&&$e)}))),ce&&!_&&Ve?e.createElement(v,{id:n,role:V,className:ue("react-tooltip",_e.tooltip,Ee.tooltip,Ee[i],o,`react-tooltip__place-${ee}`,_e[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&_e.fixed,x&&_e.clickable),onTransitionEnd:e=>{Q.current&&clearTimeout(Q.current),ae||"opacity"!==e.propertyName||(de(!1),me(null),null==L||L())},style:{...N,...oe,opacity:void 0!==z&&$e?z:void 0},ref:G},Ve,e.createElement(v,{className:ue("react-tooltip-arrow",_e.arrow,Ee.arrow,r,E&&_e.noArrow),style:{...ie,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:X})):null},Se=({content:t})=>e.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),Oe=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Ce=e.forwardRef((({id:t,anchorId:n,anchorSelect:o,content:r,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R=!1,style:N,position:P,isOpen:M,disableStyleInjection:L=!1,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:U,role:B="tooltip"},W)=>{const[z,q]=(0,e.useState)(r),[V,$]=(0,e.useState)(i),[G,X]=(0,e.useState)(u),[Y,K]=(0,e.useState)(c),[Z,J]=(0,e.useState)(d),[Q,ee]=(0,e.useState)(g),[te,ne]=(0,e.useState)(b),[oe,re]=(0,e.useState)(w),[ie,le]=(0,e.useState)(_),[ae,se]=(0,e.useState)(p),[ce,de]=(0,e.useState)(m),[pe,fe]=(0,e.useState)(y),[me,he]=(0,e.useState)(null),[ve,ge]=(0,e.useState)(null),be=(0,e.useRef)(L),{anchorRefs:we,activeAnchor:_e}=ye(t),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Ce=e=>{const t={place:e=>{var t;X(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:r)},html:e=>{$(null!=e?e:i)},variant:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;se(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:m)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{re(null===e?w:"true"===e)},hidden:e=>{le(null===e?_:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,e.useEffect)((()=>{q(r)}),[r]),(0,e.useEffect)((()=>{$(i)}),[i]),(0,e.useEffect)((()=>{X(u)}),[u]),(0,e.useEffect)((()=>{K(c)}),[c]),(0,e.useEffect)((()=>{J(d)}),[d]),(0,e.useEffect)((()=>{ee(g)}),[g]),(0,e.useEffect)((()=>{ne(b)}),[b]),(0,e.useEffect)((()=>{re(w)}),[w]),(0,e.useEffect)((()=>{le(_)}),[_]),(0,e.useEffect)((()=>{fe(y)}),[y]),(0,e.useEffect)((()=>{be.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,e.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,e.useEffect)((()=>{var e;const r=new Set(we);let i=o;if(!i&&t&&(i=`[data-tooltip-id='${t}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${n}']`);if(l&&r.add({current:l}),!r.size)return()=>null;const a=null!==(e=null!=ve?ve:l)&&void 0!==e?e:_e.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(a);Ce(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Ee(a);Ce(e),s.observe(a,c)}return()=>{s.disconnect()}}),[we,_e,ve,n,o]),(0,e.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Oe("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),j&&!Oe("opacity",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`opacity\`.`)}),[]);let Te=f;const ke=(0,e.useRef)(null);if(l){const t=l({content:null!=z?z:null,activeAnchor:ve});Te=t?e.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},t):null}else z&&(Te=z);V&&(Te=e.createElement(Se,{content:V}));const Ae={forwardRef:W,id:t,anchorId:n,anchorSelect:o,className:ue(a,me),classNameArrow:s,content:Te,contentWrapperRef:ke,place:G,variant:Y,offset:Z,wrapper:ae,events:ce,openOnClick:h,positionStrategy:pe,middlewares:v,delayShow:Q,delayHide:te,float:oe,hidden:ie,noArrow:E,clickable:x,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,isOpen:M,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:U,activeAnchor:ve,setActiveAnchor:e=>ge(e),role:B};return e.createElement(xe,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||pe({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||pe({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Te=window.wp.i18n,ke=window.wp.components,Ae=window.wp.apiFetch;var Re=n.n(Ae);const Ne=({type:t="upcoming",status:n="no_status"})=>{const o={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Te.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,Te.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Te.__)("Not Attending","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Te.__)("Went","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,Te.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Te.__)("Didn't Go","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,Te.__)("Didn't Go","gatherpress")}}};return(0,e.createElement)("div",{className:"gp-status__response"},(0,e.createElement)("span",{className:o[t][n].icon}),(0,e.createElement)("strong",null,o[t][n].text))};function Pe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const Me=({eventId:t,currentUser:n="",type:o,enableAnonymousRsvp:i})=>{const[a,c]=(0,r.useState)(n.status),[u,d]=(0,r.useState)(Number(n.anonymous)),[p,f]=(0,r.useState)(n.guests),[m,h]=(0,r.useState)("hidden"),[y,v]=(0,r.useState)("false"),[g,b]=(0,r.useState)(!1);if("past"===o)return"";"undefined"==typeof adminpage&&l().setAppElement(".gp-enabled");const w=e=>{e.preventDefault(),b(!1)},_=async(e,n,o,r=0,i=!0)=>{e.preventDefault(),"attending"!==n&&(r=0),Re()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:t,status:n,guests:r,anonymous:o,_wpnonce:Pe("misc.nonce")}}).then((t=>{if(t.success){c(t.status),f(t.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,o]of Object.entries(t.responses))n[e]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:t.status,setRsvpResponse:t.responses,setRsvpCount:n,setRsvpSeeAllLink:n[t.status]>8,setOnlineEventLink:t.online_link},t.event_id),i&&w(e)}}))},E=e=>{switch(e){case"attending":return(0,Te.__)("You're attending","gatherpress");case"waiting_list":return(0,Te.__)("You're wait listed","gatherpress");case"not_attending":return(0,Te.__)("You're not attending","gatherpress")}return(0,Te.__)("RSVP to this event","gatherpress")};return(0,e.createElement)("div",{className:"gp-rsvp"},(0,e.createElement)(ke.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":y,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(h("hidden"===m?"show":"hidden"),v("false"===y?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),b(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,Te.__)("Edit RSVP","gatherpress")}return(0,Te.__)("RSVP","gatherpress")})(a))),(0,e.createElement)(l(),{isOpen:g,onRequestClose:w,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,Te.__)("Edit RSVP","gatherpress")},""===n&&(0,e.createElement)((()=>(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},(0,Te.__)("Login Required","gatherpress")),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},(0,Te.__)("You must ","gatherpress"),(0,e.createElement)("a",{href:Pe("urls.loginUrl")},(0,Te.__)("Login","gatherpress")),(0,Te.__)(" to RSVP to events.","gatherpress")),""!==Pe("urls.registrationUrl")&&(0,e.createElement)("div",{className:"gp-modal__text"},(0,e.createElement)("a",{href:Pe("urls.registrationUrl")},(0,Te.__)("Register","gatherpress")),(0,Te.__)(" if you do not have an account.","gatherpress"))),(0,e.createElement)(ke.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:w,className:"gp-buttons__button wp-block-button__link"},(0,Te.__)("Close","gatherpress")))))),null),""!==n&&(0,e.createElement)((({status:t})=>{let n="",o="";return"not_attending"===t||"no_status"===t?(n="attending",o=(0,Te.__)("Attend","gatherpress")):(n="not_attending",o=(0,Te.__)("Not Attending","gatherpress")),(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},E(a)?E(a):(0,e.createElement)(ke.Spinner,null)),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},s((0,Te.sprintf)(/* translators: %s: button label. */ +(0,Te.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+o+""))),i?(0,e.createElement)("div",{className:"gp-modal__anonymous"},(0,e.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);d(t),_(e,a,t,p,!1)},checked:u}),(0,e.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,Te.__)("Only admins will see your identity.","gatherpress")},(0,Te.__)("List me as anonymous.","gatherpress")),(0,e.createElement)(Ce,{id:"gp-anonymous-tooltip"})):(0,e.createElement)(e.Fragment,null)),(0,e.createElement)(ke.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,e.createElement)("a",{href:"#",onClick:e=>_(e,n,u),className:"gp-buttons__button wp-block-button__link"},o)),(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:w,className:"gp-buttons__button wp-block-button__link"},(0,Te.__)("Close","gatherpress")))))}),{status:a}))),"no_status"!==a&&(0,e.createElement)("div",{className:"gp-status"},(0,e.createElement)(Ne,{type:o,status:a}),0{const t=document.querySelectorAll('[data-gp_block_name="rsvp"]'),n=!0===Pe("eventDetails.hasEventPast")?"past":"upcoming";for(let o=0;o array('moment', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'c25b7074b60afc072587'); + array('moment', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'caa944c76660cc1add69'); diff --git a/build/blocks/venue/index.js b/build/blocks/venue/index.js index f819faf06..25a7625c0 100644 --- a/build/blocks/venue/index.js +++ b/build/blocks/venue/index.js @@ -1 +1 @@ -(()=>{var e,t={100:(e,t,n)=>{"use strict";const r=window.wp.blocks;var o=n(9196);const i=window.wp.i18n,l=window.wp.blockEditor,a=window.wp.components,s=window.wp.data,c=window.wp.element,u=e=>{const{location:t,zoom:n,type:r,className:i}=e;let{height:l}=e;l||(l=300);const a={border:0,height:l,width:"100%"};if(!t)return(0,o.createElement)(o.Fragment,null);const s="https://maps.google.com/maps?"+new URLSearchParams({q:t,z:n||10,t:r||"m",output:"embed"}).toString();return(0,o.createElement)("iframe",{src:s,style:a,className:i,title:t})},d=Math.min,p=Math.max,f=Math.round,m=Math.floor,h=e=>({x:e,y:e}),v={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function g(e,t,n){return p(e,d(t,n))}function b(e,t){return"function"==typeof e?e(t):e}function w(e){return e.split("-")[0]}function E(e){return e.split("-")[1]}function x(e){return"x"===e?"y":"x"}function _(e){return"y"===e?"height":"width"}function S(e){return["top","bottom"].includes(w(e))?"y":"x"}function T(e){return x(S(e))}function k(e){return e.replace(/start|end/g,(e=>y[e]))}function A(e){return e.replace(/left|right|bottom|top/g,(e=>v[e]))}function O(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function C(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function N(e,t,n){let{reference:r,floating:o}=e;const i=S(t),l=T(t),a=_(l),s=w(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let f;switch(s){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(E(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function R(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=b(t,e),m=O(f),h=a[p?"floating"===d?"reference":"floating":d],v=C(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===d?{...l.floating,x:r,y:o}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},E=C(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:g,strategy:s}):y);return{top:(v.top-E.top+m.top)/w.y,bottom:(E.bottom-v.bottom+m.bottom)/w.y,left:(v.left-E.left+m.left)/w.x,right:(E.right-v.right+m.right)/w.x}}const P=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=b(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=w(o),g=w(a)===a,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),S=p||(g||!h?[A(a)]:function(e){const t=A(e);return[k(e),t,k(t)]}(a));p||"none"===m||S.push(...function(e,t,n,r){const o=E(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(w(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(k)))),i}(a,h,m,x));const O=[a,...S],C=await R(t,v),N=[];let P=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&N.push(C[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=E(e),o=T(e),i=_(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=A(l)),[l,A(l)]}(o,l,x);N.push(C[e[0]],C[e[1]])}if(P=[...P,{placement:o,overflows:N}],!N.every((e=>e<=0))){var L,I;const e=((null==(L=i.flip)?void 0:L.index)||0)+1,t=O[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(I=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(f){case"bestFit":{var D;const e=null==(D=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},L=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=w(n),a=E(n),s="y"===S(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=b(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),s?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},I=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=b(e,t),c={x:n,y:r},u=await R(t,s),d=S(w(o)),p=x(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=g(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";m=g(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}};function D(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return e instanceof Node||e instanceof M(e).Node}function H(e){return e instanceof Element||e instanceof M(e).Element}function z(e){return e instanceof HTMLElement||e instanceof M(e).HTMLElement}function B(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof M(e).ShadowRoot)}function V(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function W(e){return["table","td","th"].includes(D(e))}function q(e){const t=$(),n=X(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function $(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function U(e){return["html","body","#document"].includes(D(e))}function X(e){return M(e).getComputedStyle(e)}function G(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Y(e){if("html"===D(e))return e;const t=e.assignedSlot||e.parentNode||B(e)&&e.host||j(e);return B(t)?t.host:t}function Z(e){const t=Y(e);return U(t)?e.ownerDocument?e.ownerDocument.body:e.body:z(t)&&V(t)?t:Z(t)}function K(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Z(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=M(o);return i?t.concat(l,l.visualViewport||[],V(o)?o:[],l.frameElement&&n?K(l.frameElement):[]):t.concat(o,K(o,[],n))}function J(e){const t=X(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=z(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=f(n)!==i||f(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function Q(e){return H(e)?e:e.contextElement}function ee(e){const t=Q(e);if(!z(t))return h(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=J(t);let l=(i?f(n.width):n.width)/r,a=(i?f(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const te=h(0);function ne(e){const t=M(e);return $()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:te}function re(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Q(e);let l=h(1);t&&(r?H(r)&&(l=ee(r)):l=ee(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==M(e))&&t}(i,n,r)?ne(i):h(0);let s=(o.left+a.x)/l.x,c=(o.top+a.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=M(i),t=r&&H(r)?M(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=ee(n),t=n.getBoundingClientRect(),r=X(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=o,c+=i,n=M(n).frameElement}}return C({width:u,height:d,x:s,y:c})}function oe(e){return re(j(e)).left+G(e).scrollLeft}function ie(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=M(e),r=j(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=$();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){const t=j(e),n=G(e),r=e.ownerDocument.body,o=p(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=p(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+oe(e);const a=-n.scrollTop;return"rtl"===X(r).direction&&(l+=p(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(j(e));else if(H(t))r=function(e,t){const n=re(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=z(e)?ee(e):h(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ne(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return C(r)}function le(e,t){const n=Y(e);return!(n===t||!H(n)||U(n))&&("fixed"===X(n).position||le(n,t))}function ae(e,t,n){const r=z(t),o=j(t),i="fixed"===n,l=re(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=h(0);if(r||!r&&!i)if(("body"!==D(t)||V(o))&&(a=G(t)),r){const e=re(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=oe(o));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function se(e,t){return z(e)&&"fixed"!==X(e).position?t?t(e):e.offsetParent:null}function ce(e,t){const n=M(e);if(!z(e))return n;let r=se(e,t);for(;r&&W(r)&&"static"===X(r).position;)r=se(r,t);return r&&("html"===D(r)||"body"===D(r)&&"static"===X(r).position&&!q(r))?n:r||function(e){let t=Y(e);for(;z(t)&&!U(t);){if(q(t))return t;t=Y(t)}return null}(e)||n}const ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=z(n),i=j(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=h(1);const s=h(0);if((o||!o&&"fixed"!==r)&&(("body"!==D(n)||V(i))&&(l=G(n)),z(n))){const e=re(n);a=ee(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=K(e,[],!1).filter((e=>H(e)&&"body"!==D(e))),o=null;const i="fixed"===X(e).position;let l=i?Y(e):e;for(;H(l)&&!U(l);){const t=X(l),n=q(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||V(l)&&!n&&le(e,l))?r=r.filter((e=>e!==l)):o=t,l=Y(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],a=i.reduce(((e,n)=>{const r=ie(t,n,o);return e.top=p(r.top,e.top),e.right=d(r.right,e.right),e.bottom=d(r.bottom,e.bottom),e.left=p(r.left,e.left),e}),ie(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ce,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||ce,i=this.getDimensions;return{reference:ae(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return J(e)},getScale:ee,isElement:H,isRTL:function(e){return"rtl"===X(e).direction}};const de=(e,t,n)=>{const r=new Map,o={platform:ue,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=N(c,r,s),p=r,f={},m=0;for(let n=0;n{let r=null;return function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))}},ve={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},ye=(0,o.createContext)({getTooltipData:()=>ve});function ge(e="DEFAULT_TOOLTIP_ID"){return(0,o.useContext)(ye).getTooltipData(e)}const be="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,we=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},Ee=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(we(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},xe=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:l=[L(Number(o)),P({fallbackAxisSideDirection:"start"}),I({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const s=l;return n?(s.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:r,rects:o,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:u=0}=b(c,e)||{};if(null==s)return{};const p=O(u),f={x:t,y:n},m=T(r),h=_(m),v=await i.getDimensions(s),y="y"===m,w=y?"top":"left",x=y?"bottom":"right",S=y?"clientHeight":"clientWidth",k=o.reference[h]+o.reference[m]-f[m]-o.floating[h],A=f[m]-o.reference[m],C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=C?C[S]:0;N&&await(null==i.isElement?void 0:i.isElement(C))||(N=l.floating[S]||o.floating[h]);const R=k/2-A/2,P=N/2-v[h]/2-1,L=d(p[w],P),I=d(p[x],P),D=L,M=N-v[h]-I,j=N/2-v[h]/2+R,F=g(D,j,M),H=!a.arrow&&null!=E(r)&&j!=F&&o.reference[h]/2-(j{var o,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):de(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var _e={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Se={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Te=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:i="dark",anchorId:l,anchorSelect:a,place:s="top",offset:c=10,events:u=["hover"],openOnClick:f=!1,positionStrategy:h="absolute",middlewares:v,wrapper:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:E=!1,noArrow:x=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N,style:R,position:P,afterShow:L,afterHide:I,content:D,contentWrapperRef:M,isOpen:F,setIsOpen:H,activeAnchor:z,setActiveAnchor:B,border:V,opacity:W,arrowColor:q,role:$="tooltip"})=>{var U;const X=(0,o.useRef)(null),G=(0,o.useRef)(null),Y=(0,o.useRef)(null),Z=(0,o.useRef)(null),J=(0,o.useRef)(null),[ee,te]=(0,o.useState)(s),[ne,oe]=(0,o.useState)({}),[ie,le]=(0,o.useState)({}),[ae,se]=(0,o.useState)(!1),[ce,ue]=(0,o.useState)(!1),[de,fe]=(0,o.useState)(null),me=(0,o.useRef)(!1),ve=(0,o.useRef)(null),{anchorRefs:ye,setActiveAnchor:we}=ge(t),Te=(0,o.useRef)(!1),[ke,Ae]=(0,o.useState)([]),Oe=(0,o.useRef)(!1),Ce=f||u.includes("click"),Ne=Ce||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),Re=A?{...A}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!A&&Ce&&Object.assign(Re,{mouseenter:!1,focus:!1,click:!0});const Pe=O?{...O}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!O&&Ce&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Le=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:Ne||!1};N&&(Object.assign(Re,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Le,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),be((()=>(Oe.current=!0,()=>{Oe.current=!1})),[]);const Ie=e=>{Oe.current&&(e&&ue(!0),setTimeout((()=>{Oe.current&&(null==H||H(e),void 0===F&&se(e))}),10))};(0,o.useEffect)((()=>{if(void 0===F)return()=>null;F&&ue(!0);const e=setTimeout((()=>{se(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,o.useEffect)((()=>{if(ae!==me.current)if(J.current&&clearTimeout(J.current),me.current=ae,ae)null==L||L();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,r]=t;return"s"!==r&&"ms"!==r?0:Number(n)*("ms"===r?1:1e3)})();J.current=setTimeout((()=>{ue(!1),fe(null),null==I||I()}),e+25)}}),[ae]);const De=(e=g)=>{Y.current&&clearTimeout(Y.current),Y.current=setTimeout((()=>{Ie(!0)}),e)},Me=(e=b)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{Te.current||Ie(!1)}),e)},je=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return B(null),void we({current:null});g?De():Ie(!0),B(n),we({current:n}),Z.current&&clearTimeout(Z.current)},Fe=()=>{_?Me(b||100):b?Me():Ie(!1),Y.current&&clearTimeout(Y.current)},He=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};xe({place:null!==(n=null==de?void 0:de.place)&&void 0!==n?n:s,offset:c,elementReference:r,tooltipReference:X.current,tooltipArrowReference:G.current,strategy:h,middlewares:v,border:V}).then((e=>{Object.keys(e.tooltipStyles).length&&oe(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place)}))},ze=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),ve.current=n},Be=e=>{var t;if(!ae)return;const n=e.target;(null===(t=X.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...ke].some((e=>null==e?void 0:e.contains(n)))||(Ie(!1),Y.current&&clearTimeout(Y.current))},Ve=he(je,50,!0),We=he(Fe,50,!0),qe=(0,o.useCallback)((()=>{var e,t;const n=null!==(e=null==de?void 0:de.position)&&void 0!==e?e:P;n?He(n):w?ve.current&&He(ve.current):(null==z?void 0:z.isConnected)&&xe({place:null!==(t=null==de?void 0:de.place)&&void 0!==t?t:s,offset:c,elementReference:z,tooltipReference:X.current,tooltipArrowReference:G.current,strategy:h,middlewares:v,border:V}).then((e=>{Oe.current&&(Object.keys(e.tooltipStyles).length&&oe(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place))}))}),[ae,z,D,R,s,null==de?void 0:de.place,c,h,P,null==de?void 0:de.position,w]);(0,o.useEffect)((()=>{var e,t;const n=new Set(ye);ke.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${l}']`);r&&n.add({current:r});const o=()=>{Ie(!1)},i=Ee(z),a=Ee(X.current);Le.scroll&&(window.addEventListener("scroll",o),null==i||i.addEventListener("scroll",o),null==a||a.addEventListener("scroll",o));let s=null;Le.resize?window.addEventListener("resize",o):z&&X.current&&(s=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=Q(e),u=o||i?[...c?K(c):[],...K(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=c&&a?function(e,t){let n,r=null;const o=j(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const v={rootMargin:-m(u)+"px "+-m(o.clientWidth-(c+f))+"px "+-m(o.clientHeight-(u+h))+"px "+-m(c)+"px",threshold:p(0,d(1,s))||1};let y=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!y)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}y=!1}try{r=new IntersectionObserver(g,{...v,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,v)}r.observe(e)}(!0),i}(c,n):null;let h,v=-1,y=null;l&&(y=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{y&&y.observe(t)}))),n()})),c&&!s&&y.observe(c),y.observe(t));let g=s?re(e):null;return s&&function t(){const r=re(e);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n(),g=r,h=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),y&&y.disconnect(),y=null,s&&cancelAnimationFrame(h)}}(z,X.current,qe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Ie(!1)};Le.escape&&window.addEventListener("keydown",c),Le.clickOutsideAnchor&&window.addEventListener("click",Be);const u=[],f=e=>{ae&&(null==e?void 0:e.target)===z||je(e)},h=e=>{ae&&(null==e?void 0:e.target)===z&&Fe()},v=["mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(Re).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:Ve}):y.includes(e)&&u.push({event:e,listener:f}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:We}):y.includes(e)&&u.push({event:e,listener:h}))})),w&&u.push({event:"mousemove",listener:ze});const g=()=>{Te.current=!0},b=()=>{Te.current=!1,Fe()};return _&&!Ne&&(null===(e=X.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=X.current)||void 0===t||t.addEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Le.scroll&&(window.removeEventListener("scroll",o),null==i||i.removeEventListener("scroll",o),null==a||a.removeEventListener("scroll",o)),Le.resize?window.removeEventListener("resize",o):null==s||s(),Le.clickOutsideAnchor&&window.removeEventListener("click",Be),Le.escape&&window.removeEventListener("keydown",c),_&&!Ne&&(null===(e=X.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=X.current)||void 0===t||t.removeEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[z,qe,ce,ye,ke,A,O,C,Ce]),(0,o.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:a)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t}']`);const o=new MutationObserver((e=>{const n=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===t&&n.push(e.target),"childList"===e.type){if(z){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,z))&&(ue(!1),Ie(!1),B(null),Y.current&&clearTimeout(Y.current),Z.current&&clearTimeout(Z.current),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||o.length)&&Ae((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{o.disconnect()}}),[t,a,null==de?void 0:de.anchorSelect,z]),(0,o.useEffect)((()=>{qe()}),[qe]),(0,o.useEffect)((()=>{if(!(null==M?void 0:M.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>qe()))}));return e.observe(M.current),()=>{e.disconnect()}}),[D,null==M?void 0:M.current]),(0,o.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...ke,t];z&&n.includes(z)||B(null!==(e=ke[0])&&void 0!==e?e:t)}),[l,ke,z]),(0,o.useEffect)((()=>()=>{Y.current&&clearTimeout(Y.current),Z.current&&clearTimeout(Z.current)}),[]),(0,o.useEffect)((()=>{var e;let n=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:a;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));Ae(e)}catch(e){Ae([])}}),[t,a,null==de?void 0:de.anchorSelect]);const $e=null!==(U=null==de?void 0:de.content)&&void 0!==U?U:D,Ue=ae&&Object.keys(ne).length>0;return(0,o.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Ie(!0)},close:e=>{(null==e?void 0:e.delay)?Me(e.delay):Ie(!1)},activeAnchor:z,place:ee,isOpen:Boolean(ce&&!E&&$e&&Ue)}))),ce&&!E&&$e?o.createElement(y,{id:t,role:$,className:pe("react-tooltip",_e.tooltip,Se.tooltip,Se[i],n,`react-tooltip__place-${ee}`,_e[Ue?"show":"closing"],Ue?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&_e.fixed,_&&_e.clickable),onTransitionEnd:e=>{J.current&&clearTimeout(J.current),ae||"opacity"!==e.propertyName||(ue(!1),fe(null),null==I||I())},style:{...R,...ne,opacity:void 0!==W&&Ue?W:void 0},ref:X},$e,o.createElement(y,{className:pe("react-tooltip-arrow",_e.arrow,Se.arrow,r,x&&_e.noArrow),style:{...ie,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:G})):null},ke=({content:e})=>o.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Ae=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Oe=o.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:v="absolute",middlewares:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:E=!1,noArrow:x=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N=!1,style:R,position:P,isOpen:L,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:j,setIsOpen:F,afterShow:H,afterHide:z,role:B="tooltip"},V)=>{const[W,q]=(0,o.useState)(r),[$,U]=(0,o.useState)(i),[X,G]=(0,o.useState)(u),[Y,Z]=(0,o.useState)(c),[K,J]=(0,o.useState)(d),[Q,ee]=(0,o.useState)(g),[te,ne]=(0,o.useState)(b),[re,oe]=(0,o.useState)(w),[ie,le]=(0,o.useState)(E),[ae,se]=(0,o.useState)(p),[ce,ue]=(0,o.useState)(m),[de,fe]=(0,o.useState)(v),[me,he]=(0,o.useState)(null),[ve,ye]=(0,o.useState)(null),be=(0,o.useRef)(I),{anchorRefs:we,activeAnchor:Ee}=ge(e),xe=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),_e=e=>{const t={place:e=>{var t;G(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:r)},html:e=>{U(null!=e?e:i)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;se(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");ue(null!=t?t:m)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:v)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{oe(null===e?w:"true"===e)},hidden:e=>{le(null===e?E:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,o.useEffect)((()=>{q(r)}),[r]),(0,o.useEffect)((()=>{U(i)}),[i]),(0,o.useEffect)((()=>{G(u)}),[u]),(0,o.useEffect)((()=>{Z(c)}),[c]),(0,o.useEffect)((()=>{J(d)}),[d]),(0,o.useEffect)((()=>{ee(g)}),[g]),(0,o.useEffect)((()=>{ne(b)}),[b]),(0,o.useEffect)((()=>{oe(w)}),[w]),(0,o.useEffect)((()=>{le(E)}),[E]),(0,o.useEffect)((()=>{fe(v)}),[v]),(0,o.useEffect)((()=>{be.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,o.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,o.useEffect)((()=>{var r;const o=new Set(we);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const a=null!==(r=null!=ve?ve:l)&&void 0!==r?r:Ee.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=xe(a);_e(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=xe(a);_e(e),s.observe(a,c)}return()=>{s.disconnect()}}),[we,Ee,ve,t,n]),(0,o.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Ae("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),M&&!Ae("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let Se=f;const Oe=(0,o.useRef)(null);if(l){const e=l({content:null!=W?W:null,activeAnchor:ve});Se=e?o.createElement("div",{ref:Oe,className:"react-tooltip-content-wrapper"},e):null}else W&&(Se=W);$&&(Se=o.createElement(ke,{content:$}));const Ce={forwardRef:V,id:e,anchorId:t,anchorSelect:n,className:pe(a,me),classNameArrow:s,content:Se,contentWrapperRef:Oe,place:X,variant:Y,offset:K,wrapper:ae,events:ce,openOnClick:h,positionStrategy:de,middlewares:y,delayShow:Q,delayHide:te,float:re,hidden:ie,noArrow:x,clickable:_,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N,style:R,position:P,isOpen:L,border:D,opacity:M,arrowColor:j,setIsOpen:F,afterShow:H,afterHide:z,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:B};return o.createElement(Te,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||me({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||me({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Ce=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const o=new CustomEvent(e,{detail:r});dispatchEvent(o)}},Ne=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}};function Re(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const Pe=({onlineEventLinkDefault:e=""})=>{const t=(0,i.__)("Online event","gatherpress"),[n,r]=(0,c.useState)(e);return Ne({setOnlineEventLink:r},Re("post_id")),(0,o.createElement)(a.Flex,{justify:"normal",gap:"3"},(0,o.createElement)(a.FlexItem,{display:"flex"},(0,o.createElement)(a.Icon,{icon:"video-alt2"})),(0,o.createElement)(a.FlexItem,null,!n&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",{tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-online-event-tooltip","data-tooltip-content":(0,i.__)("Link active for attendees during event.","gatherpress")},t),(0,o.createElement)(Oe,{id:"gp-online-event-tooltip"})),n&&(0,o.createElement)("a",{href:n,rel:"noreferrer",target:"_blank"},t)))};var Le=n(3426);const Ie=Le.default||Le,De=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,o.createElement)(o.Fragment,null,(e||t)&&(0,o.createElement)(a.Flex,{justify:"normal",align:"flex-start",gap:"4"},(0,o.createElement)(a.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,o.createElement)(a.Icon,{icon:"location"})),(0,o.createElement)(a.FlexItem,null,e&&(0,o.createElement)("div",{className:"gp-venue__name"},(0,o.createElement)("strong",null,Ie(e))),t&&(0,o.createElement)("div",{className:"gp-venue__full-address"},Ie(t)))),(n||r)&&(0,o.createElement)(a.Flex,{justify:"normal",gap:"8"},n&&(0,o.createElement)(a.FlexItem,null,(0,o.createElement)(a.Flex,{justify:"normal",gap:"4"},(0,o.createElement)(a.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,o.createElement)(a.Icon,{icon:"phone"})),(0,o.createElement)(a.FlexItem,null,(0,o.createElement)("div",{className:"gp-venue__phone-number"},n)))),r&&(0,o.createElement)(a.FlexItem,null,(0,o.createElement)(a.Flex,{justify:"normal",gap:"4"},(0,o.createElement)(a.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,o.createElement)(a.Icon,{icon:"admin-site-alt3"})),(0,o.createElement)(a.FlexItem,null,(0,o.createElement)("div",{className:"gp-venue__website"},(0,o.createElement)("a",{href:r,target:"_blank",rel:"noreferrer noopener"},r))))))),Me=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:i=!1,onlineEventLink:l=""})=>(0,o.createElement)(o.Fragment,null,!i&&(0,o.createElement)(De,{name:e,fullAddress:t,phoneNumber:n,website:r}),i&&(0,o.createElement)(Pe,{onlineEventLinkDefault:l})),je=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,o.createElement)("div",{style:{position:"relative"}},e.children,(0,o.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))};function Fe(){return"gp_venue"===(0,s.select)("core/editor").getCurrentPostType()}const He=()=>{const[e,t]=(0,c.useState)(""),[n,r]=(0,c.useState)(""),[l,u]=(0,c.useState)(""),[d,p]=(0,c.useState)(""),[f,m]=(0,c.useState)(!1),[h,v]=(0,c.useState)(""),y=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:g}=(0,s.useDispatch)("core/editor"),b=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gp_venue"))),w=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gp_venue",b))),E=w?.slug.replace(/^_/,""),[x,_]=(0,c.useState)(""),S=b+":"+x,T=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gp_venue",{per_page:1,slug:x})));(0,c.useEffect)((()=>{var e,n,o,l;let a={};if(x&&Array.isArray(T)){var s;const e=null!==(s=T[0]?.meta?._venue_information)&&void 0!==s?s:"{}";var c;e&&(a=JSON.parse(e),a.name=null!==(c=T[0]?.title.rendered)&&void 0!==c?c:"")}const d=null!==(e=a?.name)&&void 0!==e?e:(0,i.__)("No venue selected.","gatherpress"),f=null!==(n=a?.fullAddress)&&void 0!==n?n:"",m=null!==(o=a?.phoneNumber)&&void 0!==o?o:"",h=null!==(l=a?.website)&&void 0!==l?l:"";E&&_(E),v(S?String(S):""),t(d),r(f),u(m),p(h),Ce({setName:d,setFullAddress:f,setPhoneNumber:m,setWebsite:h,setIsOnlineEventTerm:"online-event"===x})}),[x,T,E,S]);let k=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gp_venue",{per_page:-1,context:"view"})),[]);return k?(k=k.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),k.unshift({value:":",label:(0,i.__)("Choose a venue","gatherpress")})):k=[],(0,o.createElement)(a.PanelRow,null,(0,o.createElement)(a.SelectControl,{label:(0,i.__)("Venue Selector","gatherpress"),value:h,onChange:e=>{(e=>{v(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];y({_gp_venue:t}),_(e[1]),g()})(e)},options:k}))},ze=()=>{var e,t,n;const r=(0,s.useDispatch)("core/editor").editPost,l=(e,t)=>{const n=JSON.stringify({...u,[e]:t});r({meta:{_venue_information:n}})};let u=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._venue_information));u=u?JSON.parse(u):{};const[d,p]=(0,c.useState)(null!==(e=u.fullAddress)&&void 0!==e?e:""),[f,m]=(0,c.useState)(null!==(t=u.phoneNumber)&&void 0!==t?t:""),[h,v]=(0,c.useState)(null!==(n=u.website)&&void 0!==n?n:"");return Ne({setFullAddress:p,setPhoneNumber:m,setWebsite:v}),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(a.TextControl,{label:(0,i.__)("Full Address","gatherpress"),value:d,onChange:e=>{Ce({setFullAddress:e}),l("fullAddress",e)}}),(0,o.createElement)(a.TextControl,{label:(0,i.__)("Phone Number","gatherpress"),value:f,onChange:e=>{Ce({setPhoneNumber:e}),l("phoneNumber",e)}}),(0,o.createElement)(a.TextControl,{label:(0,i.__)("Website","gatherpress"),value:h,type:"url",onChange:e=>{Ce({setWebsite:e}),l("website",e)}}))},Be=()=>(0,o.createElement)("section",null,(0,o.createElement)(ze,null)),Ve=()=>{const{editPost:e,unlockPostSaving:t}=(0,s.useDispatch)("core/editor"),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link)),[r,l]=(0,c.useState)(n);return Ne({setOnlineEventLink:l},Re("post_id")),(0,o.createElement)(a.TextControl,{label:(0,i.__)("Online event link","gatherpress"),value:r,placeholder:(0,i.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{_online_event_link:n}}),l(n),Ce({setOnlineEventLink:n},Re("post_id")),t()})(n)}})},We=window.moment;var qe=n.n(We);window.wp.apiFetch;const $e="YYYY-MM-DDTHH:mm:ss",Ue=qe().tz(Xe()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format($e);function Xe(e=Re("event_datetime.timezone")){return qe().tz.zone(e)?e:(0,i.__)("GMT","gatherpress")}qe().tz(Ue,Xe()).add(2,"hours").format($e);const Ge=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/venue","version":"1.0.0","title":"Venue","category":"gatherpress","icon":"location","example":{},"description":"Provides information about an event venue.","attributes":{"mapShow":{"type":"boolean","default":true},"mapAlign":{"type":"string","default":""},"mapZoomLevel":{"type":"number","default":10},"mapType":{"type":"string","default":"m"},"mapHeight":{"type":"number","default":300}},"supports":{"align":["wide"],"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./venue.js","render":"file:./render.php"}');(0,r.registerBlockType)(Ge,{edit:({attributes:e,setAttributes:t,isSelected:n})=>{const{mapShow:r,mapZoomLevel:d,mapType:p,mapHeight:f}=e,[m,h]=(0,c.useState)(""),[v,y]=(0,c.useState)(""),[g,b]=(0,c.useState)(""),[w,E]=(0,c.useState)(""),[x,_]=(0,c.useState)(!1),S=(0,l.useBlockProps)(),T=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link));let k=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._venue_information));return k=k?JSON.parse(k):{},Ne({setName:h,setFullAddress:y,setPhoneNumber:b,setWebsite:E,setIsOnlineEventTerm:_}),(0,c.useEffect)((()=>{Fe()&&(y(k.fullAddress),b(k.phoneNumber),E(k.website),h(v||g||w?"":(0,i.__)("Add venue information.","gatherpress"))),"gp_event"===(0,s.select)("core/editor").getCurrentPostType()&&h(v||g||w?"":(0,i.__)("No venue selected.","gatherpress"))}),[k.fullAddress,k.phoneNumber,k.website,v,g,w]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(a.PanelBody,{title:(0,i.__)("Venue settings","gatherpress"),initialOpen:!0},(0,o.createElement)(a.PanelRow,null,!Fe()&&(0,o.createElement)(He,null),Fe()&&(0,o.createElement)(Be,null)),x&&(0,o.createElement)(a.PanelRow,null,(0,o.createElement)(Ve,null))),!x&&(0,o.createElement)(a.PanelBody,{title:(0,i.__)("Map settings","gatherpress"),initialOpen:!0},(0,o.createElement)(a.PanelRow,null,(0,i.__)("Show map on venue","gatherpress")),(0,o.createElement)(a.PanelRow,null,(0,o.createElement)(a.ToggleControl,{label:r?(0,i.__)("Display the map","gatherpress"):(0,i.__)("Hide the map","gatherpress"),checked:r,onChange:e=>{t({mapShow:e})}})),(0,o.createElement)(a.RangeControl,{label:(0,i.__)("Zoom level","gatherpress"),beforeIcon:"search",value:d,onChange:e=>t({mapZoomLevel:e}),min:1,max:22}),(0,o.createElement)(a.RadioControl,{label:(0,i.__)("Map type","gatherpress"),selected:p,options:[{label:(0,i.__)("Roadmap","gatherpress"),value:"m"},{label:(0,i.__)("Satellite","gatherpress"),value:"k"}],onChange:e=>{t({mapType:e})}}),(0,o.createElement)(a.RangeControl,{label:(0,i.__)("Map height","gatherpress"),beforeIcon:"location",value:f,onChange:e=>t({mapHeight:e}),min:100,max:1e3}))),(0,o.createElement)("div",{...S},(0,o.createElement)(je,{isSelected:n},(0,o.createElement)("div",{className:"gp-venue"},(0,o.createElement)(Me,{name:m,fullAddress:v,phoneNumber:g,website:w,isOnlineEventTerm:x,onlineEventLink:T}),r&&v&&(0,o.createElement)(u,{location:v,zoom:d,type:p,height:f})))))},save:()=>{}})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);o(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new l.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,l.isTag)(e)}function y(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function E(e){return e.type===l.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var r=t?_(e.children):[],o=new h(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(y(e)){r=t?_(e.children):[];var l=new f(r);r.forEach((function(e){return e.parent=l})),n=l}else if(E(e)){r=t?_(e.children):[];var a=new m(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function _(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return l.test(e)||null===(t=null==(v=m.querySelector(r))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=m.querySelector(o))?void 0:v.parentNode)||void 0===u||u.removeChild(v),m.querySelectorAll(n);case r:case o:var h=s(e).querySelectorAll(p);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(v=s(e,o).querySelector(o)).childNodes;var v}}},4152:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var r=n(7915),o=n(885);function i(e){for(var t={},n=0,r=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5726),o=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return r.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=s(p);if(f){var m=(0,r.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=s("default"+p)),n[f]=d,m&&m.type){case r.BOOLEAN:n[f]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(9196),i=r(n(484)),l=n(4606),a={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var r=[],o="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(y=d(y,{key:y.key||h})),r.push(c(y,v,h));continue}}if("text"!==v.type){var g=v,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(w=e(v.children,n));break;default:continue}m>1&&(b.key=h),r.push(c(p(v.name,b,w),v,h))}else{var E=!v.data.trim().length;if(E&&v.parent&&!(0,l.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&E)continue;r.push(c(v.data,v,h))}}return 1===r.length?r[0]:r}},3426:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var o=r(n(4152));t.htmlToDOM=o.default;var i=r(n(484));t.attributesToProps=i.default;var l=r(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var o=n(9196),i=r(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=s.source}h.prototype.content=e;var v=[];function y(t){var n=new Error(s.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=p,n.source=e,!s.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){g(r)}function w(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function x(){var e=m(),n=g(o);if(n){if(E(),!g(i))return y("property missing ':'");var r=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},5726:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(r,a))}},5174:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},9196:e=>{"use strict";e.exports=window.React},3967:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{if(!n){var l=1/0;for(u=0;u=i)&&Object.keys(r.O).every((e=>r.O[e](n[s])))?n.splice(s--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,o,i]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={654:0,857:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[l,a,s]=n,c=0;if(l.some((t=>0!==e[t]))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(s)var u=s(r)}for(t&&t(n);cr(100)));o=r.O(o)})(); \ No newline at end of file +(()=>{var e,t={100:(e,t,n)=>{"use strict";const r=window.wp.blocks;var o=n(9196);const i=window.wp.i18n,l=window.wp.blockEditor,a=window.wp.components,s=window.wp.data,c=window.wp.element,u=e=>{const{location:t,zoom:n,type:r,className:i}=e;let{height:l}=e;l||(l=300);const a={border:0,height:l,width:"100%"};if(!t)return(0,o.createElement)(o.Fragment,null);const s="https://maps.google.com/maps?"+new URLSearchParams({q:t,z:n||10,t:r||"m",output:"embed"}).toString();return(0,o.createElement)("iframe",{src:s,style:a,className:i,title:t})},d=Math.min,p=Math.max,f=Math.round,m=Math.floor,h=e=>({x:e,y:e}),v={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function g(e,t,n){return p(e,d(t,n))}function b(e,t){return"function"==typeof e?e(t):e}function w(e){return e.split("-")[0]}function E(e){return e.split("-")[1]}function x(e){return"x"===e?"y":"x"}function _(e){return"y"===e?"height":"width"}function S(e){return["top","bottom"].includes(w(e))?"y":"x"}function T(e){return x(S(e))}function k(e){return e.replace(/start|end/g,(e=>y[e]))}function A(e){return e.replace(/left|right|bottom|top/g,(e=>v[e]))}function O(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function C(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function N(e,t,n){let{reference:r,floating:o}=e;const i=S(t),l=T(t),a=_(l),s=w(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let f;switch(s){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(E(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function R(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=b(t,e),m=O(f),h=a[p?"floating"===d?"reference":"floating":d],v=C(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===d?{...l.floating,x:r,y:o}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},E=C(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:g,strategy:s}):y);return{top:(v.top-E.top+m.top)/w.y,bottom:(E.bottom-v.bottom+m.bottom)/w.y,left:(v.left-E.left+m.left)/w.x,right:(E.right-v.right+m.right)/w.x}}const P=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=b(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=w(o),g=w(a)===a,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),S=p||(g||!h?[A(a)]:function(e){const t=A(e);return[k(e),t,k(t)]}(a));p||"none"===m||S.push(...function(e,t,n,r){const o=E(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(w(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(k)))),i}(a,h,m,x));const O=[a,...S],C=await R(t,v),N=[];let P=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&N.push(C[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=E(e),o=T(e),i=_(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=A(l)),[l,A(l)]}(o,l,x);N.push(C[e[0]],C[e[1]])}if(P=[...P,{placement:o,overflows:N}],!N.every((e=>e<=0))){var L,I;const e=((null==(L=i.flip)?void 0:L.index)||0)+1,t=O[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(I=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(f){case"bestFit":{var D;const e=null==(D=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},L=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=w(n),a=E(n),s="y"===S(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=b(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),s?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},I=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=b(e,t),c={x:n,y:r},u=await R(t,s),d=S(w(o)),p=x(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=g(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";m=g(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}};function D(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return e instanceof Node||e instanceof M(e).Node}function H(e){return e instanceof Element||e instanceof M(e).Element}function z(e){return e instanceof HTMLElement||e instanceof M(e).HTMLElement}function B(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof M(e).ShadowRoot)}function V(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function W(e){return["table","td","th"].includes(D(e))}function q(e){const t=$(),n=X(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function $(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function U(e){return["html","body","#document"].includes(D(e))}function X(e){return M(e).getComputedStyle(e)}function G(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Y(e){if("html"===D(e))return e;const t=e.assignedSlot||e.parentNode||B(e)&&e.host||j(e);return B(t)?t.host:t}function Z(e){const t=Y(e);return U(t)?e.ownerDocument?e.ownerDocument.body:e.body:z(t)&&V(t)?t:Z(t)}function K(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Z(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=M(o);return i?t.concat(l,l.visualViewport||[],V(o)?o:[],l.frameElement&&n?K(l.frameElement):[]):t.concat(o,K(o,[],n))}function J(e){const t=X(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=z(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=f(n)!==i||f(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function Q(e){return H(e)?e:e.contextElement}function ee(e){const t=Q(e);if(!z(t))return h(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=J(t);let l=(i?f(n.width):n.width)/r,a=(i?f(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const te=h(0);function ne(e){const t=M(e);return $()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:te}function re(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Q(e);let l=h(1);t&&(r?H(r)&&(l=ee(r)):l=ee(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==M(e))&&t}(i,n,r)?ne(i):h(0);let s=(o.left+a.x)/l.x,c=(o.top+a.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=M(i),t=r&&H(r)?M(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=ee(n),t=n.getBoundingClientRect(),r=X(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=o,c+=i,n=M(n).frameElement}}return C({width:u,height:d,x:s,y:c})}function oe(e){return re(j(e)).left+G(e).scrollLeft}function ie(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=M(e),r=j(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=$();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){const t=j(e),n=G(e),r=e.ownerDocument.body,o=p(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=p(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+oe(e);const a=-n.scrollTop;return"rtl"===X(r).direction&&(l+=p(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(j(e));else if(H(t))r=function(e,t){const n=re(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=z(e)?ee(e):h(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ne(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return C(r)}function le(e,t){const n=Y(e);return!(n===t||!H(n)||U(n))&&("fixed"===X(n).position||le(n,t))}function ae(e,t,n){const r=z(t),o=j(t),i="fixed"===n,l=re(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=h(0);if(r||!r&&!i)if(("body"!==D(t)||V(o))&&(a=G(t)),r){const e=re(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=oe(o));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function se(e,t){return z(e)&&"fixed"!==X(e).position?t?t(e):e.offsetParent:null}function ce(e,t){const n=M(e);if(!z(e))return n;let r=se(e,t);for(;r&&W(r)&&"static"===X(r).position;)r=se(r,t);return r&&("html"===D(r)||"body"===D(r)&&"static"===X(r).position&&!q(r))?n:r||function(e){let t=Y(e);for(;z(t)&&!U(t);){if(q(t))return t;t=Y(t)}return null}(e)||n}const ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=z(n),i=j(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=h(1);const s=h(0);if((o||!o&&"fixed"!==r)&&(("body"!==D(n)||V(i))&&(l=G(n)),z(n))){const e=re(n);a=ee(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=K(e,[],!1).filter((e=>H(e)&&"body"!==D(e))),o=null;const i="fixed"===X(e).position;let l=i?Y(e):e;for(;H(l)&&!U(l);){const t=X(l),n=q(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||V(l)&&!n&&le(e,l))?r=r.filter((e=>e!==l)):o=t,l=Y(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],a=i.reduce(((e,n)=>{const r=ie(t,n,o);return e.top=p(r.top,e.top),e.right=d(r.right,e.right),e.bottom=d(r.bottom,e.bottom),e.left=p(r.left,e.left),e}),ie(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ce,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||ce,i=this.getDimensions;return{reference:ae(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return J(e)},getScale:ee,isElement:H,isRTL:function(e){return"rtl"===X(e).direction}};const de=(e,t,n)=>{const r=new Map,o={platform:ue,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=N(c,r,s),p=r,f={},m=0;for(let n=0;n{let r=null;return function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))}},ve={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},ye=(0,o.createContext)({getTooltipData:()=>ve});function ge(e="DEFAULT_TOOLTIP_ID"){return(0,o.useContext)(ye).getTooltipData(e)}const be="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,we=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},Ee=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(we(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},xe=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:l=[L(Number(o)),P({fallbackAxisSideDirection:"start"}),I({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const s=l;return n?(s.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:r,rects:o,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:u=0}=b(c,e)||{};if(null==s)return{};const p=O(u),f={x:t,y:n},m=T(r),h=_(m),v=await i.getDimensions(s),y="y"===m,w=y?"top":"left",x=y?"bottom":"right",S=y?"clientHeight":"clientWidth",k=o.reference[h]+o.reference[m]-f[m]-o.floating[h],A=f[m]-o.reference[m],C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=C?C[S]:0;N&&await(null==i.isElement?void 0:i.isElement(C))||(N=l.floating[S]||o.floating[h]);const R=k/2-A/2,P=N/2-v[h]/2-1,L=d(p[w],P),I=d(p[x],P),D=L,M=N-v[h]-I,j=N/2-v[h]/2+R,F=g(D,j,M),H=!a.arrow&&null!=E(r)&&j!=F&&o.reference[h]/2-(j{var o,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):de(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var _e={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Se={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Te=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:i="dark",anchorId:l,anchorSelect:a,place:s="top",offset:c=10,events:u=["hover"],openOnClick:f=!1,positionStrategy:h="absolute",middlewares:v,wrapper:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:E=!1,noArrow:x=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N,style:R,position:P,afterShow:L,afterHide:I,content:D,contentWrapperRef:M,isOpen:F,setIsOpen:H,activeAnchor:z,setActiveAnchor:B,border:V,opacity:W,arrowColor:q,role:$="tooltip"})=>{var U;const X=(0,o.useRef)(null),G=(0,o.useRef)(null),Y=(0,o.useRef)(null),Z=(0,o.useRef)(null),J=(0,o.useRef)(null),[ee,te]=(0,o.useState)(s),[ne,oe]=(0,o.useState)({}),[ie,le]=(0,o.useState)({}),[ae,se]=(0,o.useState)(!1),[ce,ue]=(0,o.useState)(!1),[de,fe]=(0,o.useState)(null),me=(0,o.useRef)(!1),ve=(0,o.useRef)(null),{anchorRefs:ye,setActiveAnchor:we}=ge(t),Te=(0,o.useRef)(!1),[ke,Ae]=(0,o.useState)([]),Oe=(0,o.useRef)(!1),Ce=f||u.includes("click"),Ne=Ce||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),Re=A?{...A}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!A&&Ce&&Object.assign(Re,{mouseenter:!1,focus:!1,click:!0});const Pe=O?{...O}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!O&&Ce&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Le=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:Ne||!1};N&&(Object.assign(Re,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Le,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),be((()=>(Oe.current=!0,()=>{Oe.current=!1})),[]);const Ie=e=>{Oe.current&&(e&&ue(!0),setTimeout((()=>{Oe.current&&(null==H||H(e),void 0===F&&se(e))}),10))};(0,o.useEffect)((()=>{if(void 0===F)return()=>null;F&&ue(!0);const e=setTimeout((()=>{se(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,o.useEffect)((()=>{if(ae!==me.current)if(J.current&&clearTimeout(J.current),me.current=ae,ae)null==L||L();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,r]=t;return"s"!==r&&"ms"!==r?0:Number(n)*("ms"===r?1:1e3)})();J.current=setTimeout((()=>{ue(!1),fe(null),null==I||I()}),e+25)}}),[ae]);const De=(e=g)=>{Y.current&&clearTimeout(Y.current),Y.current=setTimeout((()=>{Ie(!0)}),e)},Me=(e=b)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{Te.current||Ie(!1)}),e)},je=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return B(null),void we({current:null});g?De():Ie(!0),B(n),we({current:n}),Z.current&&clearTimeout(Z.current)},Fe=()=>{_?Me(b||100):b?Me():Ie(!1),Y.current&&clearTimeout(Y.current)},He=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};xe({place:null!==(n=null==de?void 0:de.place)&&void 0!==n?n:s,offset:c,elementReference:r,tooltipReference:X.current,tooltipArrowReference:G.current,strategy:h,middlewares:v,border:V}).then((e=>{Object.keys(e.tooltipStyles).length&&oe(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place)}))},ze=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),ve.current=n},Be=e=>{var t;if(!ae)return;const n=e.target;(null===(t=X.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...ke].some((e=>null==e?void 0:e.contains(n)))||(Ie(!1),Y.current&&clearTimeout(Y.current))},Ve=he(je,50,!0),We=he(Fe,50,!0),qe=(0,o.useCallback)((()=>{var e,t;const n=null!==(e=null==de?void 0:de.position)&&void 0!==e?e:P;n?He(n):w?ve.current&&He(ve.current):(null==z?void 0:z.isConnected)&&xe({place:null!==(t=null==de?void 0:de.place)&&void 0!==t?t:s,offset:c,elementReference:z,tooltipReference:X.current,tooltipArrowReference:G.current,strategy:h,middlewares:v,border:V}).then((e=>{Oe.current&&(Object.keys(e.tooltipStyles).length&&oe(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place))}))}),[ae,z,D,R,s,null==de?void 0:de.place,c,h,P,null==de?void 0:de.position,w]);(0,o.useEffect)((()=>{var e,t;const n=new Set(ye);ke.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${l}']`);r&&n.add({current:r});const o=()=>{Ie(!1)},i=Ee(z),a=Ee(X.current);Le.scroll&&(window.addEventListener("scroll",o),null==i||i.addEventListener("scroll",o),null==a||a.addEventListener("scroll",o));let s=null;Le.resize?window.addEventListener("resize",o):z&&X.current&&(s=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=Q(e),u=o||i?[...c?K(c):[],...K(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=c&&a?function(e,t){let n,r=null;const o=j(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const v={rootMargin:-m(u)+"px "+-m(o.clientWidth-(c+f))+"px "+-m(o.clientHeight-(u+h))+"px "+-m(c)+"px",threshold:p(0,d(1,s))||1};let y=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!y)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}y=!1}try{r=new IntersectionObserver(g,{...v,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,v)}r.observe(e)}(!0),i}(c,n):null;let h,v=-1,y=null;l&&(y=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{y&&y.observe(t)}))),n()})),c&&!s&&y.observe(c),y.observe(t));let g=s?re(e):null;return s&&function t(){const r=re(e);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n(),g=r,h=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),y&&y.disconnect(),y=null,s&&cancelAnimationFrame(h)}}(z,X.current,qe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Ie(!1)};Le.escape&&window.addEventListener("keydown",c),Le.clickOutsideAnchor&&window.addEventListener("click",Be);const u=[],f=e=>{ae&&(null==e?void 0:e.target)===z||je(e)},h=e=>{ae&&(null==e?void 0:e.target)===z&&Fe()},v=["mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(Re).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:Ve}):y.includes(e)&&u.push({event:e,listener:f}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:We}):y.includes(e)&&u.push({event:e,listener:h}))})),w&&u.push({event:"mousemove",listener:ze});const g=()=>{Te.current=!0},b=()=>{Te.current=!1,Fe()};return _&&!Ne&&(null===(e=X.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=X.current)||void 0===t||t.addEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Le.scroll&&(window.removeEventListener("scroll",o),null==i||i.removeEventListener("scroll",o),null==a||a.removeEventListener("scroll",o)),Le.resize?window.removeEventListener("resize",o):null==s||s(),Le.clickOutsideAnchor&&window.removeEventListener("click",Be),Le.escape&&window.removeEventListener("keydown",c),_&&!Ne&&(null===(e=X.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=X.current)||void 0===t||t.removeEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[z,qe,ce,ye,ke,A,O,C,Ce]),(0,o.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:a)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t}']`);const o=new MutationObserver((e=>{const n=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===t&&n.push(e.target),"childList"===e.type){if(z){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,z))&&(ue(!1),Ie(!1),B(null),Y.current&&clearTimeout(Y.current),Z.current&&clearTimeout(Z.current),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||o.length)&&Ae((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{o.disconnect()}}),[t,a,null==de?void 0:de.anchorSelect,z]),(0,o.useEffect)((()=>{qe()}),[qe]),(0,o.useEffect)((()=>{if(!(null==M?void 0:M.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>qe()))}));return e.observe(M.current),()=>{e.disconnect()}}),[D,null==M?void 0:M.current]),(0,o.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...ke,t];z&&n.includes(z)||B(null!==(e=ke[0])&&void 0!==e?e:t)}),[l,ke,z]),(0,o.useEffect)((()=>()=>{Y.current&&clearTimeout(Y.current),Z.current&&clearTimeout(Z.current)}),[]),(0,o.useEffect)((()=>{var e;let n=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:a;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));Ae(e)}catch(e){Ae([])}}),[t,a,null==de?void 0:de.anchorSelect]);const $e=null!==(U=null==de?void 0:de.content)&&void 0!==U?U:D,Ue=ae&&Object.keys(ne).length>0;return(0,o.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Ie(!0)},close:e=>{(null==e?void 0:e.delay)?Me(e.delay):Ie(!1)},activeAnchor:z,place:ee,isOpen:Boolean(ce&&!E&&$e&&Ue)}))),ce&&!E&&$e?o.createElement(y,{id:t,role:$,className:pe("react-tooltip",_e.tooltip,Se.tooltip,Se[i],n,`react-tooltip__place-${ee}`,_e[Ue?"show":"closing"],Ue?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&_e.fixed,_&&_e.clickable),onTransitionEnd:e=>{J.current&&clearTimeout(J.current),ae||"opacity"!==e.propertyName||(ue(!1),fe(null),null==I||I())},style:{...R,...ne,opacity:void 0!==W&&Ue?W:void 0},ref:X},$e,o.createElement(y,{className:pe("react-tooltip-arrow",_e.arrow,Se.arrow,r,x&&_e.noArrow),style:{...ie,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:G})):null},ke=({content:e})=>o.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Ae=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Oe=o.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:v="absolute",middlewares:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:E=!1,noArrow:x=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N=!1,style:R,position:P,isOpen:L,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:j,setIsOpen:F,afterShow:H,afterHide:z,role:B="tooltip"},V)=>{const[W,q]=(0,o.useState)(r),[$,U]=(0,o.useState)(i),[X,G]=(0,o.useState)(u),[Y,Z]=(0,o.useState)(c),[K,J]=(0,o.useState)(d),[Q,ee]=(0,o.useState)(g),[te,ne]=(0,o.useState)(b),[re,oe]=(0,o.useState)(w),[ie,le]=(0,o.useState)(E),[ae,se]=(0,o.useState)(p),[ce,ue]=(0,o.useState)(m),[de,fe]=(0,o.useState)(v),[me,he]=(0,o.useState)(null),[ve,ye]=(0,o.useState)(null),be=(0,o.useRef)(I),{anchorRefs:we,activeAnchor:Ee}=ge(e),xe=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),_e=e=>{const t={place:e=>{var t;G(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:r)},html:e=>{U(null!=e?e:i)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;se(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");ue(null!=t?t:m)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:v)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{oe(null===e?w:"true"===e)},hidden:e=>{le(null===e?E:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,o.useEffect)((()=>{q(r)}),[r]),(0,o.useEffect)((()=>{U(i)}),[i]),(0,o.useEffect)((()=>{G(u)}),[u]),(0,o.useEffect)((()=>{Z(c)}),[c]),(0,o.useEffect)((()=>{J(d)}),[d]),(0,o.useEffect)((()=>{ee(g)}),[g]),(0,o.useEffect)((()=>{ne(b)}),[b]),(0,o.useEffect)((()=>{oe(w)}),[w]),(0,o.useEffect)((()=>{le(E)}),[E]),(0,o.useEffect)((()=>{fe(v)}),[v]),(0,o.useEffect)((()=>{be.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,o.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,o.useEffect)((()=>{var r;const o=new Set(we);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const a=null!==(r=null!=ve?ve:l)&&void 0!==r?r:Ee.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=xe(a);_e(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=xe(a);_e(e),s.observe(a,c)}return()=>{s.disconnect()}}),[we,Ee,ve,t,n]),(0,o.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Ae("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),M&&!Ae("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let Se=f;const Oe=(0,o.useRef)(null);if(l){const e=l({content:null!=W?W:null,activeAnchor:ve});Se=e?o.createElement("div",{ref:Oe,className:"react-tooltip-content-wrapper"},e):null}else W&&(Se=W);$&&(Se=o.createElement(ke,{content:$}));const Ce={forwardRef:V,id:e,anchorId:t,anchorSelect:n,className:pe(a,me),classNameArrow:s,content:Se,contentWrapperRef:Oe,place:X,variant:Y,offset:K,wrapper:ae,events:ce,openOnClick:h,positionStrategy:de,middlewares:y,delayShow:Q,delayHide:te,float:re,hidden:ie,noArrow:x,clickable:_,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N,style:R,position:P,isOpen:L,border:D,opacity:M,arrowColor:j,setIsOpen:F,afterShow:H,afterHide:z,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:B};return o.createElement(Te,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||me({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||me({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Ce=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const o=new CustomEvent(e,{detail:r});dispatchEvent(o)}},Ne=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}};function Re(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const Pe=({onlineEventLinkDefault:e=""})=>{const t=(0,i.__)("Online event","gatherpress"),[n,r]=(0,c.useState)(e);return Ne({setOnlineEventLink:r},Re("eventDetails.postId")),(0,o.createElement)(a.Flex,{justify:"normal",gap:"3"},(0,o.createElement)(a.FlexItem,{display:"flex"},(0,o.createElement)(a.Icon,{icon:"video-alt2"})),(0,o.createElement)(a.FlexItem,null,!n&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",{tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-online-event-tooltip","data-tooltip-content":(0,i.__)("Link active for attendees during event.","gatherpress")},t),(0,o.createElement)(Oe,{id:"gp-online-event-tooltip"})),n&&(0,o.createElement)("a",{href:n,rel:"noreferrer",target:"_blank"},t)))};var Le=n(3426);const Ie=Le.default||Le,De=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,o.createElement)(o.Fragment,null,(e||t)&&(0,o.createElement)(a.Flex,{justify:"normal",align:"flex-start",gap:"4"},(0,o.createElement)(a.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,o.createElement)(a.Icon,{icon:"location"})),(0,o.createElement)(a.FlexItem,null,e&&(0,o.createElement)("div",{className:"gp-venue__name"},(0,o.createElement)("strong",null,Ie(e))),t&&(0,o.createElement)("div",{className:"gp-venue__full-address"},Ie(t)))),(n||r)&&(0,o.createElement)(a.Flex,{justify:"normal",gap:"8"},n&&(0,o.createElement)(a.FlexItem,null,(0,o.createElement)(a.Flex,{justify:"normal",gap:"4"},(0,o.createElement)(a.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,o.createElement)(a.Icon,{icon:"phone"})),(0,o.createElement)(a.FlexItem,null,(0,o.createElement)("div",{className:"gp-venue__phone-number"},n)))),r&&(0,o.createElement)(a.FlexItem,null,(0,o.createElement)(a.Flex,{justify:"normal",gap:"4"},(0,o.createElement)(a.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,o.createElement)(a.Icon,{icon:"admin-site-alt3"})),(0,o.createElement)(a.FlexItem,null,(0,o.createElement)("div",{className:"gp-venue__website"},(0,o.createElement)("a",{href:r,target:"_blank",rel:"noreferrer noopener"},r))))))),Me=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:i=!1,onlineEventLink:l=""})=>(0,o.createElement)(o.Fragment,null,!i&&(0,o.createElement)(De,{name:e,fullAddress:t,phoneNumber:n,website:r}),i&&(0,o.createElement)(Pe,{onlineEventLinkDefault:l})),je=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,o.createElement)("div",{style:{position:"relative"}},e.children,(0,o.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))};function Fe(){return"gp_venue"===(0,s.select)("core/editor").getCurrentPostType()}const He=()=>{const[e,t]=(0,c.useState)(""),[n,r]=(0,c.useState)(""),[l,u]=(0,c.useState)(""),[d,p]=(0,c.useState)(""),[f,m]=(0,c.useState)(!1),[h,v]=(0,c.useState)(""),y=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:g}=(0,s.useDispatch)("core/editor"),b=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gp_venue"))),w=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gp_venue",b))),E=w?.slug.replace(/^_/,""),[x,_]=(0,c.useState)(""),S=b+":"+x,T=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gp_venue",{per_page:1,slug:x})));(0,c.useEffect)((()=>{var e,n,o,l;let a={};if(x&&Array.isArray(T)){var s;const e=null!==(s=T[0]?.meta?._venue_information)&&void 0!==s?s:"{}";var c;e&&(a=JSON.parse(e),a.name=null!==(c=T[0]?.title.rendered)&&void 0!==c?c:"")}const d=null!==(e=a?.name)&&void 0!==e?e:(0,i.__)("No venue selected.","gatherpress"),f=null!==(n=a?.fullAddress)&&void 0!==n?n:"",m=null!==(o=a?.phoneNumber)&&void 0!==o?o:"",h=null!==(l=a?.website)&&void 0!==l?l:"";E&&_(E),v(S?String(S):""),t(d),r(f),u(m),p(h),Ce({setName:d,setFullAddress:f,setPhoneNumber:m,setWebsite:h,setIsOnlineEventTerm:"online-event"===x})}),[x,T,E,S]);let k=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gp_venue",{per_page:-1,context:"view"})),[]);return k?(k=k.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),k.unshift({value:":",label:(0,i.__)("Choose a venue","gatherpress")})):k=[],(0,o.createElement)(a.PanelRow,null,(0,o.createElement)(a.SelectControl,{label:(0,i.__)("Venue Selector","gatherpress"),value:h,onChange:e=>{(e=>{v(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];y({_gp_venue:t}),_(e[1]),g()})(e)},options:k}))},ze=()=>{var e,t,n;const r=(0,s.useDispatch)("core/editor").editPost,l=(e,t)=>{const n=JSON.stringify({...u,[e]:t});r({meta:{_venue_information:n}})};let u=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._venue_information));u=u?JSON.parse(u):{};const[d,p]=(0,c.useState)(null!==(e=u.fullAddress)&&void 0!==e?e:""),[f,m]=(0,c.useState)(null!==(t=u.phoneNumber)&&void 0!==t?t:""),[h,v]=(0,c.useState)(null!==(n=u.website)&&void 0!==n?n:"");return Ne({setFullAddress:p,setPhoneNumber:m,setWebsite:v}),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(a.TextControl,{label:(0,i.__)("Full Address","gatherpress"),value:d,onChange:e=>{Ce({setFullAddress:e}),l("fullAddress",e)}}),(0,o.createElement)(a.TextControl,{label:(0,i.__)("Phone Number","gatherpress"),value:f,onChange:e=>{Ce({setPhoneNumber:e}),l("phoneNumber",e)}}),(0,o.createElement)(a.TextControl,{label:(0,i.__)("Website","gatherpress"),value:h,type:"url",onChange:e=>{Ce({setWebsite:e}),l("website",e)}}))},Be=()=>(0,o.createElement)("section",null,(0,o.createElement)(ze,null)),Ve=()=>{const{editPost:e,unlockPostSaving:t}=(0,s.useDispatch)("core/editor"),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link)),[r,l]=(0,c.useState)(n);return Ne({setOnlineEventLink:l},Re("eventDetails.postId")),(0,o.createElement)(a.TextControl,{label:(0,i.__)("Online event link","gatherpress"),value:r,placeholder:(0,i.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{_online_event_link:n}}),l(n),Ce({setOnlineEventLink:n},Re("eventDetails.postId")),t()})(n)}})},We=window.moment;var qe=n.n(We);window.wp.apiFetch;const $e="YYYY-MM-DDTHH:mm:ss",Ue=qe().tz(Xe()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format($e);function Xe(e=Re("eventDetails.dateTime.timezone")){return qe().tz.zone(e)?e:(0,i.__)("GMT","gatherpress")}qe().tz(Ue,Xe()).add(2,"hours").format($e);const Ge=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/venue","version":"1.0.0","title":"Venue","category":"gatherpress","icon":"location","example":{},"description":"Provides information about an event venue.","attributes":{"mapShow":{"type":"boolean","default":true},"mapAlign":{"type":"string","default":""},"mapZoomLevel":{"type":"number","default":10},"mapType":{"type":"string","default":"m"},"mapHeight":{"type":"number","default":300}},"supports":{"align":["wide"],"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./venue.js","render":"file:./render.php"}');(0,r.registerBlockType)(Ge,{edit:({attributes:e,setAttributes:t,isSelected:n})=>{const{mapShow:r,mapZoomLevel:d,mapType:p,mapHeight:f}=e,[m,h]=(0,c.useState)(""),[v,y]=(0,c.useState)(""),[g,b]=(0,c.useState)(""),[w,E]=(0,c.useState)(""),[x,_]=(0,c.useState)(!1),S=(0,l.useBlockProps)(),T=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link));let k=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._venue_information));return k=k?JSON.parse(k):{},Ne({setName:h,setFullAddress:y,setPhoneNumber:b,setWebsite:E,setIsOnlineEventTerm:_}),(0,c.useEffect)((()=>{Fe()&&(y(k.fullAddress),b(k.phoneNumber),E(k.website),h(v||g||w?"":(0,i.__)("Add venue information.","gatherpress"))),"gp_event"===(0,s.select)("core/editor").getCurrentPostType()&&h(v||g||w?"":(0,i.__)("No venue selected.","gatherpress"))}),[k.fullAddress,k.phoneNumber,k.website,v,g,w]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(a.PanelBody,{title:(0,i.__)("Venue settings","gatherpress"),initialOpen:!0},(0,o.createElement)(a.PanelRow,null,!Fe()&&(0,o.createElement)(He,null),Fe()&&(0,o.createElement)(Be,null)),x&&(0,o.createElement)(a.PanelRow,null,(0,o.createElement)(Ve,null))),!x&&(0,o.createElement)(a.PanelBody,{title:(0,i.__)("Map settings","gatherpress"),initialOpen:!0},(0,o.createElement)(a.PanelRow,null,(0,i.__)("Show map on venue","gatherpress")),(0,o.createElement)(a.PanelRow,null,(0,o.createElement)(a.ToggleControl,{label:r?(0,i.__)("Display the map","gatherpress"):(0,i.__)("Hide the map","gatherpress"),checked:r,onChange:e=>{t({mapShow:e})}})),(0,o.createElement)(a.RangeControl,{label:(0,i.__)("Zoom level","gatherpress"),beforeIcon:"search",value:d,onChange:e=>t({mapZoomLevel:e}),min:1,max:22}),(0,o.createElement)(a.RadioControl,{label:(0,i.__)("Map type","gatherpress"),selected:p,options:[{label:(0,i.__)("Roadmap","gatherpress"),value:"m"},{label:(0,i.__)("Satellite","gatherpress"),value:"k"}],onChange:e=>{t({mapType:e})}}),(0,o.createElement)(a.RangeControl,{label:(0,i.__)("Map height","gatherpress"),beforeIcon:"location",value:f,onChange:e=>t({mapHeight:e}),min:100,max:1e3}))),(0,o.createElement)("div",{...S},(0,o.createElement)(je,{isSelected:n},(0,o.createElement)("div",{className:"gp-venue"},(0,o.createElement)(Me,{name:m,fullAddress:v,phoneNumber:g,website:w,isOnlineEventTerm:x,onlineEventLink:T}),r&&v&&(0,o.createElement)(u,{location:v,zoom:d,type:p,height:f})))))},save:()=>{}})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);o(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new l.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,l.isTag)(e)}function y(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function E(e){return e.type===l.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var r=t?_(e.children):[],o=new h(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(y(e)){r=t?_(e.children):[];var l=new f(r);r.forEach((function(e){return e.parent=l})),n=l}else if(E(e)){r=t?_(e.children):[];var a=new m(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function _(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return l.test(e)||null===(t=null==(v=m.querySelector(r))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=m.querySelector(o))?void 0:v.parentNode)||void 0===u||u.removeChild(v),m.querySelectorAll(n);case r:case o:var h=s(e).querySelectorAll(p);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(v=s(e,o).querySelector(o)).childNodes;var v}}},4152:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var r=n(7915),o=n(885);function i(e){for(var t={},n=0,r=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5726),o=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return r.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=s(p);if(f){var m=(0,r.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=s("default"+p)),n[f]=d,m&&m.type){case r.BOOLEAN:n[f]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(9196),i=r(n(484)),l=n(4606),a={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var r=[],o="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(y=d(y,{key:y.key||h})),r.push(c(y,v,h));continue}}if("text"!==v.type){var g=v,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(w=e(v.children,n));break;default:continue}m>1&&(b.key=h),r.push(c(p(v.name,b,w),v,h))}else{var E=!v.data.trim().length;if(E&&v.parent&&!(0,l.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&E)continue;r.push(c(v.data,v,h))}}return 1===r.length?r[0]:r}},3426:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var o=r(n(4152));t.htmlToDOM=o.default;var i=r(n(484));t.attributesToProps=i.default;var l=r(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var o=n(9196),i=r(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=s.source}h.prototype.content=e;var v=[];function y(t){var n=new Error(s.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=p,n.source=e,!s.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){g(r)}function w(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function x(){var e=m(),n=g(o);if(n){if(E(),!g(i))return y("property missing ':'");var r=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},5726:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(r,a))}},5174:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},9196:e=>{"use strict";e.exports=window.React},3967:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{if(!n){var l=1/0;for(u=0;u=i)&&Object.keys(r.O).every((e=>r.O[e](n[s])))?n.splice(s--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,o,i]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={654:0,857:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[l,a,s]=n,c=0;if(l.some((t=>0!==e[t]))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(s)var u=s(r)}for(t&&t(n);cr(100)));o=r.O(o)})(); \ No newline at end of file diff --git a/build/blocks/venue/venue.asset.php b/build/blocks/venue/venue.asset.php index 244bbcacb..d6a544f17 100644 --- a/build/blocks/venue/venue.asset.php +++ b/build/blocks/venue/venue.asset.php @@ -1 +1 @@ - array('react', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'ef8ea6d51ae6744cccb8'); + array('react', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'b38ce2f8a55d0a774e03'); diff --git a/build/blocks/venue/venue.js b/build/blocks/venue/venue.js index dfdccad71..988ee010d 100644 --- a/build/blocks/venue/venue.js +++ b/build/blocks/venue/venue.js @@ -1 +1 @@ -(()=>{var e={9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);o(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new l.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=f;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=p;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=m;var h=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function y(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function x(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var r=t?_(e.children):[],o=new h(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(v(e)){r=t?_(e.children):[];var l=new p(r);r.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){r=t?_(e.children):[];var a=new m(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function _(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=f.documentElement.querySelector(t);return n&&(n.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var p,m="object"==typeof document&&document.createElement("template");m&&m.content&&(p=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),f=d&&d[1]?d[1].toLowerCase():"";switch(f){case n:var m=c(e);return l.test(e)||null===(t=null==(y=m.querySelector(r))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=m.querySelector(o))?void 0:y.parentNode)||void 0===u||u.removeChild(y),m.querySelectorAll(n);case r:case o:var h=s(e).querySelectorAll(f);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return p?p(e):(y=s(e,o).querySelector(o)).childNodes;var y}}},4152:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var r=n(7915),o=n(885);function i(e){for(var t={},n=0,r=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5726),o=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return r.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var f=u.toLowerCase(),p=s(f);if(p){var m=(0,r.getPropertyInfo)(p);switch(i.includes(p)&&l.includes(t)&&!c&&(p=s("default"+f)),n[p]=d,m&&m.type){case r.BOOLEAN:n[p]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(9196),i=r(n(484)),l=n(4606),a={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var r=[],o="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,f=u.createElement,p=u.isValidElement,m=t.length,h=0;h1&&(v=d(v,{key:v.key||h})),r.push(c(v,y,h));continue}}if("text"!==y.type){var g=y,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}m>1&&(b.key=h),r.push(c(f(y.name,b,w),y,h))}else{var x=!y.data.trim().length;if(x&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if((null==n?void 0:n.trim)&&x)continue;r.push(c(y.data,y,h))}}return 1===r.length?r[0]:r}},3426:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var o=r(n(4152));t.htmlToDOM=o.default;var i=r(n(484));t.attributesToProps=i.default;var l=r(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var o=n(9196),i=r(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,f=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function m(){var e={line:d,column:f};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:f},this.source=s.source}h.prototype.content=e;var y=[];function v(t){var n=new Error(s.source+":"+d+":"+f+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=f,n.source=e,!s.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){g(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return f+=2,p(r),e=e.slice(n),f+=2,t({type:"comment",comment:r})}}function E(){var e=m(),n=g(o);if(n){if(x(),!g(i))return v("property missing ':'");var r=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},5726:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(r,a))}},5174:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},9196:e=>{"use strict";e.exports=window.React},3967:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(9196);const t=window.wp.domReady;var r=n.n(t);const o=window.wp.element,i=t=>{const{location:n,zoom:r,type:o,className:i}=t;let{height:l}=t;l||(l=300);const a={border:0,height:l,width:"100%"};if(!n)return(0,e.createElement)(e.Fragment,null);const s="https://maps.google.com/maps?"+new URLSearchParams({q:n,z:r||10,t:o||"m",output:"embed"}).toString();return(0,e.createElement)("iframe",{src:s,style:a,className:i,title:n})},l=Math.min,a=Math.max,s=Math.round,c=Math.floor,u=e=>({x:e,y:e}),d={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function p(e,t,n){return a(e,l(t,n))}function m(e,t){return"function"==typeof e?e(t):e}function h(e){return e.split("-")[0]}function y(e){return e.split("-")[1]}function v(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}function b(e){return["top","bottom"].includes(h(e))?"y":"x"}function w(e){return v(b(e))}function x(e){return e.replace(/start|end/g,(e=>f[e]))}function E(e){return e.replace(/left|right|bottom|top/g,(e=>d[e]))}function _(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function S(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function T(e,t,n){let{reference:r,floating:o}=e;const i=b(t),l=w(t),a=g(l),s=h(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(y(t)){case"start":p[l]-=f*(n&&c?-1:1);break;case"end":p[l]+=f*(n&&c?-1:1)}return p}async function k(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=m(t,e),h=_(p),y=a[f?"floating"===d?"reference":"floating":d],v=S(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(y)))||n?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{...l.floating,x:r,y:o}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=S(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:s}):g);return{top:(v.top-x.top+h.top)/w.y,bottom:(x.bottom-v.bottom+h.bottom)/w.y,left:(v.left-x.left+h.left)/w.x,right:(x.right-v.right+h.right)/w.x}}const A=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,..._}=m(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const S=h(o),T=h(a)===a,A=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=f||(T||!b?[E(a)]:function(e){const t=E(e);return[x(e),t,x(t)]}(a));f||"none"===v||O.push(...function(e,t,n,r){const o=y(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(h(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(x)))),i}(a,b,v,A));const C=[a,...O],R=await k(t,_),N=[];let L=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&N.push(R[S]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=y(e),o=w(e),i=g(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=E(l)),[l,E(l)]}(o,l,A);N.push(R[e[0]],R[e[1]])}if(L=[...L,{placement:o,overflows:N}],!N.every((e=>e<=0))){var P,I;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=C[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(I=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(p){case"bestFit":{var D;const e=null==(D=L.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},O=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=h(n),a=y(n),s="y"===b(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=m(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},C=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=m(e,t),c={x:n,y:r},u=await k(t,s),d=b(h(o)),f=v(d);let y=c[f],g=c[d];if(i){const e="y"===f?"bottom":"right";y=p(y+u["y"===f?"top":"left"],y,y-u[e])}if(l){const e="y"===d?"bottom":"right";g=p(g+u["y"===d?"top":"left"],g,g-u[e])}const w=a.fn({...t,[f]:y,[d]:g});return{...w,data:{x:w.x-n,y:w.y-r}}}}};function R(e){return P(e)?(e.nodeName||"").toLowerCase():"#document"}function N(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function L(e){var t;return null==(t=(P(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function P(e){return e instanceof Node||e instanceof N(e).Node}function I(e){return e instanceof Element||e instanceof N(e).Element}function D(e){return e instanceof HTMLElement||e instanceof N(e).HTMLElement}function M(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof N(e).ShadowRoot)}function j(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function F(e){return["table","td","th"].includes(R(e))}function H(e){const t=z(),n=V(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function z(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function B(e){return["html","body","#document"].includes(R(e))}function V(e){return N(e).getComputedStyle(e)}function W(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function q(e){if("html"===R(e))return e;const t=e.assignedSlot||e.parentNode||M(e)&&e.host||L(e);return M(t)?t.host:t}function $(e){const t=q(e);return B(t)?e.ownerDocument?e.ownerDocument.body:e.body:D(t)&&j(t)?t:$(t)}function U(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=$(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=N(o);return i?t.concat(l,l.visualViewport||[],j(o)?o:[],l.frameElement&&n?U(l.frameElement):[]):t.concat(o,U(o,[],n))}function X(e){const t=V(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=D(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=s(n)!==i||s(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function G(e){return I(e)?e:e.contextElement}function K(e){const t=G(e);if(!D(t))return u(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=X(t);let l=(i?s(n.width):n.width)/r,a=(i?s(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Y=u(0);function Z(e){const t=N(e);return z()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Y}function J(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=G(e);let l=u(1);t&&(r?I(r)&&(l=K(r)):l=K(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==N(e))&&t}(i,n,r)?Z(i):u(0);let s=(o.left+a.x)/l.x,c=(o.top+a.y)/l.y,d=o.width/l.x,f=o.height/l.y;if(i){const e=N(i),t=r&&I(r)?N(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=K(n),t=n.getBoundingClientRect(),r=V(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,f*=e.y,s+=o,c+=i,n=N(n).frameElement}}return S({width:d,height:f,x:s,y:c})}function Q(e){return J(L(e)).left+W(e).scrollLeft}function ee(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=N(e),r=L(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=z();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){const t=L(e),n=W(e),r=e.ownerDocument.body,o=a(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=a(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Q(e);const s=-n.scrollTop;return"rtl"===V(r).direction&&(l+=a(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}(L(e));else if(I(t))r=function(e,t){const n=J(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=D(e)?K(e):u(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Z(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return S(r)}function te(e,t){const n=q(e);return!(n===t||!I(n)||B(n))&&("fixed"===V(n).position||te(n,t))}function ne(e,t,n){const r=D(t),o=L(t),i="fixed"===n,l=J(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=u(0);if(r||!r&&!i)if(("body"!==R(t)||j(o))&&(a=W(t)),r){const e=J(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=Q(o));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function re(e,t){return D(e)&&"fixed"!==V(e).position?t?t(e):e.offsetParent:null}function oe(e,t){const n=N(e);if(!D(e))return n;let r=re(e,t);for(;r&&F(r)&&"static"===V(r).position;)r=re(r,t);return r&&("html"===R(r)||"body"===R(r)&&"static"===V(r).position&&!H(r))?n:r||function(e){let t=q(e);for(;D(t)&&!B(t);){if(H(t))return t;t=q(t)}return null}(e)||n}const ie={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=D(n),i=L(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=u(1);const s=u(0);if((o||!o&&"fixed"!==r)&&(("body"!==R(n)||j(i))&&(l=W(n)),D(n))){const e=J(n);a=K(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:L,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=U(e,[],!1).filter((e=>I(e)&&"body"!==R(e))),o=null;const i="fixed"===V(e).position;let l=i?q(e):e;for(;I(l)&&!B(l);){const t=V(l),n=H(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||j(l)&&!n&&te(e,l))?r=r.filter((e=>e!==l)):o=t,l=q(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],c=i.reduce(((e,n)=>{const r=ee(t,n,o);return e.top=a(r.top,e.top),e.right=l(r.right,e.right),e.bottom=l(r.bottom,e.bottom),e.left=a(r.left,e.left),e}),ee(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:oe,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||oe,i=this.getDimensions;return{reference:ne(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return X(e)},getScale:K,isElement:I,isRTL:function(e){return"rtl"===V(e).direction}};const le=(e,t,n)=>{const r=new Map,o={platform:ie,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=T(c,r,s),f=r,p={},m=0;for(let n=0;n{let r=null;return function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))}},de={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},fe=(0,e.createContext)({getTooltipData:()=>de});function pe(t="DEFAULT_TOOLTIP_ID"){return(0,e.useContext)(fe).getTooltipData(t)}const me="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,he=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ye=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(he(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},ve=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:a=[O(Number(o)),A({fallbackAxisSideDirection:"start"}),C({padding:5})],border:s})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const c=a;return n?(c.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:r,rects:o,platform:i,elements:a,middlewareData:s}=e,{element:c,padding:d=0}=m(u,e)||{};if(null==c)return{};const f=_(d),h={x:t,y:n},v=w(r),b=g(v),x=await i.getDimensions(c),E="y"===v,S=E?"top":"left",T=E?"bottom":"right",k=E?"clientHeight":"clientWidth",A=o.reference[b]+o.reference[v]-h[v]-o.floating[b],O=h[v]-o.reference[v],C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let R=C?C[k]:0;R&&await(null==i.isElement?void 0:i.isElement(C))||(R=a.floating[k]||o.floating[b]);const N=A/2-O/2,L=R/2-x[b]/2-1,P=l(f[S],L),I=l(f[T],L),D=P,M=R-x[b]-I,j=R/2-x[b]/2+N,F=p(D,j,M),H=!s.arrow&&null!=y(r)&&j!=F&&o.reference[b]/2-(j{var o,i;const l={left:`${e}px`,top:`${t}px`,border:s},{x:a,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=s&&{borderBottom:s,borderRight:s};let f=0;if(s){const e=`${s}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):le(e,t,{placement:"bottom",strategy:i,middleware:c}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u};var ge={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},be={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const we=({forwardRef:t,id:n,className:r,classNameArrow:o,variant:i="dark",anchorId:s,anchorSelect:u,place:d="top",offset:f=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:h="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:R,style:N,position:P,afterShow:I,afterHide:D,content:M,contentWrapperRef:j,isOpen:F,setIsOpen:H,activeAnchor:z,setActiveAnchor:B,border:V,opacity:W,arrowColor:q,role:$="tooltip"})=>{var X;const K=(0,e.useRef)(null),Y=(0,e.useRef)(null),Z=(0,e.useRef)(null),Q=(0,e.useRef)(null),ee=(0,e.useRef)(null),[te,ne]=(0,e.useState)(d),[re,oe]=(0,e.useState)({}),[ie,le]=(0,e.useState)({}),[se,ce]=(0,e.useState)(!1),[de,fe]=(0,e.useState)(!1),[he,we]=(0,e.useState)(null),xe=(0,e.useRef)(!1),Ee=(0,e.useRef)(null),{anchorRefs:_e,setActiveAnchor:Se}=pe(n),Te=(0,e.useRef)(!1),[ke,Ae]=(0,e.useState)([]),Oe=(0,e.useRef)(!1),Ce=m||p.includes("click"),Re=Ce||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),Ne=A?{...A}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!A&&Ce&&Object.assign(Ne,{mouseenter:!1,focus:!1,click:!0});const Le=O?{...O}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!O&&Ce&&Object.assign(Le,{mouseleave:!1,blur:!1});const Pe=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:Re||!1};R&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Le,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Pe,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),me((()=>(Oe.current=!0,()=>{Oe.current=!1})),[]);const Ie=e=>{Oe.current&&(e&&fe(!0),setTimeout((()=>{Oe.current&&(null==H||H(e),void 0===F&&ce(e))}),10))};(0,e.useEffect)((()=>{if(void 0===F)return()=>null;F&&fe(!0);const e=setTimeout((()=>{ce(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,e.useEffect)((()=>{if(se!==xe.current)if(ee.current&&clearTimeout(ee.current),xe.current=se,se)null==I||I();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,r]=t;return"s"!==r&&"ms"!==r?0:Number(n)*("ms"===r?1:1e3)})();ee.current=setTimeout((()=>{fe(!1),we(null),null==D||D()}),e+25)}}),[se]);const De=(e=g)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{Ie(!0)}),e)},Me=(e=b)=>{Q.current&&clearTimeout(Q.current),Q.current=setTimeout((()=>{Te.current||Ie(!1)}),e)},je=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return B(null),void Se({current:null});g?De():Ie(!0),B(n),Se({current:n}),Q.current&&clearTimeout(Q.current)},Fe=()=>{_?Me(b||100):b?Me():Ie(!1),Z.current&&clearTimeout(Z.current)},He=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};ve({place:null!==(n=null==he?void 0:he.place)&&void 0!==n?n:d,offset:f,elementReference:r,tooltipReference:K.current,tooltipArrowReference:Y.current,strategy:h,middlewares:y,border:V}).then((e=>{Object.keys(e.tooltipStyles).length&&oe(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),ne(e.place)}))},ze=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),Ee.current=n},Be=e=>{var t;if(!se)return;const n=e.target;(null===(t=K.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${s}']`),...ke].some((e=>null==e?void 0:e.contains(n)))||(Ie(!1),Z.current&&clearTimeout(Z.current))},Ve=ue(je,50,!0),We=ue(Fe,50,!0),qe=(0,e.useCallback)((()=>{var e,t;const n=null!==(e=null==he?void 0:he.position)&&void 0!==e?e:P;n?He(n):w?Ee.current&&He(Ee.current):(null==z?void 0:z.isConnected)&&ve({place:null!==(t=null==he?void 0:he.place)&&void 0!==t?t:d,offset:f,elementReference:z,tooltipReference:K.current,tooltipArrowReference:Y.current,strategy:h,middlewares:y,border:V}).then((e=>{Oe.current&&(Object.keys(e.tooltipStyles).length&&oe(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),ne(e.place))}))}),[se,z,M,N,d,null==he?void 0:he.place,f,h,P,null==he?void 0:he.position,w]);(0,e.useEffect)((()=>{var e,t;const n=new Set(_e);ke.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${s}']`);r&&n.add({current:r});const o=()=>{Ie(!1)},i=ye(z),u=ye(K.current);Pe.scroll&&(window.addEventListener("scroll",o),null==i||i.addEventListener("scroll",o),null==u||u.addEventListener("scroll",o));let d=null;Pe.resize?window.addEventListener("resize",o):z&&K.current&&(d=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,f=G(e),p=o||i?[...f?U(f):[],...U(t)]:[];p.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const m=f&&u?function(e,t){let n,r=null;const o=L(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function s(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),i();const{left:f,top:p,width:m,height:h}=e.getBoundingClientRect();if(u||t(),!m||!h)return;const y={rootMargin:-c(p)+"px "+-c(o.clientWidth-(f+m))+"px "+-c(o.clientHeight-(p+h))+"px "+-c(f)+"px",threshold:a(0,l(1,d))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==d){if(!v)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),100)}v=!1}try{r=new IntersectionObserver(g,{...y,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,y)}r.observe(e)}(!0),i}(f,n):null;let h,y=-1,v=null;s&&(v=new ResizeObserver((e=>{let[r]=e;r&&r.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),f&&!d&&v.observe(f),v.observe(t));let g=d?J(e):null;return d&&function t(){const r=J(e);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n(),g=r,h=requestAnimationFrame(t)}(),n(),()=>{p.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),m&&m(),v&&v.disconnect(),v=null,d&&cancelAnimationFrame(h)}}(z,K.current,qe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&Ie(!1)};Pe.escape&&window.addEventListener("keydown",f),Pe.clickOutsideAnchor&&window.addEventListener("click",Be);const p=[],m=e=>{se&&(null==e?void 0:e.target)===z||je(e)},h=e=>{se&&(null==e?void 0:e.target)===z&&Fe()},y=["mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:Ve}):v.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(Le).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:We}):v.includes(e)&&p.push({event:e,listener:h}))})),w&&p.push({event:"mousemove",listener:ze});const g=()=>{Te.current=!0},b=()=>{Te.current=!1,Fe()};return _&&!Re&&(null===(e=K.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=K.current)||void 0===t||t.addEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Pe.scroll&&(window.removeEventListener("scroll",o),null==i||i.removeEventListener("scroll",o),null==u||u.removeEventListener("scroll",o)),Pe.resize?window.removeEventListener("resize",o):null==d||d(),Pe.clickOutsideAnchor&&window.removeEventListener("click",Be),Pe.escape&&window.removeEventListener("keydown",f),_&&!Re&&(null===(e=K.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=K.current)||void 0===t||t.removeEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[z,qe,de,_e,ke,A,O,C,Ce]),(0,e.useEffect)((()=>{var e,t;let r=null!==(t=null!==(e=null==he?void 0:he.anchorSelect)&&void 0!==e?e:u)&&void 0!==t?t:"";!r&&n&&(r=`[data-tooltip-id='${n}']`);const o=new MutationObserver((e=>{const t=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===n&&t.push(e.target),"childList"===e.type){if(z){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,z))&&(fe(!1),Ie(!1),B(null),Z.current&&clearTimeout(Z.current),Q.current&&clearTimeout(Q.current),!0)}))}if(r)try{const n=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...n.filter((e=>e.matches(r)))),t.push(...n.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(t.length||o.length)&&Ae((e=>[...e.filter((e=>!o.includes(e))),...t]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{o.disconnect()}}),[n,u,null==he?void 0:he.anchorSelect,z]),(0,e.useEffect)((()=>{qe()}),[qe]),(0,e.useEffect)((()=>{if(!(null==j?void 0:j.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>qe()))}));return e.observe(j.current),()=>{e.disconnect()}}),[M,null==j?void 0:j.current]),(0,e.useEffect)((()=>{var e;const t=document.querySelector(`[id='${s}']`),n=[...ke,t];z&&n.includes(z)||B(null!==(e=ke[0])&&void 0!==e?e:t)}),[s,ke,z]),(0,e.useEffect)((()=>()=>{Z.current&&clearTimeout(Z.current),Q.current&&clearTimeout(Q.current)}),[]),(0,e.useEffect)((()=>{var e;let t=null!==(e=null==he?void 0:he.anchorSelect)&&void 0!==e?e:u;if(!t&&n&&(t=`[data-tooltip-id='${n}']`),t)try{const e=Array.from(document.querySelectorAll(t));Ae(e)}catch(e){Ae([])}}),[n,u,null==he?void 0:he.anchorSelect]);const $e=null!==(X=null==he?void 0:he.content)&&void 0!==X?X:M,Ue=se&&Object.keys(re).length>0;return(0,e.useImperativeHandle)(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}we(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Ie(!0)},close:e=>{(null==e?void 0:e.delay)?Me(e.delay):Ie(!1)},activeAnchor:z,place:te,isOpen:Boolean(de&&!x&&$e&&Ue)}))),de&&!x&&$e?e.createElement(v,{id:n,role:$,className:ae("react-tooltip",ge.tooltip,be.tooltip,be[i],r,`react-tooltip__place-${te}`,ge[Ue?"show":"closing"],Ue?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&ge.fixed,_&&ge.clickable),onTransitionEnd:e=>{ee.current&&clearTimeout(ee.current),se||"opacity"!==e.propertyName||(fe(!1),we(null),null==D||D())},style:{...N,...re,opacity:void 0!==W&&Ue?W:void 0},ref:K},$e,e.createElement(v,{className:ae("react-tooltip-arrow",ge.arrow,be.arrow,o,E&&ge.noArrow),style:{...ie,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Y})):null},xe=({content:t})=>e.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),Ee=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),_e=e.forwardRef((({id:t,anchorId:n,anchorSelect:r,content:o,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:R=!1,style:N,position:L,isOpen:P,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:j,setIsOpen:F,afterShow:H,afterHide:z,role:B="tooltip"},V)=>{const[W,q]=(0,e.useState)(o),[$,U]=(0,e.useState)(i),[X,G]=(0,e.useState)(u),[K,Y]=(0,e.useState)(c),[Z,J]=(0,e.useState)(d),[Q,ee]=(0,e.useState)(g),[te,ne]=(0,e.useState)(b),[re,oe]=(0,e.useState)(w),[ie,le]=(0,e.useState)(x),[se,ce]=(0,e.useState)(f),[ue,de]=(0,e.useState)(m),[fe,me]=(0,e.useState)(y),[he,ye]=(0,e.useState)(null),[ve,ge]=(0,e.useState)(null),be=(0,e.useRef)(I),{anchorRefs:_e,activeAnchor:Se}=pe(t),Te=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),ke=e=>{const t={place:e=>{var t;G(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:o)},html:e=>{U(null!=e?e:i)},variant:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:m)},"position-strategy":e=>{var t;me(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{oe(null===e?w:"true"===e)},hidden:e=>{le(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,e.useEffect)((()=>{q(o)}),[o]),(0,e.useEffect)((()=>{U(i)}),[i]),(0,e.useEffect)((()=>{G(u)}),[u]),(0,e.useEffect)((()=>{Y(c)}),[c]),(0,e.useEffect)((()=>{J(d)}),[d]),(0,e.useEffect)((()=>{ee(g)}),[g]),(0,e.useEffect)((()=>{ne(b)}),[b]),(0,e.useEffect)((()=>{oe(w)}),[w]),(0,e.useEffect)((()=>{le(x)}),[x]),(0,e.useEffect)((()=>{me(y)}),[y]),(0,e.useEffect)((()=>{be.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,e.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,e.useEffect)((()=>{var e;const o=new Set(_e);let i=r;if(!i&&t&&(i=`[data-tooltip-id='${t}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${n}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const a=null!==(e=null!=ve?ve:l)&&void 0!==e?e:Se.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Te(a);ke(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Te(a);ke(e),s.observe(a,c)}return()=>{s.disconnect()}}),[_e,Se,ve,n,r]),(0,e.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Ee("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),M&&!Ee("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let Ae=p;const Oe=(0,e.useRef)(null);if(l){const t=l({content:null!=W?W:null,activeAnchor:ve});Ae=t?e.createElement("div",{ref:Oe,className:"react-tooltip-content-wrapper"},t):null}else W&&(Ae=W);$&&(Ae=e.createElement(xe,{content:$}));const Ce={forwardRef:V,id:t,anchorId:n,anchorSelect:r,className:ae(a,he),classNameArrow:s,content:Ae,contentWrapperRef:Oe,place:X,variant:K,offset:Z,wrapper:se,events:ue,openOnClick:h,positionStrategy:fe,middlewares:v,delayShow:Q,delayHide:te,float:re,hidden:ie,noArrow:E,clickable:_,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:R,style:N,position:L,isOpen:P,border:D,opacity:M,arrowColor:j,setIsOpen:F,afterShow:H,afterHide:z,activeAnchor:ve,setActiveAnchor:e=>ge(e),role:B};return e.createElement(we,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ce({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||ce({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Se=window.wp.i18n,Te=window.wp.components;window.wp.data;const ke=({onlineEventLinkDefault:t=""})=>{const n=(0,Se.__)("Online event","gatherpress"),[r,i]=(0,o.useState)(t);return((e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}})({setOnlineEventLink:i},function(e){if("object"==typeof GatherPress)return"post_id".split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}()),(0,e.createElement)(Te.Flex,{justify:"normal",gap:"3"},(0,e.createElement)(Te.FlexItem,{display:"flex"},(0,e.createElement)(Te.Icon,{icon:"video-alt2"})),(0,e.createElement)(Te.FlexItem,null,!r&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-online-event-tooltip","data-tooltip-content":(0,Se.__)("Link active for attendees during event.","gatherpress")},n),(0,e.createElement)(_e,{id:"gp-online-event-tooltip"})),r&&(0,e.createElement)("a",{href:r,rel:"noreferrer",target:"_blank"},n)))};var Ae=n(3426);const Oe=Ae.default||Ae,Ce=({name:t,fullAddress:n,phoneNumber:r,website:o})=>(0,e.createElement)(e.Fragment,null,(t||n)&&(0,e.createElement)(Te.Flex,{justify:"normal",align:"flex-start",gap:"4"},(0,e.createElement)(Te.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,e.createElement)(Te.Icon,{icon:"location"})),(0,e.createElement)(Te.FlexItem,null,t&&(0,e.createElement)("div",{className:"gp-venue__name"},(0,e.createElement)("strong",null,Oe(t))),n&&(0,e.createElement)("div",{className:"gp-venue__full-address"},Oe(n)))),(r||o)&&(0,e.createElement)(Te.Flex,{justify:"normal",gap:"8"},r&&(0,e.createElement)(Te.FlexItem,null,(0,e.createElement)(Te.Flex,{justify:"normal",gap:"4"},(0,e.createElement)(Te.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,e.createElement)(Te.Icon,{icon:"phone"})),(0,e.createElement)(Te.FlexItem,null,(0,e.createElement)("div",{className:"gp-venue__phone-number"},r)))),o&&(0,e.createElement)(Te.FlexItem,null,(0,e.createElement)(Te.Flex,{justify:"normal",gap:"4"},(0,e.createElement)(Te.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,e.createElement)(Te.Icon,{icon:"admin-site-alt3"})),(0,e.createElement)(Te.FlexItem,null,(0,e.createElement)("div",{className:"gp-venue__website"},(0,e.createElement)("a",{href:o,target:"_blank",rel:"noreferrer noopener"},o))))))),Re=({name:t="",fullAddress:n,phoneNumber:r,website:o,isOnlineEventTerm:i=!1,onlineEventLink:l=""})=>(0,e.createElement)(e.Fragment,null,!i&&(0,e.createElement)(Ce,{name:t,fullAddress:n,phoneNumber:r,website:o}),i&&(0,e.createElement)(ke,{onlineEventLinkDefault:l}));r()((()=>{let t=document.querySelectorAll('[data-gp_block_name="venue"]');for(let i=0;i{var e={9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);o(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new l.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=f;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=p;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=m;var h=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function y(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function x(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var r=t?_(e.children):[],o=new h(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(v(e)){r=t?_(e.children):[];var l=new p(r);r.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){r=t?_(e.children):[];var a=new m(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function _(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=f.documentElement.querySelector(t);return n&&(n.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var p,m="object"==typeof document&&document.createElement("template");m&&m.content&&(p=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),f=d&&d[1]?d[1].toLowerCase():"";switch(f){case n:var m=c(e);return l.test(e)||null===(t=null==(y=m.querySelector(r))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=m.querySelector(o))?void 0:y.parentNode)||void 0===u||u.removeChild(y),m.querySelectorAll(n);case r:case o:var h=s(e).querySelectorAll(f);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return p?p(e):(y=s(e,o).querySelector(o)).childNodes;var y}}},4152:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var r=n(7915),o=n(885);function i(e){for(var t={},n=0,r=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5726),o=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return r.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var f=u.toLowerCase(),p=s(f);if(p){var m=(0,r.getPropertyInfo)(p);switch(i.includes(p)&&l.includes(t)&&!c&&(p=s("default"+f)),n[p]=d,m&&m.type){case r.BOOLEAN:n[p]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(9196),i=r(n(484)),l=n(4606),a={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var r=[],o="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,f=u.createElement,p=u.isValidElement,m=t.length,h=0;h1&&(v=d(v,{key:v.key||h})),r.push(c(v,y,h));continue}}if("text"!==y.type){var g=y,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}m>1&&(b.key=h),r.push(c(f(y.name,b,w),y,h))}else{var x=!y.data.trim().length;if(x&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if((null==n?void 0:n.trim)&&x)continue;r.push(c(y.data,y,h))}}return 1===r.length?r[0]:r}},3426:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var o=r(n(4152));t.htmlToDOM=o.default;var i=r(n(484));t.attributesToProps=i.default;var l=r(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var o=n(9196),i=r(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,f=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function m(){var e={line:d,column:f};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:f},this.source=s.source}h.prototype.content=e;var y=[];function v(t){var n=new Error(s.source+":"+d+":"+f+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=f,n.source=e,!s.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){g(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return f+=2,p(r),e=e.slice(n),f+=2,t({type:"comment",comment:r})}}function E(){var e=m(),n=g(o);if(n){if(x(),!g(i))return v("property missing ':'");var r=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},5726:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(r,a))}},5174:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},9196:e=>{"use strict";e.exports=window.React},3967:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(9196);const t=window.wp.domReady;var r=n.n(t);const o=window.wp.element,i=t=>{const{location:n,zoom:r,type:o,className:i}=t;let{height:l}=t;l||(l=300);const a={border:0,height:l,width:"100%"};if(!n)return(0,e.createElement)(e.Fragment,null);const s="https://maps.google.com/maps?"+new URLSearchParams({q:n,z:r||10,t:o||"m",output:"embed"}).toString();return(0,e.createElement)("iframe",{src:s,style:a,className:i,title:n})},l=Math.min,a=Math.max,s=Math.round,c=Math.floor,u=e=>({x:e,y:e}),d={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function p(e,t,n){return a(e,l(t,n))}function m(e,t){return"function"==typeof e?e(t):e}function h(e){return e.split("-")[0]}function y(e){return e.split("-")[1]}function v(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}function b(e){return["top","bottom"].includes(h(e))?"y":"x"}function w(e){return v(b(e))}function x(e){return e.replace(/start|end/g,(e=>f[e]))}function E(e){return e.replace(/left|right|bottom|top/g,(e=>d[e]))}function _(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function S(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function T(e,t,n){let{reference:r,floating:o}=e;const i=b(t),l=w(t),a=g(l),s=h(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(y(t)){case"start":p[l]-=f*(n&&c?-1:1);break;case"end":p[l]+=f*(n&&c?-1:1)}return p}async function k(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=m(t,e),h=_(p),y=a[f?"floating"===d?"reference":"floating":d],v=S(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(y)))||n?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{...l.floating,x:r,y:o}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=S(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:s}):g);return{top:(v.top-x.top+h.top)/w.y,bottom:(x.bottom-v.bottom+h.bottom)/w.y,left:(v.left-x.left+h.left)/w.x,right:(x.right-v.right+h.right)/w.x}}const A=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,..._}=m(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const S=h(o),T=h(a)===a,A=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=f||(T||!b?[E(a)]:function(e){const t=E(e);return[x(e),t,x(t)]}(a));f||"none"===v||O.push(...function(e,t,n,r){const o=y(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(h(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(x)))),i}(a,b,v,A));const C=[a,...O],R=await k(t,_),N=[];let L=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&N.push(R[S]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=y(e),o=w(e),i=g(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=E(l)),[l,E(l)]}(o,l,A);N.push(R[e[0]],R[e[1]])}if(L=[...L,{placement:o,overflows:N}],!N.every((e=>e<=0))){var P,I;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=C[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(I=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(p){case"bestFit":{var D;const e=null==(D=L.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},O=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=h(n),a=y(n),s="y"===b(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=m(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},C=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=m(e,t),c={x:n,y:r},u=await k(t,s),d=b(h(o)),f=v(d);let y=c[f],g=c[d];if(i){const e="y"===f?"bottom":"right";y=p(y+u["y"===f?"top":"left"],y,y-u[e])}if(l){const e="y"===d?"bottom":"right";g=p(g+u["y"===d?"top":"left"],g,g-u[e])}const w=a.fn({...t,[f]:y,[d]:g});return{...w,data:{x:w.x-n,y:w.y-r}}}}};function R(e){return P(e)?(e.nodeName||"").toLowerCase():"#document"}function N(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function L(e){var t;return null==(t=(P(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function P(e){return e instanceof Node||e instanceof N(e).Node}function I(e){return e instanceof Element||e instanceof N(e).Element}function D(e){return e instanceof HTMLElement||e instanceof N(e).HTMLElement}function M(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof N(e).ShadowRoot)}function j(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function F(e){return["table","td","th"].includes(R(e))}function H(e){const t=z(),n=V(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function z(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function B(e){return["html","body","#document"].includes(R(e))}function V(e){return N(e).getComputedStyle(e)}function W(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function q(e){if("html"===R(e))return e;const t=e.assignedSlot||e.parentNode||M(e)&&e.host||L(e);return M(t)?t.host:t}function $(e){const t=q(e);return B(t)?e.ownerDocument?e.ownerDocument.body:e.body:D(t)&&j(t)?t:$(t)}function U(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=$(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=N(o);return i?t.concat(l,l.visualViewport||[],j(o)?o:[],l.frameElement&&n?U(l.frameElement):[]):t.concat(o,U(o,[],n))}function X(e){const t=V(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=D(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=s(n)!==i||s(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function G(e){return I(e)?e:e.contextElement}function K(e){const t=G(e);if(!D(t))return u(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=X(t);let l=(i?s(n.width):n.width)/r,a=(i?s(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Y=u(0);function Z(e){const t=N(e);return z()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Y}function J(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=G(e);let l=u(1);t&&(r?I(r)&&(l=K(r)):l=K(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==N(e))&&t}(i,n,r)?Z(i):u(0);let s=(o.left+a.x)/l.x,c=(o.top+a.y)/l.y,d=o.width/l.x,f=o.height/l.y;if(i){const e=N(i),t=r&&I(r)?N(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=K(n),t=n.getBoundingClientRect(),r=V(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,f*=e.y,s+=o,c+=i,n=N(n).frameElement}}return S({width:d,height:f,x:s,y:c})}function Q(e){return J(L(e)).left+W(e).scrollLeft}function ee(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=N(e),r=L(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=z();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){const t=L(e),n=W(e),r=e.ownerDocument.body,o=a(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=a(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Q(e);const s=-n.scrollTop;return"rtl"===V(r).direction&&(l+=a(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}(L(e));else if(I(t))r=function(e,t){const n=J(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=D(e)?K(e):u(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Z(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return S(r)}function te(e,t){const n=q(e);return!(n===t||!I(n)||B(n))&&("fixed"===V(n).position||te(n,t))}function ne(e,t,n){const r=D(t),o=L(t),i="fixed"===n,l=J(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=u(0);if(r||!r&&!i)if(("body"!==R(t)||j(o))&&(a=W(t)),r){const e=J(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=Q(o));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function re(e,t){return D(e)&&"fixed"!==V(e).position?t?t(e):e.offsetParent:null}function oe(e,t){const n=N(e);if(!D(e))return n;let r=re(e,t);for(;r&&F(r)&&"static"===V(r).position;)r=re(r,t);return r&&("html"===R(r)||"body"===R(r)&&"static"===V(r).position&&!H(r))?n:r||function(e){let t=q(e);for(;D(t)&&!B(t);){if(H(t))return t;t=q(t)}return null}(e)||n}const ie={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=D(n),i=L(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=u(1);const s=u(0);if((o||!o&&"fixed"!==r)&&(("body"!==R(n)||j(i))&&(l=W(n)),D(n))){const e=J(n);a=K(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:L,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=U(e,[],!1).filter((e=>I(e)&&"body"!==R(e))),o=null;const i="fixed"===V(e).position;let l=i?q(e):e;for(;I(l)&&!B(l);){const t=V(l),n=H(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||j(l)&&!n&&te(e,l))?r=r.filter((e=>e!==l)):o=t,l=q(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],c=i.reduce(((e,n)=>{const r=ee(t,n,o);return e.top=a(r.top,e.top),e.right=l(r.right,e.right),e.bottom=l(r.bottom,e.bottom),e.left=a(r.left,e.left),e}),ee(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:oe,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||oe,i=this.getDimensions;return{reference:ne(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return X(e)},getScale:K,isElement:I,isRTL:function(e){return"rtl"===V(e).direction}};const le=(e,t,n)=>{const r=new Map,o={platform:ie,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=T(c,r,s),f=r,p={},m=0;for(let n=0;n{let r=null;return function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))}},de={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},fe=(0,e.createContext)({getTooltipData:()=>de});function pe(t="DEFAULT_TOOLTIP_ID"){return(0,e.useContext)(fe).getTooltipData(t)}const me="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,he=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ye=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(he(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},ve=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:a=[O(Number(o)),A({fallbackAxisSideDirection:"start"}),C({padding:5})],border:s})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const c=a;return n?(c.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:r,rects:o,platform:i,elements:a,middlewareData:s}=e,{element:c,padding:d=0}=m(u,e)||{};if(null==c)return{};const f=_(d),h={x:t,y:n},v=w(r),b=g(v),x=await i.getDimensions(c),E="y"===v,S=E?"top":"left",T=E?"bottom":"right",k=E?"clientHeight":"clientWidth",A=o.reference[b]+o.reference[v]-h[v]-o.floating[b],O=h[v]-o.reference[v],C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let R=C?C[k]:0;R&&await(null==i.isElement?void 0:i.isElement(C))||(R=a.floating[k]||o.floating[b]);const N=A/2-O/2,L=R/2-x[b]/2-1,P=l(f[S],L),I=l(f[T],L),D=P,M=R-x[b]-I,j=R/2-x[b]/2+N,F=p(D,j,M),H=!s.arrow&&null!=y(r)&&j!=F&&o.reference[b]/2-(j{var o,i;const l={left:`${e}px`,top:`${t}px`,border:s},{x:a,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=s&&{borderBottom:s,borderRight:s};let f=0;if(s){const e=`${s}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):le(e,t,{placement:"bottom",strategy:i,middleware:c}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u};var ge={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},be={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const we=({forwardRef:t,id:n,className:r,classNameArrow:o,variant:i="dark",anchorId:s,anchorSelect:u,place:d="top",offset:f=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:h="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:R,style:N,position:P,afterShow:I,afterHide:D,content:M,contentWrapperRef:j,isOpen:F,setIsOpen:H,activeAnchor:z,setActiveAnchor:B,border:V,opacity:W,arrowColor:q,role:$="tooltip"})=>{var X;const K=(0,e.useRef)(null),Y=(0,e.useRef)(null),Z=(0,e.useRef)(null),Q=(0,e.useRef)(null),ee=(0,e.useRef)(null),[te,ne]=(0,e.useState)(d),[re,oe]=(0,e.useState)({}),[ie,le]=(0,e.useState)({}),[se,ce]=(0,e.useState)(!1),[de,fe]=(0,e.useState)(!1),[he,we]=(0,e.useState)(null),xe=(0,e.useRef)(!1),Ee=(0,e.useRef)(null),{anchorRefs:_e,setActiveAnchor:Se}=pe(n),Te=(0,e.useRef)(!1),[ke,Ae]=(0,e.useState)([]),Oe=(0,e.useRef)(!1),Ce=m||p.includes("click"),Re=Ce||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),Ne=A?{...A}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!A&&Ce&&Object.assign(Ne,{mouseenter:!1,focus:!1,click:!0});const Le=O?{...O}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!O&&Ce&&Object.assign(Le,{mouseleave:!1,blur:!1});const Pe=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:Re||!1};R&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Le,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Pe,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),me((()=>(Oe.current=!0,()=>{Oe.current=!1})),[]);const Ie=e=>{Oe.current&&(e&&fe(!0),setTimeout((()=>{Oe.current&&(null==H||H(e),void 0===F&&ce(e))}),10))};(0,e.useEffect)((()=>{if(void 0===F)return()=>null;F&&fe(!0);const e=setTimeout((()=>{ce(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,e.useEffect)((()=>{if(se!==xe.current)if(ee.current&&clearTimeout(ee.current),xe.current=se,se)null==I||I();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,r]=t;return"s"!==r&&"ms"!==r?0:Number(n)*("ms"===r?1:1e3)})();ee.current=setTimeout((()=>{fe(!1),we(null),null==D||D()}),e+25)}}),[se]);const De=(e=g)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{Ie(!0)}),e)},Me=(e=b)=>{Q.current&&clearTimeout(Q.current),Q.current=setTimeout((()=>{Te.current||Ie(!1)}),e)},je=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return B(null),void Se({current:null});g?De():Ie(!0),B(n),Se({current:n}),Q.current&&clearTimeout(Q.current)},Fe=()=>{_?Me(b||100):b?Me():Ie(!1),Z.current&&clearTimeout(Z.current)},He=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};ve({place:null!==(n=null==he?void 0:he.place)&&void 0!==n?n:d,offset:f,elementReference:r,tooltipReference:K.current,tooltipArrowReference:Y.current,strategy:h,middlewares:y,border:V}).then((e=>{Object.keys(e.tooltipStyles).length&&oe(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),ne(e.place)}))},ze=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),Ee.current=n},Be=e=>{var t;if(!se)return;const n=e.target;(null===(t=K.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${s}']`),...ke].some((e=>null==e?void 0:e.contains(n)))||(Ie(!1),Z.current&&clearTimeout(Z.current))},Ve=ue(je,50,!0),We=ue(Fe,50,!0),qe=(0,e.useCallback)((()=>{var e,t;const n=null!==(e=null==he?void 0:he.position)&&void 0!==e?e:P;n?He(n):w?Ee.current&&He(Ee.current):(null==z?void 0:z.isConnected)&&ve({place:null!==(t=null==he?void 0:he.place)&&void 0!==t?t:d,offset:f,elementReference:z,tooltipReference:K.current,tooltipArrowReference:Y.current,strategy:h,middlewares:y,border:V}).then((e=>{Oe.current&&(Object.keys(e.tooltipStyles).length&&oe(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),ne(e.place))}))}),[se,z,M,N,d,null==he?void 0:he.place,f,h,P,null==he?void 0:he.position,w]);(0,e.useEffect)((()=>{var e,t;const n=new Set(_e);ke.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${s}']`);r&&n.add({current:r});const o=()=>{Ie(!1)},i=ye(z),u=ye(K.current);Pe.scroll&&(window.addEventListener("scroll",o),null==i||i.addEventListener("scroll",o),null==u||u.addEventListener("scroll",o));let d=null;Pe.resize?window.addEventListener("resize",o):z&&K.current&&(d=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,f=G(e),p=o||i?[...f?U(f):[],...U(t)]:[];p.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const m=f&&u?function(e,t){let n,r=null;const o=L(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function s(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),i();const{left:f,top:p,width:m,height:h}=e.getBoundingClientRect();if(u||t(),!m||!h)return;const y={rootMargin:-c(p)+"px "+-c(o.clientWidth-(f+m))+"px "+-c(o.clientHeight-(p+h))+"px "+-c(f)+"px",threshold:a(0,l(1,d))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==d){if(!v)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),100)}v=!1}try{r=new IntersectionObserver(g,{...y,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,y)}r.observe(e)}(!0),i}(f,n):null;let h,y=-1,v=null;s&&(v=new ResizeObserver((e=>{let[r]=e;r&&r.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),f&&!d&&v.observe(f),v.observe(t));let g=d?J(e):null;return d&&function t(){const r=J(e);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n(),g=r,h=requestAnimationFrame(t)}(),n(),()=>{p.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),m&&m(),v&&v.disconnect(),v=null,d&&cancelAnimationFrame(h)}}(z,K.current,qe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&Ie(!1)};Pe.escape&&window.addEventListener("keydown",f),Pe.clickOutsideAnchor&&window.addEventListener("click",Be);const p=[],m=e=>{se&&(null==e?void 0:e.target)===z||je(e)},h=e=>{se&&(null==e?void 0:e.target)===z&&Fe()},y=["mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:Ve}):v.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(Le).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:We}):v.includes(e)&&p.push({event:e,listener:h}))})),w&&p.push({event:"mousemove",listener:ze});const g=()=>{Te.current=!0},b=()=>{Te.current=!1,Fe()};return _&&!Re&&(null===(e=K.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=K.current)||void 0===t||t.addEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Pe.scroll&&(window.removeEventListener("scroll",o),null==i||i.removeEventListener("scroll",o),null==u||u.removeEventListener("scroll",o)),Pe.resize?window.removeEventListener("resize",o):null==d||d(),Pe.clickOutsideAnchor&&window.removeEventListener("click",Be),Pe.escape&&window.removeEventListener("keydown",f),_&&!Re&&(null===(e=K.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=K.current)||void 0===t||t.removeEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[z,qe,de,_e,ke,A,O,C,Ce]),(0,e.useEffect)((()=>{var e,t;let r=null!==(t=null!==(e=null==he?void 0:he.anchorSelect)&&void 0!==e?e:u)&&void 0!==t?t:"";!r&&n&&(r=`[data-tooltip-id='${n}']`);const o=new MutationObserver((e=>{const t=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===n&&t.push(e.target),"childList"===e.type){if(z){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,z))&&(fe(!1),Ie(!1),B(null),Z.current&&clearTimeout(Z.current),Q.current&&clearTimeout(Q.current),!0)}))}if(r)try{const n=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...n.filter((e=>e.matches(r)))),t.push(...n.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(t.length||o.length)&&Ae((e=>[...e.filter((e=>!o.includes(e))),...t]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{o.disconnect()}}),[n,u,null==he?void 0:he.anchorSelect,z]),(0,e.useEffect)((()=>{qe()}),[qe]),(0,e.useEffect)((()=>{if(!(null==j?void 0:j.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>qe()))}));return e.observe(j.current),()=>{e.disconnect()}}),[M,null==j?void 0:j.current]),(0,e.useEffect)((()=>{var e;const t=document.querySelector(`[id='${s}']`),n=[...ke,t];z&&n.includes(z)||B(null!==(e=ke[0])&&void 0!==e?e:t)}),[s,ke,z]),(0,e.useEffect)((()=>()=>{Z.current&&clearTimeout(Z.current),Q.current&&clearTimeout(Q.current)}),[]),(0,e.useEffect)((()=>{var e;let t=null!==(e=null==he?void 0:he.anchorSelect)&&void 0!==e?e:u;if(!t&&n&&(t=`[data-tooltip-id='${n}']`),t)try{const e=Array.from(document.querySelectorAll(t));Ae(e)}catch(e){Ae([])}}),[n,u,null==he?void 0:he.anchorSelect]);const $e=null!==(X=null==he?void 0:he.content)&&void 0!==X?X:M,Ue=se&&Object.keys(re).length>0;return(0,e.useImperativeHandle)(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}we(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Ie(!0)},close:e=>{(null==e?void 0:e.delay)?Me(e.delay):Ie(!1)},activeAnchor:z,place:te,isOpen:Boolean(de&&!x&&$e&&Ue)}))),de&&!x&&$e?e.createElement(v,{id:n,role:$,className:ae("react-tooltip",ge.tooltip,be.tooltip,be[i],r,`react-tooltip__place-${te}`,ge[Ue?"show":"closing"],Ue?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&ge.fixed,_&&ge.clickable),onTransitionEnd:e=>{ee.current&&clearTimeout(ee.current),se||"opacity"!==e.propertyName||(fe(!1),we(null),null==D||D())},style:{...N,...re,opacity:void 0!==W&&Ue?W:void 0},ref:K},$e,e.createElement(v,{className:ae("react-tooltip-arrow",ge.arrow,be.arrow,o,E&&ge.noArrow),style:{...ie,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Y})):null},xe=({content:t})=>e.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),Ee=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),_e=e.forwardRef((({id:t,anchorId:n,anchorSelect:r,content:o,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:R=!1,style:N,position:L,isOpen:P,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:j,setIsOpen:F,afterShow:H,afterHide:z,role:B="tooltip"},V)=>{const[W,q]=(0,e.useState)(o),[$,U]=(0,e.useState)(i),[X,G]=(0,e.useState)(u),[K,Y]=(0,e.useState)(c),[Z,J]=(0,e.useState)(d),[Q,ee]=(0,e.useState)(g),[te,ne]=(0,e.useState)(b),[re,oe]=(0,e.useState)(w),[ie,le]=(0,e.useState)(x),[se,ce]=(0,e.useState)(f),[ue,de]=(0,e.useState)(m),[fe,me]=(0,e.useState)(y),[he,ye]=(0,e.useState)(null),[ve,ge]=(0,e.useState)(null),be=(0,e.useRef)(I),{anchorRefs:_e,activeAnchor:Se}=pe(t),Te=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),ke=e=>{const t={place:e=>{var t;G(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:o)},html:e=>{U(null!=e?e:i)},variant:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:m)},"position-strategy":e=>{var t;me(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{oe(null===e?w:"true"===e)},hidden:e=>{le(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,e.useEffect)((()=>{q(o)}),[o]),(0,e.useEffect)((()=>{U(i)}),[i]),(0,e.useEffect)((()=>{G(u)}),[u]),(0,e.useEffect)((()=>{Y(c)}),[c]),(0,e.useEffect)((()=>{J(d)}),[d]),(0,e.useEffect)((()=>{ee(g)}),[g]),(0,e.useEffect)((()=>{ne(b)}),[b]),(0,e.useEffect)((()=>{oe(w)}),[w]),(0,e.useEffect)((()=>{le(x)}),[x]),(0,e.useEffect)((()=>{me(y)}),[y]),(0,e.useEffect)((()=>{be.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,e.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,e.useEffect)((()=>{var e;const o=new Set(_e);let i=r;if(!i&&t&&(i=`[data-tooltip-id='${t}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${n}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const a=null!==(e=null!=ve?ve:l)&&void 0!==e?e:Se.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Te(a);ke(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Te(a);ke(e),s.observe(a,c)}return()=>{s.disconnect()}}),[_e,Se,ve,n,r]),(0,e.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Ee("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),M&&!Ee("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let Ae=p;const Oe=(0,e.useRef)(null);if(l){const t=l({content:null!=W?W:null,activeAnchor:ve});Ae=t?e.createElement("div",{ref:Oe,className:"react-tooltip-content-wrapper"},t):null}else W&&(Ae=W);$&&(Ae=e.createElement(xe,{content:$}));const Ce={forwardRef:V,id:t,anchorId:n,anchorSelect:r,className:ae(a,he),classNameArrow:s,content:Ae,contentWrapperRef:Oe,place:X,variant:K,offset:Z,wrapper:se,events:ue,openOnClick:h,positionStrategy:fe,middlewares:v,delayShow:Q,delayHide:te,float:re,hidden:ie,noArrow:E,clickable:_,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:R,style:N,position:L,isOpen:P,border:D,opacity:M,arrowColor:j,setIsOpen:F,afterShow:H,afterHide:z,activeAnchor:ve,setActiveAnchor:e=>ge(e),role:B};return e.createElement(we,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ce({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||ce({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Se=window.wp.i18n,Te=window.wp.components;window.wp.data;const ke=({onlineEventLinkDefault:t=""})=>{const n=(0,Se.__)("Online event","gatherpress"),[r,i]=(0,o.useState)(t);return((e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}})({setOnlineEventLink:i},function(e){if("object"==typeof GatherPress)return"eventDetails.postId".split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}()),(0,e.createElement)(Te.Flex,{justify:"normal",gap:"3"},(0,e.createElement)(Te.FlexItem,{display:"flex"},(0,e.createElement)(Te.Icon,{icon:"video-alt2"})),(0,e.createElement)(Te.FlexItem,null,!r&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-online-event-tooltip","data-tooltip-content":(0,Se.__)("Link active for attendees during event.","gatherpress")},n),(0,e.createElement)(_e,{id:"gp-online-event-tooltip"})),r&&(0,e.createElement)("a",{href:r,rel:"noreferrer",target:"_blank"},n)))};var Ae=n(3426);const Oe=Ae.default||Ae,Ce=({name:t,fullAddress:n,phoneNumber:r,website:o})=>(0,e.createElement)(e.Fragment,null,(t||n)&&(0,e.createElement)(Te.Flex,{justify:"normal",align:"flex-start",gap:"4"},(0,e.createElement)(Te.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,e.createElement)(Te.Icon,{icon:"location"})),(0,e.createElement)(Te.FlexItem,null,t&&(0,e.createElement)("div",{className:"gp-venue__name"},(0,e.createElement)("strong",null,Oe(t))),n&&(0,e.createElement)("div",{className:"gp-venue__full-address"},Oe(n)))),(r||o)&&(0,e.createElement)(Te.Flex,{justify:"normal",gap:"8"},r&&(0,e.createElement)(Te.FlexItem,null,(0,e.createElement)(Te.Flex,{justify:"normal",gap:"4"},(0,e.createElement)(Te.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,e.createElement)(Te.Icon,{icon:"phone"})),(0,e.createElement)(Te.FlexItem,null,(0,e.createElement)("div",{className:"gp-venue__phone-number"},r)))),o&&(0,e.createElement)(Te.FlexItem,null,(0,e.createElement)(Te.Flex,{justify:"normal",gap:"4"},(0,e.createElement)(Te.FlexItem,{display:"flex",className:"gp-venue__icon"},(0,e.createElement)(Te.Icon,{icon:"admin-site-alt3"})),(0,e.createElement)(Te.FlexItem,null,(0,e.createElement)("div",{className:"gp-venue__website"},(0,e.createElement)("a",{href:o,target:"_blank",rel:"noreferrer noopener"},o))))))),Re=({name:t="",fullAddress:n,phoneNumber:r,website:o,isOnlineEventTerm:i=!1,onlineEventLink:l=""})=>(0,e.createElement)(e.Fragment,null,!i&&(0,e.createElement)(Ce,{name:t,fullAddress:n,phoneNumber:r,website:o}),i&&(0,e.createElement)(ke,{onlineEventLinkDefault:l}));r()((()=>{let t=document.querySelectorAll('[data-gp_block_name="venue"]');for(let i=0;i array('moment', 'wp-api-fetch', 'wp-data', 'wp-dom-ready', 'wp-i18n'), 'version' => '32cbe7d6c8e5dde0d342'); + array('moment', 'wp-api-fetch', 'wp-data', 'wp-dom-ready', 'wp-i18n'), 'version' => '3a1b37d47119cd0dd1c3'); diff --git a/build/editor.js b/build/editor.js index 5974dac5a..522f6d56d 100644 --- a/build/editor.js +++ b/build/editor.js @@ -1 +1 @@ -(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.domReady;var n=e.n(t);const o=window.wp.data,s=window.moment;var r=e.n(s);const i=window.wp.i18n;function a(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.apiFetch;const d="YYYY-MM-DDTHH:mm:ss",c=r().tz(p()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(d);function p(e=a("event_datetime.timezone")){return r().tz.zone(e)?e:(0,i.__)("GMT","gatherpress")}r().tz(c,p()).add(2,"hours").format(d),n()((()=>{const e=(0,o.select)("core/edit-post");if(!e)return;const t=(0,o.dispatch)("core/edit-post");e.isEditorSidebarOpened()?(t.openGeneralSidebar("edit-post/document"),t.toggleEditorPanelOpened("gp-event-settings/gp-event-settings")):(t.openGeneralSidebar(),t.toggleEditorPanelOpened("gp-event-settings/gp-event-settings")),function(){const e="gp_event_past",t=(0,o.dispatch)("core/notices");t.removeNotice(e),function(){const e=r().tz(a("event_datetime.datetime_end"),p());return r().tz(p()).valueOf()>e.valueOf()}()&&t.createNotice("warning",(0,i.__)("This event has already past.","gatherpress"),{id:e,isDismissible:!1})}()}))})(); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.domReady;var n=e.n(t);const o=window.wp.data,s=window.moment;var r=e.n(s);const i=window.wp.i18n;function a(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.apiFetch;const d="YYYY-MM-DDTHH:mm:ss",c=r().tz(p()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(d);function p(e=a("eventDetails.dateTime.timezone")){return r().tz.zone(e)?e:(0,i.__)("GMT","gatherpress")}r().tz(c,p()).add(2,"hours").format(d),n()((()=>{const e=(0,o.select)("core/edit-post");if(!e)return;const t=(0,o.dispatch)("core/edit-post");e.isEditorSidebarOpened()?(t.openGeneralSidebar("edit-post/document"),t.toggleEditorPanelOpened("gp-event-settings/gp-event-settings")):(t.openGeneralSidebar(),t.toggleEditorPanelOpened("gp-event-settings/gp-event-settings")),function(){const e="gp_event_past",t=(0,o.dispatch)("core/notices");t.removeNotice(e),function(){const e=r().tz(a("eventDetails.dateTime.datetime_end"),p());return r().tz(p()).valueOf()>e.valueOf()}()&&t.createNotice("warning",(0,i.__)("This event has already past.","gatherpress"),{id:e,isDismissible:!1})}()}))})(); \ No newline at end of file diff --git a/build/modals.asset.php b/build/modals.asset.php index ffba622d0..4d5520edd 100644 --- a/build/modals.asset.php +++ b/build/modals.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '01b5ba3348bbde2ec31f'); + array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '2042f22de266a04a955a'); diff --git a/build/modals.js b/build/modals.js index 0f883e1a1..886491551 100644 --- a/build/modals.js +++ b/build/modals.js @@ -1 +1 @@ -(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const t=window.React,n=window.wp.i18n,a=window.wp.domReady;var r=e.n(a);const l=window.wp.element,o=window.wp.components,s=window.wp.apiFetch;var c=e.n(s);function i(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const d=()=>{const[a,r]=(0,l.useState)(!1),[s,d]=(0,l.useState)(!1),[m,u]=(0,l.useState)(!1),[h,p]=(0,l.useState)(!1),[g,w]=(0,l.useState)(!1),[b,_]=(0,l.useState)(!1),[E,f]=(0,l.useState)(!1),[C,y]=(0,l.useState)(""),v=()=>r(!1);return(0,l.useEffect)((()=>{s?(_(!0),u(!1),p(!1),w(!1)):_(!1),f(!(s||m||h||g))}),[s,m,h,g]),((e,t="")=>{for(const[n,a]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{a(e.detail)}),!1)}})({setOpen:r}),(0,t.createElement)(t.Fragment,null,a&&(0,t.createElement)(o.Modal,{title:(0,n.__)("Notify members via email","gatherpress"),onRequestClose:v,shouldCloseOnClickOutside:!1},(0,t.createElement)(o.TextareaControl,{label:(0,n.__)("Optional message","gatherpress"),value:C,onChange:e=>y(e)}),(0,t.createElement)("p",{className:"description"},(0,n.__)("Select the recipients for your message by checking the relevant boxes.","gatherpress")),(0,t.createElement)(o.Flex,{gap:"8"},(0,t.createElement)(o.FlexItem,null,(0,t.createElement)(o.CheckboxControl,{label:(0,n.__)("All Members","gatherpress"),checked:s,onChange:d})),(0,t.createElement)(o.FlexItem,null,(0,t.createElement)(o.CheckboxControl,{label:(0,n.__)("Attending","gatherpress"),checked:m,onChange:u,disabled:b})),(0,t.createElement)(o.FlexItem,null,(0,t.createElement)(o.CheckboxControl,{label:(0,n.__)("Waiting List","gatherpress"),checked:h,onChange:p,disabled:b})),(0,t.createElement)(o.FlexItem,null,(0,t.createElement)(o.CheckboxControl,{label:(0,n.__)("Not Attending","gatherpress"),checked:g,onChange:w,disabled:b}))),(0,t.createElement)("br",null),(0,t.createElement)(o.Button,{variant:"primary",onClick:()=>{e.g.confirm((0,n.__)("Confirm you are ready to send?","gatherpress"))&&c()({path:"/gatherpress/v1/event/email/",method:"POST",data:{post_id:i("post_id"),message:C,send:{all:s,attending:m,waiting_list:h,not_attending:g},_wpnonce:i("nonce")}}).then((e=>{e.success&&(v(),y(""),d(!1),u(!1),p(!1),w(!1))}))},disabled:E},(0,n.__)("Send Email","gatherpress"))))};r()((()=>{const e=document.getElementById("gp-event-communication-modal");e&&(0,l.createRoot)(e).render((0,t.createElement)(d,null))}))})(); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const t=window.React,n=window.wp.i18n,a=window.wp.domReady;var r=e.n(a);const l=window.wp.element,o=window.wp.components,s=window.wp.apiFetch;var c=e.n(s);function i(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const d=()=>{const[a,r]=(0,l.useState)(!1),[s,d]=(0,l.useState)(!1),[m,u]=(0,l.useState)(!1),[h,p]=(0,l.useState)(!1),[g,w]=(0,l.useState)(!1),[b,_]=(0,l.useState)(!1),[E,f]=(0,l.useState)(!1),[C,y]=(0,l.useState)(""),v=()=>r(!1);return(0,l.useEffect)((()=>{s?(_(!0),u(!1),p(!1),w(!1)):_(!1),f(!(s||m||h||g))}),[s,m,h,g]),((e,t="")=>{for(const[n,a]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{a(e.detail)}),!1)}})({setOpen:r}),(0,t.createElement)(t.Fragment,null,a&&(0,t.createElement)(o.Modal,{title:(0,n.__)("Notify members via email","gatherpress"),onRequestClose:v,shouldCloseOnClickOutside:!1},(0,t.createElement)(o.TextareaControl,{label:(0,n.__)("Optional message","gatherpress"),value:C,onChange:e=>y(e)}),(0,t.createElement)("p",{className:"description"},(0,n.__)("Select the recipients for your message by checking the relevant boxes.","gatherpress")),(0,t.createElement)(o.Flex,{gap:"8"},(0,t.createElement)(o.FlexItem,null,(0,t.createElement)(o.CheckboxControl,{label:(0,n.__)("All Members","gatherpress"),checked:s,onChange:d})),(0,t.createElement)(o.FlexItem,null,(0,t.createElement)(o.CheckboxControl,{label:(0,n.__)("Attending","gatherpress"),checked:m,onChange:u,disabled:b})),(0,t.createElement)(o.FlexItem,null,(0,t.createElement)(o.CheckboxControl,{label:(0,n.__)("Waiting List","gatherpress"),checked:h,onChange:p,disabled:b})),(0,t.createElement)(o.FlexItem,null,(0,t.createElement)(o.CheckboxControl,{label:(0,n.__)("Not Attending","gatherpress"),checked:g,onChange:w,disabled:b}))),(0,t.createElement)("br",null),(0,t.createElement)(o.Button,{variant:"primary",onClick:()=>{e.g.confirm((0,n.__)("Confirm you are ready to send?","gatherpress"))&&c()({path:"/gatherpress/v1/event/email/",method:"POST",data:{post_id:i("eventDetails.postId"),message:C,send:{all:s,attending:m,waiting_list:h,not_attending:g},_wpnonce:i("misc.nonce")}}).then((e=>{e.success&&(v(),y(""),d(!1),u(!1),p(!1),w(!1))}))},disabled:E},(0,n.__)("Send Email","gatherpress"))))};r()((()=>{const e=document.getElementById("gp-event-communication-modal");e&&(0,l.createRoot)(e).render((0,t.createElement)(d,null))}))})(); \ No newline at end of file diff --git a/build/panels.asset.php b/build/panels.asset.php index e151fe6e6..8f1e65b65 100644 --- a/build/panels.asset.php +++ b/build/panels.asset.php @@ -1 +1 @@ - array('moment', 'react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '48471b08b2a60c1fe719'); + array('moment', 'react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'c7e87eeda0a4579afe7c'); diff --git a/build/panels.js b/build/panels.js index e1bc9bab2..5e6547990 100644 --- a/build/panels.js +++ b/build/panels.js @@ -1 +1 @@ -(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,n=window.wp.i18n,r=window.wp.data,a=window.wp.components,s=window.wp.plugins,o=window.wp.editPost,i=window.moment;var l=e.n(i);const c=window.wp.apiFetch;var m=e.n(c);function u(){(0,r.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function d(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function p(e,t){if("object"!=typeof GatherPress)return;const n=e.split("."),r=n.pop();n.reduce(((e,t)=>{var n;return null!==(n=e[t])&&void 0!==n?n:e[t]={}}),GatherPress)[r]=t}const g="YYYY-MM-DDTHH:mm:ss",_="YYYY-MM-DD HH:mm:ss",v=l().tz(f()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(g),E=l().tz(v,f()).add(2,"hours").format(g);function h(){return w(d("settings.date_format"))+" "+w(d("settings.time_format"))}function f(e=d("event_datetime.timezone")){return l().tz.zone(e)?e:(0,n.__)("GMT","gatherpress")}function S(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,n=e.replace(t,"$1");return n!==e?"UTC"+n+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function b(e,t=null){!function(e){const t=l().tz(d("event_datetime.datetime_end"),f()).valueOf(),n=l().tz(e,f()).valueOf();n>=t&&P(l().tz(n,f()).add(2,"hours").format(g))}(e),p("event_datetime.datetime_start",e),"function"==typeof t&&t(e),u()}function P(e,t=null){!function(e){const t=l().tz(d("event_datetime.datetime_start"),f()).valueOf(),n=l().tz(e,f()).valueOf();n<=t&&b(l().tz(n,f()).subtract(2,"hours").format(g))}(e),p("event_datetime.datetime_end",e),null!==t&&t(e),u()}function T(){const e=(0,r.select)("core/editor").isSavingPost(),t=(0,r.select)("core/editor").isAutosavingPost();C()&&e&&!t&&m()({path:"/gatherpress/v1/event/datetime/",method:"POST",data:{post_id:d("post_id"),datetime_start:l().tz(d("event_datetime.datetime_start"),f()).format(_),datetime_end:l().tz(d("event_datetime.datetime_end"),f()).format(_),timezone:d("event_datetime.timezone"),_wpnonce:d("nonce")}}).then((()=>{!function(){const e="gp_event_communcation",t=(0,r.dispatch)("core/notices");t.removeNotice(e),"publish"!==(0,r.select)("core/editor").getEditedPostAttribute("status")||y()||t.createNotice("success",(0,n.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{D({setOpen:!0})},label:(0,n.__)("Compose Message","gatherpress")}]})}()}))}function w(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map((e=>e in t?t[e]:e)).join("")}const D=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const a=new CustomEvent(e,{detail:r});dispatchEvent(a)}},z=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}};function C(){return"gp_event"===(0,r.select)("core/editor").getCurrentPostType()}function y(){const e=l().tz(d("event_datetime.datetime_end"),f());return l().tz(f()).valueOf()>e.valueOf()}function O(){const e="gp_event_past",t=(0,r.dispatch)("core/notices");t.removeNotice(e),y()&&t.createNotice("warning",(0,n.__)("This event has already past.","gatherpress"),{id:e,isDismissible:!1})}const k=window.wp.element,N=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),o=(0,r.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").enable_anonymous_rsvp),[]);o&&(i=d("settings.enable_anonymous_rsvp"));const[l,c]=(0,k.useState)(i);return(0,t.createElement)(a.CheckboxControl,{label:(0,n.__)("Enable Anonymous RSVP","gatherpress"),checked:l,onChange:t=>{(t=>{const n={enable_anonymous_rsvp:Number(t)};c(t),e({meta:n}),s()})(t)}})},A=()=>(0,t.createElement)("section",null,(0,t.createElement)(N,null)),x=window.wp.date,M=e=>{const{dateTimeStart:t}=e;return l().tz(t,f()).format(h())},Y=e=>{const{dateTimeEnd:t}=e;return l().tz(t,f()).format(h())},F=e=>{const{dateTimeStart:n,setDateTimeStart:r}=e,s=(0,x.getSettings)(),o=/a(?!\\)/i.test(s.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(a.DateTimePicker,{currentDate:n,onChange:e=>b(e,r),is12Hour:o})},j=e=>{const{dateTimeEnd:n,setDateTimeEnd:r}=e,s=(0,x.getSettings)(),o=/a(?!\\)/i.test(s.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(a.DateTimePicker,{currentDate:n,onChange:e=>P(e,r),is12Hour:o})},H=e=>{const{dateTimeStart:r,setDateTimeStart:s}=e;return(0,k.useEffect)((()=>{s(l().tz(function(){let e=d("event_datetime.datetime_start");return e=""!==e?l().tz(e,f()).format(g):v,p("event_datetime.datetime_start",e),e}(),f()).format(g)),D({setDateTimeStart:r}),O()})),(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.Flex,{direction:"column",gap:"0"},(0,t.createElement)(a.FlexItem,null,(0,t.createElement)("label",{htmlFor:"gp-datetime-start"},(0,n.__)("Start","gatherpress"))),(0,t.createElement)(a.FlexItem,null,(0,t.createElement)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,t.createElement)(a.Button,{id:"gp-datetime-start",onClick:n,"aria-expanded":e,isLink:!0},(0,t.createElement)(M,{dateTimeStart:r})),renderContent:()=>(0,t.createElement)(F,{dateTimeStart:r,setDateTimeStart:s})}))))},R=e=>{const{dateTimeEnd:r,setDateTimeEnd:s}=e;return(0,k.useEffect)((()=>{s(l().tz(function(){let e=d("event_datetime.datetime_end");return e=""!==e?l().tz(e,f()).format(g):E,p("event_datetime.datetime_end",e),e}(),f()).format(g)),D({setDateTimeEnd:r}),O()})),(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.Flex,{direction:"column",gap:"0"},(0,t.createElement)(a.FlexItem,null,(0,t.createElement)("label",{htmlFor:"gp-datetime-end"},(0,n.__)("End","gatherpress"))),(0,t.createElement)(a.FlexItem,null,(0,t.createElement)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,t.createElement)(a.Button,{id:"gp-datetime-end",onClick:n,"aria-expanded":e,isLink:!0},(0,t.createElement)(Y,{dateTimeEnd:r})),renderContent:()=>(0,t.createElement)(j,{dateTimeEnd:r,setDateTimeEnd:s})}))))},L=e=>{const{timezone:r,setTimezone:s}=e,o=d("timezone_choices");return(0,k.useEffect)((()=>{s(d("event_datetime.timezone"))}),[s]),(0,k.useEffect)((()=>{D({setTimezone:d("event_datetime.timezone")})})),(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.SelectControl,{label:(0,n.__)("Time Zone","gatherpress"),value:S(r),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,n=e.replace(t,"$1");if(n!==e){const r=e.replace(t,"$2").padStart(2,"0");let a=e.replace(t,"$3");return""===a&&(a=":00"),a=a.replace(".25",":15").replace(".5",":30").replace(".75",":45"),n+r+a}return e}(e),s(e),p("event_datetime.timezone",e),u()}},Object.keys(o).map((e=>(0,t.createElement)("optgroup",{key:e,label:e},Object.keys(o[e]).map((n=>(0,t.createElement)("option",{key:n,value:n},o[e][n]))))))))},$=()=>{const[e,a]=(0,k.useState)(),[s,o]=(0,k.useState)(),[i,l]=(0,k.useState)();return(0,r.subscribe)(T),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h3",null,(0,n.__)("Date & time","gatherpress")),(0,t.createElement)(H,{dateTimeStart:e,setDateTimeStart:a}),(0,t.createElement)(R,{dateTimeEnd:s,setDateTimeEnd:o}),(0,t.createElement)(L,{timezone:i,setTimezone:l}))},I=()=>(0,t.createElement)("section",null,(0,t.createElement)($,null)),G=()=>"publish"===(0,r.select)("core/editor").getEditedPostAttribute("status")&&!y()&&(0,t.createElement)("section",null,(0,t.createElement)("h3",{style:{marginBottom:"0.5rem"}},(0,n.__)("Send an event update","gatherpress")),(0,t.createElement)(a.Button,{variant:"secondary",onClick:()=>D({setOpen:!0})},(0,n.__)("Compose Message","gatherpress"))),W=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),o=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link)),[i,l]=(0,k.useState)(o);return z({setOnlineEventLink:l},d("post_id")),(0,t.createElement)(a.TextControl,{label:(0,n.__)("Online event link","gatherpress"),value:i,placeholder:(0,n.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{_online_event_link:t}}),l(t),D({setOnlineEventLink:t},d("post_id")),s()})(t)}})},B=()=>(0,t.createElement)("section",null,(0,t.createElement)(W,null)),V=()=>{const[e,s]=(0,k.useState)(""),[o,i]=(0,k.useState)(""),[l,c]=(0,k.useState)(""),[m,u]=(0,k.useState)(""),[d,p]=(0,k.useState)(!1),[g,_]=(0,k.useState)(""),v=(0,r.useDispatch)("core/editor").editPost,{unlockPostSaving:E}=(0,r.useDispatch)("core/editor"),h=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gp_venue"))),f=(0,r.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gp_venue",h))),S=f?.slug.replace(/^_/,""),[b,P]=(0,k.useState)(""),T=h+":"+b,w=(0,r.useSelect)((e=>e("core").getEntityRecords("postType","gp_venue",{per_page:1,slug:b})));(0,k.useEffect)((()=>{var e,t,r,a;let o={};if(b&&Array.isArray(w)){var l;const e=null!==(l=w[0]?.meta?._venue_information)&&void 0!==l?l:"{}";var m;e&&(o=JSON.parse(e),o.name=null!==(m=w[0]?.title.rendered)&&void 0!==m?m:"")}const d=null!==(e=o?.name)&&void 0!==e?e:(0,n.__)("No venue selected.","gatherpress"),p=null!==(t=o?.fullAddress)&&void 0!==t?t:"",g=null!==(r=o?.phoneNumber)&&void 0!==r?r:"",v=null!==(a=o?.website)&&void 0!==a?a:"";S&&P(S),_(T?String(T):""),s(d),i(p),c(g),u(v),D({setName:d,setFullAddress:p,setPhoneNumber:g,setWebsite:v,setIsOnlineEventTerm:"online-event"===b})}),[b,w,S,T]);let z=(0,r.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gp_venue",{per_page:-1,context:"view"})),[]);return z?(z=z.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),z.unshift({value:":",label:(0,n.__)("Choose a venue","gatherpress")})):z=[],(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.SelectControl,{label:(0,n.__)("Venue Selector","gatherpress"),value:g,onChange:e=>{(e=>{_(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];v({_gp_venue:t}),P(e[1]),E()})(e)},options:z}))},J=()=>(0,t.createElement)("section",null,(0,t.createElement)(V,null));(0,s.registerPlugin)("gp-event-settings",{render:()=>C()&&(0,t.createElement)(o.PluginDocumentSettingPanel,{name:"gp-event-settings",title:(0,n.__)("Event settings","gatherpress"),initialOpen:!0,className:"gp-event-settings"},(0,t.createElement)(a.__experimentalVStack,{spacing:6},(0,t.createElement)(I,null),(0,t.createElement)(J,null),(0,t.createElement)(B,null),(0,t.createElement)(A,null),(0,t.createElement)(G,null)))}),(0,r.dispatch)("core/edit-post").toggleEditorPanelOpened("gp-event-settings/gp-event-settings");const U=()=>{var e,s,o;const i=(0,r.useDispatch)("core/editor").editPost,l=(e,t)=>{const n=JSON.stringify({...c,[e]:t});i({meta:{_venue_information:n}})};let c=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._venue_information));c=c?JSON.parse(c):{};const[m,u]=(0,k.useState)(null!==(e=c.fullAddress)&&void 0!==e?e:""),[d,p]=(0,k.useState)(null!==(s=c.phoneNumber)&&void 0!==s?s:""),[g,_]=(0,k.useState)(null!==(o=c.website)&&void 0!==o?o:"");return z({setFullAddress:u,setPhoneNumber:p,setWebsite:_}),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(a.TextControl,{label:(0,n.__)("Full Address","gatherpress"),value:m,onChange:e=>{D({setFullAddress:e}),l("fullAddress",e)}}),(0,t.createElement)(a.TextControl,{label:(0,n.__)("Phone Number","gatherpress"),value:d,onChange:e=>{D({setPhoneNumber:e}),l("phoneNumber",e)}}),(0,t.createElement)(a.TextControl,{label:(0,n.__)("Website","gatherpress"),value:g,type:"url",onChange:e=>{D({setWebsite:e}),l("website",e)}}))},Z=()=>(0,t.createElement)("section",null,(0,t.createElement)(U,null));(0,s.registerPlugin)("gp-venue-settings",{render:()=>"gp_venue"===(0,r.select)("core/editor").getCurrentPostType()&&(0,t.createElement)(o.PluginDocumentSettingPanel,{name:"gp-venue-settings",title:(0,n.__)("Venue settings","gatherpress"),initialOpen:!0,className:"gp-venue-settings"},(0,t.createElement)(a.__experimentalVStack,{spacing:6},(0,t.createElement)(Z,null)))}),(0,r.dispatch)("core/edit-post").toggleEditorPanelOpened("gp-venue-settings/gp-venue-settings")})(); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,n=window.wp.i18n,a=window.wp.data,r=window.wp.components,s=window.wp.plugins,o=window.wp.editPost,i=window.moment;var l=e.n(i);const c=window.wp.apiFetch;var m=e.n(c);function u(){(0,a.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function d(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function p(e,t){if("object"!=typeof GatherPress)return;const n=e.split("."),a=n.pop();n.reduce(((e,t)=>{var n;return null!==(n=e[t])&&void 0!==n?n:e[t]={}}),GatherPress)[a]=t}const g="YYYY-MM-DDTHH:mm:ss",v="YYYY-MM-DD HH:mm:ss",_=l().tz(f()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(g),E=l().tz(_,f()).add(2,"hours").format(g);function h(){return P(d("settings.dateFormat"))+" "+P(d("settings.timeFormat"))}function f(e=d("eventDetails.dateTime.timezone")){return l().tz.zone(e)?e:(0,n.__)("GMT","gatherpress")}function S(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,n=e.replace(t,"$1");return n!==e?"UTC"+n+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function T(e,t=null){!function(e){const t=l().tz(d("eventDetails.dateTime.datetime_end"),f()).valueOf(),n=l().tz(e,f()).valueOf();n>=t&&b(l().tz(n,f()).add(2,"hours").format(g))}(e),p("event_datetime.datetime_start",e),"function"==typeof t&&t(e),u()}function b(e,t=null){!function(e){const t=l().tz(d("eventDetails.dateTime.datetime_start"),f()).valueOf(),n=l().tz(e,f()).valueOf();n<=t&&T(l().tz(n,f()).subtract(2,"hours").format(g))}(e),p("event_datetime.datetime_end",e),null!==t&&t(e),u()}function D(){const e=(0,a.select)("core/editor").isSavingPost(),t=(0,a.select)("core/editor").isAutosavingPost();C()&&e&&!t&&m()({path:"/gatherpress/v1/event/datetime/",method:"POST",data:{post_id:d("eventDetails.postId"),datetime_start:l().tz(d("eventDetails.dateTime.datetime_start"),f()).format(v),datetime_end:l().tz(d("eventDetails.dateTime.datetime_end"),f()).format(v),timezone:d("eventDetails.dateTime.timezone"),_wpnonce:d("misc.nonce")}}).then((()=>{!function(){const e="gp_event_communcation",t=(0,a.dispatch)("core/notices");t.removeNotice(e),"publish"!==(0,a.select)("core/editor").getEditedPostAttribute("status")||y()||t.createNotice("success",(0,n.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{w({setOpen:!0})},label:(0,n.__)("Compose Message","gatherpress")}]})}()}))}function P(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map((e=>e in t?t[e]:e)).join("")}const w=(e,t="")=>{for(const[n,a]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:a});dispatchEvent(r)}},z=(e,t="")=>{for(const[n,a]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{a(e.detail)}),!1)}};function C(){return"gp_event"===(0,a.select)("core/editor").getCurrentPostType()}function y(){const e=l().tz(d("eventDetails.dateTime.datetime_end"),f());return l().tz(f()).valueOf()>e.valueOf()}function O(){const e="gp_event_past",t=(0,a.dispatch)("core/notices");t.removeNotice(e),y()&&t.createNotice("warning",(0,n.__)("This event has already past.","gatherpress"),{id:e,isDismissible:!1})}const k=window.wp.element,A=()=>{const{editPost:e,unlockPostSaving:s}=(0,a.useDispatch)("core/editor"),o=(0,a.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").enable_anonymous_rsvp),[]);o&&(i=d("settings.enableAnonymousRsvp"));const[l,c]=(0,k.useState)(i);return(0,t.createElement)(r.CheckboxControl,{label:(0,n.__)("Enable Anonymous RSVP","gatherpress"),checked:l,onChange:t=>{(t=>{const n={enable_anonymous_rsvp:Number(t)};c(t),e({meta:n}),s()})(t)}})},N=()=>(0,t.createElement)("section",null,(0,t.createElement)(A,null)),x=window.wp.date,M=e=>{const{dateTimeStart:t}=e;return l().tz(t,f()).format(h())},Y=e=>{const{dateTimeEnd:t}=e;return l().tz(t,f()).format(h())},F=e=>{const{dateTimeStart:n,setDateTimeStart:a}=e,s=(0,x.getSettings)(),o=/a(?!\\)/i.test(s.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(r.DateTimePicker,{currentDate:n,onChange:e=>T(e,a),is12Hour:o})},j=e=>{const{dateTimeEnd:n,setDateTimeEnd:a}=e,s=(0,x.getSettings)(),o=/a(?!\\)/i.test(s.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(r.DateTimePicker,{currentDate:n,onChange:e=>b(e,a),is12Hour:o})},H=e=>{const{dateTimeStart:a,setDateTimeStart:s}=e;return(0,k.useEffect)((()=>{s(l().tz(function(){let e=d("eventDetails.dateTime.datetime_start");return e=""!==e?l().tz(e,f()).format(g):_,p("event_datetime.datetime_start",e),e}(),f()).format(g)),w({setDateTimeStart:a}),O()})),(0,t.createElement)(r.PanelRow,null,(0,t.createElement)(r.Flex,{direction:"column",gap:"0"},(0,t.createElement)(r.FlexItem,null,(0,t.createElement)("label",{htmlFor:"gp-datetime-start"},(0,n.__)("Start","gatherpress"))),(0,t.createElement)(r.FlexItem,null,(0,t.createElement)(r.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,t.createElement)(r.Button,{id:"gp-datetime-start",onClick:n,"aria-expanded":e,isLink:!0},(0,t.createElement)(M,{dateTimeStart:a})),renderContent:()=>(0,t.createElement)(F,{dateTimeStart:a,setDateTimeStart:s})}))))},I=e=>{const{dateTimeEnd:a,setDateTimeEnd:s}=e;return(0,k.useEffect)((()=>{s(l().tz(function(){let e=d("eventDetails.dateTime.datetime_end");return e=""!==e?l().tz(e,f()).format(g):E,p("event_datetime.datetime_end",e),e}(),f()).format(g)),w({setDateTimeEnd:a}),O()})),(0,t.createElement)(r.PanelRow,null,(0,t.createElement)(r.Flex,{direction:"column",gap:"0"},(0,t.createElement)(r.FlexItem,null,(0,t.createElement)("label",{htmlFor:"gp-datetime-end"},(0,n.__)("End","gatherpress"))),(0,t.createElement)(r.FlexItem,null,(0,t.createElement)(r.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,t.createElement)(r.Button,{id:"gp-datetime-end",onClick:n,"aria-expanded":e,isLink:!0},(0,t.createElement)(Y,{dateTimeEnd:a})),renderContent:()=>(0,t.createElement)(j,{dateTimeEnd:a,setDateTimeEnd:s})}))))},R=e=>{const{timezone:a,setTimezone:s}=e,o=d("misc.timezoneChoices");return(0,k.useEffect)((()=>{s(d("eventDetails.dateTime.timezone"))}),[s]),(0,k.useEffect)((()=>{w({setTimezone:d("eventDetails.dateTime.timezone")})})),(0,t.createElement)(r.PanelRow,null,(0,t.createElement)(r.SelectControl,{label:(0,n.__)("Time Zone","gatherpress"),value:S(a),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,n=e.replace(t,"$1");if(n!==e){const a=e.replace(t,"$2").padStart(2,"0");let r=e.replace(t,"$3");return""===r&&(r=":00"),r=r.replace(".25",":15").replace(".5",":30").replace(".75",":45"),n+a+r}return e}(e),s(e),p("eventDetails.dateTime.timezone",e),u()}},Object.keys(o).map((e=>(0,t.createElement)("optgroup",{key:e,label:e},Object.keys(o[e]).map((n=>(0,t.createElement)("option",{key:n,value:n},o[e][n]))))))))},L=()=>{const[e,r]=(0,k.useState)(),[s,o]=(0,k.useState)(),[i,l]=(0,k.useState)();return(0,a.subscribe)(D),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h3",null,(0,n.__)("Date & time","gatherpress")),(0,t.createElement)(H,{dateTimeStart:e,setDateTimeStart:r}),(0,t.createElement)(I,{dateTimeEnd:s,setDateTimeEnd:o}),(0,t.createElement)(R,{timezone:i,setTimezone:l}))},$=()=>(0,t.createElement)("section",null,(0,t.createElement)(L,null)),G=()=>"publish"===(0,a.select)("core/editor").getEditedPostAttribute("status")&&!y()&&(0,t.createElement)("section",null,(0,t.createElement)("h3",{style:{marginBottom:"0.5rem"}},(0,n.__)("Send an event update","gatherpress")),(0,t.createElement)(r.Button,{variant:"secondary",onClick:()=>w({setOpen:!0})},(0,n.__)("Compose Message","gatherpress"))),W=()=>{const{editPost:e,unlockPostSaving:s}=(0,a.useDispatch)("core/editor"),o=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link)),[i,l]=(0,k.useState)(o);return z({setOnlineEventLink:l},d("eventDetails.postId")),(0,t.createElement)(r.TextControl,{label:(0,n.__)("Online event link","gatherpress"),value:i,placeholder:(0,n.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{_online_event_link:t}}),l(t),w({setOnlineEventLink:t},d("eventDetails.postId")),s()})(t)}})},B=()=>(0,t.createElement)("section",null,(0,t.createElement)(W,null)),V=()=>{const[e,s]=(0,k.useState)(""),[o,i]=(0,k.useState)(""),[l,c]=(0,k.useState)(""),[m,u]=(0,k.useState)(""),[d,p]=(0,k.useState)(!1),[g,v]=(0,k.useState)(""),_=(0,a.useDispatch)("core/editor").editPost,{unlockPostSaving:E}=(0,a.useDispatch)("core/editor"),h=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gp_venue"))),f=(0,a.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gp_venue",h))),S=f?.slug.replace(/^_/,""),[T,b]=(0,k.useState)(""),D=h+":"+T,P=(0,a.useSelect)((e=>e("core").getEntityRecords("postType","gp_venue",{per_page:1,slug:T})));(0,k.useEffect)((()=>{var e,t,a,r;let o={};if(T&&Array.isArray(P)){var l;const e=null!==(l=P[0]?.meta?._venue_information)&&void 0!==l?l:"{}";var m;e&&(o=JSON.parse(e),o.name=null!==(m=P[0]?.title.rendered)&&void 0!==m?m:"")}const d=null!==(e=o?.name)&&void 0!==e?e:(0,n.__)("No venue selected.","gatherpress"),p=null!==(t=o?.fullAddress)&&void 0!==t?t:"",g=null!==(a=o?.phoneNumber)&&void 0!==a?a:"",_=null!==(r=o?.website)&&void 0!==r?r:"";S&&b(S),v(D?String(D):""),s(d),i(p),c(g),u(_),w({setName:d,setFullAddress:p,setPhoneNumber:g,setWebsite:_,setIsOnlineEventTerm:"online-event"===T})}),[T,P,S,D]);let z=(0,a.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gp_venue",{per_page:-1,context:"view"})),[]);return z?(z=z.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),z.unshift({value:":",label:(0,n.__)("Choose a venue","gatherpress")})):z=[],(0,t.createElement)(r.PanelRow,null,(0,t.createElement)(r.SelectControl,{label:(0,n.__)("Venue Selector","gatherpress"),value:g,onChange:e=>{(e=>{v(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];_({_gp_venue:t}),b(e[1]),E()})(e)},options:z}))},J=()=>(0,t.createElement)("section",null,(0,t.createElement)(V,null));(0,s.registerPlugin)("gp-event-settings",{render:()=>C()&&(0,t.createElement)(o.PluginDocumentSettingPanel,{name:"gp-event-settings",title:(0,n.__)("Event settings","gatherpress"),initialOpen:!0,className:"gp-event-settings"},(0,t.createElement)(r.__experimentalVStack,{spacing:6},(0,t.createElement)($,null),(0,t.createElement)(J,null),(0,t.createElement)(B,null),(0,t.createElement)(N,null),(0,t.createElement)(G,null)))}),(0,a.dispatch)("core/edit-post").toggleEditorPanelOpened("gp-event-settings/gp-event-settings");const U=()=>{var e,s,o;const i=(0,a.useDispatch)("core/editor").editPost,l=(e,t)=>{const n=JSON.stringify({...c,[e]:t});i({meta:{_venue_information:n}})};let c=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._venue_information));c=c?JSON.parse(c):{};const[m,u]=(0,k.useState)(null!==(e=c.fullAddress)&&void 0!==e?e:""),[d,p]=(0,k.useState)(null!==(s=c.phoneNumber)&&void 0!==s?s:""),[g,v]=(0,k.useState)(null!==(o=c.website)&&void 0!==o?o:"");return z({setFullAddress:u,setPhoneNumber:p,setWebsite:v}),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(r.TextControl,{label:(0,n.__)("Full Address","gatherpress"),value:m,onChange:e=>{w({setFullAddress:e}),l("fullAddress",e)}}),(0,t.createElement)(r.TextControl,{label:(0,n.__)("Phone Number","gatherpress"),value:d,onChange:e=>{w({setPhoneNumber:e}),l("phoneNumber",e)}}),(0,t.createElement)(r.TextControl,{label:(0,n.__)("Website","gatherpress"),value:g,type:"url",onChange:e=>{w({setWebsite:e}),l("website",e)}}))},Z=()=>(0,t.createElement)("section",null,(0,t.createElement)(U,null));(0,s.registerPlugin)("gp-venue-settings",{render:()=>"gp_venue"===(0,a.select)("core/editor").getCurrentPostType()&&(0,t.createElement)(o.PluginDocumentSettingPanel,{name:"gp-venue-settings",title:(0,n.__)("Venue settings","gatherpress"),initialOpen:!0,className:"gp-venue-settings"},(0,t.createElement)(r.__experimentalVStack,{spacing:6},(0,t.createElement)(Z,null)))}),(0,a.dispatch)("core/edit-post").toggleEditorPanelOpened("gp-venue-settings/gp-venue-settings")})(); \ No newline at end of file diff --git a/includes/core/classes/class-assets.php b/includes/core/classes/class-assets.php index 7365df00d..d1825be86 100644 --- a/includes/core/classes/class-assets.php +++ b/includes/core/classes/class-assets.php @@ -10,6 +10,7 @@ namespace GatherPress\Core; use GatherPress\Core\Traits\Singleton; +use GatherPress\Core\Utility; /** * Class Assets. @@ -269,35 +270,44 @@ public function event_communication_modal(): void { protected function localize( int $post_id ): array { $event = new Event( $post_id ); $settings = Settings::get_instance(); + $event_details = array(); + + if ( ! empty( $event->event ) ) { + $event_details = array( + 'currentUser' => $event->rsvp->get( get_current_user_id() ), + 'dateTime' => $event->get_datetime(), + 'enableAnonymousRsvp' => (bool) get_post_meta( $post_id, 'enable_anonymous_rsvp', true ), + 'hasEventPast' => $event->has_event_past(), + 'postId' => $post_id, + 'responses' => $event->rsvp->responses(), + ); + } return array( - 'responses' => ( $event->rsvp ) ? $event->rsvp->responses() : array(), - 'current_user' => ( $event->rsvp && $event->rsvp->get( get_current_user_id() ) ) - ? $event->rsvp->get( get_current_user_id() ) - : '', // Cleanup needed. - 'is_user_logged_in' => is_user_logged_in(), - 'default_timezone' => sanitize_text_field( wp_timezone_string() ), - 'event_announced' => ( get_post_meta( $post_id, 'gp-event-announce', true ) ) ? 1 : 0, - 'event_datetime' => $event->get_datetime(), - 'event_rest_api' => home_url( 'wp-json/gatherpress/v1/event' ), - 'enable_anonymous_rsvp' => (bool) get_post_meta( $post_id, 'enable_anonymous_rsvp', true ), - 'has_event_past' => $event->has_event_past(), - 'is_admin' => is_admin(), - 'nonce' => wp_create_nonce( 'wp_rest' ), - 'post_id' => $post_id, - 'settings' => array( - 'date_format' => $settings->get_value( 'general', 'formatting', 'date_format' ), - 'time_format' => $settings->get_value( 'general', 'formatting', 'time_format' ), - 'show_timezone' => ( 1 === (int) $settings->get_value( 'general', 'formatting', 'show_timezone' ) ), - 'enable_anonymous_rsvp' => ( 1 === (int) $settings->get_value( 'general', 'general', 'enable_anonymous_rsvp' ) ), + 'eventDetails' => $event_details, + 'misc' => array( + 'isAdmin' => is_admin(), + 'nonce' => wp_create_nonce( 'wp_rest' ), + 'timezoneChoices' => Utility::timezone_choices(), + 'unregisterBlocks' => $this->unregister_blocks(), + ), + 'settings' => array( + 'dateFormat' => $settings->get_value( 'general', 'formatting', 'date_format' ), + 'enableAnonymousRsvp' => ( 1 === (int) $settings->get_value( 'general', 'general', 'enable_anonymous_rsvp' ) ), + 'showTimezone' => ( 1 === (int) $settings->get_value( 'general', 'formatting', 'show_timezone' ) ), + 'timeFormat' => $settings->get_value( 'general', 'formatting', 'time_format' ), + ), + 'urls' => array( + 'eventRestApi' => home_url( 'wp-json/gatherpress/v1/event' ), + 'loginUrl' => $this->get_login_url( $post_id ), + 'registrationUrl' => $this->get_registration_url( $post_id ), ), - 'login_url' => $this->get_login_url( $post_id ), - 'registration_url' => $this->get_registration_url( $post_id ), - 'timezone_choices' => Utility::timezone_choices(), - 'unregister_blocks' => $this->unregister_blocks(), ); } + protected function event_details( int $post_id ): array { + } + /** * Retrieve the login URL for the event. * diff --git a/includes/core/classes/class-event.php b/includes/core/classes/class-event.php index 7639a88be..a73a410f5 100644 --- a/includes/core/classes/class-event.php +++ b/includes/core/classes/class-event.php @@ -69,7 +69,7 @@ class Event { * @since 1.0.0 * @var array|WP_Post|null */ - protected $event = null; + public WP_Post|array|null $event = null; /** * RSVP instance. @@ -89,14 +89,10 @@ class Event { * @param int $post_id The event post ID. */ public function __construct( int $post_id ) { - if ( self::POST_TYPE !== get_post_type( $post_id ) ) { - return null; + if ( self::POST_TYPE === get_post_type( $post_id ) ) { + $this->event = get_post( $post_id ); + $this->rsvp = new Rsvp( $post_id ); } - - $this->event = get_post( $post_id ); - $this->rsvp = new Rsvp( $post_id ); - - return $this->event; } /** diff --git a/includes/core/classes/class-utility.php b/includes/core/classes/class-utility.php index 055a44a11..5268a9e57 100644 --- a/includes/core/classes/class-utility.php +++ b/includes/core/classes/class-utility.php @@ -116,4 +116,18 @@ public static function timezone_choices(): array { return $timezones_clean; } + + public static function map_array_keys( callable $f, array $xs ): array { + $out = array(); + + foreach ($xs as $key => $value) { + $out[$f($key)] = is_array($value) ? Utility::map_array_keys($f, $value) : $value; + } + + return $out; + } + + public static function snake_case_to_camel_case( string $str ): string { + return lcfirst( implode('', array_map( 'ucfirst', explode('_', $str ) ) ) ); + } } diff --git a/src/admin.js b/src/admin.js index 6459d48f5..d5ee80e78 100644 --- a/src/admin.js +++ b/src/admin.js @@ -23,9 +23,9 @@ import { getFromGlobal } from './helpers/globals'; // Execute the following code when the DOM is ready. domReady(() => { // Iterate through keys of the 'unregister_blocks' array in the global scope. - Object.keys(getFromGlobal('unregister_blocks')).forEach((key) => { + Object.keys(getFromGlobal('misc.unregisterBlocks')).forEach((key) => { // Retrieve the block name using the key. - const blockName = getFromGlobal('unregister_blocks')[key]; + const blockName = getFromGlobal('misc.unregisterBlocks')[key]; // Check if the block name is defined and unregister the block. if (blockName && 'undefined' !== typeof getBlockType(blockName)) { diff --git a/src/blocks/event-date/edit.js b/src/blocks/event-date/edit.js index 8b06a2a92..fcca67c22 100644 --- a/src/blocks/event-date/edit.js +++ b/src/blocks/event-date/edit.js @@ -36,12 +36,12 @@ import { getFromGlobal } from '../../helpers/globals'; */ const displayDateTime = (start, end, tz) => { const dateFormat = convertPHPToMomentFormat( - getFromGlobal('settings.date_format') + getFromGlobal('settings.dateFormat') ); const timeFormat = convertPHPToMomentFormat( - getFromGlobal('settings.time_format') + getFromGlobal('settings.timeFormat') ); - const timeZoneFormat = getFromGlobal('settings.show_timezone') ? 'z' : ''; + const timeZoneFormat = getFromGlobal('settings.showTimezone') ? 'z' : ''; const startFormat = dateFormat + ' ' + timeFormat; const timeZone = getTimeZone(tz); let endFormat = dateFormat + ' ' + timeFormat + ' ' + timeZoneFormat; diff --git a/src/blocks/rsvp/edit.js b/src/blocks/rsvp/edit.js index 5fe987d2b..10b8d8045 100644 --- a/src/blocks/rsvp/edit.js +++ b/src/blocks/rsvp/edit.js @@ -24,8 +24,8 @@ import EditCover from '../../components/EditCover'; */ const Edit = () => { const blockProps = useBlockProps(); - const postId = getFromGlobal('post_id'); - const currentUser = getFromGlobal('current_user'); + const postId = getFromGlobal('eventDetails.postId'); + const currentUser = getFromGlobal('eventDetails.currentUser'); return (
diff --git a/src/blocks/rsvp/rsvp.js b/src/blocks/rsvp/rsvp.js index 912ff0ab7..b4ac08e39 100644 --- a/src/blocks/rsvp/rsvp.js +++ b/src/blocks/rsvp/rsvp.js @@ -26,15 +26,15 @@ import { getFromGlobal } from '../../helpers/globals'; domReady(() => { const containers = document.querySelectorAll(`[data-gp_block_name="rsvp"]`); - const type = true === getFromGlobal('has_event_past') ? 'past' : 'upcoming'; + const type = true === getFromGlobal('eventDetails.hasEventPast') ? 'past' : 'upcoming'; for (let i = 0; i < containers.length; i++) { createRoot(containers[i]).render( ); } diff --git a/src/components/AnonymousRsvp.js b/src/components/AnonymousRsvp.js index bcc3bfd73..04a4deffc 100644 --- a/src/components/AnonymousRsvp.js +++ b/src/components/AnonymousRsvp.js @@ -33,7 +33,7 @@ const AnonymousRsvp = () => { }, []); if (isNewEvent) { - defaultAnonymousRsvp = getFromGlobal('settings.enable_anonymous_rsvp'); + defaultAnonymousRsvp = getFromGlobal('settings.enableAnonymousRsvp'); } const [anonymousRsvp, setAnonymousRsvp] = useState(defaultAnonymousRsvp); diff --git a/src/components/EventsList.js b/src/components/EventsList.js index 05885629a..e34888b8d 100644 --- a/src/components/EventsList.js +++ b/src/components/EventsList.js @@ -89,7 +89,7 @@ const EventsList = (props) => { * Check if user is logged in, so we have current_user for the event present, which * allows them to interact with the block. */ - if (getFromGlobal('is_user_logged_in')) { + if (getFromGlobal('eventDetails.currentUser')) { apiFetch({ path: `/gatherpress/v1/event/events-list?event_list_type=${type}&max_number=${maxNumberOfEvents}&datetime_format=${datetimeFormat}&topics=${topicsString}&venues=${venuesString}`, }).then((data) => { @@ -98,7 +98,7 @@ const EventsList = (props) => { }); } else { const endpoint = - getFromGlobal('event_rest_api') + + getFromGlobal('urls.eventRestApi') + `/events-list?event_list_type=${type}&max_number=${maxNumberOfEvents}&datetime_format=${datetimeFormat}&topics=${topicsString}&venues=${venuesString}`; /** diff --git a/src/components/OnlineEvent.js b/src/components/OnlineEvent.js index f38eee22c..ffb319878 100644 --- a/src/components/OnlineEvent.js +++ b/src/components/OnlineEvent.js @@ -34,7 +34,7 @@ const OnlineEvent = ({ onlineEventLinkDefault = '' }) => { onlineEventLinkDefault ); - Listener({ setOnlineEventLink }, getFromGlobal('post_id')); + Listener({ setOnlineEventLink }, getFromGlobal('eventDetails.postId')); return ( diff --git a/src/components/OnlineEventLink.js b/src/components/OnlineEventLink.js index 3b8b88358..eb310c66f 100644 --- a/src/components/OnlineEventLink.js +++ b/src/components/OnlineEventLink.js @@ -38,11 +38,11 @@ const OnlineEventLink = () => { editPost({ meta }); setOnlineEventLink(value); - Broadcaster({ setOnlineEventLink: value }, getFromGlobal('post_id')); + Broadcaster({ setOnlineEventLink: value }, getFromGlobal('eventDetails.postId')); unlockPostSaving(); }; - Listener({ setOnlineEventLink }, getFromGlobal('post_id')); + Listener({ setOnlineEventLink }, getFromGlobal('eventDetails.postId')); return ( { status, guests, anonymous, - _wpnonce: getFromGlobal('nonce'), + _wpnonce: getFromGlobal('misc.nonce'), }, }).then((res) => { if (res.success) { @@ -182,14 +182,14 @@ const Rsvp = ({ eventId, currentUser = '', type, enableAnonymousRsvp }) => {
{__('You must ', 'gatherpress')} - + {__('Login', 'gatherpress')} {__(' to RSVP to events.', 'gatherpress')}
- {'' !== getFromGlobal('registration_url') && ( + {'' !== getFromGlobal('urls.registrationUrl') && (
- + {__('Register', 'gatherpress')} {__( diff --git a/src/components/RsvpResponse.js b/src/components/RsvpResponse.js index a9d0d1fa6..8e834db1f 100644 --- a/src/components/RsvpResponse.js +++ b/src/components/RsvpResponse.js @@ -27,7 +27,7 @@ import { getFromGlobal } from '../helpers/globals'; const RsvpResponse = () => { const defaultLimit = 8; const defaultStatus = 'attending'; - const hasEventPast = getFromGlobal('has_event_past'); + const hasEventPast = getFromGlobal('eventDetails.hasEventPast'); const items = [ { title: @@ -60,7 +60,7 @@ const RsvpResponse = () => { setRsvpStatus(value); }; - Listener({ setRsvpStatus }, getFromGlobal('post_id')); + Listener({ setRsvpStatus }, getFromGlobal('eventDetails.postId')); // Make sure rsvpStatus is a valid status, if not, set to default. if (!items.some((item) => item.value === rsvpStatus)) { diff --git a/src/components/RsvpResponseCard.js b/src/components/RsvpResponseCard.js index 9424bdc0e..bd3ea2ba0 100644 --- a/src/components/RsvpResponseCard.js +++ b/src/components/RsvpResponseCard.js @@ -86,7 +86,7 @@ const RsvpResponseCard = ({ value, limit, responses = [] }) => { <> {'attending' === value && 0 === renderedItems.length && (
- {false === getFromGlobal('has_event_past') + {false === getFromGlobal('eventDetails.hasEventPast') ? __( 'No one is attending this event yet.', 'gatherpress' diff --git a/src/components/RsvpResponseContent.js b/src/components/RsvpResponseContent.js index d83607cf2..9ba42b45d 100644 --- a/src/components/RsvpResponseContent.js +++ b/src/components/RsvpResponseContent.js @@ -24,9 +24,9 @@ import { Listener } from '../helpers/broadcasting'; * @return {JSX.Element} The rendered React component. */ const RsvpResponseContent = ({ items, activeValue, limit = false }) => { - const eventId = getFromGlobal('post_id'); + const eventId = getFromGlobal('eventDetails.postId'); const [rsvpResponse, setRsvpResponse] = useState( - getFromGlobal('responses') + getFromGlobal('eventDetails.responses') ); Listener({ setRsvpResponse }, eventId); diff --git a/src/components/RsvpResponseHeader.js b/src/components/RsvpResponseHeader.js index c47f129b3..ecaf47282 100644 --- a/src/components/RsvpResponseHeader.js +++ b/src/components/RsvpResponseHeader.js @@ -57,10 +57,10 @@ const RsvpResponseHeader = ({ } const [rsvpSeeAllLink, setRsvpSeeAllLink] = useState( - getFromGlobal('responses')[activeValue].count > defaultLimit + getFromGlobal('eventDetails.responses')[activeValue].count > defaultLimit ); - Listener({ setRsvpSeeAllLink }, getFromGlobal('post_id')); + Listener({ setRsvpSeeAllLink }, getFromGlobal('eventDetails.postId')); return (
diff --git a/src/components/RsvpResponseNavigation.js b/src/components/RsvpResponseNavigation.js index fa3533bcf..e40460647 100644 --- a/src/components/RsvpResponseNavigation.js +++ b/src/components/RsvpResponseNavigation.js @@ -41,7 +41,7 @@ const RsvpResponseNavigation = ({ waiting_list: 0, // eslint-disable-line camelcase }; - for (const [key, value] of Object.entries(getFromGlobal('responses'))) { + for (const [key, value] of Object.entries(getFromGlobal('eventDetails.responses'))) { defaultCount[key] = value.count; } @@ -50,7 +50,7 @@ const RsvpResponseNavigation = ({ const [hideNavigationDropdown, setHideNavigationDropdown] = useState(true); const Tag = hideNavigationDropdown ? `span` : `a`; - Listener({ setRsvpCount }, getFromGlobal('post_id')); + Listener({ setRsvpCount }, getFromGlobal('eventDetails.postId')); let activeIndex = 0; diff --git a/src/components/RsvpResponseNavigationItem.js b/src/components/RsvpResponseNavigationItem.js index 5a74a8daf..de7edb7c2 100644 --- a/src/components/RsvpResponseNavigationItem.js +++ b/src/components/RsvpResponseNavigationItem.js @@ -38,7 +38,7 @@ const RsvpResponseNavigationItem = ({ const { title, value } = item; const active = !(0 === count && 'attending' !== value); const Tag = activeItem ? `span` : `a`; - const eventId = getFromGlobal('post_id'); + const eventId = getFromGlobal('eventDetails.postId'); const rsvpSeeAllLink = count > defaultLimit; useEffect(() => { diff --git a/src/components/TimeZone.js b/src/components/TimeZone.js index 30e5079e4..9146aacf2 100644 --- a/src/components/TimeZone.js +++ b/src/components/TimeZone.js @@ -32,16 +32,16 @@ import { */ const TimeZone = (props) => { const { timezone, setTimezone } = props; - const choices = getFromGlobal('timezone_choices'); + const choices = getFromGlobal('misc.timezoneChoices'); // Run only once. useEffect(() => { - setTimezone(getFromGlobal('event_datetime.timezone')); + setTimezone(getFromGlobal('eventDetails.dateTime.timezone')); }, [setTimezone]); useEffect(() => { Broadcaster({ - setTimezone: getFromGlobal('event_datetime.timezone'), + setTimezone: getFromGlobal('eventDetails.dateTime.timezone'), }); }); @@ -53,7 +53,7 @@ const TimeZone = (props) => { onChange={(value) => { value = maybeConvertUtcOffsetForDatabase(value); setTimezone(value); - setToGlobal('event_datetime.timezone', value); + setToGlobal('eventDetails.dateTime.timezone', value); enableSave(); }} > diff --git a/src/helpers/datetime.js b/src/helpers/datetime.js index 35a70149f..bc58cadde 100644 --- a/src/helpers/datetime.js +++ b/src/helpers/datetime.js @@ -81,10 +81,10 @@ export const defaultDateTimeEnd = moment */ export function dateTimeLabelFormat() { const dateFormat = convertPHPToMomentFormat( - getFromGlobal('settings.date_format') + getFromGlobal('settings.dateFormat') ); const timeFormat = convertPHPToMomentFormat( - getFromGlobal('settings.time_format') + getFromGlobal('settings.timeFormat') ); return dateFormat + ' ' + timeFormat; @@ -101,7 +101,7 @@ export function dateTimeLabelFormat() { * @return {string} The retrieved timezone, or 'GMT' if the provided timezone is invalid. */ export function getTimeZone( - timezone = getFromGlobal('event_datetime.timezone') + timezone = getFromGlobal('eventDetails.dateTime.timezone') ) { if (!!moment.tz.zone(timezone)) { return timezone; @@ -127,7 +127,7 @@ export function getUtcOffset(timezone) { return ''; } - const offset = getFromGlobal('event_datetime.timezone'); + const offset = getFromGlobal('eventDetails.dateTime.timezone'); return maybeConvertUtcOffsetForDisplay(offset); } @@ -221,7 +221,7 @@ export function maybeConvertUtcOffsetForSelect(offset = '') { * @return {string} The formatted start date and time for the event. */ export function getDateTimeStart() { - let dateTime = getFromGlobal('event_datetime.datetime_start'); + let dateTime = getFromGlobal('eventDetails.dateTime.datetime_start'); dateTime = '' !== dateTime @@ -243,7 +243,7 @@ export function getDateTimeStart() { * @return {string} The formatted end date and time for the event. */ export function getDateTimeEnd() { - let dateTime = getFromGlobal('event_datetime.datetime_end'); + let dateTime = getFromGlobal('eventDetails.dateTime.datetime_end'); dateTime = '' !== dateTime @@ -317,7 +317,7 @@ export function updateDateTimeEnd(date, setDateTimeEnd = null) { */ export function validateDateTimeStart(dateTimeStart) { const dateTimeEndNumeric = moment - .tz(getFromGlobal('event_datetime.datetime_end'), getTimeZone()) + .tz(getFromGlobal('eventDetails.dateTime.datetime_end'), getTimeZone()) .valueOf(); const dateTimeStartNumeric = moment .tz(dateTimeStart, getTimeZone()) @@ -348,7 +348,7 @@ export function validateDateTimeStart(dateTimeStart) { */ export function validateDateTimeEnd(dateTimeEnd) { const dateTimeStartNumeric = moment - .tz(getFromGlobal('event_datetime.datetime_start'), getTimeZone()) + .tz(getFromGlobal('eventDetails.dateTime.datetime_start'), getTimeZone()) .valueOf(); const dateTimeEndNumeric = moment.tz(dateTimeEnd, getTimeZone()).valueOf(); @@ -381,21 +381,21 @@ export function saveDateTime() { path: '/gatherpress/v1/event/datetime/', method: 'POST', data: { - post_id: getFromGlobal('post_id'), + post_id: getFromGlobal('eventDetails.postId'), datetime_start: moment .tz( - getFromGlobal('event_datetime.datetime_start'), + getFromGlobal('eventDetails.dateTime.datetime_start'), getTimeZone() ) .format(dateTimeDatabaseFormat), datetime_end: moment .tz( - getFromGlobal('event_datetime.datetime_end'), + getFromGlobal('eventDetails.dateTime.datetime_end'), getTimeZone() ) .format(dateTimeDatabaseFormat), - timezone: getFromGlobal('event_datetime.timezone'), - _wpnonce: getFromGlobal('nonce'), + timezone: getFromGlobal('eventDetails.dateTime.timezone'), + _wpnonce: getFromGlobal('misc.nonce'), }, }).then(() => { triggerEventCommuncation(); diff --git a/src/helpers/event.js b/src/helpers/event.js index fa9f28498..b9932226c 100644 --- a/src/helpers/event.js +++ b/src/helpers/event.js @@ -41,7 +41,7 @@ export function isEventPostType() { */ export function hasEventPast() { const dateTimeEnd = moment.tz( - getFromGlobal('event_datetime.datetime_end'), + getFromGlobal('eventDetails.dateTime.datetime_end'), getTimeZone() ); diff --git a/src/modals/email-communication/index.js b/src/modals/email-communication/index.js index ba79c50ec..8eeebbfac 100644 --- a/src/modals/email-communication/index.js +++ b/src/modals/email-communication/index.js @@ -49,7 +49,7 @@ const EventCommuncationModal = () => { path: '/gatherpress/v1/event/email/', method: 'POST', data: { - post_id: getFromGlobal('post_id'), + post_id: getFromGlobal('eventDetails.postId'), message, send: { all: isAllChecked, @@ -57,7 +57,7 @@ const EventCommuncationModal = () => { waiting_list: isWaitingListChecked, not_attending: isNotAttendingChecked, }, - _wpnonce: getFromGlobal('nonce'), + _wpnonce: getFromGlobal('misc.nonce'), }, }).then((res) => { if (res.success) {