1"use strict";(globalThis.webpackChunkstec=globalThis.webpackChunkstec||[]).push([[3883],{98196(e,t,a){a.r(t),a.d(t,{flushApiCache:()=>c,newApiDelete:()=>d,newApiGet:()=>l,newApiPost:()=>m,newApiPut:()=>u,testFetchUrl:()=>s,useApiGet:()=>i});var r=a(26878),n=a(73772);const __=n.__,s=e=>{const t=STEC_VARIABLES.rest_url+"wp/v2",a=STEC_VARIABLES.rest_url+"stec/v5",r=STEC_VARIABLES.rest_url+"wc/v3";STEC_VARIABLES.rest_url;switch(e){case"DATES-PICKER-DATES-STATUS":return`${a}/dates-picker-dates-status`;case"AI":return`${a}/ai`;case"COMMENTS":return`${t}/comments`;case"USERS":return`${t}/users`;case"STEC-USERS":return`${a}/users`;case"SETTINGS":return`${a}/settings`;case"SETTINGS/EXPORT":return`${a}/settings/export`;case"SETTINGS/IMPORT":return`${a}/settings/import`;case"CSV-SETTINGS":return`${a}/csv-settings`;case"PERMISSIONS":return`${a}/permissions`;case"CALENDARS":return`${a}/calendars`;case"CALENDARS/EXPORT":return`${a}/calendars/export`;case"CALENDARS/IMPORT":return`${a}/calendars/import`;case"CATEGORIES":return`${a}/categories`;case"CATEGORIES/EXPORT":return`${a}/categories/export`;case"CATEGORIES/IMPORT":return`${a}/categories/import`;case"ORGANIZERS":return`${a}/organizers`;case"ORGANIZERS/EXPORT":return`${a}/organizers/export`;case"ORGANIZERS/IMPORT":return`${a}/organizers/import`;case"GUESTS":return`${a}/guests`;case"GUESTS/EXPORT":return`${a}/guests/export`;case"GUESTS/IMPORT":return`${a}/guests/import`;case"LOCATIONS":return`${a}/locations`;case"LOCATIONS/EXPORT":return`${a}/locations/export`;case"LOCATIONS/IMPORT":return`${a}/locations/import`;case"EVENTS":return`${a}/events`;case"EVENTS/BULK-EDIT":return`${a}/events/bulk-edit`;case"EVENTS/EXPORT":return`${a}/events/export`;case"EVENTS/IMPORT":return`${a}/events/import`;case"EVENTS/ARCHIVE":return`${a}/events/archive`;case"EVENTS/UNARCHIVE":return`${a}/events/unarchive`;case"EVENTS/EMPTY-ARCHIVE":return`${a}/events/empty-archive`;case"EVENTS/EMBED":return`${a}/events/embed`;case"CRON-EVENT":return`${a}/cron-event`;case"CRON-EVENT-START":return`${a}/cron-event-start`;case"EVENTS/FORECAST":return`${a}/events/forecast`;case"DELETE-FROM-CALENDAR":return`${a}/delete-from-calendar`;case"REMINDERS":return`${a}/reminders`;case"REMINDERS/EXPORT":return`${a}/reminders/export`;case"ATTENDANCE":return`${a}/attendance`;case"ATTENDANCE/AVAILABLE-SLOTS":return`${a}/attendance/available-slots`;case"ATTENDANCE/EXPORT":return`${a}/attendance/export`;case"ATTENDANCE/IMPORT":return`${a}/attendance/import`;case"ATTENDANCE/EVENT-ATTENDANCE-DATA":return`${a}/attendance/event-attendance-data`;case"ATTENDANCE/EVENTS-ATTENDANCE-DATA":return`${a}/attendance/events-attendance-data`;case"AVL-ATTEND-DATA":return`${a}/attendance/avl-data`;case"WC-PRODUCTS":return`${r}/products`;case"WC-ADD-TO-CART":return`${a}/cart/add-item`;case"PUBLIC-PRODUCTS":return`${a}/products`;case"ORDERS":return`${a}/orders`;case"ORDERS/EXPORT":return`${a}/orders/export`;case"ORDERS/MARK-AS-SCANNED":return`${a}/orders/mark-as-scanned`;case"BUILDER":return`${a}/build`;case"BUILDER/EXPORT":return`${a}/build/export`;case"BUILDER/IMPORT":return`${a}/build/import`;case"CRON":return`${a}/cron`;case"DASHBOARD/COUNTERS":return`${a}/dashboard-counters`;case"ACTIVATOR/INFO":return`${a}/activator-info`;case"ACTIVATOR/ACTIVATE":return`${a}/activator-activate`;case"ACTIVATOR/DEACTIVATE":return`${a}/activator-deactivate`;case"VERSION/CHECK":return`${a}/version-check`;case"UPLOAD-IMAGES":return`${a}/upload-images`;default:return e}},o={},c=({group:e=!1,key:t=!1}={})=>{e?t?o[e]&&o[e][t]&&delete o[e][t]:o[e]&&delete o[e]:t?o[t]&&delete o[t]:Object.keys(o).forEach((e=>delete o[e]))},i=e=>{const{route:t,args:a,cacheGroup:n,cacheKey:s,errorMessage:c=__("An error occurred while fetching the data.","stec"),waitExec:i=!1,includeResponseHeaders:m=!1,includeResponseStatus:u=!1,headers:d={"Content-Type":"application/json"},disabled:h=!1}=e,[p,E]=(0,r.useState)(null),[f,g]=(0,r.useState)(null),[S,y]=(0,r.useState)(!0),w=JSON.stringify(e);STEC_VARIABLES.api_nonce&&(d["X-WP-Nonce"]=STEC_VARIABLES.api_nonce),(0,r.useEffect)((()=>{if(!0===h)return;let e=!0;const r=new AbortController;
1return i||(async()=>{y(!0);let i=!1;if(s&&(i=n?o[n]?.[s]:o[s]),i)E(i),y(!1),g(!1);else try{const i=await l({route:t,args:a,abortController:r,includeResponseHeaders:m,includeResponseStatus:u,cacheGroup:n,cacheKey:s,headers:d,errorMessage:c});e&&(E(i),y(!1),g(!1),s)&&((n?o[n]:o)[s]=i)}catch(t){if(e&&!r.signal.aborted){let e=c;"auto"===c&&t.message&&"string"==typeof t.message&&(e=t.message),g(e)}}finally{y(!1)}})(),()=>{e=!1,r.abort()}}),[w]);let v=!1;S||!p&&!f||(v=!0);let A=!1,R=!1,T="";return v&&p&&(m&&(R=p.headers),u&&(T=p.status),A=m||u?p.data:p),{data:A,headers:R,status:T,error:f,isLoading:S,ready:v}},l=({route:e,args:t,abortController:a,cacheGroup:r,cacheKey:n,includeResponseHeaders:c=!1,includeResponseStatus:i=!1,headers:l={"Content-Type":"application/json"},translateErrorCode:m=!1,errorMessage:u=__("Sorry, something went wrong","stec"),expectType:d="json"})=>{let h=s(e);t&&(h+=`/${t.toString()}`),STEC_VARIABLES.api_nonce&&(l["X-WP-Nonce"]=STEC_VARIABLES.api_nonce);return(async()=>{const e=window.stecFilterApiTimeoutDelay||3e4,t={method:"GET",headers:l};a||(a=new AbortController);const s=setTimeout((()=>{a.abort()}),e);t.signal=a.signal;let p=!1;if(n&&(p=r?o[r]?.[n]:o[n]),p)return p;try{const e=await fetch(h,t);let a;switch(d){case"json":default:a=await e.json();break;case"text":a=await e.text()}if(!e.ok)throw u=m&&m[a.code]?m[a.code]:"auto"===u&&a&&a.message?a.message:u||__("Sorry, something went wrong","stec"),new Error(u);if(!0===c&&(a={data:a,headers:e.headers}),!0===i&&(c?a.status=e.status:a={data:a,status:e.status}),n){r&&"object"!=typeof o[r]&&(o[r]={});(r?o[r]:o)[n]=a}return a}catch(e){if(!a.signal.aborted)throw e}finally{clearTimeout(s)}})()},m=async({route:e,args:t,abortController:a,includeResponseHeaders:r=!1,includeResponseStatus:n=!1,hasFiles:o=!1,data:c,headers:i={},translateErrorCode:l=!1,errorMessage:m=__("Sorry, something went wrong","stec")})=>{let u=s(e);t&&(u+=`/${t.toString()}`),o||i["Content-Type"]||(i["Content-Type"]="application/json"),STEC_VARIABLES.api_nonce&&(i["X-WP-Nonce"]=STEC_VARIABLES.api_nonce);return(async()=>{const e=window.stecFilterApiTimeoutDelay||3e4,t={method:"POST",body:o?c:JSON.stringify(c||""),headers:i};a||(a=new AbortController);const s=setTimeout((()=>{a.abort()}),e);t.signal=a.signal;try{const e=await fetch(u,t),a=e.headers.get("content-type");if(!(a&&a.includes("application/json")))switch(e.status){case 404:throw new Error(__("The requested resource was not found.","stec"));case 403:throw new Error(__("You do not have permission to access this resource.","stec"));case 500:throw new Error(__("An internal server error occurred.","stec"));default:throw new Error(__("Invalid response from the server.","stec"))}let s=await e.json();if(!e.ok)throw m=l&&l[s.code]?l[s.code]:"auto"===m&&s&&s.message?s.message:m||__("Sorry, something went wrong","stec"),new Error(m);return!0===r&&(s={data:s,headers:e.headers}),!0===n&&(r?s.status=e.status:s={data:s,status:e.status}),s}catch(e){if(!a.signal.aborted)throw e}finally{clearTimeout(s)}})()},u=async({route:e,args:t,abortController:a,includeResponseHeaders:r=!1,includeResponseStatus:n=!1,hasFiles:o=!1,data:c,headers:i={},translateErrorCode:l=!1,errorMessage:m=__("Sorry, something went wrong","stec")})=>{let u=s(e);t&&(u+=`/${t.toString()}`),o||i["Content-Type"]||(i["Content-Type"]="application/json"),STEC_VARIABLES.api_nonce&&(i["X-WP-Nonce"]=STEC_VARIABLES.api_nonce);return(async()=>{const e=window.stecFilterApiTimeoutDelay||3e4,t={method:"PUT",body:o?c:JSON.stringify(c||""),headers:i};a||(a=new AbortController);const s=setTimeout((()=>{a.abort()}),e);t.signal=a.signal;try{const e=await fetch(u,t),a=e.headers.get("content-type");if(!(a&&a.includes("application/json")))switch(e.status){case 404:throw new Error(__("The requested resource was not found.","stec"));case 403:throw new Error(__("You do not have permission to access this resource.","stec"));case 500:throw new Error(__("An internal server error occurred.","stec"));default:throw new Error(__("Invalid response from the server.","stec"))}let s=await e.json();if(!e.ok)throw m=l&&l[s.code]?l[s.code]:"auto"===m&&s&&s.message?s.message:m||__("Sorry, something went wrong","stec"),new Error(m);return!0===r&&(s={data:s,headers:e.headers}),!0===n&&(r?s.status=e.status:s={data:s,status:e.status}),s}catch(e){if(!a.signal.aborted)throw e}finally{clearTimeout(s)}})()},d=({route:e,args:t,abortController:a,includeResponseHeaders:r=!1,includeResponseStatus:n=!1,headers:o={},translateErrorCode:c=!1,errorMessage:i=__("Sorry, something went wrong","stec")})=>{let l=s(e);t&&(l+=`/${t.toString()}`),o["Content-Type"]||(o["Content-Type"]="application/json"),STEC_VARIABLES.api_nonce&&(o["X-WP-Nonce"]=STEC_VARIABLES.api_nonce);return(async()=>{const e=window.stecFilterApiTimeoutDelay||3e4,t={method:"DELETE",headers:o};a||(a=new AbortController);const s=setTimeout((()=>{a.abort()}),e);t.signal=a.signal;try{const e=await fetch(l,t),a=e.headers.get("content-type");if(!(a&&a.includes("application/json")))switch(e.status){case 404:throw new Error(__("The requested resource was not found.","stec"));case 403:throw new Error(__("You do not have permission to access this resource.","stec"));case 500:throw new Error(__("An internal server error occurred.","stec"));default:throw new Error(__("Invalid response from the server.","stec"))}let s=await e.json();if(!e.ok)throw i=c&&c[s.code]?c[s.code]:"auto"===i&&s&&s.message?s.message:i||__("Sorry, something went wrong","stec"),new Error(i);return!0===r&&(s={data:s,headers:e.headers}),!0===n&&(r?s.status=e.status:s={data:s,status:e.status}),s}catch(e){if(!a.signal.aborted)throw e}finally{clearTimeout(s)}})()}},52779(e,t,a){a.r(t),a.d(t,{default:()=>o});var r=a(58168),n=a(8403);const s=React.forwardRef(((e,t)=>{const a=["stec-button"];return Array.isArray(e.className)?a.push(...e.className):e.className&&"string"==typeof e.className&&a.push(e.className),e.disabled&&a.push("stec-button-disabled"),e.href?React.createElement("a",(0,r.default)({},e.extra,{ref:t,style:e.style,target:e.target?e.target:"_SELF",href:e.href,className:a.join(" "),onClick:e.onClick}),Array.isArray(e.label)?e.label.map(((e,t)=>React.createElement(n.StecSpan,{key:t},e))):e.label):React.createElement(n.StecDiv,(0,r.default)({},e.extra,{ref:t,style:e.style,className:a.join(" "),onClick:e.onClick}),Array.isArray(e.label)?e.label.map(((e,t)=>React.createElement(n.StecSpan,{key:t},e))):e.label)}));s.displayName="Button";const o=s},5986(e,t,a){a.r(t),a.d(t,{default:()=>c});var r=a(6405),n=a(8403),s=a(58757),o=a(73772);const __=o.__,c=({event:e,size:t="",classes:a="",includeCategories:o=!0,style:c}
1)=>{const i=[],l="EventCancelled"===e.meta.event_status;switch(0===e.meta.approved&&i.push({label:__("Pending Approval","stec"),color:"#fdb813"}),!1===l&&(e.meta.featured&&i.push({label:[React.createElement("i",{key:"icon",className:"fas fa-star"}),__("Featured","stec")],color:"#ed1c16"}),!0===(0,r.eventHasHealthMeasures)(e)&&i.push({label:[React.createElement("i",{key:"icon",className:"fas fa-shield-virus"}),__("Health measures","stec")],color:"#0093d0"})),e.meta.event_status){case"EventPostponed":i.push({label:__("Postponed","stec"),color:"#eb9534"});break;case"EventRescheduled":i.push({label:__("Rescheduled","stec"),color:"#eb9534"});break;case"EventMovedOnline":i.push({label:[React.createElement("i",{key:"icon",className:"fas fa-wifi"}),__("Moved Online","stec")],color:"#32a852"});break;case"EventCancelled":i.push({label:__("Cancelled","stec"),color:"#f40009"})}!1===l&&!0===o&&Array.isArray(e.categories)&&e.categories.forEach((e=>{i.push({label:e?.thumbnail?.icon?[React.createElement("i",{key:"icon",className:e.thumbnail.icon}),(0,r.htmlEntities)(e.title)]:(0,r.htmlEntities)(e.title),color:e.color})}));const m=["stec-tags-list"];return t&&m.push(t),a&&m.push(a),Array.isArray(i)&&0!==i.length?React.createElement(n.StecDiv,{className:m.join(" "),style:c},React.createElement(s.default,{event:e}),i.map(((e,t)=>{const a=(0,r.htmlEntities)(e.label);return React.createElement(n.StecSpan,{key:t,style:{backgroundColor:e.color}},a)}))):null}},58757(e,t,a){a.r(t),a.d(t,{default:()=>o});var r=a(26878),n=a(8403),s=a(73772);const __=s.__,o=({event:e})=>{const[t,a]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const t=()=>{const t=moment(),a=moment.tz(e.meta.start_date,e.meta.timezone),r=moment.tz(e.meta.end_date,e.meta.timezone);return t.isBetween(a,r)};let r;return e?.location?.type&&"virtual"===e.location.type&&!["EventCancelled","EventPostponed"].includes(e.meta.event_status)&&(a(t()),r=setInterval((()=>{a(t())}),1e3)),()=>{clearInterval(r)}}),[e]),t?React.createElement(n.StecDiv,{className:"stec-tag-live"},__("Live","stec"),React.createElement("i",{className:"fas fa-circle"})):null}},22819(e,t,a){a.r(t),a.d(t,{default:()=>n});var r=a(8403);const n=()=>React.createElement(r.StecDiv,{className:"stec-spacer"})},32891(e,t,a){a.r(t),a.d(t,{default:()=>n});var r=a(8403);const n=e=>{const t=e.type?e.type:"icon",a=e.textColor?e.textColor:"#fff",n=e.backgroundColor?e.backgroundColor:"#000";return React.createElement(r.StecDiv,{className:`stec-thumbnail ${e.size||""}`,style:{backgroundColor:n}},"icon"===t&&e.icon&&React.createElement(r.StecDiv,{className:"stec-thumbnail-icon",style:{color:a}},React.createElement("i",{className:e.icon})),"date"===t&&e.month&&e.day&&React.createElement(React.Fragment,null,React.createElement(r.StecDiv,{className:"stec-thumbnail-date"},React.createElement(r.StecSpan,{className:"stec-thumbnail-date-day",style:{color:a}},e.day),React.createElement(r.StecSpan,{className:"stec-thumbnail-date-month",style:{color:a}},e.month))),"image"===t&&e.image&&React.createElement(React.Fragment,null,React.createElement(r.StecDiv,{className:"stec-thumbnail-image",style:{backgroundImage:`url(${e.image})`}})))}},6405(e,t,a){a.r(t),a.d(t,{MediaFrame:()=>w,beautifyDate:()=>C,beautifyEventTimespan:()=>b,calculateMasonryColumns:()=>ne,canModerateCalendar:()=>H,canUseWpMedia:()=>se,centerScrollElement:()=>v,eventHasHealthMeasures:()=>L,getAttendanceDataSlotsTaken:()=>
1U,getCellBackgroundImageUrl:()=>ae,getCellColor:()=>D,getClusterMarker:()=>M,getColorBrightness:()=>I,getDayLabels:()=>A,getEventAttendanceRsvpScheduleDates:()=>X,getEventAttendanceRsvpScheduleStatus:()=>G,getEventAvailableAttendanceSlots:()=>j,getEventMapMarkerIcon:()=>O,getEventMomentWithOffset:()=>ee,getEventPermalink:()=>q,getEventSortedImages:()=>F,getEventThumbnailByType:()=>N,getFirstDayOfMonthInView:()=>K,getFirstDayOfWeekInView:()=>Q,getGmapOverlayClusterIcon:()=>z,getGmapOverlayIcon:()=>Y,getGoogleCalImportLink:()=>B,getImageUrl:()=>f,getInfoWindowClusterContent:()=>P,getInfoWindowContent:()=>V,getIsEventAlive:()=>$,getIsEventScheduled:()=>k,getLangCode:()=>y,getLocationCoordinates:()=>re,getMediaSizes:()=>d,getMonthLabel:()=>T,getMonthLabels:()=>R,getPluginUrl:()=>E,getRecurrencesDatesList:()=>te,getRegexByType:()=>S,getTimeFormat:()=>_,getTzAbbr:()=>p,getUtcOffset:()=>h,getWpDateformat:()=>Z,htmlEntities:()=>W,isMobile:()=>g,measureDistance:()=>x,sortEventsByFeatured:()=>J});var r=a(52779),n=a(5986),s=a(22819),o=a(32891),c=a(8403),i=a(28698),l=a(73772),m=a(26960),u=a(26878);const __=l.__,d=()=>"function"==typeof window.stecFilterMediaSizes?window.stecFilterMediaSizes():{mobile:660,tablet:1050},h=e=>{const t=e.utcOffset()/60;return 0===t?"UTC":`UTC${t>0?"+":""}${t}`},p=(e,{timezone:t="UTC",userTime:a=!1})=>{const r=a?Intl.DateTimeFormat().resolvedOptions().timeZone:t;return e.tz(r).format("z")},E=e=>{const t=new URL(STEC_VARIABLES.plugin_url);return e&&(t.pathname+=e),t},f=e=>new URL(`${STEC_VARIABLES.plugin_url}assets/images/${e}`),g=()=>/Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),S=e=>{switch(e){case"title":return/\S+/;case"slug":return/\S*/;case"email":return/^$|^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;case"required_email":return/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;case"end_date":case"start_date":return/[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2})?/;case"coordinates":return/^[-]?\d{1,2}(\.\d+)?,\s*[-]?\d{1,3}(\.\d+)?$/;case"text":return/[\w\u00C0-\u017F]/;case"phone":return/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/;case"number":return/^[0-9]+$/;default:return null}},y=()=>{if(""===STEC_VARIABLES.lang)return"";if(window.location.href.indexOf("wp-admin")>-1){const e=new URLSearchParams(window.location.search).get("lang");return e||STEC_VARIABLES.lang}return STEC_VARIABLES.lang},w=e=>new Promise((t=>{const a=window.wp.media({button:{text:e.buttonText},library:{type:e.libraryType},frame:"select",title:e.title,multiple:e.multiple});a.open(),a.on("select",(()=>{const e=a.state().get("selection").toJSON();return t(e)}))})),v=(e,t)=>
1{const a=t.current.offsetTop,r=t.current.clientHeight/2,n=e.current.clientHeight/2;e.current.scrollTo({top:a-n-r})},A=(e="")=>{const t=[__("Sunday","stec"),__("Monday","stec"),__("Tuesday","stec"),__("Wednesday","stec"),__("Thursday","stec"),__("Friday","stec"),__("Saturday","stec")];return"short"===e?t.map((e=>e.substring(0,3))):t},R=(e="")=>{const t=[__("January","stec"),__("February","stec"),__("March","stec"),__("April","stec"),__("May","stec"),__("June","stec"),__("July","stec"),__("August","stec"),__("September","stec"),__("October","stec"),__("November","stec"),__("December","stec")];return"short"===e?t.map((e=>e.substring(0,3))):t},T=(e,t="")=>{const a=[__("January","stec"),__("February","stec"),__("March","stec"),__("April","stec"),__("May","stec"),__("June","stec"),__("July","stec"),__("August","stec"),__("September","stec"),__("October","stec"),__("November","stec"),__("December","stec")][parseInt(e,10)];return"short"===t?a.substring(0,3):a},_=()=>{const e=STEC_VARIABLES.time_format;let t;switch(e){case"stec_24":t="HH:mm";break;case"stec_12":t="hh:mm a";break;case"wp":t=Z("time");break;default:t=e||Z("time")}return t},b=({event:e,dateFormat:t=STEC_VARIABLES.date_format,timeFormat:a=STEC_VARIABLES.time_format,showUtcOffset:r=!1,fullMonth:n=!1,forceHideEnd:s=!1,showInUserTimezone:o=!1,print:l=!1,wrap:m=!1})=>{const u=e.timezone||e.meta.timezone,d=moment.tz(e.meta.start_date,u),p=moment.tz(e.meta.end_date,u),E=s||e.meta.hide_end,f=[],g=n?"MMMM":"MMM";let S,y,w=e.meta.all_day;switch(o&&(d.local(),p.local(),w&&d.hour()>0&&(w=!1,59===p.minute()&&p.add(1,"minute"))),t){case"stec_dmy":S=`D ${g}, YYYY`;break;case"stec_mdy":S=`${g} D, YYYY`;break;case"stec_ymd":S=`YYYY, ${g} D`;break;case"wp":S=Z("date");break;default:S=t||Z("date")}switch(a){case"stec_24":y="HH:mm";break;case"stec_12":y="hh:mm a";break;case"wp":y=Z("time");break;default:y=a||Z("time")}if(f.push({kind:"date",str:d.format(S)}),w||f.push({kind:"time",str:d.format(y)}),!E){const e=p.isSame(d,"day");e&&w||f.push({kind:"sep",str:" - "}),e||f.push({kind:"date",str:p.format(S)}),w||f.push({kind:"time",str:p.format(y)})}if(r){const e=h(d);f.push({kind:"tz",str:`(${e})`})}let v=f.map((e=>e.str)).join(" ");if(m){const e=f.length&&"tz"===f[f.length-1].kind?f[f.length-1]:null,t=e?f.slice(0,-1):f,a=t[0],r=t.slice(1).map((e=>e.str)).join(" "),n=[];return n.push(React.createElement(c.StecSpan,{key:"date",className:"stec-event-preview-content-date"},a.str)),r&&(n.push(" "),n.push(React.createElement(c.StecSpan,{key:"time",className:"stec-event-preview-content-time"},r))),e&&(n.push(" "),n.push(React.createElement(c.StecSpan,{key:"tz",className:"stec-event-preview-content-utc"},e.str))),React.createElement(i.Fragment,null,n)}return"function"==typeof window.stecFilterBeautifyEventTimespan&&(v=window.stecFilterBeautifyEventTimespan({event:e,dateFormat:t,timeFormat:a,showUtcOffset:r,fullMonth:n,forceHideEnd:s,showInUserTimezone:o,print:l,wrap:m},v)),v},C=(e,t,a=STEC_VARIABLES.date_format,r=STEC_VARIABLES.time_format)=>{const n=moment(e);
1if(!n.isValid())return"";const s={stec_dmy:"D MMMM, YYYY",stec_mdy:"MMMM D, YYYY",stec_ymd:"YYYY, MMMM D",wp:Z("date")}[a]||Z("date"),o={stec_24:"HH:mm",stec_12:"hh:mm a",wp:Z("time")}[r]||STEC_VARIABLES.time_format,c=t?s:`${s} ${o}`;let i=n.format(c);return"function"==typeof window.stecFilterBeautifyDate&&(i=window.stecFilterBeautifyDate({date:e,allDay:t,dateFormat:a,timeFormat:r},i)),i},D=(e,t="event")=>{let a=e.meta.color;switch(t){case"calendar":e.calendar&&(a=e.calendar.color);break;case"category":Array.isArray(e.categories)&&e.categories[0]&&(a=e.categories[0].color);break;case"organizer":Array.isArray(e.organizers)&&e.organizers[0]&&(a=e.organizers[0].color);break;case"location":e.location?.id&&(a=e.location.color)}return a},M=(e,t="")=>{const a=e[0],r=N(a,"",t);return React.createElement(c.StecDiv,{className:"stec-map-cluster-marker"},r,React.createElement(c.StecDiv,{className:"stec-map-cluster-marker-count"},e.length))},N=(e,t="",a="event")=>{const r=(r,n,s)=>{switch(r){case"image":{let r=n?.image[0]?.sizes?.thumbnail;return"function"==typeof window.stecFilterThumbnailData&&(r=window.stecFilterThumbnailData({image:r,event:e,size:t,thumbnailSource:a,thumbnailData:n})),React.createElement(o.default,{type:"image",image:r,backgroundColor:s,size:t})}case"date":{const a=moment.utc(e.meta.start_date),r=a.date(),n=a.month(),c=T(n,"short");return React.createElement(o.default,{type:"date",day:r,month:c,backgroundColor:s,size:t})}default:return React.createElement(o.default,{type:"icon",icon:n.icon,backgroundColor:s,size:t})}};if("calendar"===a&&e.calendar){const t=e.calendar,{thumbnail:a,color:n}=t;return r(a.type,a,n)}if("category"===a&&Array.isArray(e.categories)&&e.categories[0]){const t=e.categories[0],{thumbnail:a,color:n}=t;return r(a.type,a,n)}if("organizer"===a&&Array.isArray(e.organizers)&&e.organizers[0]){const t=e.organizers[0];let a="icon",n=e.meta.thumbnail,s=t.color;return t.photo&&t.photo.id&&(n={image:[t.photo]},a="image"),r(a,n,s)}if("location"===a&&e?.location?.id){return r("icon",e.meta.thumbnail,e.location.color)}return r(e.meta.thumbnail.type,e.meta.thumbnail,e.meta.color)},I=e=>{const[t,a,r]=e.substring(1).match(/.{2}/g).map((e=>parseInt(e,16)));return.2126*t+.7152*a+.0722*r},k=e=>!["EventCancelled","EventPostponed"].includes(e.meta.event_status),$=(e,t={allowInProgress:!1})=>{if(!k(e))return!1;if(moment().isBefore(moment.tz(e.meta.start_date,e.meta.timezone)))return!0;if(!0===t.allowInProgress){const t=moment.tz(e.meta.start_date,e.meta.timezone),a=moment.tz(e.meta.end_date,e.meta.timezone);if(moment().isBetween(t,a))return!0}return!1},L=e=>!!e.meta.health_measures&&(!(!e.meta.health_measures.custom||""===e.meta.health_measures.custom)||Object.values(e.meta.health_measures).some((e=>!0===e))),O=(e,t="event")=>{const a=document.createElement("stec-div");let r=N(e,"",t);return(0,i.createRoot)(a).render(r),a},Y=(e,t="event")=>{function a(e){this.thumbnailSource=t,this.event=e,this.eventListeners=[]}a.prototype=new google.maps.OverlayView,a.prototype.addListener=function(e,t){this.eventListeners.push({event:e,fn:t})},a.prototype.onAdd=function(){this.StecDiv=O(this.event,this.thumbnailSource),this.StecDiv.className="stec-gmap-overlay-pin",this.StecDiv.style="position: absolute";const e=this.getPanes();if(!e)return;const t=e.overlayMouseTarget.appendChild(this.StecDiv);this.eventListeners.forEach((e=>{t.addEventListener(e.event,(function(t){"function"==typeof e.fn&&e.fn(t)}))}))},a.prototype.draw=function(){const t=this.getProjection();if(!t)return;const a=e.location.coordinates.split(","),r=Number(a[0]),n=Number(a[1]),s=t.fromLatLngToDivPixel(new google.maps.LatLng(r,n)),o=this.StecDiv;o.style.left=s.x-28+"px",o.style.top=s.y-57+"px"},a.prototype.onRemove=function(){this.StecDiv&&(this.StecDiv.parentNode.removeChild(this.StecDiv),this.StecDiv=null)};return new a(e)},z=(e,t)=>{function a(e){this.events=e,this.eventListeners=[]}a.prototype=new google.maps.OverlayView,a.prototype.addListener=function(e,t){this.eventListeners.push({event:e,fn:t})},a.prototype.onAdd=function(){this.StecDiv=document.createElement("div"),(0,i.createRoot)(this.StecDiv).render(M(this.events,t)),this.StecDiv.className="stec-gmap-overlay-pin cluster",this.StecDiv.style="position: absolute";const e=this.getPanes();if(!e)return;const a=e.overlayMouseTarget.appendChild(this.StecDiv);
1this.eventListeners.forEach((e=>{a.addEventListener(e.event,(function(t){"function"==typeof e.fn&&e.fn(t)}))}))},a.prototype.draw=function(){const t=this.getProjection();if(!t)return;const a=e[0].location.coordinates.split(","),r=Number(a[0]),n=Number(a[1]),s=t.fromLatLngToDivPixel(new google.maps.LatLng(r,n)),o=this.StecDiv;o.style.left=s.x-28+"px",o.style.top=s.y-57+"px"},a.prototype.onRemove=function(){this.StecDiv&&(this.StecDiv.parentNode.removeChild(this.StecDiv),this.StecDiv=null)};return new a(e)},V=(e,t)=>{const a=document.createElement("div");let o="";switch(t.openEventIn){case"single":{const a=t.hrefTarget||"__self";o=React.createElement(r.default,{className:"small",target:a,href:e.permalink,style:{width:"100%"},label:__("View event","stec")});break}case"external":{const{url:a,text:n}=e.meta.external_link,s=t.hrefTarget||"__self";a&&(o=React.createElement(r.default,{className:"small",target:s,href:a,style:{width:"100%"},label:n||__("View event","stec")}));break}default:o=React.createElement(r.default,{className:"small",style:{width:"100%"},onClick:t.onClick,label:__("View event","stec")})}const l=React.createElement(c.StecDiv,{className:"stec-layout-map-info-window"},React.createElement(c.StecDiv,{className:"stec-layout-map-info-window-content"},React.createElement(c.StecDiv,null,React.createElement(c.StecDiv,{className:"stec-layout-map-info-window-content-primary"},React.createElement(n.default,{event:e}),React.createElement(c.StecDiv,{className:"stec-layout-map-info-window-content-title"},e.title)),React.createElement(c.StecDiv,{className:"stec-layout-map-info-window-content-secondary"},React.createElement(c.StecSpan,null,React.createElement("i",{className:"fas fa-clock"}),b({event:e,dateFormat:t.dateFormat,timeFormat:t.timeFormat,showUtcOffset:t.showUtcOffset,fullMonth:!0})),e.location.id&&React.createElement(c.StecSpan,null,"virtual"===e.location.type?React.createElement("i",{className:"fa-solid fa-wifi"}):React.createElement("i",{className:"fa-solid fa-map-marker-alt"}),e.location.title),e.short_description&&React.createElement(c.StecSpan,{className:"stec-layout-map-info-window-description",dangerouslySetInnerHTML:{__html:e.short_description}})),React.createElement(s.default,null),o)));return(0,i.createRoot)(a).render(l),a},P=(e,t)=>{const a=document.createElement("div"),o=()=>{const a=React.useRef(null),[o,i]=React.useState(0),l=-1*o*280,m=(0,u.useCallback)((()=>{o<e.length-1?i(o+1):i(0)}),[o]),d=(0,u.useCallback)((()=>{i(o>0?o-1:e.length-1)}),[o]),h=o>0,p=o<e.length-1;return React.useEffect((()=>{if(!a.current)return;const e=a.current,t=e.querySelectorAll(".stec-layout-map-info-window-content-slider-item")[o].clientHeight;0!==t&&(e.style.height=t+"px")}),[o,a]),React.useEffect((()=>{if(!g||!a.current)return;let t=0;const r=e=>{t=e.touches[0]?.clientX||0},n=a=>{const r=(a.changedTouches[0]?.clientX||0)-t;r>50&&o>0?d():r<-50&&o<e.length-1&&m()},s=a.current;return s.addEventListener("touchstart",r,{passive:!0}),s.addEventListener("touchend",n,{passive:!0}),()=>{s.removeEventListener("touchstart",r),s.removeEventListener("touchend",n)}}),[m,d,o]),React.createElement(c.StecDiv,{className:"stec-layout-map-info-window",ref:a},React.createElement(c.StecDiv,{className:"stec-layout-map-info-window-content-slider-controls"},React.createElement("i",{style:{display:h?"block":"none"},className:"fa-solid fa-chevron-left",onClick:d}),React.createElement("i",{style:{display:p?"block":"none"},className:"fa-solid fa-chevron-right",onClick:m})),React.createElement(c.StecDiv,{className:"stec-layout-map-info-window-content-slider-wrap"},React.createElement(c.StecDiv,{style:{transform:`translateX(${l}px)`,transition:"transform 0.3s"},className:"stec-layout-map-info-window-content-slider"},e.map((e=>{const a=`${e.id}-${e.meta.start_date}`,o=(e=>{let a;switch(t.openEventIn){case"single":{const n=t.hrefTarget||"__self";a=React.createElement(r.default,{className:"small",target:n,href:e.permalink,style:{width:"100%"},label:__("View event","stec")});break}case"external":{const{url:n,text:s}=e.meta.external_link,o=t.hrefTarget||"__self";n&&(a=React.createElement(r.default,{className:"small",target:o,href:n,style:{width:"100%"},label:s||__("View event","stec")}));break}default:a=React.createElement(r.default,{className:"small",style:{width:"100%"},onClick:()=>{t.onClick(e)},label:__("View event","stec")})}return a})(e);return React.createElement(c.StecDiv,{className:"stec-layout-map-info-window-content-slider-item",key:a},React.createElement(c.StecDiv,{className:"stec-layout-map-info-window-content-primary"},React.createElement(n.default,{event:e}),React.createElement(c.StecDiv,{className:"stec-layout-map-info-window-content-title"},e.title)),React.createElement(c.StecDiv,{className:"stec-layout-map-info-window-content-secondary"},React.createElement(c.StecSpan,null,React.createElement("i",{className:"fas fa-clock"}),b({event:e,dateFormat:t.dateFormat,timeFormat:t.timeFormat,showUtcOffset:t.showUtcOffset,fullMonth:!0})),e.location.id&&React.createElement(c.StecSpan,null,"virtual"===e.location.type?React.createElement("i",{className:"fa-solid fa-wifi"}):React.createElement("i",{className:"fa-solid fa-map-marker-alt"}),e.location.title),e.short_description&&React.createElement(c.StecSpan,{className:"stec-layout-map-info-window-description",dangerouslySetInnerHTML:{__html:e.short_description}})),React.createElement(s.default,null),o)})))))};return(0,i.createRoot)(a).render(React.createElement(o,null)),a},B=e=>{const t=moment.tz(e.meta.start_date,e.meta.timezone),a=moment.tz(e.meta.end_date,e.meta.timezone);let r,n;e.all_day?(r=t.format("YYYYMMDD"),n=moment(a).add(1,"day").format("YYYYMMDD")):(r=t.utc().format("YYYYMMDDTHHmmss")+"Z",n=a.utc().format("YYYYMMDDTHHmmss")+"Z");const s=e.location?[e.location.postal_code,e.location.address,e.location.city,e.location.state,e.location.country].filter(
1Boolean).join(", "):"",o=e.short_description;return`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${e.title}&dates=${r}/${n}&details=${o}&location=${s}&sf=true&output=xml`},F=e=>{if(e.meta.images.length<=0)return[];const t=(0,m.cloneDeep)(e.meta.images);return t.sort((({order:e},{order:t})=>e-t)),t},x=(e,t)=>{const[a,r]=e.split(",").map(parseFloat),[n,s]=t.split(",").map(parseFloat),o=(n-a)*Math.PI/180,c=(s-r)*Math.PI/180,i=Math.sin(o/2)*Math.sin(o/2)+Math.sin(c/2)*Math.sin(c/2)*Math.cos(a*Math.PI/180)*Math.cos(n*Math.PI/180),l=6371e3*(2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i)));return Math.round(l/1e3)},H=e=>{try{return!0===STEC_VARIABLES?.current_user?.capability?.super||!(!Array.isArray(STEC_VARIABLES?.current_user?.capability?.moderate?.stec_cal)||!STEC_VARIABLES.current_user.capability.moderate.stec_cal.includes(e))}catch(e){return!1}},U=(e,t="all")=>{let a=0,r=0,n=0;switch(e.current_user&&e.current_user.persons&&"attending"===e.current_user.state&&(r=Math.max(0,e.current_user.persons)),Array.isArray(e.others)&&e.others.length>0&&e.others.forEach((e=>{"attending"===e.state&&e.persons&&(n+=Math.max(0,e.persons))})),t){case"others":a=n;break;case"current_user":a=r;break;default:a=r+n}return a},j=(e,t,a="")=>{const r=-1,n=9999,{attendance_method:s,attendance_persons_limit:o,attendance_persons_per_rsvp:c,attendance_rsvp_allow_waiting_list:i}=e.meta||{};if(!t)return 0;switch(s){case"manual":default:return"input"===a?n:r;case"rsvp":{const e=o!==r,s=c!==r,l=e?o:r;let m=U(t,"input"===a?"others":"all"),u=l;return"input"===a?(u=e?Math.max(0,l-m):n,s?(u=Math.max(0,Math.min(u,c)),u<c&&i&&(u=c)):i&&(u=e?l:n),u):(u=e?Math.max(0,l-m):r,u)}}},G=(e,t={allowInProgress:!1})=>{if(!k(e)||"rsvp"!==e.meta.attendance_method)return"closed";const a=moment(),r=moment.tz(e.meta.start_date,e.timezone).subtract(e.meta.attendance_rsvp_schedule_start||0,"hours"),n=moment.tz(e.meta.end_date,e.timezone).subtract(e.meta.attendance_rsvp_schedule_end||0,"hours");return-1===e.meta.attendance_rsvp_schedule_start?t.allowInProgress?a.isBetween(r,n)?"open":"closed":a.isAfter(r)?"closed":"open":a.isBefore(r)?"not-open-yet":a.isAfter(n)?"closed":"open"},X=(e,{userTime:t=!1,showTz:a=!1,allowInProgress:r=!1})=>{const n=moment.tz(e.meta.start_date,e.timezone).subtract(e.meta.attendance_rsvp_schedule_start||0,"hours"),s=moment.tz(e.meta.start_date,e.timezone).subtract(e.meta.attendance_rsvp_schedule_end||0,"hours"),o=G(e,{allowInProgress:r});t&&(n.local(),s.local());let c=C(n,!1),i=C(s,!1);if(a){const e=h(n);c+=` (${e})`,i+=` (${e})`}return{start:c,end:i,status:o}},Z=(e=!1)=>{let t=[];switch(e){case"date":t=[STEC_VARIABLES.wpdate_format];break;case"time":t=[STEC_VARIABLES.wptime_format];break;default:t=[STEC_VARIABLES.wpdate_format,STEC_VARIABLES.wptime_format]}t=t.join(" ");const a={A:"A",a:"a",B:"",c:"YYYY-MM-DD[T]HH:mm:ssZ",D:"ddd",d:"DD",e:"zz",F:"MMMM",G:"H",g:"h",H:"HH",h:"hh",I:"",i:"mm",j:"D",L:"",l:"dddd",M:"MMM",m:"MM",N:"E",n:"M",O:"ZZ",o:"YYYY",P:"Z",r:"ddd, DD MMM YYYY HH:mm:ss ZZ",S:"o",s:"ss",T:"z",t:"",U:"X",u:"SSSSSS",v:"SSS",W:"W",w:"e",Y:"YYYY",y:"YY",Z:"",z:"DDD"};let r=t.split("");return r=r.map((e=>a[e]?a[e]:e)),r.join("")},W=e=>"string"!=typeof e?e:e.replace(/&|<|>|"|'/g,(e=>{switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}})),q=(e,t=!0)=>{const a=window.stecFilterEventPermalinkDateSuffix??t;let r=e.permalink;if("undefined"!=typeof stec_bp_calendar_page_url&&"string"==typeof stec_bp_calendar_page_url){const e=r.split("/").filter(Boolean).pop();r=stec_bp_calendar_page_url+e+"/"}return a&&e.meta.rrule&&("/"!==r.slice(-1)&&(r+="/"),r+=`${e.meta.start_date}`),r},J=e=>{if(!e||!e.length)return e;const t=e.filter((e=>!0===e.meta.featured)),a=e.filter((e=>!0!==e.meta.featured));return t.sort(((e,t)=>moment.utc(e.meta.start_date_utc).diff(moment.utc(t.meta.start_date_utc)))),[...t,...a]},K=(e,t)=>{const a="string"==typeof e?e:e.format("YYYY-MM-DD"),r=moment.utc(a).startOf("month"),n=(r.day()-t+7)%7,s=moment.utc(r).subtract(n,"days").format("YYYY-MM-DD");return moment(s).startOf("day")},Q=(e,t)=>{const a="string"==typeof e?e:e.format("YYYY-MM-DD"),r=moment.utc(a).startOf("day"),n=(r.day()-t+7)%7,s=moment.utc(r).subtract(n,"days").format("YYYY-MM-DD");return moment(s).startOf("day")},ee=(e,t,a)=>{const r=moment.utc(e).add(t,"seconds").format("YYYY-MM-DD HH:mm:ss");return moment.tz(r,a)},te=(e,{dateFormat:t,timeFormat:a,showTzOffset:r=STEC_VARIABLES?.show_tz_offset||!1,showInUserTimezone:n=STEC_VARIABLES?.use_user_tz||!1,showTime:s=!0}={})=>e.map((e=>{const o=moment.tz(e.meta.start_date,e.meta.timezone);n&&o.local();let c=C(o,!s,t,a);if(r){c=`${c} (${h(o)})`}return{label:c,value:e.meta.start_date}})),ae=e=>{let t=null;if(Array.isArray(e)&&e.length>0){const a=e.find((e=>e.meta.featured&&"image"===e.meta.thumbnail?.type&&e.meta.thumbnail?.image?.[0]))||e.find((e=>"image"===e.meta.thumbnail?.type&&e.meta.thumbnail?.image?.[0]));if(a){const e=a.meta.thumbnail.image[0];t=e.sizes.large||e.sizes.full}}return t},re=async e=>{let t=!1;if(""===e)return t;if(window?.google?.maps?.Geocoder)try{const a=new window.google.maps.Geocoder;t=(await a.geocode({address:e})).results[0].geometry.location.toString().replace(/\(|\)/gi,"")}catch(e){t=!1}else try{const a=await fetch("https://nominatim.openstreetmap.org/search?format=json&limit=1&q="+e),r=await a.json();t=r.length>0&&[r[0].lat,r[0].lon].join(",")}catch(e){t=!1}return t},ne=({gridContainerWidth:e,columnsCount:t,minWidth:a,gutter:r})=>{if("init"===e)return t;let n=r,s=Math.max(1,Math.floor((e+n)/(a+n)));s>t&&(s=t);const o=e-(s*a+(s-1)*n);return o>0&&(n+=Math.floor(o/(s-1))),s},se=()=>{const e=void 0!==window.wp.media&&void 0!==window.wp.media()&&void 0!==window.wp.media().open,t=STEC_VARIABLES?.current_user?.capability?.upload_files;return e&&t}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.