import e from"@arcgis/core/rest/support/Query";import{executeQuery as r,executeCountByQuery as t}from"../../support/_query.js";import{isFeatureLayer as s}from"../../utilities/layers.js";import{QueryProviderBase as o}from"./QueryProviderBase.js";export class ArcGISServiceTableQueryProvider extends o{isSupported(e){const{table:r}=e;return s(r)&&e.capabilities.supportsQuery}_query(e,t,s){const{table:o}=e,i=o.createQuery();return i.where=t,i.outFields=s.outFields,o.capabilities?.query?.supportsPagination&&(i.num=s.maxResults),r(i,e,o,s.cancelToken)}_count(r,s,o){const{table:i}=r,u=new e({returnGeometry:!1});return u.where=s,i.capabilities?.query?.supportsPagination&&(u.num=o.maxResults),t(u,r,i,o.cancelToken)}}