/* Requirements for Adobe Express Install
- only one instance can be active at a time
- fp 6.0.65 or higher
- Win/Mac OS only
- no Webkit engines older than version 312
359955
function canExpressInstall() {
		return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
	}
1367359
function installAllRequirements() {
  // fse.ensureDirSync(path.join(this.servicePath, '.serverless'));
  // First, check and delete cache versions, if enabled
  checkForAndDeleteMaxCacheVersions(this.options, this.serverless);

  // Then if we're going to package functions individually...
  if (this.serverless.service.package.individually) {
    let doneModules = [];
    this.targetFuncs
      .filter(func =>
        (func.runtime || this.serverless.service.provider.runtime).match(
          /^python.*/
        )
      )
      .map(f => {
        if (!get(f, 'module')) {
          set(f, ['module'], '.');
        }
        // If we didn't already process a module (functions can re-use modules)
        if (!doneModules.includes(f.module)) {
          const reqsInstalledAt = installRequirementsIfNeeded(
            this.servicePath,
            f.module,
            this.options,
            f,
            this.serverless
          );
          // Add modulePath into .serverless for each module so it's easier for injecting and for users to see where reqs are
          let modulePath = path.join(
            this.servicePath,
            '.serverless',
            `${f.module}`,
            'requirements'
          );
          // Only do if we didn't already do it
          if (
            reqsInstalledAt &&
            !fse.existsSync(modulePath) &&
            reqsInstalledAt != modulePath
          ) {
            if (this.options.useStaticCache) {
              // Windows can't symlink so we have to copy on Windows,
              // it's not as fast, but at least it works
              if (process.platform == 'win32') {
                fse.copySync(reqsInstalledAt, modulePath);
              } else {
                fse.symlink(reqsInstalledAt, modulePath);
              }
            } else {
              fse.rename(reqsInstalledAt, modulePath);
            }
          }
          doneModules.push(f.module);
        }
      });
  } else {
    const reqsInstalledAt = installRequirementsIfNeeded(
      this.servicePath,
      '',
      this.options,
      {},
      this.serverless
    );
    // Add symlinks into .serverless for so it's easier for injecting and for users to see where reqs are
    let symlinkPath = path.join(
      this.servicePath,
      '.serverless',
      `requirements`
    );
    // Only do if we didn't already do it
    if (
      reqsInstalledAt &&
      !fse.existsSync(symlinkPath) &&
      reqsInstalledAt != symlinkPath
    ) {
      // Windows can't symlink so we have to use junction on Windows
      if (process.platform == 'win32') {
        fse.symlink(reqsInstalledAt, symlinkPath, 'junction');
      } else {
        fse.symlink(reqsInstalledAt, symlinkPath);
      }
    }
  }
}
1297211
async function bundle(opts: *) {
  const directory = process.cwd();
  const configPath = getWebpackConfig(directory, opts.config);

  const [
    configs,
    availablePlatforms,
  ] = makeReactQMLConfig(
    // $FlowFixMe: Dynamic require
    require(configPath),
    {
      root: directory,
      dev: opts.dev,
      minify: opts.minify,
      bundle: true,
    }
  );

  const config = configs[availablePlatforms.indexOf(opts.platform)];

  if (opts.assetsDest) {
    config.output.path = path.isAbsolute(opts.assetsDest)
      ? opts.assetsDest
      : path.join(directory, opts.assetsDest);
  }

  if (opts.bundleOutput) {
    config.output.filename = path.isAbsolute(opts.bundleOutput)
      ? path.relative(config.output.path, opts.bundleOutput)
      : path.relative(
          config.output.path,
          path.join(directory, opts.bundleOutput)
        );
  }

  const compiler = webpack(config);

  logger.info(
    messages.initialBundleInformation({
      entry: config.entry,
      dev: opts.dev,
    })
  );

  const stats = await new Promise((resolve, reject) =>
    compiler.run((err, info) => {
      if (err || info.hasErrors()) {
        reject(
          new MessageError(
            messages.bundleFailed({
              errors: err
                ? [err.message]
                : info.toJson({ errorDetails: true }).errors,
            })
          )
        );
      } else {
        resolve(info);
      }
    })
  );

  clear();

  logger.done(
    messages.bundleBuilt({
      stats,
      platform: opts.platform,
      assetsPath: config.output.path,
      bundlePath: config.output.filename,
    })
  );
}
477889
function aws() {
  var publisher = !!CONFIG.aws ? $.awspublish.create(CONFIG.aws) : $.awspublish.create();
  var headers = {
    'Cache-Control': 'max-age=315360000, no-transform, public'
  };

  return gulp.src('./dist/assets/img/*')
    // publisher will add Content-Length, Content-Type and headers specified above
    // If not specified it will set x-amz-acl to public-read by default
    .pipe(publisher.publish(headers))

    // create a cache file to speed up consecutive uploads
    //.pipe(publisher.cache())

    // print upload updates to console
    .pipe($.awspublish.reporter());
}
1079344
public static function includeRequirements()
    {
        $debugbar = self::getDebugBar();

        if (!$debugbar) {
            return;
        }

        // Already called
        if (self::$renderer) {
            return;
        }

        $renderer = $debugbar->getJavascriptRenderer();

        // We don't need the true path since we are going to use Requirements API that appends the BASE_PATH
        $assetsResource = self::moduleResource('assets');
        $renderer->setBasePath($assetsResource->getRelativePath());
        $renderer->setBaseUrl(Director::makeRelative($assetsResource->getURL()));

        $includeJquery = self::config()->get('include_jquery');
        // In CMS, jQuery is already included
        if (self::isAdminController()) {
            $includeJquery = false;
        }
        // If jQuery is already included, set to false
        $js = Requirements::backend()->getJavascript();
        foreach ($js as $url => $args) {
            $name = basename($url);
            if ($name == 'jquery.js' || $name == 'jquery.min.js') {
                $includeJquery = false;
                break;
            }
        }

        if ($includeJquery) {
            $renderer->setEnableJqueryNoConflict(true);
        } else {
            $renderer->disableVendor('jquery');
            $renderer->setEnableJqueryNoConflict(false);
        }

        if (DebugBar::config()->get('enable_storage')) {
            $renderer->setOpenHandlerUrl('__debugbar');
        }

        foreach ($renderer->getAssets('css') as $cssFile) {
            Requirements::css(Director::makeRelative(ltrim($cssFile, '/')));
        }

        foreach ($renderer->getAssets('js') as $jsFile) {
            Requirements::javascript(Director::makeRelative(ltrim($jsFile, '/')));
        }

        self::$renderer = $renderer;
    }
