(()=>{"use strict";AC_SERVICES.addListener("Table.Ready",()=>{var e,t;const r=document.querySelector(".tablenav-pages .displaying-num");if(r){let l=r.innerHTML.split(" ")[0],n=r.innerHTML.replace(/\D/g,"");null===(t=null===(e=AC_SERVICES.getService("Editing"))||void 0===e?void 0:e.getService("BulkSelectionRow"))||void 0===t||t.setTotalItems(parseInt(n),l)}}),AC_SERVICES.filters.addFilter("table_row_id",(e,t)=>{var r,l;let n=t.row;return Number.isNaN(e)&&(e=null!==(l=null===(r=n.querySelector('.check-column input[name="order[]"]'))||void 0===r?void 0:r.value)&&void 0!==l?l:0),e});class e{place(){var e,t;const r=document.querySelector(".tablenav.top"),l=null==r?void 0:r.querySelector(".alignleft.actions:not(.bulkactions)");if(!r||!l)return;new AC_SERVICES.$(l).removeClass("alignleft").addClass("acp-smartfilter-actions").prependSelfTo(r),null===(e=AC_SERVICES.$.find(".acp-smartfilters"))||void 0===e||e.prependSelfTo(l),null===(t=AC_SERVICES.$.find("#post-query-submit"))||void 0===t||t.appendSelfTo(l);const n=AC_SERVICES.getService("ResetFilters");n&&l.append(n.getElement())}}AC_SERVICES.addListener("Search.PlacementFactory",t=>{t.register("wc_order",new e),t.register("wc_order_subscription",new e)})})();