(()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.jQuery;var n=e.n(o);const t={init(){n()(t.ready)},ready(){t.events(),t.removeNoticeQueryArgs()},events(){n()(document).on("click",".sugar-calendar-bookings-notice .notice-dismiss",t.dismissNotice)},dismissNotice(e){const o=n()(e.target).closest(".sugar-calendar-bookings-notice").attr("id");n().post(sugar_calendar_bookings_admin_notices.ajax_url,{action:"sugar_calendar_bookings_notice_dismiss",nonce:sugar_calendar_bookings_admin_notices.nonce,id:o.replace("sugar-calendar-bookings-notice-","")})},removeNoticeQueryArgs(){const e=new URL(window.location.href),o=e.searchParams;let n=!1;if(o.has("scbookings-notice")&&(o.delete("scbookings-notice"),n=!0),o.has("scbookings-notice-data")&&(o.delete("scbookings-notice-data"),n=!0),n){const n=e.pathname+(o.toString()?"?"+o.toString():"")+e.hash;window.history.replaceState(null,"",n)}}};t.init()})();