1321373
function() {
    return !!(_flashState.sandboxed || _flashState.disabled || _flashState.outdated || _flashState.unavailable || _flashState.degraded || _flashState.deactivated);
  }
370480
function configure() {
        server.use(config.assets ? config.assets : '/assets', express.static(`${app.root}/views/assets`))

        server.use(bodyparser.json({ limit: config.body_parser_limit }))
        server.use(bodyparser.urlencoded({
            parameterLimit: 10000,
            limit: config.body_parser_limit,
            extended: true
        }))

        if (config.session) {
            server.use(session({
                secret: config.session_secret,
                store: new redisStore({
                    host: config.session_redis_host || 'localhost',
                    port: config.session_redis_port || 6379,
                    client: redis.createClient()
                }),
                resave: false,
                saveUninitialized: true
            }))
        }

        server.set('views', `${app.root}/views`)
        server.set('view engine', 'twig')

    }
642946
function isAvailable( error, bool ) {
		if ( error ) {
			return clbk( error );
		}
		if ( !bool ) {
			error = new Error( 'invalid option. Package name is not available on NPM. Option: `' + opts.name + '`.' );
			return clbk( error );
		}
		fs.readFile( fpath, {'encoding':'utf8'}, onRead );
	}
471692
function(ac) {
            var data = {},
                selectedmojit = ac.params.getFromRoute('mojit') || 'none';
            data[selectedmojit] = true;
            ac.assets.addCss('./index.css');
            ac.done(data);
        }
