text: /*!
   * Start Bootstrap - SB Admin 2 v4.1.4 (https://startbootstrap.com/theme/sb-admin-2)
   * Copyright 2013-2021 Start Bootstrap
   * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-sb-admin-2/blob/master/LICENSE)
   */
  
  import{TUNABLE_FLAG_VALUE_RANGE_MAP}from"./params.js";function isiOS(){return/iPhone|iPad|iPod/i.test(navigator.userAgent)}function isAndroid(){return/Android/i.test(navigator.userAgent)}function isMobile(){return isAndroid()||isiOS()}async function resetBackend(e){var n=tf.engine();if(!(e in n.registryFactory))throw new Error(`${e} backend is not registed.`);e in n.registry&&(n=tf.findBackendFactory(e),tf.removeBackend(e),tf.registerBackend(e,n)),await tf.setBackend(e)}async function setBackendAndEnvFlags(e,n){if(null!=e){if("object"!=typeof e)throw new Error(`An object is expected, while a(n) ${typeof e} is found.`);for(const t in e){if(!(t in TUNABLE_FLAG_VALUE_RANGE_MAP))throw new Error(`${t} is not a tunable or valid environment flag.`);if(-1===TUNABLE_FLAG_VALUE_RANGE_MAP[t].indexOf(e[t]))throw new Error(`${t} value is expected to be in the range [${TUNABLE_FLAG_VALUE_RANGE_MAP[t]}], while ${e[t]}`+" is found.")}tf.env().setFlags(e);var[i,n]=n.split("-");"tfjs"===i&&await resetBackend(n)}}export{isiOS,isAndroid,isMobile,setBackendAndEnvFlags};