/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{whenOnce as r}from"../../core/reactiveUtils.js";import{debug as t}from"../../core/scheduling.js";import{dispatch as e}from"../../core/accessorSupport/watch.js";async function o(o){switch(o.type){case"2d":case"3d":e(),t.dispatch(),await r(()=>o.fatalError||!o.updating).then(()=>n(o))}if(o.fatalError)throw o.fatalError}function n(r){const t="3d"===r.type?r.resourceController?.scheduler?.test?.getRunning()??null:null;if(null!=t)throw new Error(`View is not updating, but scheduler is running:${t} at ${(new Error).stack}`)}export{o as default};