992297
function () {

/*Line 304 - 'AtomApplication.js' */                this.bindEvent(window, "resize", "invokeUpdateUI");

/*Line 306 - 'AtomApplication.js' */                var self = this;
/*Line 307 - 'AtomApplication.js' */                //this._onRefreshValue = function () {
/*Line 308 - 'AtomApplication.js' */                //    self.onRefreshValue.apply(self, arguments);
/*Line 309 - 'AtomApplication.js' */                //};
/*Line 310 - 'AtomApplication.js' */                this._onRefreshValue = aggregateHandler(function () {
/*Line 311 - 'AtomApplication.js' */                    self.onRefreshValue.apply(self, arguments);
/*Line 312 - 'AtomApplication.js' */                });

/*Line 314 - 'AtomApplication.js' */                this._scope._$_watcher = this;

/*Line 316 - 'AtomApplication.js' */                base.init.call(this);


/*Line 319 - 'AtomApplication.js' */                this.closeCommand = function () {
/*Line 320 - 'AtomApplication.js' */                    self.onCloseCommand.apply(self, arguments);
/*Line 321 - 'AtomApplication.js' */                };

/*Line 323 - 'AtomApplication.js' */            }
951780
public function needsProcessing(array $asset)
	{
		if (isset(static::$needs_processing[$asset['source']])) {
			return static::$needs_processing[$asset['source']];
		}
		
		$path          = $this->path($asset['source']);
		$is_public     = (bool) stristr($path, $this->public_path);
		$compiled_exts = array('less');
		
		// Any dependencies that need processing?
		$dependencies = isset($asset['dependencies']) ? $asset['dependencies'] : array();
		$dependencies = array_unique(array_merge(array_get($this->dependencies, $asset['ext'], array()), $dependencies));
		if (!empty($dependencies)) {
			foreach ($dependencies as $dep_source) {
				if (!empty(static::$needs_processing[$dep_source])) {
					return static::$needs_processing[$asset['source']] = true;
				}
			}
		}
		
		// This file does not require processing.
		if ($is_public && !in_array($asset['ext'], $compiled_exts)) {
			return static::$needs_processing[$asset['source']] = false;
		}
		
		$cache_path = $this->publicPath($asset);
		
		// Does file exist?
		if (!File::exists($cache_path)) {
			return static::$needs_processing[$asset['source']] = true;
		}
		
		// Is cached file newer than the original?
		if (File::lastModified($cache_path) >= File::lastModified($path)) {
			return static::$needs_processing[$asset['source']] = false;
		}
		
		// Check md5 to see if content is the same.
		if ($f = fopen($cache_path, 'r')) {
			$line = (string) fgets($f);
			fclose($f);
			
			if (false !== strstr($line, '*/')) {
				$md5 = trim(str_replace(array('/*', '*/'), '', $line));
				
				if (32 == strlen($md5)) {
					$file_md5 = md5_file($path);
					
					// Skip compiling and touch existing file.
					if ($file_md5 === $md5) {
						touch($cache_path);
						return false;
					}
				}
			}
		}
		
		return static::$needs_processing[$asset['source']] = true;
	}
233156
function( required, startFunc ) {
		if ( required !== render.state ) {
			render._stateError( startFunc || render.requireState );
		}
	}
992464
function() {
      // locale InsFrame root folder
      homeFolder = __dirname;
      console.log("   info  -".cyan, "InsFrame root".yellow, homeFolder);

      // express config
      app.set("view engine", "ejs");
      app.set("views", homeFolder + "/views");
      app.set("views");
      app.set("view options", { layout: null });

      // static resources
      app.use("/js", express.static(homeFolder + "/js"));
      app.use("/css", express.static(homeFolder + "/css"));
      app.use("/images", express.static(homeFolder + "/images"));

      // port
      port = this.port || parseInt(process.argv[2]) || PORT;

      // Timer to send close requests when timeout occurs.
      setInterval(function() {
        for (var id in urlData) {
          urlData[id].timeout -= CHECK_INTERVAL;
          if (urlData[id].timeout <= 0) {
            io.sockets.emit("close", { id: id, url: urlData[id].url });
            console.log("   info  -".cyan, "close/timeout".yellow, JSON.stringify(urlData[id]));
            delete urlData[id];
          }
        }
      }, CHECK_INTERVAL);
    }
