tribe.tickets=tribe.tickets||{},tribe.tickets.admin=tribe.tickets.admin||{},tribe.tickets.admin.manager={},function(e,t,i){const r=e(document);i.selectors={container:".tribe-tickets__admin-container",loader:".tribe-common-c-loader",hiddenElement:".tribe-common-a11y-hidden",messageError:".tribe-tickets__admin-container-message--error"},i.currentAjaxRequest=null,i.$containers=e(),i.selectContainers=function(){i.$containers=e(i.selectors.container)},i.cleanup=function(t){const i=e(t);i.trigger("beforeCleanup.tribeTicketsAdmin",[i]),i.trigger("afterCleanup.tribeTicketsAdmin",[i])},i.setup=function(t,i){const r=e(i);r.trigger("beforeSetup.tribeTicketsAdmin",[r,t]),r.trigger("afterSetup.tribeTicketsAdmin",[r,t])},i.request=function(t,r){const n=i.getAjaxSettings(r);t.nonce=TribeTicketsAdminManager.tribeTicketsAdminManagerNonce,n.data=t,i.currentAjaxRequest=e.ajax(n)},i.getAjaxSettings=function(e){return{url:TribeTicketsAdminManager.ajaxurl,method:"POST",beforeSend:i.ajaxBeforeSend,complete:i.ajaxComplete,success:i.ajaxSuccess,error:i.ajaxError,context:e}},i.ajaxBeforeSend=function(e,t){const i=this;i.trigger("beforeAjaxBeforeSend.tribeTicketsAdmin",[e,t]),tribe.tickets.loader.show(i),i.trigger("afterAjaxBeforeSend.tribeTicketsAdmin",[e,t])},i.ajaxComplete=function(e,t){const r=this;r.trigger("beforeAjaxComplete.tribeTicketsAdmin",[e,t]),tribe.tickets.loader.hide(r),r.trigger("afterAjaxComplete.tribeTicketsAdmin",[e,t]),i.currentAjaxRequest=null},i.ajaxSuccess=function(e,t,r){const n=this,c=e.data.html;e.success?(n.trigger("beforeAjaxSuccess.tribeTicketsAdmin",[e,t,r]),i.cleanup(n),n.html(c),i.setup(n,0),i.selectContainers(),n.trigger("afterAjaxSuccess.tribeTicketsAdmin",[e,t,r])):n.find(i.selectors.messageError).length||n.prepend(c)},i.ajaxError=function(e,t){this.trigger("beforeAjaxError.tribeTicketsAdmin",[e,t]),this.trigger("afterAjaxError.tribeTicketsAdmin",[e,t])},i.ready=function(){i.selectContainers(),i.$containers.each(i.setup)},r.ready(i.ready)}(jQuery,window.underscore||window._,tribe.tickets.admin.manager),window.tec=window.tec||{},window.tec.tickets=window.tec.tickets||{},window.tec.tickets.admin=window.tec.tickets.admin||{},window.tec.tickets.admin.ticketsManager={};