diff --git a/build/blocks/event-date/block.json b/build/blocks/event-date/block.json index 4dc2ac045..9566134b0 100644 --- a/build/blocks/event-date/block.json +++ b/build/blocks/event-date/block.json @@ -1,12 +1,14 @@ { "$schema": "https://schemas.wp.org/trunk/block.json", - "apiVersion": 2, + "apiVersion": 3, "name": "gatherpress/event-date", - "version": "1.0.1", + "version": "2.0.0", "title": "Event Date", "category": "gatherpress", "icon": "clock", - "example": {}, + "example": { + "viewportWidth": 350 + }, "description": "Displays the date and time for an event.", "attributes": { "eventEnd": { @@ -14,10 +16,54 @@ }, "eventStart": { "type": "string" + }, + "textAlign": { + "type": "string" } }, "supports": { - "html": false + "html": false, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } }, "textdomain": "gatherpress", "editorScript": "file:./index.js", diff --git a/build/blocks/event-date/index.asset.php b/build/blocks/event-date/index.asset.php index 0c0d6956d..36b4df722 100644 --- a/build/blocks/event-date/index.asset.php +++ b/build/blocks/event-date/index.asset.php @@ -1 +1 @@ - array('moment', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => '0f22ffb28fbe7d004c9f'); + array('moment', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => 'a6ff17da1e87a7cfbb77'); diff --git a/build/blocks/event-date/index.js b/build/blocks/event-date/index.js index 6f793793f..053c37ef9 100644 --- a/build/blocks/event-date/index.js +++ b/build/blocks/event-date/index.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e,t={110:(e,t,n)=>{const r=window.wp.blocks,s=window.moment;var i=n.n(s);const a=window.wp.i18n,o=window.wp.blockEditor,d=window.wp.components,c=window.wp.element,l=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const s=new CustomEvent(e,{detail:r});dispatchEvent(s)}},m=window.wp.data,p=window.wp.apiFetch;var u=n.n(p);function h(){(0,m.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function f(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function g(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 v(){const e=i().tz(f("eventDetails.dateTime.datetime_end"),S());return"gatherpress_event"===(0,m.select)("core/editor")?.getCurrentPostType()&&i().tz(S()).valueOf()>e.valueOf()}function T(){const e="gatherpress_event_past",t=(0,m.dispatch)("core/notices");t.removeNotice(e),v()&&t.createNotice("warning",(0,a.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const x=window.wp.date,j=window.ReactJSXRuntime,D="YYYY-MM-DDTHH:mm:ss",_="YYYY-MM-DD HH:mm:ss",w=i().tz(S()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(D),z=i().tz(w,S()).add(2,"hours").format(D);function b(){return k(f("settings.dateFormat"))+" "+k(f("settings.timeFormat"))}function S(e=f("eventDetails.dateTime.timezone")){return i().tz.zone(e)?e:(0,a.__)("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(f("eventDetails.dateTime.datetime_end"),S()).valueOf(),n=i().tz(e,S()).valueOf();n>=t&&E(i().tz(n,S()).add(2,"hours").format(D))}(e),g("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),h()}function E(e,t=null){!function(e){const t=i().tz(f("eventDetails.dateTime.datetime_start"),S()).valueOf(),n=i().tz(e,S()).valueOf();n<=t&&O(i().tz(n,S()).subtract(2,"hours").format(D))}(e),g("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),h()}function P(){const e=(0,m.select)("core/editor").isSavingPost(),t=(0,m.select)("core/editor").isAutosavingPost();"gatherpress_event"===(0,m.select)("core/editor")?.getCurrentPostType()&&e&&!t&&u()({path:f("urls.eventRestApi")+"/datetime",method:"POST",data:{post_id:f("eventDetails.postId"),datetime_start:i().tz(f("eventDetails.dateTime.datetime_start"),S()).format(_),datetime_end:i().tz(f("eventDetails.dateTime.datetime_end"),S()).format(_),timezone:f("eventDetails.dateTime.timezone"),_wpnonce:f("misc.nonce")}}).then((()=>{!function(){const e="gatherpress_event_communication",t=(0,m.dispatch)("core/notices");t.removeNotice(e),"publish"!==(0,m.select)("core/editor").getEditedPostAttribute("status")||v()||t.createNotice("success",(0,a.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{l({setOpen:!0})},label:(0,a.__)("Compose Message","gatherpress")}]})}()}))}function k(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,n,r)=>{const s=r[n-1];return e in t&&"\\"!==s?t[e]:e})).join("")}const C=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,j.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,j.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})},M=e=>{const{dateTimeStart:t}=e;return i().tz(t,S()).format(b())},Y=e=>{const{dateTimeEnd:t}=e;return i().tz(t,S()).format(b())},F=e=>{const{dateTimeStart:t,setDateTimeStart:n}=e,r=(0,x.getSettings)(),s=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,j.jsx)(d.DateTimePicker,{currentDate:t,onChange:e=>O(e,n),is12Hour:s})},$=e=>{const{dateTimeEnd:t,setDateTimeEnd:n}=e,r=(0,x.getSettings)(),s=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,j.jsx)(d.DateTimePicker,{currentDate:t,onChange:e=>E(e,n),is12Hour:s})},I=e=>{const{dateTimeStart:t,setDateTimeStart:n}=e;return(0,c.useEffect)((()=>{n(i().tz(function(){let e=f("eventDetails.dateTime.datetime_start");return e=""!==e?i().tz(e,S()).format(D):w,g("eventDetails.dateTime.datetime_start",e),e}(),S()).format(D)),l({setDateTimeStart:t}),T()})),(0,j.jsx)(d.PanelRow,{children:(0,j.jsxs)(d.Flex,{direction:"column",gap:"0",children:[(0,j.jsx)(d.FlexItem,{children:(0,j.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,a.__)("Start","gatherpress")})}),(0,j.jsx)(d.FlexItem,{children:(0,j.jsx)(d.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,j.jsx)(d.Button,{id:"gatherpress-datetime-start",onClick:n,"aria-expanded":e,isLink:!0,children:(0,j.jsx)(M,{dateTimeStart:t})}),renderContent:()=>(0,j.jsx)(F,{dateTimeStart:t,setDateTimeStart:n})})})]})})},H=e=>{const{dateTimeEnd:t,setDateTimeEnd:n}=e;return(0,c.useEffect)((()=>{n(i().tz(function(){let e=f("eventDetails.dateTime.datetime_end");return e=""!==e?i().tz(e,S()).format(D):z,g("eventDetails.dateTime.datetime_end",e),e}(),S()).format(D)),l({setDateTimeEnd:t}),T()})),(0,j.jsx)(d.PanelRow,{children:(0,j.jsxs)(d.Flex,{direction:"column",gap:"0",children:[(0,j.jsx)(d.FlexItem,{children:(0,j.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,a.__)("End","gatherpress")})}),(0,j.jsx)(d.FlexItem,{children:(0,j.jsx)(d.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,j.jsx)(d.Button,{id:"gatherpress-datetime-end",onClick:n,"aria-expanded":e,isLink:!0,children:(0,j.jsx)(Y,{dateTimeEnd:t})}),renderContent:()=>(0,j.jsx)($,{dateTimeEnd:t,setDateTimeEnd:n})})})]})})},G=e=>{const{timezone:t,setTimezone:n}=e,r=f("misc.timezoneChoices");return(0,c.useEffect)((()=>{n(f("eventDetails.dateTime.timezone"))}),[n]),(0,c.useEffect)((()=>{l({setTimezone:f("eventDetails.dateTime.timezone")})})),(0,j.jsx)(d.PanelRow,{children:(0,j.jsx)(d.SelectControl,{label:(0,a.__)("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 s=e.replace(t,"$3");return""===s&&(s=":00"),s=s.replace(".25",":15").replace(".5",":30").replace(".75",":45"),n+r+s}return e}(e),n(e),g("eventDetails.dateTime.timezone",e),h()},children:Object.keys(r).map((e=>(0,j.jsx)("optgroup",{label:e,children:Object.keys(r[e]).map((t=>(0,j.jsx)("option",{value:t,children:r[e][t]},t)))},e)))})})},N=()=>{const[e,t]=(0,c.useState)(),[n,r]=(0,c.useState)(),[s,i]=(0,c.useState)();return(0,m.subscribe)(P),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h3",{children:(0,a.__)("Date & time","gatherpress")}),(0,j.jsx)(I,{dateTimeStart:e,setDateTimeStart:t}),(0,j.jsx)(H,{dateTimeEnd:n,setDateTimeEnd:r}),(0,j.jsx)(G,{timezone:s,setTimezone:i})]})},B=(e,t,n)=>{const r=k(f("settings.dateFormat")),s=k(f("settings.timeFormat")),o=f("settings.showTimezone")?"z":"",d=r+" "+s,c=S(n);let l=r+" "+s+" "+o;return i().tz(e,c).format(r)===i().tz(t,c).format(r)&&(l=s+" "+o),(0,a.sprintf)(/* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ /* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ -(0,a.__)("%1$s to %2$s %3$s","gatherpress"),i().tz(e,c).format(d),i().tz(t,c).format(l),(m=S(m=c),(0,a.__)("GMT","gatherpress")!==m?"":function(e=""){return e.replace(":","")}(f("eventDetails.dateTime.timezone"))));var m},L=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/event-date","version":"1.0.1","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)(L,{edit:()=>{const e=(0,o.useBlockProps)(),[t,n]=(0,c.useState)(w),[r,s]=(0,c.useState)(z),[i,a]=(0,c.useState)(S());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:s,setDateTimeStart:n,setTimezone:a}),(0,j.jsx)("div",{...e,children:(0,j.jsx)(C,{children:(0,j.jsxs)(d.Flex,{justify:"normal",align:"center",gap:"4",children:[(0,j.jsx)(d.FlexItem,{display:"flex",className:"gatherpress-event-date__icon",children:(0,j.jsx)(d.Icon,{icon:"clock"})}),(0,j.jsx)(d.FlexItem,{children:B(t,r,i)}),"string"==typeof(0,m.select)("core/editor")?.getCurrentPostType()&&(0,j.jsx)(o.InspectorControls,{children:(0,j.jsx)(d.PanelBody,{children:(0,j.jsx)(N,{})})})]})})})},save:()=>null})}},n={};function r(e){var s=n[e];if(void 0!==s)return s.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,n,s,i)=>{if(!n){var a=1/0;for(l=0;l=i)&&Object.keys(r.O).every((e=>r.O[e](n[d])))?n.splice(d--,1):(o=!1,i0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[n,s,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={532:0,4:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var s,i,[a,o,d]=n,c=0;if(a.some((t=>0!==e[t]))){for(s in o)r.o(o,s)&&(r.m[s]=o[s]);if(d)var l=d(r)}for(t&&t(n);cr(110)));s=r.O(s)})(); \ No newline at end of file +(()=>{"use strict";var e,t={6776:(e,t,r)=>{const n=window.wp.blocks,a=window.moment;var i=r.n(a);function s(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;te&&e[t]),GatherPress)}function g(e,t){if("object"!=typeof GatherPress)return;const r=e.split("."),n=r.pop();r.reduce(((e,t)=>{var r;return null!==(r=e[t])&&void 0!==r?r:e[t]={}}),GatherPress)[n]=t}const f=window.wp.date,T=window.ReactJSXRuntime,x="YYYY-MM-DDTHH:mm:ss",v="YYYY-MM-DD HH:mm:ss",_=i().tz(z()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(x),D=i().tz(_,z()).add(2,"hours").format(x);function j(){return b(h("settings.dateFormat"))+" "+b(h("settings.timeFormat"))}function z(e=h("eventDetails.dateTime.timezone")){return i().tz.zone(e)?e:(0,d.__)("GMT","gatherpress")}function w(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,r=e.replace(t,"$1");return r!==e?"UTC"+r+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function S(e,t=null){!function(e){const t=i().tz(h("eventDetails.dateTime.datetime_end"),z()).valueOf(),r=i().tz(e,z()).valueOf();r>=t&&y(i().tz(r,z()).add(2,"hours").format(x))}(e),g("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),u()}function y(e,t=null){!function(e){const t=i().tz(h("eventDetails.dateTime.datetime_start"),z()).valueOf(),r=i().tz(e,z()).valueOf();r<=t&&S(i().tz(r,z()).subtract(2,"hours").format(x))}(e),g("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),u()}function b(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,r,n)=>{const a=n[r-1];return e in t&&"\\"!==a?t[e]:e})).join("")}const E=e=>{const{dateTimeStart:t}=e;return i().tz(t,z()).format(j())},O=e=>{const{dateTimeEnd:t}=e;return i().tz(t,z()).format(j())},k=e=>{const{dateTimeStart:t,setDateTimeStart:r}=e,n=(0,f.getSettings)(),a=/a(?!\\)/i.test(n.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,T.jsx)(m.DateTimePicker,{currentDate:t,onChange:e=>{S(e,r)},is12Hour:a})},C=e=>{const{dateTimeEnd:t,setDateTimeEnd:r}=e,n=(0,f.getSettings)(),a=/a(?!\\)/i.test(n.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,T.jsx)(m.DateTimePicker,{currentDate:t,onChange:e=>y(e,r),is12Hour:a})};function P(){const e="gatherpress_event_past",t=(0,c.dispatch)("core/notices");t.removeNotice(e),function(){const e=i().tz(h("eventDetails.dateTime.datetime_end"),z());return"gatherpress_event"===(0,c.select)("core/editor")?.getCurrentPostType()&&i().tz(z()).valueOf()>e.valueOf()}()&&t.createNotice("warning",(0,d.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const Y=()=>{const{dateTimeStart:e}=(0,c.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart()})),[]),{setDateTimeStart:t}=(0,c.useDispatch)("gatherpress/datetime");return(0,p.useEffect)((()=>{t(i().tz(function(){let e=h("eventDetails.dateTime.datetime_start");return e=""!==e?i().tz(e,z()).format(x):_,g("eventDetails.dateTime.datetime_start",e),e}(),z()).format(x)),P()})),(0,T.jsx)(m.PanelRow,{children:(0,T.jsxs)(m.Flex,{direction:"row",gap:"0",children:[(0,T.jsx)(m.FlexItem,{children:(0,T.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,d.__)("Start","gatherpress")})}),(0,T.jsx)(m.FlexItem,{children:(0,T.jsx)(m.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:r})=>(0,T.jsx)(m.Button,{id:"gatherpress-datetime-start",onClick:r,"aria-expanded":t,isLink:!0,children:(0,T.jsx)(E,{dateTimeStart:e})}),renderContent:()=>(0,T.jsx)(k,{dateTimeStart:e,setDateTimeStart:t})})})]})})},F=()=>{const{dateTimeEnd:e}=(0,c.useSelect)((e=>({dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd()})),[]),{setDateTimeEnd:t}=(0,c.useDispatch)("gatherpress/datetime");return(0,p.useEffect)((()=>{t(i().tz(function(){let e=h("eventDetails.dateTime.datetime_end");return e=""!==e?i().tz(e,z()).format(x):D,g("eventDetails.dateTime.datetime_end",e),e}(),z()).format(x)),P()})),(0,T.jsx)(m.PanelRow,{children:(0,T.jsxs)(m.Flex,{direction:"row",gap:"0",children:[(0,T.jsx)(m.FlexItem,{children:(0,T.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,d.__)("End","gatherpress")})}),(0,T.jsx)(m.FlexItem,{children:(0,T.jsx)(m.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:r})=>(0,T.jsx)(m.Button,{id:"gatherpress-datetime-end",onClick:r,"aria-expanded":t,isLink:!0,children:(0,T.jsx)(O,{dateTimeEnd:e})}),renderContent:()=>(0,T.jsx)(C,{dateTimeEnd:e,setDateTimeEnd:t})})})]})})},M=()=>{const{timezone:e}=(0,c.useSelect)((e=>({timezone:e("gatherpress/datetime").getTimezone()})),[]),{setTimezone:t}=(0,c.useDispatch)("gatherpress/datetime"),r=h("misc.timezoneChoices");return(0,p.useEffect)((()=>{t(h("eventDetails.dateTime.timezone"))}),[t]),(0,T.jsx)(m.PanelRow,{children:(0,T.jsx)(m.SelectControl,{label:(0,d.__)("Time Zone","gatherpress"),value:w(e),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,r=e.replace(t,"$1");if(r!==e){const n=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"),r+n+a}return e}(e),t(e),u()},children:Object.keys(r).map((e=>(0,T.jsx)("optgroup",{label:e,children:Object.keys(r[e]).map((t=>(0,T.jsx)("option",{value:t,children:r[e][t]},t)))},e)))})})},$=()=>{const e=(0,c.useDispatch)("core/editor").editPost;let t=(0,c.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_datetime));try{t=t?JSON.parse(t):{}}catch(e){t={}}const{dateTimeStart:r,dateTimeEnd:n,timezone:a}=(0,c.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),timezone:e("gatherpress/datetime").getTimezone()})),[]);return(0,p.useEffect)((()=>{const s=JSON.stringify({...t,dateTimeStart:i().tz(r,a).format(v),dateTimeEnd:i().tz(n,a).format(v),timezone:a});e({meta:{gatherpress_datetime:s}})}),[r,n,a,t,e]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("h3",{children:(0,d.__)("Date & time","gatherpress")}),(0,T.jsx)(Y,{}),(0,T.jsx)(F,{}),(0,T.jsx)(M,{})]})},H=(e,t,r)=>{const n=b(h("settings.dateFormat")),a=b(h("settings.timeFormat")),s=h("settings.showTimezone")?"z":"",o=n+" "+a,l=z(r);let m=n+" "+a+" "+s;return i().tz(e,l).format(n)===i().tz(t,l).format(n)&&(m=a+" "+s),(0,d.sprintf)(/* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ /* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ +(0,d.__)("%1$s to %2$s %3$s","gatherpress"),i().tz(e,l).format(o),i().tz(t,l).format(m),function(e){return e=z(e),(0,d.__)("GMT","gatherpress")!==e?"":function(e=""){return e.replace(":","")}(h("eventDetails.dateTime.timezone"))}(l))},A=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"gatherpress/event-date","version":"2.0.0","title":"Event Date","category":"gatherpress","icon":"clock","example":{"viewportWidth":350},"description":"Displays the date and time for an event.","attributes":{"eventEnd":{"type":"string"},"eventStart":{"type":"string"},"textAlign":{"type":"string"}},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","render":"file:./render.php"}');(0,n.registerBlockType)(A,{edit:({attributes:{textAlign:e},setAttributes:t})=>{const r=(0,l.useBlockProps)({className:o({[`has-text-align-${e}`]:e})}),{dateTimeStart:n,dateTimeEnd:a,timezone:i}=(0,c.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),timezone:e("gatherpress/datetime").getTimezone()})),[]);return(0,T.jsxs)("div",{...r,children:[(0,T.jsx)(l.BlockControls,{children:(0,T.jsx)(l.AlignmentToolbar,{value:e,onChange:e=>t({textAlign:e})})}),H(n,a,i),"string"==typeof(0,c.select)("core/editor")?.getCurrentPostType()&&(0,T.jsx)(l.InspectorControls,{children:(0,T.jsx)(m.PanelBody,{children:(0,T.jsx)($,{})})})]})},save:()=>null})}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,e=[],n.O=(t,r,a,i)=>{if(!r){var s=1/0;for(m=0;m=i)&&Object.keys(n.O).every((e=>n.O[e](r[d])))?r.splice(d--,1):(o=!1,i0&&e[m-1][2]>i;m--)e[m]=e[m-1];e[m]=[r,a,i]},n.n=e=>{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),(()=>{var e={532:0,4:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var a,i,[s,o,d]=r,l=0;if(s.some((t=>0!==e[t]))){for(a in o)n.o(o,a)&&(n.m[a]=o[a]);if(d)var m=d(n)}for(t&&t(r);ln(6776)));a=n.O(a)})(); \ No newline at end of file diff --git a/build/blocks/event-date/render.php b/build/blocks/event-date/render.php index 7a7fe3979..7b01ff8ca 100644 --- a/build/blocks/event-date/render.php +++ b/build/blocks/event-date/render.php @@ -15,14 +15,5 @@ $gatherpress_event = new Event( get_the_ID() ); ?>
> -
-
-
-
-
-
- get_display_datetime() ); ?> -
-
-
+ get_display_datetime() ); ?>
diff --git a/build/blocks/event-date/style-index-rtl.css b/build/blocks/event-date/style-index-rtl.css index 1c5b2f552..21b123c2d 100644 --- a/build/blocks/event-date/style-index-rtl.css +++ b/build/blocks/event-date/style-index-rtl.css @@ -1 +1 @@ -.gatherpress-event-date__icon{align-items:flex-start;display:flex}.gatherpress-event-date__item{align-items:center;display:flex;gap:.75rem}.gatherpress-event-date__row{display:flex} +.wp-block-gatherpress-event-date{box-sizing:border-box} diff --git a/build/blocks/event-date/style-index.css b/build/blocks/event-date/style-index.css index 1c5b2f552..21b123c2d 100644 --- a/build/blocks/event-date/style-index.css +++ b/build/blocks/event-date/style-index.css @@ -1 +1 @@ -.gatherpress-event-date__icon{align-items:flex-start;display:flex}.gatherpress-event-date__item{align-items:center;display:flex;gap:.75rem}.gatherpress-event-date__row{display:flex} +.wp-block-gatherpress-event-date{box-sizing:border-box} diff --git a/build/blocks/venue/index.asset.php b/build/blocks/venue/index.asset.php index 9b09ce4c6..951a4a8bb 100644 --- a/build/blocks/venue/index.asset.php +++ b/build/blocks/venue/index.asset.php @@ -1 +1 @@ - array('moment', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => '088291f5cbf9db0e7b06'); + array('moment', 'react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => '9320cd28c40a1ca614e5'); diff --git a/build/blocks/venue/index.js b/build/blocks/venue/index.js index 4b00ba261..dada1f7bb 100644 --- a/build/blocks/venue/index.js +++ b/build/blocks/venue/index.js @@ -1,3 +1,3 @@ -(()=>{var e,t,n,r,o,i={6702:(e,t,n)=>{"use strict";const r=window.wp.blocks,o=window.wp.i18n,i=window.wp.blockEditor,l=window.wp.components,s=window.wp.data,a=window.wp.element,c=window.ReactJSXRuntime,u=e=>{const{zoom:t,type:n,className:r,location:o,height:i}=e,l={border:0,height:i,width:"100%"},s="https://maps.google.com/maps?"+new URLSearchParams({q:o,z:t||10,t:n||"m",output:"embed"}).toString();return(0,c.jsx)("iframe",{src:s,style:l,className:r,title:o})};function d(){return"string"==typeof(0,s.select)("core/editor")?.getCurrentPostType()}function p(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const f=e=>{const{zoom:t=10,className:r,location:i,height:l=300,latitude:s,longitude:u}=e,[d,f]=(0,a.useState)(null),h={height:l};return(0,a.useEffect)((()=>{(async()=>{const{default:e}=await n.e(481).then(n.t.bind(n,3481,23));await n.e(535).then(n.bind(n,1535)),await n.e(272).then(n.t.bind(n,1272,17)),await n.e(980).then(n.t.bind(n,8980,17)),f(e)})()}),[]),(0,a.useEffect)((()=>{if(!d||!s||!u)return;const e=d.map("map").setView([s,u],t);return d.Icon.Default.imagePath=p("urls.pluginUrl")+"build/images/",d.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:(0,o.sprintf)(/* translators: %s: Link to OpenStreetMap contributors. */ /* translators: %s: Link to OpenStreetMap contributors. */ +(()=>{var e,t,n,r,o,i={7701:(e,t,n)=>{"use strict";const r=window.wp.blocks,o=window.wp.i18n,i=window.wp.blockEditor,l=window.wp.components,s=window.wp.data,a=window.wp.element,c=window.ReactJSXRuntime,u=e=>{const{zoom:t,type:n,className:r,location:o,height:i}=e,l={border:0,height:i,width:"100%"},s="https://maps.google.com/maps?"+new URLSearchParams({q:o,z:t||10,t:n||"m",output:"embed"}).toString();return(0,c.jsx)("iframe",{src:s,style:l,className:r,title:o})};function d(){return"string"==typeof(0,s.select)("core/editor")?.getCurrentPostType()}function p(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const f=e=>{const{zoom:t=10,className:r,location:i,height:l=300,latitude:s,longitude:u}=e,[d,f]=(0,a.useState)(null),h={height:l};return(0,a.useEffect)((()=>{(async()=>{const{default:e}=await n.e(481).then(n.t.bind(n,3481,23));await n.e(535).then(n.bind(n,1535)),await n.e(272).then(n.t.bind(n,1272,17)),await n.e(980).then(n.t.bind(n,8980,17)),f(e)})()}),[]),(0,a.useEffect)((()=>{if(!d||!s||!u)return;const e=d.map("map").setView([s,u],t);return d.Icon.Default.imagePath=p("urls.pluginUrl")+"build/images/",d.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:(0,o.sprintf)(/* translators: %s: Link to OpenStreetMap contributors. */ /* translators: %s: Link to OpenStreetMap contributors. */ (0,o.__)("© %s contributors","gatherpress"),'OpenStreetMap')}).addTo(e),d.marker([s,u]).addTo(e).bindPopup(i),()=>{e.remove()}}),[d,s,i,u,t]),d&&s&&u?(0,c.jsx)("div",{className:r,id:"map",style:h}):null},h=e=>{const t=(0,s.select)("core")?.canUser("create","posts"),n=Boolean((0,s.select)("core/edit-post")),{zoom:r,type:o,className:i,latitude:l,longitude:a}=e;let{location:d,height:h}=e;h||(h=300),!t||n||d||(d="660 4th Street #119 San Francisco CA 94107, USA");const m=p("settings.mapPlatform");return d&&m?"google"===m?(0,c.jsx)(u,{location:d,className:i,zoom:r,type:o,height:h}):"osm"===m?(0,c.jsx)(f,{location:d,latitude:l,longitude:a,className:i,zoom:r,height:h}):(0,c.jsx)(c.Fragment,{}):(0,c.jsx)(c.Fragment,{})};var m=n(1609);const g=Math.min,v=Math.max,y=Math.round,b=Math.floor,w=e=>({x:e,y:e}),x={left:"right",right:"left",bottom:"top",top:"bottom"},_={start:"end",end:"start"};function E(e,t,n){return v(e,g(t,n))}function S(e,t){return"function"==typeof e?e(t):e}function T(e){return e.split("-")[0]}function k(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function O(e){return"y"===e?"height":"width"}function C(e){return["top","bottom"].includes(T(e))?"y":"x"}function j(e){return A(C(e))}function N(e){return e.replace(/start|end/g,(e=>_[e]))}function P(e){return e.replace(/left|right|bottom|top/g,(e=>x[e]))}function R(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 L(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function I(e,t,n){let{reference:r,floating:o}=e;const i=C(t),l=j(t),s=O(l),a=T(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(a){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(k(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function D(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=S(t,e),h=R(f),m=s[p?"floating"===d?"reference":"floating":d],g=L(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:a})),v="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=L(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:a}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function M(e){return B(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function z(e){var t;return null==(t=(B(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function B(e){return e instanceof Node||e instanceof F(e).Node}function H(e){return e instanceof Element||e instanceof F(e).Element}function V(e){return e instanceof HTMLElement||e instanceof F(e).HTMLElement}function W(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof F(e).ShadowRoot)}function q(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $(e){return["table","td","th"].includes(M(e))}function U(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function X(e){const t=G(),n=H(e)?K(e):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 G(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Y(e){return["html","body","#document"].includes(M(e))}function K(e){return F(e).getComputedStyle(e)}function Z(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if("html"===M(e))return e;const t=e.assignedSlot||e.parentNode||W(e)&&e.host||z(e);return W(t)?t.host:t}function Q(e){const t=J(e);return Y(t)?e.ownerDocument?e.ownerDocument.body:e.body:V(t)&&q(t)?t:Q(t)}function ee(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Q(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=F(o);return i?t.concat(l,l.visualViewport||[],q(o)?o:[],l.frameElement&&n?ee(l.frameElement):[]):t.concat(o,ee(o,[],n))}function te(e){const t=K(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=V(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=y(n)!==i||y(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function ne(e){return H(e)?e:e.contextElement}function re(e){const t=ne(e);if(!V(t))return w(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=te(t);let l=(i?y(n.width):n.width)/r,s=(i?y(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const oe=w(0);function ie(e){const t=F(e);return G()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:oe}function le(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ne(e);let l=w(1);t&&(r?H(r)&&(l=re(r)):l=re(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==F(e))&&t}(i,n,r)?ie(i):w(0);let a=(o.left+s.x)/l.x,c=(o.top+s.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=F(i),t=r&&H(r)?F(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=re(o),t=o.getBoundingClientRect(),r=K(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=l,n=F(o),o=n.frameElement}}return L({width:u,height:d,x:a,y:c})}function se(e){return le(z(e)).left+Z(e).scrollLeft}function ae(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=F(e),r=z(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const e=G();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:s,y:a}}(e,n);else if("document"===t)r=function(e){const t=z(e),n=Z(e),r=e.ownerDocument.body,o=v(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=v(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+se(e);const s=-n.scrollTop;return"rtl"===K(r).direction&&(l+=v(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}(z(e));else if(H(t))r=function(e,t){const n=le(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=V(e)?re(e):w(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=ie(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return L(r)}function ce(e,t){const n=J(e);return!(n===t||!H(n)||Y(n))&&("fixed"===K(n).position||ce(n,t))}function ue(e,t,n){const r=V(t),o=z(t),i="fixed"===n,l=le(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=w(0);if(r||!r&&!i)if(("body"!==M(t)||q(o))&&(s=Z(t)),r){const e=le(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=se(o));return{x:l.left+s.scrollLeft-a.x,y:l.top+s.scrollTop-a.y,width:l.width,height:l.height}}function de(e){return"static"===K(e).position}function pe(e,t){return V(e)&&"fixed"!==K(e).position?t?t(e):e.offsetParent:null}function fe(e,t){const n=F(e);if(U(e))return n;if(!V(e)){let t=J(e);for(;t&&!Y(t);){if(H(t)&&!de(t))return t;t=J(t)}return n}let r=pe(e,t);for(;r&&$(r)&&de(r);)r=pe(r,t);return r&&Y(r)&&de(r)&&!X(r)?n:r||function(e){let t=J(e);for(;V(t)&&!Y(t);){if(X(t))return t;if(U(t))return null;t=J(t)}return null}(e)||n}const he={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=z(r),s=!!t&&U(t.floating);if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},c=w(1);const u=w(0),d=V(r);if((d||!d&&!i)&&(("body"!==M(r)||q(l))&&(a=Z(r)),V(r))){const e=le(r);c=re(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:z,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?U(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=ee(e,[],!1).filter((e=>H(e)&&"body"!==M(e))),o=null;const i="fixed"===K(e).position;let l=i?J(e):e;for(;H(l)&&!Y(l);){const t=K(l),n=X(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||q(l)&&!n&&ce(e,l))?r=r.filter((e=>e!==l)):o=t,l=J(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],s=i.reduce(((e,n)=>{const r=ae(t,n,o);return e.top=v(r.top,e.top),e.right=g(r.right,e.right),e.bottom=g(r.bottom,e.bottom),e.left=v(r.left,e.left),e}),ae(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:fe,getElementRects:async function(e){const t=this.getOffsetParent||fe,n=this.getDimensions,r=await n(e.floating);return{reference:ue(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=te(e);return{width:t,height:n}},getScale:re,isElement:H,isRTL:function(e){return"rtl"===K(e).direction}};const me=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:s}=t,a=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=T(n),s=k(n),a="y"===C(n),c=["left","top"].includes(l)?-1:1,u=i&&a?-1:1,d=S(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},ge=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:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=S(e,t),c={x:n,y:r},u=await D(t,a),d=C(T(o)),p=A(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=E(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";h=E(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},ve=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:s,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=S(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=T(o),y=C(s),b=T(s)===s,w=await(null==a.isRTL?void 0:a.isRTL(c.floating)),x=p||(b||!m?[P(s)]:function(e){const t=P(e);return[N(e),t,N(t)]}(s)),_="none"!==h;!p&&_&&x.push(...function(e,t,n,r){const o=k(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[]}}(T(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(N)))),i}(s,m,h,w));const E=[s,...x],A=await D(t,g),R=[];let L=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&R.push(A[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=k(e),o=j(e),i=O(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=P(l)),[l,P(l)]}(o,l,w);R.push(A[e[0]],A[e[1]])}if(L=[...L,{placement:o,overflows:R}],!R.every((e=>e<=0))){var I,M;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(M=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=L.filter((e=>{if(_){const t=C(e.placement);return t===y||"y"===t}return!0})).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:F[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},ye=(e,t,n)=>{const r=new Map,o={platform:he,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=I(c,r,a),p=r,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=l;return n?(a.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:s}=e,{element:a,padding:u=0}=S(c,e)||{};if(null==a)return{};const d=R(u),p={x:t,y:n},f=j(r),h=O(f),m=await i.getDimensions(a),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[f]-p[f]-o.floating[h],_=p[f]-o.reference[f],T=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let A=T?T[w]:0;A&&await(null==i.isElement?void 0:i.isElement(T))||(A=l.floating[w]||o.floating[h]);const C=x/2-_/2,N=A/2-m[h]/2-1,P=g(d[y],N),L=g(d[b],N),I=P,D=A-m[h]-L,M=A/2-m[h]/2+C,F=E(I,M,D),z=!s.arrow&&null!=k(r)&&M!==F&&o.reference[h]/2-(M{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 p=0;if(s){const e=`${s}`.match(/(\d+)px/);p=(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+p}px`},place:n}}))):ye(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},Ee=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Se=(e,t,n)=>{let r=null;const o=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))};return o.cancel=()=>{r&&(clearTimeout(r),r=null)},o},Te=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,ke=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>ke(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!Te(e)||!Te(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>ke(e[n],t[n])))},Ae=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}))},Oe=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Ae(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ce="undefined"!=typeof window?m.useLayoutEffect:m.useEffect,je=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Ne={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Pe=(0,m.createContext)({getTooltipData:()=>Ne});function Re(e="DEFAULT_TOOLTIP_ID"){return(0,m.useContext)(Pe).getTooltipData(e)}var Le={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"},Ie={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 De=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:l,place:s="top",offset:a=10,events:c=["hover"],openOnClick:u=!1,positionStrategy:d="absolute",middlewares:p,wrapper:f,delayShow:h=0,delayHide:y=0,float:w=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:j,style:N,position:P,afterShow:R,afterHide:L,content:I,contentWrapperRef:D,isOpen:M,defaultIsOpen:F=!1,setIsOpen:B,activeAnchor:H,setActiveAnchor:V,border:W,opacity:q,arrowColor:$,role:U="tooltip"})=>{var X;const G=(0,m.useRef)(null),Y=(0,m.useRef)(null),K=(0,m.useRef)(null),Z=(0,m.useRef)(null),J=(0,m.useRef)(null),[Q,te]=(0,m.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:s}),[re,oe]=(0,m.useState)(!1),[ie,se]=(0,m.useState)(!1),[ae,ce]=(0,m.useState)(null),ue=(0,m.useRef)(!1),de=(0,m.useRef)(null),{anchorRefs:pe,setActiveAnchor:fe}=Re(t),he=(0,m.useRef)(!1),[me,ge]=(0,m.useState)([]),ve=(0,m.useRef)(!1),ye=u||c.includes("click"),we=ye||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),xe=A?{...A}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!A&&ye&&Object.assign(xe,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ee=O?{...O}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!O&&ye&&Object.assign(Ee,{mouseleave:!1,blur:!1,mouseout:!1});const Te=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:we||!1};j&&(Object.assign(xe,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ee,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Te,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Ce((()=>(ve.current=!0,()=>{ve.current=!1})),[]);const Ae=e=>{ve.current&&(e&&se(!0),setTimeout((()=>{ve.current&&(null==B||B(e),void 0===M&&oe(e))}),10))};(0,m.useEffect)((()=>{if(void 0===M)return()=>null;M&&se(!0);const e=setTimeout((()=>{oe(M)}),10);return()=>{clearTimeout(e)}}),[M]),(0,m.useEffect)((()=>{if(re!==ue.current)if(je(J),ue.current=re,re)null==R||R();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();J.current=setTimeout((()=>{se(!1),ce(null),null==L||L()}),e+25)}}),[re]);const Ne=e=>{te((t=>ke(t,e)?t:e))},Pe=(e=h)=>{je(K),ie?Ae(!0):K.current=setTimeout((()=>{Ae(!0)}),e)},De=(e=y)=>{je(Z),Z.current=setTimeout((()=>{he.current||Ae(!1)}),e)},Me=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 V(null),void fe({current:null});h?Pe():Ae(!0),V(n),fe({current:n}),je(Z)},Fe=()=>{E?De(y||100):y?De():Ae(!1),je(K)},ze=({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})};_e({place:null!==(n=null==ae?void 0:ae.place)&&void 0!==n?n:s,offset:a,elementReference:r,tooltipReference:G.current,tooltipArrowReference:Y.current,strategy:d,middlewares:p,border:W}).then((e=>{Ne(e)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};ze(n),de.current=n},He=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...me].some((e=>null==e?void 0:e.contains(n)))||(Ae(!1),je(K)))},Ve=Se(Me,50,!0),We=Se(Fe,50,!0),qe=e=>{We.cancel(),Ve(e)},$e=()=>{Ve.cancel(),We()},Ue=(0,m.useCallback)((()=>{var e,t;const n=null!==(e=null==ae?void 0:ae.position)&&void 0!==e?e:P;n?ze(n):w?de.current&&ze(de.current):(null==H?void 0:H.isConnected)&&_e({place:null!==(t=null==ae?void 0:ae.place)&&void 0!==t?t:s,offset:a,elementReference:H,tooltipReference:G.current,tooltipArrowReference:Y.current,strategy:d,middlewares:p,border:W}).then((e=>{ve.current&&Ne(e)}))}),[re,H,I,N,s,null==ae?void 0:ae.place,a,d,P,null==ae?void 0:ae.position,w]);(0,m.useEffect)((()=>{var e,t;const n=new Set(pe);me.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&n.add({current:r});const o=()=>{Ae(!1)},l=Oe(H),s=Oe(G.current);Te.scroll&&(window.addEventListener("scroll",o),null==l||l.addEventListener("scroll",o),null==s||s.addEventListener("scroll",o));let a=null;Te.resize?window.addEventListener("resize",o):H&&G.current&&(a=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:a=!1}=r,c=ne(e),u=o||i?[...c?ee(c):[],...ee(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=z(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-b(u)+"px "+-b(o.clientWidth-(c+d))+"px "+-b(o.clientHeight-(u+p))+"px "+-b(c)+"px",threshold:v(0,g(1,a))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==a){if(!h)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;l&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!a&&h.observe(c),h.observe(t));let m=a?le(e):null;return a&&function t(){const r=le(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,a&&cancelAnimationFrame(p)}}(H,G.current,Ue,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Ae(!1)};Te.escape&&window.addEventListener("keydown",c),Te.clickOutsideAnchor&&window.addEventListener("click",He);const u=[],d=e=>{re&&(null==e?void 0:e.target)===H||Me(e)},p=e=>{re&&(null==e?void 0:e.target)===H&&Fe()},f=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(xe).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:qe}):h.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Ee).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:$e}):h.includes(e)&&u.push({event:e,listener:p}))})),w&&u.push({event:"pointermove",listener:Be});const m=()=>{he.current=!0},y=()=>{he.current=!1,Fe()};return E&&!we&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",m),null===(t=G.current)||void 0===t||t.addEventListener("mouseleave",y)),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;Te.scroll&&(window.removeEventListener("scroll",o),null==l||l.removeEventListener("scroll",o),null==s||s.removeEventListener("scroll",o)),Te.resize?window.removeEventListener("resize",o):null==a||a(),Te.clickOutsideAnchor&&window.removeEventListener("click",He),Te.escape&&window.removeEventListener("keydown",c),E&&!we&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",m),null===(t=G.current)||void 0===t||t.removeEventListener("mouseleave",y)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[H,Ue,ie,pe,me,A,O,C,ye,h,y]),(0,m.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);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):e.oldValue===t&&o.push(e.target)),"childList"===e.type){if(H){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,H))&&(se(!1),Ae(!1),V(null),je(K),je(Z),!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)&&ge((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{o.disconnect()}}),[t,l,null==ae?void 0:ae.anchorSelect,H]),(0,m.useEffect)((()=>{Ue()}),[Ue]),(0,m.useEffect)((()=>{if(!(null==D?void 0:D.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ue()))}));return e.observe(D.current),()=>{e.disconnect()}}),[I,null==D?void 0:D.current]),(0,m.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...me,t];H&&n.includes(H)||V(null!==(e=me[0])&&void 0!==e?e:t)}),[i,me,H]),(0,m.useEffect)((()=>(F&&Ae(!0),()=>{je(K),je(Z)})),[]),(0,m.useEffect)((()=>{var e;let n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ge(e)}catch(e){ge([])}}),[t,l,null==ae?void 0:ae.anchorSelect]),(0,m.useEffect)((()=>{K.current&&(je(K),Pe(h))}),[h]);const Xe=null!==(X=null==ae?void 0:ae.content)&&void 0!==X?X:I,Ge=re&&Object.keys(Q.tooltipStyles).length>0;return(0,m.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`)}ce(null!=e?e:null),(null==e?void 0:e.delay)?Pe(e.delay):Ae(!0)},close:e=>{(null==e?void 0:e.delay)?De(e.delay):Ae(!1)},activeAnchor:H,place:Q.place,isOpen:Boolean(ie&&!x&&Xe&&Ge)}))),ie&&!x&&Xe?m.createElement(f,{id:t,role:U,className:be("react-tooltip",Le.tooltip,Ie.tooltip,Ie[o],n,`react-tooltip__place-${Q.place}`,Le[Ge?"show":"closing"],Ge?"react-tooltip__show":"react-tooltip__closing","fixed"===d&&Le.fixed,E&&Le.clickable),onTransitionEnd:e=>{je(J),re||"opacity"!==e.propertyName||(se(!1),ce(null),null==L||L())},style:{...N,...Q.tooltipStyles,opacity:void 0!==q&&Ge?q:void 0},ref:G},Xe,m.createElement(f,{className:be("react-tooltip-arrow",Le.arrow,Ie.arrow,r,_&&Le.noArrow),style:{...Q.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:Y})):null},Me=({content:e})=>m.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Fe=m.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:o,render:i,className:l,classNameArrow:s,variant:a="dark",place:c="top",offset:u=10,wrapper:d="div",children:p=null,events:f=["hover"],openOnClick:h=!1,positionStrategy:g="absolute",middlewares:v,delayShow:y=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:j=!1,style:N,position:P,isOpen:R,defaultIsOpen:L=!1,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,role:V="tooltip"},W)=>{const[q,$]=(0,m.useState)(r),[U,X]=(0,m.useState)(o),[G,Y]=(0,m.useState)(c),[K,Z]=(0,m.useState)(a),[J,Q]=(0,m.useState)(u),[ee,te]=(0,m.useState)(y),[ne,re]=(0,m.useState)(b),[oe,ie]=(0,m.useState)(w),[le,se]=(0,m.useState)(x),[ae,ce]=(0,m.useState)(d),[ue,de]=(0,m.useState)(f),[pe,fe]=(0,m.useState)(g),[he,me]=(0,m.useState)(null),[ge,ve]=(0,m.useState)(null),ye=(0,m.useRef)(I),{anchorRefs:we,activeAnchor:xe}=Re(e),_e=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}),{}),Se=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:c)},content:e=>{$(null!=e?e:r)},html:e=>{X(null!=e?e:o)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{Q(null===e?u:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:d)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:f)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:g)},"delay-show":e=>{te(null===e?y:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{se(null===e?x:"true"===e)},"class-name":e=>{me(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,m.useEffect)((()=>{$(r)}),[r]),(0,m.useEffect)((()=>{X(o)}),[o]),(0,m.useEffect)((()=>{Y(c)}),[c]),(0,m.useEffect)((()=>{Z(a)}),[a]),(0,m.useEffect)((()=>{Q(u)}),[u]),(0,m.useEffect)((()=>{te(y)}),[y]),(0,m.useEffect)((()=>{re(b)}),[b]),(0,m.useEffect)((()=>{ie(w)}),[w]),(0,m.useEffect)((()=>{se(x)}),[x]),(0,m.useEffect)((()=>{fe(g)}),[g]),(0,m.useEffect)((()=>{ye.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,m.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,m.useEffect)((()=>{var r;const o=new Set(we);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),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 s=null!==(r=null!=ge?ge:l)&&void 0!==r?r:xe.current,a=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=_e(s);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(s){const e=_e(s);Se(e),a.observe(s,c)}return()=>{a.disconnect()}}),[we,xe,ge,t,n]),(0,m.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 Te=p;const ke=(0,m.useRef)(null);if(i){const e=i({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||q||null,activeAnchor:ge});Te=e?m.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},e):null}else q&&(Te=q);U&&(Te=m.createElement(Me,{content:U}));const Ae={forwardRef:W,id:e,anchorId:t,anchorSelect:n,className:be(l,he),classNameArrow:s,content:Te,contentWrapperRef:ke,place:G,variant:K,offset:J,wrapper:ae,events:ue,openOnClick:h,positionStrategy:pe,middlewares:v,delayShow:ee,delayHide:ne,float:oe,hidden:le,noArrow:_,clickable:E,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:j,style:N,position:P,isOpen:R,defaultIsOpen:L,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,activeAnchor:ge,setActiveAnchor:e=>ve(e),role:V};return m.createElement(De,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||xe({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||xe({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 ze=(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)}},Be=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}},He=({onlineEventLinkDefault:e=""})=>{const t=(0,o.__)("Online event","gatherpress"),[n,r]=(0,a.useState)(e);return Be({setOnlineEventLink:r},p("eventDetails.postId")),(0,c.jsxs)(l.Flex,{justify:"normal",gap:"3",children:[(0,c.jsx)(l.FlexItem,{display:"flex",children:(0,c.jsx)(l.Icon,{icon:"video-alt2"})}),(0,c.jsxs)(l.FlexItem,{children:[!n&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,o.__)("Link available for attendees only.","gatherpress"),children:t}),(0,c.jsx)(Fe,{id:"gatherpress-online-event-tooltip"})]}),n&&(0,c.jsx)("a",{href:n,rel:"noreferrer",target:"_blank",children:t})]})]})};var Ve=n(442);const We=Ve.default||Ve,qe=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,c.jsxs)(c.Fragment,{children:[(e||t)&&(0,c.jsxs)(l.Flex,{justify:"normal",align:"flex-start",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"location"})}),(0,c.jsxs)(l.FlexItem,{children:[e&&(0,c.jsx)("div",{className:"gatherpress-venue__name",children:(0,c.jsx)("strong",{children:We(e)})}),t&&(0,c.jsx)("div",{className:"gatherpress-venue__full-address",children:We(t)})]})]}),(n||r)&&(0,c.jsxs)(l.Flex,{justify:"normal",gap:"8",children:[n&&(0,c.jsx)(l.FlexItem,{children:(0,c.jsxs)(l.Flex,{justify:"normal",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"phone"})}),(0,c.jsx)(l.FlexItem,{children:(0,c.jsx)("div",{className:"gatherpress-venue__phone-number",children:n})})]})}),r&&(0,c.jsx)(l.FlexItem,{children:(0,c.jsxs)(l.Flex,{justify:"normal",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"admin-site-alt3"})}),(0,c.jsx)(l.FlexItem,{children:(0,c.jsx)("div",{className:"gatherpress-venue__website",children:(0,c.jsx)("a",{href:r,target:"_blank",rel:"noreferrer noopener",children:r})})})]})})]})]}),$e=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:o=!1,onlineEventLink:i=""})=>(0,c.jsxs)(c.Fragment,{children:[!o&&(0,c.jsx)(qe,{name:e,fullAddress:t,phoneNumber:n,website:r}),o&&(0,c.jsx)(He,{onlineEventLinkDefault:i})]}),Ue=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,c.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,c.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})};function Xe(){return"gatherpress_venue"===(0,s.select)("core/editor")?.getCurrentPostType()}const Ge=()=>{const[e,t]=(0,a.useState)(""),[n,r]=(0,a.useState)(""),[i,u]=(0,a.useState)(""),[d,p]=(0,a.useState)(""),[f,h]=(0,a.useState)(!1),[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),x=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:_}=(0,s.useDispatch)("core/editor"),E=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),S=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",E))),T=S?.slug.replace(/^_/,""),[k,A]=(0,a.useState)(""),O=E+":"+k,C=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:k})));(0,a.useEffect)((()=>{var e,n,i,l,s,a;let c={};if(k&&Array.isArray(C)){var d;const e=null!==(d=C[0]?.meta?.gatherpress_venue_information)&&void 0!==d?d:"{}";var f;e&&(c=JSON.parse(e),c.name=null!==(f=C[0]?.title.rendered)&&void 0!==f?f:"")}const h=null!==(e=c?.name)&&void 0!==e?e:(0,o.__)("No venue selected.","gatherpress"),m=null!==(n=c?.fullAddress)&&void 0!==n?n:"",v=null!==(i=c?.phoneNumber)&&void 0!==i?i:"",b=null!==(l=c?.website)&&void 0!==l?l:"",x=null!==(s=c?.latitude)&&void 0!==s?s:"0",_=null!==(a=c?.longitude)&&void 0!==a?a:"0";T&&A(T),w(O?String(O):""),t(h),r(m),u(v),p(b),g(x),y(_),ze({setName:h,setFullAddress:m,setPhoneNumber:v,setWebsite:b,setLatitude:x,setLongitude:_,setIsOnlineEventTerm:"online-event"===k})}),[k,C,T,O]);let j=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return j?(j=j.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),j.unshift({value:":",label:(0,o.__)("Choose a venue","gatherpress")})):j=[],(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.SelectControl,{label:(0,o.__)("Venue Selector","gatherpress"),value:b,onChange:e=>{(e=>{w(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];x({_gatherpress_venue:t}),A(e[1]),_()})(e)},options:j})})},Ye=window.wp.compose,Ke=()=>{var e,t,n;const r=(0,s.useDispatch)("core/editor").editPost,i=e=>{const t=JSON.stringify({...u,...e});r({meta:{gatherpress_venue_information:t}})};let u=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));u=u?JSON.parse(u):{};const[d,p]=(0,a.useState)(null!==(e=u.fullAddress)&&void 0!==e?e:""),[f,h]=(0,a.useState)(null!==(t=u.phoneNumber)&&void 0!==t?t:""),[m,g]=(0,a.useState)(null!==(n=u.website)&&void 0!==n?n:"");Be({setFullAddress:p,setPhoneNumber:h,setWebsite:g});const v=(0,a.useRef)(i),y=(0,a.useCallback)((()=>{let e=null,t=null;fetch(`https://nominatim.openstreetmap.org/search?q=${d}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,o.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ -(0,o.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((n=>{n.features.length>0&&(e=n.features[0].geometry.coordinates[1],t=n.features[0].geometry.coordinates[0]),v.current({latitude:e,longitude:t})}))}),[d]),b=(0,Ye.useDebounce)(y,300);return(0,a.useEffect)((()=>{v.current=i}),[i]),(0,a.useEffect)((()=>{b()}),[d,b]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.TextControl,{label:(0,o.__)("Full Address","gatherpress"),value:d,onChange:e=>{ze({setFullAddress:e}),i({fullAddress:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Phone Number","gatherpress"),value:f,onChange:e=>{ze({setPhoneNumber:e}),i({phoneNumber:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Website","gatherpress"),value:m,type:"url",onChange:e=>{ze({setWebsite:e}),i({website:e})}})]})},Ze=()=>(0,c.jsx)("section",{children:(0,c.jsx)(Ke,{})}),Je=()=>{const{editPost:e,unlockPostSaving:t}=(0,s.useDispatch)("core/editor"),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[r,i]=(0,a.useState)(n);return Be({setOnlineEventLink:i},p("eventDetails.postId")),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Online event link","gatherpress"),value:r,placeholder:(0,o.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{gatherpress_online_event_link:n}}),i(n),ze({setOnlineEventLink:n},p("eventDetails.postId")),t()})(n)}})},Qe=window.moment;var et=n.n(Qe);window.wp.apiFetch,window.wp.date;const tt="YYYY-MM-DDTHH:mm:ss",nt=et().tz(rt()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(tt);function rt(e=p("eventDetails.dateTime.timezone")){return et().tz.zone(e)?e:(0,o.__)("GMT","gatherpress")}et().tz(nt,rt()).add(2,"hours").format(tt);const ot=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/venue","version":"1.1.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","viewStyle":"file:./venue.css","render":"file:./render.php"}');(0,r.registerBlockType)(ot,{edit:({attributes:e,setAttributes:t,isSelected:n})=>{const{mapZoomLevel:r,mapType:u,mapHeight:f}=e,[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),[x,_]=(0,a.useState)(""),[E,S]=(0,a.useState)(""),[T,k]=(0,a.useState)(""),[A,O]=(0,a.useState)(!1),C=(0,i.useBlockProps)(),j=p("settings.mapPlatform"),N=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_online_event_link));let{mapShow:P}=e,R=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_venue_information));return R=R?JSON.parse(R):{},P&&v&&(P=!0),P&&!d()&&(P=!0),Be({setName:g,setFullAddress:y,setPhoneNumber:S,setWebsite:k,setIsOnlineEventTerm:O,setLatitude:w,setLongitude:_}),(0,a.useEffect)((()=>{Xe()&&(y(R.fullAddress),S(R.phoneNumber),k(R.website),w(R.latitude),_(R.longitude),g(v||E||T?"":(0,o.__)("Add venue information.","gatherpress"))),"gatherpress_event"!==(0,s.select)("core/editor")?.getCurrentPostType()&&d()||g(v||E||T?"":(0,o.__)("No venue selected.","gatherpress"))}),[R.fullAddress,R.phoneNumber,R.website,R.latitude,R.longitude,v,E,T,b,x]),(0,a.useEffect)((()=>{const e=new Event("resize");window.dispatchEvent(e)}),[f]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(i.InspectorControls,{children:[d()&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Venue settings","gatherpress"),initialOpen:!0,children:[(0,c.jsxs)(l.PanelRow,{children:[!Xe()&&(0,c.jsx)(Ge,{}),Xe()&&(0,c.jsx)(Ze,{})]}),A&&(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(Je,{})})]}),!A&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Map settings","gatherpress"),initialOpen:!0,children:[(0,c.jsx)(l.PanelRow,{children:(0,o.__)("Show map on venue","gatherpress")}),(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.ToggleControl,{label:P?(0,o.__)("Display the map","gatherpress"):(0,o.__)("Hide the map","gatherpress"),checked:P,onChange:e=>{t({mapShow:e})}})}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Zoom level","gatherpress"),beforeIcon:"search",value:r,onChange:e=>t({mapZoomLevel:e}),min:1,max:22}),"google"===j&&(0,c.jsx)(l.RadioControl,{label:(0,o.__)("Map type","gatherpress"),selected:u,options:[{label:(0,o.__)("Roadmap","gatherpress"),value:"m"},{label:(0,o.__)("Satellite","gatherpress"),value:"k"}],onChange:e=>{t({mapType:e})}}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Map height","gatherpress"),beforeIcon:"location",value:f,onChange:e=>t({mapHeight:e}),min:100,max:1e3})]})]}),(0,c.jsx)("div",{...C,children:(0,c.jsx)(Ue,{isSelected:n,children:(0,c.jsxs)("div",{className:"gatherpress-venue",children:[(0,c.jsx)($e,{name:m,fullAddress:v,phoneNumber:E,website:T,isOnlineEventTerm:A,onlineEventLink:N}),P&&!A&&(0,c.jsx)(h,{location:v,latitude:b,longitude:x,zoom:r,type:u,height:f})]})})})]})},save:()=>{}})},5413:(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},1141: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(5413),l=n(6957);o(n(6957),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=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=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,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=a,t.default=a},6957: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}(s);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 h=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=h;var m=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 g(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function y(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,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?E(e.children):[],o=new m(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(e.children):[];var l=new f(r);r.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){r=t?E(e.children):[];var s=new h(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return _(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}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return l.test(e)||null===(t=null==(g=h.querySelector(r))?void 0:g.parentNode)||void 0===t||t.removeChild(g),s.test(e)||null===(u=null==(g=h.querySelector(o))?void 0:g.parentNode)||void 0===u||u.removeChild(g),h.querySelectorAll(n);case r:case o:var m=a(e).querySelectorAll(p);return s.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(g=a(e,o).querySelector(o)).childNodes;var g}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,s=//i,a=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;a=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();a=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,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471: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.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)};var o=r(n(5496)),i=n(7731),l=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var s,a=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[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=a(p);if(f){var h=(0,r.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,h&&h.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};var r=n(4210),o=n(4958),i=["checked","value"],l=["input","select","textarea"],s={reset:!0,submit:!0};function a(e){return r.possibleStandardNames[e]}},308: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.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=n.library||s,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),r.push(c(v,g,m));continue}}if("text"!==g.type){var y=g,b={};a(y)?((0,l.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,i.default)(y.attribs,y.name));var w=void 0;switch(g.type){case"script":case"style":g.children[0]&&(b.dangerouslySetInnerHTML={__html:g.children[0].data});break;case"tag":"textarea"===g.name&&g.children[0]?b.defaultValue=g.children[0].data:g.children&&g.children.length&&(w=e(g.children,n));break;default:continue}h>1&&(b.key=m),r.push(c(p(g.name,b,w),g,m))}else{var x=!g.data.trim().length;if(x&&g.parent&&!(0,l.canTextBeChildOfNode)(g.parent))continue;if(n.trim&&x)continue;r.push(c(g.data,g,m))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),l=n(4958),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function a(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}},442: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,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)||a),t):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var l=r(n(308));t.domToReact=l.default;var s=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var a={lowerCaseAttributeNames:!1}},4958: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=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}};var o=n(1609),i=r(n(5229)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};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}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};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 h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=a.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();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 p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function _(){var e=h(),n=y(o);if(n){if(x(),!y(i))return v("property missing ':'");var r=y(l),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(s),a}}return b(),function(){var e,t=[];for(w(t);e=_();)!1!==e&&(t.push(e),w(t));return t}()}},4210:(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:s,SAME:a,possibleStandardNames:c}=n(6811),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===a?e[t]=t:n===s?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},6811:(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}},5229:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},8917:(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)-/,s=function(e,t){return t.toUpperCase()},a=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,a):e.replace(i,a)).replace(r,s))}},1133: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(9788));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}},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=o)&&Object.keys(s.O).every((e=>s.O[e](n[a])))?n.splice(a--,1):(l=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);s.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var l=2&r&&e;"object"==typeof l&&!~t.indexOf(l);l=n(l))Object.getOwnPropertyNames(l).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>e+".js",s.miniCssF=e=>e+".css",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="gatherpress:",s.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var l,a;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(f);var o=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),a&&document.head.appendChild(l)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e+"../../"})(),(()=>{if("undefined"!=typeof document){var e={908:0};s.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{535:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=s.miniCssF(e),o=s.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",s.nc&&(i.nonce=s.nc),i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var l=n&&n.type,s=n&&n.target&&n.target.href||t,a=new Error("Loading CSS chunk "+e+" failed.\n("+l+": "+s+")");a.name="ChunkLoadError",a.code="CSS_CHUNK_LOAD_FAILED",a.type=l,a.request=s,i.parentNode&&i.parentNode.removeChild(i),o(a)}},i.href=t,document.head.appendChild(i)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={908:0,812:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(812!=t){var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=s.p+s.u(t),l=new Error;s.l(i,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,r[1](l)}}),"chunk-"+t,t)}else e[t]=0},s.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,l,a]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in l)s.o(l,r)&&(s.m[r]=l[r]);if(a)var u=a(s)}for(t&&t(n);cs(6702)));a=s.O(a)})(); \ No newline at end of file +(0,o.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((n=>{n.features.length>0&&(e=n.features[0].geometry.coordinates[1],t=n.features[0].geometry.coordinates[0]),v.current({latitude:e,longitude:t})}))}),[d]),b=(0,Ye.useDebounce)(y,300);return(0,a.useEffect)((()=>{v.current=i}),[i]),(0,a.useEffect)((()=>{b()}),[d,b]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.TextControl,{label:(0,o.__)("Full Address","gatherpress"),value:d,onChange:e=>{ze({setFullAddress:e}),i({fullAddress:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Phone Number","gatherpress"),value:f,onChange:e=>{ze({setPhoneNumber:e}),i({phoneNumber:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Website","gatherpress"),value:m,type:"url",onChange:e=>{ze({setWebsite:e}),i({website:e})}})]})},Ze=()=>(0,c.jsx)("section",{children:(0,c.jsx)(Ke,{})}),Je=()=>{const{editPost:e,unlockPostSaving:t}=(0,s.useDispatch)("core/editor"),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[r,i]=(0,a.useState)(n);return Be({setOnlineEventLink:i},p("eventDetails.postId")),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Online event link","gatherpress"),value:r,placeholder:(0,o.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{gatherpress_online_event_link:n}}),i(n),ze({setOnlineEventLink:n},p("eventDetails.postId")),t()})(n)}})},Qe=window.moment;var et=n.n(Qe);window.wp.date;const tt="YYYY-MM-DDTHH:mm:ss",nt=et().tz(rt()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(tt);function rt(e=p("eventDetails.dateTime.timezone")){return et().tz.zone(e)?e:(0,o.__)("GMT","gatherpress")}et().tz(nt,rt()).add(2,"hours").format(tt);const ot=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/venue","version":"1.1.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","viewStyle":"file:./venue.css","render":"file:./render.php"}');(0,r.registerBlockType)(ot,{edit:({attributes:e,setAttributes:t,isSelected:n})=>{const{mapZoomLevel:r,mapType:u,mapHeight:f}=e,[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),[x,_]=(0,a.useState)(""),[E,S]=(0,a.useState)(""),[T,k]=(0,a.useState)(""),[A,O]=(0,a.useState)(!1),C=(0,i.useBlockProps)(),j=p("settings.mapPlatform"),N=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_online_event_link));let{mapShow:P}=e,R=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_venue_information));return R=R?JSON.parse(R):{},P&&v&&(P=!0),P&&!d()&&(P=!0),Be({setName:g,setFullAddress:y,setPhoneNumber:S,setWebsite:k,setIsOnlineEventTerm:O,setLatitude:w,setLongitude:_}),(0,a.useEffect)((()=>{Xe()&&(y(R.fullAddress),S(R.phoneNumber),k(R.website),w(R.latitude),_(R.longitude),g(v||E||T?"":(0,o.__)("Add venue information.","gatherpress"))),"gatherpress_event"!==(0,s.select)("core/editor")?.getCurrentPostType()&&d()||g(v||E||T?"":(0,o.__)("No venue selected.","gatherpress"))}),[R.fullAddress,R.phoneNumber,R.website,R.latitude,R.longitude,v,E,T,b,x]),(0,a.useEffect)((()=>{const e=new Event("resize");window.dispatchEvent(e)}),[f]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(i.InspectorControls,{children:[d()&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Venue settings","gatherpress"),initialOpen:!0,children:[(0,c.jsxs)(l.PanelRow,{children:[!Xe()&&(0,c.jsx)(Ge,{}),Xe()&&(0,c.jsx)(Ze,{})]}),A&&(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(Je,{})})]}),!A&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Map settings","gatherpress"),initialOpen:!0,children:[(0,c.jsx)(l.PanelRow,{children:(0,o.__)("Show map on venue","gatherpress")}),(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.ToggleControl,{label:P?(0,o.__)("Display the map","gatherpress"):(0,o.__)("Hide the map","gatherpress"),checked:P,onChange:e=>{t({mapShow:e})}})}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Zoom level","gatherpress"),beforeIcon:"search",value:r,onChange:e=>t({mapZoomLevel:e}),min:1,max:22}),"google"===j&&(0,c.jsx)(l.RadioControl,{label:(0,o.__)("Map type","gatherpress"),selected:u,options:[{label:(0,o.__)("Roadmap","gatherpress"),value:"m"},{label:(0,o.__)("Satellite","gatherpress"),value:"k"}],onChange:e=>{t({mapType:e})}}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Map height","gatherpress"),beforeIcon:"location",value:f,onChange:e=>t({mapHeight:e}),min:100,max:1e3})]})]}),(0,c.jsx)("div",{...C,children:(0,c.jsx)(Ue,{isSelected:n,children:(0,c.jsxs)("div",{className:"gatherpress-venue",children:[(0,c.jsx)($e,{name:m,fullAddress:v,phoneNumber:E,website:T,isOnlineEventTerm:A,onlineEventLink:N}),P&&!A&&(0,c.jsx)(h,{location:v,latitude:b,longitude:x,zoom:r,type:u,height:f})]})})})]})},save:()=>{}})},5413:(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},1141: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(5413),l=n(6957);o(n(6957),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=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=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,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=a,t.default=a},6957: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}(s);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 h=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=h;var m=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 g(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function y(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,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?E(e.children):[],o=new m(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(e.children):[];var l=new f(r);r.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){r=t?E(e.children):[];var s=new h(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return _(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}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return l.test(e)||null===(t=null==(g=h.querySelector(r))?void 0:g.parentNode)||void 0===t||t.removeChild(g),s.test(e)||null===(u=null==(g=h.querySelector(o))?void 0:g.parentNode)||void 0===u||u.removeChild(g),h.querySelectorAll(n);case r:case o:var m=a(e).querySelectorAll(p);return s.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(g=a(e,o).querySelector(o)).childNodes;var g}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,s=//i,a=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;a=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();a=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,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471: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.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)};var o=r(n(5496)),i=n(7731),l=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var s,a=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[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=a(p);if(f){var h=(0,r.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,h&&h.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};var r=n(4210),o=n(4958),i=["checked","value"],l=["input","select","textarea"],s={reset:!0,submit:!0};function a(e){return r.possibleStandardNames[e]}},308: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.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=n.library||s,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),r.push(c(v,g,m));continue}}if("text"!==g.type){var y=g,b={};a(y)?((0,l.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,i.default)(y.attribs,y.name));var w=void 0;switch(g.type){case"script":case"style":g.children[0]&&(b.dangerouslySetInnerHTML={__html:g.children[0].data});break;case"tag":"textarea"===g.name&&g.children[0]?b.defaultValue=g.children[0].data:g.children&&g.children.length&&(w=e(g.children,n));break;default:continue}h>1&&(b.key=m),r.push(c(p(g.name,b,w),g,m))}else{var x=!g.data.trim().length;if(x&&g.parent&&!(0,l.canTextBeChildOfNode)(g.parent))continue;if(n.trim&&x)continue;r.push(c(g.data,g,m))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),l=n(4958),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function a(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}},442: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,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)||a),t):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var l=r(n(308));t.domToReact=l.default;var s=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var a={lowerCaseAttributeNames:!1}},4958: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=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}};var o=n(1609),i=r(n(5229)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};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}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};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 h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=a.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();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 p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function _(){var e=h(),n=y(o);if(n){if(x(),!y(i))return v("property missing ':'");var r=y(l),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(s),a}}return b(),function(){var e,t=[];for(w(t);e=_();)!1!==e&&(t.push(e),w(t));return t}()}},4210:(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:s,SAME:a,possibleStandardNames:c}=n(6811),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===a?e[t]=t:n===s?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},6811:(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}},5229:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},8917:(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)-/,s=function(e,t){return t.toUpperCase()},a=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,a):e.replace(i,a)).replace(r,s))}},1133: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(9788));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}},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=o)&&Object.keys(s.O).every((e=>s.O[e](n[a])))?n.splice(a--,1):(l=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);s.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var l=2&r&&e;"object"==typeof l&&!~t.indexOf(l);l=n(l))Object.getOwnPropertyNames(l).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>e+".js",s.miniCssF=e=>e+".css",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="gatherpress:",s.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var l,a;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(f);var o=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),a&&document.head.appendChild(l)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e+"../../"})(),(()=>{if("undefined"!=typeof document){var e={908:0};s.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{535:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=s.miniCssF(e),o=s.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",s.nc&&(i.nonce=s.nc),i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var l=n&&n.type,s=n&&n.target&&n.target.href||t,a=new Error("Loading CSS chunk "+e+" failed.\n("+l+": "+s+")");a.name="ChunkLoadError",a.code="CSS_CHUNK_LOAD_FAILED",a.type=l,a.request=s,i.parentNode&&i.parentNode.removeChild(i),o(a)}},i.href=t,document.head.appendChild(i)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={908:0,812:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(812!=t){var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=s.p+s.u(t),l=new Error;s.l(i,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,r[1](l)}}),"chunk-"+t,t)}else e[t]=0},s.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,l,a]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in l)s.o(l,r)&&(s.m[r]=l[r]);if(a)var u=a(s)}for(t&&t(n);cs(7701)));a=s.O(a)})(); \ No newline at end of file diff --git a/build/blocks/venue/venue.asset.php b/build/blocks/venue/venue.asset.php index 1aa4ebd8c..d414962aa 100644 --- a/build/blocks/venue/venue.asset.php +++ b/build/blocks/venue/venue.asset.php @@ -1 +1 @@ - array('react', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '510d97de0183775aa75b'); + array('react', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'ac43be418ed67d7ea96a'); diff --git a/build/blocks/venue/venue.js b/build/blocks/venue/venue.js index ccebe97af..442308f79 100644 --- a/build/blocks/venue/venue.js +++ b/build/blocks/venue/venue.js @@ -1,2 +1,2 @@ -(()=>{var e,t,n,r,o={5413:(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},1141: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(5413),l=n(6957);o(n(6957),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},6957: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 h=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=h;var m=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 g(e){return e.type===l.ElementType.CDATA}function v(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),v(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 m(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(g(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 h(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}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),f=d&&d[1]?d[1].toLowerCase():"";switch(f){case n:var h=c(e);return l.test(e)||null===(t=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case r:case o:var m=s(e).querySelectorAll(f);return a.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return p?p(e):(y=s(e,o).querySelector(o)).childNodes;var y}};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,h="object"==typeof document&&document.createElement("template");h&&h.content&&(p=function(e){return h.innerHTML=e,h.content.childNodes})},2471: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.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)};var o=r(n(5496)),i=n(7731),l=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var a,s=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),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 h=(0,r.getPropertyInfo)(p);switch(i.includes(p)&&l.includes(t)&&!c&&(p=s("default"+f)),n[p]=d,h&&h.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};var r=n(4210),o=n(4958),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return r.possibleStandardNames[e]}},308: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.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=n.library||a,d=u.cloneElement,f=u.createElement,p=u.isValidElement,h=t.length,m=0;m1&&(g=d(g,{key:g.key||m})),r.push(c(g,y,m));continue}}if("text"!==y.type){var v=y,b={};s(v)?((0,l.setStyleProp)(v.attribs.style,v.attribs),b=v.attribs):v.attribs&&(b=(0,i.default)(v.attribs,v.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}h>1&&(b.key=m),r.push(c(f(y.name,b,w),y,m))}else{var x=!y.data.trim().length;if(x&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&x)continue;r.push(c(y.data,y,m))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),l=n(4958),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)}},442: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,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):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var l=r(n(308));t.domToReact=l.default;var a=n(1141);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}},4958: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=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)},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={}};var o=n(1609),i=r(n(5229)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={reactCompat:!0};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}},9788: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 h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=s.source}m.prototype.content=e;var y=[];function g(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 v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){v(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();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 g("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=h(),n=v(o);if(n){if(x(),!v(i))return g("property missing ':'");var r=v(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},4210:(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(6811),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},6811:(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}},5229:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},8917:(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))}},1133: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(9788));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}},1609:e=>{"use strict";e.exports=window.React},6942:(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 l.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);l.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,l.d(o,i),o},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,n)=>(l.f[n](e,t),t)),[])),l.u=e=>e+".js",l.miniCssF=e=>e+".css",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="gatherpress:",l.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var a,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),s&&document.head.appendChild(a)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e+"../../"})(),(()=>{if("undefined"!=typeof document){var e={233:0};l.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{535:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=l.miniCssF(e),o=l.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",l.nc&&(i.nonce=l.nc),i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var l=n&&n.type,a=n&&n.target&&n.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+l+": "+a+")");s.name="ChunkLoadError",s.code="CSS_CHUNK_LOAD_FAILED",s.type=l,s.request=a,i.parentNode&&i.parentNode.removeChild(i),o(s)}},i.href=t,document.head.appendChild(i)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={233:0};l.f.j=(t,n)=>{var r=l.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=l.p+l.u(t),a=new Error;l.l(i,(n=>{if(l.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,a,s]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in a)l.o(a,r)&&(l.m[r]=a[r]);s&&s(l)}for(t&&t(n);c{"use strict";const e=window.wp.domReady;var t=l.n(e);const n=window.wp.element,r=window.wp.data,o=window.ReactJSXRuntime,i=e=>{const{zoom:t,type:n,className:r,location:i,height:l}=e,a={border:0,height:l,width:"100%"},s="https://maps.google.com/maps?"+new URLSearchParams({q:i,z:t||10,t:n||"m",output:"embed"}).toString();return(0,o.jsx)("iframe",{src:s,style:a,className:r,title:i})},a=window.wp.i18n;function s(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const c=e=>{const{zoom:t=10,className:r,location:i,height:c=300,latitude:u,longitude:d}=e,[f,p]=(0,n.useState)(null),h={height:c};return(0,n.useEffect)((()=>{(async()=>{const{default:e}=await l.e(481).then(l.t.bind(l,3481,23));await l.e(535).then(l.bind(l,1535)),await l.e(272).then(l.t.bind(l,1272,17)),await l.e(980).then(l.t.bind(l,8980,17)),p(e)})()}),[]),(0,n.useEffect)((()=>{if(!f||!u||!d)return;const e=f.map("map").setView([u,d],t);return f.Icon.Default.imagePath=s("urls.pluginUrl")+"build/images/",f.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:(0,a.sprintf)(/* translators: %s: Link to OpenStreetMap contributors. */ /* translators: %s: Link to OpenStreetMap contributors. */ -(0,a.__)("© %s contributors","gatherpress"),'OpenStreetMap')}).addTo(e),f.marker([u,d]).addTo(e).bindPopup(i),()=>{e.remove()}}),[f,u,i,d,t]),f&&u&&d?(0,o.jsx)("div",{className:r,id:"map",style:h}):null},u=e=>{const t=(0,r.select)("core")?.canUser("create","posts"),n=Boolean((0,r.select)("core/edit-post")),{zoom:l,type:a,className:u,latitude:d,longitude:f}=e;let{location:p,height:h}=e;h||(h=300),!t||n||p||(p="660 4th Street #119 San Francisco CA 94107, USA");const m=s("settings.mapPlatform");return p&&m?"google"===m?(0,o.jsx)(i,{location:p,className:u,zoom:l,type:a,height:h}):"osm"===m?(0,o.jsx)(c,{location:p,latitude:d,longitude:f,className:u,zoom:l,height:h}):(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(o.Fragment,{})};var d=l(1609);const f=Math.min,p=Math.max,h=Math.round,m=Math.floor,y=e=>({x:e,y:e}),g={left:"right",right:"left",bottom:"top",top:"bottom"},v={start:"end",end:"start"};function b(e,t,n){return p(e,f(t,n))}function w(e,t){return"function"==typeof e?e(t):e}function x(e){return e.split("-")[0]}function E(e){return e.split("-")[1]}function _(e){return"x"===e?"y":"x"}function S(e){return"y"===e?"height":"width"}function T(e){return["top","bottom"].includes(x(e))?"y":"x"}function k(e){return _(T(e))}function A(e){return e.replace(/start|end/g,(e=>v[e]))}function O(e){return e.replace(/left|right|bottom|top/g,(e=>g[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 N(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function R(e,t,n){let{reference:r,floating:o}=e;const i=T(t),l=k(t),a=S(l),s=x(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(E(t)){case"start":p[l]-=f*(n&&c?-1:1);break;case"end":p[l]+=f*(n&&c?-1:1)}return p}async function L(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}=w(t,e),h=C(p),m=a[f?"floating"===d?"reference":"floating":d],y=N(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=N(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:s}):g);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function j(e){return D(e)?(e.nodeName||"").toLowerCase():"#document"}function P(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function I(e){var t;return null==(t=(D(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function D(e){return e instanceof Node||e instanceof P(e).Node}function M(e){return e instanceof Element||e instanceof P(e).Element}function F(e){return e instanceof HTMLElement||e instanceof P(e).HTMLElement}function z(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof P(e).ShadowRoot)}function B(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(j(e))}function V(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function q(e){const t=W(),n=M(e)?U(e):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 $(e){return["html","body","#document"].includes(j(e))}function U(e){return P(e).getComputedStyle(e)}function X(e){return M(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if("html"===j(e))return e;const t=e.assignedSlot||e.parentNode||z(e)&&e.host||I(e);return z(t)?t.host:t}function K(e){const t=G(e);return $(t)?e.ownerDocument?e.ownerDocument.body:e.body:F(t)&&B(t)?t:K(t)}function Y(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=K(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=P(o);return i?t.concat(l,l.visualViewport||[],B(o)?o:[],l.frameElement&&n?Y(l.frameElement):[]):t.concat(o,Y(o,[],n))}function Z(e){const t=U(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=F(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=h(n)!==i||h(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function J(e){return M(e)?e:e.contextElement}function Q(e){const t=J(e);if(!F(t))return y(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Z(t);let l=(i?h(n.width):n.width)/r,a=(i?h(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const ee=y(0);function te(e){const t=P(e);return W()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ee}function ne(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=J(e);let l=y(1);t&&(r?M(r)&&(l=Q(r)):l=Q(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==P(e))&&t}(i,n,r)?te(i):y(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=P(i),t=r&&M(r)?P(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=Q(o),t=o.getBoundingClientRect(),r=U(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=l,n=P(o),o=n.frameElement}}return N({width:u,height:d,x:s,y:c})}function re(e){return ne(I(e)).left+X(e).scrollLeft}function oe(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=P(e),r=I(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=W();(!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=I(e),n=X(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+re(e);const a=-n.scrollTop;return"rtl"===U(r).direction&&(l+=p(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(I(e));else if(M(t))r=function(e,t){const n=ne(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=F(e)?Q(e):y(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=te(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return N(r)}function ie(e,t){const n=G(e);return!(n===t||!M(n)||$(n))&&("fixed"===U(n).position||ie(n,t))}function le(e,t,n){const r=F(t),o=I(t),i="fixed"===n,l=ne(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=y(0);if(r||!r&&!i)if(("body"!==j(t)||B(o))&&(a=X(t)),r){const e=ne(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=re(o));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function ae(e){return"static"===U(e).position}function se(e,t){return F(e)&&"fixed"!==U(e).position?t?t(e):e.offsetParent:null}function ce(e,t){const n=P(e);if(V(e))return n;if(!F(e)){let t=G(e);for(;t&&!$(t);){if(M(t)&&!ae(t))return t;t=G(t)}return n}let r=se(e,t);for(;r&&H(r)&&ae(r);)r=se(r,t);return r&&$(r)&&ae(r)&&!q(r)?n:r||function(e){let t=G(e);for(;F(t)&&!$(t);){if(q(t))return t;if(V(t))return null;t=G(t)}return null}(e)||n}const ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=I(r),a=!!t&&V(t.floating);if(r===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=y(1);const u=y(0),d=F(r);if((d||!d&&!i)&&(("body"!==j(r)||B(l))&&(s=X(r)),F(r))){const e=ne(r);c=Q(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x,y:n.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:I,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?V(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Y(e,[],!1).filter((e=>M(e)&&"body"!==j(e))),o=null;const i="fixed"===U(e).position;let l=i?G(e):e;for(;M(l)&&!$(l);){const t=U(l),n=q(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||B(l)&&!n&&ie(e,l))?r=r.filter((e=>e!==l)):o=t,l=G(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],a=i.reduce(((e,n)=>{const r=oe(t,n,o);return e.top=p(r.top,e.top),e.right=f(r.right,e.right),e.bottom=f(r.bottom,e.bottom),e.left=p(r.left,e.left),e}),oe(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){const t=this.getOffsetParent||ce,n=this.getDimensions,r=await n(e.floating);return{reference:le(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Z(e);return{width:t,height:n}},getScale:Q,isElement:M,isRTL:function(e){return"rtl"===U(e).direction}};const de=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:a}=t,s=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=x(n),a=E(n),s="y"===T(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=w(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}},fe=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}=w(e,t),c={x:n,y:r},u=await L(t,s),d=T(x(o)),f=_(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=b(p+u["y"===f?"top":"left"],p,p-u[e])}if(l){const e="y"===d?"bottom":"right";h=b(h+u["y"===d?"top":"left"],h,h-u[e])}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},pe=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:h="none",flipAlignment:m=!0,...y}=w(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=x(o),v=T(a),b=x(a)===a,_=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=f||(b||!m?[O(a)]:function(e){const t=O(e);return[A(e),t,A(t)]}(a)),N="none"!==h;!f&&N&&C.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[]}}(x(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(A)))),i}(a,m,h,_));const R=[a,...C],j=await L(t,y),P=[];let I=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&P.push(j[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=E(e),o=k(e),i=S(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=O(l)),[l,O(l)]}(o,l,_);P.push(j[e[0]],j[e[1]])}if(I=[...I,{placement:o,overflows:P}],!P.every((e=>e<=0))){var D,M;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(M=I.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(p){case"bestFit":{var F;const e=null==(F=I.filter((e=>{if(N){const t=T(e.placement);return t===v||"y"===t}return!0})).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:F[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},he=(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}=R(c,r,s),f=r,p={},h=0;for(let n=0;n{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}=w(c,e)||{};if(null==s)return{};const d=C(u),p={x:t,y:n},h=k(r),m=S(h),y=await i.getDimensions(s),g="y"===h,v=g?"top":"left",x=g?"bottom":"right",_=g?"clientHeight":"clientWidth",T=o.reference[m]+o.reference[h]-p[h]-o.floating[m],A=p[h]-o.reference[h],O=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=O?O[_]:0;N&&await(null==i.isElement?void 0:i.isElement(O))||(N=l.floating[_]||o.floating[m]);const R=T/2-A/2,L=N/2-y[m]/2-1,j=f(d[v],L),P=f(d[x],L),I=j,D=N-y[m]-P,M=N/2-y[m]/2+R,F=b(I,M,D),z=!a.arrow&&null!=E(r)&&M!==F&&o.reference[m]/2-(M{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 f=0;if(a){const e=`${a}`.match(/(\d+)px/);f=(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+f}px`},place:n}}))):he(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},be=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),we=(e,t,n)=>{let r=null;const o=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))};return o.cancel=()=>{r&&(clearTimeout(r),r=null)},o},xe=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,Ee=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>Ee(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!xe(e)||!xe(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>Ee(e[n],t[n])))},_e=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}))},Se=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(_e(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Te="undefined"!=typeof window?d.useLayoutEffect:d.useEffect,ke=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Ae={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Oe=(0,d.createContext)({getTooltipData:()=>Ae});function Ce(e="DEFAULT_TOOLTIP_ID"){return(0,d.useContext)(Oe).getTooltipData(e)}var Ne={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 Le=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:l,place:a="top",offset:s=10,events:c=["hover"],openOnClick:u=!1,positionStrategy:h="absolute",middlewares:y,wrapper:g,delayShow:v=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:N,style:R,position:L,afterShow:j,afterHide:P,content:D,contentWrapperRef:M,isOpen:F,defaultIsOpen:z=!1,setIsOpen:B,activeAnchor:H,setActiveAnchor:V,border:q,opacity:W,arrowColor:$,role:U="tooltip"})=>{var X;const G=(0,d.useRef)(null),K=(0,d.useRef)(null),Z=(0,d.useRef)(null),Q=(0,d.useRef)(null),ee=(0,d.useRef)(null),[te,re]=(0,d.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:a}),[oe,ie]=(0,d.useState)(!1),[le,ae]=(0,d.useState)(!1),[se,ce]=(0,d.useState)(null),ue=(0,d.useRef)(!1),de=(0,d.useRef)(null),{anchorRefs:fe,setActiveAnchor:pe}=Ce(t),he=(0,d.useRef)(!1),[ye,ge]=(0,d.useState)([]),be=(0,d.useRef)(!1),xe=u||c.includes("click"),_e=xe||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),Ae=A?{...A}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!A&&xe&&Object.assign(Ae,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Oe=O?{...O}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!O&&xe&&Object.assign(Oe,{mouseleave:!1,blur:!1,mouseout:!1});const Le=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:_e||!1};N&&(Object.assign(Ae,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Oe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Le,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Te((()=>(be.current=!0,()=>{be.current=!1})),[]);const je=e=>{be.current&&(e&&ae(!0),setTimeout((()=>{be.current&&(null==B||B(e),void 0===F&&ie(e))}),10))};(0,d.useEffect)((()=>{if(void 0===F)return()=>null;F&&ae(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,d.useEffect)((()=>{if(oe!==ue.current)if(ke(ee),ue.current=oe,oe)null==j||j();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();ee.current=setTimeout((()=>{ae(!1),ce(null),null==P||P()}),e+25)}}),[oe]);const Pe=e=>{re((t=>Ee(t,e)?t:e))},Ie=(e=v)=>{ke(Z),le?je(!0):Z.current=setTimeout((()=>{je(!0)}),e)},De=(e=b)=>{ke(Q),Q.current=setTimeout((()=>{he.current||je(!1)}),e)},Me=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 V(null),void pe({current:null});v?Ie():je(!0),V(n),pe({current:n}),ke(Q)},Fe=()=>{_?De(b||100):b?De():je(!1),ke(Z)},ze=({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==se?void 0:se.place)&&void 0!==n?n:a,offset:s,elementReference:r,tooltipReference:G.current,tooltipArrowReference:K.current,strategy:h,middlewares:y,border:q}).then((e=>{Pe(e)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};ze(n),de.current=n},He=e=>{var t;if(!oe)return;const n=e.target;n.isConnected&&((null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ye].some((e=>null==e?void 0:e.contains(n)))||(je(!1),ke(Z)))},Ve=we(Me,50,!0),qe=we(Fe,50,!0),We=e=>{qe.cancel(),Ve(e)},$e=()=>{Ve.cancel(),qe()},Ue=(0,d.useCallback)((()=>{var e,t;const n=null!==(e=null==se?void 0:se.position)&&void 0!==e?e:L;n?ze(n):w?de.current&&ze(de.current):(null==H?void 0:H.isConnected)&&ve({place:null!==(t=null==se?void 0:se.place)&&void 0!==t?t:a,offset:s,elementReference:H,tooltipReference:G.current,tooltipArrowReference:K.current,strategy:h,middlewares:y,border:q}).then((e=>{be.current&&Pe(e)}))}),[oe,H,D,R,a,null==se?void 0:se.place,s,h,L,null==se?void 0:se.position,w]);(0,d.useEffect)((()=>{var e,t;const n=new Set(fe);ye.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&n.add({current:r});const o=()=>{je(!1)},l=Se(H),a=Se(G.current);Le.scroll&&(window.addEventListener("scroll",o),null==l||l.addEventListener("scroll",o),null==a||a.addEventListener("scroll",o));let s=null;Le.resize?window.addEventListener("resize",o):H&&G.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=J(e),u=o||i?[...c?Y(c):[],...Y(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=I(e);function i(){var e;clearTimeout(n),null==(e=r)||e.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:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const y={rootMargin:-m(u)+"px "+-m(o.clientWidth-(c+d))+"px "+-m(o.clientHeight-(u+h))+"px "+-m(c)+"px",threshold:p(0,f(1,s))||1};let g=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!g)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}g=!1}try{r=new IntersectionObserver(v,{...y,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,y)}r.observe(e)}(!0),i}(c,n):null;let h,y=-1,g=null;l&&(g=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),n()})),c&&!s&&g.observe(c),g.observe(t));let v=s?ne(e):null;return s&&function t(){const r=ne(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n(),v=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(h)}}(H,G.current,Ue,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&je(!1)};Le.escape&&window.addEventListener("keydown",c),Le.clickOutsideAnchor&&window.addEventListener("click",He);const u=[],d=e=>{oe&&(null==e?void 0:e.target)===H||Me(e)},h=e=>{oe&&(null==e?void 0:e.target)===H&&Fe()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],g=["click","dblclick","mousedown","mouseup"];Object.entries(Ae).forEach((([e,t])=>{t&&(y.includes(e)?u.push({event:e,listener:We}):g.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Oe).forEach((([e,t])=>{t&&(y.includes(e)?u.push({event:e,listener:$e}):g.includes(e)&&u.push({event:e,listener:h}))})),w&&u.push({event:"pointermove",listener:Be});const v=()=>{he.current=!0},b=()=>{he.current=!1,Fe()};return _&&!_e&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",v),null===(t=G.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==l||l.removeEventListener("scroll",o),null==a||a.removeEventListener("scroll",o)),Le.resize?window.removeEventListener("resize",o):null==s||s(),Le.clickOutsideAnchor&&window.removeEventListener("click",He),Le.escape&&window.removeEventListener("keydown",c),_&&!_e&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",v),null===(t=G.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)}))}))}}),[H,Ue,le,fe,ye,A,O,C,xe,v,b]),(0,d.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==se?void 0:se.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);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):e.oldValue===t&&o.push(e.target)),"childList"===e.type){if(H){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,H))&&(ae(!1),je(!1),V(null),ke(Z),ke(Q),!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)&&ge((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{o.disconnect()}}),[t,l,null==se?void 0:se.anchorSelect,H]),(0,d.useEffect)((()=>{Ue()}),[Ue]),(0,d.useEffect)((()=>{if(!(null==M?void 0:M.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ue()))}));return e.observe(M.current),()=>{e.disconnect()}}),[D,null==M?void 0:M.current]),(0,d.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ye,t];H&&n.includes(H)||V(null!==(e=ye[0])&&void 0!==e?e:t)}),[i,ye,H]),(0,d.useEffect)((()=>(z&&je(!0),()=>{ke(Z),ke(Q)})),[]),(0,d.useEffect)((()=>{var e;let n=null!==(e=null==se?void 0:se.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ge(e)}catch(e){ge([])}}),[t,l,null==se?void 0:se.anchorSelect]),(0,d.useEffect)((()=>{Z.current&&(ke(Z),Ie(v))}),[v]);const Xe=null!==(X=null==se?void 0:se.content)&&void 0!==X?X:D,Ge=oe&&Object.keys(te.tooltipStyles).length>0;return(0,d.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`)}ce(null!=e?e:null),(null==e?void 0:e.delay)?Ie(e.delay):je(!0)},close:e=>{(null==e?void 0:e.delay)?De(e.delay):je(!1)},activeAnchor:H,place:te.place,isOpen:Boolean(le&&!x&&Xe&&Ge)}))),le&&!x&&Xe?d.createElement(g,{id:t,role:U,className:me("react-tooltip",Ne.tooltip,Re.tooltip,Re[o],n,`react-tooltip__place-${te.place}`,Ne[Ge?"show":"closing"],Ge?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&Ne.fixed,_&&Ne.clickable),onTransitionEnd:e=>{ke(ee),oe||"opacity"!==e.propertyName||(ae(!1),ce(null),null==P||P())},style:{...R,...te.tooltipStyles,opacity:void 0!==W&&Ge?W:void 0},ref:G},Xe,d.createElement(g,{className:me("react-tooltip-arrow",Ne.arrow,Re.arrow,r,E&&Ne.noArrow),style:{...te.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:K})):null},je=({content:e})=>d.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Pe=d.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:o,render:i,className:l,classNameArrow:a,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:y="absolute",middlewares:g,delayShow:v=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:N=!1,style:R,position:L,isOpen:j,defaultIsOpen:P=!1,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,role:V="tooltip"},q)=>{const[W,$]=(0,d.useState)(r),[U,X]=(0,d.useState)(o),[G,K]=(0,d.useState)(c),[Y,Z]=(0,d.useState)(s),[J,Q]=(0,d.useState)(u),[ee,te]=(0,d.useState)(v),[ne,re]=(0,d.useState)(b),[oe,ie]=(0,d.useState)(w),[le,ae]=(0,d.useState)(x),[se,ce]=(0,d.useState)(f),[ue,de]=(0,d.useState)(h),[fe,pe]=(0,d.useState)(y),[he,ye]=(0,d.useState)(null),[ge,ve]=(0,d.useState)(null),we=(0,d.useRef)(I),{anchorRefs:xe,activeAnchor:Ee}=Ce(e),_e=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}),{}),Se=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},content:e=>{$(null!=e?e:r)},html:e=>{X(null!=e?e:o)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{Q(null===e?u: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;pe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{te(null===e?v:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{ae(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,d.useEffect)((()=>{$(r)}),[r]),(0,d.useEffect)((()=>{X(o)}),[o]),(0,d.useEffect)((()=>{K(c)}),[c]),(0,d.useEffect)((()=>{Z(s)}),[s]),(0,d.useEffect)((()=>{Q(u)}),[u]),(0,d.useEffect)((()=>{te(v)}),[v]),(0,d.useEffect)((()=>{re(b)}),[b]),(0,d.useEffect)((()=>{ie(w)}),[w]),(0,d.useEffect)((()=>{ae(x)}),[x]),(0,d.useEffect)((()=>{pe(y)}),[y]),(0,d.useEffect)((()=>{we.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,d.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,d.useEffect)((()=>{var r;const o=new Set(xe);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),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!=ge?ge: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=_e(a);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=_e(a);Se(e),s.observe(a,c)}return()=>{s.disconnect()}}),[xe,Ee,ge,t,n]),(0,d.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!be("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&&!be("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let Te=p;const ke=(0,d.useRef)(null);if(i){const e=i({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||W||null,activeAnchor:ge});Te=e?d.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},e):null}else W&&(Te=W);U&&(Te=d.createElement(je,{content:U}));const Ae={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:me(l,he),classNameArrow:a,content:Te,contentWrapperRef:ke,place:G,variant:Y,offset:J,wrapper:se,events:ue,openOnClick:m,positionStrategy:fe,middlewares:g,delayShow:ee,delayHide:ne,float:oe,hidden:le,noArrow:E,clickable:_,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N,style:R,position:L,isOpen:j,defaultIsOpen:P,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,activeAnchor:ge,setActiveAnchor:e=>ve(e),role:V};return d.createElement(Le,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ge({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||ge({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 Ie=window.wp.components,De=({onlineEventLinkDefault:e=""})=>{const t=(0,a.__)("Online event","gatherpress"),[r,i]=(0,n.useState)(e);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},s("eventDetails.postId")),(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"3",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",children:(0,o.jsx)(Ie.Icon,{icon:"video-alt2"})}),(0,o.jsxs)(Ie.FlexItem,{children:[!r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,a.__)("Link available for attendees only.","gatherpress"),children:t}),(0,o.jsx)(Pe,{id:"gatherpress-online-event-tooltip"})]}),r&&(0,o.jsx)("a",{href:r,rel:"noreferrer",target:"_blank",children:t})]})]})};var Me=l(442);const Fe=Me.default||Me,ze=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,o.jsxs)(o.Fragment,{children:[(e||t)&&(0,o.jsxs)(Ie.Flex,{justify:"normal",align:"flex-start",gap:"4",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Ie.Icon,{icon:"location"})}),(0,o.jsxs)(Ie.FlexItem,{children:[e&&(0,o.jsx)("div",{className:"gatherpress-venue__name",children:(0,o.jsx)("strong",{children:Fe(e)})}),t&&(0,o.jsx)("div",{className:"gatherpress-venue__full-address",children:Fe(t)})]})]}),(n||r)&&(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"8",children:[n&&(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"4",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Ie.Icon,{icon:"phone"})}),(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsx)("div",{className:"gatherpress-venue__phone-number",children:n})})]})}),r&&(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"4",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Ie.Icon,{icon:"admin-site-alt3"})}),(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsx)("div",{className:"gatherpress-venue__website",children:(0,o.jsx)("a",{href:r,target:"_blank",rel:"noreferrer noopener",children:r})})})]})})]})]}),Be=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:i=!1,onlineEventLink:l=""})=>(0,o.jsxs)(o.Fragment,{children:[!i&&(0,o.jsx)(ze,{name:e,fullAddress:t,phoneNumber:n,website:r}),i&&(0,o.jsx)(De,{onlineEventLinkDefault:l})]});t()((()=>{let e=document.querySelectorAll('[data-gatherpress_block_name="venue"]');for(let c=0;c{var e,t,n,r,o={5413:(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},1141: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(5413),l=n(6957);o(n(6957),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},6957: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 h=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=h;var m=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 g(e){return e.type===l.ElementType.CDATA}function v(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),v(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 m(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(g(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 h(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}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),f=d&&d[1]?d[1].toLowerCase():"";switch(f){case n:var h=c(e);return l.test(e)||null===(t=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case r:case o:var m=s(e).querySelectorAll(f);return a.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return p?p(e):(y=s(e,o).querySelector(o)).childNodes;var y}};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,h="object"==typeof document&&document.createElement("template");h&&h.content&&(p=function(e){return h.innerHTML=e,h.content.childNodes})},2471: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.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)};var o=r(n(5496)),i=n(7731),l=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var a,s=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),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 h=(0,r.getPropertyInfo)(p);switch(i.includes(p)&&l.includes(t)&&!c&&(p=s("default"+f)),n[p]=d,h&&h.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};var r=n(4210),o=n(4958),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return r.possibleStandardNames[e]}},308: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.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=n.library||a,d=u.cloneElement,f=u.createElement,p=u.isValidElement,h=t.length,m=0;m1&&(g=d(g,{key:g.key||m})),r.push(c(g,y,m));continue}}if("text"!==y.type){var v=y,b={};s(v)?((0,l.setStyleProp)(v.attribs.style,v.attribs),b=v.attribs):v.attribs&&(b=(0,i.default)(v.attribs,v.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}h>1&&(b.key=m),r.push(c(f(y.name,b,w),y,m))}else{var x=!y.data.trim().length;if(x&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&x)continue;r.push(c(y.data,y,m))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),l=n(4958),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)}},442: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,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):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var l=r(n(308));t.domToReact=l.default;var a=n(1141);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}},4958: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=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)},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={}};var o=n(1609),i=r(n(5229)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={reactCompat:!0};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}},9788: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 h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=s.source}m.prototype.content=e;var y=[];function g(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 v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){v(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();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 g("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=h(),n=v(o);if(n){if(x(),!v(i))return g("property missing ':'");var r=v(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},4210:(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(6811),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},6811:(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}},5229:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},8917:(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))}},1133: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(9788));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}},1609:e=>{"use strict";e.exports=window.React},6942:(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 l.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);l.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,l.d(o,i),o},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,n)=>(l.f[n](e,t),t)),[])),l.u=e=>e+".js",l.miniCssF=e=>e+".css",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="gatherpress:",l.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var a,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),s&&document.head.appendChild(a)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e+"../../"})(),(()=>{if("undefined"!=typeof document){var e={233:0};l.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{535:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=l.miniCssF(e),o=l.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",l.nc&&(i.nonce=l.nc),i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var l=n&&n.type,a=n&&n.target&&n.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+l+": "+a+")");s.name="ChunkLoadError",s.code="CSS_CHUNK_LOAD_FAILED",s.type=l,s.request=a,i.parentNode&&i.parentNode.removeChild(i),o(s)}},i.href=t,document.head.appendChild(i)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={233:0};l.f.j=(t,n)=>{var r=l.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=l.p+l.u(t),a=new Error;l.l(i,(n=>{if(l.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,a,s]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in a)l.o(a,r)&&(l.m[r]=a[r]);s&&s(l)}for(t&&t(n);c{"use strict";const e=window.wp.domReady;var t=l.n(e);const n=window.wp.element,r=window.wp.data,o=window.ReactJSXRuntime,i=e=>{const{zoom:t,type:n,className:r,location:i,height:l}=e,a={border:0,height:l,width:"100%"},s="https://maps.google.com/maps?"+new URLSearchParams({q:i,z:t||10,t:n||"m",output:"embed"}).toString();return(0,o.jsx)("iframe",{src:s,style:a,className:r,title:i})},a=window.wp.i18n;function s(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const c=e=>{const{zoom:t=10,className:r,location:i,height:c=300,latitude:u,longitude:d}=e,[f,p]=(0,n.useState)(null),h={height:c};return(0,n.useEffect)((()=>{(async()=>{const{default:e}=await l.e(481).then(l.t.bind(l,3481,23));await l.e(535).then(l.bind(l,1535)),await l.e(272).then(l.t.bind(l,1272,17)),await l.e(980).then(l.t.bind(l,8980,17)),p(e)})()}),[]),(0,n.useEffect)((()=>{if(!f||!u||!d)return;const e=f.map("map").setView([u,d],t);return f.Icon.Default.imagePath=s("urls.pluginUrl")+"build/images/",f.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:(0,a.sprintf)(/* translators: %s: Link to OpenStreetMap contributors. */ /* translators: %s: Link to OpenStreetMap contributors. */ +(0,a.__)("© %s contributors","gatherpress"),'OpenStreetMap')}).addTo(e),f.marker([u,d]).addTo(e).bindPopup(i),()=>{e.remove()}}),[f,u,i,d,t]),f&&u&&d?(0,o.jsx)("div",{className:r,id:"map",style:h}):null},u=e=>{const t=(0,r.select)("core")?.canUser("create","posts"),n=Boolean((0,r.select)("core/edit-post")),{zoom:l,type:a,className:u,latitude:d,longitude:f}=e;let{location:p,height:h}=e;h||(h=300),!t||n||p||(p="660 4th Street #119 San Francisco CA 94107, USA");const m=s("settings.mapPlatform");return p&&m?"google"===m?(0,o.jsx)(i,{location:p,className:u,zoom:l,type:a,height:h}):"osm"===m?(0,o.jsx)(c,{location:p,latitude:d,longitude:f,className:u,zoom:l,height:h}):(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(o.Fragment,{})};var d=l(1609);const f=Math.min,p=Math.max,h=Math.round,m=Math.floor,y=e=>({x:e,y:e}),g={left:"right",right:"left",bottom:"top",top:"bottom"},v={start:"end",end:"start"};function b(e,t,n){return p(e,f(t,n))}function w(e,t){return"function"==typeof e?e(t):e}function x(e){return e.split("-")[0]}function E(e){return e.split("-")[1]}function _(e){return"x"===e?"y":"x"}function S(e){return"y"===e?"height":"width"}function T(e){return["top","bottom"].includes(x(e))?"y":"x"}function k(e){return _(T(e))}function A(e){return e.replace(/start|end/g,(e=>v[e]))}function O(e){return e.replace(/left|right|bottom|top/g,(e=>g[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 N(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function R(e,t,n){let{reference:r,floating:o}=e;const i=T(t),l=k(t),a=S(l),s=x(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(E(t)){case"start":p[l]-=f*(n&&c?-1:1);break;case"end":p[l]+=f*(n&&c?-1:1)}return p}async function L(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}=w(t,e),h=C(p),m=a[f?"floating"===d?"reference":"floating":d],y=N(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=N(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:s}):g);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function j(e){return D(e)?(e.nodeName||"").toLowerCase():"#document"}function P(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function I(e){var t;return null==(t=(D(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function D(e){return e instanceof Node||e instanceof P(e).Node}function M(e){return e instanceof Element||e instanceof P(e).Element}function F(e){return e instanceof HTMLElement||e instanceof P(e).HTMLElement}function z(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof P(e).ShadowRoot)}function B(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(j(e))}function V(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function q(e){const t=W(),n=M(e)?$(e):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 U(e){return["html","body","#document"].includes(j(e))}function $(e){return P(e).getComputedStyle(e)}function X(e){return M(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if("html"===j(e))return e;const t=e.assignedSlot||e.parentNode||z(e)&&e.host||I(e);return z(t)?t.host:t}function K(e){const t=G(e);return U(t)?e.ownerDocument?e.ownerDocument.body:e.body:F(t)&&B(t)?t:K(t)}function Y(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=K(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=P(o);return i?t.concat(l,l.visualViewport||[],B(o)?o:[],l.frameElement&&n?Y(l.frameElement):[]):t.concat(o,Y(o,[],n))}function Z(e){const t=$(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=F(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=h(n)!==i||h(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function J(e){return M(e)?e:e.contextElement}function Q(e){const t=J(e);if(!F(t))return y(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Z(t);let l=(i?h(n.width):n.width)/r,a=(i?h(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const ee=y(0);function te(e){const t=P(e);return W()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ee}function ne(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=J(e);let l=y(1);t&&(r?M(r)&&(l=Q(r)):l=Q(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==P(e))&&t}(i,n,r)?te(i):y(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=P(i),t=r&&M(r)?P(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=Q(o),t=o.getBoundingClientRect(),r=$(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=l,n=P(o),o=n.frameElement}}return N({width:u,height:d,x:s,y:c})}function re(e){return ne(I(e)).left+X(e).scrollLeft}function oe(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=P(e),r=I(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=W();(!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=I(e),n=X(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+re(e);const a=-n.scrollTop;return"rtl"===$(r).direction&&(l+=p(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(I(e));else if(M(t))r=function(e,t){const n=ne(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=F(e)?Q(e):y(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=te(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return N(r)}function ie(e,t){const n=G(e);return!(n===t||!M(n)||U(n))&&("fixed"===$(n).position||ie(n,t))}function le(e,t,n){const r=F(t),o=I(t),i="fixed"===n,l=ne(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=y(0);if(r||!r&&!i)if(("body"!==j(t)||B(o))&&(a=X(t)),r){const e=ne(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=re(o));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function ae(e){return"static"===$(e).position}function se(e,t){return F(e)&&"fixed"!==$(e).position?t?t(e):e.offsetParent:null}function ce(e,t){const n=P(e);if(V(e))return n;if(!F(e)){let t=G(e);for(;t&&!U(t);){if(M(t)&&!ae(t))return t;t=G(t)}return n}let r=se(e,t);for(;r&&H(r)&&ae(r);)r=se(r,t);return r&&U(r)&&ae(r)&&!q(r)?n:r||function(e){let t=G(e);for(;F(t)&&!U(t);){if(q(t))return t;if(V(t))return null;t=G(t)}return null}(e)||n}const ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=I(r),a=!!t&&V(t.floating);if(r===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=y(1);const u=y(0),d=F(r);if((d||!d&&!i)&&(("body"!==j(r)||B(l))&&(s=X(r)),F(r))){const e=ne(r);c=Q(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x,y:n.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:I,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?V(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Y(e,[],!1).filter((e=>M(e)&&"body"!==j(e))),o=null;const i="fixed"===$(e).position;let l=i?G(e):e;for(;M(l)&&!U(l);){const t=$(l),n=q(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||B(l)&&!n&&ie(e,l))?r=r.filter((e=>e!==l)):o=t,l=G(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],a=i.reduce(((e,n)=>{const r=oe(t,n,o);return e.top=p(r.top,e.top),e.right=f(r.right,e.right),e.bottom=f(r.bottom,e.bottom),e.left=p(r.left,e.left),e}),oe(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){const t=this.getOffsetParent||ce,n=this.getDimensions,r=await n(e.floating);return{reference:le(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Z(e);return{width:t,height:n}},getScale:Q,isElement:M,isRTL:function(e){return"rtl"===$(e).direction}};const de=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:a}=t,s=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=x(n),a=E(n),s="y"===T(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=w(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}},fe=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}=w(e,t),c={x:n,y:r},u=await L(t,s),d=T(x(o)),f=_(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=b(p+u["y"===f?"top":"left"],p,p-u[e])}if(l){const e="y"===d?"bottom":"right";h=b(h+u["y"===d?"top":"left"],h,h-u[e])}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},pe=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:h="none",flipAlignment:m=!0,...y}=w(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=x(o),v=T(a),b=x(a)===a,_=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=f||(b||!m?[O(a)]:function(e){const t=O(e);return[A(e),t,A(t)]}(a)),N="none"!==h;!f&&N&&C.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[]}}(x(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(A)))),i}(a,m,h,_));const R=[a,...C],j=await L(t,y),P=[];let I=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&P.push(j[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=E(e),o=k(e),i=S(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=O(l)),[l,O(l)]}(o,l,_);P.push(j[e[0]],j[e[1]])}if(I=[...I,{placement:o,overflows:P}],!P.every((e=>e<=0))){var D,M;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(M=I.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(p){case"bestFit":{var F;const e=null==(F=I.filter((e=>{if(N){const t=T(e.placement);return t===v||"y"===t}return!0})).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:F[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},he=(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}=R(c,r,s),f=r,p={},h=0;for(let n=0;n{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}=w(c,e)||{};if(null==s)return{};const d=C(u),p={x:t,y:n},h=k(r),m=S(h),y=await i.getDimensions(s),g="y"===h,v=g?"top":"left",x=g?"bottom":"right",_=g?"clientHeight":"clientWidth",T=o.reference[m]+o.reference[h]-p[h]-o.floating[m],A=p[h]-o.reference[h],O=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=O?O[_]:0;N&&await(null==i.isElement?void 0:i.isElement(O))||(N=l.floating[_]||o.floating[m]);const R=T/2-A/2,L=N/2-y[m]/2-1,j=f(d[v],L),P=f(d[x],L),I=j,D=N-y[m]-P,M=N/2-y[m]/2+R,F=b(I,M,D),z=!a.arrow&&null!=E(r)&&M!==F&&o.reference[m]/2-(M{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 f=0;if(a){const e=`${a}`.match(/(\d+)px/);f=(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+f}px`},place:n}}))):he(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},be=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),we=(e,t,n)=>{let r=null;const o=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))};return o.cancel=()=>{r&&(clearTimeout(r),r=null)},o},xe=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,Ee=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>Ee(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!xe(e)||!xe(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>Ee(e[n],t[n])))},_e=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}))},Se=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(_e(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Te="undefined"!=typeof window?d.useLayoutEffect:d.useEffect,ke=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Ae={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Oe=(0,d.createContext)({getTooltipData:()=>Ae});function Ce(e="DEFAULT_TOOLTIP_ID"){return(0,d.useContext)(Oe).getTooltipData(e)}var Ne={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 Le=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:l,place:a="top",offset:s=10,events:c=["hover"],openOnClick:u=!1,positionStrategy:h="absolute",middlewares:y,wrapper:g,delayShow:v=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:N,style:R,position:L,afterShow:j,afterHide:P,content:D,contentWrapperRef:M,isOpen:F,defaultIsOpen:z=!1,setIsOpen:B,activeAnchor:H,setActiveAnchor:V,border:q,opacity:W,arrowColor:U,role:$="tooltip"})=>{var X;const G=(0,d.useRef)(null),K=(0,d.useRef)(null),Z=(0,d.useRef)(null),Q=(0,d.useRef)(null),ee=(0,d.useRef)(null),[te,re]=(0,d.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:a}),[oe,ie]=(0,d.useState)(!1),[le,ae]=(0,d.useState)(!1),[se,ce]=(0,d.useState)(null),ue=(0,d.useRef)(!1),de=(0,d.useRef)(null),{anchorRefs:fe,setActiveAnchor:pe}=Ce(t),he=(0,d.useRef)(!1),[ye,ge]=(0,d.useState)([]),be=(0,d.useRef)(!1),xe=u||c.includes("click"),_e=xe||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),Ae=A?{...A}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!A&&xe&&Object.assign(Ae,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Oe=O?{...O}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!O&&xe&&Object.assign(Oe,{mouseleave:!1,blur:!1,mouseout:!1});const Le=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:_e||!1};N&&(Object.assign(Ae,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Oe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Le,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Te((()=>(be.current=!0,()=>{be.current=!1})),[]);const je=e=>{be.current&&(e&&ae(!0),setTimeout((()=>{be.current&&(null==B||B(e),void 0===F&&ie(e))}),10))};(0,d.useEffect)((()=>{if(void 0===F)return()=>null;F&&ae(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,d.useEffect)((()=>{if(oe!==ue.current)if(ke(ee),ue.current=oe,oe)null==j||j();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();ee.current=setTimeout((()=>{ae(!1),ce(null),null==P||P()}),e+25)}}),[oe]);const Pe=e=>{re((t=>Ee(t,e)?t:e))},Ie=(e=v)=>{ke(Z),le?je(!0):Z.current=setTimeout((()=>{je(!0)}),e)},De=(e=b)=>{ke(Q),Q.current=setTimeout((()=>{he.current||je(!1)}),e)},Me=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 V(null),void pe({current:null});v?Ie():je(!0),V(n),pe({current:n}),ke(Q)},Fe=()=>{_?De(b||100):b?De():je(!1),ke(Z)},ze=({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==se?void 0:se.place)&&void 0!==n?n:a,offset:s,elementReference:r,tooltipReference:G.current,tooltipArrowReference:K.current,strategy:h,middlewares:y,border:q}).then((e=>{Pe(e)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};ze(n),de.current=n},He=e=>{var t;if(!oe)return;const n=e.target;n.isConnected&&((null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ye].some((e=>null==e?void 0:e.contains(n)))||(je(!1),ke(Z)))},Ve=we(Me,50,!0),qe=we(Fe,50,!0),We=e=>{qe.cancel(),Ve(e)},Ue=()=>{Ve.cancel(),qe()},$e=(0,d.useCallback)((()=>{var e,t;const n=null!==(e=null==se?void 0:se.position)&&void 0!==e?e:L;n?ze(n):w?de.current&&ze(de.current):(null==H?void 0:H.isConnected)&&ve({place:null!==(t=null==se?void 0:se.place)&&void 0!==t?t:a,offset:s,elementReference:H,tooltipReference:G.current,tooltipArrowReference:K.current,strategy:h,middlewares:y,border:q}).then((e=>{be.current&&Pe(e)}))}),[oe,H,D,R,a,null==se?void 0:se.place,s,h,L,null==se?void 0:se.position,w]);(0,d.useEffect)((()=>{var e,t;const n=new Set(fe);ye.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&n.add({current:r});const o=()=>{je(!1)},l=Se(H),a=Se(G.current);Le.scroll&&(window.addEventListener("scroll",o),null==l||l.addEventListener("scroll",o),null==a||a.addEventListener("scroll",o));let s=null;Le.resize?window.addEventListener("resize",o):H&&G.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=J(e),u=o||i?[...c?Y(c):[],...Y(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=I(e);function i(){var e;clearTimeout(n),null==(e=r)||e.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:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const y={rootMargin:-m(u)+"px "+-m(o.clientWidth-(c+d))+"px "+-m(o.clientHeight-(u+h))+"px "+-m(c)+"px",threshold:p(0,f(1,s))||1};let g=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!g)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}g=!1}try{r=new IntersectionObserver(v,{...y,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,y)}r.observe(e)}(!0),i}(c,n):null;let h,y=-1,g=null;l&&(g=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),n()})),c&&!s&&g.observe(c),g.observe(t));let v=s?ne(e):null;return s&&function t(){const r=ne(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n(),v=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(h)}}(H,G.current,$e,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&je(!1)};Le.escape&&window.addEventListener("keydown",c),Le.clickOutsideAnchor&&window.addEventListener("click",He);const u=[],d=e=>{oe&&(null==e?void 0:e.target)===H||Me(e)},h=e=>{oe&&(null==e?void 0:e.target)===H&&Fe()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],g=["click","dblclick","mousedown","mouseup"];Object.entries(Ae).forEach((([e,t])=>{t&&(y.includes(e)?u.push({event:e,listener:We}):g.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Oe).forEach((([e,t])=>{t&&(y.includes(e)?u.push({event:e,listener:Ue}):g.includes(e)&&u.push({event:e,listener:h}))})),w&&u.push({event:"pointermove",listener:Be});const v=()=>{he.current=!0},b=()=>{he.current=!1,Fe()};return _&&!_e&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",v),null===(t=G.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==l||l.removeEventListener("scroll",o),null==a||a.removeEventListener("scroll",o)),Le.resize?window.removeEventListener("resize",o):null==s||s(),Le.clickOutsideAnchor&&window.removeEventListener("click",He),Le.escape&&window.removeEventListener("keydown",c),_&&!_e&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",v),null===(t=G.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)}))}))}}),[H,$e,le,fe,ye,A,O,C,xe,v,b]),(0,d.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==se?void 0:se.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);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):e.oldValue===t&&o.push(e.target)),"childList"===e.type){if(H){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,H))&&(ae(!1),je(!1),V(null),ke(Z),ke(Q),!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)&&ge((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{o.disconnect()}}),[t,l,null==se?void 0:se.anchorSelect,H]),(0,d.useEffect)((()=>{$e()}),[$e]),(0,d.useEffect)((()=>{if(!(null==M?void 0:M.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>$e()))}));return e.observe(M.current),()=>{e.disconnect()}}),[D,null==M?void 0:M.current]),(0,d.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ye,t];H&&n.includes(H)||V(null!==(e=ye[0])&&void 0!==e?e:t)}),[i,ye,H]),(0,d.useEffect)((()=>(z&&je(!0),()=>{ke(Z),ke(Q)})),[]),(0,d.useEffect)((()=>{var e;let n=null!==(e=null==se?void 0:se.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ge(e)}catch(e){ge([])}}),[t,l,null==se?void 0:se.anchorSelect]),(0,d.useEffect)((()=>{Z.current&&(ke(Z),Ie(v))}),[v]);const Xe=null!==(X=null==se?void 0:se.content)&&void 0!==X?X:D,Ge=oe&&Object.keys(te.tooltipStyles).length>0;return(0,d.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`)}ce(null!=e?e:null),(null==e?void 0:e.delay)?Ie(e.delay):je(!0)},close:e=>{(null==e?void 0:e.delay)?De(e.delay):je(!1)},activeAnchor:H,place:te.place,isOpen:Boolean(le&&!x&&Xe&&Ge)}))),le&&!x&&Xe?d.createElement(g,{id:t,role:$,className:me("react-tooltip",Ne.tooltip,Re.tooltip,Re[o],n,`react-tooltip__place-${te.place}`,Ne[Ge?"show":"closing"],Ge?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&Ne.fixed,_&&Ne.clickable),onTransitionEnd:e=>{ke(ee),oe||"opacity"!==e.propertyName||(ae(!1),ce(null),null==P||P())},style:{...R,...te.tooltipStyles,opacity:void 0!==W&&Ge?W:void 0},ref:G},Xe,d.createElement(g,{className:me("react-tooltip-arrow",Ne.arrow,Re.arrow,r,E&&Ne.noArrow),style:{...te.tooltipArrowStyles,background:U?`linear-gradient(to right bottom, transparent 50%, ${U} 50%)`:void 0},ref:K})):null},je=({content:e})=>d.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Pe=d.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:o,render:i,className:l,classNameArrow:a,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:y="absolute",middlewares:g,delayShow:v=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:N=!1,style:R,position:L,isOpen:j,defaultIsOpen:P=!1,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,role:V="tooltip"},q)=>{const[W,U]=(0,d.useState)(r),[$,X]=(0,d.useState)(o),[G,K]=(0,d.useState)(c),[Y,Z]=(0,d.useState)(s),[J,Q]=(0,d.useState)(u),[ee,te]=(0,d.useState)(v),[ne,re]=(0,d.useState)(b),[oe,ie]=(0,d.useState)(w),[le,ae]=(0,d.useState)(x),[se,ce]=(0,d.useState)(f),[ue,de]=(0,d.useState)(h),[fe,pe]=(0,d.useState)(y),[he,ye]=(0,d.useState)(null),[ge,ve]=(0,d.useState)(null),we=(0,d.useRef)(I),{anchorRefs:xe,activeAnchor:Ee}=Ce(e),_e=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}),{}),Se=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},content:e=>{U(null!=e?e:r)},html:e=>{X(null!=e?e:o)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{Q(null===e?u: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;pe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{te(null===e?v:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{ae(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,d.useEffect)((()=>{U(r)}),[r]),(0,d.useEffect)((()=>{X(o)}),[o]),(0,d.useEffect)((()=>{K(c)}),[c]),(0,d.useEffect)((()=>{Z(s)}),[s]),(0,d.useEffect)((()=>{Q(u)}),[u]),(0,d.useEffect)((()=>{te(v)}),[v]),(0,d.useEffect)((()=>{re(b)}),[b]),(0,d.useEffect)((()=>{ie(w)}),[w]),(0,d.useEffect)((()=>{ae(x)}),[x]),(0,d.useEffect)((()=>{pe(y)}),[y]),(0,d.useEffect)((()=>{we.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,d.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,d.useEffect)((()=>{var r;const o=new Set(xe);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),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!=ge?ge: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=_e(a);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=_e(a);Se(e),s.observe(a,c)}return()=>{s.disconnect()}}),[xe,Ee,ge,t,n]),(0,d.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!be("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&&!be("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let Te=p;const ke=(0,d.useRef)(null);if(i){const e=i({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||W||null,activeAnchor:ge});Te=e?d.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},e):null}else W&&(Te=W);$&&(Te=d.createElement(je,{content:$}));const Ae={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:me(l,he),classNameArrow:a,content:Te,contentWrapperRef:ke,place:G,variant:Y,offset:J,wrapper:se,events:ue,openOnClick:m,positionStrategy:fe,middlewares:g,delayShow:ee,delayHide:ne,float:oe,hidden:le,noArrow:E,clickable:_,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N,style:R,position:L,isOpen:j,defaultIsOpen:P,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,activeAnchor:ge,setActiveAnchor:e=>ve(e),role:V};return d.createElement(Le,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ge({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||ge({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 Ie=window.wp.components,De=({onlineEventLinkDefault:e=""})=>{const t=(0,a.__)("Online event","gatherpress"),[r,i]=(0,n.useState)(e);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},s("eventDetails.postId")),(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"3",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",children:(0,o.jsx)(Ie.Icon,{icon:"video-alt2"})}),(0,o.jsxs)(Ie.FlexItem,{children:[!r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,a.__)("Link available for attendees only.","gatherpress"),children:t}),(0,o.jsx)(Pe,{id:"gatherpress-online-event-tooltip"})]}),r&&(0,o.jsx)("a",{href:r,rel:"noreferrer",target:"_blank",children:t})]})]})};var Me=l(442);const Fe=Me.default||Me,ze=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,o.jsxs)(o.Fragment,{children:[(e||t)&&(0,o.jsxs)(Ie.Flex,{justify:"normal",align:"flex-start",gap:"4",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Ie.Icon,{icon:"location"})}),(0,o.jsxs)(Ie.FlexItem,{children:[e&&(0,o.jsx)("div",{className:"gatherpress-venue__name",children:(0,o.jsx)("strong",{children:Fe(e)})}),t&&(0,o.jsx)("div",{className:"gatherpress-venue__full-address",children:Fe(t)})]})]}),(n||r)&&(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"8",children:[n&&(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"4",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Ie.Icon,{icon:"phone"})}),(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsx)("div",{className:"gatherpress-venue__phone-number",children:n})})]})}),r&&(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"4",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Ie.Icon,{icon:"admin-site-alt3"})}),(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsx)("div",{className:"gatherpress-venue__website",children:(0,o.jsx)("a",{href:r,target:"_blank",rel:"noreferrer noopener",children:r})})})]})})]})]}),Be=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:i=!1,onlineEventLink:l=""})=>(0,o.jsxs)(o.Fragment,{children:[!i&&(0,o.jsx)(ze,{name:e,fullAddress:t,phoneNumber:n,website:r}),i&&(0,o.jsx)(De,{onlineEventLinkDefault:l})]});t()((()=>{let e=document.querySelectorAll('[data-gatherpress_block_name="venue"]');for(let c=0;c array('moment', 'react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '8b87c4e997a656df4746'); + array('moment', 'react-jsx-runtime', 'wp-blocks', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '1e28ca063435d44e0985'); diff --git a/build/editor.js b/build/editor.js index f6bfddf92..d3834240a 100644 --- a/build/editor.js +++ b/build/editor.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]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.domReady;var s=e.n(t);const n=window.wp.data,r=window.moment;var o=e.n(r);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,window.wp.element,window.wp.date,window.ReactJSXRuntime;const d="YYYY-MM-DDTHH:mm:ss",c=o().tz(p()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(d);function p(e=a("eventDetails.dateTime.timezone")){return o().tz.zone(e)?e:(0,i.__)("GMT","gatherpress")}o().tz(c,p()).add(2,"hours").format(d);const w=window.wp.blocks;s()((()=>{const e=(0,n.select)("core/edit-post");if(!e)return;const t=(0,n.dispatch)("core/edit-post");e.isEditorSidebarOpened()?(t.openGeneralSidebar("edit-post/document"),t.toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings")):(t.openGeneralSidebar(),t.toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings")),function(){const e="gatherpress_event_past",t=(0,n.dispatch)("core/notices");t.removeNotice(e),function(){const e=o().tz(a("eventDetails.dateTime.datetime_end"),p());return"gatherpress_event"===(0,n.select)("core/editor")?.getCurrentPostType()&&o().tz(p()).valueOf()>e.valueOf()}()&&t.createNotice("warning",(0,i.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}()})),s()((()=>{Object.keys(a("misc.unregisterBlocks")).forEach((e=>{const t=a("misc.unregisterBlocks")[e];t&&void 0!==(0,w.getBlockType)(t)&&(0,w.unregisterBlockType)(t)}))}))})(); \ No newline at end of file +(()=>{"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 i in s)e.o(s,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.domReady;var s=e.n(t);const i=window.wp.data,n=window.moment;var r=e.n(n);const a=window.wp.i18n;function o(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function d(e,t){if("object"!=typeof GatherPress)return;const s=e.split("."),i=s.pop();s.reduce(((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:e[t]={}}),GatherPress)[i]=t}window.wp.element,window.wp.date,window.ReactJSXRuntime;const c="YYYY-MM-DDTHH:mm:ss",m=r().tz(T()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(c),p=r().tz(m,T()).add(2,"hours").format(c);function T(e=o("eventDetails.dateTime.timezone")){return r().tz.zone(e)?e:(0,a.__)("GMT","gatherpress")}function l(){const e=r().tz(o("eventDetails.dateTime.datetime_end"),T());return"gatherpress_event"===(0,i.select)("core/editor")?.getCurrentPostType()&&r().tz(T()).valueOf()>e.valueOf()}let u=!1;function g(){const e="gatherpress_event_communication",t=(0,i.dispatch)("core/notices"),s=(0,i.select)("core/editor").isSavingPost(),n=(0,i.select)("core/editor").isAutosavingPost();"publish"!==(0,i.select)("core/editor").getEditedPostAttribute("status")||"gatherpress_event"!==(0,i.select)("core/editor")?.getCurrentPostType()||!s||n||l()||u||(u=!0,t.removeNotice(e),t.createNotice("success",(0,a.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{((e,t="")=>{for(const[s,i]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const n=new CustomEvent(e,{detail:i});dispatchEvent(n)}})({setOpen:!0})},label:(0,a.__)("Compose Message","gatherpress")}]})),s||(u=!1)}const v=window.wp.blocks,E={dateTimeStart:o("eventDetails.dateTime.datetime_start")?o("eventDetails.dateTime.datetime_start"):m,dateTimeEnd:o("eventDetails.dateTime.datetime_end")?o("eventDetails.dateTime.datetime_end"):p,timezone:o("eventDetails.dateTime.timezone")},_={setDateTimeStart:e=>(d("eventDetails.dateTime.datetime_start",e),{type:"SET_DATETIME_START",dateTimeStart:e}),setDateTimeEnd:e=>(d("eventDetails.dateTime.datetime_end",e),{type:"SET_DATETIME_END",dateTimeEnd:e}),setTimezone:e=>(d("eventDetails.dateTime.timezone",e),{type:"SET_TIMEZONE",timezone:e})},h=(0,i.createReduxStore)("gatherpress/datetime",{reducer:(e=E,t)=>{switch(t.type){case"SET_DATETIME_START":return{...e,dateTimeStart:t.dateTimeStart};case"SET_DATETIME_END":return{...e,dateTimeEnd:t.dateTimeEnd};case"SET_TIMEZONE":return{...e,timezone:t.timezone};default:return e}},actions:_,selectors:{getDateTimeStart:e=>e.dateTimeStart,getDateTimeEnd:e=>e.dateTimeEnd,getTimezone:e=>e.timezone}});(0,i.register)(h),s()((()=>{const e=(0,i.select)("core/edit-post");if(!e)return;const t=(0,i.dispatch)("core/edit-post");e.isEditorSidebarOpened()?(t.openGeneralSidebar("edit-post/document"),t.toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings")):(t.openGeneralSidebar(),t.toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings")),(0,i.subscribe)(g),function(){const e="gatherpress_event_past",t=(0,i.dispatch)("core/notices");t.removeNotice(e),l()&&t.createNotice("warning",(0,a.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}()})),s()((()=>{Object.keys(o("misc.unregisterBlocks")).forEach((e=>{const t=o("misc.unregisterBlocks")[e];t&&void 0!==(0,v.getBlockType)(t)&&(0,v.unregisterBlockType)(t)}))}))})(); \ No newline at end of file diff --git a/build/panels.asset.php b/build/panels.asset.php index 7110f9cf5..9faf9442e 100644 --- a/build/panels.asset.php +++ b/build/panels.asset.php @@ -1 +1 @@ - array('moment', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '052bad33e07326687357'); + array('moment', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '17c90c35b12c75bbd0cd'); diff --git a/build/panels.js b/build/panels.js index 3ac0199b7..ec9de9e26 100644 --- a/build/panels.js +++ b/build/panels.js @@ -1,2 +1,2 @@ -(()=>{"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]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.i18n,s=window.wp.data,n=window.wp.components,r=window.wp.plugins,i=window.wp.editPost,a=window.moment;var o=e.n(a);const l=window.wp.apiFetch;var c=e.n(l);const d=window.wp.element;function u(){(0,s.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function m(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 s=e.split("."),n=s.pop();s.reduce(((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:e[t]={}}),GatherPress)[n]=t}const g=window.wp.date,h=window.ReactJSXRuntime,_="YYYY-MM-DDTHH:mm:ss",v="YYYY-MM-DD HH:mm:ss",x=o().tz(b()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(_),f=o().tz(x,b()).add(2,"hours").format(_);function j(){return w(m("settings.dateFormat"))+" "+w(m("settings.timeFormat"))}function b(e=m("eventDetails.dateTime.timezone")){return o().tz.zone(e)?e:(0,t.__)("GMT","gatherpress")}function S(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,s=e.replace(t,"$1");return s!==e?"UTC"+s+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=o().tz(m("eventDetails.dateTime.datetime_end"),b()).valueOf(),s=o().tz(e,b()).valueOf();s>=t&&P(o().tz(s,b()).add(2,"hours").format(_))}(e),p("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),u()}function P(e,t=null){!function(e){const t=o().tz(m("eventDetails.dateTime.datetime_start"),b()).valueOf(),s=o().tz(e,b()).valueOf();s<=t&&T(o().tz(s,b()).subtract(2,"hours").format(_))}(e),p("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),u()}function D(){const e=(0,s.select)("core/editor").isSavingPost(),n=(0,s.select)("core/editor").isAutosavingPost();k()&&e&&!n&&c()({path:m("urls.eventRestApi")+"/datetime",method:"POST",data:{post_id:m("eventDetails.postId"),datetime_start:o().tz(m("eventDetails.dateTime.datetime_start"),b()).format(v),datetime_end:o().tz(m("eventDetails.dateTime.datetime_end"),b()).format(v),timezone:m("eventDetails.dateTime.timezone"),_wpnonce:m("misc.nonce")}}).then((()=>{!function(){const e="gatherpress_event_communication",n=(0,s.dispatch)("core/notices");n.removeNotice(e),"publish"!==(0,s.select)("core/editor").getEditedPostAttribute("status")||z()||n.createNotice("success",(0,t.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{C({setOpen:!0})},label:(0,t.__)("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,s,n)=>{const r=n[s-1];return e in t&&"\\"!==r?t[e]:e})).join("")}const C=(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)}},E=(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 k(){return"gatherpress_event"===(0,s.select)("core/editor")?.getCurrentPostType()}function z(){const e=o().tz(m("eventDetails.dateTime.datetime_end"),b());return"gatherpress_event"===(0,s.select)("core/editor")?.getCurrentPostType()&&o().tz(b()).valueOf()>e.valueOf()}function N(){const e="gatherpress_event_past",n=(0,s.dispatch)("core/notices");n.removeNotice(e),z()&&n.createNotice("warning",(0,t.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const y=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),i=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let a=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_anonymous_rsvp),[]);i&&(a=m("settings.enableAnonymousRsvp"));const[o,l]=(0,d.useState)(a),c=(0,d.useCallback)((t=>{const s={gatherpress_enable_anonymous_rsvp:Number(t)};l(t),e({meta:s}),r()}),[e,r]);return(0,d.useEffect)((()=>{i&&0!==a&&c(a)}),[i,a,c]),(0,h.jsx)(n.CheckboxControl,{label:(0,t.__)("Enable Anonymous RSVP","gatherpress"),checked:o,onChange:e=>{c(e)}})},O=()=>(0,h.jsx)("section",{children:(0,h.jsx)(y,{})}),A=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),i=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let a=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_initial_decline),[]);i&&(a=m("settings.enableInitialDecline"));const[o,l]=(0,d.useState)(a),c=(0,d.useCallback)((t=>{const s={gatherpress_enable_initial_decline:Number(t)};l(t),e({meta:s}),r()}),[e,r]);return(0,d.useEffect)((()=>{i&&0!==a&&c(a)}),[i,a,c]),(0,h.jsx)(n.CheckboxControl,{label:(0,t.__)('Enable Immediate "Not Attending" Option for Attendees',"gatherpress"),checked:o,onChange:e=>{c(e)}})},M=()=>(0,h.jsx)("section",{children:(0,h.jsx)(A,{})}),F=e=>{const{dateTimeStart:t}=e;return o().tz(t,b()).format(j())},Y=e=>{const{dateTimeEnd:t}=e;return o().tz(t,b()).format(j())},L=e=>{const{dateTimeStart:t,setDateTimeStart:s}=e,r=(0,g.getSettings)(),i=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,h.jsx)(n.DateTimePicker,{currentDate:t,onChange:e=>T(e,s),is12Hour:i})},R=e=>{const{dateTimeEnd:t,setDateTimeEnd:s}=e,r=(0,g.getSettings)(),i=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,h.jsx)(n.DateTimePicker,{currentDate:t,onChange:e=>P(e,s),is12Hour:i})},I=e=>{const{dateTimeStart:s,setDateTimeStart:r}=e;return(0,d.useEffect)((()=>{r(o().tz(function(){let e=m("eventDetails.dateTime.datetime_start");return e=""!==e?o().tz(e,b()).format(_):x,p("eventDetails.dateTime.datetime_start",e),e}(),b()).format(_)),C({setDateTimeStart:s}),N()})),(0,h.jsx)(n.PanelRow,{children:(0,h.jsxs)(n.Flex,{direction:"column",gap:"0",children:[(0,h.jsx)(n.FlexItem,{children:(0,h.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,t.__)("Start","gatherpress")})}),(0,h.jsx)(n.FlexItem,{children:(0,h.jsx)(n.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,h.jsx)(n.Button,{id:"gatherpress-datetime-start",onClick:t,"aria-expanded":e,isLink:!0,children:(0,h.jsx)(F,{dateTimeStart:s})}),renderContent:()=>(0,h.jsx)(L,{dateTimeStart:s,setDateTimeStart:r})})})]})})},H=e=>{const{dateTimeEnd:s,setDateTimeEnd:r}=e;return(0,d.useEffect)((()=>{r(o().tz(function(){let e=m("eventDetails.dateTime.datetime_end");return e=""!==e?o().tz(e,b()).format(_):f,p("eventDetails.dateTime.datetime_end",e),e}(),b()).format(_)),C({setDateTimeEnd:s}),N()})),(0,h.jsx)(n.PanelRow,{children:(0,h.jsxs)(n.Flex,{direction:"column",gap:"0",children:[(0,h.jsx)(n.FlexItem,{children:(0,h.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,t.__)("End","gatherpress")})}),(0,h.jsx)(n.FlexItem,{children:(0,h.jsx)(n.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,h.jsx)(n.Button,{id:"gatherpress-datetime-end",onClick:t,"aria-expanded":e,isLink:!0,children:(0,h.jsx)(Y,{dateTimeEnd:s})}),renderContent:()=>(0,h.jsx)(R,{dateTimeEnd:s,setDateTimeEnd:r})})})]})})},$=e=>{const{timezone:s,setTimezone:r}=e,i=m("misc.timezoneChoices");return(0,d.useEffect)((()=>{r(m("eventDetails.dateTime.timezone"))}),[r]),(0,d.useEffect)((()=>{C({setTimezone:m("eventDetails.dateTime.timezone")})})),(0,h.jsx)(n.PanelRow,{children:(0,h.jsx)(n.SelectControl,{label:(0,t.__)("Time Zone","gatherpress"),value:S(s),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,s=e.replace(t,"$1");if(s!==e){const n=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"),s+n+r}return e}(e),r(e),p("eventDetails.dateTime.timezone",e),u()},children:Object.keys(i).map((e=>(0,h.jsx)("optgroup",{label:e,children:Object.keys(i[e]).map((t=>(0,h.jsx)("option",{value:t,children:i[e][t]},t)))},e)))})})},G=()=>{const[e,n]=(0,d.useState)(),[r,i]=(0,d.useState)(),[a,o]=(0,d.useState)();return(0,s.subscribe)(D),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("h3",{children:(0,t.__)("Date & time","gatherpress")}),(0,h.jsx)(I,{dateTimeStart:e,setDateTimeStart:n}),(0,h.jsx)(H,{dateTimeEnd:r,setDateTimeEnd:i}),(0,h.jsx)($,{timezone:a,setTimezone:o})]})},W=()=>(0,h.jsx)("section",{children:(0,h.jsx)(G,{})}),B=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),i=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let a=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_guest_limit),[]);i&&(a=m("settings.maxGuestLimit")),!1===a&&(a=0);const[o,l]=(0,d.useState)(a),c=(0,d.useCallback)((t=>{const s={gatherpress_max_guest_limit:Number(t)};l(t),e({meta:s}),r()}),[e,r]);return(0,d.useEffect)((()=>{i&&0!==a&&c(a)}),[i,a,c]),(0,h.jsx)(n.__experimentalNumberControl,{label:(0,t.__)("Maximum Number of Guests","gatherpress"),value:o,min:0,max:5,onChange:e=>{c(e)}})},V=()=>(0,h.jsx)("section",{children:(0,h.jsx)(B,{})}),J=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),i=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let a=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_attendance_limit),[]);i&&(a=m("settings.maxAttendanceLimit")),!1===a&&(a=0);const[o,l]=(0,d.useState)(a),c=(0,d.useCallback)((t=>{const s={gatherpress_max_attendance_limit:Number(t)};l(t),e({meta:s}),r()}),[e,r]);return(0,d.useEffect)((()=>{i&&0!==a&&c(a)}),[i,a,c]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(n.__experimentalNumberControl,{label:(0,t.__)("Maximum Attendance Limit","gatherpress"),value:o,min:0,onChange:e=>{c(e)}}),(0,h.jsx)("p",{className:"description",children:(0,t.__)("A value of 0 indicates no limit.","gatherpress")})]})},U=()=>(0,h.jsx)("section",{children:(0,h.jsx)(J,{})}),X=()=>"publish"===(0,s.select)("core/editor").getEditedPostAttribute("status")&&!z()&&(0,h.jsxs)("section",{children:[(0,h.jsx)("h3",{style:{marginBottom:"0.5rem"},children:(0,t.__)("Send an event update","gatherpress")}),(0,h.jsx)(n.Button,{variant:"secondary",onClick:()=>C({setOpen:!0}),children:(0,t.__)("Compose Message","gatherpress")})]}),Z=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[a,o]=(0,d.useState)(i);return E({setOnlineEventLink:o},m("eventDetails.postId")),(0,h.jsx)(n.TextControl,{label:(0,t.__)("Online event link","gatherpress"),value:a,placeholder:(0,t.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{gatherpress_online_event_link:t}}),o(t),C({setOnlineEventLink:t},m("eventDetails.postId")),r()})(t)}})},q=()=>(0,h.jsx)("section",{children:(0,h.jsx)(Z,{})}),K=()=>{const[e,r]=(0,d.useState)(""),[i,a]=(0,d.useState)(""),[o,l]=(0,d.useState)(""),[c,u]=(0,d.useState)(""),[m,p]=(0,d.useState)(!1),[g,_]=(0,d.useState)(""),[v,x]=(0,d.useState)(""),[f,j]=(0,d.useState)(""),b=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:S}=(0,s.useDispatch)("core/editor"),T=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),P=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",T))),D=P?.slug.replace(/^_/,""),[w,E]=(0,d.useState)(""),k=T+":"+w,z=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:w})));(0,d.useEffect)((()=>{var e,s,n,i,o,c;let d={};if(w&&Array.isArray(z)){var m;const e=null!==(m=z[0]?.meta?.gatherpress_venue_information)&&void 0!==m?m:"{}";var p;e&&(d=JSON.parse(e),d.name=null!==(p=z[0]?.title.rendered)&&void 0!==p?p:"")}const g=null!==(e=d?.name)&&void 0!==e?e:(0,t.__)("No venue selected.","gatherpress"),h=null!==(s=d?.fullAddress)&&void 0!==s?s:"",v=null!==(n=d?.phoneNumber)&&void 0!==n?n:"",f=null!==(i=d?.website)&&void 0!==i?i:"",b=null!==(o=d?.latitude)&&void 0!==o?o:"0",S=null!==(c=d?.longitude)&&void 0!==c?c:"0";D&&E(D),j(k?String(k):""),r(g),a(h),l(v),u(f),_(b),x(S),C({setName:g,setFullAddress:h,setPhoneNumber:v,setWebsite:f,setLatitude:b,setLongitude:S,setIsOnlineEventTerm:"online-event"===w})}),[w,z,D,k]);let N=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return N?(N=N.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),N.unshift({value:":",label:(0,t.__)("Choose a venue","gatherpress")})):N=[],(0,h.jsx)(n.PanelRow,{children:(0,h.jsx)(n.SelectControl,{label:(0,t.__)("Venue Selector","gatherpress"),value:f,onChange:e=>{(e=>{j(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];b({_gatherpress_venue:t}),E(e[1]),S()})(e)},options:N})})},Q=()=>(0,h.jsx)("section",{children:(0,h.jsx)(K,{})});(0,r.registerPlugin)("gatherpress-event-settings",{render:()=>k()&&(0,h.jsx)(i.PluginDocumentSettingPanel,{name:"gatherpress-event-settings",title:(0,t.__)("Event settings","gatherpress"),initialOpen:!0,className:"gatherpress-event-settings",children:(0,h.jsxs)(n.__experimentalVStack,{spacing:6,children:[(0,h.jsx)(W,{}),(0,h.jsx)(Q,{}),(0,h.jsx)(q,{}),(0,h.jsx)(V,{}),(0,h.jsx)(U,{}),(0,h.jsx)(O,{}),(0,h.jsx)(M,{}),(0,h.jsx)(X,{})]})})}),(0,s.dispatch)("core/edit-post").toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings");const ee=window.wp.compose,te=()=>{var e,r,i;const a=(0,s.useDispatch)("core/editor").editPost,o=e=>{const t=JSON.stringify({...l,...e});a({meta:{gatherpress_venue_information:t}})};let l=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));l=l?JSON.parse(l):{};const[c,u]=(0,d.useState)(null!==(e=l.fullAddress)&&void 0!==e?e:""),[m,p]=(0,d.useState)(null!==(r=l.phoneNumber)&&void 0!==r?r:""),[g,_]=(0,d.useState)(null!==(i=l.website)&&void 0!==i?i:"");E({setFullAddress:u,setPhoneNumber:p,setWebsite:_});const v=(0,d.useRef)(o),x=(0,d.useCallback)((()=>{let e=null,s=null;fetch(`https://nominatim.openstreetmap.org/search?q=${c}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,t.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ -(0,t.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((t=>{t.features.length>0&&(e=t.features[0].geometry.coordinates[1],s=t.features[0].geometry.coordinates[0]),v.current({latitude:e,longitude:s})}))}),[c]),f=(0,ee.useDebounce)(x,300);return(0,d.useEffect)((()=>{v.current=o}),[o]),(0,d.useEffect)((()=>{f()}),[c,f]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(n.TextControl,{label:(0,t.__)("Full Address","gatherpress"),value:c,onChange:e=>{C({setFullAddress:e}),o({fullAddress:e})}}),(0,h.jsx)(n.TextControl,{label:(0,t.__)("Phone Number","gatherpress"),value:m,onChange:e=>{C({setPhoneNumber:e}),o({phoneNumber:e})}}),(0,h.jsx)(n.TextControl,{label:(0,t.__)("Website","gatherpress"),value:g,type:"url",onChange:e=>{C({setWebsite:e}),o({website:e})}})]})},se=()=>(0,h.jsx)("section",{children:(0,h.jsx)(te,{})});(0,r.registerPlugin)("gatherpress-venue-settings",{render:()=>"gatherpress_venue"===(0,s.select)("core/editor")?.getCurrentPostType()&&(0,h.jsx)(i.PluginDocumentSettingPanel,{name:"gatherpress-venue-settings",title:(0,t.__)("Venue settings","gatherpress"),initialOpen:!0,className:"gatherpress-venue-settings",children:(0,h.jsx)(n.__experimentalVStack,{spacing:6,children:(0,h.jsx)(se,{})})})}),(0,s.dispatch)("core/edit-post").toggleEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings")})(); \ No newline at end of file +(()=>{"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]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.i18n,s=window.wp.data,n=window.wp.components,r=window.wp.plugins,a=window.wp.editPost,i=window.moment;var o=e.n(i);const l=window.wp.element;function d(){(0,s.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function c(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function u(e,t){if("object"!=typeof GatherPress)return;const s=e.split("."),n=s.pop();s.reduce(((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:e[t]={}}),GatherPress)[n]=t}const m=window.wp.date,p=window.ReactJSXRuntime,g="YYYY-MM-DDTHH:mm:ss",h="YYYY-MM-DD HH:mm:ss",_=o().tz(f()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(g),v=o().tz(_,f()).add(2,"hours").format(g);function x(){return T(c("settings.dateFormat"))+" "+T(c("settings.timeFormat"))}function f(e=c("eventDetails.dateTime.timezone")){return o().tz.zone(e)?e:(0,t.__)("GMT","gatherpress")}function j(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,s=e.replace(t,"$1");return s!==e?"UTC"+s+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function S(e,t=null){!function(e){const t=o().tz(c("eventDetails.dateTime.datetime_end"),f()).valueOf(),s=o().tz(e,f()).valueOf();s>=t&&b(o().tz(s,f()).add(2,"hours").format(g))}(e),u("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),d()}function b(e,t=null){!function(e){const t=o().tz(c("eventDetails.dateTime.datetime_start"),f()).valueOf(),s=o().tz(e,f()).valueOf();s<=t&&S(o().tz(s,f()).subtract(2,"hours").format(g))}(e),u("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),d()}function T(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,s,n)=>{const r=n[s-1];return e in t&&"\\"!==r?t[e]:e})).join("")}function P(){const e=o().tz(c("eventDetails.dateTime.datetime_end"),f());return"gatherpress_event"===(0,s.select)("core/editor")?.getCurrentPostType()&&o().tz(f()).valueOf()>e.valueOf()}function D(){const e="gatherpress_event_past",n=(0,s.dispatch)("core/notices");n.removeNotice(e),P()&&n.createNotice("warning",(0,t.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const w=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_anonymous_rsvp),[]);a&&(i=c("settings.enableAnonymousRsvp"));const[o,d]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_enable_anonymous_rsvp:Number(t)};d(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsx)(n.CheckboxControl,{label:(0,t.__)("Enable Anonymous RSVP","gatherpress"),checked:o,onChange:e=>{u(e)}})},E=()=>(0,p.jsx)("section",{children:(0,p.jsx)(w,{})}),C=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_initial_decline),[]);a&&(i=c("settings.enableInitialDecline"));const[o,d]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_enable_initial_decline:Number(t)};d(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsx)(n.CheckboxControl,{label:(0,t.__)('Enable Immediate "Not Attending" Option for Attendees',"gatherpress"),checked:o,onChange:e=>{u(e)}})},k=()=>(0,p.jsx)("section",{children:(0,p.jsx)(C,{})}),y=e=>{const{dateTimeStart:t}=e;return o().tz(t,f()).format(x())},z=e=>{const{dateTimeEnd:t}=e;return o().tz(t,f()).format(x())},N=e=>{const{dateTimeStart:t,setDateTimeStart:s}=e,r=(0,m.getSettings)(),a=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,p.jsx)(n.DateTimePicker,{currentDate:t,onChange:e=>{S(e,s)},is12Hour:a})},O=e=>{const{dateTimeEnd:t,setDateTimeEnd:s}=e,r=(0,m.getSettings)(),a=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,p.jsx)(n.DateTimePicker,{currentDate:t,onChange:e=>b(e,s),is12Hour:a})},A=()=>{const{dateTimeStart:e}=(0,s.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart()})),[]),{setDateTimeStart:r}=(0,s.useDispatch)("gatherpress/datetime");return(0,l.useEffect)((()=>{r(o().tz(function(){let e=c("eventDetails.dateTime.datetime_start");return e=""!==e?o().tz(e,f()).format(g):_,u("eventDetails.dateTime.datetime_start",e),e}(),f()).format(g)),D()})),(0,p.jsx)(n.PanelRow,{children:(0,p.jsxs)(n.Flex,{direction:"row",gap:"0",children:[(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,t.__)("Start","gatherpress")})}),(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)(n.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,p.jsx)(n.Button,{id:"gatherpress-datetime-start",onClick:s,"aria-expanded":t,isLink:!0,children:(0,p.jsx)(y,{dateTimeStart:e})}),renderContent:()=>(0,p.jsx)(N,{dateTimeStart:e,setDateTimeStart:r})})})]})})},M=()=>{const{dateTimeEnd:e}=(0,s.useSelect)((e=>({dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd()})),[]),{setDateTimeEnd:r}=(0,s.useDispatch)("gatherpress/datetime");return(0,l.useEffect)((()=>{r(o().tz(function(){let e=c("eventDetails.dateTime.datetime_end");return e=""!==e?o().tz(e,f()).format(g):v,u("eventDetails.dateTime.datetime_end",e),e}(),f()).format(g)),D()})),(0,p.jsx)(n.PanelRow,{children:(0,p.jsxs)(n.Flex,{direction:"row",gap:"0",children:[(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,t.__)("End","gatherpress")})}),(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)(n.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,p.jsx)(n.Button,{id:"gatherpress-datetime-end",onClick:s,"aria-expanded":t,isLink:!0,children:(0,p.jsx)(z,{dateTimeEnd:e})}),renderContent:()=>(0,p.jsx)(O,{dateTimeEnd:e,setDateTimeEnd:r})})})]})})},Y=()=>{const{timezone:e}=(0,s.useSelect)((e=>({timezone:e("gatherpress/datetime").getTimezone()})),[]),{setTimezone:r}=(0,s.useDispatch)("gatherpress/datetime"),a=c("misc.timezoneChoices");return(0,l.useEffect)((()=>{r(c("eventDetails.dateTime.timezone"))}),[r]),(0,p.jsx)(n.PanelRow,{children:(0,p.jsx)(n.SelectControl,{label:(0,t.__)("Time Zone","gatherpress"),value:j(e),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,s=e.replace(t,"$1");if(s!==e){const n=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"),s+n+r}return e}(e),r(e),d()},children:Object.keys(a).map((e=>(0,p.jsx)("optgroup",{label:e,children:Object.keys(a[e]).map((t=>(0,p.jsx)("option",{value:t,children:a[e][t]},t)))},e)))})})},F=()=>{const e=(0,s.useDispatch)("core/editor").editPost;let n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_datetime));try{n=n?JSON.parse(n):{}}catch(e){n={}}const{dateTimeStart:r,dateTimeEnd:a,timezone:i}=(0,s.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),timezone:e("gatherpress/datetime").getTimezone()})),[]);return(0,l.useEffect)((()=>{const t=JSON.stringify({...n,dateTimeStart:o().tz(r,i).format(h),dateTimeEnd:o().tz(a,i).format(h),timezone:i});e({meta:{gatherpress_datetime:t}})}),[r,a,i,n,e]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h3",{children:(0,t.__)("Date & time","gatherpress")}),(0,p.jsx)(A,{}),(0,p.jsx)(M,{}),(0,p.jsx)(Y,{})]})},L=()=>(0,p.jsx)("section",{children:(0,p.jsx)(F,{})}),R=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_guest_limit),[]);a&&(i=c("settings.maxGuestLimit")),!1===i&&(i=0);const[o,d]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_max_guest_limit:Number(t)};d(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsx)(n.__experimentalNumberControl,{label:(0,t.__)("Maximum Number of Guests","gatherpress"),value:o,min:0,max:5,onChange:e=>{u(e)}})},I=()=>(0,p.jsx)("section",{children:(0,p.jsx)(R,{})}),H=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_attendance_limit),[]);a&&(i=c("settings.maxAttendanceLimit")),!1===i&&(i=0);const[o,d]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_max_attendance_limit:Number(t)};d(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.__experimentalNumberControl,{label:(0,t.__)("Maximum Attendance Limit","gatherpress"),value:o,min:0,onChange:e=>{u(e)}}),(0,p.jsx)("p",{className:"description",children:(0,t.__)("A value of 0 indicates no limit.","gatherpress")})]})},$=()=>(0,p.jsx)("section",{children:(0,p.jsx)(H,{})}),G=(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)}},J=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}},W=()=>"publish"===(0,s.select)("core/editor").getEditedPostAttribute("status")&&!P()&&(0,p.jsxs)("section",{children:[(0,p.jsx)("h3",{style:{marginBottom:"0.5rem"},children:(0,t.__)("Send an event update","gatherpress")}),(0,p.jsx)(n.Button,{variant:"secondary",onClick:()=>G({setOpen:!0}),children:(0,t.__)("Compose Message","gatherpress")})]}),B=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[i,o]=(0,l.useState)(a);return J({setOnlineEventLink:o},c("eventDetails.postId")),(0,p.jsx)(n.TextControl,{label:(0,t.__)("Online event link","gatherpress"),value:i,placeholder:(0,t.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{gatherpress_online_event_link:t}}),o(t),G({setOnlineEventLink:t},c("eventDetails.postId")),r()})(t)}})},V=()=>(0,p.jsx)("section",{children:(0,p.jsx)(B,{})}),U=()=>{const[e,r]=(0,l.useState)(""),[a,i]=(0,l.useState)(""),[o,d]=(0,l.useState)(""),[c,u]=(0,l.useState)(""),[m,g]=(0,l.useState)(!1),[h,_]=(0,l.useState)(""),[v,x]=(0,l.useState)(""),[f,j]=(0,l.useState)(""),S=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:b}=(0,s.useDispatch)("core/editor"),T=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),P=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",T))),D=P?.slug.replace(/^_/,""),[w,E]=(0,l.useState)(""),C=T+":"+w,k=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:w})));(0,l.useEffect)((()=>{var e,s,n,a,o,l;let c={};if(w&&Array.isArray(k)){var m;const e=null!==(m=k[0]?.meta?.gatherpress_venue_information)&&void 0!==m?m:"{}";var p;e&&(c=JSON.parse(e),c.name=null!==(p=k[0]?.title.rendered)&&void 0!==p?p:"")}const g=null!==(e=c?.name)&&void 0!==e?e:(0,t.__)("No venue selected.","gatherpress"),h=null!==(s=c?.fullAddress)&&void 0!==s?s:"",v=null!==(n=c?.phoneNumber)&&void 0!==n?n:"",f=null!==(a=c?.website)&&void 0!==a?a:"",S=null!==(o=c?.latitude)&&void 0!==o?o:"0",b=null!==(l=c?.longitude)&&void 0!==l?l:"0";D&&E(D),j(C?String(C):""),r(g),i(h),d(v),u(f),_(S),x(b),G({setName:g,setFullAddress:h,setPhoneNumber:v,setWebsite:f,setLatitude:S,setLongitude:b,setIsOnlineEventTerm:"online-event"===w})}),[w,k,D,C]);let y=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return y?(y=y.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),y.unshift({value:":",label:(0,t.__)("Choose a venue","gatherpress")})):y=[],(0,p.jsx)(n.PanelRow,{children:(0,p.jsx)(n.SelectControl,{label:(0,t.__)("Venue Selector","gatherpress"),value:f,onChange:e=>{(e=>{j(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];S({_gatherpress_venue:t}),E(e[1]),b()})(e)},options:y})})},X=()=>(0,p.jsx)("section",{children:(0,p.jsx)(U,{})});(0,r.registerPlugin)("gatherpress-event-settings",{render:()=>"gatherpress_event"===(0,s.select)("core/editor")?.getCurrentPostType()&&(0,p.jsx)(a.PluginDocumentSettingPanel,{name:"gatherpress-event-settings",title:(0,t.__)("Event settings","gatherpress"),initialOpen:!0,className:"gatherpress-event-settings",children:(0,p.jsxs)(n.__experimentalVStack,{spacing:6,children:[(0,p.jsx)(L,{}),(0,p.jsx)(X,{}),(0,p.jsx)(V,{}),(0,p.jsx)(I,{}),(0,p.jsx)($,{}),(0,p.jsx)(E,{}),(0,p.jsx)(k,{}),(0,p.jsx)(W,{})]})})}),(0,s.dispatch)("core/edit-post").toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings");const Z=window.wp.compose,q=()=>{var e,r,a;const i=(0,s.useDispatch)("core/editor").editPost,o=e=>{const t=JSON.stringify({...d,...e});i({meta:{gatherpress_venue_information:t}})};let d=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));d=d?JSON.parse(d):{};const[c,u]=(0,l.useState)(null!==(e=d.fullAddress)&&void 0!==e?e:""),[m,g]=(0,l.useState)(null!==(r=d.phoneNumber)&&void 0!==r?r:""),[h,_]=(0,l.useState)(null!==(a=d.website)&&void 0!==a?a:"");J({setFullAddress:u,setPhoneNumber:g,setWebsite:_});const v=(0,l.useRef)(o),x=(0,l.useCallback)((()=>{let e=null,s=null;fetch(`https://nominatim.openstreetmap.org/search?q=${c}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,t.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ +(0,t.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((t=>{t.features.length>0&&(e=t.features[0].geometry.coordinates[1],s=t.features[0].geometry.coordinates[0]),v.current({latitude:e,longitude:s})}))}),[c]),f=(0,Z.useDebounce)(x,300);return(0,l.useEffect)((()=>{v.current=o}),[o]),(0,l.useEffect)((()=>{f()}),[c,f]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.TextControl,{label:(0,t.__)("Full Address","gatherpress"),value:c,onChange:e=>{G({setFullAddress:e}),o({fullAddress:e})}}),(0,p.jsx)(n.TextControl,{label:(0,t.__)("Phone Number","gatherpress"),value:m,onChange:e=>{G({setPhoneNumber:e}),o({phoneNumber:e})}}),(0,p.jsx)(n.TextControl,{label:(0,t.__)("Website","gatherpress"),value:h,type:"url",onChange:e=>{G({setWebsite:e}),o({website:e})}})]})},K=()=>(0,p.jsx)("section",{children:(0,p.jsx)(q,{})});(0,r.registerPlugin)("gatherpress-venue-settings",{render:()=>"gatherpress_venue"===(0,s.select)("core/editor")?.getCurrentPostType()&&(0,p.jsx)(a.PluginDocumentSettingPanel,{name:"gatherpress-venue-settings",title:(0,t.__)("Venue settings","gatherpress"),initialOpen:!0,className:"gatherpress-venue-settings",children:(0,p.jsx)(n.__experimentalVStack,{spacing:6,children:(0,p.jsx)(K,{})})})}),(0,s.dispatch)("core/edit-post").toggleEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings")})(); \ No newline at end of file diff --git a/build/profile.asset.php b/build/profile.asset.php index eef673e6a..6b9583c4d 100644 --- a/build/profile.asset.php +++ b/build/profile.asset.php @@ -1 +1 @@ - array('moment', 'react-jsx-runtime', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => 'd49ca90aca7d5b0dc9d8'); + array('moment', 'react-jsx-runtime', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => '39b19a94954c79b35d95'); diff --git a/build/profile.js b/build/profile.js index 58598c549..03cfb94e2 100644 --- a/build/profile.js +++ b/build/profile.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.moment;var n=e.n(t);window.wp.data,window.wp.apiFetch;const r=window.wp.i18n,o=window.wp.element,a=window.wp.date,s=window.ReactJSXRuntime,d=e=>{const{name:t,value:n}=e.attrs,[r,d]=(0,o.useState)(n);return document.querySelector(`[name="${t}"]`).addEventListener("input",(e=>{d(e.target.value)}),{once:!0}),(0,s.jsx)(s.Fragment,{children:r&&(0,a.format)(r)})},i="YYYY-MM-DDTHH:mm:ss",c=n().tz(u()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(i);function u(e=function(){if("object"==typeof GatherPress)return"eventDetails.dateTime.timezone".split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}()){return n().tz.zone(e)?e:(0,r.__)("GMT","gatherpress")}n().tz(c,u()).add(2,"hours").format(i),function(){const e=document.querySelectorAll('[data-gatherpress_component_name="datetime-preview"]');for(let t=0;t{"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.moment;var n=e.n(t);const r=window.wp.i18n,o=window.wp.element;window.wp.data;const a=window.wp.date,s=window.ReactJSXRuntime,d=e=>{const{name:t,value:n}=e.attrs,[r,d]=(0,o.useState)(n);return document.querySelector(`[name="${t}"]`).addEventListener("input",(e=>{d(e.target.value)}),{once:!0}),(0,s.jsx)(s.Fragment,{children:r&&(0,a.format)(r)})},c="YYYY-MM-DDTHH:mm:ss",i=n().tz(u()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(c);function u(e=function(){if("object"==typeof GatherPress)return"eventDetails.dateTime.timezone".split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}()){return n().tz.zone(e)?e:(0,r.__)("GMT","gatherpress")}n().tz(i,u()).add(2,"hours").format(c),function(){const e=document.querySelectorAll('[data-gatherpress_component_name="datetime-preview"]');for(let t=0;t array('lodash', 'moment', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => 'f81503acf6676ea16a8b'); + array('lodash', 'moment', 'react-jsx-runtime', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => '8a1f45bc688b27040ee9'); diff --git a/build/settings.js b/build/settings.js index d4ffcc894..dc478832c 100644 --- a/build/settings.js +++ b/build/settings.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.wp.element,n=window.lodash,r=window.wp.components,s=window.wp.i18n,o=window.wp.coreData,a=window.wp.data,i=window.ReactJSXRuntime,l=e=>{var l,d;const{name:u,option:c,value:p,fieldOptions:m}=e.attrs,g=1!==m.limit,[w,h]=(0,t.useState)(null!==(l=JSON.parse(p))&&void 0!==l?l:"[]"),{contentList:v}=(0,a.useSelect)((e=>{const{getEntityRecords:t}=e(o.store);return{contentList:t("user"!==m.type?"postType":"root",m.type||"post",{per_page:-1,context:"view"})}}),[m.type]),_=null!==(d=v?.reduce(((e,t)=>({...e,[t.title?.rendered||t.name]:t})),{}))&&void 0!==d?d:{};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.FormTokenField,{label:m.label||(0,s.__)("Select Posts","gatherpress"),name:u,value:w&&w.map((e=>({id:e.id,slug:e.slug,value:e.title?.rendered||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,n.includes)(t,null))return!1;h(t)},maxSuggestions:m.max_suggestions||20,maxLength:m.limit||0,__experimentalShowHowTo:g},c),!1===g&&(0,i.jsx)("p",{className:"description",children:(0,s.__)("Choose only one item.","gatherpress")}),(0,i.jsx)("input",{type:"hidden",id:c,name:u,value:w&&JSON.stringify(w.map((e=>({id:e.id,slug:e.slug,value:e.title?.rendered||e.name||e.value}))))})]})},d=window.moment;var u=e.n(d);window.wp.apiFetch;const c=window.wp.date,p=e=>{const{name:n,value:r}=e.attrs,[s,o]=(0,t.useState)(r);return document.querySelector(`[name="${n}"]`).addEventListener("input",(e=>{o(e.target.value)}),{once:!0}),(0,i.jsx)(i.Fragment,{children:s&&(0,c.format)(s)})},m="YYYY-MM-DDTHH:mm:ss",g=u().tz(w()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(m);function w(e=function(){if("object"==typeof GatherPress)return"eventDetails.dateTime.timezone".split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}()){return u().tz.zone(e)?e:(0,s.__)("GMT","gatherpress")}u().tz(g,w()).add(2,"hours").format(m);const h=e=>{const{name:n,value:r,suffix:s}=e.attrs,[o,a]=(0,t.useState)(r);return document.querySelector(`[name="${n}"]`).addEventListener("input",(e=>{a(e.target.value)}),{once:!0}),(0,i.jsxs)(i.Fragment,{children:[window.GatherPress.urls.siteUrl+"/",(0,i.jsx)("strong",{children:o}),"/"+s]})},v=document.querySelectorAll('[data-gatherpress_component_name="autocomplete"]');for(let e=0;e{"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.wp.element,n=window.lodash,r=window.wp.components,o=window.wp.i18n,s=window.wp.coreData,a=window.wp.data,i=window.ReactJSXRuntime,l=e=>{var l,d;const{name:u,option:c,value:m,fieldOptions:p}=e.attrs,g=1!==p.limit,[w,h]=(0,t.useState)(null!==(l=JSON.parse(m))&&void 0!==l?l:"[]"),{contentList:v}=(0,a.useSelect)((e=>{const{getEntityRecords:t}=e(s.store);return{contentList:t("user"!==p.type?"postType":"root",p.type||"post",{per_page:-1,context:"view"})}}),[p.type]),_=null!==(d=v?.reduce(((e,t)=>({...e,[t.title?.rendered||t.name]:t})),{}))&&void 0!==d?d:{};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.FormTokenField,{label:p.label||(0,o.__)("Select Posts","gatherpress"),name:u,value:w&&w.map((e=>({id:e.id,slug:e.slug,value:e.title?.rendered||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,n.includes)(t,null))return!1;h(t)},maxSuggestions:p.max_suggestions||20,maxLength:p.limit||0,__experimentalShowHowTo:g},c),!1===g&&(0,i.jsx)("p",{className:"description",children:(0,o.__)("Choose only one item.","gatherpress")}),(0,i.jsx)("input",{type:"hidden",id:c,name:u,value:w&&JSON.stringify(w.map((e=>({id:e.id,slug:e.slug,value:e.title?.rendered||e.name||e.value}))))})]})},d=window.moment;var u=e.n(d);function c(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const m=window.wp.date,p=e=>{const{name:n,value:r}=e.attrs,[o,s]=(0,t.useState)(r);return document.querySelector(`[name="${n}"]`).addEventListener("input",(e=>{s(e.target.value)}),{once:!0}),(0,i.jsx)(i.Fragment,{children:o&&(0,m.format)(o)})},g="YYYY-MM-DDTHH:mm:ss",w=u().tz(h()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(g);function h(e=c("eventDetails.dateTime.timezone")){return u().tz.zone(e)?e:(0,o.__)("GMT","gatherpress")}u().tz(w,h()).add(2,"hours").format(g);const v=e=>{const{name:n,value:r,suffix:o}=e.attrs,[s,a]=(0,t.useState)(r),l=document.querySelector(`[name="${n}"]`),d=c("urls.homeUrl");return l.addEventListener("input",(e=>{a(e.target.value)}),{once:!0}),(0,i.jsxs)(i.Fragment,{children:[d+"/",(0,i.jsx)("strong",{children:s}),"/"+o]})},_=document.querySelectorAll('[data-gatherpress_component_name="autocomplete"]');for(let e=0;e<_.length;e++){const n=JSON.parse(_[e].dataset.gatherpress_component_attrs);(0,t.createRoot)(_[e]).render((0,i.jsx)(l,{attrs:n}))}!function(){const e=document.querySelectorAll('[data-gatherpress_component_name="datetime-preview"]');for(let n=0;ndatetime_route(), $this->email_route(), $this->rsvp_route(), $this->events_list_route(), ); } - /** - * Define the REST route for updating event date and time. - * - * This method sets up the REST route for updating the date and time of an event. - * - * @since 1.0.0 - * - * @return array The REST route configuration. - */ - protected function datetime_route(): array { - return array( - 'route' => 'datetime', - 'args' => array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'update_datetime' ), - 'permission_callback' => static function (): bool { - return current_user_can( 'edit_posts' ); - }, - 'args' => array( - 'post_id' => array( - 'required' => true, - 'validate_callback' => array( $this, 'validate_event_post_id' ), - ), - 'datetime_start' => array( - 'required' => true, - 'validate_callback' => array( $this, 'validate_datetime' ), - ), - 'datetime_end' => array( - 'required' => true, - 'validate_callback' => array( $this, 'validate_datetime' ), - ), - 'timezone' => array( - 'required' => false, - 'validate_callback' => array( $this, 'validate_timezone' ), - ), - ), - ), - ); - } - /** * Define the REST route for sending event-related emails. * @@ -374,35 +333,6 @@ public function validate_timezone( string $param ): bool { return in_array( Utility::maybe_convert_utc_offset( $param ), Utility::list_timezone_and_utc_offsets(), true ); } - /** - * Update the custom event table with start and end Datetime. - * - * This method is used to update the custom event table with new start and end Datetimes for a specific event. - * It checks the user's capability to edit posts before making any changes. If the user doesn't have the required - * capability, the method returns a response with 'success' set to false. - * - * @since 1.0.0 - * - * @param WP_REST_Request $request Contains data from the request. - * @return WP_REST_Response The response indicating the success of the operation. - * - * @throws Exception When an exception occurs during the process. - */ - public function update_datetime( WP_REST_Request $request ): WP_REST_Response { - $params = wp_parse_args( $request->get_params(), $request->get_default_params() ); - $params['timezone'] = Utility::maybe_convert_utc_offset( $params['timezone'] ); - $event = new Event( $params['post_id'] ); - - unset( $params['post_id'] ); - - $success = $event->save_datetimes( $params ); - $response = array( - 'success' => $success, - ); - - return new WP_REST_Response( $response ); - } - /** * Send an event email notification to members. * diff --git a/includes/core/classes/class-event-setup.php b/includes/core/classes/class-event-setup.php index 163daeef9..0a94f3448 100644 --- a/includes/core/classes/class-event-setup.php +++ b/includes/core/classes/class-event-setup.php @@ -55,6 +55,7 @@ protected function setup_hooks(): void { add_action( 'init', array( $this, 'register_post_type' ) ); add_action( 'init', array( $this, 'register_post_meta' ) ); add_action( 'delete_post', array( $this, 'delete_event' ) ); + add_action( 'wp_after_insert_post', array( $this, 'set_datetimes' ) ); add_action( sprintf( 'save_post_%s', Event::POST_TYPE ), array( $this, 'check_waiting_list' ) ); add_action( sprintf( 'manage_%s_posts_custom_column', Event::POST_TYPE ), @@ -184,6 +185,59 @@ public static function get_localized_post_type_slug(): string { */ public function register_post_meta(): void { $post_meta = array( + 'gatherpress_datetime' => array( + 'auth_callback' => static function () { + return current_user_can( 'edit_posts' ); // @codeCoverageIgnore + }, + 'sanitize_callback' => 'sanitize_text_field', + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + ), + 'gatherpress_datetime_start' => array( + 'auth_callback' => function () { + return current_user_can( 'edit_posts' ); + }, + 'sanitize_callback' => 'sanitize_text_field', + 'show_in_rest' => true, + 'single' => true, + ), + 'gatherpress_datetime_start_gmt' => array( + 'auth_callback' => function () { + return current_user_can( 'edit_posts' ); + }, + 'sanitize_callback' => 'sanitize_text_field', + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + ), + 'gatherpress_datetime_end' => array( + 'auth_callback' => function () { + return current_user_can( 'edit_posts' ); + }, + 'sanitize_callback' => 'sanitize_text_field', + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + ), + 'gatherpress_datetime_end_gmt' => array( + 'auth_callback' => function () { + return current_user_can( 'edit_posts' ); + }, + 'sanitize_callback' => 'sanitize_text_field', + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + ), + 'gatherpress_timezone' => array( + 'auth_callback' => function () { + return current_user_can( 'edit_posts' ); + }, + 'sanitize_callback' => 'sanitize_text_field', + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + ), 'gatherpress_max_guest_limit' => array( 'auth_callback' => function () { return current_user_can( 'edit_posts' ); @@ -415,4 +469,41 @@ public function set_event_archive_labels( array $post_states, WP_Post $post ): a return $post_states; } + + /** + * Set the date and time metadata for an event post. + * + * This method checks if the given post ID is for an event post, retrieves the + * associated 'gatherpress_datetime' metadata, and processes the date/time and + * timezone information. It then saves the event's date and time details. + * + * @since 1.0.0 + * + * @param int $post_id The ID of the post being saved. + * + * @return void + */ + public function set_datetimes( int $post_id ): void { + if ( Event::POST_TYPE !== get_post_type( $post_id ) ) { + return; + } + + $data = get_post_meta( $post_id, 'gatherpress_datetime', true ); + + if ( empty( $data ) ) { + return; + } + + $data = json_decode( (string) $data, true ) ?? array(); + + $event = new Event( $post_id ); + $params = array( + 'post_id' => $post_id, + 'datetime_start' => $data['dateTimeStart'] ?? '', + 'datetime_end' => $data['dateTimeEnd'] ?? '', + 'timezone' => $data['timezone'] ?? '', + ); + + $event->save_datetimes( $params ); + } } diff --git a/includes/core/classes/class-event.php b/includes/core/classes/class-event.php index 0de4c76b2..535e72418 100644 --- a/includes/core/classes/class-event.php +++ b/includes/core/classes/class-event.php @@ -685,11 +685,26 @@ function ( $key ) { $fields, array( 'post_id' => $fields['post_id'] ) ); + delete_transient( sprintf( self::DATETIME_CACHE_KEY, $fields['post_id'] ) ); } else { $value = $wpdb->insert( $table, $fields ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery } + foreach ( $fields as $key => $field ) { + if ( 'post_id' === $key ) { + continue; + } + + $meta_key = sprintf( 'gatherpress_%s', sanitize_key( $key ) ); + + update_post_meta( + $fields['post_id'], + $meta_key, + sanitize_text_field( $field ) + ); + } + return (bool) $value; } diff --git a/package-lock.json b/package-lock.json index 8d7a35ac8..2410d54da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,7 @@ "@wordpress/scripts": "^28.4.0", "@wp-playground/cli": "^0.9.32", "classnames": "^2.5.1", + "clsx": "^2.1.1", "dotenv": "^16.4.5", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.1", diff --git a/package.json b/package.json index eaa857312..387918f38 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "@wordpress/scripts": "^28.4.0", "@wp-playground/cli": "^0.9.32", "classnames": "^2.5.1", + "clsx": "^2.1.1", "dotenv": "^16.4.5", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.1", diff --git a/src/blocks/event-date/block.json b/src/blocks/event-date/block.json index 9ae6f03ec..ee221ddcd 100644 --- a/src/blocks/event-date/block.json +++ b/src/blocks/event-date/block.json @@ -1,12 +1,14 @@ { "$schema": "https://schemas.wp.org/trunk/block.json", - "apiVersion": 2, + "apiVersion": 3, "name": "gatherpress/event-date", - "version": "1.0.1", + "version": "2.0.0", "title": "Event Date", "category": "gatherpress", "icon": "clock", - "example": {}, + "example": { + "viewportWidth": 350 + }, "description": "Displays the date and time for an event.", "attributes": { "eventEnd": { @@ -14,10 +16,54 @@ }, "eventStart": { "type": "string" + }, + "textAlign": { + "type": "string" } }, "supports": { - "html": false + "html": false, + "color": { + "gradients": true, + "link": true, + "__experimentalDefaultControls": { + "background": true, + "text": true, + "link": true + } + }, + "spacing": { + "margin": true, + "padding": true + }, + "typography": { + "fontSize": true, + "lineHeight": true, + "__experimentalFontFamily": true, + "__experimentalFontWeight": true, + "__experimentalFontStyle": true, + "__experimentalTextTransform": true, + "__experimentalTextDecoration": true, + "__experimentalLetterSpacing": true, + "__experimentalDefaultControls": { + "fontSize": true + } + }, + "interactivity": { + "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + } }, "textdomain": "gatherpress", "editorScript": "file:./index.js", diff --git a/src/blocks/event-date/edit.js b/src/blocks/event-date/edit.js index f20ecf1b8..8981e2e96 100644 --- a/src/blocks/event-date/edit.js +++ b/src/blocks/event-date/edit.js @@ -2,39 +2,41 @@ * External dependencies. */ import moment from 'moment'; +import clsx from 'clsx'; /** * WordPress dependencies. */ import { __, sprintf } from '@wordpress/i18n'; -import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; -import { Flex, FlexItem, Icon, PanelBody } from '@wordpress/components'; -import { useState } from '@wordpress/element'; +import { + AlignmentToolbar, + BlockControls, + InspectorControls, + useBlockProps, +} from '@wordpress/block-editor'; +import { PanelBody } from '@wordpress/components'; +import { useSelect } from '@wordpress/data'; /** * Internal dependencies. */ -import { Listener } from '../../helpers/broadcasting'; import { convertPHPToMomentFormat, - defaultDateTimeEnd, - defaultDateTimeStart, - getTimeZone, + getTimezone, getUtcOffset, } from '../../helpers/datetime'; -import EditCover from '../../components/EditCover'; import DateTimeRange from '../../components/DateTimeRange'; import { getFromGlobal, isSinglePostInEditor } from '../../helpers/globals'; /** * Similar to get_display_datetime method in class-event.php. * - * @param {string} start - * @param {string} end - * @param {string} tz + * @param {string} dateTimeStart + * @param {string} dateTimeEnd + * @param {string} timezone * @return {string} Displayed date. */ -const displayDateTime = (start, end, tz) => { +const displayDateTime = (dateTimeStart, dateTimeEnd, timezone) => { const dateFormat = convertPHPToMomentFormat( getFromGlobal('settings.dateFormat') ); @@ -43,12 +45,13 @@ const displayDateTime = (start, end, tz) => { ); const timeZoneFormat = getFromGlobal('settings.showTimezone') ? 'z' : ''; const startFormat = dateFormat + ' ' + timeFormat; - const timeZone = getTimeZone(tz); + const timeZone = getTimezone(timezone); + let endFormat = dateFormat + ' ' + timeFormat + ' ' + timeZoneFormat; if ( - moment.tz(start, timeZone).format(dateFormat) === - moment.tz(end, timeZone).format(dateFormat) + moment.tz(dateTimeStart, timeZone).format(dateFormat) === + moment.tz(dateTimeEnd, timeZone).format(dateFormat) ) { endFormat = timeFormat + ' ' + timeZoneFormat; } @@ -56,8 +59,8 @@ const displayDateTime = (start, end, tz) => { return sprintf( /* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ __('%1$s to %2$s %3$s', 'gatherpress'), - moment.tz(start, timeZone).format(startFormat), - moment.tz(end, timeZone).format(endFormat), + moment.tz(dateTimeStart, timeZone).format(startFormat), + moment.tz(dateTimeEnd, timeZone).format(endFormat), getUtcOffset(timeZone) ); }; @@ -66,51 +69,60 @@ const displayDateTime = (start, end, tz) => { * Edit component for the GatherPress Event Date block. * * This component represents the editable view of the GatherPress Event Date block - * in the WordPress block editor. It manages the state of date, time, and timezone - * for the block and renders the user interface accordingly. The component includes - * an icon, displays the formatted date and time, and provides controls to edit the - * date and time range via the DateTimeRange component in the InspectorControls. + * in the WordPress block editor. It manages the state of the start and end date, + * time, and timezone for the block, and renders the user interface accordingly. + * The component includes a BlockControls toolbar, displays the formatted date and + * time, and provides controls for editing the date and time range via the + * DateTimeRange component within InspectorControls. * * @since 1.0.0 * + * @param {Object} root0 The props passed to the Edit component. + * @param {Object} root0.attributes The block attributes. + * @param {string} root0.attributes.textAlign The text alignment for the block. + * @param {Function} root0.setAttributes Function to set block attributes. + * * @return {JSX.Element} The rendered Edit component for the GatherPress Event Date block. * * @see {@link DateTimeRange} - Component for editing date and time range. - * @see {@link EditCover} - Component for displaying a cover over the block. + * @see {@link AlignmentToolbar} - Toolbar for text alignment control. * @see {@link useBlockProps} - Custom hook for block props. * @see {@link displayDateTime} - Function for formatting and displaying date and time. - * @see {@link Listener} - Function for adding event listeners. */ -const Edit = () => { - const blockProps = useBlockProps(); - const [dateTimeStart, setDateTimeStart] = useState(defaultDateTimeStart); - const [dateTimeEnd, setDateTimeEnd] = useState(defaultDateTimeEnd); - const [timezone, setTimezone] = useState(getTimeZone()); +const Edit = ({ attributes: { textAlign }, setAttributes }) => { + const blockProps = useBlockProps({ + className: clsx({ + [`has-text-align-${textAlign}`]: textAlign, + }), + }); - Listener({ setDateTimeEnd, setDateTimeStart, setTimezone }); + const { dateTimeStart, dateTimeEnd, timezone } = useSelect( + (select) => ({ + dateTimeStart: select('gatherpress/datetime').getDateTimeStart(), + dateTimeEnd: select('gatherpress/datetime').getDateTimeEnd(), + timezone: select('gatherpress/datetime').getTimezone(), + }), + [] + ); return (
- - - - - - - {displayDateTime(dateTimeStart, dateTimeEnd, timezone)} - - {isSinglePostInEditor() && ( - - - - - - )} - - + + + setAttributes({ textAlign: newAlign }) + } + /> + + {displayDateTime(dateTimeStart, dateTimeEnd, timezone)} + {isSinglePostInEditor() && ( + + + + + + )}
); }; diff --git a/src/blocks/event-date/render.php b/src/blocks/event-date/render.php index 7a7fe3979..7b01ff8ca 100644 --- a/src/blocks/event-date/render.php +++ b/src/blocks/event-date/render.php @@ -15,14 +15,5 @@ $gatherpress_event = new Event( get_the_ID() ); ?>
> -
-
-
-
-
-
- get_display_datetime() ); ?> -
-
-
+ get_display_datetime() ); ?>
diff --git a/src/blocks/event-date/style.scss b/src/blocks/event-date/style.scss index 3b5158b16..b26778114 100644 --- a/src/blocks/event-date/style.scss +++ b/src/blocks/event-date/style.scss @@ -1,18 +1,4 @@ -@import "../mixins"; - -.gatherpress-event-date { - &__icon { - align-items: flex-start; - display: flex; - } - - &__item { - align-items: center; - display: flex; - gap: 0.75rem; - } - - &__row { - display: flex; - } +.wp-block-gatherpress-event-date { + // This block has customizable padding, border-box makes that more predictable. + box-sizing: border-box; } diff --git a/src/components/DateTime.js b/src/components/DateTime.js index 8321d7d44..4f90b4ba8 100644 --- a/src/components/DateTime.js +++ b/src/components/DateTime.js @@ -12,7 +12,7 @@ import { updateDateTimeStart, updateDateTimeEnd, dateTimeLabelFormat, - getTimeZone, + getTimezone, } from '../helpers/datetime'; /** @@ -30,7 +30,7 @@ export const DateTimeStartLabel = (props) => { const { dateTimeStart } = props; return moment - .tz(dateTimeStart, getTimeZone()) + .tz(dateTimeStart, getTimezone()) .format(dateTimeLabelFormat()); }; @@ -48,7 +48,7 @@ export const DateTimeStartLabel = (props) => { export const DateTimeEndLabel = (props) => { const { dateTimeEnd } = props; - return moment.tz(dateTimeEnd, getTimeZone()).format(dateTimeLabelFormat()); + return moment.tz(dateTimeEnd, getTimezone()).format(dateTimeLabelFormat()); }; /** @@ -81,7 +81,10 @@ export const DateTimeStartPicker = (props) => { return ( updateDateTimeStart(date, setDateTimeStart)} + onChange={(date) => { + // updateDateTimeMeta({ dateTimeStart: date }); + updateDateTimeStart(date, setDateTimeStart); + }} is12Hour={is12HourTime} /> ); diff --git a/src/components/DateTimeEnd.js b/src/components/DateTimeEnd.js index 03ee9fa0d..0e829a316 100644 --- a/src/components/DateTimeEnd.js +++ b/src/components/DateTimeEnd.js @@ -15,17 +15,17 @@ import { } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { useEffect } from '@wordpress/element'; +import { useDispatch, useSelect } from '@wordpress/data'; /** * Internal dependencies. */ import { DateTimeEndLabel, DateTimeEndPicker } from './DateTime'; import { hasEventPastNotice } from '../helpers/event'; -import { Broadcaster } from '../helpers/broadcasting'; import { dateTimeMomentFormat, getDateTimeEnd, - getTimeZone, + getTimezone, } from '../helpers/datetime'; /** @@ -34,37 +34,34 @@ import { * This component renders the end date and time selection in the editor. * It includes a DateTimeEndPicker for selecting the end date and time. * The component also updates the state using the setDateTimeEnd callback. - * Additionally, it broadcasts the end date and time using the Broadcaster utility. - * If the event has passed, it displays a notice using hasEventPastNotice function. + * If the event has passed, it displays a notice using the hasEventPastNotice function. * * @since 1.0.0 * - * @param {Object} props - Component props. - * @param {Date} props.dateTimeEnd - The current date and time for the picker. - * @param {Function} props.setDateTimeEnd - Callback function to update the end date and time. - * * @return {JSX.Element} The rendered React component. */ -const DateTimeEnd = (props) => { - const { dateTimeEnd, setDateTimeEnd } = props; +const DateTimeEnd = () => { + const { dateTimeEnd } = useSelect( + (select) => ({ + dateTimeEnd: select('gatherpress/datetime').getDateTimeEnd(), + }), + [] + ); + const { setDateTimeEnd } = useDispatch('gatherpress/datetime'); useEffect(() => { setDateTimeEnd( moment - .tz(getDateTimeEnd(), getTimeZone()) + .tz(getDateTimeEnd(), getTimezone()) .format(dateTimeMomentFormat) ); - Broadcaster({ - setDateTimeEnd: dateTimeEnd, - }); - hasEventPastNotice(); }); return ( - +