475931
function() {
            var ua = navigator.userAgent, parsed;

            if (/*@cc_on@if(@_jscript_version>=5)!@end@*/0)
                return true;
                
            if (parsed = ua.match(/Chrome\/(\d+\.\d+\.\d+\.\d+)/))
                return parsed[1] >= '4.0.249.4' || 1 * parsed[1].split(".")[0] > 5;
            if ((parsed = ua.match(/Safari\/(\d+\.\d+)/)) && !/iPhone/.test(ua))
                return parsed[1] >= '525.13';
            if (/Opera/.test({}.toString.call(window.opera)))
                return opera.version() >= '10.00';
            if (parsed = ua.match(/rv:(\d+\.\d+\.\d+)[^b].*Gecko\//))
                return parsed[1] >= '1.9.1';

            return false;
        }
631603
function installUdevRules() {
	if (!systemSupportsUdev()) {
		return when.reject(new Error('Not supported'));
	}
	return when.promise((resolve, reject) => {
		const cmd = `sudo cp "${UDEV_RULES_ASSET_FILE}" "${UDEV_RULES_SYSTEM_FILE}"`;
		console.log(cmd);
		childProcess.exec(cmd, err => {
			if (err) {
				_udevRulesInstalled = undefined;
				return reject(new VError(err, 'Could not install udev rules'));
			}
			_udevRulesInstalled = true;
			resolve();
		});
	});
}
337909
public function requireJs()
    {
        $scripts = $this->dispatcher->scripts('script', $this->assets, $this->path);

        $required = [];
        $string   = '';
        if (isset($this->assets['script'])) {
            foreach ($this->assets['script'] as $js) {
                if (!is_null($require = array_get($js, 'attributes.require'))) {
                    $required["'" . implode("','", $require) . "'"][] = $js['source'];
                }
            }


            $idx = 0;
            foreach ($required as $names => $scripts) {
                $require = "require([$names],function(){ " . "require(['" . implode("','", $scripts) . "'],function(){ :replace })" . "  });";
                if ($idx > 0) {
                    $string = str_replace(':replace', $require, $string);
                } else {
                    $string = $require;
                }
                ++$idx;
            }
        }

        $inlines = implode('', $this->dispatcher->scripts('inline', $this->assets, $this->path));

        $string = !strlen($string) ? $inlines : str_replace(':replace', $inlines . $this->afterLoad(), $string);


        $require = "['" . implode("','", $scripts) . "']";
        return $this->requireInline($require, $string);
    }
1158260
function softwareUpdate_forceFallback() {
    var dirService = Cc["@mozilla.org/file/directory_service;1"].
                     getService(Ci.nsIProperties);

    var updateDir;
    var updateStatus;

    // Check the global update folder first
    try {
      updateDir = dirService.get("UpdRootD", Ci.nsIFile);
      updateDir.append("updates");
      updateDir.append("0");

      updateStatus = updateDir.clone();
      updateStatus.append("update.status");
    } catch (ex) {
    }

    if (updateStatus == undefined || !updateStatus.exists()) {
      updateDir = dirService.get("XCurProcD", Ci.nsIFile);
      updateDir.append("updates");
      updateDir.append("0");

      updateStatus = updateDir.clone();
      updateStatus.append("update.status");
    }

    var foStream = Cc["@mozilla.org/network/file-output-stream;1"].
                   createInstance(Ci.nsIFileOutputStream);
    var status = "failed: 6\n";
    foStream.init(updateStatus, 0x02 | 0x08 | 0x20, -1, 0);
    foStream.write(status, status.length);
    foStream.close();
  }