<|start_filename|>node_modules/@jimp/tiff/dist/index.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

require("core-js/modules/es6.object.define-property");

var _utif = _interopRequireDefault(require("utif"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var MIME_TYPE = 'image/tiff';

var _default = function _default() {
  return {
    mime: _defineProperty({}, MIME_TYPE, ['tiff', 'tif']),
    constants: {
      MIME_TIFF: MIME_TYPE
    },
    decoders: _defineProperty({}, MIME_TYPE, function (data) {
      var ifds = _utif.default.decode(data);

      var page = ifds[0];

      _utif.default.decodeImages(data, ifds);

      var rgba = _utif.default.toRGBA8(page);

      return {
        data: Buffer.from(rgba),
        width: page.t256[0],
        height: page.t257[0]
      };
    }),
    encoders: _defineProperty({}, MIME_TYPE, function (image) {
      var tiff = _utif.default.encodeImage(image.bitmap.data, image.bitmap.width, image.bitmap.height);

      return Buffer.from(tiff);
    })
  };
};

exports.default = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/sharp/vendor/include/hb-ot-var.h<|end_filename|>
/*
 * Copyright © 2017  Google, Inc.
 *
 *  This is part of HarfBuzz, a text shaping library.
 *
 * Permission is hereby granted, without written agreement and without
 * license or royalty fees, to use, copy, modify, and distribute this
 * software and its documentation for any purpose, provided that the
 * above copyright notice and the following two paragraphs appear in
 * all copies of this software.
 *
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 *
 * Red Hat Author(s): <NAME>
 */

#ifndef HB_OT_H_IN
#error "Include <hb-ot.h> instead."
#endif

#ifndef HB_OT_VAR_H
#define HB_OT_VAR_H

#include "hb.h"

HB_BEGIN_DECLS


#define HB_OT_TAG_VAR_AXIS_ITALIC	HB_TAG('i','t','a','l')
#define HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE	HB_TAG('o','p','s','z')
#define HB_OT_TAG_VAR_AXIS_SLANT	HB_TAG('s','l','n','t')
#define HB_OT_TAG_VAR_AXIS_WIDTH	HB_TAG('w','d','t','h')
#define HB_OT_TAG_VAR_AXIS_WEIGHT	HB_TAG('w','g','h','t')


/*
 * fvar / avar
 */

HB_EXTERN hb_bool_t
hb_ot_var_has_data (hb_face_t *face);


/*
 * Variation axes.
 */


HB_EXTERN unsigned int
hb_ot_var_get_axis_count (hb_face_t *face);

/**
 * hb_ot_var_axis_flags_t:
 * @HB_OT_VAR_AXIS_FLAG_HIDDEN: The axis should not be exposed directly in user interfaces.
 *
 * Since: 2.2.0
 */
typedef enum { /*< flags >*/
  HB_OT_VAR_AXIS_FLAG_HIDDEN	= 0x00000001u,

  _HB_OT_VAR_AXIS_FLAG_MAX_VALUE= 0x7FFFFFFFu /*< skip >*/
} hb_ot_var_axis_flags_t;

/**
 * hb_ot_var_axis_info_t:
 *
 * Since: 2.2.0
 */
typedef struct hb_ot_var_axis_info_t
{
  unsigned int			axis_index;
  hb_tag_t			tag;
  hb_ot_name_id_t		name_id;
  hb_ot_var_axis_flags_t	flags;
  float				min_value;
  float				default_value;
  float				max_value;
  /*< private >*/
  unsigned int			reserved;
} hb_ot_var_axis_info_t;

HB_EXTERN unsigned int
hb_ot_var_get_axis_infos (hb_face_t             *face,
			  unsigned int           start_offset,
			  unsigned int          *axes_count /* IN/OUT */,
			  hb_ot_var_axis_info_t *axes_array /* OUT */);

HB_EXTERN hb_bool_t
hb_ot_var_find_axis_info (hb_face_t             *face,
			  hb_tag_t               axis_tag,
			  hb_ot_var_axis_info_t *axis_info);


/*
 * Named instances.
 */

HB_EXTERN unsigned int
hb_ot_var_get_named_instance_count (hb_face_t *face);

HB_EXTERN hb_ot_name_id_t
hb_ot_var_named_instance_get_subfamily_name_id (hb_face_t   *face,
						unsigned int instance_index);

HB_EXTERN hb_ot_name_id_t
hb_ot_var_named_instance_get_postscript_name_id (hb_face_t  *face,
						unsigned int instance_index);

HB_EXTERN unsigned int
hb_ot_var_named_instance_get_design_coords (hb_face_t    *face,
					    unsigned int  instance_index,
					    unsigned int *coords_length, /* IN/OUT */
					    float        *coords         /* OUT */);


/*
 * Conversions.
 */

HB_EXTERN void
hb_ot_var_normalize_variations (hb_face_t            *face,
				const hb_variation_t *variations, /* IN */
				unsigned int          variations_length,
				int                  *coords, /* OUT */
				unsigned int          coords_length);

HB_EXTERN void
hb_ot_var_normalize_coords (hb_face_t    *face,
			    unsigned int coords_length,
			    const float *design_coords, /* IN */
			    int *normalized_coords /* OUT */);


HB_END_DECLS

#endif /* HB_OT_VAR_H */


<|start_filename|>node_modules/string-similarity/compare-strings.js<|end_filename|>
var _forEach = require('lodash.foreach');
var _map = require('lodash.map');
var _every = require('lodash.every');
var _maxBy = require('lodash.maxby');
var _flattenDeep = require('lodash.flattendeep');

exports.compareTwoStrings = compareTwoStrings;
exports.findBestMatch = findBestMatch;

function compareTwoStrings(str1, str2) {
  var result = null;
  result = calculateResultIfIdentical(str1, str2);
  if (result != null) {
    return result;
  }
  result = calculateResultIfEitherIsEmpty(str1, str2);
  if (result != null) {
    return result;
  }
  result = calculateResultIfBothAreSingleCharacter(str1, str2);
  if (result != null) {
    return result;
  }

  var pairs1 = wordLetterPairs(str1.toUpperCase());
  var pairs2 = wordLetterPairs(str2.toUpperCase());
  var intersection = 0;
  var union = pairs1.length + pairs2.length;

  _forEach(pairs1, function (pair1) {
    for(var i = 0; i < pairs2.length; i++) {
      var pair2 = pairs2[i];
      if (pair1 === pair2) {
        intersection++;
        pairs2.splice(i, 1);
        break;
      }
    }
  });

  return (2.0 * intersection) / union;

  // private functions ---------------------------
  function letterPairs(str) {
    var numPairs = str.length - 1;
    var pairs = [];
    for(var i = 0; i < numPairs; i++) {
      pairs[i] = str.substring(i, i + 2);
    }
    return pairs;
  }

  function wordLetterPairs(str) {
    return _flattenDeep(_map(str.split(' '), letterPairs));
  }

  function calculateResultIfIdentical(str1, str2) {
    if (str1.toUpperCase() == str2.toUpperCase()) {
      return 1;
    }
    return null;
  }

  function calculateResultIfBothAreSingleCharacter(str1, str2) {
    if (str1.length == 1 && str2.length == 1) {
      return 0;
    }
  }

  function calculateResultIfEitherIsEmpty(str1, str2) {
    // if both are empty strings
    if (str1.length == 0 && str2.length == 0) {
      return 1;
    }

    // if only one is empty string
    if ((str1.length + str2.length) > 0 && (str1.length * str2.length) == 0) {
      return 0;
    }
    return null;
  }
}


function findBestMatch(mainString, targetStrings) {
  if (!areArgsValid(mainString, targetStrings)) {
    throw new Error('Bad arguments: First argument should be a string, second should be an array of strings');
  }
  var ratings = _map(targetStrings, function (targetString) {
    return {
      target: targetString,
      rating: compareTwoStrings(mainString, targetString)
    };
  });

  return {
    ratings: ratings,
    bestMatch: _maxBy(ratings, 'rating')
  };

  // private functions ---------------------------
  function areArgsValid(mainString, targetStrings) {
    var mainStringIsAString = (typeof mainString === 'string');

    var targetStringsIsAnArrayOfStrings = Array.isArray(targetStrings) &&
      targetStrings.length > 0 &&
      _every(targetStrings, function (targetString) {
        return (typeof targetString === 'string');
      });

    return mainStringIsAString && targetStringsIsAnArrayOfStrings;
  }
}


<|start_filename|>node_modules/sharp/vendor/include/libexif/exif-byte-order.h<|end_filename|>
/*! \file exif-byte-order.h
 * \brief Defines the ExifByteOrder enum and the associated functions.
 */
/* 
 * Copyright (c) 2002 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA.
 */

#ifndef __EXIF_BYTE_ORDER_H__
#define __EXIF_BYTE_ORDER_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/*! Which byte order to use */
typedef enum {
	/*! Big-endian byte order */
	EXIF_BYTE_ORDER_MOTOROLA,
	/*! Little-endian byte order */
	EXIF_BYTE_ORDER_INTEL
} ExifByteOrder;

/*! Return a short, localized, textual name for the given byte order.
 * \param[in] order byte order
 * \return localized textual name of the byte order
 */
const char *exif_byte_order_get_name (ExifByteOrder order);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __EXIF_BYTE_ORDER_H__ */


<|start_filename|>node_modules/chokidar/node_modules/readdirp/index.js<|end_filename|>
'use strict';

const fs = require('fs');
const { Readable } = require('stream');
const sysPath = require('path');
const picomatch = require('picomatch');
const { promisify } = require('util');
const [readdir, stat, lstat] = [promisify(fs.readdir), promisify(fs.stat), promisify(fs.lstat)];
const supportsDirent = 'Dirent' in fs;

/**
 * @typedef {Object} EntryInfo
 * @property {String} path
 * @property {String} fullPath
 * @property {fs.Stats=} stats
 * @property {fs.Dirent=} dirent
 * @property {String} basename
 */

const isWindows = process.platform === 'win32';
const supportsBigint = typeof BigInt === 'function';
const BANG = '!';
const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP']);
const STAT_OPTIONS_SUPPORT_LENGTH = 3;
const FILE_TYPE = 'files';
const DIR_TYPE = 'directories';
const FILE_DIR_TYPE = 'files_directories';
const EVERYTHING_TYPE = 'all';
const FILE_TYPES = new Set([FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]);
const DIR_TYPES = new Set([DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]);
const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE];

const isNormalFlowError = errorCode => NORMAL_FLOW_ERRORS.has(errorCode);

const checkBasename = f => f(entry.basename);

const normalizeFilter = filter => {
  if (filter === undefined) return;
  if (typeof filter === 'function') return filter;

  if (typeof filter === 'string') {
    const glob = picomatch(filter.trim());
    return entry => glob(entry.basename);
  }

  if (Array.isArray(filter)) {
    const positive = [];
    const negative = [];
    for (const item of filter) {
      const trimmed = item.trim();
      if (trimmed.charAt(0) === BANG) {
        negative.push(picomatch(trimmed.slice(1)));
      } else {
        positive.push(picomatch(trimmed));
      }
    }

    if (negative.length > 0) {
      if (positive.length > 0) {
        return entry =>
          positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename));
      } else {
        return entry => !negative.some(f => f(entry.basename));
      }
    } else {
      return entry => positive.some(f => f(entry.basename));
    }
  }
};

class ExploringDir {
  constructor(path, depth) {
    this.path = path;
    this.depth = depth;
  }
}

class ReaddirpStream extends Readable {
  static get defaultOptions() {
    return {
      root: '.',
      fileFilter: path => true,
      directoryFilter: path => true,
      type: 'files',
      lstat: false,
      depth: 2147483648,
      alwaysStat: false
    };
  }

  constructor(options = {}) {
    super({ objectMode: true, highWaterMark: 1, autoDestroy: true });
    const opts = Object.assign({}, ReaddirpStream.defaultOptions, options);
    const { root } = opts;

    this._fileFilter = normalizeFilter(opts.fileFilter);
    this._directoryFilter = normalizeFilter(opts.directoryFilter);
    this._statMethod = opts.lstat ? lstat : stat;
    this._statOpts = { bigint: isWindows };
    this._maxDepth = opts.depth;
    this._entryType = opts.type;
    this._root = sysPath.resolve(root);
    this._isDirent = !opts.alwaysStat && supportsDirent;
    this._statsProp = this._isDirent ? 'dirent' : 'stats';
    this._readdir_options = { encoding: 'utf8', withFileTypes: this._isDirent };

    // Launch stream with one parent, the root dir.
    /** @type Array<[string, number]>  */
    this.parents = [new ExploringDir(root, 0)];
    this.filesToRead = 0;
  }

  async _read() {
    do {
      // If the stream was destroyed, we must not proceed.
      if (this.destroyed) return;

      const parent = this.parents.pop();
      if (!parent) {
        // ...we have files to process; but not directories.
        // hence, parent is undefined; and we cannot execute fs.readdir().
        // The files are being processed anywhere.
        break;
      }
      await this._exploreDirectory(parent);
    } while (!this.isPaused() && !this._isQueueEmpty());

    this._endStreamIfQueueIsEmpty();
  }

  async _exploreDirectory(parent) {
    /** @type Array<fs.Dirent|string> */
    let files = [];

    // To prevent race conditions, we increase counter while awaiting readdir.
    this.filesToRead++;
    try {
      files = await readdir(parent.path, this._readdir_options);
    } catch (error) {
      if (isNormalFlowError(error.code)) {
        this._handleError(error);
      } else {
        this._handleFatalError(error);
      }
    }
    this.filesToRead--;

    // If the stream was destroyed, after readdir is completed
    if (this.destroyed) return;

    this.filesToRead += files.length;

    const entries = await Promise.all(files.map(dirent => this._formatEntry(dirent, parent)));

    if (this.destroyed) return;

    for (let i = 0; i < entries.length; i++) {
      const entry = entries[i];
      this.filesToRead--;
      if (!entry) {
        continue;
      }
      if (this._isDirAndMatchesFilter(entry)) {
        this._pushNewParentIfLessThanMaxDepth(entry.fullPath, parent.depth + 1);
        this._emitPushIfUserWantsDir(entry);
      } else if (this._isFileAndMatchesFilter(entry)) {
        this._emitPushIfUserWantsFile(entry);
      }
    }
  }

  _isStatOptionsSupported() {
    return this._statMethod.length === STAT_OPTIONS_SUPPORT_LENGTH;
  }

  _stat(fullPath) {
    if (isWindows && this._isStatOptionsSupported()) {
      return this._statMethod(fullPath, this._statOpts);
    } else {
      return this._statMethod(fullPath);
    }
  }

  async _formatEntry(dirent, parent) {
    const basename = this._isDirent ? dirent.name : dirent;
    const fullPath = sysPath.resolve(sysPath.join(parent.path, basename));

    let stats;
    if (this._isDirent) {
      stats = dirent;
    } else {
      try {
        stats = await this._stat(fullPath);
      } catch (error) {
        if (isNormalFlowError(error.code)) {
          this._handleError(error);
        } else {
          this._handleFatalError(error);
        }
        return;
      }
    }
    const path = sysPath.relative(this._root, fullPath);

    /** @type {EntryInfo} */
    const entry = { path, fullPath, basename, [this._statsProp]: stats };

    return entry;
  }

  _isQueueEmpty() {
    return this.parents.length === 0 && this.filesToRead === 0 && this.readable;
  }

  _endStreamIfQueueIsEmpty() {
    if (this._isQueueEmpty()) {
      this.push(null);
    }
  }

  _pushNewParentIfLessThanMaxDepth(parentPath, depth) {
    if (depth <= this._maxDepth) {
      this.parents.push(new ExploringDir(parentPath, depth));
      return true;
    } else {
      return false;
    }
  }

  _isDirAndMatchesFilter(entry) {
    return entry[this._statsProp].isDirectory() && this._directoryFilter(entry);
  }

  _isFileAndMatchesFilter(entry) {
    const stats = entry[this._statsProp];
    const isFileType =
      (this._entryType === EVERYTHING_TYPE && !stats.isDirectory()) ||
      (stats.isFile() || stats.isSymbolicLink());
    return isFileType && this._fileFilter(entry);
  }

  _emitPushIfUserWantsDir(entry) {
    if (DIR_TYPES.has(this._entryType)) {
      // TODO: Understand why this happens.
      const fn = () => {
        this.push(entry);
      };
      if (this._isDirent) setImmediate(fn);
      else fn();
    }
  }

  _emitPushIfUserWantsFile(entry) {
    if (FILE_TYPES.has(this._entryType)) {
      this.push(entry);
    }
  }

  _handleError(error) {
    if (!this.destroyed) {
      this.emit('warn', error);
    }
  }

  _handleFatalError(error) {
    this.destroy(error);
  }
}

/**
 * @typedef {Object} ReaddirpArguments
 * @property {Function=} fileFilter
 * @property {Function=} directoryFilter
 * @property {String=} type
 * @property {Number=} depth
 * @property {String=} root
 * @property {Boolean=} lstat
 * @property {Boolean=} bigint
 */

/**
 * Main function which ends up calling readdirRec and reads all files and directories in given root recursively.
 * @param {String} root Root directory
 * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth
 */
const readdirp = (root, options = {}) => {
  let type = options['entryType'] || options.type;
  if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility
  if (type) options.type = type;
  if (root == null || typeof root === 'undefined') {
    throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)');
  } else if (typeof root !== 'string') {
    throw new Error(`readdirp: root argument must be a string. Usage: readdirp(root, options)`);
  } else if (type && !ALL_TYPES.includes(type)) {
    throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);
  }

  options.root = root;
  return new ReaddirpStream(options);
};

const readdirpPromise = (root, options = {}) => {
  return new Promise((resolve, reject) => {
    const files = [];
    readdirp(root, options)
      .on('data', entry => files.push(entry))
      .on('end', () => resolve(files))
      .on('error', error => reject(error));
  });
};

readdirp.promise = readdirpPromise;
readdirp.ReaddirpStream = ReaddirpStream;
readdirp.default = readdirp;

module.exports = readdirp;


<|start_filename|>node_modules/sharp/vendor/include/gsf/gsf-output-memory.h<|end_filename|>
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * gsf-output-memory.h
 *
 * Copyright (C) 2002-2006 <NAME> (<EMAIL>)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

#ifndef GSF_OUTPUT_MEMORY_H
#define GSF_OUTPUT_MEMORY_H

#include <gsf/gsf-fwd.h>
#include <gsf/gsf-output.h>

G_BEGIN_DECLS

#define GSF_OUTPUT_MEMORY_TYPE	(gsf_output_memory_get_type ())
#define GSF_OUTPUT_MEMORY(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_MEMORY_TYPE, GsfOutputMemory))
#define GSF_IS_OUTPUT_MEMORY(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_MEMORY_TYPE))

typedef struct _GsfOutputMemory GsfOutputMemory;

GType gsf_output_memory_get_type      (void);
/* void  gsf_output_memory_register_type (GTypeModule *module); glib dynamic types are not thread safe */

GsfOutput *gsf_output_memory_new      (void);
const guint8* gsf_output_memory_get_bytes (GsfOutputMemory * mem);

G_END_DECLS

#endif /* GSF_OUTPUT_MEMORY_H */


<|start_filename|>node_modules/node-abi/test/index.js<|end_filename|>
var test = require('tape')
var semver = require('semver')
var getAbi = require('../index').getAbi
var getTarget = require('../index').getTarget
var getNextTarget = require('../index')._getNextTarget
var allTargets = require('../index').allTargets

test('getNextTarget gets the next unsopported target', function (t) {
  var mockTargets = [
    {runtime: 'node', target: '7.0.0', abi: '51', lts: false},
    {runtime: 'node', target: '8.0.0', abi: '57', lts: false},
    {runtime: 'electron', target: '0.36.0', abi: '47', lts: false},
    {runtime: 'electron', target: '1.1.0', abi: '48', lts: false}
  ]
  t.equal(getNextTarget('node', mockTargets), '9.0.0')
  t.equal(getNextTarget('electron', mockTargets), '1.2.0')
  t.end()
})

test('getTarget calculates correct Node target', function (t) {
  t.equal(getTarget(undefined), process.versions.node)
  t.equal(getTarget(null), process.versions.node)
  t.equal(getTarget('11'), '0.10.4')
  t.equal(getTarget('14'), '0.11.11')
  t.equal(getTarget('46'), '4.0.0')
  t.equal(getTarget('47'), '5.0.0')
  t.equal(getTarget('48'), '6.0.0')
  t.equal(getTarget('51'), '7.0.0')
  t.end()
})

test('getTarget calculates correct Electron target', function (t) {
  t.throws(getTarget.bind(null, '14', 'electron'))
  t.equal(getTarget('47', 'electron'), '0.36.0')
  t.equal(getTarget('48', 'electron'), '1.1.0')
  t.equal(getTarget('49', 'electron'), '1.3.0')
  t.equal(getTarget('50', 'electron'), '1.4.0')
  t.end()
})

test('getTarget calculates correct Node-Webkit target', function (t) {
  t.throws(getTarget.bind(null, '14', 'ode-webkit'))
  t.equal(getTarget('47', 'node-webkit'), '0.13.0')
  t.equal(getTarget('48', 'node-webkit'), '0.15.0')
  t.equal(getTarget('51', 'node-webkit'), '0.18.3')
  t.equal(getTarget('57', 'node-webkit'), '0.23.0')
  t.equal(getTarget('59', 'node-webkit'), '0.26.5')
  t.end()
})

test('getAbi calculates correct Node ABI', function (t) {
  t.equal(getAbi(undefined), process.versions.modules)
  t.equal(getAbi(null), process.versions.modules)
  t.throws(function () { getAbi('a.b.c') })
  t.throws(function () { getAbi(getNextTarget('node')) })
  t.equal(getAbi('7.2.0'), '51')
  t.equal(getAbi('7.0.0'), '51')
  t.equal(getAbi('6.9.9'), '48')
  t.equal(getAbi('6.0.0'), '48')
  t.equal(getAbi('5.9.9'), '47')
  t.equal(getAbi('5.0.0'), '47')
  t.equal(getAbi('4.9.9'), '46')
  t.equal(getAbi('4.0.0'), '46')
  t.equal(getAbi('0.12.17'), '14')
  t.equal(getAbi('0.12.0'), '14')
  t.equal(getAbi('0.11.16'), '14')
  t.equal(getAbi('0.11.11'), '14')
  t.equal(getAbi('0.11.10'), '13')
  t.equal(getAbi('0.11.8'), '13')
  t.equal(getAbi('0.11.7'), '0x000C')
  t.equal(getAbi('0.11.0'), '0x000C')
  t.equal(getAbi('0.10.48'), '11')
  t.equal(getAbi('0.10.30'), '11')
  t.equal(getAbi('0.10.4'), '11')
  t.equal(getAbi('0.10.3'), '0x000B')
  t.equal(getAbi('0.10.1'), '0x000B')
  t.equal(getAbi('0.10.0'), '0x000B')
  t.equal(getAbi('0.9.12'), '0x000B')
  t.equal(getAbi('0.9.9'), '0x000B')
  t.equal(getAbi('0.9.8'), '0x000A')
  t.equal(getAbi('0.9.1'), '0x000A')
  t.equal(getAbi('0.9.0'), '1')
  t.equal(getAbi('0.8.0'), '1')
  t.equal(getAbi('0.2.0'), '1')
  t.end()
})

test('getAbi calculates correct Electron ABI', function (t) {
  t.throws(function () { getAbi(undefined, 'electron') })
  t.throws(function () { getAbi(getNextTarget('electron'), 'electron') })
  t.equal(getAbi('5.0.0', 'electron'), '70')
  t.equal(getAbi('4.1.4', 'electron'), '69')
  t.equal(getAbi('4.0.4', 'electron'), '69')
  t.equal(getAbi('4.0.3', 'electron'), '64')
  t.equal(getAbi('3.1.8', 'electron'), '64')
  t.equal(getAbi('2.0.18', 'electron'), '57')
  t.equal(getAbi('1.4.0', 'electron'), '50')
  t.equal(getAbi('1.3.0', 'electron'), '49')
  t.equal(getAbi('1.2.0', 'electron'), '48')
  t.equal(getAbi('1.1.0', 'electron'), '48')
  t.equal(getAbi('1.0.0', 'electron'), '47')
  t.equal(getAbi('0.37.0', 'electron'), '47')
  t.equal(getAbi('0.36.0', 'electron'), '47')
  t.equal(getAbi('0.35.0', 'electron'), '46')
  t.equal(getAbi('0.34.0', 'electron'), '46')
  t.equal(getAbi('0.33.0', 'electron'), '46')
  t.equal(getAbi('0.32.0', 'electron'), '45')
  t.equal(getAbi('0.31.0', 'electron'), '45')
  t.equal(getAbi('0.30.0', 'electron'), '44')
  t.end()
})

test('getAbi calculates correct Node-Webkit ABI', function (t) {
  t.throws(function () { getAbi(undefined, 'node-webkit') })
  t.throws(function () { getAbi(getNextTarget('node-webkit'), 'node-webkit') })
  t.equal(getAbi('0.13.0', 'node-webkit'), '47')
  t.equal(getAbi('0.14.0', 'node-webkit'), '47')
  t.equal(getAbi('0.15.0', 'node-webkit'), '48')
  t.equal(getAbi('0.16.0', 'node-webkit'), '48')
  t.equal(getAbi('0.17.0', 'node-webkit'), '48')
  t.equal(getAbi('0.18.2', 'node-webkit'), '48')
  t.equal(getAbi('0.18.3', 'node-webkit'), '51')
  t.equal(getAbi('0.19.0', 'node-webkit'), '51')
  t.equal(getAbi('0.20.0', 'node-webkit'), '51')
  t.equal(getAbi('0.21.0', 'node-webkit'), '51')
  t.equal(getAbi('0.22.0', 'node-webkit'), '51')
  t.equal(getAbi('0.23.0', 'node-webkit'), '57')
  t.equal(getAbi('0.24.0', 'node-webkit'), '57')
  t.equal(getAbi('0.25.0', 'node-webkit'), '57')
  t.equal(getAbi('0.26.4', 'node-webkit'), '57')
  t.equal(getAbi('0.26.5', 'node-webkit'), '59')
  t.end()
})

test('getAbi supports leading v', function (t) {
  t.equal(getAbi('v7.2.0'), '51')
  t.end()
})

test('getAbi returns abi if passed as target', function (t) {
  t.equal(getAbi('57'), '57')
  t.end()
})

test('allTargets are sorted', function (t) {
  var electron = allTargets.filter(function (t) { return t.runtime === 'electron' })
  var node = allTargets.filter(function (t) { return t.runtime === 'node' })
  var nodeWebkit = allTargets.filter(function (t) { return t.runtime === 'node-webkit' })
  function sort (t1, t2) {
    return semver.compare(t1.target, t2.target)
  }

  t.deepEqual(electron, electron.slice().sort(sort))
  t.deepEqual(node, node.slice().sort(sort))
  t.deepEqual(nodeWebkit, nodeWebkit.slice().sort(sort))
  t.end()
})


<|start_filename|>node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js<|end_filename|>
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
const util = __importStar(require("../util"));
exports.default = util.createRule({
    name: 'no-array-constructor',
    meta: {
        type: 'suggestion',
        docs: {
            description: 'Disallow generic `Array` constructors',
            category: 'Stylistic Issues',
            recommended: 'error',
            extendsBaseRule: true,
        },
        fixable: 'code',
        messages: {
            useLiteral: 'The array literal notation [] is preferable.',
        },
        schema: [],
    },
    defaultOptions: [],
    create(context) {
        /**
         * Disallow construction of dense arrays using the Array constructor
         * @param node node to evaluate
         */
        function check(node) {
            if (node.arguments.length !== 1 &&
                node.callee.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
                node.callee.name === 'Array' &&
                !node.typeParameters &&
                !util.isOptionalOptionalChain(node)) {
                context.report({
                    node,
                    messageId: 'useLiteral',
                    fix(fixer) {
                        if (node.arguments.length === 0) {
                            return fixer.replaceText(node, '[]');
                        }
                        const fullText = context.getSourceCode().getText(node);
                        const preambleLength = node.callee.range[1] - node.range[0];
                        return fixer.replaceText(node, `[${fullText.slice(preambleLength + 1, -1)}]`);
                    },
                });
            }
        }
        return {
            CallExpression: check,
            OptionalCallExpression: check,
            NewExpression: check,
        };
    },
});
//# sourceMappingURL=no-array-constructor.js.map

<|start_filename|>node_modules/is-valid-path/index.js<|end_filename|>
/*!
 * is-valid-path <https://github.com/jonschlinkert/is-valid-path>
 *
 * Copyright (c) 2015 <NAME>, contributors.
 * Licensed under the MIT license.
 */

'use strict';

var isInvalidPath = require('is-invalid-path');

module.exports = function (str) {
  return isInvalidPath(str) === false;
};


<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-sel-eng.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */

/*
 * This file is part of The Croco Library
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 *
 * Author: <NAME>
 * See COPYRIGHTS file for copyrights information.
 */

#ifndef __CR_SEL_ENG_H__
#define __CR_SEL_ENG_H__

#include "cr-utils.h"
#include "cr-stylesheet.h"
#include "cr-cascade.h"
#include "cr-style.h"
#include "cr-prop-list.h"

#include <libxml/tree.h>

/**
 *@file:
 *The declaration of the  #CRSelEng class.
 *The #CRSelEng is actually the "Selection Engine"
 *class.
 */

G_BEGIN_DECLS

typedef struct _CRSelEng CRSelEng ;
typedef struct _CRSelEngPriv CRSelEngPriv ;

/**
 *The Selection engine class.
 *The main service provided by this class, is
 *the ability to interpret a libcroco implementation
 *of css2 selectors, and given an xml node, say if
 *the selector matches the node or not.
 */
struct _CRSelEng
{
	CRSelEngPriv *priv ;
} ;


typedef gboolean (*CRPseudoClassSelectorHandler) (CRSelEng* a_this,
                                                  CRAdditionalSel *a_add_sel,
                                                  xmlNode *a_node) ;
CRSelEng * cr_sel_eng_new (void) ;

enum CRStatus cr_sel_eng_register_pseudo_class_sel_handler (CRSelEng *a_this,
                                                            guchar *a_pseudo_class_sel_name,
                                                            enum CRPseudoType a_pseudo_class_type,
                                                            CRPseudoClassSelectorHandler a_handler) ;

enum CRStatus cr_sel_eng_unregister_pseudo_class_sel_handler (CRSelEng *a_this,
                                                              guchar *a_pseudo_class_sel_name,
                                                              enum CRPseudoType a_pseudo_class_type) ;

enum CRStatus cr_sel_eng_unregister_all_pseudo_class_sel_handlers (CRSelEng *a_this) ;

enum CRStatus cr_sel_eng_get_pseudo_class_selector_handler (CRSelEng *a_this,
                                                            guchar *a_pseudo_class_sel_name,
                                                            enum CRPseudoType a_pseudo_class_type,
                                                            CRPseudoClassSelectorHandler *a_handler) ;

enum CRStatus cr_sel_eng_matches_node (CRSelEng *a_this, 
                                       CRSimpleSel *a_sel,
                                       xmlNode *a_node, 
                                       gboolean *a_result) ;

enum CRStatus cr_sel_eng_get_matched_rulesets (CRSelEng *a_this,
                                               CRStyleSheet *a_sheet,
                                               xmlNode *a_node,
                                               CRStatement ***a_rulesets,
                                               gulong *a_len) ;

enum CRStatus
cr_sel_eng_get_matched_properties_from_cascade  (CRSelEng *a_this,
                                                 CRCascade *a_cascade,
                                                 xmlNode *a_node,
                                                 CRPropList **a_props) ;

enum CRStatus cr_sel_eng_get_matched_style (CRSelEng *a_this,
                                            CRCascade *a_cascade,
                                            xmlNode *a_node,
                                            CRStyle *a_parent_style,
                                            CRStyle **a_style,
                                            gboolean a_set_props_to_initial_values) ;

void cr_sel_eng_destroy (CRSelEng *a_this) ;

G_END_DECLS


#endif/*__CR_SEL_ENG_H__*/


<|start_filename|>node_modules/opentracing/lib/test/unittest.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Ensure the stack trace lines numbers are correct on errors
require('source-map-support').install();
var api_compatibility_1 = require("./api_compatibility");
var mocktracer_implemenation_1 = require("./mocktracer_implemenation");
var noop_implementation_1 = require("./noop_implementation");
var opentracing_api_1 = require("./opentracing_api");
var index_js_1 = require("../index.js");
mocktracer_implemenation_1.default();
api_compatibility_1.default(function () { return new index_js_1.MockTracer(); }, { skipInjectExtractChecks: true, skipBaggageChecks: true });
// Run the tests on the default OpenTracing no-op Tracer.
noop_implementation_1.default();
// Run the api conformance tests on the default Opentracing no-op Tracer.
api_compatibility_1.default(function () { return new index_js_1.Tracer(); }, { skipBaggageChecks: true });
// Basic unittests for opentracing
opentracing_api_1.default();
//# sourceMappingURL=unittest.js.map

<|start_filename|>node_modules/sharp/vendor/include/orc/orcopcode.h<|end_filename|>

#ifndef _ORC_OPCODE_H_
#define _ORC_OPCODE_H_

#include <orc/orcutils.h>
#include <orc/orclimits.h>

ORC_BEGIN_DECLS

typedef struct _OrcOpcodeSet OrcOpcodeSet;
typedef struct _OrcStaticOpcode OrcStaticOpcode;


/**
 * OrcOpcodeSet:
 *
 * The OrcOpcodeSet structure has no public members
 */
struct _OrcOpcodeSet {
  /*< private >*/
  int opcode_major;
  char prefix[8];

  int n_opcodes;
  OrcStaticOpcode *opcodes;
};

#define ORC_STATIC_OPCODE_ACCUMULATOR (1<<0)
#define ORC_STATIC_OPCODE_FLOAT_SRC (1<<1)
#define ORC_STATIC_OPCODE_FLOAT_DEST (1<<2)
#define ORC_STATIC_OPCODE_FLOAT (ORC_STATIC_OPCODE_FLOAT_SRC|ORC_STATIC_OPCODE_FLOAT_DEST)
#define ORC_STATIC_OPCODE_SCALAR (1<<3)
#define ORC_STATIC_OPCODE_LOAD (1<<4)
#define ORC_STATIC_OPCODE_STORE (1<<5)
#define ORC_STATIC_OPCODE_INVARIANT (1<<6)
#define ORC_STATIC_OPCODE_ITERATOR (1<<7)
#define ORC_STATIC_OPCODE_COPY (1<<8)


struct _OrcStaticOpcode {
  char name[16];
  unsigned int flags;
  int dest_size[ORC_STATIC_OPCODE_N_DEST];
  int src_size[ORC_STATIC_OPCODE_N_SRC];
  OrcOpcodeEmulateNFunc emulateN;
};

OrcStaticOpcode * orc_opcode_find_by_name (const char *name);
void orc_opcode_init (void);
OrcOpcodeSet *orc_opcode_set_get (const char *name);
OrcOpcodeSet *orc_opcode_set_get_nth (int opcode_major);
int orc_opcode_set_find_by_name (OrcOpcodeSet *opcode_set, const char *name);
int orc_opcode_register_static (OrcStaticOpcode *sopcode, char *prefix);

ORC_END_DECLS

#endif



<|start_filename|>node_modules/opentracing/lib/global_tracer.js<|end_filename|>
"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var tracer_1 = require("./tracer");
var noopTracer = new tracer_1.default();
var _globalTracer = null;
// Allows direct importing/requiring of the global tracer:
//
// let globalTracer = require('opentracing/global');
//      OR
// import globalTracer from 'opentracing/global';
//
// Acts a bridge to the global tracer that can be safely called before the
// global tracer is initialized. The purpose of the delegation is to avoid the
// sometimes nearly intractible initialization order problems that can arise in
// applications with a complex set of dependencies, while also avoiding the
// case where
var GlobalTracerDelegate = /** @class */ (function (_super) {
    __extends(GlobalTracerDelegate, _super);
    function GlobalTracerDelegate() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    GlobalTracerDelegate.prototype.startSpan = function () {
        var tracer = _globalTracer || noopTracer;
        return tracer.startSpan.apply(tracer, arguments);
    };
    GlobalTracerDelegate.prototype.inject = function () {
        var tracer = _globalTracer || noopTracer;
        return tracer.inject.apply(tracer, arguments);
    };
    GlobalTracerDelegate.prototype.extract = function () {
        var tracer = _globalTracer || noopTracer;
        return tracer.extract.apply(tracer, arguments);
    };
    return GlobalTracerDelegate;
}(tracer_1.default));
var globalTracerDelegate = new GlobalTracerDelegate();
/**
 * Set the global Tracer.
 *
 * The behavior is undefined if this function is called more than once.
 *
 * @param {Tracer} tracer - the Tracer implementation
 */
function initGlobalTracer(tracer) {
    _globalTracer = tracer;
}
exports.initGlobalTracer = initGlobalTracer;
/**
 * Returns the global tracer.
 */
function globalTracer() {
    // Return the delegate.  Since the global tracer is largely a convenience
    // (the user can always create their own tracers), the delegate is used to
    // give the added convenience of not needing to worry about initialization
    // order.
    return globalTracerDelegate;
}
exports.globalTracer = globalTracer;
//# sourceMappingURL=global_tracer.js.map

<|start_filename|>node_modules/gatsby/dist/internal-plugins/prod-404/index.js<|end_filename|>
// noop
"use strict";
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-input.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset:8 -*- */

/*
 * This file is part of The Croco Library
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 * 
 * Author: <NAME>
 * See the COPYRIGHTS file for copyrights information.
 */

#ifndef __CR_INPUT_SRC_H__
#define __CR_INPUT_SRC_H__


#include <glib.h>
#include "cr-utils.h"
#include "cr-parsing-location.h"

G_BEGIN_DECLS

/**
 *@file
 *The libcroco basic input stream class
 *declaration file.
 */

typedef struct _CRInput CRInput ;
typedef struct _CRInputPriv CRInputPriv ;

/**
 *The #CRInput class provides the abstraction of 
 *an utf8-encoded character stream.
 */
struct _CRInput 
{
        CRInputPriv *priv ;
} ;

typedef struct _CRInputPos CRInputPos ;

struct _CRInputPos
{
        glong line ;
        glong col ;
        gboolean end_of_file ;
        gboolean end_of_line ;
        glong next_byte_index ;
} ;

CRInput *
cr_input_new_from_buf (guchar *a_buf, gulong a_len,
                       enum CREncoding a_enc, gboolean a_free_buf) ;
CRInput *
cr_input_new_from_uri (const gchar *a_file_uri, 
                       enum CREncoding a_enc) ;

void
cr_input_destroy (CRInput *a_this) ;

void 
cr_input_ref (CRInput *a_this) ;

gboolean
cr_input_unref (CRInput *a_this) ;

enum CRStatus
cr_input_read_byte (CRInput *a_this, guchar *a_byte) ;

enum CRStatus
cr_input_read_char (CRInput *a_this, guint32 *a_char) ;

enum CRStatus
cr_input_consume_chars (CRInput *a_this, guint32 a_char, 
                        gulong *a_nb_char) ;

enum CRStatus
cr_input_consume_char (CRInput *a_this, guint32 a_char) ;

enum CRStatus
cr_input_consume_white_spaces (CRInput *a_this, gulong *a_nb_chars) ;

enum CRStatus
cr_input_peek_byte (CRInput const *a_this, enum CRSeekPos a_origin,
                    gulong a_offset, guchar *a_byte) ;

guchar 
cr_input_peek_byte2 (CRInput const *a_this, gulong a_offset,
                     gboolean *a_eof) ;

enum CRStatus
cr_input_peek_char (CRInput const *a_this, guint32 *a_char) ;

guchar *
cr_input_get_byte_addr (CRInput *a_this, 
                        gulong a_offset) ;

enum CRStatus
cr_input_get_cur_byte_addr (CRInput *a_this, guchar ** a_offset) ;

enum CRStatus
cr_input_seek_index (CRInput *a_this, 
                     enum CRSeekPos a_origin, gint a_pos) ;

enum CRStatus
cr_input_get_cur_index (CRInput const *a_this, glong *a_index) ;

enum CRStatus
cr_input_set_cur_index (CRInput *a_this, glong a_index) ;

enum CRStatus
cr_input_get_cur_pos (CRInput const *a_this, CRInputPos * a_pos) ;

enum CRStatus
cr_input_set_cur_pos (CRInput *a_this, CRInputPos const *a_pos) ;

enum CRStatus
cr_input_get_parsing_location (CRInput const *a_this,
                               CRParsingLocation *a_loc) ;

enum CRStatus
cr_input_get_end_of_line (CRInput const *a_this, gboolean *a_eol) ;

enum CRStatus
cr_input_set_end_of_line (CRInput *a_this, gboolean a_eol) ;

enum CRStatus
cr_input_get_end_of_file (CRInput const *a_this, gboolean *a_eof) ;

enum CRStatus
cr_input_set_end_of_file (CRInput *a_this, gboolean a_eof) ;

enum CRStatus
cr_input_set_line_num (CRInput *a_this, glong a_line_num) ;

enum CRStatus
cr_input_get_line_num (CRInput const *a_this, glong *a_line_num) ;

enum CRStatus
cr_input_set_column_num (CRInput *a_this, glong a_col) ;

enum CRStatus
cr_input_get_column_num (CRInput const *a_this, glong *a_col) ;

enum CRStatus
cr_input_increment_line_num (CRInput *a_this, 
                             glong a_increment) ;

enum CRStatus
cr_input_increment_col_num (CRInput *a_this,
                            glong a_increment) ;
        
glong
cr_input_get_nb_bytes_left (CRInput const *a_this) ;

enum CRStatus
cr_input_end_of_input (CRInput const *a_this, gboolean *a_end_of_input) ;

G_END_DECLS

#endif /*__CR_INPUT_SRC_H__*/



<|start_filename|>node_modules/sharp/vendor/include/gdk-pixbuf/gdk-pixbuf-loader.h<|end_filename|>
/* GdkPixbuf library - Progressive loader object
 *
 * Copyright (C) 1999 The Free Software Foundation
 *
 * Authors: <NAME> <<EMAIL>>
 *          <NAME> <<EMAIL>>
 *          <NAME> <<EMAIL>>
 *          <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */

#ifndef GDK_PIXBUF_LOADER_H
#define GDK_PIXBUF_LOADER_H

#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
#endif

#include <glib.h>
#include <glib-object.h>
#include <gdk-pixbuf/gdk-pixbuf-core.h>
#include <gdk-pixbuf/gdk-pixbuf-animation.h>
#include <gdk-pixbuf/gdk-pixbuf-io.h>

G_BEGIN_DECLS

#define GDK_TYPE_PIXBUF_LOADER		   (gdk_pixbuf_loader_get_type ())
#define GDK_PIXBUF_LOADER(obj)		   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader))
#define GDK_PIXBUF_LOADER_CLASS(klass)	   (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass))
#define GDK_IS_PIXBUF_LOADER(obj)	   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER))
#define GDK_IS_PIXBUF_LOADER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER))
#define GDK_PIXBUF_LOADER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass))

/**
 * GdkPixbufLoader:
 * 
 * The GdkPixbufLoader struct contains only private
 * fields. 
 */
typedef struct _GdkPixbufLoader GdkPixbufLoader;
struct _GdkPixbufLoader
{
  GObject parent_instance;
  
  /*< private >*/
  gpointer priv;
};

typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass;
struct _GdkPixbufLoaderClass
{
  GObjectClass parent_class;

  void (*size_prepared)      (GdkPixbufLoader *loader, 
			      int              width,
			      int              height);

  void (*area_prepared)      (GdkPixbufLoader *loader);

  /* Last known frame needs a redraw for x, y, width, height */
  void (*area_updated)       (GdkPixbufLoader *loader,
                              int              x,
                              int              y,
			      int              width,
			      int              height);

  void (*closed)             (GdkPixbufLoader *loader);
};

GDK_PIXBUF_AVAILABLE_IN_ALL
GType                gdk_pixbuf_loader_get_type      (void) G_GNUC_CONST;
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufLoader *    gdk_pixbuf_loader_new           (void);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufLoader *    gdk_pixbuf_loader_new_with_type (const char *image_type,
                                                      GError    **error);
GDK_PIXBUF_AVAILABLE_IN_2_4
GdkPixbufLoader *    gdk_pixbuf_loader_new_with_mime_type (const char *mime_type,
							   GError    **error);
GDK_PIXBUF_AVAILABLE_IN_2_2
void                 gdk_pixbuf_loader_set_size (GdkPixbufLoader  *loader,
                                                 int               width,
						 int               height);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean             gdk_pixbuf_loader_write         (GdkPixbufLoader *loader,
						      const guchar    *buf,
						      gsize            count,
                                                      GError         **error);
GDK_PIXBUF_AVAILABLE_IN_2_30
gboolean             gdk_pixbuf_loader_write_bytes   (GdkPixbufLoader *loader,
                                                      GBytes          *buffer,
                                                      GError         **error);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *          gdk_pixbuf_loader_get_pixbuf    (GdkPixbufLoader *loader);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufAnimation * gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean             gdk_pixbuf_loader_close         (GdkPixbufLoader *loader,
                                                      GError         **error);
GDK_PIXBUF_AVAILABLE_IN_2_2
GdkPixbufFormat     *gdk_pixbuf_loader_get_format    (GdkPixbufLoader *loader);

G_END_DECLS

#endif




<|start_filename|>node_modules/eslint-plugin-graphql/lib/createRule.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.createRule = createRule;

var _graphql = require("graphql");

var _constants = require("./constants");

function strWithLen(len) {
  // from http://stackoverflow.com/questions/14343844/create-a-string-of-variable-length-filled-with-a-repeated-character
  return new Array(len + 1).join("x");
}

function replaceExpressions(node, context, env) {
  var chunks = [];

  node.quasis.forEach(function (element, i) {
    var chunk = element.value.cooked;
    var value = node.expressions[i];

    chunks.push(chunk);

    if (!env || env === "apollo") {
      // In Apollo, interpolation is only valid outside top-level structures like `query` or `mutation`.
      // We'll check to make sure there's an equivalent set of opening and closing brackets, otherwise
      // we're attempting to do an invalid interpolation.
      if (chunk.split("{").length - 1 !== chunk.split("}").length - 1) {
        context.report({
          node: value,
          message: "Invalid interpolation - fragment interpolation must occur outside of the brackets."
        });
        throw new Error("Invalid interpolation");
      }
    }

    if (!element.tail) {
      // Preserve location of errors by replacing with exactly the same length
      var nameLength = value.end - value.start;

      if (env === "relay" && /:\s*$/.test(chunk)) {
        // The chunk before this one had a colon at the end, so this
        // is a variable

        // Add 2 for brackets in the interpolation
        var placeholder = strWithLen(nameLength + 2);
        chunks.push("$" + placeholder);
      } else if (env === "lokka" && /\.\.\.\s*$/.test(chunk)) {
        // This is Lokka-style fragment interpolation where you actually type the '...' yourself
        var _placeholder = strWithLen(nameLength + 3);
        chunks.push(_placeholder);
      } else if (env === "relay") {
        // This is Relay-style fragment interpolation where you don't type '...'
        // Ellipsis cancels out extra characters
        var _placeholder2 = strWithLen(nameLength);
        chunks.push("..." + _placeholder2);
      } else if (!env || env === "apollo") {
        // In Apollo, fragment interpolation is only valid outside of brackets
        // Since we don't know what we'd interpolate here (that occurs at runtime),
        // we're not going to do anything with this interpolation.
      } else if (env === "fraql") {
        if (chunk.lastIndexOf("{") > chunk.lastIndexOf("}")) {
          chunks.push("__typename");
        }
      } else {
        // Invalid interpolation
        context.report({
          node: value,
          message: "Invalid interpolation - not a valid fragment or variable."
        });
        throw new Error("Invalid interpolation");
      }
    }
  });

  return chunks.join("");
}

function locFrom(node, error) {
  if (!error.locations || !error.locations.length) {
    return;
  }
  var location = error.locations[0];

  var line = void 0;
  var column = void 0;
  if (location.line === 1 && node.tag.name !== _constants.internalTag) {
    line = node.loc.start.line;
    column = node.tag.loc.end.column + location.column;
  } else {
    line = node.loc.start.line + location.line - 1;
    column = location.column - 1;
  }

  return {
    line: line,
    column: column
  };
}

function handleTemplateTag(node, context, schema, env, validators) {
  var text = void 0;
  try {
    text = replaceExpressions(node.quasi, context, env);
  } catch (e) {
    if (e.message !== "Invalid interpolation") {
      console.log(e); // eslint-disable-line no-console
    }
    return;
  }

  // Re-implement syntax sugar for fragment names, which is technically not valid
  // graphql
  if ((env === "lokka" || env === "relay" || env === "fraql") && /fragment\s+on/.test(text)) {
    text = text.replace("fragment", "fragment _");
  }

  var ast = void 0;

  try {
    ast = (0, _graphql.parse)(text);
  } catch (error) {
    context.report({
      node: node,
      message: error.message.split("\n")[0],
      loc: locFrom(node, error)
    });
    return;
  }

  var validationErrors = schema ? (0, _graphql.validate)(schema, ast, validators) : [];
  if (validationErrors && validationErrors.length > 0) {
    context.report({
      node: node,
      message: validationErrors[0].message,
      loc: locFrom(node, validationErrors[0])
    });
    return;
  }
}

function templateExpressionMatchesTag(tagName, node) {
  var tagNameSegments = tagName.split(".").length;
  if (tagNameSegments === 1) {
    // Check for single identifier, like 'gql'
    if (node.tag.type !== "Identifier" || node.tag.name !== tagName) {
      return false;
    }
  } else if (tagNameSegments === 2) {
    // Check for dotted identifier, like 'Relay.QL'
    if (node.tag.type !== "MemberExpression" || node.tag.object.name + "." + node.tag.property.name !== tagName) {
      return false;
    }
  } else {
    // We don't currently support 3 segments so ignore
    return false;
  }
  return true;
}

function createRule(context, optionParser) {
  var tagNames = new Set();
  var tagRules = [];
  var options = context.options.length === 0 ? [{}] : context.options;
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;

  try {
    var _loop = function _loop() {
      var optionGroup = _step.value;

      var _optionParser = optionParser(optionGroup),
          schema = _optionParser.schema,
          env = _optionParser.env,
          tagName = _optionParser.tagName,
          validators = _optionParser.validators;

      var boundValidators = validators.map(function (v) {
        return function (ctx) {
          return v(ctx, optionGroup);
        };
      });
      if (tagNames.has(tagName)) {
        throw new Error("Multiple options for GraphQL tag " + tagName);
      }
      tagNames.add(tagName);
      tagRules.push({ schema: schema, env: env, tagName: tagName, validators: boundValidators });
    };

    for (var _iterator = options[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      _loop();
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }

  return {
    TaggedTemplateExpression: function TaggedTemplateExpression(node) {
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;

      try {
        for (var _iterator2 = tagRules[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var _ref2 = _step2.value;
          var schema = _ref2.schema,
              env = _ref2.env,
              tagName = _ref2.tagName,
              validators = _ref2.validators;

          if (templateExpressionMatchesTag(tagName, node)) {
            return handleTemplateTag(node, context, schema, env, validators);
          }
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
  };
}

<|start_filename|>node_modules/lru-cache/test/no-symbol.js<|end_filename|>
// hacky way to test that it still works when Symbol is not there
global.Symbol = false
require('./basic.js')


<|start_filename|>node_modules/console-stream/index.js<|end_filename|>
var Stream = require("stream")
var console = require("console")

var NEW_LINE = "\n"

module.exports = ConsoleStream

function ConsoleStream() {
    var stream = new Stream()
    stream.writable = true
    var buffered = ""

    stream.write = write
    stream.destroy = destroy
    stream.end = end

    return stream

    function write(buffer) {
        var s = buffered + String(buffer)
        var lines = s.split(NEW_LINE)
        for (var i = 0; i < lines.length - 1; i++) {
            console.log(lines[i])
        }

        buffered = lines[i]
    }

    function destroy() {
        stream.writable = false
        stream.emit("close")
    }

    function end(buffer) {
        if (arguments.length === 1) {
            stream.write(buffer)
        }

        if (buffered) {
            console.log(buffered)
        }

        stream.destroy()
    }
}


<|start_filename|>node_modules/sharp/vendor/include/fribidi-types.h<|end_filename|>
/* FriBidi
 * fribidi-types.h - define data types for the rest of the library
 *
 * Author:
 *   <NAME>, 2001, 2002, 2004
 *
 * Copyright (C) 2004 <NAME>, Inc.
 * Copyright (C) 2001,2002 <NAME>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library, in a file named COPYING; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA
 *
 * For licensing issues, contact <<EMAIL>>.
 */
#ifndef _FRIBIDI_TYPES_H
#define _FRIBIDI_TYPES_H

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include "fribidi-common.h"

#include "fribidi-begindecls.h"


# if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \
     defined (_sgi) || defined (__sun) || defined (sun) || \
     defined (__digital__) || defined (__HP_cc)
#  include <inttypes.h>
# elif defined (_AIX)
#  include <sys/inttypes.h>
# else
#  include <stdint.h>
# endif

typedef int fribidi_boolean;

typedef uint32_t FriBidiChar;
typedef int FriBidiStrIndex;

/* The MSB is used to indicate an opening bracket */
typedef FriBidiChar FriBidiBracketType;

/* Use FRIBIDI_NO_BRACKET for assigning to a non-bracket */
#define FRIBIDI_NO_BRACKET 0

/* A few macros for working with bits */

#define FRIBIDI_TEST_BITS(x, mask) (((x) & (mask)) ? 1 : 0)

#define FRIBIDI_INCLUDE_BITS(x, mask) ((x) | (mask))

#define FRIBIDI_EXCLUDE_BITS(x, mask) ((x) & ~(mask))

#define FRIBIDI_SET_BITS(x, mask)	((x) |= (mask))

#define FRIBIDI_UNSET_BITS(x, mask)	((x) &= ~(mask))

#define FRIBIDI_ADJUST_BITS(x, mask, cond)	\
	((x) = ((x) & ~(mask)) | ((cond) ? (mask) : 0))

#define FRIBIDI_ADJUST_AND_TEST_BITS(x, mask, cond)	\
	FRIBIDI_TEST_BITS(FRIBIDI_ADJUST_BITS((x), (mask), (cond)), (mask))

#include "fribidi-enddecls.h"

#endif /* !_FRIBIDI_TYPES_H */
/* Editor directions:
 * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
 */


<|start_filename|>node_modules/webpack-stats-plugin/index.js<|end_filename|>
"use strict";

const StatsWriterPlugin = require("./lib/stats-writer-plugin");

module.exports = {
  StatsWriterPlugin
};


<|start_filename|>node_modules/graphql/jsutils/isInvalid.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isInvalid;

/**
 * Returns true if a value is undefined, or NaN.
 */
function isInvalid(value) {
  return value === undefined || value !== value;
}


<|start_filename|>node_modules/opentracing/lib/test/mocktracer_implemenation.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var index_1 = require("../index");
function mockTracerimplementationTests() {
    describe('Mock Tracer API tests', function () {
        describe('Tracer#report', function () {
            it('should not throw exceptions when running report', function () {
                var tracer = new index_1.MockTracer();
                var span = tracer.startSpan('test_operation');
                span.addTags({ key: 'value' });
                span.finish();
                chai_1.expect(function () {
                    var report = tracer.report();
                    for (var _i = 0, _a = report.spans; _i < _a.length; _i++) {
                        var span_1 = _a[_i];
                        span_1.tags();
                    }
                }).to.not.throw(Error);
            });
        });
    });
}
exports.default = mockTracerimplementationTests;
//# sourceMappingURL=mocktracer_implemenation.js.map

<|start_filename|>node_modules/name-all-modules-plugin/index.js<|end_filename|>
function NameAllModulesPlugin() {
}

NameAllModulesPlugin.prototype.apply = function (compiler) {
    compiler.plugin("compilation", (compilation) => {
      compilation.plugin("before-module-ids", (modules) => {
        modules.forEach((module) => {
          if (module.id !== null) {
            return;
          }
          module.id = module.identifier();
        });
      });
    });
};

module.exports = NameAllModulesPlugin;


<|start_filename|>node_modules/eol/style.css<|end_filename|>
.scheme--white { background: whitesmoke; color: black }
.scheme--dark { background: blue; color: whitesmoke }
.scheme--light { background: gainsboro; color: blue }
:focus { outline-color: blue }

*, :before, :after { box-sizing: border-box }
html { font: 1em/2 sans-serif; }
body { width: 100%; margin: auto; padding: 1em }
a { text-decoration: none }
a:hover { text-decoration: underline }
textarea, select { font: inherit }
textarea { max-width: 100%; margin: 0 }
header, section { display: block }
fieldset { padding: 0; border: 0 }
label { margin: 0; padding: 0 }
h1, h2 { line-height: 1 }

.border-radius {
  border-radius: .25em;
}

.inherit-size {
  font-size: inherit;
}

.button {
  font-size: inherit;
  font-style: inherit;
  font-weight: bold;
  min-height: 2.5em;
  display: inline-block;
  border: 0;
  border-radius: .25em;
  padding: .33333em .66666em;
  margin: 0;
}

.button:focus {
  text-decoration: underline;
}

.button:enabled:hover {
  cursor: pointer;
  text-decoration: underline;
}

.m-b-1 {
  margin-bottom: .5em;
}

.m-b-2 {
  margin-bottom: 1em;
}

.m-b-3 {
  margin-bottom: 2em;
}

.inline-block {
  display: inline-block;
}

.block {
  display: block;
}

.area {
  white-space: pre-wrap;
  border: 2px solid gainsboro;
  padding: .25em;
  display: block;
  overflow: auto;
  resize: vertical;
  width: 100%;
  height: 7.5em;
  line-height: 1.1;
}

.text--uppercase {
  text-transform: uppercase;
}

<|start_filename|>node_modules/@typescript-eslint/experimental-utils/dist/index.js<|end_filename|>
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const ESLintUtils = __importStar(require("./eslint-utils"));
exports.ESLintUtils = ESLintUtils;
const TSESLint = __importStar(require("./ts-eslint"));
exports.TSESLint = TSESLint;
const TSESLintScope = __importStar(require("./ts-eslint-scope"));
exports.TSESLintScope = TSESLintScope;
const JSONSchema = __importStar(require("./json-schema"));
exports.JSONSchema = JSONSchema;
// for convenience's sake - export the types directly from here so consumers
// don't need to reference/install both packages in their code
// NOTE - this uses hard links inside ts-estree to avoid initialization of entire package
//        via its main file (which imports typescript at runtime).
//        Not every eslint-plugin written in typescript requires typescript at runtime.
var ts_estree_1 = require("@typescript-eslint/typescript-estree/dist/ts-estree");
exports.AST_NODE_TYPES = ts_estree_1.AST_NODE_TYPES;
exports.AST_TOKEN_TYPES = ts_estree_1.AST_TOKEN_TYPES;
exports.TSESTree = ts_estree_1.TSESTree;
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/sharp/vendor/include/libexif/exif-content.h<|end_filename|>
/*! \file exif-content.h
 *  \brief Handling EXIF IFDs
 */
/*
 * Copyright (c) 2001 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA.
 */

#ifndef __EXIF_CONTENT_H__
#define __EXIF_CONTENT_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/*! Holds all EXIF tags in a single IFD */
typedef struct _ExifContent        ExifContent;
typedef struct _ExifContentPrivate ExifContentPrivate;

#include <libexif/exif-tag.h>
#include <libexif/exif-entry.h>
#include <libexif/exif-data.h>
#include <libexif/exif-log.h>
#include <libexif/exif-mem.h>

struct _ExifContent
{
        ExifEntry **entries;
        unsigned int count;

	/*! Data containing this content */
	ExifData *parent;

	ExifContentPrivate *priv;
};

/* Lifecycle */
ExifContent *exif_content_new     (void);
ExifContent *exif_content_new_mem (ExifMem *);
void         exif_content_ref     (ExifContent *content);
void         exif_content_unref   (ExifContent *content);
void         exif_content_free    (ExifContent *content);

/*! Add an EXIF tag to an IFD.
 * If this tag already exists in the IFD, this function does nothing.
 * \pre The "tag" member of the entry must be set on entry.
 *
 * \param[out] c IFD
 * \param[in] entry EXIF entry to add
 */
void         exif_content_add_entry    (ExifContent *c, ExifEntry *entry);

/*! Remove an EXIF tag from an IFD.
 * If this tag does not exist in the IFD, this function does nothing.
 *
 * \param[out] c IFD
 * \param[in] e EXIF entry to remove
 */
void         exif_content_remove_entry (ExifContent *c, ExifEntry *e);

/*! Return the #ExifEntry in this IFD corresponding to the given tag.
 * This is a pointer into a member of the #ExifContent array and must NOT be
 * freed or unrefed by the caller.
 *
 * \param[in] content EXIF content for an IFD
 * \param[in] tag EXIF tag to return
 * \return #ExifEntry of the tag, or NULL on error
 */
ExifEntry   *exif_content_get_entry    (ExifContent *content, ExifTag tag);

/*! Fix the IFD to bring it into specification. Call #exif_entry_fix on
 * each entry in this IFD to fix existing entries, create any new entries
 * that are mandatory in this IFD but do not yet exist, and remove any
 * entries that are not allowed in this IFD.
 *
 * \param[in,out] c EXIF content for an IFD
 */
void         exif_content_fix          (ExifContent *c);

typedef void (* ExifContentForeachEntryFunc) (ExifEntry *, void *user_data);

/*! Executes function on each EXIF tag in this IFD in turn.
 * The tags will not necessarily be visited in numerical order.
 *
 * \param[in,out] content IFD over which to iterate
 * \param[in] func function to call for each entry
 * \param[in] user_data data to pass into func on each call
 */
void         exif_content_foreach_entry (ExifContent *content,
					 ExifContentForeachEntryFunc func,
					 void *user_data);

/*! Return the IFD number in which the given #ExifContent is found.
 *
 * \param[in] c an #ExifContent*
 * \return IFD number, or #EXIF_IFD_COUNT on error
 */
ExifIfd exif_content_get_ifd (ExifContent *c);

/*! Return a textual representation of the EXIF data for a tag.
 *
 * \param[in] c #ExifContent* for an IFD
 * \param[in] t #ExifTag to return
 * \param[out] v char* buffer in which to store value
 * \param[in] m unsigned int length of the buffer v
 * \return the v pointer, or NULL on error
 */
#define exif_content_get_value(c,t,v,m)					\
	(exif_content_get_entry (c,t) ?					\
	 exif_entry_get_value (exif_content_get_entry (c,t),v,m) : NULL)

/*! Dump contents of the IFD to stdout.
 * This is intended for diagnostic purposes only.
 *
 * \param[in] content IFD data
 * \param[in] indent how many levels deep to indent the data
 */
void exif_content_dump  (ExifContent *content, unsigned int indent);

/*! Set the log message object for this IFD.
 *
 * \param[in] content IFD
 * \param[in] log #ExifLog*
 */
void exif_content_log   (ExifContent *content, ExifLog *log);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __EXIF_CONTENT_H__ */


<|start_filename|>node_modules/@jimp/core/dist/request.js<|end_filename|>
"use strict";

require("core-js/modules/es6.array.for-each");

require("core-js/modules/es6.array.filter");

require("core-js/modules/web.dom.iterable");

require("core-js/modules/es6.array.iterator");

require("core-js/modules/es6.object.keys");

require("core-js/modules/es6.object.define-property");

require("core-js/modules/es6.object.assign");

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

/* global XMLHttpRequest */
if (process.browser || process.env.ENVIRONMENT === 'BROWSER' || typeof process.versions.electron !== 'undefined' && process.type === 'renderer' && typeof XMLHttpRequest === 'function') {
  // If we run into a browser or the electron renderer process,
  // use XHR method instead of Request node module.
  module.exports = function (options, cb) {
    var xhr = new XMLHttpRequest();
    xhr.open('GET', options.url, true);
    xhr.responseType = 'arraybuffer';
    xhr.addEventListener('load', function () {
      if (xhr.status < 400) {
        try {
          var data = Buffer.from(this.response);
          cb(null, xhr, data);
        } catch (error) {
          return cb(new Error('Response is not a buffer for url ' + options.url + '. Error: ' + error.message));
        }
      } else {
        cb(new Error('HTTP Status ' + xhr.status + ' for url ' + options.url));
      }
    });
    xhr.addEventListener('error', function (e) {
      cb(e);
    });
    xhr.send();
  };
} else {
  module.exports = function (_ref, cb) {
    var options = Object.assign({}, _ref);

    var p = require('phin');

    p(_objectSpread({
      compression: true
    }, options), function (err, res) {
      if (err === null) {
        cb(null, res, res.body);
      } else {
        cb(err);
      }
    });
  };
}
//# sourceMappingURL=request.js.map

<|start_filename|>node_modules/sharp/vendor/include/libexif/exif-entry.h<|end_filename|>
/*! \file exif-entry.h
 *  \brief Handling EXIF entries
 */
/*
 * Copyright (c) 2001 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA.
 */

#ifndef __EXIF_ENTRY_H__
#define __EXIF_ENTRY_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/*! Data found in one EXIF tag.
 * The #exif_entry_get_value function can provide access to the
 * formatted contents, or the struct members can be used directly to
 * access the raw contents.
 */
typedef struct _ExifEntry        ExifEntry;
typedef struct _ExifEntryPrivate ExifEntryPrivate;

#include <libexif/exif-content.h>
#include <libexif/exif-format.h>
#include <libexif/exif-mem.h>

/*! Data found in one EXIF tag */
struct _ExifEntry {
	/*! EXIF tag for this entry */
        ExifTag tag;
	
	/*! Type of data in this entry */
        ExifFormat format;

	/*! Number of elements in the array, if this is an array entry.
	 * Contains 1 for non-array data types. */
        unsigned long components;

	/*! Pointer to the raw EXIF data for this entry. It is allocated
	 * by #exif_entry_initialize and is NULL beforehand. Data contained
	 * here may be manipulated using the functions in exif-utils.h */
        unsigned char *data;

	/*! Number of bytes in the buffer at \c data. This must be no less
	 * than exif_format_get_size(format)*components */
        unsigned int size;

	/*! #ExifContent containing this entry. 
	 * \see exif_entry_get_ifd */
	ExifContent *parent;

	/*! Internal data to be used by libexif itself */
	ExifEntryPrivate *priv;
};

/* Lifecycle */

/*! Reserve memory for and initialize a new #ExifEntry.
 * No memory is allocated for the \c data element of the returned #ExifEntry.
 *
 * \return new allocated #ExifEntry, or NULL on error
 *
 * \see exif_entry_new_mem, exif_entry_unref
 */
ExifEntry  *exif_entry_new     (void);

/*! Reserve memory for and initialize new #ExifEntry using the specified
 * memory allocator.
 * No memory is allocated for the \c data element of the returned #ExifEntry.
 *
 * \return new allocated #ExifEntry, or NULL on error
 *
 * \see exif_entry_new, exif_entry_unref
 */
ExifEntry  *exif_entry_new_mem (ExifMem *);

/*! Increase reference counter for #ExifEntry.
 *
 * \param[in] entry #ExifEntry
 *
 * \see exif_entry_unref
 */
void        exif_entry_ref     (ExifEntry *entry);

/*! Decrease reference counter for #ExifEntry.
 * When the reference count drops to zero, free the entry.
 *
 * \param[in] entry #ExifEntry
 */
void        exif_entry_unref   (ExifEntry *entry);

/*! Actually free the #ExifEntry.
 *
 * \deprecated Should not be called directly. Use #exif_entry_ref and
 *             #exif_entry_unref instead.
 *
 * \param[in] entry EXIF entry
 */
void        exif_entry_free  (ExifEntry *entry);

/*! Initialize an empty #ExifEntry with default data in the correct format
 * for the given tag. If the entry is already initialized, this function
 * does nothing.
 * This call allocates memory for the \c data element of the given #ExifEntry.
 * That memory is freed at the same time as the #ExifEntry.
 *
 * \param[out] e entry to initialize
 * \param[in] tag tag number to initialize as
 */
void        exif_entry_initialize (ExifEntry *e, ExifTag tag);

/*! Fix the type or format of the given EXIF entry to bring it into spec.
 * If the data for this EXIF tag is in of the wrong type or is in an invalid
 * format according to the EXIF specification, then it is converted to make it
 * valid. This may involve, for example, converting an EXIF_FORMAT_LONG into a
 * EXIF_FORMAT_SHORT. If the tag is unknown, its value is untouched.
 *
 * \note Unfortunately, some conversions are to a type with a more restricted
 * range, which could have the side effect that the converted data becomes
 * invalid. This is unlikely as the range of each tag in the standard is
 * designed to encompass all likely data.
 *
 * \param[in,out] entry EXIF entry
 */
void        exif_entry_fix        (ExifEntry *entry);


/* For your convenience */

/*! Return a localized textual representation of the value of the EXIF entry.
 * This is meant for display to the user. The format of each tag is subject
 * to change between locales and in newer versions of libexif.  Users who
 * require the tag data in an unambiguous form should access the data members
 * of the #ExifEntry structure directly.
 *
 * \warning The character set of the returned string may be in
 *          the encoding of the current locale or the native encoding
 *          of the camera.
 * \bug     The EXIF_TAG_XP_* tags are currently always returned in UTF-8,
 *          regardless of locale, and code points above U+FFFF are not
 *          supported.
 *
 * \param[in] entry EXIF entry
 * \param[out] val buffer in which to store value
 * \param[in] maxlen length of the buffer val
 * \return val pointer
 */
const char *exif_entry_get_value (ExifEntry *entry, char *val,
				  unsigned int maxlen);

/*! Dump text representation of #ExifEntry to stdout.
 * This is intended for diagnostic purposes only.
 *
 * \param[in] entry EXIF tag data
 * \param[in] indent how many levels deep to indent the data
 */
void        exif_entry_dump      (ExifEntry *entry, unsigned int indent);

/*! Return the IFD number of the given #ExifEntry
 *
 * \param[in] e an #ExifEntry*
 * \return #ExifIfd, or #EXIF_IFD_COUNT on error
 */
#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __EXIF_ENTRY_H__ */


<|start_filename|>node_modules/cross-fetch/dist/node-ponyfill.js<|end_filename|>
var nodeFetch = require('node-fetch');
var realFetch = nodeFetch.default || nodeFetch;

var fetch = function (url, options) {
  // Support schemaless URIs on the server for parity with the browser.
  // Ex: //github.com/ -> https://github.com/
  if (/^\/\//.test(url)) {
    url = 'https:' + url;
  }
  return realFetch.call(this, url, options);
};

fetch.polyfill = false;

module.exports = exports = fetch;
exports.fetch = fetch;
exports.Headers = nodeFetch.Headers;
exports.Request = nodeFetch.Request;
exports.Response = nodeFetch.Response;

// Needed for TypeScript.
exports.default = fetch;


<|start_filename|>node_modules/sharp/vendor/include/lcms2.h<|end_filename|>
//---------------------------------------------------------------------------------
//
//  Little Color Management System
//  Copyright (c) 1998-2017 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software
// is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//---------------------------------------------------------------------------------
//
// Version 2.9rc3
//

#ifndef _lcms2_H

// ********** Configuration toggles ****************************************

// Uncomment this one if you are using big endian machines
// #define CMS_USE_BIG_ENDIAN   1

// Uncomment this one if your compiler/machine does NOT support the
// "long long" type.
// #define CMS_DONT_USE_INT64        1

// Uncomment this if your compiler doesn't work with fast floor function
// #define CMS_DONT_USE_FAST_FLOOR 1

// Uncomment this line if you want lcms to use the black point tag in profile,
// if commented, lcms will compute the black point by its own.
// It is safer to leave it commented out
// #define CMS_USE_PROFILE_BLACK_POINT_TAG    1

// Uncomment this line if you are compiling as C++ and want a C++ API
// #define CMS_USE_CPP_API

// Uncomment this line if you need strict CGATS syntax. Makes CGATS files to
// require "KEYWORD" on undefined identifiers, keep it commented out unless needed
// #define CMS_STRICT_CGATS  1

// Uncomment to get rid of the tables for "half" float support
// #define CMS_NO_HALF_SUPPORT 1

// Uncomment to get rid of pthreads/windows dependency
// #define CMS_NO_PTHREADS  1

// Uncomment this for special windows mutex initialization (see lcms2_internal.h)
// #define CMS_RELY_ON_WINDOWS_STATIC_MUTEX_INIT

// ********** End of configuration toggles ******************************

// Needed for streams
#include <stdio.h>

// Needed for portability (C99 per 7.1.2)
#include <limits.h>
#include <time.h>
#include <stddef.h>

#ifndef CMS_USE_CPP_API
#   ifdef __cplusplus
extern "C" {
#   endif
#endif

// Version/release
#define LCMS_VERSION        2090

// I will give the chance of redefining basic types for compilers that are not fully C99 compliant
#ifndef CMS_BASIC_TYPES_ALREADY_DEFINED

// Base types
typedef unsigned char        cmsUInt8Number;   // That is guaranteed by the C99 spec
typedef signed char          cmsInt8Number;    // That is guaranteed by the C99 spec

#if CHAR_BIT != 8
#  error "Unable to find 8 bit type, unsupported compiler"
#endif

// IEEE float storage numbers
typedef float                cmsFloat32Number;
typedef double               cmsFloat64Number;

// 16-bit base types
#if (USHRT_MAX == 65535U)
 typedef unsigned short      cmsUInt16Number;
#elif (UINT_MAX == 65535U)
 typedef unsigned int        cmsUInt16Number;
#else
#  error "Unable to find 16 bits unsigned type, unsupported compiler"
#endif

#if (SHRT_MAX == 32767)
  typedef  short             cmsInt16Number;
#elif (INT_MAX == 32767)
  typedef  int               cmsInt16Number;
#else
#  error "Unable to find 16 bits signed type, unsupported compiler"
#endif

// 32-bit base type
#if (UINT_MAX == 4294967295U)
 typedef unsigned int        cmsUInt32Number;
#elif (ULONG_MAX == 4294967295U)
 typedef unsigned long       cmsUInt32Number;
#else
#  error "Unable to find 32 bit unsigned type, unsupported compiler"
#endif

#if (INT_MAX == +2147483647)
 typedef  int                cmsInt32Number;
#elif (LONG_MAX == +2147483647)
 typedef  long               cmsInt32Number;
#else
#  error "Unable to find 32 bit signed type, unsupported compiler"
#endif

// 64-bit base types
#ifndef CMS_DONT_USE_INT64
#  if (ULONG_MAX  == 18446744073709551615U)
    typedef unsigned long   cmsUInt64Number;
#  elif (ULLONG_MAX == 18446744073709551615U)
      typedef unsigned long long   cmsUInt64Number;
#  else
#     define CMS_DONT_USE_INT64 1
#  endif
#  if (LONG_MAX == +9223372036854775807)
      typedef  long          cmsInt64Number;
#  elif (LLONG_MAX == +9223372036854775807)
      typedef  long long     cmsInt64Number;
#  else
#     define CMS_DONT_USE_INT64 1
#  endif
#endif
#endif

// In the case 64 bit numbers are not supported by the compiler
#ifdef CMS_DONT_USE_INT64
    typedef cmsUInt32Number      cmsUInt64Number[2];
    typedef cmsInt32Number       cmsInt64Number[2];
#endif

// Derivative types
typedef cmsUInt32Number      cmsSignature;
typedef cmsUInt16Number      cmsU8Fixed8Number;
typedef cmsInt32Number       cmsS15Fixed16Number;
typedef cmsUInt32Number      cmsU16Fixed16Number;

// Boolean type, which will be using the native integer
typedef int                  cmsBool;

// Try to detect windows
#if defined (_WIN32) || defined(_WIN64) || defined(WIN32) || defined(_WIN32_)
#  define CMS_IS_WINDOWS_ 1
#endif

#ifdef _MSC_VER
#  define CMS_IS_WINDOWS_ 1
#endif

#ifdef __BORLANDC__
#  define CMS_IS_WINDOWS_ 1
#endif

// Try to detect big endian platforms. This list can be endless, so primarily rely on the configure script
// on Unix-like systems, and allow it to be set on the compiler command line using
// -DCMS_USE_BIG_ENDIAN or something similar
#ifdef CMS_USE_BIG_ENDIAN // set at compiler command line takes overall precedence

#  if CMS_USE_BIG_ENDIAN == 0
#    undef CMS_USE_BIG_ENDIAN
#  endif

#else // CMS_USE_BIG_ENDIAN

#  ifdef WORDS_BIGENDIAN // set by configure (or explicitly on compiler command line)
#    define CMS_USE_BIG_ENDIAN 1
#  else // WORDS_BIGENDIAN
// Fall back to platform/compiler specific tests
#    if defined(__sgi__) || defined(__sgi) || defined(sparc)
#      define CMS_USE_BIG_ENDIAN      1
#    endif

#    if defined(__s390__) || defined(__s390x__)
#      define CMS_USE_BIG_ENDIAN   1
#    endif

#    ifdef macintosh
#      ifdef __BIG_ENDIAN__
#        define CMS_USE_BIG_ENDIAN      1
#      endif
#      ifdef __LITTLE_ENDIAN__
#        undef CMS_USE_BIG_ENDIAN
#      endif
#    endif
#  endif  // WORDS_BIGENDIAN

#  if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__)
#    define CMS_USE_BIG_ENDIAN      1
#  endif

#endif  // CMS_USE_BIG_ENDIAN


// Calling convention -- this is hardly platform and compiler dependent
#ifdef CMS_IS_WINDOWS_
#  if defined(CMS_DLL) || defined(CMS_DLL_BUILD)
#     ifdef __BORLANDC__
#        define CMSEXPORT       __stdcall _export
#        define CMSAPI
#     else
#        define CMSEXPORT      __stdcall
#        ifdef CMS_DLL_BUILD
#            define CMSAPI    __declspec(dllexport)
#        else
#           define CMSAPI     __declspec(dllimport)
#        endif
#     endif
#  else
#     define CMSEXPORT
#     define CMSAPI
#  endif
#else  // not Windows
#  ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY
#     define CMSEXPORT
#     define CMSAPI    __attribute__((visibility("default")))
#  else
#     define CMSEXPORT
#     define CMSAPI
#  endif
#endif  // CMS_IS_WINDOWS_

#ifdef HasTHREADS
# if HasTHREADS == 1
#    undef CMS_NO_PTHREADS
# else
#    define CMS_NO_PTHREADS 1
# endif
#endif

// Some common definitions
#define cmsMAX_PATH     256

#ifndef FALSE
#       define FALSE 0
#endif
#ifndef TRUE
#       define TRUE  1
#endif

// D50 XYZ normalized to Y=1.0
#define cmsD50X  0.9642
#define cmsD50Y  1.0
#define cmsD50Z  0.8249

// V4 perceptual black
#define cmsPERCEPTUAL_BLACK_X  0.00336
#define cmsPERCEPTUAL_BLACK_Y  0.0034731
#define cmsPERCEPTUAL_BLACK_Z  0.00287

// Definitions in ICC spec
#define cmsMagicNumber  0x61637370     // 'acsp'
#define lcmsSignature   0x6c636d73     // 'lcms'


// Base ICC type definitions
typedef enum {
    cmsSigChromaticityType                  = 0x6368726D,  // 'chrm'
    cmsSigColorantOrderType                 = 0x636C726F,  // 'clro'
    cmsSigColorantTableType                 = 0x636C7274,  // 'clrt'
    cmsSigCrdInfoType                       = 0x63726469,  // 'crdi'
    cmsSigCurveType                         = 0x63757276,  // 'curv'
    cmsSigDataType                          = 0x64617461,  // 'data'
    cmsSigDictType                          = 0x64696374,  // 'dict'
    cmsSigDateTimeType                      = 0x6474696D,  // 'dtim'
    cmsSigDeviceSettingsType                = 0x64657673,  // 'devs'
    cmsSigLut16Type                         = 0x6d667432,  // 'mft2'
    cmsSigLut8Type                          = 0x6d667431,  // 'mft1'
    cmsSigLutAtoBType                       = 0x6d414220,  // 'mAB '
    cmsSigLutBtoAType                       = 0x6d424120,  // 'mBA '
    cmsSigMeasurementType                   = 0x6D656173,  // 'meas'
    cmsSigMultiLocalizedUnicodeType         = 0x6D6C7563,  // 'mluc'
    cmsSigMultiProcessElementType           = 0x6D706574,  // 'mpet'
    cmsSigNamedColorType                    = 0x6E636f6C,  // 'ncol' -- DEPRECATED!
    cmsSigNamedColor2Type                   = 0x6E636C32,  // 'ncl2'
    cmsSigParametricCurveType               = 0x70617261,  // 'para'
    cmsSigProfileSequenceDescType           = 0x70736571,  // 'pseq'
    cmsSigProfileSequenceIdType             = 0x70736964,  // 'psid'
    cmsSigResponseCurveSet16Type            = 0x72637332,  // 'rcs2'
    cmsSigS15Fixed16ArrayType               = 0x73663332,  // 'sf32'
    cmsSigScreeningType                     = 0x7363726E,  // 'scrn'
    cmsSigSignatureType                     = 0x73696720,  // 'sig '
    cmsSigTextType                          = 0x74657874,  // 'text'
    cmsSigTextDescriptionType               = 0x64657363,  // 'desc'
    cmsSigU16Fixed16ArrayType               = 0x75663332,  // 'uf32'
    cmsSigUcrBgType                         = 0x62666420,  // 'bfd '
    cmsSigUInt16ArrayType                   = 0x75693136,  // 'ui16'
    cmsSigUInt32ArrayType                   = 0x75693332,  // 'ui32'
    cmsSigUInt64ArrayType                   = 0x75693634,  // 'ui64'
    cmsSigUInt8ArrayType                    = 0x75693038,  // 'ui08'
    cmsSigVcgtType                          = 0x76636774,  // 'vcgt'
    cmsSigViewingConditionsType             = 0x76696577,  // 'view'
    cmsSigXYZType                           = 0x58595A20   // 'XYZ '


} cmsTagTypeSignature;

// Base ICC tag definitions
typedef enum {
    cmsSigAToB0Tag                          = 0x41324230,  // 'A2B0'
    cmsSigAToB1Tag                          = 0x41324231,  // 'A2B1'
    cmsSigAToB2Tag                          = 0x41324232,  // 'A2B2'
    cmsSigBlueColorantTag                   = 0x6258595A,  // 'bXYZ'
    cmsSigBlueMatrixColumnTag               = 0x6258595A,  // 'bXYZ'
    cmsSigBlueTRCTag                        = 0x62545243,  // 'bTRC'
    cmsSigBToA0Tag                          = 0x42324130,  // 'B2A0'
    cmsSigBToA1Tag                          = 0x42324131,  // 'B2A1'
    cmsSigBToA2Tag                          = 0x42324132,  // 'B2A2'
    cmsSigCalibrationDateTimeTag            = 0x63616C74,  // 'calt'
    cmsSigCharTargetTag                     = 0x74617267,  // 'targ'
    cmsSigChromaticAdaptationTag            = 0x63686164,  // 'chad'
    cmsSigChromaticityTag                   = 0x6368726D,  // 'chrm'
    cmsSigColorantOrderTag                  = 0x636C726F,  // 'clro'
    cmsSigColorantTableTag                  = 0x636C7274,  // 'clrt'
    cmsSigColorantTableOutTag               = 0x636C6F74,  // 'clot'
    cmsSigColorimetricIntentImageStateTag   = 0x63696973,  // 'ciis'
    cmsSigCopyrightTag                      = 0x63707274,  // 'cprt'
    cmsSigCrdInfoTag                        = 0x63726469,  // 'crdi'
    cmsSigDataTag                           = 0x64617461,  // 'data'
    cmsSigDateTimeTag                       = 0x6474696D,  // 'dtim'
    cmsSigDeviceMfgDescTag                  = 0x646D6E64,  // 'dmnd'
    cmsSigDeviceModelDescTag                = 0x646D6464,  // 'dmdd'
    cmsSigDeviceSettingsTag                 = 0x64657673,  // 'devs'
    cmsSigDToB0Tag                          = 0x44324230,  // 'D2B0'
    cmsSigDToB1Tag                          = 0x44324231,  // 'D2B1'
    cmsSigDToB2Tag                          = 0x44324232,  // 'D2B2'
    cmsSigDToB3Tag                          = 0x44324233,  // 'D2B3'
    cmsSigBToD0Tag                          = 0x42324430,  // 'B2D0'
    cmsSigBToD1Tag                          = 0x42324431,  // 'B2D1'
    cmsSigBToD2Tag                          = 0x42324432,  // 'B2D2'
    cmsSigBToD3Tag                          = 0x42324433,  // 'B2D3'
    cmsSigGamutTag                          = 0x67616D74,  // 'gamt'
    cmsSigGrayTRCTag                        = 0x6b545243,  // 'kTRC'
    cmsSigGreenColorantTag                  = 0x6758595A,  // 'gXYZ'
    cmsSigGreenMatrixColumnTag              = 0x6758595A,  // 'gXYZ'
    cmsSigGreenTRCTag                       = 0x67545243,  // 'gTRC'
    cmsSigLuminanceTag                      = 0x6C756d69,  // 'lumi'
    cmsSigMeasurementTag                    = 0x6D656173,  // 'meas'
    cmsSigMediaBlackPointTag                = 0x626B7074,  // 'bkpt'
    cmsSigMediaWhitePointTag                = 0x77747074,  // 'wtpt'
    cmsSigNamedColorTag                     = 0x6E636f6C,  // 'ncol' // Deprecated by the ICC
    cmsSigNamedColor2Tag                    = 0x6E636C32,  // 'ncl2'
    cmsSigOutputResponseTag                 = 0x72657370,  // 'resp'
    cmsSigPerceptualRenderingIntentGamutTag = 0x72696730,  // 'rig0'
    cmsSigPreview0Tag                       = 0x70726530,  // 'pre0'
    cmsSigPreview1Tag                       = 0x70726531,  // 'pre1'
    cmsSigPreview2Tag                       = 0x70726532,  // 'pre2'
    cmsSigProfileDescriptionTag             = 0x64657363,  // 'desc'
    cmsSigProfileDescriptionMLTag           = 0x6473636d,  // 'dscm'
    cmsSigProfileSequenceDescTag            = 0x70736571,  // 'pseq'
    cmsSigProfileSequenceIdTag              = 0x70736964,  // 'psid'
    cmsSigPs2CRD0Tag                        = 0x70736430,  // 'psd0'
    cmsSigPs2CRD1Tag                        = 0x70736431,  // 'psd1'
    cmsSigPs2CRD2Tag                        = 0x70736432,  // 'psd2'
    cmsSigPs2CRD3Tag                        = 0x70736433,  // 'psd3'
    cmsSigPs2CSATag                         = 0x70733273,  // 'ps2s'
    cmsSigPs2RenderingIntentTag             = 0x70733269,  // 'ps2i'
    cmsSigRedColorantTag                    = 0x7258595A,  // 'rXYZ'
    cmsSigRedMatrixColumnTag                = 0x7258595A,  // 'rXYZ'
    cmsSigRedTRCTag                         = 0x72545243,  // 'rTRC'
    cmsSigSaturationRenderingIntentGamutTag = 0x72696732,  // 'rig2'
    cmsSigScreeningDescTag                  = 0x73637264,  // 'scrd'
    cmsSigScreeningTag                      = 0x7363726E,  // 'scrn'
    cmsSigTechnologyTag                     = 0x74656368,  // 'tech'
    cmsSigUcrBgTag                          = 0x62666420,  // 'bfd '
    cmsSigViewingCondDescTag                = 0x76756564,  // 'vued'
    cmsSigViewingConditionsTag              = 0x76696577,  // 'view'
    cmsSigVcgtTag                           = 0x76636774,  // 'vcgt'
    cmsSigMetaTag                           = 0x6D657461,  // 'meta'
    cmsSigArgyllArtsTag                     = 0x61727473   // 'arts'

} cmsTagSignature;


// ICC Technology tag
typedef enum {
    cmsSigDigitalCamera                     = 0x6463616D,  // 'dcam'
    cmsSigFilmScanner                       = 0x6673636E,  // 'fscn'
    cmsSigReflectiveScanner                 = 0x7273636E,  // 'rscn'
    cmsSigInkJetPrinter                     = 0x696A6574,  // 'ijet'
    cmsSigThermalWaxPrinter                 = 0x74776178,  // 'twax'
    cmsSigElectrophotographicPrinter        = 0x6570686F,  // 'epho'
    cmsSigElectrostaticPrinter              = 0x65737461,  // 'esta'
    cmsSigDyeSublimationPrinter             = 0x64737562,  // 'dsub'
    cmsSigPhotographicPaperPrinter          = 0x7270686F,  // 'rpho'
    cmsSigFilmWriter                        = 0x6670726E,  // 'fprn'
    cmsSigVideoMonitor                      = 0x7669646D,  // 'vidm'
    cmsSigVideoCamera                       = 0x76696463,  // 'vidc'
    cmsSigProjectionTelevision              = 0x706A7476,  // 'pjtv'
    cmsSigCRTDisplay                        = 0x43525420,  // 'CRT '
    cmsSigPMDisplay                         = 0x504D4420,  // 'PMD '
    cmsSigAMDisplay                         = 0x414D4420,  // 'AMD '
    cmsSigPhotoCD                           = 0x4B504344,  // 'KPCD'
    cmsSigPhotoImageSetter                  = 0x696D6773,  // 'imgs'
    cmsSigGravure                           = 0x67726176,  // 'grav'
    cmsSigOffsetLithography                 = 0x6F666673,  // 'offs'
    cmsSigSilkscreen                        = 0x73696C6B,  // 'silk'
    cmsSigFlexography                       = 0x666C6578,  // 'flex'
    cmsSigMotionPictureFilmScanner          = 0x6D706673,  // 'mpfs'
    cmsSigMotionPictureFilmRecorder         = 0x6D706672,  // 'mpfr'
    cmsSigDigitalMotionPictureCamera        = 0x646D7063,  // 'dmpc'
    cmsSigDigitalCinemaProjector            = 0x64636A70   // 'dcpj'

} cmsTechnologySignature;


// ICC Color spaces
typedef enum {
    cmsSigXYZData                           = 0x58595A20,  // 'XYZ '
    cmsSigLabData                           = 0x4C616220,  // 'Lab '
    cmsSigLuvData                           = 0x4C757620,  // 'Luv '
    cmsSigYCbCrData                         = 0x59436272,  // 'YCbr'
    cmsSigYxyData                           = 0x59787920,  // 'Yxy '
    cmsSigRgbData                           = 0x52474220,  // 'RGB '
    cmsSigGrayData                          = 0x47524159,  // 'GRAY'
    cmsSigHsvData                           = 0x48535620,  // 'HSV '
    cmsSigHlsData                           = 0x484C5320,  // 'HLS '
    cmsSigCmykData                          = 0x434D594B,  // 'CMYK'
    cmsSigCmyData                           = 0x434D5920,  // 'CMY '
    cmsSigMCH1Data                          = 0x4D434831,  // 'MCH1'
    cmsSigMCH2Data                          = 0x4D434832,  // 'MCH2'
    cmsSigMCH3Data                          = 0x4D434833,  // 'MCH3'
    cmsSigMCH4Data                          = 0x4D434834,  // 'MCH4'
    cmsSigMCH5Data                          = 0x4D434835,  // 'MCH5'
    cmsSigMCH6Data                          = 0x4D434836,  // 'MCH6'
    cmsSigMCH7Data                          = 0x4D434837,  // 'MCH7'
    cmsSigMCH8Data                          = 0x4D434838,  // 'MCH8'
    cmsSigMCH9Data                          = 0x4D434839,  // 'MCH9'
    cmsSigMCHAData                          = 0x4D434841,  // 'MCHA'
    cmsSigMCHBData                          = 0x4D434842,  // 'MCHB'
    cmsSigMCHCData                          = 0x4D434843,  // 'MCHC'
    cmsSigMCHDData                          = 0x4D434844,  // 'MCHD'
    cmsSigMCHEData                          = 0x4D434845,  // 'MCHE'
    cmsSigMCHFData                          = 0x4D434846,  // 'MCHF'
    cmsSigNamedData                         = 0x6e6d636c,  // 'nmcl'
    cmsSig1colorData                        = 0x31434C52,  // '1CLR'
    cmsSig2colorData                        = 0x32434C52,  // '2CLR'
    cmsSig3colorData                        = 0x33434C52,  // '3CLR'
    cmsSig4colorData                        = 0x34434C52,  // '4CLR'
    cmsSig5colorData                        = 0x35434C52,  // '5CLR'
    cmsSig6colorData                        = 0x36434C52,  // '6CLR'
    cmsSig7colorData                        = 0x37434C52,  // '7CLR'
    cmsSig8colorData                        = 0x38434C52,  // '8CLR'
    cmsSig9colorData                        = 0x39434C52,  // '9CLR'
    cmsSig10colorData                       = 0x41434C52,  // 'ACLR'
    cmsSig11colorData                       = 0x42434C52,  // 'BCLR'
    cmsSig12colorData                       = 0x43434C52,  // 'CCLR'
    cmsSig13colorData                       = 0x44434C52,  // 'DCLR'
    cmsSig14colorData                       = 0x45434C52,  // 'ECLR'
    cmsSig15colorData                       = 0x46434C52,  // 'FCLR'
    cmsSigLuvKData                          = 0x4C75764B   // 'LuvK'

} cmsColorSpaceSignature;

// ICC Profile Class
typedef enum {
    cmsSigInputClass                        = 0x73636E72,  // 'scnr'
    cmsSigDisplayClass                      = 0x6D6E7472,  // 'mntr'
    cmsSigOutputClass                       = 0x70727472,  // 'prtr'
    cmsSigLinkClass                         = 0x6C696E6B,  // 'link'
    cmsSigAbstractClass                     = 0x61627374,  // 'abst'
    cmsSigColorSpaceClass                   = 0x73706163,  // 'spac'
    cmsSigNamedColorClass                   = 0x6e6d636c   // 'nmcl'

} cmsProfileClassSignature;

// ICC Platforms
typedef enum {
    cmsSigMacintosh                         = 0x4150504C,  // 'APPL'
    cmsSigMicrosoft                         = 0x4D534654,  // 'MSFT'
    cmsSigSolaris                           = 0x53554E57,  // 'SUNW'
    cmsSigSGI                               = 0x53474920,  // 'SGI '
    cmsSigTaligent                          = 0x54474E54,  // 'TGNT'
    cmsSigUnices                            = 0x2A6E6978   // '*nix'   // From argyll -- Not official

} cmsPlatformSignature;

// Reference gamut
#define  cmsSigPerceptualReferenceMediumGamut         0x70726d67  //'prmg'

// For cmsSigColorimetricIntentImageStateTag
#define  cmsSigSceneColorimetryEstimates              0x73636F65  //'scoe'
#define  cmsSigSceneAppearanceEstimates               0x73617065  //'sape'
#define  cmsSigFocalPlaneColorimetryEstimates         0x66706365  //'fpce'
#define  cmsSigReflectionHardcopyOriginalColorimetry  0x72686F63  //'rhoc'
#define  cmsSigReflectionPrintOutputColorimetry       0x72706F63  //'rpoc'

// Multi process elements types
typedef enum {
    cmsSigCurveSetElemType              = 0x63767374,  //'cvst'
    cmsSigMatrixElemType                = 0x6D617466,  //'matf'
    cmsSigCLutElemType                  = 0x636C7574,  //'clut'

    cmsSigBAcsElemType                  = 0x62414353,  // 'bACS'
    cmsSigEAcsElemType                  = 0x65414353,  // 'eACS'

    // Custom from here, not in the ICC Spec
    cmsSigXYZ2LabElemType               = 0x6C327820,  // 'l2x '
    cmsSigLab2XYZElemType               = 0x78326C20,  // 'x2l '
    cmsSigNamedColorElemType            = 0x6E636C20,  // 'ncl '
    cmsSigLabV2toV4                     = 0x32203420,  // '2 4 '
    cmsSigLabV4toV2                     = 0x34203220,  // '4 2 '
  
    // Identities
    cmsSigIdentityElemType              = 0x69646E20,  // 'idn '

    // Float to floatPCS
    cmsSigLab2FloatPCS                  = 0x64326C20,  // 'd2l '
    cmsSigFloatPCS2Lab                  = 0x6C326420,  // 'l2d '
    cmsSigXYZ2FloatPCS                  = 0x64327820,  // 'd2x '
    cmsSigFloatPCS2XYZ                  = 0x78326420,  // 'x2d '  
    cmsSigClipNegativesElemType         = 0x636c7020   // 'clp '

} cmsStageSignature;

// Types of CurveElements
typedef enum {

    cmsSigFormulaCurveSeg               = 0x70617266, // 'parf'
    cmsSigSampledCurveSeg               = 0x73616D66, // 'samf'
    cmsSigSegmentedCurve                = 0x63757266  // 'curf'

} cmsCurveSegSignature;

// Used in ResponseCurveType
#define  cmsSigStatusA                    0x53746141 //'StaA'
#define  cmsSigStatusE                    0x53746145 //'StaE'
#define  cmsSigStatusI                    0x53746149 //'StaI'
#define  cmsSigStatusT                    0x53746154 //'StaT'
#define  cmsSigStatusM                    0x5374614D //'StaM'
#define  cmsSigDN                         0x444E2020 //'DN  '
#define  cmsSigDNP                        0x444E2050 //'DN P'
#define  cmsSigDNN                        0x444E4E20 //'DNN '
#define  cmsSigDNNP                       0x444E4E50 //'DNNP'

// Device attributes, currently defined values correspond to the low 4 bytes
// of the 8 byte attribute quantity
#define cmsReflective     0
#define cmsTransparency   1
#define cmsGlossy         0
#define cmsMatte          2

// Common structures in ICC tags
typedef struct {
    cmsUInt32Number len;
    cmsUInt32Number flag;
    cmsUInt8Number  data[1];

} cmsICCData;

// ICC date time
typedef struct {
    cmsUInt16Number      year;
    cmsUInt16Number      month;
    cmsUInt16Number      day;
    cmsUInt16Number      hours;
    cmsUInt16Number      minutes;
    cmsUInt16Number      seconds;

} cmsDateTimeNumber;

// ICC XYZ
typedef struct {
    cmsS15Fixed16Number  X;
    cmsS15Fixed16Number  Y;
    cmsS15Fixed16Number  Z;

} cmsEncodedXYZNumber;


// Profile ID as computed by MD5 algorithm
typedef union {
    cmsUInt8Number       ID8[16];
    cmsUInt16Number      ID16[8];
    cmsUInt32Number      ID32[4];

} cmsProfileID;


// ----------------------------------------------------------------------------------------------
// ICC profile internal base types. Strictly, shouldn't be declared in this header, but maybe
// somebody want to use this info for accessing profile header directly, so here it is.

// Profile header -- it is 32-bit aligned, so no issues are expected on alignment
typedef struct {
    cmsUInt32Number              size;           // Profile size in bytes
    cmsSignature                 cmmId;          // CMM for this profile
    cmsUInt32Number              version;        // Format version number
    cmsProfileClassSignature     deviceClass;    // Type of profile
    cmsColorSpaceSignature       colorSpace;     // Color space of data
    cmsColorSpaceSignature       pcs;            // PCS, XYZ or Lab only
    cmsDateTimeNumber            date;           // Date profile was created
    cmsSignature                 magic;          // Magic Number to identify an ICC profile
    cmsPlatformSignature         platform;       // Primary Platform
    cmsUInt32Number              flags;          // Various bit settings
    cmsSignature                 manufacturer;   // Device manufacturer
    cmsUInt32Number              model;          // Device model number
    cmsUInt64Number              attributes;     // Device attributes
    cmsUInt32Number              renderingIntent;// Rendering intent
    cmsEncodedXYZNumber          illuminant;     // Profile illuminant
    cmsSignature                 creator;        // Profile creator
    cmsProfileID                 profileID;      // Profile ID using MD5
    cmsInt8Number                reserved[28];   // Reserved for future use

} cmsICCHeader;

// ICC base tag
typedef struct {
    cmsTagTypeSignature  sig;
    cmsInt8Number        reserved[4];

} cmsTagBase;

// A tag entry in directory
typedef struct {
    cmsTagSignature      sig;            // The tag signature
    cmsUInt32Number      offset;         // Start of tag
    cmsUInt32Number      size;           // Size in bytes

} cmsTagEntry;

// ----------------------------------------------------------------------------------------------

// Little CMS specific typedefs

typedef void* cmsHANDLE ;              // Generic handle
typedef void* cmsHPROFILE;             // Opaque typedefs to hide internals
typedef void* cmsHTRANSFORM;

#define cmsMAXCHANNELS  16                // Maximum number of channels in ICC profiles

// Format of pixel is defined by one cmsUInt32Number, using bit fields as follows
//
//                               2                1          0
//                          3 2 10987 6 5 4 3 2 1 098 7654 321
//                          A O TTTTT U Y F P X S EEE CCCC BBB
//
//            A: Floating point -- With this flag we can differentiate 16 bits as float and as int
//            O: Optimized -- previous optimization already returns the final 8-bit value
//            T: Pixeltype
//            F: Flavor  0=MinIsBlack(Chocolate) 1=MinIsWhite(Vanilla)
//            P: Planar? 0=Chunky, 1=Planar
//            X: swap 16 bps endianness?
//            S: Do swap? ie, BGR, KYMC
//            E: Extra samples
//            C: Channels (Samples per pixel)
//            B: bytes per sample
//            Y: Swap first - changes ABGR to BGRA and KCMY to CMYK

#define FLOAT_SH(a)            ((a) << 22)
#define OPTIMIZED_SH(s)        ((s) << 21)
#define COLORSPACE_SH(s)       ((s) << 16)
#define SWAPFIRST_SH(s)        ((s) << 14)
#define FLAVOR_SH(s)           ((s) << 13)
#define PLANAR_SH(p)           ((p) << 12)
#define ENDIAN16_SH(e)         ((e) << 11)
#define DOSWAP_SH(e)           ((e) << 10)
#define EXTRA_SH(e)            ((e) << 7)
#define CHANNELS_SH(c)         ((c) << 3)
#define BYTES_SH(b)            (b)

// These macros unpack format specifiers into integers
#define T_FLOAT(a)            (((a)>>22)&1)
#define T_OPTIMIZED(o)        (((o)>>21)&1)
#define T_COLORSPACE(s)       (((s)>>16)&31)
#define T_SWAPFIRST(s)        (((s)>>14)&1)
#define T_FLAVOR(s)           (((s)>>13)&1)
#define T_PLANAR(p)           (((p)>>12)&1)
#define T_ENDIAN16(e)         (((e)>>11)&1)
#define T_DOSWAP(e)           (((e)>>10)&1)
#define T_EXTRA(e)            (((e)>>7)&7)
#define T_CHANNELS(c)         (((c)>>3)&15)
#define T_BYTES(b)            ((b)&7)


// Pixel types
#define PT_ANY       0    // Don't check colorspace
                          // 1 & 2 are reserved
#define PT_GRAY      3
#define PT_RGB       4
#define PT_CMY       5
#define PT_CMYK      6
#define PT_YCbCr     7
#define PT_YUV       8      // Lu'v'
#define PT_XYZ       9
#define PT_Lab       10
#define PT_YUVK      11     // Lu'v'K
#define PT_HSV       12
#define PT_HLS       13
#define PT_Yxy       14

#define PT_MCH1      15
#define PT_MCH2      16
#define PT_MCH3      17
#define PT_MCH4      18
#define PT_MCH5      19
#define PT_MCH6      20
#define PT_MCH7      21
#define PT_MCH8      22
#define PT_MCH9      23
#define PT_MCH10     24
#define PT_MCH11     25
#define PT_MCH12     26
#define PT_MCH13     27
#define PT_MCH14     28
#define PT_MCH15     29

#define PT_LabV2     30     // Identical to PT_Lab, but using the V2 old encoding

// Some (not all!) representations

#ifndef TYPE_RGB_8      // TYPE_RGB_8 is a very common identifier, so don't include ours
                        // if user has it already defined.

#define TYPE_GRAY_8            (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(1))
#define TYPE_GRAY_8_REV        (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(1)|FLAVOR_SH(1))
#define TYPE_GRAY_16           (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2))
#define TYPE_GRAY_16_REV       (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2)|FLAVOR_SH(1))
#define TYPE_GRAY_16_SE        (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_GRAYA_8           (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(1))
#define TYPE_GRAYA_16          (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2))
#define TYPE_GRAYA_16_SE       (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_GRAYA_8_PLANAR    (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(1)|PLANAR_SH(1))
#define TYPE_GRAYA_16_PLANAR   (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)|PLANAR_SH(1))

#define TYPE_RGB_8             (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1))
#define TYPE_RGB_8_PLANAR      (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1))
#define TYPE_BGR_8             (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1))
#define TYPE_BGR_8_PLANAR      (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|PLANAR_SH(1))
#define TYPE_RGB_16            (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_RGB_16_PLANAR     (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1))
#define TYPE_RGB_16_SE         (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_BGR_16            (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_BGR_16_PLANAR     (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|PLANAR_SH(1))
#define TYPE_BGR_16_SE         (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))

#define TYPE_RGBA_8            (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1))
#define TYPE_RGBA_8_PLANAR     (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1))
#define TYPE_RGBA_16           (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_RGBA_16_PLANAR    (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1))
#define TYPE_RGBA_16_SE        (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1))

#define TYPE_ARGB_8            (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|SWAPFIRST_SH(1))
#define TYPE_ARGB_8_PLANAR     (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|SWAPFIRST_SH(1)|PLANAR_SH(1))
#define TYPE_ARGB_16           (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|SWAPFIRST_SH(1))

#define TYPE_ABGR_8            (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1))
#define TYPE_ABGR_8_PLANAR     (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|PLANAR_SH(1))
#define TYPE_ABGR_16           (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_ABGR_16_PLANAR    (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|PLANAR_SH(1))
#define TYPE_ABGR_16_SE        (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))

#define TYPE_BGRA_8            (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1))
#define TYPE_BGRA_8_PLANAR     (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1)|PLANAR_SH(1))
#define TYPE_BGRA_16           (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|SWAPFIRST_SH(1))
#define TYPE_BGRA_16_SE        (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1))

#define TYPE_CMY_8             (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(1))
#define TYPE_CMY_8_PLANAR      (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1))
#define TYPE_CMY_16            (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_CMY_16_PLANAR     (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1))
#define TYPE_CMY_16_SE         (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1))

#define TYPE_CMYK_8            (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1))
#define TYPE_CMYKA_8           (COLORSPACE_SH(PT_CMYK)|EXTRA_SH(1)|CHANNELS_SH(4)|BYTES_SH(1))
#define TYPE_CMYK_8_REV        (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|FLAVOR_SH(1))
#define TYPE_YUVK_8            TYPE_CMYK_8_REV
#define TYPE_CMYK_8_PLANAR     (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|PLANAR_SH(1))
#define TYPE_CMYK_16           (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2))
#define TYPE_CMYK_16_REV       (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|FLAVOR_SH(1))
#define TYPE_YUVK_16           TYPE_CMYK_16_REV
#define TYPE_CMYK_16_PLANAR    (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|PLANAR_SH(1))
#define TYPE_CMYK_16_SE        (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|ENDIAN16_SH(1))

#define TYPE_KYMC_8            (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|DOSWAP_SH(1))
#define TYPE_KYMC_16           (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_KYMC_16_SE        (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))

#define TYPE_KCMY_8            (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|SWAPFIRST_SH(1))
#define TYPE_KCMY_8_REV        (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|FLAVOR_SH(1)|SWAPFIRST_SH(1))
#define TYPE_KCMY_16           (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|SWAPFIRST_SH(1))
#define TYPE_KCMY_16_REV       (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|FLAVOR_SH(1)|SWAPFIRST_SH(1))
#define TYPE_KCMY_16_SE        (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|ENDIAN16_SH(1)|SWAPFIRST_SH(1))

#define TYPE_CMYK5_8           (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(1))
#define TYPE_CMYK5_16          (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(2))
#define TYPE_CMYK5_16_SE       (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_KYMC5_8           (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(1)|DOSWAP_SH(1))
#define TYPE_KYMC5_16          (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_KYMC5_16_SE       (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))
#define TYPE_CMYK6_8           (COLORSPACE_SH(PT_MCH6)|CHANNELS_SH(6)|BYTES_SH(1))
#define TYPE_CMYK6_8_PLANAR    (COLORSPACE_SH(PT_MCH6)|CHANNELS_SH(6)|BYTES_SH(1)|PLANAR_SH(1))
#define TYPE_CMYK6_16          (COLORSPACE_SH(PT_MCH6)|CHANNELS_SH(6)|BYTES_SH(2))
#define TYPE_CMYK6_16_PLANAR   (COLORSPACE_SH(PT_MCH6)|CHANNELS_SH(6)|BYTES_SH(2)|PLANAR_SH(1))
#define TYPE_CMYK6_16_SE       (COLORSPACE_SH(PT_MCH6)|CHANNELS_SH(6)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_CMYK7_8           (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(1))
#define TYPE_CMYK7_16          (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(2))
#define TYPE_CMYK7_16_SE       (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_KYMC7_8           (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(1)|DOSWAP_SH(1))
#define TYPE_KYMC7_16          (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_KYMC7_16_SE       (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))
#define TYPE_CMYK8_8           (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(1))
#define TYPE_CMYK8_16          (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(2))
#define TYPE_CMYK8_16_SE       (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_KYMC8_8           (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(1)|DOSWAP_SH(1))
#define TYPE_KYMC8_16          (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_KYMC8_16_SE       (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))
#define TYPE_CMYK9_8           (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(1))
#define TYPE_CMYK9_16          (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(2))
#define TYPE_CMYK9_16_SE       (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_KYMC9_8           (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(1)|DOSWAP_SH(1))
#define TYPE_KYMC9_16          (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_KYMC9_16_SE       (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))
#define TYPE_CMYK10_8          (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(1))
#define TYPE_CMYK10_16         (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(2))
#define TYPE_CMYK10_16_SE      (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_KYMC10_8          (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(1)|DOSWAP_SH(1))
#define TYPE_KYMC10_16         (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_KYMC10_16_SE      (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))
#define TYPE_CMYK11_8          (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(1))
#define TYPE_CMYK11_16         (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(2))
#define TYPE_CMYK11_16_SE      (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_KYMC11_8          (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(1)|DOSWAP_SH(1))
#define TYPE_KYMC11_16         (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_KYMC11_16_SE      (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))
#define TYPE_CMYK12_8          (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(1))
#define TYPE_CMYK12_16         (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(2))
#define TYPE_CMYK12_16_SE      (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_KYMC12_8          (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(1)|DOSWAP_SH(1))
#define TYPE_KYMC12_16         (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_KYMC12_16_SE      (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))

// Colorimetric
#define TYPE_XYZ_16            (COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_Lab_8             (COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(1))
#define TYPE_LabV2_8           (COLORSPACE_SH(PT_LabV2)|CHANNELS_SH(3)|BYTES_SH(1))

#define TYPE_ALab_8            (COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(1)|EXTRA_SH(1)|SWAPFIRST_SH(1))
#define TYPE_ALabV2_8          (COLORSPACE_SH(PT_LabV2)|CHANNELS_SH(3)|BYTES_SH(1)|EXTRA_SH(1)|SWAPFIRST_SH(1))
#define TYPE_Lab_16            (COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_LabV2_16          (COLORSPACE_SH(PT_LabV2)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_Yxy_16            (COLORSPACE_SH(PT_Yxy)|CHANNELS_SH(3)|BYTES_SH(2))

// YCbCr
#define TYPE_YCbCr_8           (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(1))
#define TYPE_YCbCr_8_PLANAR    (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1))
#define TYPE_YCbCr_16          (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_YCbCr_16_PLANAR   (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1))
#define TYPE_YCbCr_16_SE       (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1))

// YUV
#define TYPE_YUV_8             (COLORSPACE_SH(PT_YUV)|CHANNELS_SH(3)|BYTES_SH(1))
#define TYPE_YUV_8_PLANAR      (COLORSPACE_SH(PT_YUV)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1))
#define TYPE_YUV_16            (COLORSPACE_SH(PT_YUV)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_YUV_16_PLANAR     (COLORSPACE_SH(PT_YUV)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1))
#define TYPE_YUV_16_SE         (COLORSPACE_SH(PT_YUV)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1))

// HLS
#define TYPE_HLS_8             (COLORSPACE_SH(PT_HLS)|CHANNELS_SH(3)|BYTES_SH(1))
#define TYPE_HLS_8_PLANAR      (COLORSPACE_SH(PT_HLS)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1))
#define TYPE_HLS_16            (COLORSPACE_SH(PT_HLS)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_HLS_16_PLANAR     (COLORSPACE_SH(PT_HLS)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1))
#define TYPE_HLS_16_SE         (COLORSPACE_SH(PT_HLS)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1))

// HSV
#define TYPE_HSV_8             (COLORSPACE_SH(PT_HSV)|CHANNELS_SH(3)|BYTES_SH(1))
#define TYPE_HSV_8_PLANAR      (COLORSPACE_SH(PT_HSV)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1))
#define TYPE_HSV_16            (COLORSPACE_SH(PT_HSV)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_HSV_16_PLANAR     (COLORSPACE_SH(PT_HSV)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1))
#define TYPE_HSV_16_SE         (COLORSPACE_SH(PT_HSV)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1))

// Named color index. Only 16 bits allowed (don't check colorspace)
#define TYPE_NAMED_COLOR_INDEX (CHANNELS_SH(1)|BYTES_SH(2))

// Float formatters.
#define TYPE_XYZ_FLT          (FLOAT_SH(1)|COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(4))
#define TYPE_Lab_FLT          (FLOAT_SH(1)|COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(4))
#define TYPE_LabA_FLT         (FLOAT_SH(1)|COLORSPACE_SH(PT_Lab)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4))
#define TYPE_GRAY_FLT         (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(4))
#define TYPE_RGB_FLT          (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(4))

#define TYPE_RGBA_FLT         (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4))
#define TYPE_ARGB_FLT         (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|SWAPFIRST_SH(1))
#define TYPE_BGR_FLT          (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1))
#define TYPE_BGRA_FLT         (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1)|SWAPFIRST_SH(1))
#define TYPE_ABGR_FLT         (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1))

#define TYPE_CMYK_FLT         (FLOAT_SH(1)|COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(4))

// Floating point formatters.
// NOTE THAT 'BYTES' FIELD IS SET TO ZERO ON DLB because 8 bytes overflows the bitfield
#define TYPE_XYZ_DBL          (FLOAT_SH(1)|COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(0))
#define TYPE_Lab_DBL          (FLOAT_SH(1)|COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(0))
#define TYPE_GRAY_DBL         (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(0))
#define TYPE_RGB_DBL          (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(0))
#define TYPE_BGR_DBL          (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(0)|DOSWAP_SH(1))
#define TYPE_CMYK_DBL         (FLOAT_SH(1)|COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(0))

// IEEE 754-2008 "half"
#define TYPE_GRAY_HALF_FLT    (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2))
#define TYPE_RGB_HALF_FLT     (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_RGBA_HALF_FLT    (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_CMYK_HALF_FLT    (FLOAT_SH(1)|COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2))

#define TYPE_RGBA_HALF_FLT    (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2))
#define TYPE_ARGB_HALF_FLT    (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|SWAPFIRST_SH(1))
#define TYPE_BGR_HALF_FLT     (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_BGRA_HALF_FLT    (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|SWAPFIRST_SH(1))
#define TYPE_ABGR_HALF_FLT    (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1))

#endif

// Colorspaces
typedef struct {
        cmsFloat64Number X;
        cmsFloat64Number Y;
        cmsFloat64Number Z;

    } cmsCIEXYZ;

typedef struct {
        cmsFloat64Number x;
        cmsFloat64Number y;
        cmsFloat64Number Y;

    } cmsCIExyY;

typedef struct {
        cmsFloat64Number L;
        cmsFloat64Number a;
        cmsFloat64Number b;

    } cmsCIELab;

typedef struct {
        cmsFloat64Number L;
        cmsFloat64Number C;
        cmsFloat64Number h;

    } cmsCIELCh;

typedef struct {
        cmsFloat64Number J;
        cmsFloat64Number C;
        cmsFloat64Number h;

    } cmsJCh;

typedef struct {
        cmsCIEXYZ  Red;
        cmsCIEXYZ  Green;
        cmsCIEXYZ  Blue;

    } cmsCIEXYZTRIPLE;

typedef struct {
        cmsCIExyY  Red;
        cmsCIExyY  Green;
        cmsCIExyY  Blue;

    } cmsCIExyYTRIPLE;

// Illuminant types for structs below
#define cmsILLUMINANT_TYPE_UNKNOWN 0x0000000
#define cmsILLUMINANT_TYPE_D50     0x0000001
#define cmsILLUMINANT_TYPE_D65     0x0000002
#define cmsILLUMINANT_TYPE_D93     0x0000003
#define cmsILLUMINANT_TYPE_F2      0x0000004
#define cmsILLUMINANT_TYPE_D55     0x0000005
#define cmsILLUMINANT_TYPE_A       0x0000006
#define cmsILLUMINANT_TYPE_E       0x0000007
#define cmsILLUMINANT_TYPE_F8      0x0000008

typedef struct {
        cmsUInt32Number  Observer;    // 0 = unknown, 1=CIE 1931, 2=CIE 1964
        cmsCIEXYZ        Backing;     // Value of backing
        cmsUInt32Number  Geometry;    // 0=unknown, 1=45/0, 0/45 2=0d, d/0
        cmsFloat64Number Flare;       // 0..1.0
        cmsUInt32Number  IlluminantType;

    } cmsICCMeasurementConditions;

typedef struct {
        cmsCIEXYZ       IlluminantXYZ;   // Not the same struct as CAM02,
        cmsCIEXYZ       SurroundXYZ;     // This is for storing the tag
        cmsUInt32Number IlluminantType;  // viewing condition

    } cmsICCViewingConditions;

// Get LittleCMS version (for shared objects) -----------------------------------------------------------------------------

CMSAPI int               CMSEXPORT cmsGetEncodedCMMversion(void);

// Support of non-standard functions --------------------------------------------------------------------------------------

CMSAPI int               CMSEXPORT cmsstrcasecmp(const char* s1, const char* s2);
CMSAPI long int          CMSEXPORT cmsfilelength(FILE* f);


// Context handling --------------------------------------------------------------------------------------------------------

// Each context holds its owns globals and its own plug-ins. There is a global context with the id = 0 for lecacy compatibility
// though using the global context is not recommended. Proper context handling makes lcms more thread-safe.

typedef struct _cmsContext_struct* cmsContext;

CMSAPI cmsContext       CMSEXPORT cmsCreateContext(void* Plugin, void* UserData);
CMSAPI void             CMSEXPORT cmsDeleteContext(cmsContext ContexID);
CMSAPI cmsContext       CMSEXPORT cmsDupContext(cmsContext ContextID, void* NewUserData);
CMSAPI void*            CMSEXPORT cmsGetContextUserData(cmsContext ContextID);

// Plug-In registering  --------------------------------------------------------------------------------------------------

CMSAPI cmsBool           CMSEXPORT cmsPlugin(void* Plugin);
CMSAPI cmsBool           CMSEXPORT cmsPluginTHR(cmsContext ContextID, void* Plugin);
CMSAPI void              CMSEXPORT cmsUnregisterPlugins(void);
CMSAPI void              CMSEXPORT cmsUnregisterPluginsTHR(cmsContext ContextID);

// Error logging ----------------------------------------------------------------------------------------------------------

// There is no error handling at all. When a function fails, it returns proper value.
// For example, all create functions does return NULL on failure. Other may return FALSE.
// It may be interesting, for the developer, to know why the function is failing.
// for that reason, lcms2 does offer a logging function. This function will get
// an ENGLISH string with some clues on what is going wrong. You can show this
// info to the end user if you wish, or just create some sort of log on disk.
// The logging function should NOT terminate the program, as this obviously can leave
// unfreed resources. It is the programmer's responsibility to check each function
// return code to make sure it didn't fail.

#define cmsERROR_UNDEFINED                    0
#define cmsERROR_FILE                         1
#define cmsERROR_RANGE                        2
#define cmsERROR_INTERNAL                     3
#define cmsERROR_NULL                         4
#define cmsERROR_READ                         5
#define cmsERROR_SEEK                         6
#define cmsERROR_WRITE                        7
#define cmsERROR_UNKNOWN_EXTENSION            8
#define cmsERROR_COLORSPACE_CHECK             9
#define cmsERROR_ALREADY_DEFINED              10
#define cmsERROR_BAD_SIGNATURE                11
#define cmsERROR_CORRUPTION_DETECTED          12
#define cmsERROR_NOT_SUITABLE                 13

// Error logger is called with the ContextID when a message is raised. This gives the
// chance to know which thread is responsible of the warning and any environment associated
// with it. Non-multithreading applications may safely ignore this parameter.
// Note that under certain special circumstances, ContextID may be NULL.
typedef void  (* cmsLogErrorHandlerFunction)(cmsContext ContextID, cmsUInt32Number ErrorCode, const char *Text);

// Allows user to set any specific logger
CMSAPI void              CMSEXPORT cmsSetLogErrorHandler(cmsLogErrorHandlerFunction Fn);
CMSAPI void              CMSEXPORT cmsSetLogErrorHandlerTHR(cmsContext ContextID, cmsLogErrorHandlerFunction Fn);

// Conversions --------------------------------------------------------------------------------------------------------------

// Returns pointers to constant structs
CMSAPI const cmsCIEXYZ*  CMSEXPORT cmsD50_XYZ(void);
CMSAPI const cmsCIExyY*  CMSEXPORT cmsD50_xyY(void);

// Colorimetric space conversions
CMSAPI void              CMSEXPORT cmsXYZ2xyY(cmsCIExyY* Dest, const cmsCIEXYZ* Source);
CMSAPI void              CMSEXPORT cmsxyY2XYZ(cmsCIEXYZ* Dest, const cmsCIExyY* Source);
CMSAPI void              CMSEXPORT cmsXYZ2Lab(const cmsCIEXYZ* WhitePoint, cmsCIELab* Lab, const cmsCIEXYZ* xyz);
CMSAPI void              CMSEXPORT cmsLab2XYZ(const cmsCIEXYZ* WhitePoint, cmsCIEXYZ* xyz, const cmsCIELab* Lab);
CMSAPI void              CMSEXPORT cmsLab2LCh(cmsCIELCh*LCh, const cmsCIELab* Lab);
CMSAPI void              CMSEXPORT cmsLCh2Lab(cmsCIELab* Lab, const cmsCIELCh* LCh);

// Encoding /Decoding on PCS
CMSAPI void              CMSEXPORT cmsLabEncoded2Float(cmsCIELab* Lab, const cmsUInt16Number wLab[3]);
CMSAPI void              CMSEXPORT cmsLabEncoded2FloatV2(cmsCIELab* Lab, const cmsUInt16Number wLab[3]);
CMSAPI void              CMSEXPORT cmsFloat2LabEncoded(cmsUInt16Number wLab[3], const cmsCIELab* Lab);
CMSAPI void              CMSEXPORT cmsFloat2LabEncodedV2(cmsUInt16Number wLab[3], const cmsCIELab* Lab);
CMSAPI void              CMSEXPORT cmsXYZEncoded2Float(cmsCIEXYZ* fxyz, const cmsUInt16Number XYZ[3]);
CMSAPI void              CMSEXPORT cmsFloat2XYZEncoded(cmsUInt16Number XYZ[3], const cmsCIEXYZ* fXYZ);

// DeltaE metrics
CMSAPI cmsFloat64Number  CMSEXPORT cmsDeltaE(const cmsCIELab* Lab1, const cmsCIELab* Lab2);
CMSAPI cmsFloat64Number  CMSEXPORT cmsCIE94DeltaE(const cmsCIELab* Lab1, const cmsCIELab* Lab2);
CMSAPI cmsFloat64Number  CMSEXPORT cmsBFDdeltaE(const cmsCIELab* Lab1, const cmsCIELab* Lab2);
CMSAPI cmsFloat64Number  CMSEXPORT cmsCMCdeltaE(const cmsCIELab* Lab1, const cmsCIELab* Lab2, cmsFloat64Number l, cmsFloat64Number c);
CMSAPI cmsFloat64Number  CMSEXPORT cmsCIE2000DeltaE(const cmsCIELab* Lab1, const cmsCIELab* Lab2, cmsFloat64Number Kl, cmsFloat64Number Kc, cmsFloat64Number Kh);

// Temperature <-> Chromaticity (Black body)
CMSAPI cmsBool           CMSEXPORT cmsWhitePointFromTemp(cmsCIExyY* WhitePoint, cmsFloat64Number  TempK);
CMSAPI cmsBool           CMSEXPORT cmsTempFromWhitePoint(cmsFloat64Number* TempK, const cmsCIExyY* WhitePoint);

// Chromatic adaptation
CMSAPI cmsBool           CMSEXPORT cmsAdaptToIlluminant(cmsCIEXYZ* Result, const cmsCIEXYZ* SourceWhitePt,
                                                                           const cmsCIEXYZ* Illuminant,
                                                                           const cmsCIEXYZ* Value);

// CIECAM02 ---------------------------------------------------------------------------------------------------

// Viewing conditions. Please note those are CAM model viewing conditions, and not the ICC tag viewing
// conditions, which I'm naming cmsICCViewingConditions to make differences evident. Unfortunately, the tag
// cannot deal with surround La, Yb and D value so is basically useless to store CAM02 viewing conditions.


#define AVG_SURROUND       1
#define DIM_SURROUND       2
#define DARK_SURROUND      3
#define CUTSHEET_SURROUND  4

#define D_CALCULATE        (-1)

typedef struct {
    cmsCIEXYZ        whitePoint;
    cmsFloat64Number Yb;
    cmsFloat64Number La;
    cmsUInt32Number  surround;
    cmsFloat64Number D_value;

    } cmsViewingConditions;

CMSAPI cmsHANDLE         CMSEXPORT cmsCIECAM02Init(cmsContext ContextID, const cmsViewingConditions* pVC);
CMSAPI void              CMSEXPORT cmsCIECAM02Done(cmsHANDLE hModel);
CMSAPI void              CMSEXPORT cmsCIECAM02Forward(cmsHANDLE hModel, const cmsCIEXYZ* pIn, cmsJCh* pOut);
CMSAPI void              CMSEXPORT cmsCIECAM02Reverse(cmsHANDLE hModel, const cmsJCh* pIn,    cmsCIEXYZ* pOut);


// Tone curves -----------------------------------------------------------------------------------------

// This describes a curve segment. For a table of supported types, see the manual. User can increase the number of
// available types by using a proper plug-in. Parametric segments allow 10 parameters at most

typedef struct {
    cmsFloat32Number   x0, x1;           // Domain; for x0 < x <= x1
    cmsInt32Number     Type;             // Parametric type, Type == 0 means sampled segment. Negative values are reserved
    cmsFloat64Number   Params[10];       // Parameters if Type != 0
    cmsUInt32Number    nGridPoints;      // Number of grid points if Type == 0
    cmsFloat32Number*  SampledPoints;    // Points to an array of floats if Type == 0

} cmsCurveSegment;

// The internal representation is none of your business.
typedef struct _cms_curve_struct cmsToneCurve;

CMSAPI cmsToneCurve*     CMSEXPORT cmsBuildSegmentedToneCurve(cmsContext ContextID, cmsUInt32Number nSegments, const cmsCurveSegment Segments[]);
CMSAPI cmsToneCurve*     CMSEXPORT cmsBuildParametricToneCurve(cmsContext ContextID, cmsInt32Number Type, const cmsFloat64Number Params[]);
CMSAPI cmsToneCurve*     CMSEXPORT cmsBuildGamma(cmsContext ContextID, cmsFloat64Number Gamma);
CMSAPI cmsToneCurve*     CMSEXPORT cmsBuildTabulatedToneCurve16(cmsContext ContextID, cmsUInt32Number nEntries, const cmsUInt16Number values[]);
CMSAPI cmsToneCurve*     CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cmsUInt32Number nEntries, const cmsFloat32Number values[]);
CMSAPI void              CMSEXPORT cmsFreeToneCurve(cmsToneCurve* Curve);
CMSAPI void              CMSEXPORT cmsFreeToneCurveTriple(cmsToneCurve* Curve[3]);
CMSAPI cmsToneCurve*     CMSEXPORT cmsDupToneCurve(const cmsToneCurve* Src);
CMSAPI cmsToneCurve*     CMSEXPORT cmsReverseToneCurve(const cmsToneCurve* InGamma);
CMSAPI cmsToneCurve*     CMSEXPORT cmsReverseToneCurveEx(cmsUInt32Number nResultSamples, const cmsToneCurve* InGamma);
CMSAPI cmsToneCurve*     CMSEXPORT cmsJoinToneCurve(cmsContext ContextID, const cmsToneCurve* X,  const cmsToneCurve* Y, cmsUInt32Number nPoints);
CMSAPI cmsBool           CMSEXPORT cmsSmoothToneCurve(cmsToneCurve* Tab, cmsFloat64Number lambda);
CMSAPI cmsFloat32Number  CMSEXPORT cmsEvalToneCurveFloat(const cmsToneCurve* Curve, cmsFloat32Number v);
CMSAPI cmsUInt16Number   CMSEXPORT cmsEvalToneCurve16(const cmsToneCurve* Curve, cmsUInt16Number v);
CMSAPI cmsBool           CMSEXPORT cmsIsToneCurveMultisegment(const cmsToneCurve* InGamma);
CMSAPI cmsBool           CMSEXPORT cmsIsToneCurveLinear(const cmsToneCurve* Curve);
CMSAPI cmsBool           CMSEXPORT cmsIsToneCurveMonotonic(const cmsToneCurve* t);
CMSAPI cmsBool           CMSEXPORT cmsIsToneCurveDescending(const cmsToneCurve* t);
CMSAPI cmsInt32Number    CMSEXPORT cmsGetToneCurveParametricType(const cmsToneCurve* t);
CMSAPI cmsFloat64Number  CMSEXPORT cmsEstimateGamma(const cmsToneCurve* t, cmsFloat64Number Precision);

// Tone curve tabular estimation
CMSAPI cmsUInt32Number         CMSEXPORT cmsGetToneCurveEstimatedTableEntries(const cmsToneCurve* t);
CMSAPI const cmsUInt16Number*  CMSEXPORT cmsGetToneCurveEstimatedTable(const cmsToneCurve* t);


// Implements pipelines of multi-processing elements -------------------------------------------------------------

// Nothing to see here, move along
typedef struct _cmsPipeline_struct cmsPipeline;
typedef struct _cmsStage_struct cmsStage;

// Those are hi-level pipelines
CMSAPI cmsPipeline*      CMSEXPORT cmsPipelineAlloc(cmsContext ContextID, cmsUInt32Number InputChannels, cmsUInt32Number OutputChannels);
CMSAPI void              CMSEXPORT cmsPipelineFree(cmsPipeline* lut);
CMSAPI cmsPipeline*      CMSEXPORT cmsPipelineDup(const cmsPipeline* Orig);

CMSAPI cmsContext        CMSEXPORT cmsGetPipelineContextID(const cmsPipeline* lut);
CMSAPI cmsUInt32Number   CMSEXPORT cmsPipelineInputChannels(const cmsPipeline* lut);
CMSAPI cmsUInt32Number   CMSEXPORT cmsPipelineOutputChannels(const cmsPipeline* lut);

CMSAPI cmsUInt32Number   CMSEXPORT cmsPipelineStageCount(const cmsPipeline* lut);
CMSAPI cmsStage*         CMSEXPORT cmsPipelineGetPtrToFirstStage(const cmsPipeline* lut);
CMSAPI cmsStage*         CMSEXPORT cmsPipelineGetPtrToLastStage(const cmsPipeline* lut);

CMSAPI void              CMSEXPORT cmsPipelineEval16(const cmsUInt16Number In[], cmsUInt16Number Out[], const cmsPipeline* lut);
CMSAPI void              CMSEXPORT cmsPipelineEvalFloat(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsPipeline* lut);
CMSAPI cmsBool           CMSEXPORT cmsPipelineEvalReverseFloat(cmsFloat32Number Target[], cmsFloat32Number Result[], cmsFloat32Number Hint[], const cmsPipeline* lut);
CMSAPI cmsBool           CMSEXPORT cmsPipelineCat(cmsPipeline* l1, const cmsPipeline* l2);
CMSAPI cmsBool           CMSEXPORT cmsPipelineSetSaveAs8bitsFlag(cmsPipeline* lut, cmsBool On);

// Where to place/locate the stages in the pipeline chain
typedef enum { cmsAT_BEGIN, cmsAT_END } cmsStageLoc;

CMSAPI cmsBool           CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe);
CMSAPI void              CMSEXPORT cmsPipelineUnlinkStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage** mpe);

// This function is quite useful to analyze the structure of a Pipeline and retrieve the Stage elements
// that conform the Pipeline. It should be called with the Pipeline, the number of expected elements and
// then a list of expected types followed with a list of double pointers to Stage elements. If
// the function founds a match with current pipeline, it fills the pointers and returns TRUE
// if not, returns FALSE without touching anything.
CMSAPI cmsBool           CMSEXPORT cmsPipelineCheckAndRetreiveStages(const cmsPipeline* Lut, cmsUInt32Number n, ...);

// Matrix has double precision and CLUT has only float precision. That is because an ICC profile can encode
// matrices with far more precision that CLUTS
CMSAPI cmsStage*         CMSEXPORT cmsStageAllocIdentity(cmsContext ContextID, cmsUInt32Number nChannels);
CMSAPI cmsStage*         CMSEXPORT cmsStageAllocToneCurves(cmsContext ContextID, cmsUInt32Number nChannels, cmsToneCurve* const Curves[]);
CMSAPI cmsStage*         CMSEXPORT cmsStageAllocMatrix(cmsContext ContextID, cmsUInt32Number Rows, cmsUInt32Number Cols, const cmsFloat64Number* Matrix, const cmsFloat64Number* Offset);

CMSAPI cmsStage*         CMSEXPORT cmsStageAllocCLut16bit(cmsContext ContextID, cmsUInt32Number nGridPoints, cmsUInt32Number inputChan, cmsUInt32Number outputChan, const cmsUInt16Number* Table);
CMSAPI cmsStage*         CMSEXPORT cmsStageAllocCLutFloat(cmsContext ContextID, cmsUInt32Number nGridPoints, cmsUInt32Number inputChan, cmsUInt32Number outputChan, const cmsFloat32Number* Table);

CMSAPI cmsStage*         CMSEXPORT cmsStageAllocCLut16bitGranular(cmsContext ContextID, const cmsUInt32Number clutPoints[], cmsUInt32Number inputChan, cmsUInt32Number outputChan, const cmsUInt16Number* Table);
CMSAPI cmsStage*         CMSEXPORT cmsStageAllocCLutFloatGranular(cmsContext ContextID, const cmsUInt32Number clutPoints[], cmsUInt32Number inputChan, cmsUInt32Number outputChan, const cmsFloat32Number* Table);

CMSAPI cmsStage*         CMSEXPORT cmsStageDup(cmsStage* mpe);
CMSAPI void              CMSEXPORT cmsStageFree(cmsStage* mpe);
CMSAPI cmsStage*         CMSEXPORT cmsStageNext(const cmsStage* mpe);

CMSAPI cmsUInt32Number   CMSEXPORT cmsStageInputChannels(const cmsStage* mpe);
CMSAPI cmsUInt32Number   CMSEXPORT cmsStageOutputChannels(const cmsStage* mpe);
CMSAPI cmsStageSignature CMSEXPORT cmsStageType(const cmsStage* mpe);
CMSAPI void*             CMSEXPORT cmsStageData(const cmsStage* mpe);

// Sampling
typedef cmsInt32Number (* cmsSAMPLER16)   (register const cmsUInt16Number In[],
                                            register cmsUInt16Number Out[],
                                            register void * Cargo);

typedef cmsInt32Number (* cmsSAMPLERFLOAT)(register const cmsFloat32Number In[],
                                            register cmsFloat32Number Out[],
                                            register void * Cargo);

// Use this flag to prevent changes being written to destination
#define SAMPLER_INSPECT     0x01000000

// For CLUT only
CMSAPI cmsBool           CMSEXPORT cmsStageSampleCLut16bit(cmsStage* mpe,    cmsSAMPLER16 Sampler, void* Cargo, cmsUInt32Number dwFlags);
CMSAPI cmsBool           CMSEXPORT cmsStageSampleCLutFloat(cmsStage* mpe, cmsSAMPLERFLOAT Sampler, void* Cargo, cmsUInt32Number dwFlags);

// Slicers
CMSAPI cmsBool           CMSEXPORT cmsSliceSpace16(cmsUInt32Number nInputs, const cmsUInt32Number clutPoints[],
                                                   cmsSAMPLER16 Sampler, void * Cargo);

CMSAPI cmsBool           CMSEXPORT cmsSliceSpaceFloat(cmsUInt32Number nInputs, const cmsUInt32Number clutPoints[],
                                                   cmsSAMPLERFLOAT Sampler, void * Cargo);

// Multilocalized Unicode management ---------------------------------------------------------------------------------------

typedef struct _cms_MLU_struct cmsMLU;

#define  cmsNoLanguage "\0\0"
#define  cmsNoCountry  "\0\0"

CMSAPI cmsMLU*           CMSEXPORT cmsMLUalloc(cmsContext ContextID, cmsUInt32Number nItems);
CMSAPI void              CMSEXPORT cmsMLUfree(cmsMLU* mlu);
CMSAPI cmsMLU*           CMSEXPORT cmsMLUdup(const cmsMLU* mlu);

CMSAPI cmsBool           CMSEXPORT cmsMLUsetASCII(cmsMLU* mlu,
                                                  const char LanguageCode[3], const char CountryCode[3],
                                                  const char* ASCIIString);
CMSAPI cmsBool           CMSEXPORT cmsMLUsetWide(cmsMLU* mlu,
                                                  const char LanguageCode[3], const char CountryCode[3],
                                                  const wchar_t* WideString);

CMSAPI cmsUInt32Number   CMSEXPORT cmsMLUgetASCII(const cmsMLU* mlu,
                                                  const char LanguageCode[3], const char CountryCode[3],
                                                  char* Buffer,    cmsUInt32Number BufferSize);

CMSAPI cmsUInt32Number   CMSEXPORT cmsMLUgetWide(const cmsMLU* mlu,
                                                 const char LanguageCode[3], const char CountryCode[3],
                                                 wchar_t* Buffer, cmsUInt32Number BufferSize);

CMSAPI cmsBool           CMSEXPORT cmsMLUgetTranslation(const cmsMLU* mlu,
                                                         const char LanguageCode[3], const char CountryCode[3],
                                                         char ObtainedLanguage[3], char ObtainedCountry[3]);

CMSAPI cmsUInt32Number   CMSEXPORT cmsMLUtranslationsCount(const cmsMLU* mlu);

CMSAPI cmsBool           CMSEXPORT cmsMLUtranslationsCodes(const cmsMLU* mlu,
                                                             cmsUInt32Number idx,
                                                             char LanguageCode[3],
                                                             char CountryCode[3]);
 
// Undercolorremoval & black generation -------------------------------------------------------------------------------------

typedef struct {
        cmsToneCurve* Ucr;
        cmsToneCurve* Bg;
        cmsMLU*       Desc;

} cmsUcrBg;

// Screening ----------------------------------------------------------------------------------------------------------------

#define cmsPRINTER_DEFAULT_SCREENS     0x0001
#define cmsFREQUENCE_UNITS_LINES_CM    0x0000
#define cmsFREQUENCE_UNITS_LINES_INCH  0x0002

#define cmsSPOT_UNKNOWN         0
#define cmsSPOT_PRINTER_DEFAULT 1
#define cmsSPOT_ROUND           2
#define cmsSPOT_DIAMOND         3
#define cmsSPOT_ELLIPSE         4
#define cmsSPOT_LINE            5
#define cmsSPOT_SQUARE          6
#define cmsSPOT_CROSS           7

typedef struct {
    cmsFloat64Number  Frequency;
    cmsFloat64Number  ScreenAngle;
    cmsUInt32Number   SpotShape;

} cmsScreeningChannel;

typedef struct {
    cmsUInt32Number Flag;
    cmsUInt32Number nChannels;
    cmsScreeningChannel Channels[cmsMAXCHANNELS];

} cmsScreening;


// Named color -----------------------------------------------------------------------------------------------------------------

typedef struct _cms_NAMEDCOLORLIST_struct cmsNAMEDCOLORLIST;

CMSAPI cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID,
                                                           cmsUInt32Number n,
                                                           cmsUInt32Number ColorantCount,
                                                           const char* Prefix, const char* Suffix);

CMSAPI void               CMSEXPORT cmsFreeNamedColorList(cmsNAMEDCOLORLIST* v);
CMSAPI cmsNAMEDCOLORLIST* CMSEXPORT cmsDupNamedColorList(const cmsNAMEDCOLORLIST* v);
CMSAPI cmsBool            CMSEXPORT cmsAppendNamedColor(cmsNAMEDCOLORLIST* v, const char* Name,
                                                            cmsUInt16Number PCS[3],
                                                            cmsUInt16Number Colorant[cmsMAXCHANNELS]);

CMSAPI cmsUInt32Number    CMSEXPORT cmsNamedColorCount(const cmsNAMEDCOLORLIST* v);
CMSAPI cmsInt32Number     CMSEXPORT cmsNamedColorIndex(const cmsNAMEDCOLORLIST* v, const char* Name);

CMSAPI cmsBool            CMSEXPORT cmsNamedColorInfo(const cmsNAMEDCOLORLIST* NamedColorList, cmsUInt32Number nColor,
                                                      char* Name,
                                                      char* Prefix,
                                                      char* Suffix,
                                                      cmsUInt16Number* PCS,
                                                      cmsUInt16Number* Colorant);

// Retrieve named color list from transform
CMSAPI cmsNAMEDCOLORLIST* CMSEXPORT cmsGetNamedColorList(cmsHTRANSFORM xform);

// Profile sequence -----------------------------------------------------------------------------------------------------

// Profile sequence descriptor. Some fields come from profile sequence descriptor tag, others
// come from Profile Sequence Identifier Tag
typedef struct {

    cmsSignature           deviceMfg;
    cmsSignature           deviceModel;
    cmsUInt64Number        attributes;
    cmsTechnologySignature technology;
    cmsProfileID           ProfileID;
    cmsMLU*                Manufacturer;
    cmsMLU*                Model;
    cmsMLU*                Description;

} cmsPSEQDESC;

typedef struct {

    cmsUInt32Number n;
    cmsContext      ContextID;
    cmsPSEQDESC*    seq;

} cmsSEQ;

CMSAPI cmsSEQ*           CMSEXPORT cmsAllocProfileSequenceDescription(cmsContext ContextID, cmsUInt32Number n);
CMSAPI cmsSEQ*           CMSEXPORT cmsDupProfileSequenceDescription(const cmsSEQ* pseq);
CMSAPI void              CMSEXPORT cmsFreeProfileSequenceDescription(cmsSEQ* pseq);

// Dictionaries --------------------------------------------------------------------------------------------------------

typedef struct _cmsDICTentry_struct {

    struct _cmsDICTentry_struct* Next;

    cmsMLU *DisplayName;
    cmsMLU *DisplayValue;
    wchar_t* Name;
    wchar_t* Value;

} cmsDICTentry;

CMSAPI cmsHANDLE           CMSEXPORT cmsDictAlloc(cmsContext ContextID);
CMSAPI void                CMSEXPORT cmsDictFree(cmsHANDLE hDict);
CMSAPI cmsHANDLE           CMSEXPORT cmsDictDup(cmsHANDLE hDict);

CMSAPI cmsBool             CMSEXPORT cmsDictAddEntry(cmsHANDLE hDict, const wchar_t* Name, const wchar_t* Value, const cmsMLU *DisplayName, const cmsMLU *DisplayValue);
CMSAPI const cmsDICTentry* CMSEXPORT cmsDictGetEntryList(cmsHANDLE hDict);
CMSAPI const cmsDICTentry* CMSEXPORT cmsDictNextEntry(const cmsDICTentry* e);

// Access to Profile data ----------------------------------------------------------------------------------------------
CMSAPI cmsHPROFILE       CMSEXPORT cmsCreateProfilePlaceholder(cmsContext ContextID);

CMSAPI cmsContext        CMSEXPORT cmsGetProfileContextID(cmsHPROFILE hProfile);
CMSAPI cmsInt32Number    CMSEXPORT cmsGetTagCount(cmsHPROFILE hProfile);
CMSAPI cmsTagSignature   CMSEXPORT cmsGetTagSignature(cmsHPROFILE hProfile, cmsUInt32Number n);
CMSAPI cmsBool           CMSEXPORT cmsIsTag(cmsHPROFILE hProfile, cmsTagSignature sig);

// Read and write pre-formatted data
CMSAPI void*             CMSEXPORT cmsReadTag(cmsHPROFILE hProfile, cmsTagSignature sig);
CMSAPI cmsBool           CMSEXPORT cmsWriteTag(cmsHPROFILE hProfile, cmsTagSignature sig, const void* data);
CMSAPI cmsBool           CMSEXPORT cmsLinkTag(cmsHPROFILE hProfile, cmsTagSignature sig, cmsTagSignature dest);
CMSAPI cmsTagSignature   CMSEXPORT cmsTagLinkedTo(cmsHPROFILE hProfile, cmsTagSignature sig);

// Read and write raw data
CMSAPI cmsUInt32Number   CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature sig, void* Buffer, cmsUInt32Number BufferSize);
CMSAPI cmsBool           CMSEXPORT cmsWriteRawTag(cmsHPROFILE hProfile, cmsTagSignature sig, const void* data, cmsUInt32Number Size);

// Access header data
#define cmsEmbeddedProfileFalse    0x00000000
#define cmsEmbeddedProfileTrue     0x00000001
#define cmsUseAnywhere             0x00000000
#define cmsUseWithEmbeddedDataOnly 0x00000002

CMSAPI cmsUInt32Number   CMSEXPORT cmsGetHeaderFlags(cmsHPROFILE hProfile);
CMSAPI void              CMSEXPORT cmsGetHeaderAttributes(cmsHPROFILE hProfile, cmsUInt64Number* Flags);
CMSAPI void              CMSEXPORT cmsGetHeaderProfileID(cmsHPROFILE hProfile, cmsUInt8Number* ProfileID);
CMSAPI cmsBool           CMSEXPORT cmsGetHeaderCreationDateTime(cmsHPROFILE hProfile, struct tm *Dest);
CMSAPI cmsUInt32Number   CMSEXPORT cmsGetHeaderRenderingIntent(cmsHPROFILE hProfile);

CMSAPI void              CMSEXPORT cmsSetHeaderFlags(cmsHPROFILE hProfile, cmsUInt32Number Flags);
CMSAPI cmsUInt32Number   CMSEXPORT cmsGetHeaderManufacturer(cmsHPROFILE hProfile);
CMSAPI void              CMSEXPORT cmsSetHeaderManufacturer(cmsHPROFILE hProfile, cmsUInt32Number manufacturer);
CMSAPI cmsUInt32Number   CMSEXPORT cmsGetHeaderCreator(cmsHPROFILE hProfile);
CMSAPI cmsUInt32Number   CMSEXPORT cmsGetHeaderModel(cmsHPROFILE hProfile);
CMSAPI void              CMSEXPORT cmsSetHeaderModel(cmsHPROFILE hProfile, cmsUInt32Number model);
CMSAPI void              CMSEXPORT cmsSetHeaderAttributes(cmsHPROFILE hProfile, cmsUInt64Number Flags);
CMSAPI void              CMSEXPORT cmsSetHeaderProfileID(cmsHPROFILE hProfile, cmsUInt8Number* ProfileID);
CMSAPI void              CMSEXPORT cmsSetHeaderRenderingIntent(cmsHPROFILE hProfile, cmsUInt32Number RenderingIntent);

CMSAPI cmsColorSpaceSignature
                         CMSEXPORT cmsGetPCS(cmsHPROFILE hProfile);
CMSAPI void              CMSEXPORT cmsSetPCS(cmsHPROFILE hProfile, cmsColorSpaceSignature pcs);
CMSAPI cmsColorSpaceSignature
                         CMSEXPORT cmsGetColorSpace(cmsHPROFILE hProfile);
CMSAPI void              CMSEXPORT cmsSetColorSpace(cmsHPROFILE hProfile, cmsColorSpaceSignature sig);
CMSAPI cmsProfileClassSignature
                         CMSEXPORT cmsGetDeviceClass(cmsHPROFILE hProfile);
CMSAPI void              CMSEXPORT cmsSetDeviceClass(cmsHPROFILE hProfile, cmsProfileClassSignature sig);
CMSAPI void              CMSEXPORT cmsSetProfileVersion(cmsHPROFILE hProfile, cmsFloat64Number Version);
CMSAPI cmsFloat64Number  CMSEXPORT cmsGetProfileVersion(cmsHPROFILE hProfile);

CMSAPI cmsUInt32Number   CMSEXPORT cmsGetEncodedICCversion(cmsHPROFILE hProfile);
CMSAPI void              CMSEXPORT cmsSetEncodedICCversion(cmsHPROFILE hProfile, cmsUInt32Number Version);

// How profiles may be used
#define LCMS_USED_AS_INPUT      0
#define LCMS_USED_AS_OUTPUT     1
#define LCMS_USED_AS_PROOF      2

CMSAPI cmsBool           CMSEXPORT cmsIsIntentSupported(cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number UsedDirection);
CMSAPI cmsBool           CMSEXPORT cmsIsMatrixShaper(cmsHPROFILE hProfile);
CMSAPI cmsBool           CMSEXPORT cmsIsCLUT(cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number UsedDirection);

// Translate form/to our notation to ICC
CMSAPI cmsColorSpaceSignature   CMSEXPORT _cmsICCcolorSpace(int OurNotation);
CMSAPI int                      CMSEXPORT _cmsLCMScolorSpace(cmsColorSpaceSignature ProfileSpace);

CMSAPI cmsUInt32Number   CMSEXPORT cmsChannelsOf(cmsColorSpaceSignature ColorSpace);

// Build a suitable formatter for the colorspace of this profile. nBytes=1 means 8 bits, nBytes=2 means 16 bits. 
CMSAPI cmsUInt32Number   CMSEXPORT cmsFormatterForColorspaceOfProfile(cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat);
CMSAPI cmsUInt32Number   CMSEXPORT cmsFormatterForPCSOfProfile(cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat);


// Localized info
typedef enum {
             cmsInfoDescription  = 0,
             cmsInfoManufacturer = 1,
             cmsInfoModel        = 2,
             cmsInfoCopyright    = 3
} cmsInfoType;

CMSAPI cmsUInt32Number   CMSEXPORT cmsGetProfileInfo(cmsHPROFILE hProfile, cmsInfoType Info,
                                                            const char LanguageCode[3], const char CountryCode[3],
                                                            wchar_t* Buffer, cmsUInt32Number BufferSize);

CMSAPI cmsUInt32Number   CMSEXPORT cmsGetProfileInfoASCII(cmsHPROFILE hProfile, cmsInfoType Info,
                                                            const char LanguageCode[3], const char CountryCode[3],
                                                            char* Buffer, cmsUInt32Number BufferSize);

// IO handlers ----------------------------------------------------------------------------------------------------------

typedef struct _cms_io_handler cmsIOHANDLER;

CMSAPI cmsIOHANDLER*     CMSEXPORT cmsOpenIOhandlerFromFile(cmsContext ContextID, const char* FileName, const char* AccessMode);
CMSAPI cmsIOHANDLER*     CMSEXPORT cmsOpenIOhandlerFromStream(cmsContext ContextID, FILE* Stream);
CMSAPI cmsIOHANDLER*     CMSEXPORT cmsOpenIOhandlerFromMem(cmsContext ContextID, void *Buffer, cmsUInt32Number size, const char* AccessMode);
CMSAPI cmsIOHANDLER*     CMSEXPORT cmsOpenIOhandlerFromNULL(cmsContext ContextID);
CMSAPI cmsIOHANDLER*     CMSEXPORT cmsGetProfileIOhandler(cmsHPROFILE hProfile);
CMSAPI cmsBool           CMSEXPORT cmsCloseIOhandler(cmsIOHANDLER* io);

// MD5 message digest --------------------------------------------------------------------------------------------------

CMSAPI cmsBool           CMSEXPORT cmsMD5computeID(cmsHPROFILE hProfile);

// Profile high level functions ------------------------------------------------------------------------------------------

CMSAPI cmsHPROFILE      CMSEXPORT cmsOpenProfileFromFile(const char *ICCProfile, const char *sAccess);
CMSAPI cmsHPROFILE      CMSEXPORT cmsOpenProfileFromFileTHR(cmsContext ContextID, const char *ICCProfile, const char *sAccess);
CMSAPI cmsHPROFILE      CMSEXPORT cmsOpenProfileFromStream(FILE* ICCProfile, const char* sAccess);
CMSAPI cmsHPROFILE      CMSEXPORT cmsOpenProfileFromStreamTHR(cmsContext ContextID, FILE* ICCProfile, const char* sAccess);
CMSAPI cmsHPROFILE      CMSEXPORT cmsOpenProfileFromMem(const void * MemPtr, cmsUInt32Number dwSize);
CMSAPI cmsHPROFILE      CMSEXPORT cmsOpenProfileFromMemTHR(cmsContext ContextID, const void * MemPtr, cmsUInt32Number dwSize);
CMSAPI cmsHPROFILE      CMSEXPORT cmsOpenProfileFromIOhandlerTHR(cmsContext ContextID, cmsIOHANDLER* io);
CMSAPI cmsHPROFILE      CMSEXPORT cmsOpenProfileFromIOhandler2THR(cmsContext ContextID, cmsIOHANDLER* io, cmsBool write);
CMSAPI cmsBool          CMSEXPORT cmsCloseProfile(cmsHPROFILE hProfile);

CMSAPI cmsBool          CMSEXPORT cmsSaveProfileToFile(cmsHPROFILE hProfile, const char* FileName);
CMSAPI cmsBool          CMSEXPORT cmsSaveProfileToStream(cmsHPROFILE hProfile, FILE* Stream);
CMSAPI cmsBool          CMSEXPORT cmsSaveProfileToMem(cmsHPROFILE hProfile, void *MemPtr, cmsUInt32Number* BytesNeeded);
CMSAPI cmsUInt32Number  CMSEXPORT cmsSaveProfileToIOhandler(cmsHPROFILE hProfile, cmsIOHANDLER* io);

// Predefined virtual profiles ------------------------------------------------------------------------------------------

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateRGBProfileTHR(cmsContext ContextID,
                                                   const cmsCIExyY* WhitePoint,
                                                   const cmsCIExyYTRIPLE* Primaries,
                                                   cmsToneCurve* const TransferFunction[3]);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateRGBProfile(const cmsCIExyY* WhitePoint,
                                                   const cmsCIExyYTRIPLE* Primaries,
                                                   cmsToneCurve* const TransferFunction[3]);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateGrayProfileTHR(cmsContext ContextID,
                                                    const cmsCIExyY* WhitePoint,
                                                    const cmsToneCurve* TransferFunction);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateGrayProfile(const cmsCIExyY* WhitePoint,
                                                    const cmsToneCurve* TransferFunction);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateLinearizationDeviceLinkTHR(cmsContext ContextID,
                                                                cmsColorSpaceSignature ColorSpace,
                                                                cmsToneCurve* const TransferFunctions[]);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateLinearizationDeviceLink(cmsColorSpaceSignature ColorSpace,
                                                                cmsToneCurve* const TransferFunctions[]);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateInkLimitingDeviceLinkTHR(cmsContext ContextID,
                                                              cmsColorSpaceSignature ColorSpace, cmsFloat64Number Limit);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateInkLimitingDeviceLink(cmsColorSpaceSignature ColorSpace, cmsFloat64Number Limit);


CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateLab2ProfileTHR(cmsContext ContextID, const cmsCIExyY* WhitePoint);
CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateLab2Profile(const cmsCIExyY* WhitePoint);
CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateLab4ProfileTHR(cmsContext ContextID, const cmsCIExyY* WhitePoint);
CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateLab4Profile(const cmsCIExyY* WhitePoint);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateXYZProfileTHR(cmsContext ContextID);
CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateXYZProfile(void);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreate_sRGBProfileTHR(cmsContext ContextID);
CMSAPI cmsHPROFILE      CMSEXPORT cmsCreate_sRGBProfile(void);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateBCHSWabstractProfileTHR(cmsContext ContextID,
                                                             cmsUInt32Number nLUTPoints,
                                                             cmsFloat64Number Bright,
                                                             cmsFloat64Number Contrast,
                                                             cmsFloat64Number Hue,
                                                             cmsFloat64Number Saturation,
                                                             cmsUInt32Number TempSrc,
                                                             cmsUInt32Number TempDest);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateBCHSWabstractProfile(cmsUInt32Number nLUTPoints,
                                                             cmsFloat64Number Bright,
                                                             cmsFloat64Number Contrast,
                                                             cmsFloat64Number Hue,
                                                             cmsFloat64Number Saturation,
                                                             cmsUInt32Number TempSrc,
                                                             cmsUInt32Number TempDest);

CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateNULLProfileTHR(cmsContext ContextID);
CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateNULLProfile(void);

// Converts a transform to a devicelink profile
CMSAPI cmsHPROFILE      CMSEXPORT cmsTransform2DeviceLink(cmsHTRANSFORM hTransform, cmsFloat64Number Version, cmsUInt32Number dwFlags);

// Intents ----------------------------------------------------------------------------------------------

// ICC Intents
#define INTENT_PERCEPTUAL                              0
#define INTENT_RELATIVE_COLORIMETRIC                   1
#define INTENT_SATURATION                              2
#define INTENT_ABSOLUTE_COLORIMETRIC                   3

// Non-ICC intents
#define INTENT_PRESERVE_K_ONLY_PERCEPTUAL             10
#define INTENT_PRESERVE_K_ONLY_RELATIVE_COLORIMETRIC  11
#define INTENT_PRESERVE_K_ONLY_SATURATION             12
#define INTENT_PRESERVE_K_PLANE_PERCEPTUAL            13
#define INTENT_PRESERVE_K_PLANE_RELATIVE_COLORIMETRIC 14
#define INTENT_PRESERVE_K_PLANE_SATURATION            15

// Call with NULL as parameters to get the intent count
CMSAPI cmsUInt32Number  CMSEXPORT cmsGetSupportedIntents(cmsUInt32Number nMax, cmsUInt32Number* Codes, char** Descriptions);
CMSAPI cmsUInt32Number  CMSEXPORT cmsGetSupportedIntentsTHR(cmsContext ContextID, cmsUInt32Number nMax, cmsUInt32Number* Codes, char** Descriptions);

// Flags

#define cmsFLAGS_NOCACHE                  0x0040    // Inhibit 1-pixel cache
#define cmsFLAGS_NOOPTIMIZE               0x0100    // Inhibit optimizations
#define cmsFLAGS_NULLTRANSFORM            0x0200    // Don't transform anyway

// Proofing flags
#define cmsFLAGS_GAMUTCHECK               0x1000    // Out of Gamut alarm
#define cmsFLAGS_SOFTPROOFING             0x4000    // Do softproofing

// Misc
#define cmsFLAGS_BLACKPOINTCOMPENSATION   0x2000
#define cmsFLAGS_NOWHITEONWHITEFIXUP      0x0004    // Don't fix scum dot
#define cmsFLAGS_HIGHRESPRECALC           0x0400    // Use more memory to give better accurancy
#define cmsFLAGS_LOWRESPRECALC            0x0800    // Use less memory to minimize resources

// For devicelink creation
#define cmsFLAGS_8BITS_DEVICELINK         0x0008   // Create 8 bits devicelinks
#define cmsFLAGS_GUESSDEVICECLASS         0x0020   // Guess device class (for transform2devicelink)
#define cmsFLAGS_KEEP_SEQUENCE            0x0080   // Keep profile sequence for devicelink creation

// Specific to a particular optimizations
#define cmsFLAGS_FORCE_CLUT               0x0002    // Force CLUT optimization
#define cmsFLAGS_CLUT_POST_LINEARIZATION  0x0001    // create postlinearization tables if possible
#define cmsFLAGS_CLUT_PRE_LINEARIZATION   0x0010    // create prelinearization tables if possible

// Specific to unbounded mode
#define cmsFLAGS_NONEGATIVES              0x8000    // Prevent negative numbers in floating point transforms

// Copy alpha channels when transforming           
#define cmsFLAGS_COPY_ALPHA               0x04000000 // Alpha channels are copied on cmsDoTransform()

// Fine-tune control over number of gridpoints
#define cmsFLAGS_GRIDPOINTS(n)           (((n) & 0xFF) << 16)

// CRD special
#define cmsFLAGS_NODEFAULTRESOURCEDEF     0x01000000

// Transforms ---------------------------------------------------------------------------------------------------

CMSAPI cmsHTRANSFORM    CMSEXPORT cmsCreateTransformTHR(cmsContext ContextID,
                                                  cmsHPROFILE Input,
                                                  cmsUInt32Number InputFormat,
                                                  cmsHPROFILE Output,
                                                  cmsUInt32Number OutputFormat,
                                                  cmsUInt32Number Intent,
                                                  cmsUInt32Number dwFlags);

CMSAPI cmsHTRANSFORM    CMSEXPORT cmsCreateTransform(cmsHPROFILE Input,
                                                  cmsUInt32Number InputFormat,
                                                  cmsHPROFILE Output,
                                                  cmsUInt32Number OutputFormat,
                                                  cmsUInt32Number Intent,
                                                  cmsUInt32Number dwFlags);

CMSAPI cmsHTRANSFORM    CMSEXPORT cmsCreateProofingTransformTHR(cmsContext ContextID,
                                                  cmsHPROFILE Input,
                                                  cmsUInt32Number InputFormat,
                                                  cmsHPROFILE Output,
                                                  cmsUInt32Number OutputFormat,
                                                  cmsHPROFILE Proofing,
                                                  cmsUInt32Number Intent,
                                                  cmsUInt32Number ProofingIntent,
                                                  cmsUInt32Number dwFlags);

CMSAPI cmsHTRANSFORM    CMSEXPORT cmsCreateProofingTransform(cmsHPROFILE Input,
                                                  cmsUInt32Number InputFormat,
                                                  cmsHPROFILE Output,
                                                  cmsUInt32Number OutputFormat,
                                                  cmsHPROFILE Proofing,
                                                  cmsUInt32Number Intent,
                                                  cmsUInt32Number ProofingIntent,
                                                  cmsUInt32Number dwFlags);

CMSAPI cmsHTRANSFORM    CMSEXPORT cmsCreateMultiprofileTransformTHR(cmsContext ContextID,
                                                  cmsHPROFILE hProfiles[],
                                                  cmsUInt32Number nProfiles,
                                                  cmsUInt32Number InputFormat,
                                                  cmsUInt32Number OutputFormat,
                                                  cmsUInt32Number Intent,
                                                  cmsUInt32Number dwFlags);


CMSAPI cmsHTRANSFORM    CMSEXPORT cmsCreateMultiprofileTransform(cmsHPROFILE hProfiles[],
                                                  cmsUInt32Number nProfiles,
                                                  cmsUInt32Number InputFormat,
                                                  cmsUInt32Number OutputFormat,
                                                  cmsUInt32Number Intent,
                                                  cmsUInt32Number dwFlags);


CMSAPI cmsHTRANSFORM    CMSEXPORT cmsCreateExtendedTransform(cmsContext ContextID,
                                                   cmsUInt32Number nProfiles, cmsHPROFILE hProfiles[],
                                                   cmsBool  BPC[],
                                                   cmsUInt32Number Intents[],
                                                   cmsFloat64Number AdaptationStates[],
                                                   cmsHPROFILE hGamutProfile,
                                                   cmsUInt32Number nGamutPCSposition,
                                                   cmsUInt32Number InputFormat,
                                                   cmsUInt32Number OutputFormat,
                                                   cmsUInt32Number dwFlags);

CMSAPI void             CMSEXPORT cmsDeleteTransform(cmsHTRANSFORM hTransform);

CMSAPI void             CMSEXPORT cmsDoTransform(cmsHTRANSFORM Transform,
                                                 const void * InputBuffer,
                                                 void * OutputBuffer,
                                                 cmsUInt32Number Size);

CMSAPI void             CMSEXPORT cmsDoTransformStride(cmsHTRANSFORM Transform,   // Deprecated
                                                 const void * InputBuffer,
                                                 void * OutputBuffer,
                                                 cmsUInt32Number Size,
                                                 cmsUInt32Number Stride);

CMSAPI void             CMSEXPORT cmsDoTransformLineStride(cmsHTRANSFORM  Transform,
                                                 const void* InputBuffer,
                                                 void* OutputBuffer,
                                                 cmsUInt32Number PixelsPerLine,
                                                 cmsUInt32Number LineCount,
                                                 cmsUInt32Number BytesPerLineIn,
                                                 cmsUInt32Number BytesPerLineOut,
                                                 cmsUInt32Number BytesPerPlaneIn,
                                                 cmsUInt32Number BytesPerPlaneOut);


CMSAPI void             CMSEXPORT cmsSetAlarmCodes(const cmsUInt16Number NewAlarm[cmsMAXCHANNELS]);
CMSAPI void             CMSEXPORT cmsGetAlarmCodes(cmsUInt16Number NewAlarm[cmsMAXCHANNELS]);


CMSAPI void             CMSEXPORT cmsSetAlarmCodesTHR(cmsContext ContextID, 
                                                          const cmsUInt16Number AlarmCodes[cmsMAXCHANNELS]);
CMSAPI void             CMSEXPORT cmsGetAlarmCodesTHR(cmsContext ContextID, 
                                                          cmsUInt16Number AlarmCodes[cmsMAXCHANNELS]);



// Adaptation state for absolute colorimetric intent
CMSAPI cmsFloat64Number CMSEXPORT cmsSetAdaptationState(cmsFloat64Number d);
CMSAPI cmsFloat64Number CMSEXPORT cmsSetAdaptationStateTHR(cmsContext ContextID, cmsFloat64Number d);



// Grab the ContextID from an open transform. Returns NULL if a NULL transform is passed
CMSAPI cmsContext       CMSEXPORT cmsGetTransformContextID(cmsHTRANSFORM hTransform);

// Grab the input/output formats
CMSAPI cmsUInt32Number CMSEXPORT cmsGetTransformInputFormat(cmsHTRANSFORM hTransform);
CMSAPI cmsUInt32Number CMSEXPORT cmsGetTransformOutputFormat(cmsHTRANSFORM hTransform);

// For backwards compatibility
CMSAPI cmsBool          CMSEXPORT cmsChangeBuffersFormat(cmsHTRANSFORM hTransform,
                                                         cmsUInt32Number InputFormat,
                                                         cmsUInt32Number OutputFormat);



// PostScript ColorRenderingDictionary and ColorSpaceArray ----------------------------------------------------

typedef enum { cmsPS_RESOURCE_CSA, cmsPS_RESOURCE_CRD } cmsPSResourceType;

// lcms2 unified method to access postscript color resources
CMSAPI cmsUInt32Number  CMSEXPORT cmsGetPostScriptColorResource(cmsContext ContextID,
                                                                cmsPSResourceType Type,
                                                                cmsHPROFILE hProfile,
                                                                cmsUInt32Number Intent,
                                                                cmsUInt32Number dwFlags,
                                                                cmsIOHANDLER* io);

CMSAPI cmsUInt32Number  CMSEXPORT cmsGetPostScriptCSA(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags, void* Buffer, cmsUInt32Number dwBufferLen);
CMSAPI cmsUInt32Number  CMSEXPORT cmsGetPostScriptCRD(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags, void* Buffer, cmsUInt32Number dwBufferLen);


// IT8.7 / CGATS.17-200x handling -----------------------------------------------------------------------------

CMSAPI cmsHANDLE        CMSEXPORT cmsIT8Alloc(cmsContext ContextID);
CMSAPI void             CMSEXPORT cmsIT8Free(cmsHANDLE hIT8);

// Tables
CMSAPI cmsUInt32Number  CMSEXPORT cmsIT8TableCount(cmsHANDLE hIT8);
CMSAPI cmsInt32Number   CMSEXPORT cmsIT8SetTable(cmsHANDLE hIT8, cmsUInt32Number nTable);

// Persistence
CMSAPI cmsHANDLE        CMSEXPORT cmsIT8LoadFromFile(cmsContext ContextID, const char* cFileName);
CMSAPI cmsHANDLE        CMSEXPORT cmsIT8LoadFromMem(cmsContext ContextID, const void *Ptr, cmsUInt32Number len);
// CMSAPI cmsHANDLE        CMSEXPORT cmsIT8LoadFromIOhandler(cmsContext ContextID, cmsIOHANDLER* io);

CMSAPI cmsBool          CMSEXPORT cmsIT8SaveToFile(cmsHANDLE hIT8, const char* cFileName);
CMSAPI cmsBool          CMSEXPORT cmsIT8SaveToMem(cmsHANDLE hIT8, void *MemPtr, cmsUInt32Number* BytesNeeded);

// Properties
CMSAPI const char*      CMSEXPORT cmsIT8GetSheetType(cmsHANDLE hIT8);
CMSAPI cmsBool          CMSEXPORT cmsIT8SetSheetType(cmsHANDLE hIT8, const char* Type);

CMSAPI cmsBool          CMSEXPORT cmsIT8SetComment(cmsHANDLE hIT8, const char* cComment);

CMSAPI cmsBool          CMSEXPORT cmsIT8SetPropertyStr(cmsHANDLE hIT8, const char* cProp, const char *Str);
CMSAPI cmsBool          CMSEXPORT cmsIT8SetPropertyDbl(cmsHANDLE hIT8, const char* cProp, cmsFloat64Number Val);
CMSAPI cmsBool          CMSEXPORT cmsIT8SetPropertyHex(cmsHANDLE hIT8, const char* cProp, cmsUInt32Number Val);
CMSAPI cmsBool          CMSEXPORT cmsIT8SetPropertyMulti(cmsHANDLE hIT8, const char* Key, const char* SubKey, const char *Buffer);
CMSAPI cmsBool          CMSEXPORT cmsIT8SetPropertyUncooked(cmsHANDLE hIT8, const char* Key, const char* Buffer);


CMSAPI const char*      CMSEXPORT cmsIT8GetProperty(cmsHANDLE hIT8, const char* cProp);
CMSAPI cmsFloat64Number CMSEXPORT cmsIT8GetPropertyDbl(cmsHANDLE hIT8, const char* cProp);
CMSAPI const char*      CMSEXPORT cmsIT8GetPropertyMulti(cmsHANDLE hIT8, const char* Key, const char *SubKey);
CMSAPI cmsUInt32Number  CMSEXPORT cmsIT8EnumProperties(cmsHANDLE hIT8, char ***PropertyNames);
CMSAPI cmsUInt32Number  CMSEXPORT cmsIT8EnumPropertyMulti(cmsHANDLE hIT8, const char* cProp, const char ***SubpropertyNames);

// Datasets
CMSAPI const char*      CMSEXPORT cmsIT8GetDataRowCol(cmsHANDLE hIT8, int row, int col);
CMSAPI cmsFloat64Number CMSEXPORT cmsIT8GetDataRowColDbl(cmsHANDLE hIT8, int row, int col);

CMSAPI cmsBool          CMSEXPORT cmsIT8SetDataRowCol(cmsHANDLE hIT8, int row, int col,
                                                const char* Val);

CMSAPI cmsBool          CMSEXPORT cmsIT8SetDataRowColDbl(cmsHANDLE hIT8, int row, int col,
                                                cmsFloat64Number Val);

CMSAPI const char*      CMSEXPORT cmsIT8GetData(cmsHANDLE hIT8, const char* cPatch, const char* cSample);


CMSAPI cmsFloat64Number CMSEXPORT cmsIT8GetDataDbl(cmsHANDLE hIT8, const char* cPatch, const char* cSample);

CMSAPI cmsBool          CMSEXPORT cmsIT8SetData(cmsHANDLE hIT8, const char* cPatch,
                                                const char* cSample,
                                                const char *Val);

CMSAPI cmsBool          CMSEXPORT cmsIT8SetDataDbl(cmsHANDLE hIT8, const char* cPatch,
                                                const char* cSample,
                                                cmsFloat64Number Val);

CMSAPI int              CMSEXPORT cmsIT8FindDataFormat(cmsHANDLE hIT8, const char* cSample);
CMSAPI cmsBool          CMSEXPORT cmsIT8SetDataFormat(cmsHANDLE hIT8, int n, const char *Sample);
CMSAPI int              CMSEXPORT cmsIT8EnumDataFormat(cmsHANDLE hIT8, char ***SampleNames);

CMSAPI const char*      CMSEXPORT cmsIT8GetPatchName(cmsHANDLE hIT8, int nPatch, char* buffer);
CMSAPI int              CMSEXPORT cmsIT8GetPatchByName(cmsHANDLE hIT8, const char *cPatch);

// The LABEL extension
CMSAPI int              CMSEXPORT cmsIT8SetTableByLabel(cmsHANDLE hIT8, const char* cSet, const char* cField, const char* ExpectedType);

CMSAPI cmsBool          CMSEXPORT cmsIT8SetIndexColumn(cmsHANDLE hIT8, const char* cSample);

// Formatter for double
CMSAPI void             CMSEXPORT cmsIT8DefineDblFormat(cmsHANDLE hIT8, const char* Formatter);

// Gamut boundary description routines ------------------------------------------------------------------------------

CMSAPI cmsHANDLE        CMSEXPORT cmsGBDAlloc(cmsContext ContextID);
CMSAPI void             CMSEXPORT cmsGBDFree(cmsHANDLE hGBD);
CMSAPI cmsBool          CMSEXPORT cmsGDBAddPoint(cmsHANDLE hGBD, const cmsCIELab* Lab);
CMSAPI cmsBool          CMSEXPORT cmsGDBCompute(cmsHANDLE  hGDB, cmsUInt32Number dwFlags);
CMSAPI cmsBool          CMSEXPORT cmsGDBCheckPoint(cmsHANDLE hGBD, const cmsCIELab* Lab);

// Feature detection  ----------------------------------------------------------------------------------------------

// Estimate the black point
CMSAPI cmsBool          CMSEXPORT cmsDetectBlackPoint(cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags);
CMSAPI cmsBool          CMSEXPORT cmsDetectDestinationBlackPoint(cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags);

// Estimate total area coverage
CMSAPI cmsFloat64Number CMSEXPORT cmsDetectTAC(cmsHPROFILE hProfile);


// Poor man's gamut mapping
CMSAPI cmsBool          CMSEXPORT cmsDesaturateLab(cmsCIELab* Lab,
                                                   double amax, double amin,
                                                   double bmax, double bmin);

#ifndef CMS_USE_CPP_API
#   ifdef __cplusplus
    }
#   endif
#endif

#define _lcms2_H
#endif


<|start_filename|>node_modules/lokijs/src/loki-angular.js<|end_filename|>
/*
  Loki Angular Adapter (need to include this script to use it)
 * @author <NAME> <<EMAIL>>
 *
 * A lightweight document oriented javascript database
 */
(function (root, factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(['angular', 'lokijs'], factory);
    } else if (typeof exports === 'object') {
        // CommonJS
        module.exports = factory();
    } else {
        // Browser globals
        root.lokiAngular = factory(
            root.angular,
            // Use thirdParty.loki if available to cover all legacy cases
            root.thirdParty && root.thirdParty.loki ?
            root.thirdParty.loki : root.loki
        );
    }
}(this, function (angular, lokijs) {
    var module = angular.module('lokijs', [])
        .factory('Loki', Loki)
        .service('Lokiwork', Lokiwork);

    function Loki() {
        return loki;
    }
    Lokiwork.$inject = ['Loki', '$q', '$injector', '$window'];

    function Lokiwork(Loki, $q, $injector, $window) {
        var vm = this;
        vm.checkStates = checkStates;
        var statesChecked = false;
        var db;
        var userDbPreference = '';
        var userPrefJsonFile = 0;
        var numOfJsonDatabases = 0;
        var dbitems = [];
        var lokidbs = [];
        vm.dbExists = dbExists;
        vm.closeDb = closeDb;
        vm.closeAllDbs = closeAllDbs;
        vm.getCollection = getCollection;
        vm.addCollection = addCollection;
        vm.removeCollection = removeCollection;
        vm.getDoc = getDoc;
        vm.updateDoc = updateDoc;
        vm.updateCurrentDoc = updateCurrentDoc;
        vm.setCurrentDoc = setCurrentDoc;
        vm.getCurrentDoc = getCurrentDoc;
        vm.deleteDocument = deleteDocument;
        vm.deleteCurrentDoc = deleteCurrentDoc;
        vm.deleteDatabase = deleteDatbase;
        vm.addDocument = addDocument;
        vm.insertItemInDoc = insertItemInDoc;
        var currentDoc = {};
        var currentColl = {};
        numOfJsonDatabases = getNumberOfJsonDatabases();

        function getCurrentDoc() {
            return currentDoc;
        }

        function deleteDatbase(data) {
            localStorage.removeItem(data);
        }

        function deleteDocument(dbName, collName, doc) { //doc should be in {name:value} format 
            return $q(function (resolve, reject) {
                userDbPreference = dbName;
                _getem('delete_doc', dbName, collName, doc)
                    .then(function (data) {
                        currentDoc = {};
                        resolve(data);
                    }, function(data){
                            reject(data);
                        });
            });
        }


        function insertItemInDoc(item) {
            return $q(function (resolve, reject) {
                _getem('insert_item_in_doc', currentDoc.dbName, currentDoc.collName, currentDoc.doc, "", item)
                    .then(function (data) {
                        resolve(data);
                    }, function (data) {
                        reject(data);
                    });
            });
        }

        function deleteCurrentDoc() {
            return $q(function (resolve, reject) {
                _getem('delete_current_doc')
                    .then(function (data) {
                        resolve(data);
                    }, function (data) {
                        reject(data);
                    });
            });
        }

        function addDocument(dbName, collName, newDoc) {
            return $q(function (resolve, reject) {
                userDbPreference = dbName;
                _getem('create_doc', dbName, collName, "", "", newDoc)
                    .then(function (data) {
                        currentDoc.dbName = dbName;
                        currentDoc.collName = collName;
                        currentDoc.doc = data;
                        currentDoc.lokiNum = data[0].$loki;
                        resolve(data[0]);
                    }, function(data){
                            reject(data);
                        });
            });
        }

        function setCurrentDoc(dbName, collName, docName) {
            return $q(function (resolve, reject) {
                userDbPreference = dbName;
                _getem('set_doc', dbName, collName, docName)
                    .then(function (data) {
                        currentDoc.dbName = dbName;
                        currentDoc.collName = collName;
                        currentDoc.doc = data;
                        currentDoc.lokiNum = data[0].$loki;
                        resolve(data[0]);
                    }, function(data){
                            reject(data);
                        });
            });
        }

        function updateCurrentDoc(thekey, thevalue) {
            return $q(function (resolve, reject) {
                if (currentDoc) {
                    _getem('update_current_doc', currentDoc.dbName, currentDoc.collName, currentDoc.doc, thekey, thevalue)
                        .then(function (data) {
                            resolve(data[0]);
                        }, function(data){
                            reject(data);
                        });
                } else {
                    reject("you have to set a current doc first, use: setCurrentDoc(dbName, collName, docName)");
                }
            });
        }

        function updateDoc(dbName, collName, docName, thekey, thevalue) {
            return $q(function (resolve, reject) {
                userDbPreference = dbName;
                if (currentDoc) {
                    _getem('update_doc', dbName, collName, docName, thekey, thevalue)
                        .then(function (data) {
                            resolve(data[0]);
                        }, function(data){
                            reject(data);
                        });
                } else {
                    reject("bad, check parameters)");
                }
            });
        }

        function getDoc(dbName, collName, docName) {
            return $q(function (resolve, reject) {
                userDbPreference = dbName;
                _getem('get_doc', dbName, collName, docName)
                    .then(function (data) {
                        currentDoc.dbName = dbName;
                        currentDoc.collName = collName;
                        currentDoc.doc = data;
                        currentDoc.lokiNum = data[0].$loki;
                        resolve(data[0]);
                    }, function(data){
                            reject(data);
                        });
            });
        }

        function getCollection(dbName, collName) {
            return $q(function (resolve, reject) {
                userDbPreference = dbName;
                _getem('get_collection', dbName, collName)
                    .then(function (data) {
                        currentColl.dbName = dbName;
                        currentColl.collName = collName;
                        resolve(data);
                    }, function(data){
                            reject(data);
                        });
            });
        }

        function removeCollection(dbName, collName) {
            return $q(function (resolve, reject) {
                userDbPreference = dbName;
                _getem('remove_collection', dbName, collName)
                    .then(function (data) {
                        currentColl = {};
                        resolve(data);
                    }, function(data){
                            reject(data);
                        });
            });
        }

        function addCollection(collData) {
            return $q(function (resolve, reject) {
                var dbobj = breakdown_components(collData);
                userDbPreference = collData[dbobj.db];
                _getem('add_collection', userDbPreference, '', '', '', collData)
                    .then(function (data) {
                        currentColl.dbName = userDbPreference;
                        resolve(data);
                    }, function(data){
                            reject(data);
                        });
            });
        }

        function _getem(operation, dbName, collName, docName, thekey, thevalue) {
            return $q(function (resolve, reject) {
                if (db) {
                    if (db.filename === dbName) {
                        getdata();
                    } else {
                        loadDb(dbName)
                            .then(function () {
                                getdata();
                            });
                    }
                } else {
                    if (statesChecked) {
                        loadDb(dbName)
                            .then(function () {
                                getdata();
                            });
                    } else {
                        checkStates().then(function () {
                            getdata();
                        }, function(data){
                            reject(data);
                        });
                    }
                }
                
                

                function getdata() {
                    var found;

                    if (operation === 'update_doc' || operation === 'insert_item_in_doc') {
                        db.loadDatabase(dbName);
                        var coll = db.getCollection(collName);
                        
                        //docName is not simply a docname, this is an object like: {name: 'user settings'}
                        for(var i in docName) {
                            currentDoc.key = i;
                            currentDoc.value = docName[i];
                        }
                        for (var x = 0; x < coll.data.length; x++){
                            if (coll.data[x][currentDoc.key] === currentDoc.value){
                                currentDoc.lokiNum = coll.data[x].$loki;
                            }
                        }
                        found = coll.get(parseInt(currentDoc.lokiNum, 10));

                        if (operation === 'update_doc') {
                            found[thekey] = thevalue;
                            coll.update(found);
                        } else {
                            found.insert(thevalue);
                        }
                        db.save();
                        resolve(true);
                    }
                    else if(operation === 'update_current_doc'){
                         db.loadDatabase(dbName);
                        var coll0 = db.getCollection(collName);
                        found = coll0.get(parseInt(currentDoc.lokiNum, 10));
                        found[thekey] = thevalue;
                        coll0.update(found);
                        
                        db.save();
                        resolve(true);
                    } 
                    else if (operation === 'delete_current_doc' || operation === 'delete_doc') {
                        db.loadDatabase(dbName);
                        var coll6 = db.getCollection(collName);
                        if(operation === 'delete_doc'){
                            for(var j in docName) {
                            currentDoc.key = j;
                            currentDoc.value = docName[j];
                        }
                        for (var y = 0; y < coll6.data.length; y++){
                            if (coll6.data[y][currentDoc.key] === currentDoc.value){
                                currentDoc.lokiNum = coll6.data[y].$loki;
                            }
                        }
                        }
                        coll6.remove(currentDoc.lokiNum);                        
                        db.save();
                        resolve(true);
                    }                    
                    else if (operation === 'get_doc' || operation === 'set_doc') {
                        db.loadDatabase(dbName);
                        var coll1 = db.getCollection(collName);
                        found = coll1.find(docName);
                        resolve(angular.fromJson(found));
                    } else if (operation === 'get_collection') {
                        db.loadDatabase(dbName);
                        var coll2 = db.getCollection(collName);
                        resolve(angular.fromJson(coll2));
                    } else if (operation === 'remove_collection') {
                        db.loadDatabase(dbName);
                        db.removeCollection(collName);
                        //coll = db.getCollection(collName);
                        db.save(function () {
                            resolve('collection deleted');
                        });
                    } else if (operation === 'add_collection') {
                        db.loadDatabase(dbName);
                        var dbobj = breakdown_components(thevalue);
                        
                        for (var w=0; w< dbobj.coll_array.length; w++){
                             var items = db.addCollection(thevalue[dbobj.coll_array[w].coll]);
                            items.insert(thevalue[dbobj.coll_array[w].docs]);
                        }
                        
                        db.save(function () {
                            resolve('collection(s) added');
                        });

                    } else if (operation === 'create_doc') {
                        db.loadDatabase(dbName);
                        var coll3 = db.getCollection(collName);
                        coll3.insert(thevalue);
                        db.save(function () {
                            var found = coll3.find({
                                name: thevalue.name
                            });
                            resolve(angular.fromJson(found));
                        });

                    } 
                    // _getem('delete_doc', dbName, collName, "", "", doc)
                    else if (operation === 'delete_current_doc') {
                        var coll5 = db.getCollection(currentDoc.collName);
                        if (!coll5) {
                            reject('You forgot to specify a current doc first');
                        } else {
                            coll5.remove(parseInt(currentDoc.lokiNum, 10));
                            db.save();
                            resolve(true);
                        }
                    }
                }
            });
        }

        function dbExists(databaseName) {
            var value = window.localStorage.getItem(databaseName);
            if (value) {
                return true;
            } else {
                return false;
            }
        }

        function closeAllDbs() {
            return $q(function (resolve, reject) {
                var current = 0;
                for (var x = 0; x < lokidbs.length; x++) {
                    current++;
                    lokidbs[x].close();
                    if (x === (lokidbs.length - 1)) {
                        resolve();
                    }
                }
            });
        }

        function closeDb(databaseName) {
            return $q(function (resolve, reject) {

                for (var x = 0; x < lokidbs.length; x++) {
                    if (lokidbs.filename === databaseName) {
                        lokidbs[x].close();
                        resolve();
                        break;
                    }
                }

            });
        }


        function checkStates() {
            return $q(function (resolve, reject) {
                if (dbitems.length === 0) {
                    initialiseAll().then(function () {
                        console.log('had to initialize all dbs');
                        statesChecked = true;
                        resolve();
                    }, function (data) {
                        reject(data);
                    });
                } else {
                    console.log('db list already initialized');
                    resolve();
                }
            });
        }

        function firstFewItemsOfDbList() {
            return $q(function (resolve, reject) {
                for (var x = 0; x >= 0; x++) {
                    if ($injector.has('json' + (x + 1))) {
                        var item = {};
                        var setting = $injector.get('json' + (x + 1));
                        var dbobj = breakdown_components(setting);
                        if (setting[dbobj.db] === userDbPreference) { //userDbPreference is the name
                            userPrefJsonFile = x + 1; //userPrefJsonFile is the index
                            if (x === (numOfJsonDatabases - 1)) {
                                resolve();
                            }
                        } else {
                            item.filename = dbobj.db;
                            item.json = x + 1;
                            dbitems.push(item);
                            if (x === (numOfJsonDatabases - 1)) {
                                resolve();
                            }
                        }
                    }
                    else {
                        resolve();
                        break;
                    }
                }
            });
        }

        function initialiseDbList() {
            return $q(function (resolve, reject) {                
                firstFewItemsOfDbList()
                    .then(function () {
                        if (userPrefJsonFile === 0){
                            reject('Oops!, you didn\'t specify any starting document');
                        }
                        var currentdb = $injector.get('json' + userPrefJsonFile);
                        var item = {};
                        var dbobj = breakdown_components(currentdb);
                        item.filename = dbobj.db;
                        item.json = userPrefJsonFile;
                        dbitems.push(item);
                        resolve();
                    });
            });
        }

        function getNumberOfJsonDatabases() {
            if (numOfJsonDatabases >= 1) {
                return numOfJsonDatabases;
            } else {
                for (var x = 0; x >= 0; x++) {
                    if ($injector.has('json' + (x + 1))) {
                        numOfJsonDatabases++;
                    }
                    else {
                        break;
                    }

                }
                return numOfJsonDatabases;
            }
        }

        var still_running = false;
        var current_iteration = 1;

        function initialiseAll() {
            return $q(function (resolve, reject) {
                initialiseDbList()
                    .then(function () {

                        function iterate_me() {
                            if ($injector.has('json' + dbitems[current_iteration - 1].json)) {
                                var setting = $injector.get('json' + dbitems[current_iteration - 1].json);

                                console.log('number = ' + current_iteration);
                                var set = angular.fromJson(setting);
                                still_running = true;
                                initiateDb(set)
                                    .then(function () {
                                        //lokidbs.push(angular.copy(db));
                                        if (!doesDBAlreadyExistInArray(db.filename)) {
                                            lokidbs.push(angular.copy(db));
                                        }
                                        still_running = false;
                                        if (current_iteration === (dbitems.length)) {
                                            resolve();
                                        } else {
                                            current_iteration++;
                                            iterate_me();
                                            return;
                                        }
                                    });
                            }
                        }
                        iterate_me();
                    }, function(data){
                        reject(data);
                    });
            });
        }

        function doesDBAlreadyExistInArray(dbname) {
            var answer = false;
            for (var x = 0; x < lokidbs.length; x++) {
                if (lokidbs[x].filename === dbname) {
                    answer = true;
                }
            }
            return answer;
        }

        function getIndexOfDbItem(dbname) {
            var answer = -1;
            for (var x = 0; x < numOfJsonDatabases; x++) {
                if (dbitems[x].filename === dbname) {
                    answer = x;
                }
            }
            return answer;
        }

        function loadDb(databaseName) {
            return $q(function (resolve, reject) {
                for (var x = 0; x < lokidbs.length; x++) {
                    if (lokidbs[x].filename === databaseName) {
                        db = lokidbs[x];
                        resolve();
                    }
                }
            });
        }



        function initiateDb(database) {
            return $q(function (resolve, reject) {
                var dbobj = breakdown_components(database);
                var db_does_exist = false;
                if (dbExists(database[dbobj.db])) {
                    db_does_exist = true;
                }
                db = new loki(database[dbobj.db], {
                    autoload: true,
                    autoloadCallback: loadHandler, //loadHandler, //for some reason this has to be called like this
                    autosave: true,
                    autosaveInterval: 10000
                });

                function loadHandler() {
                    if (db_does_exist) {

                        resolve();
                    } else {
                        var dbobj = breakdown_components(database);
                        for(var x = 0; x < dbobj.coll_array.length; x++){
                            var items = db.addCollection(database[dbobj.coll_array[x].coll]);
                            items.insert(database[dbobj.coll_array[x].docs]);
                        }
                        db.save();
                        resolve();
                    }
                }
            });
        }
        function breakdown_components(db_obj){
              var iterate = 1;
              var db_id = '';
              var coll_id = "";
              var doc_id = "";
              var collections = [];
              for(var i in db_obj){
                  if (iterate > 1){
                      if(isEven(iterate)){
                        coll_id = i;
                      }
                      else{
                          doc_id = i; 
                          var tempobj = {coll: coll_id, docs: doc_id};
                          collections.push(tempobj);
                      }                   
                  }
                  else {
                      db_id = i;
                  }
                  iterate ++;
              }
              
              var dataobj = {db: db_id, coll_array: collections};
              return dataobj;
        }
        function isEven(n) {
            return n % 2 === 0;
        }
        function isOdd(n) {
            return Boolean(n % 2);
        }
    }
    return module;
}));


<|start_filename|>node_modules/sharp/vendor/include/orc/orcneon.h<|end_filename|>

#ifndef _ORC_NEON_H_
#define _ORC_NEON_H_

#include <orc/orc.h>
#include <orc/orcarm.h>

ORC_BEGIN_DECLS

#ifdef ORC_ENABLE_UNSTABLE_API

const char *orc_neon_reg_name (int reg);
const char *orc_neon_reg_name_quad (int reg);

void orc_neon_loadb (OrcCompiler *compiler, OrcVariable *var, int update);
void orc_neon_loadw (OrcCompiler *compiler, OrcVariable *var, int update);
void orc_neon_loadl (OrcCompiler *compiler, OrcVariable *var, int update);
void orc_neon_loadq (OrcCompiler *compiler, int dest, int src1, int update, int is_aligned);

void orc_neon_load_vec_aligned (OrcCompiler *compiler, OrcVariable *var, int update);
void orc_neon_load_vec_unaligned (OrcCompiler *compiler, OrcVariable *var, int update);
void orc_neon_load_halfvec_unaligned (OrcCompiler *compiler, OrcVariable *var, int update);

void orc_neon_neg (OrcCompiler *compiler, int dest);
void orc_neon_storeb (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned);
void orc_neon_storew (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned);
void orc_neon_storel (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned);
void orc_neon_storeq (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned);
void orc_neon_emit_loadib (OrcCompiler *p, int reg, int value);
void orc_neon_emit_loadiw (OrcCompiler *p, int reg, int value);
void orc_neon_emit_loadil (OrcCompiler *p, int reg, int value);
void orc_neon_emit_loadpb (OrcCompiler *p, int reg, int param);
void orc_neon_emit_loadpw (OrcCompiler *p, int reg, int param);
void orc_neon_emit_loadpl (OrcCompiler *p, int reg, int param);
void orc_neon_preload (OrcCompiler *compiler, OrcVariable *var, int write,
    int offset);

#endif

ORC_END_DECLS

#endif



<|start_filename|>node_modules/sharp/vendor/include/cairo-gobject.h<|end_filename|>
/* cairo - a vector graphics library with display and print output
 *
 * Copyright © 2010 Red Hat Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it either under the terms of the GNU Lesser General Public
 * License version 2.1 as published by the Free Software Foundation
 * (the "LGPL") or, at your option, under the terms of the Mozilla
 * Public License Version 1.1 (the "MPL"). If you do not alter this
 * notice, a recipient may use your version of this file under either
 * the MPL or the LGPL.
 *
 * You should have received a copy of the LGPL along with this library
 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
 * You should have received a copy of the MPL along with this library
 * in the file COPYING-MPL-1.1
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
 * the specific language governing rights and limitations.
 *
 * The Original Code is the cairo graphics library.
 *
 * The Initial Developer of the Original Code is University of Southern
 * California.
 *
 * Contributor(s):
 *	<NAME> <<EMAIL>>
 */

#ifndef CAIRO_GOBJECT_H
#define CAIRO_GOBJECT_H

#include <cairo.h>

#if CAIRO_HAS_GOBJECT_FUNCTIONS

#include <glib-object.h>

CAIRO_BEGIN_DECLS

/* structs */

#define CAIRO_GOBJECT_TYPE_CONTEXT cairo_gobject_context_get_type ()
cairo_public GType
cairo_gobject_context_get_type (void);

#define CAIRO_GOBJECT_TYPE_DEVICE cairo_gobject_device_get_type ()
cairo_public GType
cairo_gobject_device_get_type (void);

#define CAIRO_GOBJECT_TYPE_MATRIX cairo_gobject_matrix_get_type ()
cairo_public GType
cairo_gobject_matrix_get_type (void);

#define CAIRO_GOBJECT_TYPE_PATTERN cairo_gobject_pattern_get_type ()
cairo_public GType
cairo_gobject_pattern_get_type (void);

#define CAIRO_GOBJECT_TYPE_SURFACE cairo_gobject_surface_get_type ()
cairo_public GType
cairo_gobject_surface_get_type (void);

#define CAIRO_GOBJECT_TYPE_RECTANGLE cairo_gobject_rectangle_get_type ()
cairo_public GType
cairo_gobject_rectangle_get_type (void);

#define CAIRO_GOBJECT_TYPE_SCALED_FONT cairo_gobject_scaled_font_get_type ()
cairo_public GType
cairo_gobject_scaled_font_get_type (void);

#define CAIRO_GOBJECT_TYPE_FONT_FACE cairo_gobject_font_face_get_type ()
cairo_public GType
cairo_gobject_font_face_get_type (void);

#define CAIRO_GOBJECT_TYPE_FONT_OPTIONS cairo_gobject_font_options_get_type ()
cairo_public GType
cairo_gobject_font_options_get_type (void);

#define CAIRO_GOBJECT_TYPE_RECTANGLE_INT cairo_gobject_rectangle_int_get_type ()
cairo_public GType
cairo_gobject_rectangle_int_get_type (void);

#define CAIRO_GOBJECT_TYPE_REGION cairo_gobject_region_get_type ()
cairo_public GType
cairo_gobject_region_get_type (void);

/* enums */

#define CAIRO_GOBJECT_TYPE_STATUS cairo_gobject_status_get_type ()
cairo_public GType
cairo_gobject_status_get_type (void);

#define CAIRO_GOBJECT_TYPE_CONTENT cairo_gobject_content_get_type ()
cairo_public GType
cairo_gobject_content_get_type (void);

#define CAIRO_GOBJECT_TYPE_OPERATOR cairo_gobject_operator_get_type ()
cairo_public GType
cairo_gobject_operator_get_type (void);

#define CAIRO_GOBJECT_TYPE_ANTIALIAS cairo_gobject_antialias_get_type ()
cairo_public GType
cairo_gobject_antialias_get_type (void);

#define CAIRO_GOBJECT_TYPE_FILL_RULE cairo_gobject_fill_rule_get_type ()
cairo_public GType
cairo_gobject_fill_rule_get_type (void);

#define CAIRO_GOBJECT_TYPE_LINE_CAP cairo_gobject_line_cap_get_type ()
cairo_public GType
cairo_gobject_line_cap_get_type (void);

#define CAIRO_GOBJECT_TYPE_LINE_JOIN cairo_gobject_line_join_get_type ()
cairo_public GType
cairo_gobject_line_join_get_type (void);

#define CAIRO_GOBJECT_TYPE_TEXT_CLUSTER_FLAGS cairo_gobject_text_cluster_flags_get_type ()
cairo_public GType
cairo_gobject_text_cluster_flags_get_type (void);

#define CAIRO_GOBJECT_TYPE_FONT_SLANT cairo_gobject_font_slant_get_type ()
cairo_public GType
cairo_gobject_font_slant_get_type (void);

#define CAIRO_GOBJECT_TYPE_FONT_WEIGHT cairo_gobject_font_weight_get_type ()
cairo_public GType
cairo_gobject_font_weight_get_type (void);

#define CAIRO_GOBJECT_TYPE_SUBPIXEL_ORDER cairo_gobject_subpixel_order_get_type ()
cairo_public GType
cairo_gobject_subpixel_order_get_type (void);

#define CAIRO_GOBJECT_TYPE_HINT_STYLE cairo_gobject_hint_style_get_type ()
cairo_public GType
cairo_gobject_hint_style_get_type (void);

/* historical accident */
#define CAIRO_GOBJECT_TYPE_HNT_METRICS cairo_gobject_hint_metrics_get_type ()
#define CAIRO_GOBJECT_TYPE_HINT_METRICS cairo_gobject_hint_metrics_get_type ()
cairo_public GType
cairo_gobject_hint_metrics_get_type (void);

#define CAIRO_GOBJECT_TYPE_FONT_TYPE cairo_gobject_font_type_get_type ()
cairo_public GType
cairo_gobject_font_type_get_type (void);

#define CAIRO_GOBJECT_TYPE_PATH_DATA_TYPE cairo_gobject_path_data_type_get_type ()
cairo_public GType
cairo_gobject_path_data_type_get_type (void);

#define CAIRO_GOBJECT_TYPE_DEVICE_TYPE cairo_gobject_device_type_get_type ()
cairo_public GType
cairo_gobject_device_type_get_type (void);

#define CAIRO_GOBJECT_TYPE_SURFACE_TYPE cairo_gobject_surface_type_get_type ()
cairo_public GType
cairo_gobject_surface_type_get_type (void);

#define CAIRO_GOBJECT_TYPE_FORMAT cairo_gobject_format_get_type ()
cairo_public GType
cairo_gobject_format_get_type (void);

#define CAIRO_GOBJECT_TYPE_PATTERN_TYPE cairo_gobject_pattern_type_get_type ()
cairo_public GType
cairo_gobject_pattern_type_get_type (void);

#define CAIRO_GOBJECT_TYPE_EXTEND cairo_gobject_extend_get_type ()
cairo_public GType
cairo_gobject_extend_get_type (void);

#define CAIRO_GOBJECT_TYPE_FILTER cairo_gobject_filter_get_type ()
cairo_public GType
cairo_gobject_filter_get_type (void);

#define CAIRO_GOBJECT_TYPE_REGION_OVERLAP cairo_gobject_region_overlap_get_type ()
cairo_public GType
cairo_gobject_region_overlap_get_type (void);

CAIRO_END_DECLS

#else  /* CAIRO_HAS_GOBJECT_FUNCTIONS */
# error Cairo was not compiled with support for GObject
#endif /* CAIRO_HAS_GOBJECT_FUNCTIONS */

#endif /* CAIRO_GOBJECT_H */


<|start_filename|>node_modules/graphql/jsutils/defineToStringTag.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = defineToStringTag;

/**
 * The `defineToStringTag()` function checks first to see if the runtime
 * supports the `Symbol` class and then if the `Symbol.toStringTag` constant
 * is defined as a `Symbol` instance. If both conditions are met, the
 * Symbol.toStringTag property is defined as a getter that returns the
 * supplied class constructor's name.
 *
 * @method defineToStringTag
 *
 * @param {Class<any>} classObject a class such as Object, String, Number but
 * typically one of your own creation through the class keyword; `class A {}`,
 * for example.
 */
function defineToStringTag(classObject) {
  if (typeof Symbol === 'function' && Symbol.toStringTag) {
    Object.defineProperty(classObject.prototype, Symbol.toStringTag, {
      get: function get() {
        return this.constructor.name;
      }
    });
  }
}


<|start_filename|>node_modules/sharp/vendor/include/cairo-svg.h<|end_filename|>
/* cairo - a vector graphics library with display and print output
 *
 * cairo-svg.h
 *
 * Copyright © 2005 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it either under the terms of the GNU Lesser General Public
 * License version 2.1 as published by the Free Software Foundation
 * (the "LGPL") or, at your option, under the terms of the Mozilla
 * Public License Version 1.1 (the "MPL"). If you do not alter this
 * notice, a recipient may use your version of this file under either
 * the MPL or the LGPL.
 *
 * You should have received a copy of the LGPL along with this library
 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
 * You should have received a copy of the MPL along with this library
 * in the file COPYING-MPL-1.1
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
 * the specific language governing rights and limitations.
 *
 */

#ifndef CAIRO_SVG_H
#define CAIRO_SVG_H

#include "cairo.h"

#if CAIRO_HAS_SVG_SURFACE

CAIRO_BEGIN_DECLS

/**
 * cairo_svg_version_t:
 * @CAIRO_SVG_VERSION_1_1: The version 1.1 of the SVG specification. (Since 1.2)
 * @CAIRO_SVG_VERSION_1_2: The version 1.2 of the SVG specification. (Since 1.2)
 *
 * #cairo_svg_version_t is used to describe the version number of the SVG
 * specification that a generated SVG file will conform to.
 *
 * Since: 1.2
 **/
typedef enum _cairo_svg_version {
    CAIRO_SVG_VERSION_1_1,
    CAIRO_SVG_VERSION_1_2
} cairo_svg_version_t;

/**
 * cairo_svg_unit_t:
 *
 * @CAIRO_SVG_UNIT_USER: User unit, a value in the current coordinate system.
 *   If used in the root element for the initial coordinate systems it
 *   corresponds to pixels. (Since 1.16)
 * @CAIRO_SVG_UNIT_EM: The size of the element's font. (Since 1.16)
 * @CAIRO_SVG_UNIT_EX: The x-height of the element’s font. (Since 1.16)
 * @CAIRO_SVG_UNIT_PX: Pixels (1px = 1/96th of 1in). (Since 1.16)
 * @CAIRO_SVG_UNIT_IN: Inches (1in = 2.54cm = 96px). (Since 1.16)
 * @CAIRO_SVG_UNIT_CM: Centimeters (1cm = 96px/2.54). (Since 1.16)
 * @CAIRO_SVG_UNIT_MM: Millimeters (1mm = 1/10th of 1cm). (Since 1.16)
 * @CAIRO_SVG_UNIT_PT: Points (1pt = 1/72th of 1in). (Since 1.16)
 * @CAIRO_SVG_UNIT_PC: Picas (1pc = 1/6th of 1in). (Since 1.16)
 * @CAIRO_SVG_UNIT_PERCENT: Percent, a value that is some fraction of another
 *   reference value. (Since 1.16)
 *
 * #cairo_svg_unit_t is used to describe the units valid for coordinates and
 * lengths in the SVG specification.
 *
 * See also:
 * https://www.w3.org/TR/SVG/coords.html#Units
 * https://www.w3.org/TR/SVG/types.html#DataTypeLength
 * https://www.w3.org/TR/css-values-3/#lengths
 *
 * Since: 1.16
 **/
typedef enum _cairo_svg_unit {
    CAIRO_SVG_UNIT_USER = 0,
    CAIRO_SVG_UNIT_EM,
    CAIRO_SVG_UNIT_EX,
    CAIRO_SVG_UNIT_PX,
    CAIRO_SVG_UNIT_IN,
    CAIRO_SVG_UNIT_CM,
    CAIRO_SVG_UNIT_MM,
    CAIRO_SVG_UNIT_PT,
    CAIRO_SVG_UNIT_PC,
    CAIRO_SVG_UNIT_PERCENT
} cairo_svg_unit_t;

cairo_public cairo_surface_t *
cairo_svg_surface_create (const char   *filename,
			  double	width_in_points,
			  double	height_in_points);

cairo_public cairo_surface_t *
cairo_svg_surface_create_for_stream (cairo_write_func_t	write_func,
				     void	       *closure,
				     double		width_in_points,
				     double		height_in_points);

cairo_public void
cairo_svg_surface_restrict_to_version (cairo_surface_t 		*surface,
				       cairo_svg_version_t  	 version);

cairo_public void
cairo_svg_get_versions (cairo_svg_version_t const	**versions,
                        int                      	 *num_versions);

cairo_public const char *
cairo_svg_version_to_string (cairo_svg_version_t version);

cairo_public void
cairo_svg_surface_set_document_unit (cairo_surface_t	*surface,
				     cairo_svg_unit_t	 unit);

cairo_public cairo_svg_unit_t
cairo_svg_surface_get_document_unit (cairo_surface_t	*surface);

CAIRO_END_DECLS

#else  /* CAIRO_HAS_SVG_SURFACE */
# error Cairo was not compiled with support for the svg backend
#endif /* CAIRO_HAS_SVG_SURFACE */

#endif /* CAIRO_SVG_H */


<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-cascade.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */

/*
 * This file is part of The Croco Library
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the 
 * GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the 
 * GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 *
 */

/*
 *$Id$
 */

#ifndef __CR_CASCADE_H__
#define __CR_CASCADE_H__

#include "cr-stylesheet.h"

/**
 *@file
 *the declaration of the #CRCascade class.
 */

G_BEGIN_DECLS


typedef struct _CRCascadePriv CRCascadePriv ;

/**
 *An abstraction of the "Cascade" defined
 *in the css2 spec, chapter 6.4.
 */
typedef struct _CRCascade CRCascade ;

struct _CRCascade
{
	CRCascadePriv *priv ;
};


CRCascade * cr_cascade_new (CRStyleSheet *a_author_sheet,
                            CRStyleSheet *a_user_sheet,
                            CRStyleSheet *a_ua_sheet) ;

CRStyleSheet * cr_cascade_get_sheet (CRCascade *a_this,
                                     enum CRStyleOrigin a_origin) ;

enum CRStatus cr_cascade_set_sheet (CRCascade *a_this,
                                    CRStyleSheet *a_sheet,
                                    enum CRStyleOrigin a_origin) ;

void cr_cascade_ref (CRCascade *a_this) ;

void cr_cascade_unref (CRCascade *a_this) ;

void cr_cascade_destroy (CRCascade *a_this) ;

G_END_DECLS

#endif /*__CR_CASCADE_H__*/


<|start_filename|>node_modules/fast-glob/out/utils/array.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function flatten(items) {
    return items.reduce((collection, item) => [].concat(collection, item), []);
}
exports.flatten = flatten;
function splitWhen(items, predicate) {
    const result = [[]];
    let groupIndex = 0;
    for (const item of items) {
        if (predicate(item)) {
            groupIndex++;
            result[groupIndex] = [];
        }
        else {
            result[groupIndex].push(item);
        }
    }
    return result;
}
exports.splitWhen = splitWhen;


<|start_filename|>node_modules/better-queue/test/stats.js<|end_filename|>
var assert = require('assert');
var helper = require('./lib/helper');
var Queue = require('../lib/queue');

describe('Stats', function() {
  afterEach(helper.destroyQueues);

  it('should get stat', function (done) {
    var completed = 0;
    var elapsedTotals = 0;
    var q = new Queue(function (wait, cb) {
      setTimeout(function () {
        cb()
      }, wait)
    })
    q.on('task_finish', function (id, result, stat) {
      completed++;
      elapsedTotals += stat.elapsed;
    })
    q.on('drain', function () {
      var stats = q.getStats();
      assert.ok(stats.peak);
      assert.equal(3, stats.total);
      assert.equal(elapsedTotals/3, stats.average);
      done();
    })
    q.push(1);
    q.push(1);
    q.push(1);
    this.q = q;
  })

  it('should reset stat', function (done) {
    var queued = 0;
    var elapsedTotal = 0;
    var q = new Queue(function (wait, cb) {
      setTimeout(function () {
        cb()
      }, wait)
    }, { id: function (n, cb) { cb(null, n) } })
    q.push(1, function () {
      q.push(1, function () {
        q.resetStats();
        q.on('task_finish', function (id, result, stat) {
          if (id !== '2') return;
          assert.ok(stat.elapsed > 0);
          var stats = q.getStats();
          assert.equal(1, stats.peak);
          assert.equal(1, stats.total);
          assert.equal(stats.average, stat.elapsed);
          done();
        })
        q.push(2);
      });
    });
    this.q = q;
  })


})


<|start_filename|>node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-untyped-public-signature.js<|end_filename|>
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const util = __importStar(require("../util"));
const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
exports.default = util.createRule({
    name: 'no-untyped-public-signature',
    meta: {
        deprecated: true,
        replacedBy: ['explicit-module-boundary-types'],
        docs: {
            description: 'Disallow untyped public methods',
            category: 'Best Practices',
            recommended: false,
        },
        messages: {
            noReturnType: 'Public method has no return type',
            untypedParameter: 'Public method parameters should be typed',
        },
        schema: [
            {
                allowAdditionalProperties: false,
                properties: {
                    ignoredMethods: {
                        type: 'array',
                        items: {
                            type: 'string',
                        },
                    },
                },
                type: 'object',
            },
        ],
        type: 'suggestion',
    },
    defaultOptions: [{ ignoredMethods: [] }],
    create(context, [options]) {
        const ignoredMethods = new Set(options.ignoredMethods);
        function isPublicMethod(node) {
            return node.accessibility === 'public' || !node.accessibility;
        }
        function isIgnoredMethod(node, ignoredMethods) {
            if (node.key.type === experimental_utils_1.AST_NODE_TYPES.Literal &&
                typeof node.key.value === 'string') {
                return ignoredMethods.has(node.key.value);
            }
            if (node.key.type === experimental_utils_1.AST_NODE_TYPES.TemplateLiteral &&
                node.key.expressions.length === 0) {
                return ignoredMethods.has(node.key.quasis[0].value.raw);
            }
            if (!node.computed && node.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
                return ignoredMethods.has(node.key.name);
            }
            return false;
        }
        function isParamTyped(node) {
            return (!!node.typeAnnotation &&
                node.typeAnnotation.typeAnnotation.type !== experimental_utils_1.AST_NODE_TYPES.TSAnyKeyword);
        }
        function isReturnTyped(node) {
            if (!node) {
                return false;
            }
            return (node.typeAnnotation &&
                node.typeAnnotation.type !== experimental_utils_1.AST_NODE_TYPES.TSAnyKeyword);
        }
        return {
            'TSAbstractMethodDefinition, MethodDefinition'(node) {
                if (isPublicMethod(node) && !isIgnoredMethod(node, ignoredMethods)) {
                    const paramIdentifiers = node.value.params.filter(param => param.type === experimental_utils_1.AST_NODE_TYPES.Identifier);
                    const identifiersHaveTypes = paramIdentifiers.every(isParamTyped);
                    if (!identifiersHaveTypes) {
                        context.report({
                            node,
                            messageId: 'untypedParameter',
                            data: {},
                        });
                    }
                    if (node.kind !== 'constructor' &&
                        node.kind !== 'set' &&
                        !isReturnTyped(node.value.returnType)) {
                        context.report({
                            node,
                            messageId: 'noReturnType',
                            data: {},
                        });
                    }
                }
            },
        };
    },
});
//# sourceMappingURL=no-untyped-public-signature.js.map

<|start_filename|>node_modules/opentracing/lib/mock_tracer/index.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var mock_context_1 = require("./mock_context");
exports.MockContext = mock_context_1.default;
var mock_span_1 = require("./mock_span");
exports.MockSpan = mock_span_1.default;
var mock_tracer_1 = require("./mock_tracer");
exports.MockTracer = mock_tracer_1.default;
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/lpad-align/index.js<|end_filename|>
'use strict';
var indentString = require('indent-string');
var longest = require('longest');

module.exports = function (str, arr, indent) {
	var pad = typeof indent === 'number' ? indent : 0;

	if (typeof str !== 'string') {
		throw new TypeError('Expected a `string`, got `' + typeof str + '`');
	}

	if (!Array.isArray(arr)) {
		throw new TypeError('Expected an `Array`, got `' + typeof arr + '`');
	}

	return indentString(str, ' ', pad + longest(arr).length - str.length);
};


<|start_filename|>node_modules/sift/benchmark/index.js<|end_filename|>
var Benchmark = require("benchmark");
var sift      = require("..");

var queries = [
  { num: { $lt: 5 }}
];

var loremArr = [
    {
        "num": 1,
        "pum": 1,
        "sub": {
            "num": 1,
            "pum": 1
        }
    },
    {
        "num": 2,
        "pum": 2,
        "sub": {
            "num": 2,
            "pum": 2
        }
    },
    {
        "num": 3,
        "pum": 3,
        "sub": {
            "num": 3,
            "pum": 3
        }
    },
    {
        "num": 4,
        "pum": 4,
        "sub": {
            "num": 4,
            "pum": 4
        }
    },
    {
        "num": 5,
        "pum": 5,
        "sub": {
            "num": 5,
            "pum": 5
        }
    },
    {
        "num": 6,
        "pum": 6,
        "sub": {
            "num": 6,
            "pum": 6
        }
    },
    {
        "num": 7,
        "pum": 7,
        "sub": {
            "num": 7,
            "pum": 7
        }
    },
    {
        "num": 8,
        "pum": 8,
        "sub": {
            "num": 8,
            "pum": 8
        }
    },
    {
        "num": 9,
        "pum": 9,
        "sub": {
            "num": 9,
            "pum": 9
        }
    },
    {
        "num": 10,
        "pum": 10,
        "sub": {
            "num": 10,
            "pum": 10
        }
    },
    {
        "num": 11,
        "pum": 11,
        "sub": {
            "num": 10,
            "pum": 10
        }
    }
];


var arrays = Array.apply(void 0, new Array(9)).map(function(v, i) {
  return Array.apply(void 0, new Array(((i+1)<<i) * 10)).map(function() {
    return loremArr[Math.floor(Math.random() * loremArr.length)];
  });
})


// console.log(items)
var suite = new Benchmark.Suite;

arrays.forEach(function(array) {
  queries.forEach(function(query) {

    suite.add(JSON.stringify(query) + " x " + array.length + " items", function() {
      sift(query, array);
    });

  });
});


suite
.on('cycle', function(event) {
  console.log(String(event.target));
})
.on('complete', function() {
  console.log('Fastest is ' + this.filter('fastest').pluck('name'));
})
// run async
.run({ 'async': true });


<|start_filename|>node_modules/sharp/vendor/include/hb-deprecated.h<|end_filename|>
/*
 * Copyright © 2013  Google, Inc.
 *
 *  This is part of HarfBuzz, a text shaping library.
 *
 * Permission is hereby granted, without written agreement and without
 * license or royalty fees, to use, copy, modify, and distribute this
 * software and its documentation for any purpose, provided that the
 * above copyright notice and the following two paragraphs appear in
 * all copies of this software.
 *
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 *
 * Google Author(s): <NAME>
 */

#ifndef HB_H_IN
#error "Include <hb.h> instead."
#endif

#ifndef HB_DEPRECATED_H
#define HB_DEPRECATED_H

#include "hb-common.h"
#include "hb-unicode.h"
#include "hb-font.h"
#include "hb-set.h"


/**
 * SECTION:hb-deprecated
 * @title: hb-deprecated
 * @short_description: Deprecated API
 * @include: hb.h
 *
 * These API have been deprecated in favor of newer API, or because they
 * were deemed unnecessary.
 **/


HB_BEGIN_DECLS

#ifndef HB_DISABLE_DEPRECATED


#define HB_SCRIPT_CANADIAN_ABORIGINAL		HB_SCRIPT_CANADIAN_SYLLABICS

#define HB_BUFFER_FLAGS_DEFAULT			HB_BUFFER_FLAG_DEFAULT
#define HB_BUFFER_SERIALIZE_FLAGS_DEFAULT	HB_BUFFER_SERIALIZE_FLAG_DEFAULT

typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data,
					       hb_codepoint_t unicode, hb_codepoint_t variation_selector,
					       hb_codepoint_t *glyph,
					       void *user_data);

HB_EXTERN HB_DEPRECATED_FOR(hb_font_funcs_set_nominal_glyph_func and hb_font_funcs_set_variation_glyph_func) void
hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
			      hb_font_get_glyph_func_t func,
			      void *user_data, hb_destroy_func_t destroy);

HB_EXTERN HB_DEPRECATED void
hb_set_invert (hb_set_t *set);

/**
 * hb_unicode_eastasian_width_func_t:
 *
 * Deprecated: 2.0.0
 */
typedef unsigned int			(*hb_unicode_eastasian_width_func_t)	(hb_unicode_funcs_t *ufuncs,
										 hb_codepoint_t      unicode,
										 void               *user_data);

/**
 * hb_unicode_funcs_set_eastasian_width_func:
 * @ufuncs: a Unicode function structure
 * @func: (closure user_data) (destroy destroy) (scope notified):
 * @user_data:
 * @destroy:
 *
 * 
 *
 * Since: 0.9.2
 * Deprecated: 2.0.0
 **/
HB_EXTERN HB_DEPRECATED void
hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,
					   hb_unicode_eastasian_width_func_t func,
					   void *user_data, hb_destroy_func_t destroy);

/**
 * hb_unicode_eastasian_width:
 *
 * Since: 0.9.2
 * Deprecated: 2.0.0
 **/
HB_EXTERN HB_DEPRECATED unsigned int
hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs,
			    hb_codepoint_t unicode);


/**
 * hb_unicode_decompose_compatibility_func_t:
 * @ufuncs: a Unicode function structure
 * @u: codepoint to decompose
 * @decomposed: address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into
 * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func()
 *
 * Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed.
 * The complete length of the decomposition will be returned.
 *
 * If @u has no compatibility decomposition, zero should be returned.
 *
 * The Unicode standard guarantees that a buffer of length %HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any
 * compatibility decomposition plus an terminating value of 0.  Consequently, @decompose must be allocated by the caller to be at least this length.  Implementations
 * of this function type must ensure that they do not write past the provided array.
 *
 * Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available.
 *
 * Deprecated: 2.0.0
 */
typedef unsigned int			(*hb_unicode_decompose_compatibility_func_t)	(hb_unicode_funcs_t *ufuncs,
											 hb_codepoint_t      u,
											 hb_codepoint_t     *decomposed,
											 void               *user_data);

/**
 * HB_UNICODE_MAX_DECOMPOSITION_LEN:
 *
 * See Unicode 6.1 for details on the maximum decomposition length.
 *
 * Deprecated: 2.0.0
 */
#define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */

/**
 * hb_unicode_funcs_set_decompose_compatibility_func:
 * @ufuncs: a Unicode function structure
 * @func: (closure user_data) (destroy destroy) (scope notified):
 * @user_data:
 * @destroy:
 *
 * 
 *
 * Since: 0.9.2
 * Deprecated: 2.0.0
 **/
HB_EXTERN HB_DEPRECATED void
hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs,
						   hb_unicode_decompose_compatibility_func_t func,
						   void *user_data, hb_destroy_func_t destroy);

HB_EXTERN HB_DEPRECATED unsigned int
hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs,
				    hb_codepoint_t      u,
				    hb_codepoint_t     *decomposed);


typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t;

/**
 * hb_font_funcs_set_glyph_v_kerning_func:
 * @ffuncs: font functions.
 * @func: (closure user_data) (destroy destroy) (scope notified):
 * @user_data:
 * @destroy:
 *
 * 
 *
 * Since: 0.9.2
 * Deprecated: 2.0.0
 **/
HB_EXTERN void
hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs,
					hb_font_get_glyph_v_kerning_func_t func,
					void *user_data, hb_destroy_func_t destroy);

HB_EXTERN hb_position_t
hb_font_get_glyph_v_kerning (hb_font_t *font,
			     hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph);

#endif

HB_END_DECLS

#endif /* HB_DEPRECATED_H */


<|start_filename|>node_modules/graphql/jsutils/isNullish.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isNullish;

/**
 * Returns true if a value is null, undefined, or NaN.
 */
function isNullish(value) {
  return value === null || value === undefined || value !== value;
}


<|start_filename|>node_modules/sharp/vendor/include/orc/orcbytecode.h<|end_filename|>

#ifndef _ORC_BYTECODE_H_
#define _ORC_BYTECODE_H_

#include <orc/orcutils.h>
#include <orc/orcbytecodes.h>

ORC_BEGIN_DECLS

typedef struct _OrcBytecode OrcBytecode;

struct _OrcBytecode {
  /*< private >*/
  orc_uint8 *bytecode;
  int length;
  int alloc_len;
};


#ifdef ORC_ENABLE_UNSTABLE_API

OrcBytecode * orc_bytecode_new (void);
void orc_bytecode_free (OrcBytecode *bytecode);
OrcBytecode * orc_bytecode_from_program (OrcProgram *p);
int orc_bytecode_parse_function (OrcProgram *program, const orc_uint8 *bytecode);

#endif

ORC_END_DECLS

#endif



<|start_filename|>node_modules/cache-manager/examples/example.js<|end_filename|>
/*jshint unused:false*/
// Note: ttls are in seconds
var cacheManager = require('../');
var memoryCache = cacheManager.caching({store: 'memory', max: 100, ttl: 10});
var memoryCache2 = cacheManager.caching({store: 'memory', max: 100, ttl: 100});

//
// Basic usage
//
memoryCache.set('foo', 'bar', function(err) {
    if (err) { throw err; }

    memoryCache.get('foo', function(err, result) {
        console.log(result);
        // >> 'bar'
        memoryCache.del('foo', function(err) {
            if (err) {
                console.log(err);
            }
        });
    });
});

function getUser(id, cb) {
    setTimeout(function() {
        console.log("Fetching user from slow database.");
        cb(null, {id: id, name: 'Bob'});
    }, 100);
}

var userId = 123;
var key = 'user_' + userId;

//
// wrap() example
//

/**
 Instead of manually managing the cache like this:
function getCachedUserManually(id, cb) {
    memoryCache.get(id, function(err, result) {
        if (err) { return cb(err); }

        if (result) {
            return cb(null, result);
        }

        getUser(id, function(err, result) {
            if (err) { return cb(err); }
            memoryCache.set(id, result);
            cb(null, result);
        });
    });
}
*/

// ... you can instead use the `wrap` function:
function getCachedUser(id, cb) {
    memoryCache.wrap(id, function(cacheCallback) {
        getUser(id, cacheCallback);
    }, cb);
}

getCachedUser(userId, function(err, user) {
    // First time fetches the user from the (fake) database:
    console.log(user);

    getCachedUser(userId, function(err, user) {
        // Second time fetches from cache.
        console.log(user);
    });
});

// Outputs:
// Returning user from slow database.
// { id: 123, name: 'Bob' }
// { id: 123, name: 'Bob' }

// Same as above, but written differently:
memoryCache.wrap(key, function(cb) {
    getUser(userId, cb);
}, function(err, user) {
    console.log(user);

    // Second time fetches user from memoryCache
    memoryCache.wrap(key, function(cb) {
        getUser(userId, cb);
    }, function(err, user) {
        console.log(user);
    });
});

//
// multi-cache example
//
var multiCache = cacheManager.multiCaching([memoryCache, memoryCache2]);
var userId2 = 456;
var key2 = 'user_' + userId;
var ttl2; //Can't use a different ttl per set() call with memory cache

multiCache.wrap(key2, function(cb) {
    getUser(userId2, cb);
}, function(err, user) {
    console.log(user);

    // Second time fetches user from memoryCache, since it's highest priority.
    // If the data expires in memoryCache, the next fetch would pull it from
    // the memoryCache2, and set the data in memoryCache.
    multiCache.wrap(key2, function(cb) {
        getUser(userId2, cb);
    }, function(err, user) {
        console.log(user);
    });

    // Sets in all caches.
    multiCache.set('foo2', 'bar2', {ttl: ttl2}, function(err) {
        if (err) { throw err; }

        // Fetches from highest priority cache that has the key.
        multiCache.get('foo2', function(err, result) {
            console.log(result);
            // >> 'bar2'

            // Delete from all caches
            multiCache.del('foo2', function(err) {
                if (err) {
                    console.log(err);
                }
                process.exit();
            });
        });
    });
});


<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-rgb.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */

/*
 * This file is part of The Croco Library
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 * 
 * see COPYRIGHTS file for copyright information.
 */

#ifndef __CR_RGB_H__
#define __CR_RGB_H__

#include <stdio.h>
#include <glib.h>
#include "cr-utils.h"
#include "cr-parsing-location.h"

G_BEGIN_DECLS


typedef struct _CRRgb CRRgb ;
struct _CRRgb
{
        /*
         *the unit of the rgb.
         *Either NO_UNIT (integer) or 
         *UNIT_PERCENTAGE (percentage).
         */
        const guchar *name ;
        glong red ;
        glong green ;
        glong blue ;
        gboolean is_percentage ;
	gboolean inherit ;
        gboolean is_transparent ;
        CRParsingLocation location ;
} ;

CRRgb * cr_rgb_new (void) ;

CRRgb * cr_rgb_new_with_vals (gulong a_red, gulong a_green, 
                              gulong a_blue, gboolean a_is_percentage) ;

CRRgb *cr_rgb_parse_from_buf(const guchar *a_str,
                             enum CREncoding a_enc);

enum CRStatus cr_rgb_compute_from_percentage (CRRgb *a_this) ;

enum CRStatus cr_rgb_set (CRRgb *a_this, gulong a_red,
                          gulong a_green, gulong a_blue,
                          gboolean a_is_percentage) ;

enum CRStatus cr_rgb_copy (CRRgb *a_dest, CRRgb const *a_src) ;

enum CRStatus  cr_rgb_set_to_inherit (CRRgb *a_this, gboolean a_inherit) ;

gboolean cr_rgb_is_set_to_inherit (CRRgb const *a_this) ;

gboolean cr_rgb_is_set_to_transparent (CRRgb const *a_this) ;

enum CRStatus cr_rgb_set_to_transparent (CRRgb *a_this, 
                                         gboolean a_is_transparent) ;
enum CRStatus cr_rgb_set_from_rgb (CRRgb *a_this, CRRgb const *a_rgb) ;

enum CRStatus cr_rgb_set_from_name (CRRgb *a_this, const guchar *a_color_name) ;

enum CRStatus cr_rgb_set_from_hex_str (CRRgb *a_this, const guchar * a_hex_value) ;

struct _CRTerm;

enum CRStatus cr_rgb_set_from_term (CRRgb *a_this, const struct _CRTerm *a_value);

guchar * cr_rgb_to_string (CRRgb const *a_this) ;

void cr_rgb_dump (CRRgb const *a_this, FILE *a_fp) ;

void cr_rgb_destroy (CRRgb *a_this) ;

G_END_DECLS

#endif /*__CR_RGB_H__*/


<|start_filename|>node_modules/graphql/validation/rules/UniqueDirectivesPerLocation.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.duplicateDirectiveMessage = duplicateDirectiveMessage;
exports.UniqueDirectivesPerLocation = UniqueDirectivesPerLocation;

var _GraphQLError = require("../../error/GraphQLError");

var _kinds = require("../../language/kinds");

var _directives = require("../../type/directives");

function duplicateDirectiveMessage(directiveName) {
  return "The directive \"".concat(directiveName, "\" can only be used once at this location.");
}
/**
 * Unique directive names per location
 *
 * A GraphQL document is only valid if all non-repeatable directives at
 * a given location are uniquely named.
 */


function UniqueDirectivesPerLocation(context) {
  var uniqueDirectiveMap = Object.create(null);
  var schema = context.getSchema();
  var definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives;

  for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {
    var directive = definedDirectives[_i2];
    uniqueDirectiveMap[directive.name] = !directive.isRepeatable;
  }

  var astDefinitions = context.getDocument().definitions;

  for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {
    var def = astDefinitions[_i4];

    if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
      uniqueDirectiveMap[def.name.value] = !def.repeatable;
    }
  }

  return {
    // Many different AST nodes may contain directives. Rather than listing
    // them all, just listen for entering any node, and check to see if it
    // defines any directives.
    enter: function enter(node) {
      // Flow can't refine that node.directives will only contain directives,
      // so we cast so the rest of the code is well typed.
      var directives = node.directives;

      if (directives) {
        var knownDirectives = Object.create(null);

        for (var _i6 = 0; _i6 < directives.length; _i6++) {
          var _directive = directives[_i6];
          var directiveName = _directive.name.value;

          if (uniqueDirectiveMap[directiveName]) {
            if (knownDirectives[directiveName]) {
              context.reportError(new _GraphQLError.GraphQLError(duplicateDirectiveMessage(directiveName), [knownDirectives[directiveName], _directive]));
            } else {
              knownDirectives[directiveName] = _directive;
            }
          }
        }
      }
    }
  };
}


<|start_filename|>node_modules/cache-manager/lib/utils.js<|end_filename|>
var isObject = function isObject(value) {
    return value instanceof Object && value.constructor === Object;
};

var parseWrapArguments = function parseWrapArguments(args) {
    var length = args.length;
    var work;
    var options = {};
    var cb;

    /**
     * As we can receive an unlimited number of keys
     * we find the index of the first function which is
     * the "work" handler to fetch the keys.
     */
    for (var i = 0; i < length; i += 1) {
        if (typeof args[i] === 'function') {
            if (typeof args[i + 2] === 'function') {
                cb = args.pop();
            } else if (typeof args[i + 1] === 'function') {
                cb = args.pop();
            }
            if (isObject(args[i + 1])) {
                options = args.pop();
            }
            work = args.pop();
            break;
        }
    }

    return {
        keys: args,
        work: work,
        options: options,
        cb: cb
    };
};

module.exports = {
    isObject: isObject,
    parseWrapArguments: parseWrapArguments
};


<|start_filename|>node_modules/yurnalist/dist/reporters/lang/index.js<|end_filename|>
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.en = undefined;

var _en;

function _load_en() {
  return _en = _interopRequireDefault(require('./en.js'));
}

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.en = (_en || _load_en()).default;

<|start_filename|>node_modules/graphql-config/lib/index.js<|end_filename|>
"use strict";
function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
var getGraphQLConfig_1 = require("./getGraphQLConfig");
exports.getGraphQLConfig = getGraphQLConfig_1.getGraphQLConfig;
exports.getGraphQLProjectConfig = getGraphQLConfig_1.getGraphQLProjectConfig;
var findGraphQLConfigFile_1 = require("./findGraphQLConfigFile");
exports.GRAPHQL_CONFIG_NAME = findGraphQLConfigFile_1.GRAPHQL_CONFIG_NAME;
exports.GRAPHQL_CONFIG_YAML_NAME = findGraphQLConfigFile_1.GRAPHQL_CONFIG_YAML_NAME;
exports.findGraphQLConfigFile = findGraphQLConfigFile_1.findGraphQLConfigFile;
var utils_1 = require("./utils");
exports.writeSchema = utils_1.writeSchema;
exports.validateConfig = utils_1.validateConfig;
exports.getSchemaExtensions = utils_1.getSchemaExtensions;
__export(require("./errors"));
__export(require("./extensions/"));
var GraphQLConfig_1 = require("./GraphQLConfig");
exports.GraphQLConfig = GraphQLConfig_1.GraphQLConfig;
var GraphQLProjectConfig_1 = require("./GraphQLProjectConfig");
exports.GraphQLProjectConfig = GraphQLProjectConfig_1.GraphQLProjectConfig;


<|start_filename|>node_modules/graphql/jsutils/suggestionList.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = suggestionList;

/**
 * Given an invalid input string and a list of valid options, returns a filtered
 * list of valid options sorted based on their similarity with the input.
 */
function suggestionList(input, options) {
  var optionsByDistance = Object.create(null);
  var inputThreshold = input.length / 2;

  for (var _i2 = 0; _i2 < options.length; _i2++) {
    var option = options[_i2];
    var distance = lexicalDistance(input, option);
    var threshold = Math.max(inputThreshold, option.length / 2, 1);

    if (distance <= threshold) {
      optionsByDistance[option] = distance;
    }
  }

  return Object.keys(optionsByDistance).sort(function (a, b) {
    return optionsByDistance[a] - optionsByDistance[b];
  });
}
/**
 * Computes the lexical distance between strings A and B.
 *
 * The "distance" between two strings is given by counting the minimum number
 * of edits needed to transform string A into string B. An edit can be an
 * insertion, deletion, or substitution of a single character, or a swap of two
 * adjacent characters.
 *
 * Includes a custom alteration from Damerau-Levenshtein to treat case changes
 * as a single edit which helps identify mis-cased values with an edit distance
 * of 1.
 *
 * This distance can be useful for detecting typos in input or sorting
 *
 * @param {string} a
 * @param {string} b
 * @return {int} distance in number of edits
 */


function lexicalDistance(aStr, bStr) {
  if (aStr === bStr) {
    return 0;
  }

  var d = [];
  var a = aStr.toLowerCase();
  var b = bStr.toLowerCase();
  var aLength = a.length;
  var bLength = b.length; // Any case change counts as a single edit

  if (a === b) {
    return 1;
  }

  for (var i = 0; i <= aLength; i++) {
    d[i] = [i];
  }

  for (var j = 1; j <= bLength; j++) {
    d[0][j] = j;
  }

  for (var _i3 = 1; _i3 <= aLength; _i3++) {
    for (var _j = 1; _j <= bLength; _j++) {
      var cost = a[_i3 - 1] === b[_j - 1] ? 0 : 1;
      d[_i3][_j] = Math.min(d[_i3 - 1][_j] + 1, d[_i3][_j - 1] + 1, d[_i3 - 1][_j - 1] + cost);

      if (_i3 > 1 && _j > 1 && a[_i3 - 1] === b[_j - 2] && a[_i3 - 2] === b[_j - 1]) {
        d[_i3][_j] = Math.min(d[_i3][_j], d[_i3 - 2][_j - 2] + cost);
      }
    }
  }

  return d[aLength][bLength];
}


<|start_filename|>node_modules/opentracing/lib/mock_tracer/mock_report.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Index a collection of reported MockSpans in a way that's easy to run unit
 * test assertions against.
 */
var MockReport = /** @class */ (function () {
    function MockReport(spans) {
        var _this = this;
        this.spans = spans;
        this.spansByUUID = {};
        this.spansByTag = {};
        this.debugSpans = [];
        this.unfinishedSpans = [];
        spans.forEach(function (span) {
            if (span._finishMs === 0) {
                _this.unfinishedSpans.push(span);
            }
            _this.spansByUUID[span.uuid()] = span;
            _this.debugSpans.push(span.debug());
            var tags = span.tags();
            Object.keys(tags).forEach(function (key) {
                var val = tags[key];
                _this.spansByTag[key] = _this.spansByTag[key] || {};
                _this.spansByTag[key][val] = _this.spansByTag[key][val] || [];
                _this.spansByTag[key][val].push(span);
            });
        });
    }
    MockReport.prototype.firstSpanWithTagValue = function (key, val) {
        var m = this.spansByTag[key];
        if (!m) {
            return null;
        }
        var n = m[val];
        if (!n) {
            return null;
        }
        return n[0];
    };
    return MockReport;
}());
exports.MockReport = MockReport;
exports.default = MockReport;
//# sourceMappingURL=mock_report.js.map

<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-token.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */

/*
 * This file is part of The Croco Library
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 * 
 * Author: <NAME>
 * See COPYRIGHTS file for copyright information.
 */

#ifndef __CR_TOKEN_H__
#define __CR_TOKEN_H__

#include "cr-utils.h"
#include "cr-input.h"
#include "cr-num.h"
#include "cr-rgb.h"
#include "cr-string.h"
#include "cr-parsing-location.h"

G_BEGIN_DECLS

enum CRTokenType
{
        NO_TK,
        S_TK,
        CDO_TK,
        CDC_TK,
        INCLUDES_TK,
        DASHMATCH_TK,
        COMMENT_TK,
        STRING_TK,
        IDENT_TK,
        HASH_TK,
        IMPORT_SYM_TK,
        PAGE_SYM_TK,
        MEDIA_SYM_TK,
        FONT_FACE_SYM_TK,
        CHARSET_SYM_TK,
        ATKEYWORD_TK,
        IMPORTANT_SYM_TK,
        EMS_TK,
        EXS_TK,
        LENGTH_TK,
        ANGLE_TK,
        TIME_TK,
        FREQ_TK,
        DIMEN_TK,
        PERCENTAGE_TK,
        NUMBER_TK,
        RGB_TK,
        URI_TK,
        FUNCTION_TK,
        UNICODERANGE_TK,
        SEMICOLON_TK,
        CBO_TK, /*opening curly bracket*/
        CBC_TK, /*closing curly bracket*/
        PO_TK, /*opening parenthesis*/
        PC_TK, /*closing parenthesis*/
        BO_TK, /*opening bracket*/
        BC_TK, /*closing bracket*/
        DELIM_TK
} ;

enum CRTokenExtraType
{
        NO_ET = 0,
        LENGTH_PX_ET,
        LENGTH_CM_ET,
        LENGTH_MM_ET,
        LENGTH_IN_ET,
        LENGTH_PT_ET,
        LENGTH_PC_ET,
        ANGLE_DEG_ET,
        ANGLE_RAD_ET,
        ANGLE_GRAD_ET,
        TIME_MS_ET,
        TIME_S_ET,
        FREQ_HZ_ET,
        FREQ_KHZ_ET
} ;
 
typedef struct _CRToken CRToken ;

/**
 *This class abstracts a css2 token.
 */
struct _CRToken
{
        enum CRTokenType type ;
        enum CRTokenExtraType extra_type ;
        CRInputPos pos ;

        union
        {
                CRString *str ;
                CRRgb *rgb ;
                CRNum *num ;
                guint32 unichar ;
        } u ;

        CRString * dimen ;
        CRParsingLocation location ;
} ;

CRToken* cr_token_new (void) ;

enum CRStatus cr_token_set_s (CRToken *a_this) ;

enum CRStatus cr_token_set_cdo (CRToken *a_this) ;

enum CRStatus cr_token_set_cdc (CRToken *a_this) ;

enum CRStatus cr_token_set_includes (CRToken *a_this) ;

enum CRStatus cr_token_set_dashmatch (CRToken *a_this) ;

enum CRStatus cr_token_set_comment (CRToken *a_this, CRString *a_str) ;

enum CRStatus cr_token_set_string (CRToken *a_this, CRString *a_str) ;

enum CRStatus cr_token_set_ident (CRToken *a_this, CRString * a_ident) ;

enum CRStatus cr_token_set_hash (CRToken *a_this, CRString *a_hash) ;

enum CRStatus cr_token_set_rgb (CRToken *a_this, CRRgb *a_rgb) ;
        
enum CRStatus cr_token_set_import_sym (CRToken *a_this) ;
        
enum CRStatus cr_token_set_page_sym (CRToken *a_this) ;
        
enum CRStatus cr_token_set_media_sym (CRToken *a_this) ;
        
enum CRStatus cr_token_set_font_face_sym (CRToken *a_this) ;
        
enum CRStatus cr_token_set_charset_sym (CRToken *a_this) ;
        
enum CRStatus cr_token_set_atkeyword (CRToken *a_this, CRString *a_atname) ;
        
enum CRStatus cr_token_set_important_sym (CRToken *a_this) ;
        
enum CRStatus cr_token_set_ems (CRToken *a_this, CRNum *a_num) ;
        
enum CRStatus cr_token_set_exs (CRToken *a_this, CRNum *a_num) ;
        
enum CRStatus cr_token_set_length (CRToken *a_this, CRNum *a_num,
                                   enum CRTokenExtraType a_et) ;
        
enum CRStatus cr_token_set_angle (CRToken *a_this, CRNum *a_num,
                                  enum CRTokenExtraType a_et) ;
        
enum CRStatus cr_token_set_time (CRToken *a_this, CRNum *a_num,
                                 enum CRTokenExtraType a_et) ;
        
enum CRStatus cr_token_set_freq (CRToken *a_this, CRNum *a_num,
                                 enum CRTokenExtraType a_et) ;

enum CRStatus cr_token_set_dimen (CRToken *a_this, CRNum *a_num,
                                  CRString *a_dim) ;
        
enum CRStatus cr_token_set_percentage (CRToken *a_this, CRNum *a_num) ;
        
enum CRStatus cr_token_set_number (CRToken *a_this, CRNum *a_num) ;
        
enum CRStatus cr_token_set_uri (CRToken *a_this, CRString *a_uri) ;
        
enum CRStatus cr_token_set_function (CRToken *a_this, 
                                     CRString *a_fun_name) ;
        
enum CRStatus cr_token_set_bc (CRToken *a_this) ;
        
enum CRStatus cr_token_set_bo (CRToken *a_this) ;
        
enum CRStatus cr_token_set_po (CRToken *a_this) ;

enum CRStatus cr_token_set_pc (CRToken *a_this) ;

enum CRStatus cr_token_set_cbc (CRToken *a_this) ;

enum CRStatus cr_token_set_cbo (CRToken *a_this) ;

enum CRStatus cr_token_set_semicolon (CRToken *a_this) ;

enum CRStatus cr_token_set_delim (CRToken *a_this, guint32 a_char) ;

        
/*
  enum CRStatus
  cr_token_set_unicoderange (CRToken *a_this, 
  CRUnicodeRange *a_range) ;
*/

void
cr_token_destroy (CRToken *a_this) ;
        
	
G_END_DECLS

#endif /*__CR_TOKEN_H__*/


<|start_filename|>node_modules/sharp/vendor/include/pango/pango-matrix.h<|end_filename|>
/* Pango
 * pango-matrix.h: Matrix manipulation routines
 *
 * Copyright (C) 2002, 2006 Red Hat Software
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __PANGO_MATRIX_H__
#define __PANGO_MATRIX_H__

#include <glib.h>
#include <glib-object.h>

G_BEGIN_DECLS

typedef struct _PangoMatrix    PangoMatrix;

/**
 * PangoMatrix:
 * @xx: 1st component of the transformation matrix
 * @xy: 2nd component of the transformation matrix
 * @yx: 3rd component of the transformation matrix
 * @yy: 4th component of the transformation matrix
 * @x0: x translation
 * @y0: y translation
 *
 * A structure specifying a transformation between user-space
 * coordinates and device coordinates. The transformation
 * is given by
 *
 * <programlisting>
 * x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0;
 * y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;
 * </programlisting>
 *
 * Since: 1.6
 **/
struct _PangoMatrix
{
  double xx;
  double xy;
  double yx;
  double yy;
  double x0;
  double y0;
};

/**
 * PANGO_TYPE_MATRIX:
 *
 * The GObject type for #PangoMatrix
 **/
#define PANGO_TYPE_MATRIX (pango_matrix_get_type ())

/**
 * PANGO_MATRIX_INIT:
 *
 * Constant that can be used to initialize a PangoMatrix to
 * the identity transform.
 *
 * <informalexample><programlisting>
 * PangoMatrix matrix = PANGO_MATRIX_INIT;
 * pango_matrix_rotate (&amp;matrix, 45.);
 * </programlisting></informalexample>
 *
 * Since: 1.6
 **/
#define PANGO_MATRIX_INIT { 1., 0., 0., 1., 0., 0. }

/* for PangoRectangle */
#include <pango/pango-types.h>

PANGO_AVAILABLE_IN_1_6
GType pango_matrix_get_type (void) G_GNUC_CONST;

PANGO_AVAILABLE_IN_1_6
PangoMatrix *pango_matrix_copy   (const PangoMatrix *matrix);
PANGO_AVAILABLE_IN_1_6
void         pango_matrix_free   (PangoMatrix *matrix);

PANGO_AVAILABLE_IN_1_6
void pango_matrix_translate (PangoMatrix *matrix,
			     double       tx,
			     double       ty);
PANGO_AVAILABLE_IN_1_6
void pango_matrix_scale     (PangoMatrix *matrix,
			     double       scale_x,
			     double       scale_y);
PANGO_AVAILABLE_IN_1_6
void pango_matrix_rotate    (PangoMatrix *matrix,
			     double       degrees);
PANGO_AVAILABLE_IN_1_6
void pango_matrix_concat    (PangoMatrix       *matrix,
			     const PangoMatrix *new_matrix);
PANGO_AVAILABLE_IN_1_16
void pango_matrix_transform_point    (const PangoMatrix *matrix,
				      double            *x,
				      double            *y);
PANGO_AVAILABLE_IN_1_16
void pango_matrix_transform_distance (const PangoMatrix *matrix,
				      double            *dx,
				      double            *dy);
PANGO_AVAILABLE_IN_1_16
void pango_matrix_transform_rectangle (const PangoMatrix *matrix,
				       PangoRectangle    *rect);
PANGO_AVAILABLE_IN_1_16
void pango_matrix_transform_pixel_rectangle (const PangoMatrix *matrix,
					     PangoRectangle    *rect);
PANGO_AVAILABLE_IN_1_12
double pango_matrix_get_font_scale_factor (const PangoMatrix *matrix) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_38
void pango_matrix_get_font_scale_factors (const PangoMatrix *matrix,
					  double *xscale, double *yscale);


G_END_DECLS

#endif /* __PANGO_MATRIX_H__ */


<|start_filename|>node_modules/cache-manager/lib/index.js<|end_filename|>
/** @namespace cacheManager */
var cacheManager = {
    caching: require('./caching'),
    multiCaching: require('./multi_caching')
};

module.exports = cacheManager;


<|start_filename|>node_modules/sharp/vendor/include/orc/orcconstant.h<|end_filename|>

#ifndef _ORC_CONSTANT_H_
#define _ORC_CONSTANT_H_

#include <orc/orcutils.h>
#include <orc/orclimits.h>

ORC_BEGIN_DECLS


enum {
  ORC_CONST_ZERO,
  ORC_CONST_SPLAT_B,
  ORC_CONST_SPLAT_W,
  ORC_CONST_SPLAT_L,
  ORC_CONST_FULL
};

/**
 * OrcConstant:
 *
 * The OrcConstant structure has no public members
 */
struct _OrcConstant {
  /*< private >*/
  int type;
  int alloc_reg;
  unsigned int value;
  unsigned int full_value[4];
  int use_count;
  int is_long;
};


ORC_END_DECLS

#endif



<|start_filename|>node_modules/opentracing/lib/index.js<|end_filename|>
"use strict";
function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
var binary_carrier_1 = require("./binary_carrier");
exports.BinaryCarrier = binary_carrier_1.default;
var Tags = require("./ext/tags");
exports.Tags = Tags;
var Noop = require("./noop");
var reference_1 = require("./reference");
exports.Reference = reference_1.default;
var span_1 = require("./span");
exports.Span = span_1.default;
var span_context_1 = require("./span_context");
exports.SpanContext = span_context_1.default;
var tracer_1 = require("./tracer");
exports.Tracer = tracer_1.Tracer;
var mock_tracer_1 = require("./mock_tracer");
exports.MockTracer = mock_tracer_1.MockTracer;
__export(require("./global_tracer"));
__export(require("./constants"));
__export(require("./functions"));
// Initialize the noops last to avoid a dependecy cycle between the classes.
Noop.initialize();
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/sharp/vendor/include/vips/almostdeprecated.h<|end_filename|>
/* Old and broken stuff that we still enable by default, but don't document
 * and certainly don't recommend. 
 *
 * 30/6/09
 * 	- from vips.h
 */

/*

    This file is part of VIPS.
    
    VIPS is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301  USA

 */

/*

    These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk

 */

#ifndef IM_ALMOSTDEPRECATED_H
#define IM_ALMOSTDEPRECATED_H

#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/

/* Was public, now deprecated.
 */
typedef enum {
	IM_BBITS_BYTE = 8,
	IM_BBITS_SHORT = 16,
	IM_BBITS_INT = 32,
	IM_BBITS_FLOAT = 32,
	IM_BBITS_COMPLEX = 64,
	IM_BBITS_DOUBLE = 64,
	IM_BBITS_DPCOMPLEX = 128
} VipsBBits;

/* Used to define a region of interest for im_extract() etc. Too boring to be
 * public API, see im_extract_area() etc.
 */
typedef struct { 
	int xstart;
	int ystart;
	int xsize;
	int ysize;
	int chsel;      /* 1 2 3 or 0, for r g b or all respectively
			 *(channel select)	*/
} IMAGE_BOX;

int im_extract( IMAGE *, IMAGE *, IMAGE_BOX * );
DOUBLEMASK *im_measure( IMAGE *im, IMAGE_BOX *box, int h, int v, 
	int *sel, int nsel, const char *name );

gboolean im_isuint( IMAGE *im );
gboolean im_isint( IMAGE *im );
gboolean im_isfloat( IMAGE *im );
gboolean im_isscalar( IMAGE *im );
gboolean im_iscomplex( IMAGE *im );

int im_c2ps( IMAGE *in, IMAGE *out );

int im_clip( IMAGE *in, IMAGE *out );

#define MASK_IDEAL_HIGHPASS IM_MASK_IDEAL_HIGHPASS
#define MASK_IDEAL_LOWPASS IM_MASK_IDEAL_LOWPASS 
#define MASK_BUTTERWORTH_HIGHPASS IM_MASK_BUTTERWORTH_HIGHPASS 
#define MASK_BUTTERWORTH_LOWPASS IM_MASK_BUTTERWORTH_LOWPASS 
#define MASK_GAUSS_HIGHPASS IM_MASK_GAUSS_HIGHPASS 
#define MASK_GAUSS_LOWPASS IM_MASK_GAUSS_LOWPASS 

#define MASK_IDEAL_RINGPASS IM_MASK_IDEAL_RINGPASS
#define MASK_IDEAL_RINGREJECT IM_MASK_IDEAL_RINGREJECT 
#define MASK_BUTTERWORTH_RINGPASS IM_MASK_BUTTERWORTH_RINGPASS 
#define MASK_BUTTERWORTH_RINGREJECT IM_MASK_BUTTERWORTH_RINGREJECT 
#define MASK_GAUSS_RINGPASS IM_MASK_GAUSS_RINGPASS 
#define MASK_GAUSS_RINGREJECT IM_MASK_GAUSS_RINGREJECT 

#define MASK_IDEAL_BANDPASS IM_MASK_IDEAL_BANDPASS
#define MASK_IDEAL_BANDREJECT IM_MASK_IDEAL_BANDREJECT 
#define MASK_BUTTERWORTH_BANDPASS IM_MASK_BUTTERWORTH_BANDPASS 
#define MASK_BUTTERWORTH_BANDREJECT IM_MASK_BUTTERWORTH_BANDREJECT 
#define MASK_GAUSS_BANDPASS IM_MASK_GAUSS_BANDPASS 
#define MASK_GAUSS_BANDREJECT IM_MASK_GAUSS_BANDREJECT 

#define MASK_FRACTAL_FLT IM_MASK_FRACTAL_FLT

#define MaskType ImMaskType

/* Copy and swap types.
 */
typedef enum {
	IM_ARCH_NATIVE,
	IM_ARCH_BYTE_SWAPPED,
	IM_ARCH_LSB_FIRST,
	IM_ARCH_MSB_FIRST
} im_arch_type;

gboolean im_isnative( im_arch_type arch );
int im_copy_from( IMAGE *in, IMAGE *out, im_arch_type architecture );

/* Backwards compatibility macros.
 */
#define im_clear_error_string() im_error_clear()
#define im_errorstring() im_error_buffer()

/* Deprecated API.
 */
void im_errormsg( const char *fmt, ... )
	__attribute__((format(printf, 1, 2)));
void im_verrormsg( const char *fmt, va_list ap );
void im_errormsg_system( int err, const char *fmt, ... )
	__attribute__((format(printf, 2, 3)));
void im_diagnostics( const char *fmt, ... )
	__attribute__((format(printf, 1, 2)));
void im_warning( const char *fmt, ... )
	__attribute__((format(printf, 1, 2)));

int im_iterate( VipsImage *im,
	VipsStartFn start, im_generate_fn generate, VipsStopFn stop,
	void *a, void *b
);

/* Async rendering.
 */
int im_render_priority( VipsImage *in, VipsImage *out, VipsImage *mask,
	int width, int height, int max,
	int priority,
	void (*notify)( VipsImage *, VipsRect *, void * ), void *client );
int im_cache( VipsImage *in, VipsImage *out, int width, int height, int max );

/* Deprecated operations.
 */
int im_cmulnorm( IMAGE *in1, IMAGE *in2, IMAGE *out );
int im_fav4( IMAGE **, IMAGE * );
int im_gadd( double, IMAGE *, double, IMAGE *, double, IMAGE *);
int im_litecor( IMAGE *, IMAGE *, IMAGE *, int, double );
int im_render_fade( IMAGE *in, IMAGE *out, IMAGE *mask,
	int width, int height, int max,
	int fps, int steps,
	int priority,
	void (*notify)( IMAGE *, VipsRect *, void * ), void *client );
int im_render( IMAGE *in, IMAGE *out, IMAGE *mask,
	int width, int height, int max,
	void (*notify)( IMAGE *, VipsRect *, void * ), void *client );

int im_cooc_matrix( IMAGE *im, IMAGE *m,
	int xp, int yp, int xs, int ys, int dx, int dy, int flag );
int im_cooc_asm( IMAGE *m, double *asmoment );
int im_cooc_contrast( IMAGE *m, double *contrast );
int im_cooc_correlation( IMAGE *m, double *correlation );
int im_cooc_entropy( IMAGE *m, double *entropy );

int im_glds_matrix( IMAGE *im, IMAGE *m,
	int xpos, int ypos, int xsize, int ysize, int dx, int dy );
int im_glds_asm( IMAGE *m, double *asmoment );
int im_glds_contrast( IMAGE *m, double *contrast );
int im_glds_entropy( IMAGE *m, double *entropy );
int im_glds_mean( IMAGE *m, double *mean );

int im_dif_std(IMAGE *im, int xpos, int ypos, int xsize, int ysize, int dx, int dy, double *pmean, double *pstd);
int im_simcontr( IMAGE *out, int xsize, int ysize );
int im_spatres( IMAGE *in,  IMAGE *out, int step );

int im_stretch3( IMAGE *in, IMAGE *out, double dx, double dy );

/* Renamed operations.
 */

/* arithmetic
 */
int im_remainderconst_vec( IMAGE *in, IMAGE *out, int n, double *c );

/* boolean
 */
int im_andconst( IMAGE *, IMAGE *, double );
int im_and_vec( IMAGE *, IMAGE *, int, double * );
int im_orconst( IMAGE *, IMAGE *, double );
int im_or_vec( IMAGE *, IMAGE *, int, double * );
int im_eorconst( IMAGE *, IMAGE *, double );
int im_eor_vec( IMAGE *, IMAGE *, int, double * );

/* mosaicing
 */
int im_affine( IMAGE *in, IMAGE *out,
	double a, double b, double c, double d, double dx, double dy,
	int ox, int oy, int ow, int oh );
int im_similarity( IMAGE *in, IMAGE *out,
	double a, double b, double dx, double dy );
int im_similarity_area( IMAGE *in, IMAGE *out,
	double a, double b, double dx, double dy,
	int ox, int oy, int ow, int oh );

/* colour
 */
int im_icc_export( IMAGE *in, IMAGE *out, 
	const char *output_profile_filename, int intent );

/* conversion
 */
int im_clip2dcm( IMAGE *in, IMAGE *out );
int im_clip2cm( IMAGE *in, IMAGE *out );
int im_clip2us( IMAGE *in, IMAGE *out );
int im_clip2ui( IMAGE *in, IMAGE *out );
int im_clip2s( IMAGE *in, IMAGE *out );
int im_clip2i( IMAGE *in, IMAGE *out );
int im_clip2d( IMAGE *in, IMAGE *out );
int im_clip2f( IMAGE *in, IMAGE *out );
int im_clip2c( IMAGE *in, IMAGE *out );

int im_slice( IMAGE *in, IMAGE *out, double, double );
int im_thresh( IMAGE *in, IMAGE *out, double );

int im_print( const char *message );

int im_convsub( IMAGE *in, IMAGE *out, INTMASK *mask, int xskip, int yskip );

int im_bernd( const char *tiffname, int x, int y, int w, int h );

int im_resize_linear( IMAGE *, IMAGE *, int, int );

int im_convf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_convsepf( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_conv_raw( IMAGE *in, IMAGE *out, INTMASK *mask );
int im_convf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_convsep_raw( IMAGE *in, IMAGE *out, INTMASK *mask );
int im_convsepf_raw( IMAGE *in, IMAGE *out, DOUBLEMASK *mask );
int im_fastcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_spcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_gradcor_raw( IMAGE *in, IMAGE *ref, IMAGE *out );
int im_contrast_surface_raw( IMAGE *in, IMAGE *out, 
	int half_win_size, int spacing );

int im_stdif_raw( IMAGE *in, IMAGE *out,
	double a, double m0, double b, double s0, int xwin, int ywin );
int im_lhisteq_raw( IMAGE *in, IMAGE *out, int xwin, int ywin );

int im_erode_raw( IMAGE *in, IMAGE *out, INTMASK *m );
int im_dilate_raw( IMAGE *in, IMAGE *out, INTMASK *m );
int im_rank_raw( IMAGE *in, IMAGE *out, int xsize, int ysize, int order );

/* inplace
 */
int im_circle( IMAGE *im, int cx, int cy, int radius, int intensity );
int im_line( IMAGE *, int, int, int, int, int );
int im_segment( IMAGE *test, IMAGE *mask, int *segments );
int im_paintrect( IMAGE *im, VipsRect *r, PEL *ink );
int im_insertplace( IMAGE *main, IMAGE *sub, int x, int y );

int im_flood_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink );
int im_flood_blob_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink );
int im_flood_other_copy( IMAGE *test, IMAGE *mark, IMAGE *out, 
	int x, int y, int serial );

int im_flood( IMAGE *im, int x, int y, PEL *ink, VipsRect *dout );
int im_flood_blob( IMAGE *im, int x, int y, PEL *ink, VipsRect *dout );
int im_flood_other( IMAGE *test, IMAGE *mark, 
	int x, int y, int serial, VipsRect *dout );

int im_fastline( IMAGE *im, int x1, int y1, int x2, int y2, PEL *pel );
int im_fastlineuser( IMAGE *im, 
	int x1, int y1, int x2, int y2, 
	VipsPlotFn fn, void *client1, void *client2, void *client3 );

int im_plotmask( IMAGE *im, int ix, int iy, PEL *ink, PEL *mask, VipsRect *r );
int im_readpoint( IMAGE *im, int x, int y, PEL *pel );
int im_plotpoint( IMAGE *im, int x, int y, PEL *pel );

int im_smudge( IMAGE *image, int ix, int iy, VipsRect *r );
int im_smear( IMAGE *im, int ix, int iy, VipsRect *r );

void vips_warn( const char *domain, const char *fmt, ... )
	__attribute__((format(printf, 2, 3)));
void vips_vwarn( const char *domain, const char *fmt, va_list ap );
void vips_info_set( gboolean info );
void vips_info( const char *domain, const char *fmt, ... )
	__attribute__((format(printf, 2, 3)));
void vips_vinfo( const char *domain, const char *fmt, va_list ap );

#ifdef __cplusplus
}
#endif /*__cplusplus*/

#endif /*IM_ALMOSTDEPRECATED_H*/


<|start_filename|>node_modules/sharp/vendor/include/pango/pango-ot.h<|end_filename|>
/* Pango
 * pango-ot.h:
 *
 * Copyright (C) 2000,2007 Red Hat Software
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __PANGO_OT_H__
#define __PANGO_OT_H__

/* Deprecated.  Use HarfBuzz directly! */

#include <pango/pangofc-font.h>
#include <pango/pango-glyph.h>
#include <pango/pango-font.h>
#include <pango/pango-script.h>
#include <pango/pango-language.h>

G_BEGIN_DECLS

#ifdef PANGO_ENABLE_ENGINE

/**
 * PangoOTTag:
 *
 * The #PangoOTTag typedef is used to represent TrueType and OpenType
 * four letter tags inside Pango. Use PANGO_OT_TAG_MAKE()
 * or PANGO_OT_TAG_MAKE_FROM_STRING() macros to create <type>PangoOTTag</type>s manually.
 */
typedef guint32 PangoOTTag;

/**
 * PANGO_OT_TAG_MAKE:
 * @c1: First character.
 * @c2: Second character.
 * @c3: Third character.
 * @c4: Fourth character.
 *
 * Creates a #PangoOTTag from four characters.  This is similar and
 * compatible with the <function>FT_MAKE_TAG()</function> macro from FreeType.
 */
/**
 * PANGO_OT_TAG_MAKE_FROM_STRING:
 * @s: The string representation of the tag.
 *
 * Creates a #PangoOTTag from a string. The string should be at least
 * four characters long (pad with space characters if needed), and need
 * not be nul-terminated.  This is a convenience wrapper around
 * PANGO_OT_TAG_MAKE(), but cannot be used in certain situations, for
 * example, as a switch expression, as it dereferences pointers.
 */
#define PANGO_OT_TAG_MAKE(c1,c2,c3,c4)		((PangoOTTag) FT_MAKE_TAG (c1, c2, c3, c4))
#define PANGO_OT_TAG_MAKE_FROM_STRING(s)	(PANGO_OT_TAG_MAKE(((const char *) s)[0], \
								   ((const char *) s)[1], \
								   ((const char *) s)[2], \
								   ((const char *) s)[3]))

typedef struct _PangoOTInfo       PangoOTInfo;
typedef struct _PangoOTBuffer     PangoOTBuffer;
typedef struct _PangoOTGlyph      PangoOTGlyph;
typedef struct _PangoOTRuleset    PangoOTRuleset;
typedef struct _PangoOTFeatureMap PangoOTFeatureMap;
typedef struct _PangoOTRulesetDescription PangoOTRulesetDescription;

/**
 * PangoOTTableType:
 * @PANGO_OT_TABLE_GSUB: The GSUB table.
 * @PANGO_OT_TABLE_GPOS: The GPOS table.
 *
 * The <type>PangoOTTableType</type> enumeration values are used to
 * identify the various OpenType tables in the
 * <function>pango_ot_info_*</function> functions.
 */
typedef enum
{
  PANGO_OT_TABLE_GSUB,
  PANGO_OT_TABLE_GPOS
} PangoOTTableType;

/**
 * PANGO_OT_ALL_GLYPHS:
 *
 * This is used as the property bit in pango_ot_ruleset_add_feature() when a
 * feature should be applied to all glyphs.
 *
 * Since: 1.16
 */
/**
 * PANGO_OT_NO_FEATURE:
 *
 * This is used as a feature index that represent no feature, that is, should be
 * skipped.  It may be returned as feature index by pango_ot_info_find_feature()
 * if the feature is not found, and pango_ot_ruleset_add_feature() function
 * automatically skips this value, so no special handling is required by the user.
 *
 * Since: 1.18
 */
/**
 * PANGO_OT_NO_SCRIPT:
 *
 * This is used as a script index that represent no script, that is, when the
 * requested script was not found, and a default ('DFLT') script was not found
 * either.  It may be returned as script index by pango_ot_info_find_script()
 * if the script or a default script are not found, all other functions
 * taking a script index essentially return if the input script index is
 * this value, so no special handling is required by the user.
 *
 * Since: 1.18
 */
/**
 * PANGO_OT_DEFAULT_LANGUAGE:
 *
 * This is used as the language index in pango_ot_info_find_feature() when
 * the default language system of the script is desired.
 *
 * It is also returned by pango_ot_info_find_language() if the requested language
 * is not found, or the requested language tag was PANGO_OT_TAG_DEFAULT_LANGUAGE.
 * The end result is that one can always call pango_ot_tag_from_language()
 * followed by pango_ot_info_find_language() and pass the result to
 * pango_ot_info_find_feature() without having to worry about falling back to
 * default language system explicitly.
 *
 * Since: 1.16
 */
#define PANGO_OT_ALL_GLYPHS			((guint) 0xFFFF)
#define PANGO_OT_NO_FEATURE			((guint) 0xFFFF)
#define PANGO_OT_NO_SCRIPT			((guint) 0xFFFF)
#define PANGO_OT_DEFAULT_LANGUAGE		((guint) 0xFFFF)

/**
 * PANGO_OT_TAG_DEFAULT_SCRIPT:
 *
 * This is a #PangoOTTag representing the special script tag 'DFLT'.  It is
 * returned as script tag by pango_ot_tag_from_script() if the requested script
 * is not found.
 *
 * Since: 1.18
 */
/**
 * PANGO_OT_TAG_DEFAULT_LANGUAGE:
 *
 * This is a #PangoOTTag representing a special language tag 'dflt'.  It is
 * returned as language tag by pango_ot_tag_from_language() if the requested
 * language is not found.  It is safe to pass this value to
 * pango_ot_info_find_language() as that function falls back to returning default
 * language-system if the requested language tag is not found.
 *
 * Since: 1.18
 */
#define PANGO_OT_TAG_DEFAULT_SCRIPT		PANGO_OT_TAG_MAKE ('D', 'F', 'L', 'T')
#define PANGO_OT_TAG_DEFAULT_LANGUAGE		PANGO_OT_TAG_MAKE ('d', 'f', 'l', 't')

/* Note that this must match hb_glyph_info_t */
/**
 * PangoOTGlyph:
 * @glyph: the glyph itself.
 * @properties: the properties value, identifying which features should be
 * applied on this glyph.  See pango_ot_ruleset_add_feature().
 * @cluster: the cluster that this glyph belongs to.
 * @component: a component value, set by the OpenType layout engine.
 * @ligID: a ligature index value, set by the OpenType layout engine.
 * @internal: for Pango internal use
 *
 * The #PangoOTGlyph structure represents a single glyph together with
 * information used for OpenType layout processing of the glyph.
 * It contains the following fields.
 */
struct _PangoOTGlyph
{
  guint32  glyph;
  guint    properties;
  guint    cluster;
  gushort  component;
  gushort  ligID;

  guint    internal;
};

/**
 * PangoOTFeatureMap:
 * @feature_name: feature tag in represented as four-letter ASCII string.
 * @property_bit: the property bit to use for this feature.  See
 * pango_ot_ruleset_add_feature() for details.
 *
 * The #PangoOTFeatureMap typedef is used to represent an OpenType
 * feature with the property bit associated with it.  The feature tag is
 * represented as a char array instead of a #PangoOTTag for convenience.
 *
 * Since: 1.18
 */
struct _PangoOTFeatureMap
{
  char     feature_name[5];
  gulong   property_bit;
};

/**
 * PangoOTRulesetDescription:
 * @script: a #PangoScript.
 * @language: a #PangoLanguage.
 * @static_gsub_features: (nullable): static map of GSUB features,
 * or %NULL.
 * @n_static_gsub_features: length of @static_gsub_features, or 0.
 * @static_gpos_features: (nullable): static map of GPOS features,
 * or %NULL.
 * @n_static_gpos_features: length of @static_gpos_features, or 0.
 * @other_features: (nullable): map of extra features to add to both
 * GSUB and GPOS, or %NULL.  Unlike the static maps, this pointer
 * need not live beyond the life of function calls taking this
 * struct.
 * @n_other_features: length of @other_features, or 0.
 *
 * The #PangoOTRuleset structure holds all the information needed
 * to build a complete #PangoOTRuleset from an OpenType font.
 * The main use of this struct is to act as the key for a per-font
 * hash of rulesets.  The user populates a ruleset description and
 * gets the ruleset using pango_ot_ruleset_get_for_description()
 * or create a new one using pango_ot_ruleset_new_from_description().
 *
 * Since: 1.18
 */
struct _PangoOTRulesetDescription {
  PangoScript               script;
  PangoLanguage            *language;
  const PangoOTFeatureMap  *static_gsub_features;
  guint                   n_static_gsub_features;
  const PangoOTFeatureMap  *static_gpos_features;
  guint                   n_static_gpos_features;
  const PangoOTFeatureMap  *other_features;
  guint                   n_other_features;
};


#define PANGO_TYPE_OT_INFO              (pango_ot_info_get_type ())
#define PANGO_OT_INFO(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_OT_INFO, PangoOTInfo))
#define PANGO_IS_OT_INFO(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_OT_INFO))
PANGO_DEPRECATED
GType pango_ot_info_get_type (void) G_GNUC_CONST;

#define PANGO_TYPE_OT_RULESET           (pango_ot_ruleset_get_type ())
#define PANGO_OT_RULESET(object)        (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_OT_RULESET, PangoOTRuleset))
#define PANGO_IS_OT_RULESET(object)     (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_OT_RULESET))
PANGO_DEPRECATED
GType pango_ot_ruleset_get_type (void) G_GNUC_CONST;


PANGO_DEPRECATED
PangoOTInfo *pango_ot_info_get (FT_Face face);

PANGO_DEPRECATED
gboolean pango_ot_info_find_script   (PangoOTInfo      *info,
				      PangoOTTableType  table_type,
				      PangoOTTag        script_tag,
				      guint            *script_index);

PANGO_DEPRECATED
gboolean pango_ot_info_find_language (PangoOTInfo      *info,
				      PangoOTTableType  table_type,
				      guint             script_index,
				      PangoOTTag        language_tag,
				      guint            *language_index,
				      guint            *required_feature_index);
PANGO_DEPRECATED
gboolean pango_ot_info_find_feature  (PangoOTInfo      *info,
				      PangoOTTableType  table_type,
				      PangoOTTag        feature_tag,
				      guint             script_index,
				      guint             language_index,
				      guint            *feature_index);

PANGO_DEPRECATED
PangoOTTag *pango_ot_info_list_scripts   (PangoOTInfo      *info,
					  PangoOTTableType  table_type);
PANGO_DEPRECATED
PangoOTTag *pango_ot_info_list_languages (PangoOTInfo      *info,
					  PangoOTTableType  table_type,
					  guint             script_index,
					  PangoOTTag        language_tag);
PANGO_DEPRECATED
PangoOTTag *pango_ot_info_list_features  (PangoOTInfo      *info,
					  PangoOTTableType  table_type,
					  PangoOTTag        tag,
					  guint             script_index,
					  guint             language_index);

PANGO_DEPRECATED
PangoOTBuffer *pango_ot_buffer_new        (PangoFcFont       *font);
PANGO_DEPRECATED
void           pango_ot_buffer_destroy    (PangoOTBuffer     *buffer);
PANGO_DEPRECATED
void           pango_ot_buffer_clear      (PangoOTBuffer     *buffer);
PANGO_DEPRECATED
void           pango_ot_buffer_set_rtl    (PangoOTBuffer     *buffer,
					   gboolean           rtl);
PANGO_DEPRECATED
void           pango_ot_buffer_add_glyph  (PangoOTBuffer     *buffer,
					   guint              glyph,
					   guint              properties,
					   guint              cluster);
PANGO_DEPRECATED
void           pango_ot_buffer_get_glyphs (const PangoOTBuffer  *buffer,
					   PangoOTGlyph        **glyphs,
					   int                  *n_glyphs);
PANGO_DEPRECATED
void           pango_ot_buffer_output     (const PangoOTBuffer  *buffer,
					   PangoGlyphString     *glyphs);

PANGO_DEPRECATED
void           pango_ot_buffer_set_zero_width_marks (PangoOTBuffer     *buffer,
						     gboolean           zero_width_marks);

PANGO_DEPRECATED
const PangoOTRuleset *pango_ot_ruleset_get_for_description (PangoOTInfo                     *info,
							    const PangoOTRulesetDescription *desc);
PANGO_DEPRECATED
PangoOTRuleset *pango_ot_ruleset_new (PangoOTInfo       *info);
PANGO_DEPRECATED
PangoOTRuleset *pango_ot_ruleset_new_for (PangoOTInfo       *info,
					  PangoScript        script,
					  PangoLanguage     *language);
PANGO_DEPRECATED
PangoOTRuleset *pango_ot_ruleset_new_from_description (PangoOTInfo                     *info,
						       const PangoOTRulesetDescription *desc);
PANGO_DEPRECATED
void            pango_ot_ruleset_add_feature (PangoOTRuleset   *ruleset,
					      PangoOTTableType  table_type,
					      guint             feature_index,
					      gulong            property_bit);
PANGO_DEPRECATED
gboolean        pango_ot_ruleset_maybe_add_feature (PangoOTRuleset   *ruleset,
						    PangoOTTableType  table_type,
						    PangoOTTag        feature_tag,
						    gulong            property_bit);
PANGO_DEPRECATED
guint           pango_ot_ruleset_maybe_add_features (PangoOTRuleset          *ruleset,
						     PangoOTTableType         table_type,
						     const PangoOTFeatureMap *features,
						     guint                    n_features);
PANGO_DEPRECATED
guint           pango_ot_ruleset_get_feature_count (const PangoOTRuleset   *ruleset,
						    guint                  *n_gsub_features,
						    guint                  *n_gpos_features);

PANGO_DEPRECATED
void            pango_ot_ruleset_substitute  (const PangoOTRuleset   *ruleset,
					      PangoOTBuffer          *buffer);

PANGO_DEPRECATED
void            pango_ot_ruleset_position    (const PangoOTRuleset   *ruleset,
					      PangoOTBuffer          *buffer);

PANGO_DEPRECATED
PangoScript     pango_ot_tag_to_script     (PangoOTTag     script_tag) G_GNUC_CONST;

PANGO_DEPRECATED
PangoOTTag      pango_ot_tag_from_script   (PangoScript    script) G_GNUC_CONST;

PANGO_DEPRECATED
PangoLanguage  *pango_ot_tag_to_language   (PangoOTTag     language_tag) G_GNUC_CONST;

PANGO_DEPRECATED
PangoOTTag      pango_ot_tag_from_language (PangoLanguage *language) G_GNUC_CONST;

PANGO_DEPRECATED
guint           pango_ot_ruleset_description_hash  (const PangoOTRulesetDescription *desc) G_GNUC_PURE;

PANGO_DEPRECATED
gboolean        pango_ot_ruleset_description_equal (const PangoOTRulesetDescription *desc1,
						    const PangoOTRulesetDescription *desc2) G_GNUC_PURE;

PANGO_DEPRECATED
PangoOTRulesetDescription *pango_ot_ruleset_description_copy  (const PangoOTRulesetDescription *desc);

PANGO_DEPRECATED
void            pango_ot_ruleset_description_free  (PangoOTRulesetDescription       *desc);


#endif /* PANGO_ENABLE_ENGINE */

G_END_DECLS

#endif /* __PANGO_OT_H__ */


<|start_filename|>node_modules/sharp/vendor/include/libexif/exif-ifd.h<|end_filename|>
/* exif-ifd.h
 *
 * Copyright (c) 2002 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA.
 */

#ifndef __EXIF_IFD_H__
#define __EXIF_IFD_H__

/*! Possible EXIF Image File Directories */
typedef enum {
	EXIF_IFD_0 = 0,                /*!< */
	EXIF_IFD_1,                    /*!< */
	EXIF_IFD_EXIF,                 /*!< */
	EXIF_IFD_GPS,                  /*!< */
	EXIF_IFD_INTEROPERABILITY,     /*!< */
	EXIF_IFD_COUNT                 /*!< Not a real value, just (max_value + 1). */
} ExifIfd;

/*! Return a textual name of the given IFD. The name is a short, unique,
 * non-localized text string containing only US-ASCII alphanumeric
 * characters.
 *
 * \param[in] ifd IFD
 * \return textual name of the IFD
 */
const char *exif_ifd_get_name (ExifIfd ifd);

#endif /* __EXIF_IFD_H__ */


<|start_filename|>node_modules/graphql/jsutils/isObjectLike.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isObjectLike;

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

/**
 * Return true if `value` is object-like. A value is object-like if it's not
 * `null` and has a `typeof` result of "object".
 */
function isObjectLike(value) {
  return _typeof(value) == 'object' && value !== null;
}


<|start_filename|>node_modules/graphql/utilities/coerceValue.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.coerceValue = coerceValue;

var _inspect = _interopRequireDefault(require("../jsutils/inspect"));

var _printPathArray = _interopRequireDefault(require("../jsutils/printPathArray"));

var _Path = require("../jsutils/Path");

var _GraphQLError = require("../error/GraphQLError");

var _coerceInputValue = require("./coerceInputValue");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/* istanbul ignore file */

/**
 * Deprecated. Use coerceInputValue() directly for richer information.
 *
 * This function will be removed in v15
 */
function coerceValue(inputValue, type, blameNode, path) {
  var errors = [];
  var value = (0, _coerceInputValue.coerceInputValue)(inputValue, type, function (errorPath, invalidValue, error) {
    var errorPrefix = 'Invalid value ' + (0, _inspect.default)(invalidValue);
    var pathArray = [].concat((0, _Path.pathToArray)(path), errorPath);

    if (pathArray.length > 0) {
      errorPrefix += " at \"value".concat((0, _printPathArray.default)(pathArray), "\"");
    }

    errors.push(new _GraphQLError.GraphQLError(errorPrefix + ': ' + error.message, blameNode, undefined, undefined, undefined, error.originalError));
  });
  return errors.length > 0 ? {
    errors: errors,
    value: undefined
  } : {
    errors: undefined,
    value: value
  };
}


<|start_filename|>node_modules/probe-image-size/lib/parse_sync/psd.js<|end_filename|>
'use strict';

/* eslint-disable consistent-return */

var str2arr      = require('../common').str2arr;
var sliceEq      = require('../common').sliceEq;
var readUInt32BE = require('../common').readUInt32BE;


var SIG_8BPS  = str2arr('8BPS\x00\x01');


module.exports = function (data) {
  if (data.length < 6 + 16) return;

  // signature + version
  if (!sliceEq(data, 0, SIG_8BPS)) return;

  return {
    width:  readUInt32BE(data, 6 + 12),
    height: readUInt32BE(data, 6 + 8),
    type: 'psd',
    mime: 'image/vnd.adobe.photoshop',
    wUnits: 'px',
    hUnits: 'px'
  };
};


<|start_filename|>node_modules/@jimp/jpeg/es/index.js<|end_filename|>
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

import JPEG from 'jpeg-js';
import { throwError, isNodePattern } from '@jimp/utils';
var MIME_TYPE = 'image/jpeg';
export default (function () {
  return {
    mime: _defineProperty({}, MIME_TYPE, ['jpeg', 'jpg', 'jpe']),
    constants: {
      MIME_JPEG: MIME_TYPE
    },
    decoders: _defineProperty({}, MIME_TYPE, JPEG.decode),
    encoders: _defineProperty({}, MIME_TYPE, function (image) {
      return JPEG.encode(image.bitmap, image._quality).data;
    }),
    class: {
      // The quality to be used when saving JPEG images
      _quality: 100,

      /**
       * Sets the quality of the image when saving as JPEG format (default is 100)
       * @param {number} n The quality to use 0-100
       * @param {function(Error, Jimp)} cb (optional) a callback for when complete
       * @returns {Jimp} this for chaining of methods
       */
      quality: function quality(n, cb) {
        if (typeof n !== 'number') {
          return throwError.call(this, 'n must be a number', cb);
        }

        if (n < 0 || n > 100) {
          return throwError.call(this, 'n must be a number 0 - 100', cb);
        }

        this._quality = Math.round(n);

        if (isNodePattern(cb)) {
          cb.call(this, null, this);
        }

        return this;
      }
    }
  };
});
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/@jimp/utils/src/index.js<|end_filename|>
export function isNodePattern(cb) {
  if (typeof cb === 'undefined') {
    return false;
  }

  if (typeof cb !== 'function') {
    throw new TypeError('Callback must be a function');
  }

  return true;
}

export function throwError(error, cb) {
  if (typeof error === 'string') {
    error = new Error(error);
  }

  if (typeof cb === 'function') {
    return cb.call(this, error);
  }

  throw error;
}

export function scan(image, x, y, w, h, f) {
  // round input
  x = Math.round(x);
  y = Math.round(y);
  w = Math.round(w);
  h = Math.round(h);

  for (let _y = y; _y < y + h; _y++) {
    for (let _x = x; _x < x + w; _x++) {
      const idx = (image.bitmap.width * _y + _x) << 2;
      f.call(image, _x, _y, idx);
    }
  }

  return image;
}


<|start_filename|>node_modules/is-relative-url/index.js<|end_filename|>
'use strict';
const isAbsoluteUrl = require('is-absolute-url');

module.exports = url => !isAbsoluteUrl(url);


<|start_filename|>node_modules/sharp/vendor/include/fribidi-joining-types.h<|end_filename|>
/* FriBidi
 * fribidi-joining-types.h - character joining types
 *
 * Author:
 *   <NAME>, 2001, 2002, 2004
 *
 * Copyright (C) 2004 <NAME>, Inc.
 * Copyright (C) 2001,2002 <NAME>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library, in a file named COPYING; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA
 *
 * For licensing issues, contact <<EMAIL>>.
 */
#ifndef _FRIBIDI_JOINING_TYPES_H
#define _FRIBIDI_JOINING_TYPES_H

#include "fribidi-common.h"

#include "fribidi-types.h"

#include "fribidi-begindecls.h"

/* 
 * Define bit masks that joining types are based on, each mask has
 * only one bit set.
 */

#define FRIBIDI_MASK_JOINS_RIGHT	0x01	/* May join to right */
#define FRIBIDI_MASK_JOINS_LEFT		0x02	/* May join to right */
#define FRIBIDI_MASK_ARAB_SHAPES	0x04	/* May Arabic shape */
#define FRIBIDI_MASK_TRANSPARENT	0x08	/* Is transparent */
#define FRIBIDI_MASK_IGNORED		0x10	/* Is ignored */
#define FRIBIDI_MASK_LIGATURED		0x20	/* Is ligatured */

/*
 * Define values for FriBidiJoiningType
 */

/* nUn-joining */
#define FRIBIDI_JOINING_TYPE_U_VAL	( 0 )

/* Right-joining */
#define FRIBIDI_JOINING_TYPE_R_VAL	\
	( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_ARAB_SHAPES )

/* Dual-joining */
#define FRIBIDI_JOINING_TYPE_D_VAL	\
	( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT \
	| FRIBIDI_MASK_ARAB_SHAPES )

/* join-Causing */
#define FRIBIDI_JOINING_TYPE_C_VAL	\
	( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT )

/* Left-joining */
#define FRIBIDI_JOINING_TYPE_L_VAL	\
	( FRIBIDI_MASK_JOINS_LEFT | FRIBIDI_MASK_ARAB_SHAPES )

/* Transparent */
#define FRIBIDI_JOINING_TYPE_T_VAL	\
	( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_ARAB_SHAPES )

/* iGnored */
#define FRIBIDI_JOINING_TYPE_G_VAL	( FRIBIDI_MASK_IGNORED )


enum _FriBidiJoiningTypeEnum
{
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \
	FRIBIDI_JOINING_TYPE_##TYPE = FRIBIDI_JOINING_TYPE_##TYPE##_VAL,
# include "fribidi-joining-types-list.h"
# undef _FRIBIDI_ADD_TYPE
  _FRIBIDI_JOINING_TYPE_JUNK	/* Don't use this */
};

#ifdef __FRIBIDI_DOC
typedef enum _FriBidiJoiningTypeEnum FriBidiJoiningType;
#else /* !__FRIBIDI_DOC */
typedef uint8_t FriBidiJoiningType;
#endif /* !__FRIBIDI_DOC */

/* FriBidiArabicProp is essentially the same type as FriBidiJoiningType, but
 * not limited to the few values returned by fribidi_get_joining_type. */
typedef uint8_t FriBidiArabicProp;

/*
 * The equivalent of JoiningType values for ArabicProp
 */

/* Primary Arabic Joining Classes (Table 8-2) */

/* nUn-joining */
#define FRIBIDI_IS_JOINING_TYPE_U(p)	\
	( 0 == ( (p) &	\
		( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED	\
		| FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) ) )

/* Right-joining */
#define FRIBIDI_IS_JOINING_TYPE_R(p)	\
	( FRIBIDI_MASK_JOINS_RIGHT == ( (p) &	\
		( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED	\
		| FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) ) )

/* Dual-joining */
#define FRIBIDI_IS_JOINING_TYPE_D(p)	\
	( ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT	\
	  | FRIBIDI_MASK_ARAB_SHAPES ) == ( (p) &	\
		( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED	\
		| FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT	\
		| FRIBIDI_MASK_ARAB_SHAPES ) ) )

/* join-Causing */
#define FRIBIDI_IS_JOINING_TYPE_C(p)	\
	( ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) == ( (p) & \
		( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED	\
		| FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT	\
		| FRIBIDI_MASK_ARAB_SHAPES ) ) )

/* Left-joining */
#define FRIBIDI_IS_JOINING_TYPE_L(p)	\
	( FRIBIDI_MASK_JOINS_LEFT == ( (p) &	\
		( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED	\
		| FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ) ) )

/* Transparent */
#define FRIBIDI_IS_JOINING_TYPE_T(p)	\
	( FRIBIDI_MASK_TRANSPARENT == ( (p) &	\
		( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED ) ) )

/* iGnored */
#define FRIBIDI_IS_JOINING_TYPE_G(p)	\
	( FRIBIDI_MASK_IGNORED == ( (p) &	\
		( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED ) ) )

/* and for Derived Arabic Joining Classes (Table 8-3) */

/* Right join-Causing */
#define FRIBIDI_IS_JOINING_TYPE_RC(p)	\
	( FRIBIDI_MASK_JOINS_RIGHT == ( (p) &	\
		( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED	\
		| FRIBIDI_MASK_JOINS_RIGHT ) ) )

/* Left join-Causing */
#define FRIBIDI_IS_JOINING_TYPE_LC(p)	\
	( FRIBIDI_MASK_JOINS_LEFT == ( (p) &	\
		( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED	\
		| FRIBIDI_MASK_JOINS_LEFT ) ) )


/*
 * Defining macros for needed queries, It is fully dependent on the 
 * implementation of FriBidiJoiningType.
 */

/* Joins to right: R, D, C? */
#define FRIBIDI_JOINS_RIGHT(p)	((p) & FRIBIDI_MASK_JOINS_RIGHT)

/* Joins to left: L, D, C? */
#define FRIBIDI_JOINS_LEFT(p)	((p) & FRIBIDI_MASK_JOINS_LEFT)

/* May shape: R, D, L, T? */
#define FRIBIDI_ARAB_SHAPES(p)	((p) & FRIBIDI_MASK_ARAB_SHAPES)

/* Is skipped in joining: T, G? */
#define FRIBIDI_IS_JOIN_SKIPPED(p)	\
	((p) & (FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED))

/* Is base that will be shaped: R, D, L? */
#define FRIBIDI_IS_JOIN_BASE_SHAPES(p)	\
	( FRIBIDI_MASK_ARAB_SHAPES == ( (p) &	\
		( FRIBIDI_MASK_TRANSPARENT | FRIBIDI_MASK_IGNORED	\
		| FRIBIDI_MASK_ARAB_SHAPES ) ) )

#define FRIBIDI_JOINS_PRECEDING_MASK(level)	\
	(FRIBIDI_LEVEL_IS_RTL (level) ? FRIBIDI_MASK_JOINS_RIGHT	\
				      : FRIBIDI_MASK_JOINS_LEFT)

#define FRIBIDI_JOINS_FOLLOWING_MASK(level)	\
	(FRIBIDI_LEVEL_IS_RTL (level) ? FRIBIDI_MASK_JOINS_LEFT	\
				      : FRIBIDI_MASK_JOINS_RIGHT)

#define FRIBIDI_JOIN_SHAPE(p)	\
	((p) & ( FRIBIDI_MASK_JOINS_RIGHT | FRIBIDI_MASK_JOINS_LEFT ))

/* Functions finally */


/* fribidi_get_joining_type - get character joining type
 *
 * This function returns the joining type of a character as defined in Table
 * 8-2 Primary Arabic Joining Classes of the Unicode standard available at
 * http://www.unicode.org/versions/Unicode4.0.0/ch08.pdf#G7462, using data
 * provided in file ArabicShaping.txt and UnicodeData.txt of the Unicode
 * Character Database available at
 * http://www.unicode.org/Public/UNIDATA/ArabicShaping.txt and
 * http://www.unicode.org/Public/UNIDATA/UnicodeData.txt. 
 *
 * There are a few macros defined in fribidi-joining-types.h for querying a
 * joining type.
 */
FRIBIDI_ENTRY FriBidiJoiningType
fribidi_get_joining_type (
  FriBidiChar ch		/* input character */
) FRIBIDI_GNUC_CONST;

/* fribidi_get_joining_types - get joining types for an string of characters
 *
 * This function finds the joining types of an string of characters.  See
 * fribidi_get_joining_type for more information about the joining types
 * returned by this function.
 */
     FRIBIDI_ENTRY void fribidi_get_joining_types (
  const FriBidiChar *str,	/* input string */
  const FriBidiStrIndex len,	/* input string length */
  FriBidiJoiningType *jtypes	/* output joining types */
);

/* fribidi_get_joining_type_name - get joining type name
 *
 * This function returns the joining type name of a joining type.  The
 * returned string is a static string and should not be freed.
 *
 * The type names are the same as ones defined in Table 8-2  Primary Arabic
 * Joining Classes of the Unicode standard available at
 * http://www.unicode.org/versions/Unicode4.0.0/ch08.pdf#G7462.
 */
     FRIBIDI_ENTRY const char *fribidi_get_joining_type_name (
  FriBidiJoiningType j		/* input joining type */
) FRIBIDI_GNUC_CONST;

#include "fribidi-enddecls.h"

#endif /* !_FRIBIDI_JOINING_TYPES_H */
/* Editor directions:
 * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
 */


<|start_filename|>node_modules/@babel/plugin-transform-react-jsx/lib/index.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _helperPluginUtils = require("@babel/helper-plugin-utils");

var _pluginSyntaxJsx = _interopRequireDefault(require("@babel/plugin-syntax-jsx"));

var _helperBuilderReactJsx = _interopRequireDefault(require("@babel/helper-builder-react-jsx"));

var _core = require("@babel/core");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var _default = (0, _helperPluginUtils.declare)((api, options) => {
  api.assertVersion(7);
  const THROW_IF_NAMESPACE = options.throwIfNamespace === undefined ? true : !!options.throwIfNamespace;
  const PRAGMA_DEFAULT = options.pragma || "React.createElement";
  const PRAGMA_FRAG_DEFAULT = options.pragmaFrag || "React.Fragment";
  const JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/;
  const JSX_FRAG_ANNOTATION_REGEX = /\*?\s*@jsxFrag\s+([^\s]+)/;

  const createIdentifierParser = id => () => {
    return id.split(".").map(name => _core.types.identifier(name)).reduce((object, property) => _core.types.memberExpression(object, property));
  };

  const visitor = (0, _helperBuilderReactJsx.default)({
    pre(state) {
      const tagName = state.tagName;
      const args = state.args;

      if (_core.types.react.isCompatTag(tagName)) {
        args.push(_core.types.stringLiteral(tagName));
      } else {
        args.push(state.tagExpr);
      }
    },

    post(state, pass) {
      state.callee = pass.get("jsxIdentifier")();
    },

    throwIfNamespace: THROW_IF_NAMESPACE
  });
  visitor.Program = {
    enter(path, state) {
      const {
        file
      } = state;
      let pragma = PRAGMA_DEFAULT;
      let pragmaFrag = PRAGMA_FRAG_DEFAULT;
      let pragmaSet = !!options.pragma;
      let pragmaFragSet = !!options.pragmaFrag;

      if (file.ast.comments) {
        for (const comment of file.ast.comments) {
          const jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value);

          if (jsxMatches) {
            pragma = jsxMatches[1];
            pragmaSet = true;
          }

          const jsxFragMatches = JSX_FRAG_ANNOTATION_REGEX.exec(comment.value);

          if (jsxFragMatches) {
            pragmaFrag = jsxFragMatches[1];
            pragmaFragSet = true;
          }
        }
      }

      state.set("jsxIdentifier", createIdentifierParser(pragma));
      state.set("jsxFragIdentifier", createIdentifierParser(pragmaFrag));
      state.set("usedFragment", false);
      state.set("pragmaSet", pragmaSet);
      state.set("pragmaFragSet", pragmaFragSet);
    },

    exit(path, state) {
      if (state.get("pragmaSet") && state.get("usedFragment") && !state.get("pragmaFragSet")) {
        throw new Error("transform-react-jsx: pragma has been set but " + "pragmaFrag has not been set");
      }
    }

  };

  visitor.JSXAttribute = function (path) {
    if (_core.types.isJSXElement(path.node.value)) {
      path.node.value = _core.types.jsxExpressionContainer(path.node.value);
    }
  };

  return {
    name: "transform-react-jsx",
    inherits: _pluginSyntaxJsx.default,
    visitor
  };
});

exports.default = _default;

<|start_filename|>node_modules/better-queue/test/ticket.js<|end_filename|>
var assert = require('assert');
var Ticket = require('../lib/ticket');

describe('Ticket', function() {
  var t;

  before(function () {
    t = new Ticket();
  })

  it('should instantiate', function () {
    assert.ok(t);
  })

  it('should accept', function () {
    assert.ok(!t.isAccepted, 'ticket is not accepted');
    t.accept();
    assert.ok(t.isAccepted, 'ticket is accepted');
  })

  it('should queue', function () {
    assert.ok(!t.isQueued, 'ticket is not queued');
    t.queued();
    assert.ok(t.isQueued, 'ticket is queued');
  })

  it('should start and stop', function () {
    assert.ok(!t.isStarted, 'ticket is not started');
    t.started();
    assert.ok(t.isStarted, 'ticket is started');
    t.stopped();
    assert.ok(!t.isStarted, 'ticket is stopped');
  })

  it('should finish and emit', function (done) {
    assert.ok(!t.isFinished, 'ticket is not finished');
    t.once('finish', function (result) {
      assert.deepEqual(result, { x: 1 });
      assert.ok(t.isFinished, 'ticket is finished');
      done();
    })
    t.finish({ x: 1 });
  })

  it('should fail and emit', function (done) {
    assert.ok(!t.isFailed, 'ticket not failed');
    t.once('failed', function (err) {
      assert.equal(err, 'some_error');
      assert.ok(t.isFailed, 'ticket failed');
      done();
    })
    t.failed('some_error');
  })

  it('should progress and emit', function (done) {
    t.started();
    t.once('progress', function (progress) {
      assert.equal(progress.pct, 50);
      assert.equal(progress.complete, 1);
      assert.equal(progress.total, 2);
      assert.equal(progress.message, 'test');
      assert.equal(typeof progress.eta, 'string');
      done()
    });
    t.progress({
      complete: 1,
      total: 2,
      message: 'test'
    });
  })
  
  
})


<|start_filename|>node_modules/@babel/helper-replace-supers/lib/index.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.skipAllButComputedKey = skipAllButComputedKey;
exports.default = exports.environmentVisitor = void 0;

var _traverse = _interopRequireDefault(require("@babel/traverse"));

var _helperMemberExpressionToFunctions = _interopRequireDefault(require("@babel/helper-member-expression-to-functions"));

var _helperOptimiseCallExpression = _interopRequireDefault(require("@babel/helper-optimise-call-expression"));

var t = _interopRequireWildcard(require("@babel/types"));

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function getPrototypeOfExpression(objectRef, isStatic, file, isPrivateMethod) {
  objectRef = t.cloneNode(objectRef);
  const targetRef = isStatic || isPrivateMethod ? objectRef : t.memberExpression(objectRef, t.identifier("prototype"));
  return t.callExpression(file.addHelper("getPrototypeOf"), [targetRef]);
}

function skipAllButComputedKey(path) {
  if (!path.node.computed) {
    path.skip();
    return;
  }

  const keys = t.VISITOR_KEYS[path.type];

  for (const key of keys) {
    if (key !== "key") path.skipKey(key);
  }
}

const environmentVisitor = {
  TypeAnnotation(path) {
    path.skip();
  },

  Function(path) {
    if (path.isMethod()) return;
    if (path.isArrowFunctionExpression()) return;
    path.skip();
  },

  "Method|ClassProperty|ClassPrivateProperty"(path) {
    skipAllButComputedKey(path);
  }

};
exports.environmentVisitor = environmentVisitor;

const visitor = _traverse.default.visitors.merge([environmentVisitor, {
  Super(path, state) {
    const {
      node,
      parentPath
    } = path;
    if (!parentPath.isMemberExpression({
      object: node
    })) return;
    state.handle(parentPath);
  }

}]);

const specHandlers = {
  memoise(superMember, count) {
    const {
      scope,
      node
    } = superMember;
    const {
      computed,
      property
    } = node;

    if (!computed) {
      return;
    }

    const memo = scope.maybeGenerateMemoised(property);

    if (!memo) {
      return;
    }

    this.memoiser.set(property, memo, count);
  },

  prop(superMember) {
    const {
      computed,
      property
    } = superMember.node;

    if (this.memoiser.has(property)) {
      return t.cloneNode(this.memoiser.get(property));
    }

    if (computed) {
      return t.cloneNode(property);
    }

    return t.stringLiteral(property.name);
  },

  get(superMember) {
    return t.callExpression(this.file.addHelper("get"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod), this.prop(superMember), t.thisExpression()]);
  },

  set(superMember, value) {
    return t.callExpression(this.file.addHelper("set"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod), this.prop(superMember), value, t.thisExpression(), t.booleanLiteral(superMember.isInStrictMode())]);
  },

  destructureSet(superMember) {
    throw superMember.buildCodeFrameError(`Destructuring to a super field is not supported yet.`);
  },

  call(superMember, args) {
    return (0, _helperOptimiseCallExpression.default)(this.get(superMember), t.thisExpression(), args);
  }

};
const looseHandlers = Object.assign({}, specHandlers, {
  prop(superMember) {
    const {
      property
    } = superMember.node;

    if (this.memoiser.has(property)) {
      return t.cloneNode(this.memoiser.get(property));
    }

    return t.cloneNode(property);
  },

  get(superMember) {
    const {
      isStatic,
      superRef
    } = this;
    const {
      computed
    } = superMember.node;
    const prop = this.prop(superMember);
    let object;

    if (isStatic) {
      object = superRef ? t.cloneNode(superRef) : t.memberExpression(t.identifier("Function"), t.identifier("prototype"));
    } else {
      object = superRef ? t.memberExpression(t.cloneNode(superRef), t.identifier("prototype")) : t.memberExpression(t.identifier("Object"), t.identifier("prototype"));
    }

    return t.memberExpression(object, prop, computed);
  },

  set(superMember, value) {
    const {
      computed
    } = superMember.node;
    const prop = this.prop(superMember);
    return t.assignmentExpression("=", t.memberExpression(t.thisExpression(), prop, computed), value);
  },

  destructureSet(superMember) {
    const {
      computed
    } = superMember.node;
    const prop = this.prop(superMember);
    return t.memberExpression(t.thisExpression(), prop, computed);
  }

});

class ReplaceSupers {
  constructor(opts) {
    const path = opts.methodPath;
    this.methodPath = path;
    this.isStatic = path.isObjectMethod() || path.node.static;
    this.isPrivateMethod = path.isPrivate() && path.isMethod();
    this.file = opts.file;
    this.superRef = opts.superRef;
    this.isLoose = opts.isLoose;
    this.opts = opts;
  }

  getObjectRef() {
    return t.cloneNode(this.opts.objectRef || this.opts.getObjectRef());
  }

  replace() {
    const handler = this.isLoose ? looseHandlers : specHandlers;
    (0, _helperMemberExpressionToFunctions.default)(this.methodPath, visitor, Object.assign({
      file: this.file,
      isStatic: this.isStatic,
      isPrivateMethod: this.isPrivateMethod,
      getObjectRef: this.getObjectRef.bind(this),
      superRef: this.superRef
    }, handler));
  }

}

exports.default = ReplaceSupers;

<|start_filename|>node_modules/sharp/vendor/include/libexif/exif-log.h<|end_filename|>
/*! \file exif-log.h
 *  \brief Log message infrastructure
 */
/*
 * Copyright (c) 2004 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA.
 */

#ifndef __EXIF_LOG_H__
#define __EXIF_LOG_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include <libexif/exif-mem.h>
#include <stdarg.h>

/*! State maintained by the logging interface */
typedef struct _ExifLog        ExifLog;

/*! Create a new logging instance.
 * \see exif_log_free
 *
 * \return new instance of #ExifLog
 */
ExifLog *exif_log_new     (void);
ExifLog *exif_log_new_mem (ExifMem *);
void     exif_log_ref     (ExifLog *log);
void     exif_log_unref   (ExifLog *log);

/*! Delete instance of #ExifLog.
 * \see exif_log_new
 *
 * \param[in] log #ExifLog
 * \return new instance of #ExifLog
 */
void     exif_log_free    (ExifLog *log);

typedef enum {
	EXIF_LOG_CODE_NONE,
	EXIF_LOG_CODE_DEBUG,
	EXIF_LOG_CODE_NO_MEMORY,
	EXIF_LOG_CODE_CORRUPT_DATA
} ExifLogCode;

/*! Return a textual description of the given class of error log.
 *
 * \param[in] code logging message class
 * \return textual description of the log class
 */
const char *exif_log_code_get_title   (ExifLogCode code);

/*! Return a verbose description of the given class of error log.
 *
 * \param[in] code logging message class
 * \return verbose description of the log class
 */
const char *exif_log_code_get_message (ExifLogCode code);

/*! Log callback function prototype.
 */
typedef void (* ExifLogFunc) (ExifLog *log, ExifLogCode, const char *domain,
			      const char *format, va_list args, void *data);

/*! Register log callback function.
 * Calls to the log callback function are purely for diagnostic purposes.
 *
 * \param[in] log logging state variable
 * \param[in] func callback function to set
 * \param[in] data data to pass into callback function
 */
void     exif_log_set_func (ExifLog *log, ExifLogFunc func, void *data);

#ifndef NO_VERBOSE_TAG_STRINGS
void     exif_log  (ExifLog *log, ExifLogCode, const char *domain,
		    const char *format, ...)
#ifdef __GNUC__
			__attribute__((__format__(printf,4,5)))
#endif
;
#else
#if defined(__STDC_VERSION__) &&  __STDC_VERSION__ >= 199901L
#define exif_log(...) do { } while (0)
#elif defined(__GNUC__)
#define exif_log(x...) do { } while (0)
#else
#define exif_log (void)
#endif
#endif

void     exif_logv (ExifLog *log, ExifLogCode, const char *domain,
		    const char *format, va_list args);

/* For your convenience */
#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __EXIF_LOG_H__ */


<|start_filename|>node_modules/graphql/language/printLocation.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.printLocation = printLocation;
exports.printSourceLocation = printSourceLocation;

var _location = require("../language/location");

/**
 * Render a helpful description of the location in the GraphQL Source document.
 */
function printLocation(location) {
  return printSourceLocation(location.source, (0, _location.getLocation)(location.source, location.start));
}
/**
 * Render a helpful description of the location in the GraphQL Source document.
 */


function printSourceLocation(source, sourceLocation) {
  var firstLineColumnOffset = source.locationOffset.column - 1;
  var body = whitespace(firstLineColumnOffset) + source.body;
  var lineIndex = sourceLocation.line - 1;
  var lineOffset = source.locationOffset.line - 1;
  var lineNum = sourceLocation.line + lineOffset;
  var columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;
  var columnNum = sourceLocation.column + columnOffset;
  var locationStr = "".concat(source.name, ":").concat(lineNum, ":").concat(columnNum, "\n");
  var lines = body.split(/\r\n|[\n\r]/g);
  var locationLine = lines[lineIndex]; // Special case for minified documents

  if (locationLine.length > 120) {
    var sublineIndex = Math.floor(columnNum / 80);
    var sublineColumnNum = columnNum % 80;
    var sublines = [];

    for (var i = 0; i < locationLine.length; i += 80) {
      sublines.push(locationLine.slice(i, i + 80));
    }

    return locationStr + printPrefixedLines([["".concat(lineNum), sublines[0]]].concat(sublines.slice(1, sublineIndex + 1).map(function (subline) {
      return ['', subline];
    }), [[' ', whitespace(sublineColumnNum - 1) + '^'], ['', sublines[sublineIndex + 1]]]));
  }

  return locationStr + printPrefixedLines([// Lines specified like this: ["prefix", "string"],
  ["".concat(lineNum - 1), lines[lineIndex - 1]], ["".concat(lineNum), locationLine], ['', whitespace(columnNum - 1) + '^'], ["".concat(lineNum + 1), lines[lineIndex + 1]]]);
}

function printPrefixedLines(lines) {
  var existingLines = lines.filter(function (_ref) {
    var _ = _ref[0],
        line = _ref[1];
    return line !== undefined;
  });
  var padLen = Math.max.apply(Math, existingLines.map(function (_ref2) {
    var prefix = _ref2[0];
    return prefix.length;
  }));
  return existingLines.map(function (_ref3) {
    var prefix = _ref3[0],
        line = _ref3[1];
    return lpad(padLen, prefix) + (line ? ' | ' + line : ' |');
  }).join('\n');
}

function whitespace(len) {
  return Array(len + 1).join(' ');
}

function lpad(len, str) {
  return whitespace(len - str.length) + str;
}


<|start_filename|>node_modules/p-map-series/index.js<|end_filename|>
'use strict';
const pReduce = require('p-reduce');

module.exports = (iterable, iterator) => {
	const ret = [];

	return pReduce(iterable, (a, b, i) => {
		return Promise.resolve(iterator(b, i)).then(val => {
			ret.push(val);
		});
	}).then(() => ret);
};


<|start_filename|>node_modules/sift/test/basic-test.js<|end_filename|>
var assert = require('assert'),
sift = require('..');

describe(__filename + '#', function() {

  it('doesn\'t sort arrays', function () {
    var values = sift({
      $or: [3, 2, 1]
    }, [9,8,7,6,5,4,3,2,1]);


    assert.equal(values.length, 3);
    assert.equal(values[0], 3);
    assert.equal(values[1], 2);
    assert.equal(values[2], 1);
  });

  it('can create a custom selector, and use it', function () {
    var sifter = sift({ age: { $gt: 5}}, function (item) {
      return item.person;
    });

    var people = [{ person: { age: 6 }}],
    filtered = people.filter(sifter);


    assert.equal(filtered.length, 1);
    assert.equal(filtered[0], people[0]);
  });

  it('throws an error if the operation is invalid', function () {

    var err;
    try {
      sift({$aaa:1})('b');
    } catch (e) {
      err = e;
    }

    assert.equal(err.message, 'Unknown operation $aaa');

  });

  it('can use a custom selector as the 3rd param', function () {

    var people = [{ person: { age: 6 }}];

    var filtered = sift({ age: { $gt: 5}}, people, function (item) {
      return item.person;
    });

    assert.equal(filtered.length, 1);
    assert.equal(filtered[0], people[0]);
  });

  it('can get the first index of a matching element', function () {
    var index = sift.indexOf({ val: { $gt: 5}}, [{val: 4}, {val: 3}, {val: 6}, {val: 7}]);

    assert.equal(index, 2);
  });

  it('returns -1 as index if no matching element is found', function () {
    var index = sift.indexOf({ val: { $gt: 7}}, [{val: 4}, {val: 3}, {val: 6}, {val: 7}]);

    assert.equal(index, -1);
  });

  it('can match empty arrays', function () {
    var statusQuery = {$or: [{status: {$exists: false}},
                             {status: []},
                             {status: {$in: ['urgent', 'completed', 'today']}}
                            ]};

    var filtered = sift(statusQuery, [{ status: [] },
                                      { status: ['urgent'] },
                                      { status: ['nope'] }
                                     ]);

    assert.equal(filtered.length, 2);
  });

  it('$ne: null does not hit when field is present', function(){
    var sifter = sift({age: {$ne: null}});

    var people = [
      {age: 'matched'},
      {missed: 1}
    ];
    var filtered = people.filter(sifter);

    assert.equal(filtered.length, 1);
    assert.equal(filtered[0].age, 'matched');
  });

  it('$ne does not hit when field is different', function () {
    var sifter = sift({ age: { $ne: 5 }});

    var people = [{ age: 5 }],
    filtered = people.filter(sifter);

    assert.equal(filtered.length, 0);
  });

  it('$ne does hit when field exists with different value', function () {
    var sifter = sift({ age: { $ne: 4 }});

    var people = [{ age: 5 }],
    filtered = people.filter(sifter);

    assert.equal(filtered.length, 1);
  });

  it('$ne does hit when field does not exist', function(){
    var sifter = sift({ age: { $ne: 5 }});

    var people = [{}],
      filtered = people.filter(sifter);

    assert.equal(filtered.length, 1);
  });

  // https://gist.github.com/jdnichollsc/00ea8cf1204b17d9fb9a991fbd1dfee6
  it('returns a period between start and end dates', function() {

    var product = {
      'productTypeCode': 'productTypeEnergy',
      'quantities': [
        {
          'period': {
            'startDate': new Date('2017-01-13T05:00:00.000Z'),
            'endDate': new Date('2017-01-31T05:00:00.000Z'),
            'dayType': {
              'normal': true,
              'holiday': true
            },
            'specificDays': [
              'monday',
              'wednesday',
              'friday'
            ],
            'loadType': {
              'high': true,
              'medium': false,
              'low': false
            }
          },
          'type': 'DemandPercentage',
          'quantityValue': '44'
        },
        {
          'period': {
            'startDate': new Date('2017-01-13T05:00:00.000Z'),
            'endDate': new Date('2017-01-31T05:00:00.000Z'),
            'dayType': {
              'normal': true,
              'holiday': true
            },
            'loadType': {
              'high': false,
              'medium': true,
              'low': false
            }
          },
          'type': 'Value',
          'quantityValue': '22'
        }
      ]
    };

    var period = {
      'startDate': new Date('2017-01-08T05:00:00.000Z'),
      'endDate': new Date('2017-01-29T05:00:00.000Z'),
      'dayType': {
        'normal': true,
        'holiday': true
      },
      'loadType': {
        'high': true,
        'medium': false,
        'low': true
      },
      specificPeriods : ['3', '4', '5-10']
    };


    var results = sift({
      $and: [ 
        { 'period.startDate': { $lte : period.endDate } }, 
        { 'period.endDate': { $gte : period.startDate } } 
      ]
    }, product.quantities);
    
    assert.equal(results.length, 2);
  });
});


<|start_filename|>node_modules/@jimp/plugin-displace/dist/index.js<|end_filename|>
"use strict";

require("core-js/modules/es6.object.define-property");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

require("core-js/modules/es7.symbol.async-iterator");

require("core-js/modules/es6.symbol");

var _utils = require("@jimp/utils");

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

/**
 * Displaces the image based on the provided displacement map
 * @param {object} map the source Jimp instance
 * @param {number} offset the maximum displacement value
 * @param {function(Error, Jimp)} cb (optional) a callback for when complete
 * @returns {Jimp} this for chaining of methods
 */
var _default = function _default() {
  return {
    displace: function displace(map, offset, cb) {
      if (_typeof(map) !== 'object' || map.constructor !== this.constructor) {
        return _utils.throwError.call(this, 'The source must be a Jimp image', cb);
      }

      if (typeof offset !== 'number') {
        return _utils.throwError.call(this, 'factor must be a number', cb);
      }

      var source = this.cloneQuiet();
      this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {
        var displacement = map.bitmap.data[idx] / 256 * offset;
        displacement = Math.round(displacement);
        var ids = this.getPixelIndex(x + displacement, y);
        this.bitmap.data[ids] = source.bitmap.data[idx];
        this.bitmap.data[ids + 1] = source.bitmap.data[idx + 1];
        this.bitmap.data[ids + 2] = source.bitmap.data[idx + 2];
      });

      if ((0, _utils.isNodePattern)(cb)) {
        cb.call(this, null, this);
      }

      return this;
    }
  };
};

exports.default = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/graphql-config/lib/__tests__/utils.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var schema = require('./schema.json');
var http_1 = require("http");
function serveSchema(port) {
    if (port === void 0) { port = 33333; }
    var handleRequest = function (request, response) {
        response.writeHead(200, { 'Content-Type': 'application/json' });
        response.end(JSON.stringify(schema));
    };
    var server = http_1.createServer(handleRequest);
    return new Promise(function (resolve) {
        server.listen(port, resolve);
    });
}
exports.serveSchema = serveSchema;


<|start_filename|>node_modules/graphql/jsutils/devAssert.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = devAssert;

function devAssert(condition, message) {
  var booleanCondition = Boolean(condition);

  if (!booleanCondition) {
    throw new Error(message);
  }
}


<|start_filename|>node_modules/graphql/utilities/extendSchema.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.extendSchema = extendSchema;

var _flatMap = _interopRequireDefault(require("../polyfills/flatMap"));

var _objectValues = _interopRequireDefault(require("../polyfills/objectValues"));

var _inspect = _interopRequireDefault(require("../jsutils/inspect"));

var _mapValue = _interopRequireDefault(require("../jsutils/mapValue"));

var _invariant = _interopRequireDefault(require("../jsutils/invariant"));

var _devAssert = _interopRequireDefault(require("../jsutils/devAssert"));

var _keyValMap = _interopRequireDefault(require("../jsutils/keyValMap"));

var _kinds = require("../language/kinds");

var _predicates = require("../language/predicates");

var _validate = require("../validation/validate");

var _directives = require("../type/directives");

var _scalars = require("../type/scalars");

var _introspection = require("../type/introspection");

var _schema = require("../type/schema");

var _definition = require("../type/definition");

var _buildASTSchema = require("./buildASTSchema");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

/**
 * Produces a new schema given an existing schema and a document which may
 * contain GraphQL type extensions and definitions. The original schema will
 * remain unaltered.
 *
 * Because a schema represents a graph of references, a schema cannot be
 * extended without effectively making an entire copy. We do not know until it's
 * too late if subgraphs remain unchanged.
 *
 * This algorithm copies the provided schema, applying extensions while
 * producing the copy. The original schema remains unaltered.
 *
 * Accepts options as a third argument:
 *
 *    - commentDescriptions:
 *        Provide true to use preceding comments as the description.
 *
 */
function extendSchema(schema, documentAST, options) {
  (0, _schema.assertSchema)(schema);
  documentAST && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.default)(0, 'Must provide valid Document AST');

  if (!options || !(options.assumeValid || options.assumeValidSDL)) {
    (0, _validate.assertValidSDLExtension)(documentAST, schema);
  } // Collect the type definitions and extensions found in the document.


  var typeDefs = [];
  var typeExtsMap = Object.create(null); // New directives and types are separate because a directives and types can
  // have the same name. For example, a type named "skip".

  var directiveDefs = [];
  var schemaDef; // Schema extensions are collected which may add additional operation types.

  var schemaExts = [];

  for (var _i2 = 0, _documentAST$definiti2 = documentAST.definitions; _i2 < _documentAST$definiti2.length; _i2++) {
    var def = _documentAST$definiti2[_i2];

    if (def.kind === _kinds.Kind.SCHEMA_DEFINITION) {
      schemaDef = def;
    } else if (def.kind === _kinds.Kind.SCHEMA_EXTENSION) {
      schemaExts.push(def);
    } else if ((0, _predicates.isTypeDefinitionNode)(def)) {
      typeDefs.push(def);
    } else if ((0, _predicates.isTypeExtensionNode)(def)) {
      var extendedTypeName = def.name.value;
      var existingTypeExts = typeExtsMap[extendedTypeName];
      typeExtsMap[extendedTypeName] = existingTypeExts ? existingTypeExts.concat([def]) : [def];
    } else if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
      directiveDefs.push(def);
    }
  } // If this document contains no new types, extensions, or directives then
  // return the same unmodified GraphQLSchema instance.


  if (Object.keys(typeExtsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExts.length === 0 && !schemaDef) {
    return schema;
  }

  var schemaConfig = schema.toConfig();
  var astBuilder = new _buildASTSchema.ASTDefinitionBuilder(options, function (typeName) {
    var type = typeMap[typeName];

    if (type === undefined) {
      throw new Error("Unknown type: \"".concat(typeName, "\"."));
    }

    return type;
  });
  var typeMap = (0, _keyValMap.default)(typeDefs, function (node) {
    return node.name.value;
  }, function (node) {
    return astBuilder.buildType(node);
  });

  for (var _i4 = 0, _schemaConfig$types2 = schemaConfig.types; _i4 < _schemaConfig$types2.length; _i4++) {
    var existingType = _schemaConfig$types2[_i4];
    typeMap[existingType.name] = extendNamedType(existingType);
  } // Get the extended root operation types.


  var operationTypes = {
    query: schemaConfig.query && schemaConfig.query.name,
    mutation: schemaConfig.mutation && schemaConfig.mutation.name,
    subscription: schemaConfig.subscription && schemaConfig.subscription.name
  };

  if (schemaDef) {
    for (var _i6 = 0, _schemaDef$operationT2 = schemaDef.operationTypes; _i6 < _schemaDef$operationT2.length; _i6++) {
      var _ref2 = _schemaDef$operationT2[_i6];
      var operation = _ref2.operation;
      var type = _ref2.type;
      operationTypes[operation] = type.name.value;
    }
  } // Then, incorporate schema definition and all schema extensions.


  for (var _i8 = 0; _i8 < schemaExts.length; _i8++) {
    var schemaExt = schemaExts[_i8];

    if (schemaExt.operationTypes) {
      for (var _i10 = 0, _schemaExt$operationT2 = schemaExt.operationTypes; _i10 < _schemaExt$operationT2.length; _i10++) {
        var _ref4 = _schemaExt$operationT2[_i10];
        var _operation = _ref4.operation;
        var _type = _ref4.type;
        operationTypes[_operation] = _type.name.value;
      }
    }
  } // Support both original legacy names and extended legacy names.


  var allowedLegacyNames = schemaConfig.allowedLegacyNames.concat(options && options.allowedLegacyNames || []); // Then produce and return a Schema with these types.

  return new _schema.GraphQLSchema({
    // Note: While this could make early assertions to get the correctly
    // typed values, that would throw immediately while type system
    // validation with validateSchema() will produce more actionable results.
    query: getMaybeTypeByName(operationTypes.query),
    mutation: getMaybeTypeByName(operationTypes.mutation),
    subscription: getMaybeTypeByName(operationTypes.subscription),
    types: (0, _objectValues.default)(typeMap),
    directives: getMergedDirectives(),
    astNode: schemaDef || schemaConfig.astNode,
    extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExts),
    allowedLegacyNames: allowedLegacyNames
  }); // Below are functions used for producing this schema that have closed over
  // this scope and have access to the schema, cache, and newly defined types.

  function replaceType(type) {
    if ((0, _definition.isListType)(type)) {
      return new _definition.GraphQLList(replaceType(type.ofType));
    } else if ((0, _definition.isNonNullType)(type)) {
      return new _definition.GraphQLNonNull(replaceType(type.ofType));
    }

    return replaceNamedType(type);
  }

  function replaceNamedType(type) {
    return typeMap[type.name];
  }

  function getMaybeTypeByName(typeName) {
    return typeName ? typeMap[typeName] : null;
  }

  function getMergedDirectives() {
    var existingDirectives = schema.getDirectives().map(extendDirective);
    existingDirectives || (0, _devAssert.default)(0, 'schema must have default directives');
    return existingDirectives.concat(directiveDefs.map(function (node) {
      return astBuilder.buildDirective(node);
    }));
  }

  function extendNamedType(type) {
    if ((0, _introspection.isIntrospectionType)(type) || (0, _scalars.isSpecifiedScalarType)(type)) {
      // Builtin types are not extended.
      return type;
    } else if ((0, _definition.isScalarType)(type)) {
      return extendScalarType(type);
    } else if ((0, _definition.isObjectType)(type)) {
      return extendObjectType(type);
    } else if ((0, _definition.isInterfaceType)(type)) {
      return extendInterfaceType(type);
    } else if ((0, _definition.isUnionType)(type)) {
      return extendUnionType(type);
    } else if ((0, _definition.isEnumType)(type)) {
      return extendEnumType(type);
    } else if ((0, _definition.isInputObjectType)(type)) {
      return extendInputObjectType(type);
    } // Not reachable. All possible types have been considered.


    /* istanbul ignore next */
    (0, _invariant.default)(false, 'Unexpected type: ' + (0, _inspect.default)(type));
  }

  function extendDirective(directive) {
    var config = directive.toConfig();
    return new _directives.GraphQLDirective(_objectSpread({}, config, {
      args: (0, _mapValue.default)(config.args, extendArg)
    }));
  }

  function extendInputObjectType(type) {
    var config = type.toConfig();
    var extensions = typeExtsMap[config.name] || [];
    var fieldNodes = (0, _flatMap.default)(extensions, function (node) {
      return node.fields || [];
    });
    return new _definition.GraphQLInputObjectType(_objectSpread({}, config, {
      fields: function fields() {
        return _objectSpread({}, (0, _mapValue.default)(config.fields, function (field) {
          return _objectSpread({}, field, {
            type: replaceType(field.type)
          });
        }), {}, (0, _keyValMap.default)(fieldNodes, function (field) {
          return field.name.value;
        }, function (field) {
          return astBuilder.buildInputField(field);
        }));
      },
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    }));
  }

  function extendEnumType(type) {
    var config = type.toConfig();
    var extensions = typeExtsMap[type.name] || [];
    var valueNodes = (0, _flatMap.default)(extensions, function (node) {
      return node.values || [];
    });
    return new _definition.GraphQLEnumType(_objectSpread({}, config, {
      values: _objectSpread({}, config.values, {}, (0, _keyValMap.default)(valueNodes, function (value) {
        return value.name.value;
      }, function (value) {
        return astBuilder.buildEnumValue(value);
      })),
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    }));
  }

  function extendScalarType(type) {
    var config = type.toConfig();
    var extensions = typeExtsMap[config.name] || [];
    return new _definition.GraphQLScalarType(_objectSpread({}, config, {
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    }));
  }

  function extendObjectType(type) {
    var config = type.toConfig();
    var extensions = typeExtsMap[config.name] || [];
    var interfaceNodes = (0, _flatMap.default)(extensions, function (node) {
      return node.interfaces || [];
    });
    var fieldNodes = (0, _flatMap.default)(extensions, function (node) {
      return node.fields || [];
    });
    return new _definition.GraphQLObjectType(_objectSpread({}, config, {
      interfaces: function interfaces() {
        return [].concat(type.getInterfaces().map(replaceNamedType), interfaceNodes.map(function (node) {
          return astBuilder.getNamedType(node);
        }));
      },
      fields: function fields() {
        return _objectSpread({}, (0, _mapValue.default)(config.fields, extendField), {}, (0, _keyValMap.default)(fieldNodes, function (node) {
          return node.name.value;
        }, function (node) {
          return astBuilder.buildField(node);
        }));
      },
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    }));
  }

  function extendInterfaceType(type) {
    var config = type.toConfig();
    var extensions = typeExtsMap[config.name] || [];
    var fieldNodes = (0, _flatMap.default)(extensions, function (node) {
      return node.fields || [];
    });
    return new _definition.GraphQLInterfaceType(_objectSpread({}, config, {
      fields: function fields() {
        return _objectSpread({}, (0, _mapValue.default)(config.fields, extendField), {}, (0, _keyValMap.default)(fieldNodes, function (node) {
          return node.name.value;
        }, function (node) {
          return astBuilder.buildField(node);
        }));
      },
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    }));
  }

  function extendUnionType(type) {
    var config = type.toConfig();
    var extensions = typeExtsMap[config.name] || [];
    var typeNodes = (0, _flatMap.default)(extensions, function (node) {
      return node.types || [];
    });
    return new _definition.GraphQLUnionType(_objectSpread({}, config, {
      types: function types() {
        return [].concat(type.getTypes().map(replaceNamedType), typeNodes.map(function (node) {
          return astBuilder.getNamedType(node);
        }));
      },
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    }));
  }

  function extendField(field) {
    return _objectSpread({}, field, {
      type: replaceType(field.type),
      args: (0, _mapValue.default)(field.args, extendArg)
    });
  }

  function extendArg(arg) {
    return _objectSpread({}, arg, {
      type: replaceType(arg.type)
    });
  }
}


<|start_filename|>node_modules/better-queue/test/complex.js<|end_filename|>
var assert = require('assert');
var helper = require('./lib/helper');

var Queue = require('../lib/queue');
var MemoryStore = require('better-queue-memory');

describe('Complex Queue', function() {
  afterEach(helper.destroyQueues);

  it('should run in batch mode', function (done) {
    var q = new Queue({
      batchSize: 3,
      process: function (batch, cb) {
        assert.equal(batch.length, 3);
        var total = 0;
        batch.forEach(function (task) {
          total += task;
        })
        cb(null, total);
      },
    })
    var queued = 0;
    q.on('task_queued', function () {
      queued++;
      if (queued >= 3) {
        q.resume();
      }
    })
    q.pause();
    q.push(1, function (err, total) {
      assert.equal(total, 6);
    })
    q.push(2, function (err, total) {
      assert.equal(total, 6);
    })
    q.push(3, function (err, total) {
      assert.equal(total, 6);
      done();
    })
    this.q = q;
  })

  it('should store properly', function (done) {
    var self = this;
    var s = new MemoryStore();
    var finished = 0;
    var queued = 0;
    var q1 = new Queue(function (n, cb) { throw new Error('failed') }, { store: s })
    q1.on('task_queued', function () {
      queued++;
      if (queued >= 3) {
        var q2 = new Queue(function (n, cb) {
          finished++;
          cb();
          if (finished === 3) {
            done();
          }
        }, { store: s });
        self.q2 = q2;
      }
    })
    q1.pause();
    q1.push(1);
    q1.push(2);
    q1.push(3);
    this.q1 = q1;
  })

  it('should retry', function (done) {
    var tries = 0;
    var q = new Queue(function (n, cb) {
      tries++;
      if (tries === 3) {
        cb();
        done();
      } else {
        cb('fail');
      }
    }, { maxRetries: 3 });
    q.push(1);
    this.q = q;
  })

  it('should fail retry', function (done) {
    var tries = 0;
    var q = new Queue(function (n, cb) {
      tries++;
      if (tries === 3) {
        cb();
      } else {
        cb('fail');
      }
    }, { maxRetries: 2, autoResume: true })
    q.on('task_failed', function () {
      done();
    });
    q.push(1);
    this.q = q;
  })

  it('should respect afterProcessDelay', function (done) {
    var delay = 100;
    var finished = 0;
    var startTime;
    var q = new Queue(function (task, cb) {
      finished++;
      cb();
      if (finished === 1) {
        startTime = +(new Date());
      } else if (finished === 2) {
        var endTime = +(new Date());
        var elapsedTime = endTime - startTime;
        assert(elapsedTime >= delay);
        done();
      }
    },  { batchSize: 1, afterProcessDelay: delay });
    var queued = 0;
    q.on('task_queued', function () {
      queued++;
      if (queued >= 2) {
        q.resume();
      }
    })
    q.pause();
    q.push(1);
    q.push(2);
    this.q = q;
  })

  it('should max timeout', function (done) {
    var q = new Queue(function (tasks, cb) {}, { maxTimeout: 1 })
    q.on('task_failed', function (taskId, msg) {
      assert.equal(msg, 'task_timeout');
      done();
    });
    q.push(1, function (err, r) {
      assert.equal(err, 'task_timeout');
    });
    this.q = q;
  })

  it('should merge tasks', function (done) {
    var q = new Queue(function (o, cb) {
      if (o.id === 1) {
        assert.equal(o.x, 3);
        cb();
      } else {
        cb();
      }
    }, {
      id: 'id',
      merge: function (a, b, cb) {
        a.x += b.x;
        cb(null, a);
      }
    })
    var queued = 0;
    q.on('task_queued', function () {
      queued++;
      if (queued >= 2) {
        q.resume();
      }
    })
    q.on('task_finish', function (taskId, r) {
      if (taskId === '1') {
        done();
      }
    })
    q.pause()
    q.push({ id: '0', x: 4 });
    q.push({ id: '1', x: 1 }, function (err, r) {
      assert.ok(!err)
    });
    q.push({ id: '1', x: 2 }, function (err, r) {
      assert.ok(!err);
    });
    this.q = q;
  })
  
  it('should respect id property (string)', function (done) {
    var q = new Queue(function (o, cb) {
      if (o.name === 'john') {
        assert.equal(o.x, 4);
        cb();
      }
      if (o.name === 'mary') {
        assert.equal(o.x, 5);
        cb();
      }
      if (o.name === 'jim') {
        assert.equal(o.x, 2);
        cb();
      }
    }, {
      id: 'name',
      merge: function (a, b, cb) {
        a.x += b.x;
        cb(null, a);
      }
    })
    var finished = 0;
    var queued = 0;
    q.on('task_finish', function (taskId, r) {
      finished++;
      if (finished >= 3) done();
    })
    q.on('task_queued', function (taskId, r) {
      queued++;
      if (queued >= 3) {
        q.resume();
      }
    })
    q.pause();
    q.push({ name: 'john', x: 4 });
    q.push({ name: 'mary', x: 3 });
    q.push({ name: 'jim', x: 1 });
    q.push({ name: 'jim', x: 1 });
    q.push({ name: 'mary', x: 2 });
    this.q = q;
  })
  
  it('should respect id property (function)', function (done) {
    var finished = 0;
    var q = new Queue(function (n, cb) {
      cb(null, n)
    }, {
      batchDelay: 3,
      id: function (n, cb) {
        cb(null, n % 2 === 0 ? 'even' : 'odd');
      },
      merge: function (a, b, cb) {
        cb(null, a+b);
      }
    })
    var finished = 0;
    var queued = 0;
    q.on('task_queued', function (taskId, r) {
    })
    q.on('task_finish', function (taskId, r) {
      finished++;
      if (taskId === 'odd') {
        assert.equal(r, 9);
      }
      if (taskId === 'even') {
        assert.equal(r, 6);
      }
      if (finished >= 2) {
        done();
      }
    })
    q.push(1);
    q.push(2);
    q.push(3);
    q.push(4);
    q.push(5);
    this.q = q;
  })
  
  it('should cancel if running', function (done) {
    var ran = 0;
    var cancelled = false;
    var q = new Queue(function (n, cb) {
      ran++;
      if (ran >= 2) {
        cb();
      }
      if (ran === 3) {
        assert.ok(cancelled);
        done();
      }
      return {
        cancel: function () {
          cancelled = true;
        }
      }
    }, { id: 'id', cancelIfRunning: true })
    q.push({ id: 1 })
      .on('started', function () {
        q.push({ id: 2 });
        setTimeout(function () {
          q.push({ id: 1 });
        }, 1)
      });
    this.q = q;
  })
  
  it('failed task should not stack overflow', function (done) {
    var count = 0;
    var q = new Queue(function (n, cb) {
      count++
      if (count > 100) {
        cb();
        done();
      } else {
        cb('fail');
      }
    }, {
      maxRetries: Infinity
    })
    q.push(1);
    this.q = q;
  })

  // it('drain should still work with persistent queues', function (done) {
  //   var q = new Queue(function (n, cb) {
  //     setTimeout(cb, 1);
  //   }, {
  //     store: {
  //       type: 'sql',
  //       dialect: 'sqlite',
  //       path: 'testqueue.sql'
  //     }
  //   })
  //   var drained = false;
  //   q.on('drain', function () {
  //     drained = true;
  //     done();
  //   });
  //   q.push(1);
  //   this.q = q;
  // })

  // it('drain should still work when there are persisted items at load time', function (done) {
  //   var initialQueue = new Queue(function (n, cb) {
  //     setTimeout(cb, 100);
  //   }, {
  //     store: {
  //       type: 'sql',
  //       dialect: 'sqlite',
  //       path: 'testqueue.sql'
  //     }
  //   });
  //   initialQueue.push('' + 1);
  //   initialQueue.push('' + 2);
  //   setTimeout(function () {
  //     // This effectively captures the queue in a state where there were unprocessed items
  //     fs.copySync('testqueue.sql', 'testqueue2.sql');
  //     initialQueue.destroy();
  //     var persistedQueue = new Queue(function (n, cb) {
  //       setTimeout(cb, 1);
  //     }, {
  //       store: {
  //         type: 'sql',
  //         dialect: 'sqlite',
  //         path: 'testqueue2.sql'
  //       }
  //     })
  //     var drained = false;
  //     persistedQueue.on('drain', function () {
  //       drained = true;
  //     });
  //     persistedQueue.push(2);
  //     setTimeout(function () {
  //       persistedQueue.destroy();

  //       assert.ok(drained);
  //       done();
  //     }, 140)
  //   }, 40)
  // })
})


<|start_filename|>node_modules/sharp/vendor/include/orc/orcpowerpc.h<|end_filename|>

#ifndef _ORC_POWERPC_H_
#define _ORC_POWERPC_H_

#include <orc/orcprogram.h>

ORC_BEGIN_DECLS

typedef enum {
  ORC_TARGET_POWERPC_64BIT = (1<<0)
} OrcTargetPowerPCFlags;

#ifdef ORC_ENABLE_UNSTABLE_API

enum {
  POWERPC_R0 = ORC_GP_REG_BASE,
  POWERPC_R1,
  POWERPC_R2,
  POWERPC_R3,
  POWERPC_R4,
  POWERPC_R5,
  POWERPC_R6,
  POWERPC_R7,
  POWERPC_R8,
  POWERPC_R9,
  POWERPC_R10,
  POWERPC_R11,
  POWERPC_R12,
  POWERPC_R13,
  POWERPC_R14,
  POWERPC_R15,
  POWERPC_R16,
  POWERPC_R17,
  POWERPC_R18,
  POWERPC_R19,
  POWERPC_R20,
  POWERPC_R21,
  POWERPC_R22,
  POWERPC_R23,
  POWERPC_R24,
  POWERPC_R25,
  POWERPC_R26,
  POWERPC_R27,
  POWERPC_R28,
  POWERPC_R29,
  POWERPC_R30,
  POWERPC_R31,
  POWERPC_V0 = ORC_VEC_REG_BASE,
  POWERPC_V1,
  POWERPC_V2,
  POWERPC_V3,
  POWERPC_V4,
  POWERPC_V5,
  POWERPC_V6,
  POWERPC_V7,
  POWERPC_V8,
  POWERPC_V9,
  POWERPC_V10,
  POWERPC_V11,
  POWERPC_V12,
  POWERPC_V13,
  POWERPC_V14,
  POWERPC_V15,
  POWERPC_V16,
  POWERPC_V17,
  POWERPC_V18,
  POWERPC_V19,
  POWERPC_V20,
  POWERPC_V21,
  POWERPC_V22,
  POWERPC_V23,
  POWERPC_V24,
  POWERPC_V25,
  POWERPC_V26,
  POWERPC_V27,
  POWERPC_V28,
  POWERPC_V29,
  POWERPC_V30,
  POWERPC_V31
};

const char * powerpc_get_regname(int i);
int powerpc_regnum (int i);

void powerpc_emit(OrcCompiler *compiler, unsigned int insn);

void powerpc_emit_add (OrcCompiler *compiler, int regd, int rega, int regb);
void powerpc_emit_addi_rec (OrcCompiler *compiler, int regd, int rega, int imm);
void powerpc_emit_addi (OrcCompiler *compiler, int regd, int rega, int imm);
void powerpc_emit_lwz (OrcCompiler *compiler, int regd, int rega, int imm);
void powerpc_emit_stw (OrcCompiler *compiler, int regs, int rega, int offset);
void powerpc_emit_stwu (OrcCompiler *compiler, int regs, int rega, int offset);
void powerpc_emit_ld (OrcCompiler *compiler, int regd, int rega, int imm);
void powerpc_emit_std (OrcCompiler *compiler, int regs, int rega, int offset);
void powerpc_emit_stdu (OrcCompiler *compiler, int regs, int rega, int offset);

void powerpc_emit_ret (OrcCompiler *compiler);
void powerpc_emit_b (OrcCompiler *compiler, int label);
void powerpc_emit_beq (OrcCompiler *compiler, int label);
void powerpc_emit_bne (OrcCompiler *compiler, int label);
void powerpc_emit_label (OrcCompiler *compiler, int label);
void powerpc_add_fixup (OrcCompiler *compiler, int type, unsigned char *ptr, int label);
void powerpc_do_fixups (OrcCompiler *compiler);
void orc_powerpc_flush_cache (OrcCode *code);

void powerpc_emit_srawi (OrcCompiler *compiler, int regd, int rega, int shift,
    int record);
void powerpc_emit_655510 (OrcCompiler *compiler, int major, int d, int a,
    int b, int minor);
void powerpc_emit_D (OrcCompiler *compiler, const char *name,
    unsigned int insn, int regd, int rega, int imm);
void powerpc_emit_X (OrcCompiler *compiler, unsigned int insn, int d, int a,
    int b);
void powerpc_emit_VA (OrcCompiler *compiler, const char *name, unsigned int insn, int d, int a, int b,
    int c);
void powerpc_emit_VA_acb (OrcCompiler *compiler, const char *name, unsigned int insn, int d, int a, int b,
    int c);
void powerpc_emit_VX (OrcCompiler *compiler, unsigned int insn, int d, int a,
    int b);
void powerpc_emit_VX_b (OrcCompiler *p, const char *name, unsigned int insn, int a);
void powerpc_emit_VX_db (OrcCompiler *p, const char *name, unsigned int insn, int d, int b);
void powerpc_emit_VX_dbi (OrcCompiler *p, const char *name, unsigned int insn, int d, int b, int imm);
void powerpc_emit_VXR (OrcCompiler *compiler, const char *name,
    unsigned int insn, int d, int a, int b, int record);
void powerpc_emit_VX_2 (OrcCompiler *p, const char *name, unsigned int insn,
    int d, int a, int b);
void powerpc_emit_VX_3 (OrcCompiler *p, const char *name, unsigned int insn,
    int d, int a, int b, int c);
void powerpc_emit_VX_3_reg (OrcCompiler *p, const char *name, unsigned int insn,
    int d, int a, int b, int c);
void powerpc_emit_VX_4 (OrcCompiler *p, const char *name, unsigned int insn,
    int d, int a);
int powerpc_get_constant (OrcCompiler *p, int type, int value);
int powerpc_get_constant_full (OrcCompiler *p, int value0, int value1, int value2, int value3);
void powerpc_load_long_constant (OrcCompiler *p, int reg, orc_uint32 a,
    orc_uint32 b, orc_uint32 c, orc_uint32 d);

/* instructions */
#define powerpc_emit_vand(p,a,b,c)         powerpc_emit_VX_2 (p, "vand", 0x10000404, a, b, c)
#define powerpc_emit_vandc(p,a,b,c)        powerpc_emit_VX_2 (p, "vandc", 0x10000444, a, b, c)

#define powerpc_emit_vor(p,a,b,c)          powerpc_emit_VX_2 (p, "vor", 0x10000484, a, b, c)
#define powerpc_emit_vxor(p,a,b,c)         powerpc_emit_VX_2 (p, "vxor", 0x100004c4, a, b, c)

#define powerpc_emit_vmulesb(p,a,b,c)      powerpc_emit_VX_2 (p, "vmulesb", 0x10000308, a, b, c)
#define powerpc_emit_vmuleub(p,a,b,c)      powerpc_emit_VX_2 (p, "vmuleub", 0x10000208, a, b, c)
#define powerpc_emit_vmulesh(p,a,b,c)      powerpc_emit_VX_2 (p, "vmulesh", 0x10000348, a, b, c)
#define powerpc_emit_vmuleuh(p,a,b,c)      powerpc_emit_VX_2 (p, "vmuleuh", 0x10000248, a, b, c)

#define powerpc_emit_vmrghb(p,a,b,c)       powerpc_emit_VX_2 (p, "vmrghb", 0x1000000c, a, b, c)
#define powerpc_emit_vmrghh(p,a,b,c)       powerpc_emit_VX_2 (p, "vmrghh", 0x1000004c, a, b, c)

#define powerpc_emit_vpkshss(p,a,b,c)      powerpc_emit_VX_2 (p, "vpkshss", 0x1000018e, a, b, c)
#define powerpc_emit_vpkshus(p,a,b,c)      powerpc_emit_VX_2 (p, "vpkshus", 0x1000010e, a, b, c)
#define powerpc_emit_vpkswss(p,a,b,c)      powerpc_emit_VX_2 (p, "vpkswss", 0x100001ce, a, b, c)
#define powerpc_emit_vpkswus(p,a,b,c)      powerpc_emit_VX_2 (p, "vpkswus", 0x1000014e, a, b, c)
#define powerpc_emit_vpkuhus(p,a,b,c)      powerpc_emit_VX_2 (p, "vpkuhus", 0x1000008e, a, b, c)
#define powerpc_emit_vpkuhum(p,a,b,c)      powerpc_emit_VX_2 (p, "vpkuhum", 0x1000000e, a, b, c)
#define powerpc_emit_vpkuwus(p,a,b,c)      powerpc_emit_VX_2 (p, "vpkuwus", 0x100000ce, a, b, c)
#define powerpc_emit_vpkuwum(p,a,b,c)      powerpc_emit_VX_2 (p, "vpkuwum", 0x1000004e, a, b, c)

#define powerpc_emit_vadduhm(p,a,b,c)      powerpc_emit_VX_2 (p, "vadduhm", 0x10000040, a, b, c)
#define powerpc_emit_vadduwm(p,a,b,c)      powerpc_emit_VX_2 (p, "vadduwm", 0x10000080, a, b, c)
#define powerpc_emit_vsububm(p,a,b,c)      powerpc_emit_VX_2 (p, "vsububm", 0x10000400, a, b, c)
#define powerpc_emit_vsum4ubs(p,a,b,c)     powerpc_emit_VX_2 (p, "vsum4ubs", 0x10000608, a, b, c)

#define powerpc_emit_vmaxub(p,a,b,c)       powerpc_emit_VX_2 (p, "vmaxub", 0x10000002, a, b, c)
#define powerpc_emit_vmaxsb(p,a,b,c)       powerpc_emit_VX_2 (p, "vmaxsb", 0x10000102, a, b, c)
#define powerpc_emit_vmaxsh(p,a,b,c)       powerpc_emit_VX_2 (p, "vmaxsh", 0x10000142, a, b, c)
#define powerpc_emit_vmaxsw(p,a,b,c)       powerpc_emit_VX_2 (p, "vmaxsw", 0x10000182, a, b, c)

#define powerpc_emit_vminub(p,a,b,c)       powerpc_emit_VX_2 (p, "vminub", 0x10000202, a, b, c)
#define powerpc_emit_vminsb(p,a,b,c)       powerpc_emit_VX_2 (p, "vminsb", 0x10000302, a, b, c)
#define powerpc_emit_vminsh(p,a,b,c)       powerpc_emit_VX_2 (p, "vminsh", 0x10000342, a, b, c)
#define powerpc_emit_vminsw(p,a,b,c)       powerpc_emit_VX_2 (p, "vminsw", 0x10000382, a, b, c)

#define powerpc_emit_vsldoi(p,a,b,c,d)     powerpc_emit_VX_3 (p, "vsldoi", 0x1000002c | (d<<6), a, b, c, d)
#define powerpc_emit_vmladduhm(p,a,b,c,d)  powerpc_emit_VA (p, "vmladduhm", 0x10000022, a, b, c, d)

#define powerpc_emit_vupkhsb(p,a,b)        powerpc_emit_VX_4 (p, "vupkhsb", 0x1000020e, a, b)
#define powerpc_emit_vupkhsh(p,a,b)        powerpc_emit_VX_4 (p, "vupkhsh", 0x1000024e, a, b)

#define powerpc_emit_vperm(p,a,b,c,d)      powerpc_emit_VA (p, "vperm", 0x1000002b, a, b, c, d)

#endif

ORC_END_DECLS

#endif



<|start_filename|>node_modules/cache-manager/lib/callback_filler.js<|end_filename|>
function CallbackFiller() {
    this.queues = {};
}

CallbackFiller.prototype.fill = function(key, err, data) {
    var waiting = this.queues[key];
    delete this.queues[key];

    if (waiting && waiting.length) {
        waiting.forEach(function(task) {
            (task.cb)(err, data);
        });
    }
};

CallbackFiller.prototype.has = function(key) {
    return this.queues[key];
};

CallbackFiller.prototype.add = function(key, funcObj) {
    if (this.queues[key]) {
        this.queues[key].push(funcObj);
    } else {
        this.queues[key] = [funcObj];
    }
};

module.exports = CallbackFiller;


<|start_filename|>node_modules/@jimp/types/dist/index.js<|end_filename|>
"use strict";

require("core-js/modules/es6.object.define-property");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _timm = require("timm");

var _jpeg = _interopRequireDefault(require("@jimp/jpeg"));

var _png = _interopRequireDefault(require("@jimp/png"));

var _bmp = _interopRequireDefault(require("@jimp/bmp"));

var _tiff = _interopRequireDefault(require("@jimp/tiff"));

var _gif = _interopRequireDefault(require("@jimp/gif"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var _default = function _default() {
  return (0, _timm.mergeDeep)((0, _jpeg.default)(), (0, _png.default)(), (0, _bmp.default)(), (0, _tiff.default)(), (0, _gif.default)());
};

exports.default = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/@jimp/plugin-color/src/index.js<|end_filename|>
import tinyColor from 'tinycolor2';
import { throwError, isNodePattern } from '@jimp/utils';

function applyKernel(im, kernel, x, y) {
  const value = [0, 0, 0];
  const size = (kernel.length - 1) / 2;

  for (let kx = 0; kx < kernel.length; kx += 1) {
    for (let ky = 0; ky < kernel[kx].length; ky += 1) {
      const idx = im.getPixelIndex(x + kx - size, y + ky - size);

      value[0] += im.bitmap.data[idx] * kernel[kx][ky];
      value[1] += im.bitmap.data[idx + 1] * kernel[kx][ky];
      value[2] += im.bitmap.data[idx + 2] * kernel[kx][ky];
    }
  }
  return value;
}

const isDef = v => typeof v !== 'undefined' && v !== null;

function greyscale(cb) {
  this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
    x,
    y,
    idx
  ) {
    const grey = parseInt(
      0.2126 * this.bitmap.data[idx] +
        0.7152 * this.bitmap.data[idx + 1] +
        0.0722 * this.bitmap.data[idx + 2],
      10
    );

    this.bitmap.data[idx] = grey;
    this.bitmap.data[idx + 1] = grey;
    this.bitmap.data[idx + 2] = grey;
  });

  if (isNodePattern(cb)) {
    cb.call(this, null, this);
  }

  return this;
}

function mix(clr, clr2, p = 50) {
  return {
    r: (clr2.r - clr.r) * (p / 100) + clr.r,
    g: (clr2.g - clr.g) * (p / 100) + clr.g,
    b: (clr2.b - clr.b) * (p / 100) + clr.b
  };
}

function colorFn(actions, cb) {
  if (!actions || !Array.isArray(actions)) {
    return throwError.call(this, 'actions must be an array', cb);
  }

  actions = actions.map(action => {
    if (action.apply === 'xor' || action.apply === 'mix') {
      action.params[0] = tinyColor(action.params[0]).toRgb();
    }

    return action;
  });

  this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, (x, y, idx) => {
    let clr = {
      r: this.bitmap.data[idx],
      g: this.bitmap.data[idx + 1],
      b: this.bitmap.data[idx + 2]
    };

    const colorModifier = (i, amount) =>
      this.constructor.limit255(clr[i] + amount);

    actions.forEach(action => {
      if (action.apply === 'mix') {
        clr = mix(clr, action.params[0], action.params[1]);
      } else if (action.apply === 'tint') {
        clr = mix(clr, { r: 255, g: 255, b: 255 }, action.params[0]);
      } else if (action.apply === 'shade') {
        clr = mix(clr, { r: 0, g: 0, b: 0 }, action.params[0]);
      } else if (action.apply === 'xor') {
        clr = {
          r: clr.r ^ action.params[0].r,
          g: clr.g ^ action.params[0].g,
          b: clr.b ^ action.params[0].b
        };
      } else if (action.apply === 'red') {
        clr.r = colorModifier('r', action.params[0]);
      } else if (action.apply === 'green') {
        clr.g = colorModifier('g', action.params[0]);
      } else if (action.apply === 'blue') {
        clr.b = colorModifier('b', action.params[0]);
      } else {
        if (action.apply === 'hue') {
          action.apply = 'spin';
        }

        clr = tinyColor(clr);

        if (!clr[action.apply]) {
          return throwError.call(
            this,
            'action ' + action.apply + ' not supported',
            cb
          );
        }

        clr = clr[action.apply](...action.params).toRgb();
      }
    });

    this.bitmap.data[idx] = clr.r;
    this.bitmap.data[idx + 1] = clr.g;
    this.bitmap.data[idx + 2] = clr.b;
  });

  if (isNodePattern(cb)) {
    cb.call(this, null, this);
  }

  return this;
}

export default () => ({
  /**
   * Adjusts the brightness of the image
   * @param {number} val the amount to adjust the brightness, a number between -1 and +1
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  brightness(val, cb) {
    if (typeof val !== 'number') {
      return throwError.call(this, 'val must be numbers', cb);
    }

    if (val < -1 || val > +1) {
      return throwError.call(
        this,
        'val must be a number between -1 and +1',
        cb
      );
    }

    this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
      x,
      y,
      idx
    ) {
      if (val < 0.0) {
        this.bitmap.data[idx] = this.bitmap.data[idx] * (1 + val);
        this.bitmap.data[idx + 1] = this.bitmap.data[idx + 1] * (1 + val);
        this.bitmap.data[idx + 2] = this.bitmap.data[idx + 2] * (1 + val);
      } else {
        this.bitmap.data[idx] =
          this.bitmap.data[idx] + (255 - this.bitmap.data[idx]) * val;
        this.bitmap.data[idx + 1] =
          this.bitmap.data[idx + 1] + (255 - this.bitmap.data[idx + 1]) * val;
        this.bitmap.data[idx + 2] =
          this.bitmap.data[idx + 2] + (255 - this.bitmap.data[idx + 2]) * val;
      }
    });

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },

  /**
   * Adjusts the contrast of the image
   * @param {number} val the amount to adjust the contrast, a number between -1 and +1
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  contrast(val, cb) {
    if (typeof val !== 'number') {
      return throwError.call(this, 'val must be numbers', cb);
    }

    if (val < -1 || val > +1) {
      return throwError.call(
        this,
        'val must be a number between -1 and +1',
        cb
      );
    }

    const factor = (val + 1) / (1 - val);

    function adjust(value) {
      value = Math.floor(factor * (value - 127) + 127);

      return value < 0 ? 0 : value > 255 ? 255 : value;
    }

    this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
      x,
      y,
      idx
    ) {
      this.bitmap.data[idx] = adjust(this.bitmap.data[idx]);
      this.bitmap.data[idx + 1] = adjust(this.bitmap.data[idx + 1]);
      this.bitmap.data[idx + 2] = adjust(this.bitmap.data[idx + 2]);
    });

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },

  /**
   * Apply a posterize effect
   * @param {number} n the amount to adjust the contrast, minimum threshold is two
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  posterize(n, cb) {
    if (typeof n !== 'number') {
      return throwError.call(this, 'n must be numbers', cb);
    }

    if (n < 2) {
      n = 2;
    } // minimum of 2 levels

    this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
      x,
      y,
      idx
    ) {
      this.bitmap.data[idx] =
        (Math.floor((this.bitmap.data[idx] / 255) * (n - 1)) / (n - 1)) * 255;
      this.bitmap.data[idx + 1] =
        (Math.floor((this.bitmap.data[idx + 1] / 255) * (n - 1)) / (n - 1)) *
        255;
      this.bitmap.data[idx + 2] =
        (Math.floor((this.bitmap.data[idx + 2] / 255) * (n - 1)) / (n - 1)) *
        255;
    });

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },

  /**
   * Removes colour from the image using ITU Rec 709 luminance values
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  greyscale,

  // Alias of greyscale for our American friends
  grayscale: greyscale,

  /**
   * Multiplies the opacity of each pixel by a factor between 0 and 1
   * @param {number} f A number, the factor by which to multiply the opacity of each pixel
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  opacity(f, cb) {
    if (typeof f !== 'number')
      return throwError.call(this, 'f must be a number', cb);
    if (f < 0 || f > 1)
      return throwError.call(this, 'f must be a number from 0 to 1', cb);

    this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
      x,
      y,
      idx
    ) {
      const v = this.bitmap.data[idx + 3] * f;
      this.bitmap.data[idx + 3] = v;
    });

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },

  /**
   * Applies a sepia tone to the image
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  sepia(cb) {
    this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
      x,
      y,
      idx
    ) {
      let red = this.bitmap.data[idx];
      let green = this.bitmap.data[idx + 1];
      let blue = this.bitmap.data[idx + 2];

      red = red * 0.393 + green * 0.769 + blue * 0.189;
      green = red * 0.349 + green * 0.686 + blue * 0.168;
      blue = red * 0.272 + green * 0.534 + blue * 0.131;

      this.bitmap.data[idx] = red < 255 ? red : 255;
      this.bitmap.data[idx + 1] = green < 255 ? green : 255;
      this.bitmap.data[idx + 2] = blue < 255 ? blue : 255;
    });

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },

  /**
   * Fades each pixel by a factor between 0 and 1
   * @param {number} f A number from 0 to 1. 0 will haven no effect. 1 will turn the image completely transparent.
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  fade(f, cb) {
    if (typeof f !== 'number') {
      return throwError.call(this, 'f must be a number', cb);
    }

    if (f < 0 || f > 1) {
      return throwError.call(this, 'f must be a number from 0 to 1', cb);
    }

    // this method is an alternative to opacity (which may be deprecated)
    this.opacity(1 - f);

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },

  /**
   * Adds each element of the image to its local neighbors, weighted by the kernel
   * @param {array} kernel a matrix to weight the neighbors sum
   * @param {string} edgeHandling (optional) define how to sum pixels from outside the border
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  convolution(kernel, edgeHandling, cb) {
    if (typeof edgeHandling === 'function' && typeof cb === 'undefined') {
      cb = edgeHandling;
      edgeHandling = null;
    }

    if (!edgeHandling) {
      edgeHandling = this.constructor.EDGE_EXTEND;
    }

    const newData = Buffer.from(this.bitmap.data);
    const kRows = kernel.length;
    const kCols = kernel[0].length;
    const rowEnd = Math.floor(kRows / 2);
    const colEnd = Math.floor(kCols / 2);
    const rowIni = -rowEnd;
    const colIni = -colEnd;

    let weight;
    let rSum;
    let gSum;
    let bSum;
    let ri;
    let gi;
    let bi;
    let xi;
    let yi;
    let idxi;

    this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
      x,
      y,
      idx
    ) {
      bSum = 0;
      gSum = 0;
      rSum = 0;

      for (let row = rowIni; row <= rowEnd; row++) {
        for (let col = colIni; col <= colEnd; col++) {
          xi = x + col;
          yi = y + row;
          weight = kernel[row + rowEnd][col + colEnd];
          idxi = this.getPixelIndex(xi, yi, edgeHandling);

          if (idxi === -1) {
            bi = 0;
            gi = 0;
            ri = 0;
          } else {
            ri = this.bitmap.data[idxi + 0];
            gi = this.bitmap.data[idxi + 1];
            bi = this.bitmap.data[idxi + 2];
          }

          rSum += weight * ri;
          gSum += weight * gi;
          bSum += weight * bi;
        }
      }

      if (rSum < 0) {
        rSum = 0;
      }

      if (gSum < 0) {
        gSum = 0;
      }

      if (bSum < 0) {
        bSum = 0;
      }

      if (rSum > 255) {
        rSum = 255;
      }

      if (gSum > 255) {
        gSum = 255;
      }

      if (bSum > 255) {
        bSum = 255;
      }

      newData[idx + 0] = rSum;
      newData[idx + 1] = gSum;
      newData[idx + 2] = bSum;
    });

    this.bitmap.data = newData;

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },

  /**
   * Set the alpha channel on every pixel to fully opaque
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  opaque(cb) {
    this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
      x,
      y,
      idx
    ) {
      this.bitmap.data[idx + 3] = 255;
    });

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },

  /**
   * Pixelates the image or a region
   * @param {number} size the size of the pixels
   * @param {number} x (optional) the x position of the region to pixelate
   * @param {number} y (optional) the y position of the region to pixelate
   * @param {number} w (optional) the width of the region to pixelate
   * @param {number} h (optional) the height of the region to pixelate
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  pixelate(size, x, y, w, h, cb) {
    if (typeof x === 'function') {
      cb = x;
      h = null;
      w = null;
      y = null;
      x = null;
    } else {
      if (typeof size !== 'number') {
        return throwError.call(this, 'size must be a number', cb);
      }

      if (isDef(x) && typeof x !== 'number') {
        return throwError.call(this, 'x must be a number', cb);
      }

      if (isDef(y) && typeof y !== 'number') {
        return throwError.call(this, 'y must be a number', cb);
      }

      if (isDef(w) && typeof w !== 'number') {
        return throwError.call(this, 'w must be a number', cb);
      }

      if (isDef(h) && typeof h !== 'number') {
        return throwError.call(this, 'h must be a number', cb);
      }
    }

    const kernel = [
      [1 / 16, 2 / 16, 1 / 16],
      [2 / 16, 4 / 16, 2 / 16],
      [1 / 16, 2 / 16, 1 / 16]
    ];

    x = x || 0;
    y = y || 0;
    w = isDef(w) ? w : this.bitmap.width - x;
    h = isDef(h) ? h : this.bitmap.height - y;

    const source = this.cloneQuiet();

    this.scanQuiet(x, y, w, h, function(xx, yx, idx) {
      xx = size * Math.floor(xx / size);
      yx = size * Math.floor(yx / size);

      const value = applyKernel(source, kernel, xx, yx);

      this.bitmap.data[idx] = value[0];
      this.bitmap.data[idx + 1] = value[1];
      this.bitmap.data[idx + 2] = value[2];
    });

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },

  /**
   * Applies a convolution kernel to the image or a region
   * @param {array} kernel the convolution kernel
   * @param {number} x (optional) the x position of the region to apply convolution to
   * @param {number} y (optional) the y position of the region to apply convolution to
   * @param {number} w (optional) the width of the region to apply convolution to
   * @param {number} h (optional) the height of the region to apply convolution to
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  convolute(kernel, x, y, w, h, cb) {
    if (!Array.isArray(kernel))
      return throwError.call(this, 'the kernel must be an array', cb);

    if (typeof x === 'function') {
      cb = x;
      x = null;
      y = null;
      w = null;
      h = null;
    } else {
      if (isDef(x) && typeof x !== 'number') {
        return throwError.call(this, 'x must be a number', cb);
      }

      if (isDef(y) && typeof y !== 'number') {
        return throwError.call(this, 'y must be a number', cb);
      }

      if (isDef(w) && typeof w !== 'number') {
        return throwError.call(this, 'w must be a number', cb);
      }

      if (isDef(h) && typeof h !== 'number') {
        return throwError.call(this, 'h must be a number', cb);
      }
    }

    const ksize = (kernel.length - 1) / 2;

    x = isDef(x) ? x : ksize;
    y = isDef(y) ? y : ksize;
    w = isDef(w) ? w : this.bitmap.width - x;
    h = isDef(h) ? h : this.bitmap.height - y;

    const source = this.cloneQuiet();

    this.scanQuiet(x, y, w, h, function(xx, yx, idx) {
      const value = applyKernel(source, kernel, xx, yx);

      this.bitmap.data[idx] = this.constructor.limit255(value[0]);
      this.bitmap.data[idx + 1] = this.constructor.limit255(value[1]);
      this.bitmap.data[idx + 2] = this.constructor.limit255(value[2]);
    });

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },

  /**
   * Apply multiple color modification rules
   * @param {array} actions list of color modification rules, in following format: { apply: '<rule-name>', params: [ <rule-parameters> ]  }
   * @param {function(Error, Jimp)} cb (optional) a callback for when complete
   * @returns {Jimp }this for chaining of methods
   */
  color: colorFn,
  colour: colorFn
});


<|start_filename|>node_modules/graphql/polyfills/find.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

/* eslint-disable no-redeclare */
// $FlowFixMe
var find = Array.prototype.find ? function (list, predicate) {
  return Array.prototype.find.call(list, predicate);
} : function (list, predicate) {
  for (var _i2 = 0; _i2 < list.length; _i2++) {
    var value = list[_i2];

    if (predicate(value)) {
      return value;
    }
  }
};
var _default = find;
exports.default = _default;


<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-fonts.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */

/*
 * This file is part of The Croco Library
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of 
 * the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the 
 * GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 *
 * Author: <NAME>
 * See COPYRIGHTS file for copyright information.
 */

#ifndef __CR_FONTS_H__
#define __CR_FONTS_H__

#include "cr-utils.h"
#include "cr-num.h"

/**
 *@file
 *Various type declarations about font selection related
 *properties.
 */
G_BEGIN_DECLS


enum CRFontFamilyType
{
	FONT_FAMILY_SANS_SERIF,
	FONT_FAMILY_SERIF,	
	FONT_FAMILY_CURSIVE,
	FONT_FAMILY_FANTASY,
	FONT_FAMILY_MONOSPACE,
	FONT_FAMILY_NON_GENERIC,
	FONT_FAMILY_INHERIT,
	/**/
	NB_FONT_FAMILIE_TYPES
} ;

typedef struct _CRFontFamily CRFontFamily ;

struct _CRFontFamily
{
	enum CRFontFamilyType type ;

	/*
	 *The name of the font family, in case
	 *it is non generic.
	 *Is set only if the type is FONT_FAMILY_NON_GENERIC.
	 */
	guchar *name ;

	CRFontFamily *next ;
	CRFontFamily *prev ;
} ;


/**
 *The different types
 *of absolute font size.
 *This is used by the 'font-size'
 *property defined in css2 spec
 *in chapter 15.2.4 .
 *These values a indexes of 
 *table of size so please, do not
 *change their definition order unless
 *you know what you are doing.
 */
enum CRPredefinedAbsoluteFontSize
{
        FONT_SIZE_XX_SMALL=0,
        FONT_SIZE_X_SMALL,
        FONT_SIZE_SMALL,
        FONT_SIZE_MEDIUM,
        FONT_SIZE_LARGE,
        FONT_SIZE_X_LARGE,
        FONT_SIZE_XX_LARGE,
	FONT_SIZE_INHERIT,
        NB_PREDEFINED_ABSOLUTE_FONT_SIZES
} ;

/**
 *The different types
 *of relative font size.
 *This is used by the 'font-size'
 *property defined in css2 spec
 *in chapter 15.2.4 .
 *These values a indexes of 
 *table of size so please, do not
 *change their definition order unless
 *you know what you are doing.
 */
enum CRRelativeFontSize
{        
        FONT_SIZE_LARGER,
        FONT_SIZE_SMALLER,
        NB_RELATIVE_FONT_SIZE
} ;

/**
 *The type of font-size property.
 *Used to define the type of #CRFontSize .
 *See css2 spec chapter 15.2.4 to understand.
 */
enum CRFontSizeType {
        /**
         *If the type of #CRFontSize is
         *PREDEFINED_ABSOLUTE_FONT_SIZE,
         *the CRFontSize::value.predefined_absolute 
         *field will be defined.
         */
        PREDEFINED_ABSOLUTE_FONT_SIZE,
        
        /**
         *If the type of #CRFontSize is
         *ABSOLUTE_FONT_SIZE,
         *the CRFontSize::value.absolute 
         *field will be defined.
         */
        ABSOLUTE_FONT_SIZE,

        /**
         *If the type of #CRFontSize is
         *RELATIVE_FONT_SIZE,
         *the CRFontSize::value.relative
         *field will be defined.
         */
        RELATIVE_FONT_SIZE,

        /**
         *If the type of #CRFontSize is
         *INHERITED_FONT_SIZE,
         *the None of the field of the CRFontSize::value enum
         *will be defined.
         */
        INHERITED_FONT_SIZE,

        NB_FONT_SIZE_TYPE
} ;

typedef struct _CRFontSize CRFontSize ;
struct _CRFontSize {
        enum CRFontSizeType type ;
        union  {
                enum CRPredefinedAbsoluteFontSize predefined ;
                enum CRRelativeFontSize relative ;
                CRNum absolute ;
        } value;
} ;

enum CRFontSizeAdjustType
{
        FONT_SIZE_ADJUST_NONE = 0,
        FONT_SIZE_ADJUST_NUMBER,
        FONT_SIZE_ADJUST_INHERIT
} ;
typedef struct _CRFontSizeAdjust CRFontSizeAdjust ;
struct _CRFontSizeAdjust
{
        enum CRFontSizeAdjustType type ;
        CRNum *num ;
} ;

enum CRFontStyle
{
        FONT_STYLE_NORMAL=0,
        FONT_STYLE_ITALIC,
        FONT_STYLE_OBLIQUE,
        FONT_STYLE_INHERIT
} ;

enum CRFontVariant
{
        FONT_VARIANT_NORMAL=0,
        FONT_VARIANT_SMALL_CAPS,
        FONT_VARIANT_INHERIT
} ;

enum CRFontWeight
{
        FONT_WEIGHT_NORMAL = 1,
        FONT_WEIGHT_BOLD = 1<<1,
        FONT_WEIGHT_BOLDER = 1<<2,
        FONT_WEIGHT_LIGHTER = 1<<3,
        FONT_WEIGHT_100 = 1<<4,
        FONT_WEIGHT_200 = 1<<5,
        FONT_WEIGHT_300 = 1<<6,
        FONT_WEIGHT_400 = 1<<7,
        FONT_WEIGHT_500 = 1<<8,
        FONT_WEIGHT_600 = 1<<9,
        FONT_WEIGHT_700 = 1<<10,
        FONT_WEIGHT_800 = 1<<11,
        FONT_WEIGHT_900 = 1<<12,
        FONT_WEIGHT_INHERIT = 1<<13,
        NB_FONT_WEIGHTS
} ;

enum CRFontStretch
{
        FONT_STRETCH_NORMAL=0,
        FONT_STRETCH_WIDER,
        FONT_STRETCH_NARROWER,
        FONT_STRETCH_ULTRA_CONDENSED,
        FONT_STRETCH_EXTRA_CONDENSED,
        FONT_STRETCH_CONDENSED,
        FONT_STRETCH_SEMI_CONDENSED,
        FONT_STRETCH_SEMI_EXPANDED,
        FONT_STRETCH_EXPANDED,
        FONT_STRETCH_EXTRA_EXPANDED,
        FONT_STRETCH_ULTRA_EXPANDED,
        FONT_STRETCH_INHERIT
} ;

/**************************************
 *'font-family' manipulation functions
 ***************************************/
CRFontFamily *
cr_font_family_new (enum CRFontFamilyType a_type, guchar *a_name) ;

CRFontFamily *
cr_font_family_append (CRFontFamily *a_this, 
		       CRFontFamily *a_family_to_append) ;

guchar *
cr_font_family_to_string (CRFontFamily const *a_this,
                          gboolean a_walk_font_family_list) ;

CRFontFamily *
cr_font_family_prepend (CRFontFamily *a_this, 
			CRFontFamily *a_family_to_prepend);

enum CRStatus
cr_font_family_destroy (CRFontFamily *a_this) ;

enum CRStatus
cr_font_family_set_name (CRFontFamily *a_this, guchar *a_name) ;


/************************************
 *'font-size' manipulation functions
 ***********************************/

CRFontSize * cr_font_size_new (void) ;

enum CRStatus cr_font_size_clear (CRFontSize *a_this) ;

enum CRStatus cr_font_size_copy (CRFontSize *a_dst, 
                                 CRFontSize const *a_src) ;
enum CRStatus cr_font_size_set_predefined_absolute_font_size (CRFontSize *a_this, 
                                                              enum CRPredefinedAbsoluteFontSize a_predefined) ;
enum CRStatus cr_font_size_set_relative_font_size (CRFontSize *a_this,
                                                   enum CRRelativeFontSize a_relative) ;

enum CRStatus cr_font_size_set_absolute_font_size (CRFontSize *a_this,
                                                   enum CRNumType a_num_type,
                                                   gdouble a_value) ;

enum CRStatus cr_font_size_set_to_inherit (CRFontSize *a_this) ;

gboolean cr_font_size_is_set_to_inherit (CRFontSize const *a_this) ;

gchar* cr_font_size_to_string (CRFontSize const *a_this) ;

void cr_font_size_destroy (CRFontSize *a_font_size) ;

/*******************************************************
 *'font-size-adjust' manipulation function declarations
 *******************************************************/

CRFontSizeAdjust * cr_font_size_adjust_new (void) ;

gchar * cr_font_size_adjust_to_string (CRFontSizeAdjust const *a_this) ;

void cr_font_size_adjust_destroy (CRFontSizeAdjust *a_this) ;

void 
cr_font_size_get_smaller_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size,
                                               enum CRPredefinedAbsoluteFontSize *a_smaller_size) ;
void
cr_font_size_get_larger_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size,
                                              enum CRPredefinedAbsoluteFontSize *a_larger_size) ;

gboolean
cr_font_size_is_predefined_absolute_font_size (enum CRPredefinedAbsoluteFontSize a_font_size) ;

/***********************************
 *various other font related functions
 ***********************************/
const gchar * cr_font_style_to_string (enum CRFontStyle a_code) ;

const gchar * cr_font_weight_to_string (enum CRFontWeight a_code)  ;

enum CRFontWeight
cr_font_weight_get_bolder (enum CRFontWeight a_weight) ;

const gchar * cr_font_variant_to_string (enum CRFontVariant a_code) ;

const gchar * cr_font_stretch_to_string (enum CRFontStretch a_code) ;

G_END_DECLS

#endif


<|start_filename|>node_modules/probe-image-size/lib/parse_sync/png.js<|end_filename|>
'use strict';

/* eslint-disable consistent-return */

var str2arr      = require('../common').str2arr;
var sliceEq      = require('../common').sliceEq;
var readUInt32BE = require('../common').readUInt32BE;


var SIG_PNG  = str2arr('\x89PNG\r\n\x1a\n');
var SIG_IHDR = str2arr('IHDR');


module.exports = function (data) {
  if (data.length < 24) return;

  // check PNG signature
  if (!sliceEq(data, 0, SIG_PNG)) return;

  // check that first chunk is IHDR
  if (!sliceEq(data, 12, SIG_IHDR)) return;

  return {
    width:  readUInt32BE(data, 16),
    height: readUInt32BE(data, 20),
    type: 'png',
    mime: 'image/png',
    wUnits: 'px',
    hUnits: 'px'
  };
};


<|start_filename|>node_modules/builtin-modules/index.js<|end_filename|>
'use strict';
const {builtinModules} = require('module');

const blacklist = [
	'sys'
];

// eslint-disable-next-line node/no-deprecated-api
module.exports = (builtinModules || Object.keys(process.binding('natives')))
	.filter(x => !/^_|^(internal|v8|node-inspect)\/|\//.test(x) && !blacklist.includes(x))
	.sort();


<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-enc-handler.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */

/*
 * This file is part of The Croco Library
 *
 * Copyright (C) 2002-2003 <NAME> <<EMAIL>>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */

/*
 *$Id$
 */

/**
 *@file:
 *The declaration of the #CREncHandler class.
 *
 */

#ifndef __CR_ENC_HANDLER_H__
#define __CR_ENC_HANDLER_H__

#include "cr-utils.h"

G_BEGIN_DECLS


typedef struct _CREncHandler CREncHandler ;

typedef enum CRStatus (*CREncInputFunc) (const guchar * a_in,
                                         gulong *a_in_len,
                                         guchar *a_out,
                                         gulong *a_out_len) ;

typedef enum CRStatus (*CREncOutputFunc) (const guchar * a_in,
                                          gulong *a_in_len,
                                          guchar *a_out,
                                          gulong *a_out_len) ;

typedef enum CRStatus (*CREncInputStrLenAsUtf8Func) 
(const guchar *a_in_start,
 const guchar *a_in_end,
 gulong *a_in_size);

typedef enum CRStatus  (*CREncUtf8StrLenAsOutputFunc)
(const guchar *a_in_start,
 const guchar *a_in_end,
 gulong *a_in_size) ;

/**
 *This class is responsible of the
 *the encoding conversions stuffs in
 *libcroco.
 */

struct _CREncHandler
{
        enum CREncoding encoding ;
        CREncInputFunc decode_input ;                
        CREncInputFunc encode_output ;
        CREncInputStrLenAsUtf8Func enc_str_len_as_utf8 ;
        CREncUtf8StrLenAsOutputFunc utf8_str_len_as_enc ;
} ;

CREncHandler *
cr_enc_handler_get_instance (enum CREncoding a_enc) ;

enum CRStatus
cr_enc_handler_resolve_enc_alias (const guchar *a_alias_name, 
                                  enum CREncoding *a_enc) ;

enum CRStatus
cr_enc_handler_convert_input (CREncHandler *a_this,
                              const guchar *a_in,
                              gulong *a_in_len,
                              guchar **a_out,
                              gulong *a_out_len) ;

G_END_DECLS

#endif /*__CR_ENC_HANDLER_H__*/


<|start_filename|>node_modules/sharp/vendor/include/hb-ot-color.h<|end_filename|>
/*
 * Copyright © 2016  Google, Inc.
 * Copyright © 2018  <NAME>
 * Copyright © 2018  <NAME>
 *
 *  This is part of HarfBuzz, a text shaping library.
 *
 * Permission is hereby granted, without written agreement and without
 * license or royalty fees, to use, copy, modify, and distribute this
 * software and its documentation for any purpose, provided that the
 * above copyright notice and the following two paragraphs appear in
 * all copies of this software.
 *
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 *
 * Google Author(s): <NAME>, <NAME>
 */

#ifndef HB_OT_H_IN
#error "Include <hb-ot.h> instead."
#endif

#ifndef HB_OT_COLOR_H
#define HB_OT_COLOR_H

#include "hb.h"
#include "hb-ot-name.h"

HB_BEGIN_DECLS


/*
 * Color palettes.
 */

HB_EXTERN hb_bool_t
hb_ot_color_has_palettes (hb_face_t *face);

HB_EXTERN unsigned int
hb_ot_color_palette_get_count (hb_face_t *face);

HB_EXTERN hb_ot_name_id_t
hb_ot_color_palette_get_name_id (hb_face_t *face,
				 unsigned int palette_index);

HB_EXTERN hb_ot_name_id_t
hb_ot_color_palette_color_get_name_id (hb_face_t *face,
				       unsigned int color_index);

/**
 * hb_ot_color_palette_flags_t:
 * @HB_OT_COLOR_PALETTE_FLAG_DEFAULT: Default indicating that there is nothing special
 *   to note about a color palette.
 * @HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_LIGHT_BACKGROUND: Flag indicating that the color
 *   palette is appropriate to use when displaying the font on a light background such as white.
 * @HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_DARK_BACKGROUND: Flag indicating that the color
 *   palette is appropriate to use when displaying the font on a dark background such as black.
 *
 * Since: 2.1.0
 */
typedef enum { /*< flags >*/
  HB_OT_COLOR_PALETTE_FLAG_DEFAULT			= 0x00000000u,
  HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_LIGHT_BACKGROUND	= 0x00000001u,
  HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_DARK_BACKGROUND	= 0x00000002u
} hb_ot_color_palette_flags_t;

HB_EXTERN hb_ot_color_palette_flags_t
hb_ot_color_palette_get_flags (hb_face_t *face,
			       unsigned int palette_index);

HB_EXTERN unsigned int
hb_ot_color_palette_get_colors (hb_face_t    *face,
				unsigned int  palette_index,
				unsigned int  start_offset,
				unsigned int *color_count,  /* IN/OUT.  May be NULL. */
				hb_color_t   *colors        /* OUT.     May be NULL. */);


/*
 * Color layers.
 */

HB_EXTERN hb_bool_t
hb_ot_color_has_layers (hb_face_t *face);

/**
 * hb_ot_color_layer_t:
 *
 * Pairs of glyph and color index.
 *
 * Since: 2.1.0
 **/
typedef struct hb_ot_color_layer_t
{
  hb_codepoint_t glyph;
  unsigned int   color_index;
} hb_ot_color_layer_t;

HB_EXTERN unsigned int
hb_ot_color_glyph_get_layers (hb_face_t           *face,
			      hb_codepoint_t       glyph,
			      unsigned int         start_offset,
			      unsigned int        *layer_count, /* IN/OUT.  May be NULL. */
			      hb_ot_color_layer_t *layers /* OUT.     May be NULL. */);

/*
 * SVG
 */

HB_EXTERN hb_bool_t
hb_ot_color_has_svg (hb_face_t *face);

HB_EXTERN hb_blob_t *
hb_ot_color_glyph_reference_svg (hb_face_t *face, hb_codepoint_t glyph);

/*
 * PNG: CBDT or sbix
 */

HB_EXTERN hb_bool_t
hb_ot_color_has_png (hb_face_t *face);

HB_EXTERN hb_blob_t *
hb_ot_color_glyph_reference_png (hb_font_t *font, hb_codepoint_t glyph);


HB_END_DECLS

#endif /* HB_OT_COLOR_H */


<|start_filename|>node_modules/sharp/vendor/include/graphite2/Log.h<|end_filename|>
/*  GRAPHITE2 LICENSING

    Copyright 2010, SIL International
    All rights reserved.

    This library is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published
    by the Free Software Foundation; either version 2.1 of License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should also have received a copy of the GNU Lesser General Public
    License along with this library in the file named "LICENSE".
    If not, write to the Free Software Foundation, 51 Franklin Street,
    Suite 500, Boston, MA 02110-1335, USA or visit their web page on the
    internet at http://www.fsf.org/licenses/lgpl.html.

    Alternatively, the contents of this file may be used under the terms
    of the Mozilla Public License (http://mozilla.org/MPL) or the GNU
    General Public License, as published by the Free Software Foundation,
    either version 2 of the License or (at your option) any later version.
*/
#pragma once

#include <graphite2/Types.h>
#include <graphite2/Font.h>
#include <stdio.h>

#ifdef __cplusplus
extern "C"
{
#endif

/** deprecated mechanism that doesn't do anything now. */
typedef enum {
    GRLOG_NONE = 0x0,
    GRLOG_FACE = 0x01,
    GRLOG_SEGMENT = 0x02,
    GRLOG_PASS = 0x04,
    GRLOG_CACHE = 0x08,

    GRLOG_OPCODE = 0x80,
    GRLOG_ALL = 0xFF
} GrLogMask;

/** Start logging all segment creation and updates on the provided face.  This
  * is logged to a JSON file, see "Segment JSON Schema.txt" for a precise
  * definition of the file
  *
  * @return true    if the file was successfully created and logging is correctly
  * 			    initialised.
  * @param face     the gr_face whose segments you want to log to the given file
  * @param log_path a utf8 encoded file name and path to log to.
  */
GR2_API bool gr_start_logging(gr_face * face, const char *log_path);


/** Stop logging on the given face.  This will close the log file created by
  * gr_start_logging.
  *
  * @param face the gr_face whose segments you want to stop logging
  */
GR2_API void gr_stop_logging(gr_face * face);

/** Start logging to a FILE object.
  * This function is deprecated as of 1.2.0, use the _face versions instead.
  *
  * @return        True on success
  * @param logfile FILE reference to output logging to
  * @param mask    What aspects of logging to report (ignored)
  */
GR2_API bool graphite_start_logging(FILE * logFile, GrLogMask mask);    //may not do anthing if disabled in the implementation of the engine.

/** Stop logging to a FILE object.
  * This function is deprecated as of 1.2.0, use the _face versions instead.
  */
GR2_API void graphite_stop_logging();

#ifdef __cplusplus
}
#endif


<|start_filename|>node_modules/bin-version-check/index.js<|end_filename|>
'use strict';
const semver = require('semver');
const binVersion = require('bin-version');
const semverTruncate = require('semver-truncate');

module.exports = (binary, semverRange, options) => {
	if (typeof binary !== 'string' || typeof semverRange !== 'string') {
		return Promise.reject(new Error('`binary` and `semverRange` arguments required'));
	}

	if (!semver.validRange(semverRange)) {
		return Promise.reject(new Error('Invalid version range'));
	}

	return binVersion(binary, options).then(binaryVersion => {
		if (!semver.satisfies(semverTruncate(binaryVersion, 'patch'), semverRange)) {
			const error = new Error(`${binary} ${binaryVersion} doesn't satisfy the version requirement of ${semverRange}`);
			error.name = 'InvalidBinaryVersion';
			throw error;
		}
	});
};


<|start_filename|>node_modules/sharp/vendor/include/orc/orcdebug.h<|end_filename|>
/*
 * ORC - Library of Optimized Inner Loops
 * Copyright (c) 2003,2004 <NAME> <<EMAIL>>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef _ORC_DEBUG_H_
#define _ORC_DEBUG_H_

#include <stdarg.h>
#include <orc/orcutils.h>
#include <stdlib.h>

ORC_BEGIN_DECLS

/**
 * OrcDebugPrintFunc:
 * @level: the debug level
 * @file: name of the file where the debug message occurs
 * @func: name of the function where the debug message occurs
 * @line: line in the file where the debug message occurs
 * @format: a printf format
 * @varargs: varargs for the printf format
 *
 * Typedef describing functions that can be registered using
 * orc_debug_set_print_function() so that it is called to
 * print debugging messages.
 */
typedef void (*OrcDebugPrintFunc) (int level, const char *file,
    const char *func, int line, const char *format, va_list varargs);

/**
 * OrcDebugLevel:
 * @ORC_DEBUG_NONE: No debugging.  Used to disable debugging output.
 * @ORC_DEBUG_ERROR: The level for messages indicating that an error
 *   has occurred that causes Orc to produce incorrect results.  Also
 *   used temporarily by developers for testing code.
 * @ORC_DEBUG_WARNING: Messages at this level indicate something has
 *   occurred that a developer looking into an application problem may
 *   want to know.
 * @ORC_DEBUG_INFO: Messages at this level provide high-level
 *   information about Orc internals.
 * @ORC_DEBUG_DEBUG: The default level for logging messages.
 * @ORC_DEBUG_LOG: The level for messages that probably don't need to
 *   be logged at all.
 *
 * Enumeration describing debug levels in Orc.
 */
typedef enum {
  ORC_DEBUG_NONE = 0,
  ORC_DEBUG_ERROR,
  ORC_DEBUG_WARNING,
  ORC_DEBUG_INFO,
  ORC_DEBUG_DEBUG,
  ORC_DEBUG_LOG
} OrcDebugLevel;

/**
 * ORC_ERROR:
 * @...: printf-style format and arguments
 *
 * Macro to call ORC_DEBUG_PRINT() with a level of #ORC_DEBUG_ERROR.
 */
#define ORC_ERROR(...) ORC_DEBUG_PRINT(ORC_DEBUG_ERROR, __VA_ARGS__)
/**
 * ORC_WARNING:
 * @...: printf-style format and arguments
 *
 * Macro to call ORC_DEBUG_PRINT() with a level of #ORC_DEBUG_WARNING.
 */
#define ORC_WARNING(...) ORC_DEBUG_PRINT(ORC_DEBUG_WARNING, __VA_ARGS__)
/**
 * ORC_INFO:
 * @...: printf-style format and arguments
 *
 * Macro to call ORC_DEBUG_PRINT() with a level of #ORC_DEBUG_INFO.
 */
#define ORC_INFO(...) ORC_DEBUG_PRINT(ORC_DEBUG_INFO, __VA_ARGS__)
/**
 * ORC_DEBUG:
 * @...: printf-style format and arguments
 *
 * Macro to call ORC_DEBUG_PRINT() with a level of #ORC_DEBUG_DEBUG.
 */
#define ORC_DEBUG(...) ORC_DEBUG_PRINT(ORC_DEBUG_DEBUG, __VA_ARGS__)
/**
 * ORC_LOG:
 * @...: printf-style format and arguments
 *
 * Macro to call ORC_DEBUG_PRINT() with a level of #ORC_DEBUG_LOG.
 */
#define ORC_LOG(...) ORC_DEBUG_PRINT(ORC_DEBUG_LOG, __VA_ARGS__)

/**
 * ORC_FUNCTION:
 *
 * Internal macro that points to __PRETTY_FUNCTION__ or __func__
 * if the former is not available.
 */
#if defined (__GNUC__) || defined (__PRETTY_FUNCTION__)
#define ORC_FUNCTION __PRETTY_FUNCTION__
#elif defined(__func__)
#define ORC_FUNCTION __func__
#else
#define ORC_FUNCTION ""
#endif

/**
 * ORC_DEBUG_PRINT:
 * @level: debug level of message
 * @Varargs: printf-style format and arguments
 *
 * Macro to call orc_debug_print() with the correct values for
 * the name of the source file, line of source file, and function.
 */
#define ORC_DEBUG_PRINT(level, ...) do { \
  orc_debug_print((level), __FILE__, ORC_FUNCTION, __LINE__, __VA_ARGS__); \
}while(0)

#define ORC_ASSERT(test) do { \
  if (!(test)) { \
    ORC_ERROR("assertion failed: " #test ); \
    abort(); \
  } \
} while(0)

void orc_debug_set_print_function (OrcDebugPrintFunc func);
int orc_debug_get_level (void);
void orc_debug_set_level (int level);

void _orc_debug_init (void);

void orc_debug_print (int level, const char *file, const char *func,
    int line, const char *format, ...);

ORC_END_DECLS

#endif



<|start_filename|>node_modules/sift/test/use-test.js<|end_filename|>
var assert = require("assert"),
sift = require(".."),
ObjectID = require('bson').pure().ObjectID;

describe(__filename + "#", function() {

  it("can use custom operators", function() {

    var i = 0;

    sift.use({
      $abba: function(a, b) {
        i++;
      }
    });

    sift({ a: {$abba:-1}}, [1, 2, 3]);

    // expect(i).to.be(3);
    assert.equal(i, 3);
  });

  it("can use a function", function(next) {
    sift.use(function(sift) {
      assert.equal(sift(1, [1, 2, 3]).length, 1);
      next();
    })
  });

  sift.use({
    $notb: function(a, b) {
      return a != b ? true : false;
    }
  });

  var topic = [1, 2, 3, 4, 5, 6, 6, 4, 3];

  it("can use custom $notb operator", function() {
    assert.equal(sift({$notb: 6 }, topic).indexOf(6), -1);
  });

  describe('testing equality of custom objects', function () {
    var compare = sift.compare;

    before(function() {
      sift.compare = function(a, b) {
        if(a && b && a._bsontype && b._bsontype) {
          if(a.equals(b)) return 0;
          a = a.getTimestamp().getTime();
          b = b.getTimestamp().getTime();
        }
        return compare(a,b);
      };
    });

    after(function() {
      //put the original back
      sift.compare = compare;
    });

    var past = ObjectID(new Date(2015,2,16).getTime()/1000);
    var now = ObjectID();
    var future = ObjectID.createFromTime(new Date(2038,0,1).getTime()/1000);//https://github.com/mongodb/js-bson/issues/158
    var topic = [past, now, future];

    it('should use the customized compare function to determine equality', function () {
      var result = sift(ObjectID(future.toString()), topic);
      assert.equal(result.length, 1);
      assert.equal(result[0], future);
    });

    function test(query, expected) {
      var result = sift(query, topic);
      assert.equal(JSON.stringify(result), JSON.stringify(expected));
    }

    it('should use an ObjectIds timestamp to determine $gt', function () {
      test({ $gt: ObjectID(now) }, [future]);
    });

    it('should use an ObjectIds timestamp to determine $lt', function () {
      test({ $lt: ObjectID(now) }, [past]);
    });

    it('should use an ObjectIds timestamp to determine $lte', function () {
      test({ $lte: ObjectID(now) }, [past,now]);
    });

    it('should use an ObjectIds timestamp to determine $gte', function () {
      test({ $gte: ObjectID(now) }, [now,future]);
    });

  });

});


<|start_filename|>node_modules/probe-image-size/lib/parse_stream/psd.js<|end_filename|>
'use strict';


var ParserStream = require('../common').ParserStream;
var str2arr      = require('../common').str2arr;
var sliceEq      = require('../common').sliceEq;


var SIG_8BPS  = str2arr('8BPS\x00\x01');


module.exports = function () {
  var parser = new ParserStream();

  parser._bytes(6, function (data) {
    // signature + version
    if (!sliceEq(data, 0, SIG_8BPS)) {
      parser._skipBytes(Infinity);
      parser.push(null);
      return;
    }

    parser._bytes(16, function (data) {
      parser._skipBytes(Infinity);

      parser.push({
        width:  data.readUInt32BE(12),
        height: data.readUInt32BE(8),
        type: 'psd',
        mime: 'image/vnd.adobe.photoshop',
        wUnits: 'px',
        hUnits: 'px'
      });

      parser.push(null);
    });
  });

  return parser;
};


<|start_filename|>node_modules/meant/index.js<|end_filename|>
function levenshteinD (s1, s2) {
  var d = []
  var i = 0

  for (i = 0; i <= s1.length; i++) d[i] = [i]
  for (i = 0; i <= s2.length; i++) d[0][i] = i

  s2.split('').forEach(function (c2, j) {
    s1.split('').forEach(function (c1, i) {
      if (c1 === c2) {
        d[i + 1][j + 1] = d[i][j]
        return
      }
      d[i + 1][j + 1] = Math.min(
        d[i][j + 1] + 1,
        d[i + 1][j] + 1,
        d[i][j] + 1
      )
    })
  })

  return d[s1.length][s2.length]
}

function meant (scmd, commands) {
  var d = []
  var bestSimilarity = []

  commands.forEach(function (cmd, i) {
    var item = {}
    item[levenshteinD(scmd, cmd)] = i
    d.push(item)
  })

  d.sort(function (a, b) {
    return Number(Object.keys(a)[0]) - Number(Object.keys(b)[0])
  })

  d.forEach(function (item) {
    var key = Number(Object.keys(item)[0])
    if (scmd.length / 2 >= key) {
      bestSimilarity.push(commands[item[key]])
    }
  })

  return bestSimilarity
}

module.exports = meant


<|start_filename|>node_modules/semver-regex/index.js<|end_filename|>
'use strict';
module.exports = () => /\bv?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z-]+(?:\.[\da-z-]+)*)?(?:\+[\da-z-]+(?:\.[\da-z-]+)*)?\b/ig;


<|start_filename|>node_modules/graphql/utilities/isValidJSValue.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isValidJSValue = isValidJSValue;

var _coerceValue = require("./coerceValue");

/* istanbul ignore file */

/**
 * Deprecated. Use coerceInputValue() directly for richer information.
 *
 * This function will be removed in v15
 */
function isValidJSValue(value, type) {
  var errors = (0, _coerceValue.coerceValue)(value, type).errors;
  return errors ? errors.map(function (error) {
    return error.message;
  }) : [];
}


<|start_filename|>node_modules/physical-cpu-count/index.js<|end_filename|>
'use strict'

const os = require('os')
const childProcess = require('child_process')

function exec (command) {
  const output = childProcess.execSync(command, {encoding: 'utf8'})
  return output
}

let amount
const platform = os.platform()

if (platform === 'linux') {
  const output = exec('lscpu -p | egrep -v "^#" | sort -u -t, -k 2,4 | wc -l')
  amount = parseInt(output.trim(), 10)
} else if (platform === 'darwin') {
  const output = exec('sysctl -n hw.physicalcpu_max')
  amount = parseInt(output.trim(), 10)
} else if (platform === 'windows') {
  const output = exec('WMIC CPU Get NumberOfCores')
  amount = output.split(os.EOL)
    .map(function parse (line) { return parseInt(line) })
    .filter(function numbers (value) { return !isNaN(value) })
    .reduce(function add (sum, number) { return sum + number }, 0)
} else {
  const cores = os.cpus().filter(function (cpu, index) {
    const hasHyperthreading = cpu.model.includes('Intel')
    const isOdd = index % 2 === 1
    return !hasHyperthreading || isOdd
  })
  amount = cores.length
}

module.exports = amount


<|start_filename|>node_modules/graphql/polyfills/flatMap.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
// Workaround to make older Flow versions happy
var flatMapMethod = Array.prototype.flatMap;
/* eslint-disable no-redeclare */
// $FlowFixMe

var flatMap = flatMapMethod ? function (list, fn) {
  return flatMapMethod.call(list, fn);
} : function (list, fn) {
  var result = [];

  for (var _i2 = 0; _i2 < list.length; _i2++) {
    var _item = list[_i2];
    var value = fn(_item);

    if (Array.isArray(value)) {
      result = result.concat(value);
    } else {
      result.push(value);
    }
  }

  return result;
};
var _default = flatMap;
exports.default = _default;


<|start_filename|>node_modules/better-queue/lib/worker.js<|end_filename|>

var util = require('util');
var EE   = require('events').EventEmitter;
var ETA  = require('node-eta');

function Worker(opts) {
  this.fn = opts.fn;
  this.batch = opts.batch;
  this.single = opts.single;
  this.active = false;
  this.cancelled = false;
  this.failTaskOnProcessException = opts.failTaskOnProcessException;
}

util.inherits(Worker, EE);

Worker.prototype.setup = function () {
  var self = this;

  // Internal
  self._taskIds = Object.keys(self.batch);
  self._process = {};
  self._waiting = {};
  self._eta = new ETA();

  // Task counts
  self.counts = {
    finished: 0,
    failed: 0,
    completed: 0,
    total: self._taskIds.length,
  };

  // Progress
  self.status = 'ready';
  self.progress = {
    tasks: {},
    complete: 0,
    total: self._taskIds.length,
    eta: '',
  };

  // Setup
  self._taskIds.forEach(function (taskId, id) {
    self._waiting[id] = true;
    self.progress.tasks[id] = {
      pct: 0,
      complete: 0,
      total: 1,
    }
  })
}

Worker.prototype.start = function () {
  var self = this;
  if (self.active) return;

  self.setup();
  self._eta.count = self.progress.total;
  self._eta.start();

  self.active = true;
  self.status = 'in-progress';
  var tasks = self._taskIds.map(function (taskId) { return self.batch[taskId] });
  if (self.single) {
    tasks = tasks[0]
  }
  try {
    self._process = self.fn.call(self, tasks, function (err, result) {
      if (!self.active) return;
      if (err) {
        self.failedBatch(err);
      } else {
        self.finishBatch(result);
      }
    })
  } catch (err) {
    if (self.failTaskOnProcessException) {
      self.failedBatch(err);
    } else {
      throw new Error(err);
    }
  }
  self._process = self._process || {};
}

Worker.prototype.end = function () {
  if (!this.active) return;
  this.status = 'finished';
  this.active = false;
  this.emit('end');
}

Worker.prototype.resume = function () {
  if (typeof this._process.resume === 'function') {
    this._process.resume();
  }
  this.status = 'in-progress';
}

Worker.prototype.pause = function () {
  if (typeof this._process.pause === 'function') {
    this._process.pause();
  }
  this.status = 'paused';
}

Worker.prototype.cancel = function () {
  this.cancelled = true;
  if (typeof this._process.cancel === 'function') {
    this._process.cancel();
  }
  if (typeof this._process.abort === 'function') {
    this._process.abort();
  }
  this.failedBatch('cancelled');
}

Worker.prototype.failedBatch = function (msg) {
  var self = this;
  if (!self.active) return;
  Object.keys(self._waiting).forEach(function (id) {
    if (!self._waiting[id]) return;
    self.failedTask(id, msg);
  })
  self.emit('failed', msg);
  self.end();
}

Worker.prototype.failedTask = function (id, msg) {
  var self = this;
  if (!self.active) return;
  if (self._waiting[id]) {
    self._waiting[id] = false;
    self.counts.failed++;
    self.counts.completed++;
    self.emit('task_failed', id, msg);
  }
}

Worker.prototype.finishBatch = function (result) {
  var self = this;
  if (!self.active) return;
  Object.keys(self._waiting).forEach(function (id) {
    if (!self._waiting[id]) return;
    self.finishTask(id, result);
  })
  self.emit('finish', result);
  self.end();
}

Worker.prototype.finishTask = function (id, result) {
  var self = this;
  if (!self.active) return;
  if (self._waiting[id]) {
    self._waiting[id] = false;
    self.counts.finished++;
    self.counts.completed++;
    self.emit('task_finish', id, result);
  }
}

Worker.prototype.progressBatch = function (complete, total, msg) {
  var self = this;
  if (!self.active) return;
  Object.keys(self._waiting).forEach(function (id) {
    if (!self._waiting[id]) return;
    self.progressTask(id, complete, total, msg);
  })
  self.progress.complete = 0;
  self._taskIds.forEach(function (taskId, id) {
    self.progress.complete += self.progress.tasks[id].pct;
  })
  self._eta.done = self.progress.complete;
  self.progress.eta = self._eta.format('{{etah}}')
  self.progress.message = msg || '';
  self.emit('progress', self.progress);
}

Worker.prototype.progressTask = function (id, complete, total, msg) {
  var self = this;
  if (!self.active) return;
  if (self._waiting[id]) {
    self.progress.tasks[id].complete = complete;
    self.progress.tasks[id].total = self.progress.tasks[id].total || total;
    self.progress.tasks[id].message = self.progress.tasks[id].message || msg;
    self.progress.tasks[id].pct = Math.max(0, Math.min(1, complete/total));
    self.emit('task_progress', id, self.progress.tasks[id]);
  }
}

module.exports = Worker;


<|start_filename|>node_modules/sharp/vendor/include/orc/orcrule.h<|end_filename|>

#ifndef _ORC_RULE_H_
#define _ORC_RULE_H_

#include <orc/orcutils.h>
#include <orc/orclimits.h>
#include <orc/orcopcode.h>

ORC_BEGIN_DECLS

typedef struct _OrcRule OrcRule;
typedef struct _OrcRuleSet OrcRuleSet;


typedef void (*OrcRuleEmitFunc)(OrcCompiler *p, void *user, OrcInstruction *insn);

/**
 * OrcRule:
 *
 * The OrcRule structure has no public members
 */
struct _OrcRule {
  /*< private >*/
  OrcRuleEmitFunc emit;
  void *emit_user;
};

/**
 * OrcRuleSet:
 *
 * The OrcRuleSet structure has no public members
 */
struct _OrcRuleSet {
  /*< private >*/
  int opcode_major;
  int required_target_flags;

  OrcRule *rules;
  int n_rules;
};

OrcRuleSet * orc_rule_set_new (OrcOpcodeSet *opcode_set, OrcTarget *target,
    unsigned int required_flags);
void orc_rule_register (OrcRuleSet *rule_set, const char *opcode_name,
    OrcRuleEmitFunc emit, void *emit_user);


ORC_END_DECLS

#endif



<|start_filename|>node_modules/probe-image-size/lib/parse_sync/bmp.js<|end_filename|>
'use strict';

/* eslint-disable consistent-return */

var str2arr      = require('../common').str2arr;
var sliceEq      = require('../common').sliceEq;
var readUInt16LE = require('../common').readUInt16LE;

var SIG_BM = str2arr('BM');


module.exports = function (data) {
  if (data.length < 26) return;

  if (!sliceEq(data, 0, SIG_BM)) return;

  return {
    width:  readUInt16LE(data, 18),
    height: readUInt16LE(data, 22),
    type: 'bmp',
    mime: 'image/bmp',
    wUnits: 'px',
    hUnits: 'px'
  };
};


<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-attr-sel.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */

/*
 * This file is part of The Croco Library
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 *
 * Author: <NAME>
 * See COPYRIGHTS file for copyright information.
 */

#ifndef __CR_ATTR_SEL_H__
#define __CR_ATTR_SEL_H__

#include <stdio.h>
#include <glib.h>
#include "cr-utils.h"
#include "cr-parsing-location.h"
#include "cr-string.h"

G_BEGIN_DECLS


struct _CRAttrSel ;
typedef struct _CRAttrSel CRAttrSel ;

enum AttrMatchWay
{
        NO_MATCH = 0,
        SET,
        EQUALS,
        INCLUDES,
        DASHMATCH
} ;

struct _CRAttrSel
{
        CRString             *name ;
        CRString             *value ;
        enum AttrMatchWay  match_way ;
        CRAttrSel          *next ;
        CRAttrSel          *prev ;
        CRParsingLocation location ;
} ;

CRAttrSel * cr_attr_sel_new (void) ;

enum CRStatus cr_attr_sel_append_attr_sel (CRAttrSel * a_this, 
                                           CRAttrSel *a_attr_sel) ;

enum CRStatus cr_attr_sel_prepend_attr_sel (CRAttrSel *a_this, 
                                            CRAttrSel *a_attr_sel) ;
        
guchar * cr_attr_sel_to_string (CRAttrSel const *a_this) ;

void cr_attr_sel_dump (CRAttrSel const *a_this, FILE *a_fp) ;

void cr_attr_sel_destroy (CRAttrSel *a_this) ;

G_END_DECLS

#endif /*__CR_ATTR_SEL_H__*/


<|start_filename|>node_modules/sharp/vendor/include/pango/pango-types.h<|end_filename|>
/* Pango
 * pango-types.h:
 *
 * Copyright (C) 1999 Red Hat Software
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __PANGO_TYPES_H__
#define __PANGO_TYPES_H__

#include <glib.h>
#include <glib-object.h>

#include <pango/pango-version-macros.h>

G_BEGIN_DECLS

typedef struct _PangoLogAttr PangoLogAttr;

typedef struct _PangoEngineLang PangoEngineLang;
typedef struct _PangoEngineShape PangoEngineShape;

typedef struct _PangoFont    PangoFont;
typedef struct _PangoFontMap PangoFontMap;

typedef struct _PangoRectangle PangoRectangle;



/* A index of a glyph into a font. Rendering system dependent */
/**
 * PangoGlyph:
 *
 * A #PangoGlyph represents a single glyph in the output form of a string.
 */
typedef guint32 PangoGlyph;



/**
 * PANGO_SCALE:
 *
 * The %PANGO_SCALE macro represents the scale between dimensions used
 * for Pango distances and device units. (The definition of device
 * units is dependent on the output device; it will typically be pixels
 * for a screen, and points for a printer.) %PANGO_SCALE is currently
 * 1024, but this may be changed in the future.
 *
 * When setting font sizes, device units are always considered to be
 * points (as in "12 point font"), rather than pixels.
 */
/**
 * PANGO_PIXELS:
 * @d: a dimension in Pango units.
 *
 * Converts a dimension to device units by rounding.
 *
 * Return value: rounded dimension in device units.
 */
/**
 * PANGO_PIXELS_FLOOR:
 * @d: a dimension in Pango units.
 *
 * Converts a dimension to device units by flooring.
 *
 * Return value: floored dimension in device units.
 * Since: 1.14
 */
/**
 * PANGO_PIXELS_CEIL:
 * @d: a dimension in Pango units.
 *
 * Converts a dimension to device units by ceiling.
 *
 * Return value: ceiled dimension in device units.
 * Since: 1.14
 */
#define PANGO_SCALE 1024
#define PANGO_PIXELS(d) (((int)(d) + 512) >> 10)
#define PANGO_PIXELS_FLOOR(d) (((int)(d)) >> 10)
#define PANGO_PIXELS_CEIL(d) (((int)(d) + 1023) >> 10)
/* The above expressions are just slightly wrong for floating point d;
 * For example we'd expect PANGO_PIXELS(-512.5) => -1 but instead we get 0.
 * That's unlikely to matter for practical use and the expression is much
 * more compact and faster than alternatives that work exactly for both
 * integers and floating point.
 *
 * PANGO_PIXELS also behaves differently for +512 and -512.
 */

/**
 * PANGO_UNITS_ROUND:
 * @d: a dimension in Pango units.
 *
 * Rounds a dimension to whole device units, but does not
 * convert it to device units.
 *
 * Return value: rounded dimension in Pango units.
 * Since: 1.18
 */
#define PANGO_UNITS_ROUND(d)				\
  (((d) + (PANGO_SCALE >> 1)) & ~(PANGO_SCALE - 1))


PANGO_AVAILABLE_IN_1_16
int    pango_units_from_double (double d) G_GNUC_CONST;
PANGO_AVAILABLE_IN_1_16
double pango_units_to_double (int i) G_GNUC_CONST;



/**
 * PangoRectangle:
 * @x: X coordinate of the left side of the rectangle.
 * @y: Y coordinate of the the top side of the rectangle.
 * @width: width of the rectangle.
 * @height: height of the rectangle.
 *
 * The #PangoRectangle structure represents a rectangle. It is frequently
 * used to represent the logical or ink extents of a single glyph or section
 * of text. (See, for instance, pango_font_get_glyph_extents())
 *
 */
struct _PangoRectangle
{
  int x;
  int y;
  int width;
  int height;
};

/* Macros to translate from extents rectangles to ascent/descent/lbearing/rbearing
 */
/**
 * PANGO_ASCENT:
 * @rect: a #PangoRectangle
 *
 * Extracts the <firstterm>ascent</firstterm> from a #PangoRectangle
 * representing glyph extents. The ascent is the distance from the
 * baseline to the highest point of the character. This is positive if the
 * glyph ascends above the baseline.
 */
/**
 * PANGO_DESCENT:
 * @rect: a #PangoRectangle
 *
 * Extracts the <firstterm>descent</firstterm> from a #PangoRectangle
 * representing glyph extents. The descent is the distance from the
 * baseline to the lowest point of the character. This is positive if the
 * glyph descends below the baseline.
 */
/**
 * PANGO_LBEARING:
 * @rect: a #PangoRectangle
 *
 * Extracts the <firstterm>left bearing</firstterm> from a #PangoRectangle
 * representing glyph extents. The left bearing is the distance from the
 * horizontal origin to the farthest left point of the character.
 * This is positive for characters drawn completely to the right of the
 * glyph origin.
 */
/**
 * PANGO_RBEARING:
 * @rect: a #PangoRectangle
 *
 * Extracts the <firstterm>right bearing</firstterm> from a #PangoRectangle
 * representing glyph extents. The right bearing is the distance from the
 * horizontal origin to the farthest right point of the character.
 * This is positive except for characters drawn completely to the left of the
 * horizontal origin.
 */
#define PANGO_ASCENT(rect) (-(rect).y)
#define PANGO_DESCENT(rect) ((rect).y + (rect).height)
#define PANGO_LBEARING(rect) ((rect).x)
#define PANGO_RBEARING(rect) ((rect).x + (rect).width)

PANGO_AVAILABLE_IN_1_16
void pango_extents_to_pixels (PangoRectangle *inclusive,
			      PangoRectangle *nearest);


#include <pango/pango-gravity.h>
#include <pango/pango-language.h>
#include <pango/pango-matrix.h>
#include <pango/pango-script.h>
#include <pango/pango-bidi-type.h>


G_END_DECLS

#endif /* __PANGO_TYPES_H__ */


<|start_filename|>node_modules/opentracing/lib/tracer.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Functions = require("./functions");
var Noop = require("./noop");
var span_1 = require("./span");
/**
 * Tracer is the entry-point between the instrumentation API and the tracing
 * implementation.
 *
 * The default object acts as a no-op implementation.
 *
 * Note to implementators: derived classes can choose to directly implement the
 * methods in the "OpenTracing API methods" section, or optionally the subset of
 * underscore-prefixed methods to pick up the argument checking and handling
 * automatically from the base class.
 */
var Tracer = /** @class */ (function () {
    function Tracer() {
    }
    // ---------------------------------------------------------------------- //
    // OpenTracing API methods
    // ---------------------------------------------------------------------- //
    /**
     * Starts and returns a new Span representing a logical unit of work.
     *
     * For example:
     *
     *     // Start a new (parentless) root Span:
     *     var parent = Tracer.startSpan('DoWork');
     *
     *     // Start a new (child) Span:
     *     var child = Tracer.startSpan('load-from-db', {
     *         childOf: parent.context(),
     *     });
     *
     *     // Start a new async (FollowsFrom) Span:
     *     var child = Tracer.startSpan('async-cache-write', {
     *         references: [
     *             opentracing.followsFrom(parent.context())
     *         ],
     *     });
     *
     * @param {string} name - the name of the operation (REQUIRED).
     * @param {SpanOptions} [options] - options for the newly created span.
     * @return {Span} - a new Span object.
     */
    Tracer.prototype.startSpan = function (name, options) {
        if (options === void 0) { options = {}; }
        // Convert options.childOf to fields.references as needed.
        if (options.childOf) {
            // Convert from a Span or a SpanContext into a Reference.
            var childOf = Functions.childOf(options.childOf);
            if (options.references) {
                options.references.push(childOf);
            }
            else {
                options.references = [childOf];
            }
            delete (options.childOf);
        }
        return this._startSpan(name, options);
    };
    /**
     * Injects the given SpanContext instance for cross-process propagation
     * within `carrier`. The expected type of `carrier` depends on the value of
     * `format.
     *
     * OpenTracing defines a common set of `format` values (see
     * FORMAT_TEXT_MAP, FORMAT_HTTP_HEADERS, and FORMAT_BINARY), and each has
     * an expected carrier type.
     *
     * Consider this pseudocode example:
     *
     *     var clientSpan = ...;
     *     ...
     *     // Inject clientSpan into a text carrier.
     *     var headersCarrier = {};
     *     Tracer.inject(clientSpan.context(), Tracer.FORMAT_HTTP_HEADERS, headersCarrier);
     *     // Incorporate the textCarrier into the outbound HTTP request header
     *     // map.
     *     Object.assign(outboundHTTPReq.headers, headersCarrier);
     *     // ... send the httpReq
     *
     * @param  {SpanContext} spanContext - the SpanContext to inject into the
     *         carrier object. As a convenience, a Span instance may be passed
     *         in instead (in which case its .context() is used for the
     *         inject()).
     * @param  {string} format - the format of the carrier.
     * @param  {any} carrier - see the documentation for the chosen `format`
     *         for a description of the carrier object.
     */
    Tracer.prototype.inject = function (spanContext, format, carrier) {
        // Allow the user to pass a Span instead of a SpanContext
        if (spanContext instanceof span_1.default) {
            spanContext = spanContext.context();
        }
        return this._inject(spanContext, format, carrier);
    };
    /**
     * Returns a SpanContext instance extracted from `carrier` in the given
     * `format`.
     *
     * OpenTracing defines a common set of `format` values (see
     * FORMAT_TEXT_MAP, FORMAT_HTTP_HEADERS, and FORMAT_BINARY), and each has
     * an expected carrier type.
     *
     * Consider this pseudocode example:
     *
     *     // Use the inbound HTTP request's headers as a text map carrier.
     *     var headersCarrier = inboundHTTPReq.headers;
     *     var wireCtx = Tracer.extract(Tracer.FORMAT_HTTP_HEADERS, headersCarrier);
     *     var serverSpan = Tracer.startSpan('...', { childOf : wireCtx });
     *
     * @param  {string} format - the format of the carrier.
     * @param  {any} carrier - the type of the carrier object is determined by
     *         the format.
     * @return {SpanContext}
     *         The extracted SpanContext, or null if no such SpanContext could
     *         be found in `carrier`
     */
    Tracer.prototype.extract = function (format, carrier) {
        return this._extract(format, carrier);
    };
    // ---------------------------------------------------------------------- //
    // Derived classes can choose to implement the below
    // ---------------------------------------------------------------------- //
    // NOTE: the input to this method is *always* an associative array. The
    // public-facing startSpan() method normalizes the arguments so that
    // all N implementations do not need to worry about variations in the call
    // signature.
    //
    // The default behavior returns a no-op span.
    Tracer.prototype._startSpan = function (name, fields) {
        return Noop.span;
    };
    // The default behavior is a no-op.
    Tracer.prototype._inject = function (spanContext, format, carrier) {
    };
    // The default behavior is to return a no-op SpanContext.
    Tracer.prototype._extract = function (format, carrier) {
        return Noop.spanContext;
    };
    return Tracer;
}());
exports.Tracer = Tracer;
exports.default = Tracer;
//# sourceMappingURL=tracer.js.map

<|start_filename|>node_modules/graphql/jsutils/Path.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.addPath = addPath;
exports.pathToArray = pathToArray;

/**
 * Given a Path and a key, return a new Path containing the new key.
 */
function addPath(prev, key) {
  return {
    prev: prev,
    key: key
  };
}
/**
 * Given a Path, return an Array of the path keys.
 */


function pathToArray(path) {
  var flattened = [];
  var curr = path;

  while (curr) {
    flattened.push(curr.key);
    curr = curr.prev;
  }

  return flattened.reverse();
}


<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-utils.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */

/*
 * This file is part of The Croco Library
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 *
 * Author: <NAME>
 * Look at file COPYRIGHTS for copyright information
 */

#ifndef __CR_DEFS_H__
#define __CR_DEFS_H__

#include <stdio.h>
#include <glib.h>
#include "libcroco-config.h"

G_BEGIN_DECLS

/**
 *@file
 *The Croco library basic types definitions
 *And global definitions.
 */

/**
 *The status type returned
 *by the methods of the croco library.
 */
enum CRStatus {
        CR_OK,
        CR_BAD_PARAM_ERROR,
        CR_INSTANCIATION_FAILED_ERROR,
        CR_UNKNOWN_TYPE_ERROR,
        CR_UNKNOWN_PROP_ERROR,
        CR_UNKNOWN_PROP_VAL_ERROR,
        CR_UNEXPECTED_POSITION_SCHEME,
        CR_START_OF_INPUT_ERROR,
        CR_END_OF_INPUT_ERROR,
        CR_OUTPUT_TOO_SHORT_ERROR,
        CR_INPUT_TOO_SHORT_ERROR,
        CR_OUT_OF_BOUNDS_ERROR,
        CR_EMPTY_PARSER_INPUT_ERROR,
        CR_ENCODING_ERROR,
        CR_ENCODING_NOT_FOUND_ERROR,
        CR_PARSING_ERROR,
        CR_SYNTAX_ERROR,
        CR_NO_ROOT_NODE_ERROR,
        CR_NO_TOKEN,
        CR_OUT_OF_MEMORY_ERROR,
        CR_PSEUDO_CLASS_SEL_HANDLER_NOT_FOUND_ERROR,
        CR_BAD_PSEUDO_CLASS_SEL_HANDLER_ERROR,
        CR_ERROR,
        CR_FILE_NOT_FOUND_ERROR,
        CR_VALUE_NOT_FOUND_ERROR
} ;

/**
 *Values used by
 *cr_input_seek_position() ;
 */
enum CRSeekPos {
        CR_SEEK_CUR,
        CR_SEEK_BEGIN,
        CR_SEEK_END
} ;

/**
 *Encoding values.
 */
enum CREncoding 
{
        CR_UCS_4 = 1/*Must be not NULL*/,
        CR_UCS_1,
        CR_ISO_8859_1,
        CR_ASCII,
        CR_UTF_8,
        CR_UTF_16,
        CR_AUTO/*should be the last one*/
} ;




#define CROCO_LOG_DOMAIN "LIBCROCO"

#ifdef __GNUC__
#define cr_utils_trace(a_log_level, a_msg) \
g_log (CROCO_LOG_DOMAIN, \
       G_LOG_LEVEL_CRITICAL, \
       "file %s: line %d (%s): %s\n", \
       __FILE__, \
       __LINE__, \
       __PRETTY_FUNCTION__, \
	a_msg)
#else /*__GNUC__*/

#define cr_utils_trace(a_log_level, a_msg) \
g_log (CROCO_LOG_DOMAIN, \
       G_LOG_LEVEL_CRITICAL, \
       "file %s: line %d: %s\n", \
       __FILE__, \
       __LINE__, \
       a_msg)
#endif

/**
 *Traces an info message.
 *The file, line and enclosing function
 *of the message will be automatically 
 *added to the message.
 *@param a_msg the msg to trace.
 */
#define cr_utils_trace_info(a_msg) \
cr_utils_trace (G_LOG_LEVEL_INFO, a_msg)

/**
 *Trace a debug message.
 *The file, line and enclosing function
 *of the message will be automatically
 *added to the message.
 *@param a_msg the msg to trace.
 */
#define cr_utils_trace_debug(a_msg) \
cr_utils_trace (G_LOG_LEVEL_DEBUG, a_msg) ;


/****************************
 *Encoding transformations and
 *encoding helpers
 ****************************/

enum CRStatus
cr_utils_read_char_from_utf8_buf (const guchar * a_in, gulong a_in_len,
                                  guint32 *a_out, gulong *a_consumed) ;

enum CRStatus
cr_utils_ucs1_to_utf8 (const guchar *a_in, gulong *a_in_len,
                       guchar *a_out, gulong *a_out_len) ;

enum CRStatus
cr_utils_utf8_to_ucs1 (const guchar * a_in, gulong * a_in_len,
                       guchar *a_out, gulong *a_out_len) ;

enum CRStatus
cr_utils_ucs4_to_utf8 (const guint32 *a_in, gulong *a_in_len,
                       guchar *a_out, gulong *a_out_len) ;

enum CRStatus
cr_utils_utf8_str_len_as_ucs4 (const guchar *a_in_start,
                               const guchar *a_in_end,
                               gulong *a_len) ;
enum CRStatus
cr_utils_ucs1_str_len_as_utf8 (const guchar *a_in_start, 
                               const guchar *a_in_end,
                               gulong *a_len) ;
enum CRStatus
cr_utils_utf8_str_len_as_ucs1 (const guchar *a_in_start,
                               const guchar *a_in_end,
                               gulong *a_len) ;
enum CRStatus
cr_utils_ucs4_str_len_as_utf8 (const guint32 *a_in_start, 
                               const guint32 *a_in_end,
                               gulong *a_len) ;

enum CRStatus
cr_utils_ucs1_str_to_utf8 (const guchar *a_in_start, 
                           gulong *a_in_len,
                           guchar **a_out, 
                           gulong *a_len) ;

enum CRStatus
cr_utils_utf8_str_to_ucs1 (const guchar * a_in_start, 
                           gulong * a_in_len,
                           guchar **a_out, 
                           gulong *a_out_len) ;

enum CRStatus
cr_utils_utf8_to_ucs4 (const guchar * a_in, 
                       gulong * a_in_len,
                       guint32 *a_out, gulong *a_out_len) ;

enum CRStatus
cr_utils_ucs4_str_to_utf8 (const guint32 *a_in, 
                           gulong *a_in_len,
                           guchar **a_out, gulong *a_out_len) ;

enum CRStatus
cr_utils_utf8_str_to_ucs4 (const guchar * a_in, 
                           gulong *a_in_len,
                           guint32 **a_out, 
                           gulong *a_out_len) ;


/*****************************************
 *CSS basic types identification utilities
 *****************************************/

gboolean
cr_utils_is_newline (guint32 a_char) ;

gboolean
cr_utils_is_white_space (guint32 a_char) ;

gboolean
cr_utils_is_nonascii (guint32 a_char) ;

gboolean
cr_utils_is_hexa_char (guint32 a_char) ;


/**********************************
 *Miscellaneous utility functions
 ***********************************/

void
cr_utils_dump_n_chars (guchar a_char, 
                       FILE *a_fp, 
                       glong a_nb) ;

void
cr_utils_dump_n_chars2 (guchar a_char, 
                        GString *a_string,
                        glong a_nb) ;
GList *
cr_utils_dup_glist_of_string (GList const *a_list) ;

GList *
cr_utils_dup_glist_of_cr_string (GList const * a_list_of_strings) ;

G_END_DECLS

#endif /*__CR_DEFS_H__*/


<|start_filename|>node_modules/noms/index.js<|end_filename|>
'use strict';

var Readable = require('readable-stream').Readable;
var inherits = require('inherits');
inherits(Noms, Readable);
function Noms (options) {
  Readable.call(this,options);
  this.inProgress = false;
  this.lastPush = void 0;
  this.started = false;
  this.errored = false;
}
Noms.prototype.push = function(chunk, encoding) {
      this.lastPush = Readable.prototype.push.call(this, chunk, encoding);
      return this.lastPush;
  };
Noms.prototype.nom = function (callback) {
  callback(null, null);
};
Noms.prototype._read = function (size) {
  if (this.inProgress || this.errored) {
    return;
  }
  if (this.started === false) {
    this.inProgress = true;
    this.callStart(size);
    return;
  }
  this.inProgress = true;
  this.callRead(size);
};
Noms.prototype._before = function (next) {
  next();
};
Noms.prototype.callRead = function (size) {
  var useSize = this.nom.length > 1;
  // so if nothing is pushed, we'll go agian
  this.lastPush = true;
  var self = this;
  function cb(err, chunk) {
    if (err) {
      self.errored = true;
      self.inProgress = false;
      self.emit('error', err);
      return;
    }
    if (chunk !== undefined) {
      self.push(chunk);
    }
    if (self.lastPush) {
      return self.callRead(size);
    } else {
      self.inProgress = false;
    }
  }
  if (useSize) {
    this.nom(size, cb);
  } else {
     this.nom(cb);
  }
};
Noms.prototype.callStart = function (size) {
  var self = this;
  function cb(err, chunk) {
    self.started = true;
    if (err) {
      self.errored = true;
      self.inProgress = false;
      self.emit('error', err);
      return;
    }
    if (chunk !== undefined) {
      self.push(chunk);
    }
    self.callRead(size);
  }
  this._before(cb);
};
function ctor(read, before) {
  inherits(YourStream, Noms);
  function YourStream (opts) {
    Noms.call(this, opts);
  }
  YourStream.prototype.nom = read;
  if (typeof before === 'function') {
    YourStream.prototype._before = before;
  }
  return YourStream;
}
module.exports = exports = function(options, read, before) {
  if (typeof options === 'function') {
    before = read;
    read = options;
    options = {};
  }
  return new (ctor(read, before))(options);
};
exports.ctor = ctor;
exports.obj = function(options, read, before) {
  var out = {};
  if (typeof options === 'function') {
    before = read;
    read = options;
    options = undefined;
  }
  options = options || {};
  Object.keys(options).forEach(function (key) {
    out[key] = options[key];
  });
  out.objectMode = true;
  return new (ctor(read, before))(out);
};

<|start_filename|>node_modules/loud-rejection/index.js<|end_filename|>
'use strict';
const util = require('util');
const onExit = require('signal-exit');
const currentlyUnhandled = require('currently-unhandled');

let installed = false;

const loudRejection = (log = console.error) => {
	if (installed) {
		return;
	}

	installed = true;

	const listUnhandled = currentlyUnhandled();

	onExit(() => {
		const unhandledRejections = listUnhandled();

		if (unhandledRejections.length > 0) {
			for (const unhandledRejection of unhandledRejections) {
				let error = unhandledRejection.reason;

				if (!(error instanceof Error)) {
					error = new Error(`Promise rejected with value: ${util.inspect(error)}`);
				}

				log(error.stack);
			}

			process.exitCode = 1;
		}
	});
};

module.exports = loudRejection;
// TODO: remove this in the next major version
module.exports.default = loudRejection;


<|start_filename|>node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js<|end_filename|>
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
const ts = __importStar(require("typescript"));
const tsutils = __importStar(require("tsutils"));
const util = __importStar(require("../util"));
exports.default = util.createRule({
    name: 'no-unnecessary-qualifier',
    meta: {
        docs: {
            category: 'Best Practices',
            description: 'Warns when a namespace qualifier is unnecessary',
            recommended: false,
            requiresTypeChecking: true,
        },
        fixable: 'code',
        messages: {
            unnecessaryQualifier: "Qualifier is unnecessary since '{{ name }}' is in scope.",
        },
        schema: [],
        type: 'suggestion',
    },
    defaultOptions: [],
    create(context) {
        const namespacesInScope = [];
        let currentFailedNamespaceExpression = null;
        const parserServices = util.getParserServices(context);
        const esTreeNodeToTSNodeMap = parserServices.esTreeNodeToTSNodeMap;
        const program = parserServices.program;
        const checker = program.getTypeChecker();
        const sourceCode = context.getSourceCode();
        function tryGetAliasedSymbol(symbol, checker) {
            return tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)
                ? checker.getAliasedSymbol(symbol)
                : null;
        }
        function symbolIsNamespaceInScope(symbol) {
            var _a;
            const symbolDeclarations = (_a = symbol.getDeclarations(), (_a !== null && _a !== void 0 ? _a : []));
            if (symbolDeclarations.some(decl => namespacesInScope.some(ns => ns === decl))) {
                return true;
            }
            const alias = tryGetAliasedSymbol(symbol, checker);
            return alias !== null && symbolIsNamespaceInScope(alias);
        }
        function getSymbolInScope(node, flags, name) {
            // TODO:PERF `getSymbolsInScope` gets a long list. Is there a better way?
            const scope = checker.getSymbolsInScope(node, flags);
            return scope.find(scopeSymbol => scopeSymbol.name === name);
        }
        function symbolsAreEqual(accessed, inScope) {
            return accessed === checker.getExportSymbolOfSymbol(inScope);
        }
        function qualifierIsUnnecessary(qualifier, name) {
            const tsQualifier = esTreeNodeToTSNodeMap.get(qualifier);
            const tsName = esTreeNodeToTSNodeMap.get(name);
            const namespaceSymbol = checker.getSymbolAtLocation(tsQualifier);
            if (typeof namespaceSymbol === 'undefined' ||
                !symbolIsNamespaceInScope(namespaceSymbol)) {
                return false;
            }
            const accessedSymbol = checker.getSymbolAtLocation(tsName);
            if (typeof accessedSymbol === 'undefined') {
                return false;
            }
            // If the symbol in scope is different, the qualifier is necessary.
            const fromScope = getSymbolInScope(tsQualifier, accessedSymbol.flags, sourceCode.getText(name));
            return (typeof fromScope === 'undefined' ||
                symbolsAreEqual(accessedSymbol, fromScope));
        }
        function visitNamespaceAccess(node, qualifier, name) {
            // Only look for nested qualifier errors if we didn't already fail on the outer qualifier.
            if (!currentFailedNamespaceExpression &&
                qualifierIsUnnecessary(qualifier, name)) {
                currentFailedNamespaceExpression = node;
                context.report({
                    node: qualifier,
                    messageId: 'unnecessaryQualifier',
                    data: {
                        name: sourceCode.getText(name),
                    },
                    fix(fixer) {
                        return fixer.removeRange([qualifier.range[0], name.range[0]]);
                    },
                });
            }
        }
        function enterDeclaration(node) {
            namespacesInScope.push(esTreeNodeToTSNodeMap.get(node));
        }
        function exitDeclaration() {
            namespacesInScope.pop();
        }
        function resetCurrentNamespaceExpression(node) {
            if (node === currentFailedNamespaceExpression) {
                currentFailedNamespaceExpression = null;
            }
        }
        function isPropertyAccessExpression(node) {
            return node.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression && !node.computed;
        }
        function isEntityNameExpression(node) {
            return (node.type === experimental_utils_1.AST_NODE_TYPES.Identifier ||
                (isPropertyAccessExpression(node) &&
                    isEntityNameExpression(node.object)));
        }
        return {
            TSModuleDeclaration: enterDeclaration,
            TSEnumDeclaration: enterDeclaration,
            'ExportNamedDeclaration[declaration.type="TSModuleDeclaration"]': enterDeclaration,
            'ExportNamedDeclaration[declaration.type="TSEnumDeclaration"]': enterDeclaration,
            'TSModuleDeclaration:exit': exitDeclaration,
            'TSEnumDeclaration:exit': exitDeclaration,
            'ExportNamedDeclaration[declaration.type="TSModuleDeclaration"]:exit': exitDeclaration,
            'ExportNamedDeclaration[declaration.type="TSEnumDeclaration"]:exit': exitDeclaration,
            TSQualifiedName(node) {
                visitNamespaceAccess(node, node.left, node.right);
            },
            'MemberExpression[computed=false]': function (node) {
                const property = node.property;
                if (isEntityNameExpression(node.object)) {
                    visitNamespaceAccess(node, node.object, property);
                }
            },
            'TSQualifiedName:exit': resetCurrentNamespaceExpression,
            'MemberExpression:exit': resetCurrentNamespaceExpression,
        };
    },
});
//# sourceMappingURL=no-unnecessary-qualifier.js.map

<|start_filename|>node_modules/sharp/vendor/include/orc-test/orcrandom.h<|end_filename|>

#ifndef _ORC_RANDOM_H_
#define _ORC_RANDOM_H_

#include <orc/orcutils.h>

ORC_BEGIN_DECLS

typedef struct _OrcRandomContext OrcRandomContext;
struct _OrcRandomContext {
  unsigned int x;
};

void orc_random_init (OrcRandomContext *context, int seed);
void orc_random_bits (OrcRandomContext *context, void *data, int n_bytes);
void orc_random_floats (OrcRandomContext *context, float *data, int n);
unsigned int orc_random (OrcRandomContext *context);

ORC_END_DECLS

#endif



<|start_filename|>node_modules/opentracing/lib/reference.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var span_1 = require("./span");
/**
 * Reference pairs a reference type constant (e.g., REFERENCE_CHILD_OF or
 * REFERENCE_FOLLOWS_FROM) with the SpanContext it points to.
 *
 * See the exported childOf() and followsFrom() functions at the package level.
 */
var Reference = /** @class */ (function () {
    /**
     * Initialize a new Reference instance.
     *
     * @param {string} type - the Reference type constant (e.g.,
     *        REFERENCE_CHILD_OF or REFERENCE_FOLLOWS_FROM).
     * @param {SpanContext} referencedContext - the SpanContext being referred
     *        to. As a convenience, a Span instance may be passed in instead
     *        (in which case its .context() is used here).
     */
    function Reference(type, referencedContext) {
        this._type = type;
        this._referencedContext = (referencedContext instanceof span_1.default ?
            referencedContext.context() :
            referencedContext);
    }
    /**
     * @return {string} The Reference type (e.g., REFERENCE_CHILD_OF or
     *         REFERENCE_FOLLOWS_FROM).
     */
    Reference.prototype.type = function () {
        return this._type;
    };
    /**
     * @return {SpanContext} The SpanContext being referred to (e.g., the
     *         parent in a REFERENCE_CHILD_OF Reference).
     */
    Reference.prototype.referencedContext = function () {
        return this._referencedContext;
    };
    return Reference;
}());
exports.default = Reference;
//# sourceMappingURL=reference.js.map

<|start_filename|>node_modules/sharp/vendor/include/libcroco/libcroco.h<|end_filename|>
/*
 * This file is part of The Croco Library
 *
 * Copyright (C) 2002-2003 <NAME> <<EMAIL>>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */

#ifndef __LIBCROCO_H__
#define __LIBCROCO_H__

#include "libcroco-config.h"

#include "cr-utils.h"
#include "cr-pseudo.h"
#include "cr-term.h"
#include "cr-attr-sel.h"
#include "cr-simple-sel.h"
#include "cr-selector.h"
#include "cr-enc-handler.h"
#include "cr-doc-handler.h"
#include "cr-input.h"
#include "cr-parser.h"
#include "cr-statement.h"
#include "cr-stylesheet.h"
#include "cr-om-parser.h"
#include "cr-prop-list.h"
#include "cr-sel-eng.h"
#include "cr-style.h"
#include "cr-string.h"

#endif /*__LIBCROCO_H__*/


<|start_filename|>node_modules/graphql/validation/rules/NoUnusedFragments.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.unusedFragMessage = unusedFragMessage;
exports.NoUnusedFragments = NoUnusedFragments;

var _GraphQLError = require("../../error/GraphQLError");

function unusedFragMessage(fragName) {
  return "Fragment \"".concat(fragName, "\" is never used.");
}
/**
 * No unused fragments
 *
 * A GraphQL document is only valid if all fragment definitions are spread
 * within operations, or spread within other fragments spread within operations.
 */


function NoUnusedFragments(context) {
  var operationDefs = [];
  var fragmentDefs = [];
  return {
    OperationDefinition: function OperationDefinition(node) {
      operationDefs.push(node);
      return false;
    },
    FragmentDefinition: function FragmentDefinition(node) {
      fragmentDefs.push(node);
      return false;
    },
    Document: {
      leave: function leave() {
        var fragmentNameUsed = Object.create(null);

        for (var _i2 = 0; _i2 < operationDefs.length; _i2++) {
          var operation = operationDefs[_i2];

          for (var _i4 = 0, _context$getRecursive2 = context.getRecursivelyReferencedFragments(operation); _i4 < _context$getRecursive2.length; _i4++) {
            var fragment = _context$getRecursive2[_i4];
            fragmentNameUsed[fragment.name.value] = true;
          }
        }

        for (var _i6 = 0; _i6 < fragmentDefs.length; _i6++) {
          var fragmentDef = fragmentDefs[_i6];
          var fragName = fragmentDef.name.value;

          if (fragmentNameUsed[fragName] !== true) {
            context.reportError(new _GraphQLError.GraphQLError(unusedFragMessage(fragName), fragmentDef));
          }
        }
      }
    }
  };
}


<|start_filename|>node_modules/opentracing/lib/span_context.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * SpanContext represents Span state that must propagate to descendant Spans
 * and across process boundaries.
 *
 * SpanContext is logically divided into two pieces: the user-level "Baggage"
 * (see setBaggageItem and getBaggageItem) that propagates across Span
 * boundaries and any Tracer-implementation-specific fields that are needed to
 * identify or otherwise contextualize the associated Span instance (e.g., a
 * <trace_id, span_id, sampled> tuple).
 */
var SpanContext = /** @class */ (function () {
    function SpanContext() {
    }
    // The SpanContext is entirely implementation dependent
    /**
     * Returns a string representation of the implementation internal trace ID.
     *
     * @returns {string}
     */
    SpanContext.prototype.toTraceId = function () {
        return '';
    };
    /**
     * Returns a string representation of the implementation internal span ID.
     *
     * @returns {string}
     */
    SpanContext.prototype.toSpanId = function () {
        return '';
    };
    return SpanContext;
}());
exports.SpanContext = SpanContext;
exports.default = SpanContext;
//# sourceMappingURL=span_context.js.map

<|start_filename|>node_modules/is-npm/index.js<|end_filename|>
'use strict';

const isNpm =
	'npm_config_username' in process.env ||
	'npm_package_name' in process.env ||
	'npm_config_heading' in process.env;

// TODO: This named export should be replaced by a default export as soon as we move to ES modules
exports.isNpm = isNpm;


<|start_filename|>node_modules/graphql-playground-html/dist/index.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var render_playground_page_1 = require("./render-playground-page");
exports.renderPlaygroundPage = render_playground_page_1.renderPlaygroundPage;
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/better-queue/test/lib/helper.js<|end_filename|>

exports.destroyQueues = function () {
  [this.q, this.q1, this.q2].forEach(function (q) {
    if (!q) return;
    setTimeout(function () {
      q.destroy();
    }, 15);
  });
};


<|start_filename|>node_modules/is-png/index.js<|end_filename|>
'use strict';
module.exports = function (buf) {
	if (!buf || buf.length < 8) {
		return false;
	}

	return buf[0] === 137 &&
		buf[1] === 80 &&
		buf[2] === 78 &&
		buf[3] === 71 &&
		buf[4] === 13 &&
		buf[5] === 10 &&
		buf[6] === 26 &&
		buf[7] === 10;
};


<|start_filename|>node_modules/better-queue/test/basic.js<|end_filename|>
var assert = require('assert');
var helper = require('./lib/helper');
var Queue = require('../lib/queue');

describe('Basic Queue', function() {
  afterEach(helper.destroyQueues);

  it('should succeed', function (done) {
    var q = new Queue(function (n, cb) {
      cb(null, n+1)
    }, { autoResume: true })
    q.on('task_finish', function (taskId, r) {
      assert.equal(r, 2);
      done();
    })
    q.push(1, function (err, r) {
      assert.equal(r, 2);
    })
    this.q = q;
  });

  it('should fail task if failTaskOnProcessException is true', function (done) {
    var q = new Queue(function (n, cb) {
      throw new Error("failed");
    }, { autoResume: true })
    q.on('task_failed', function (taskId, err) {
      assert.equal(err.message, "failed");
      done();
    })
    q.push(1)
    this.q = q;
  });

  it('should emit an error if failTaskOnProcessException is false', function (done) {
    var q = new Queue(function (n, cb) {
      throw new Error("failed");
    }, { failTaskOnProcessException: false, autoResume: true })
    q.on('error', function () {
      done();
    })
    q.push(1)
    this.q = q;
  });

  it('should fail', function (done) {
    var q = new Queue(function (n, cb) {
      cb('nope')
    }, { autoResume: true })
    q.on('task_failed', function (taskId, msg) {
      assert.equal(msg, 'nope');
      done();
    })
    q.push(1, function (err, r) {
      assert.equal(err, 'nope');
    })
    this.q = q;
  });

  it('should run fifo', function (done) {
    var finished = 0;
    var queued = 0;
    var q = new Queue(function (num, cb) { cb() })
    q.on('task_finish', function () {
      if (finished >= 3) {
        done();
      }
    })
    q.on('task_queued', function () {
      queued++;
      if (queued >= 3) {
        q.resume();
      }
    })
    q.pause();
    q.push(1, function (err, r) {
      assert.equal(finished, 0);
      finished++;
    })
    q.push(2, function (err, r) {
      assert.equal(finished, 1);
      finished++;
    })
    q.push(3, function (err, r) {
      assert.equal(finished, 2);
      finished++;
    })
    this.q = q;
  })

  it('should prioritize', function (done) {
    var q = new Queue(function (num, cb) { cb() }, {
      priority: function (n, cb) {
        if (n === 2) return cb(null, 10);
        if (n === 1) return cb(null, 5);
        return cb(null, 1);
      }
    })
    q.pause();
    var finished = 0;
    var queued = 0;
    q.on('task_queued', function () {
      queued++;
      if (queued === 3) {
        q.resume();
      }
    })
    q.push(3, function (err, r) {
      assert.equal(finished, 2);
      finished++;
    });
    q.push(2, function (err, r) {
      assert.equal(finished, 0);
      finished++;
    });
    q.push(1, function (err, r) {
      assert.equal(finished, 1);
      finished++;
      done()
    });
    this.q = q;
  })

  it('should run filo', function (done) {
    var finished = 0;
    var queued = 0;
    var q = new Queue(function (num, cb) {
      cb();
    }, { filo: true })
    q.on('task_finish', function () {
      if (finished >= 3) {
        done();
      }
    })
    q.on('task_queued', function () {
      queued++;
      if (queued >= 3) {
        q.resume();
      }
    })
    q.pause();
    q.push(1, function (err, r) {
      assert.equal(finished, 2);
      finished++;
    })
    q.push(2, function (err, r) {
      assert.equal(finished, 1);
      finished++;
    })
    q.push(3, function (err, r) {
      assert.equal(finished, 0);
      finished++;
    })
    this.q = q;
  })

  it('should filter before process', function (done) {
    var q = new Queue(function (n, cb) { cb(null, n) }, {
      filter: function (n, cb) {
        cb(null, n === 2 ? false : n);
      }
    })
    q.push(2, function (err, r) {
      assert.equal(err, 'input_rejected');
    })
    q.push(3, function (err, r) {
      assert.equal(r, 3);
      done();
    })
    this.q = q;
  })

  it('should batch delay', function (done) {
    var batches = 0;
    var q = new Queue(function (batch, cb) {
      batches++;
      if (batches === 1) {
        assert.equal(batch.length, 2);
        return cb();
      }
      if (batches === 2) {
        assert.equal(batch.length, 1);
        cb();
        return done();
      }
    }, { batchSize: 2, batchDelay: 5, failTaskOnProcessException: false });
    q.push(1);
    q.push(2);
    q.push(3);
    this.q = q;
  })

  it('should batch 2', function (done) {
    var finished = 0;
    var q = new Queue(function (batch, cb) {
      finished++;
      assert.equal(batch.length, 1);
      if (finished >= 2) {
        done();
      }
      cb();
    }, { batchSize: 2, batchDelay: 1, autoResume: true });
    q.push(1)
      .on('queued', function () {
        setTimeout(function () {
          q.push(2);
        }, 2)
      })
    this.q = q;
  })

  it('should drain and empty', function (done) {
    var emptied = false;
    var q = new Queue(function (n, cb) { cb() })
    q.on('empty', function () {
      emptied = true;
    }, { autoResume: true })
    q.on('drain', function () {
      assert.ok(emptied);
      done();
    });
    var queued = 0;
    q.on('task_queued', function () {
      queued++;
      if (queued >= 3) {
        q.resume();
      }
    })
    q.pause();
    q.push(1)
    q.push(2)
    q.push(3)
    this.q = q;
  })

  it('should drain only once the task is complete', function (done) {
    var finished_task = false;
    var q = new Queue(function (n, cb) {
        finished_task = true;
        cb();
    }, { concurrent: 2 });
    q.on('drain', function () {
      assert.ok(finished_task);
      done();
    });
    q.push(1);
    this.q = q;
  });

  it('should queue 50 things', function (done) {
    var q = new Queue(function (n, cb) {
      cb(null, n+1);
    })
    var finished = 0;
    for (var i = 0; i < 50; i++) {
      (function (n) {
        q.push(n, function (err, r) {
          assert.equal(r, n+1);
          finished++;
          if (finished === 50) {
            done();
          }
        })
      })(i)
    }
    this.q = q;
  });

  it('should concurrently handle tasks', function (done) {
    var concurrent = 0;
    var ok = false;
    var q = new Queue(function (n, cb) {
      var wait = function () {
        if (concurrent === 3) {
          ok = true;
        }
        if (ok) return cb();
        setImmediate(function () {
          wait();
        })
      }
      concurrent++;
      wait();
    }, { concurrent: 3 })
    var finished = 0;
    var finish = function () {
      finished++;
      if (finished >= 4) {
        done();
      }
    }
    q.push(0, finish);
    q.push(1, finish);
    q.push(2, finish);
    q.push(3, finish);
    this.q = q;
  })

  it('should pause and resume', function (done) {
    var running = false;
    var q = new Queue(function (n, cb) {
      running = true;
      return {
        pause: function () {
          running = false;
        },
        resume: function () {
          running = true;
          cb();
          done();
        }
      }
    })
    q.pause();
    q.push(1)
      .on('started', function () {
        setTimeout(function () {
          assert.ok(running);
          q.pause();
          assert.ok(!running);
          q.resume();
        }, 1)
      })
    assert.ok(!running);
    q.resume();
    this.q = q;
  })

  it('should timeout and fail', function (done) {
    var tries = 0;
    var q = new Queue(function (n, cb) {
      tries++;
      setTimeout(function () {
        cb(null, 'done!')
      }, 3)
    }, { maxTimeout: 1, maxRetries: 2 })
    q.push(1)
      .on('finish', function (result) {
        assert.ok(false)
      })
      .on('failed', function (err) {
        assert.equal(tries, 2);
        setTimeout(function () {
          done();
        }, 5)
      })
    this.q = q;
  })

  it('should cancel while running and in queue', function (done) {
    var q = new Queue(function (task, cb) {
      assert.ok(task.n, 2)
      setTimeout(function () {
        q.cancel(1);
      }, 1)
      return {
        cancel: function () {
          done();
        }
      }
    }, {
      id: 'id',
      merge: function (a,b) {
        assert.ok(false);
      }
    })
    q.push({ id: 1, n: 1 })
      .on('queued', function () {
        q.cancel(1, function () {
          q.push({ id: 1, n: 2 });
        })
      });
    this.q = q;
  })

  it('should stop if precondition fails', function (done) {
    var retries = 0;
    var q = new Queue(function (n) {
      assert.equal(retries, 2);
      done();
    }, {
      precondition: function (cb) {
        retries++;
        cb(null, retries === 2)
      },
      preconditionRetryTimeout: 1
    })
    q.push(1);
    this.q = q;
  })

  it('should call cb on throw', function (done) {
    var called = false;
    var q = new Queue(function (task, cb) {
      throw new Error('fail');
    });
    q.push(1, function (err) {
      called = true;
      assert.ok(err);
    });
    q.on('drain', function () {
      assert.ok(called);
      done();
    });
    this.q = q;
  })

  it('should respect batchDelayTimeout', function (done) {
    var q = new Queue(function (arr) {
      assert.equal(arr.length, 2);
      done();
    }, {
      batchSize: 3,
      batchDelay: Infinity,
      batchDelayTimeout: 5
    })
    q.push(1);
    setTimeout(function () {
      q.push(2);
    }, 1)
    this.q = q;
  })

  it('should merge but not batch until the delay has happened', function (done) {
    var running = false;
    var q = new Queue(function (arr) {
      running = true;
    }, {
      autoResume: true,
      batchSize: 2,
      batchDelay: Infinity,
      id: 'id'
    })
    setTimeout(function () {
      q.push({ id: 'a', x: 1 });
      q.push({ id: 'a', x: 2 });
    }, 1)
    setTimeout(function () {
      assert.ok(!running);
      done();
    }, 10)
    this.q = q;
  })

  it('merge batches should call all push callbacks', function (done) {
    var count = 0
    function finish() {
      count++
      if (count === 2) done()
    }
    var q = new Queue(function (arr, cb) {
      cb()
    }, {
      autoResume: true,
      batchSize: 2,
      id: 'id'
    })
    q.push({ id: 'a', x: 1 }, finish)
    q.push({ id: 'a', x: 2 }, finish)
    this.q = q;
  })

  it('cancel should not retry', function (done) {
    var count = 0;
    var q = new Queue(function (n, cb) {
      count++;
      if (count === 2) {
        q.cancel('a', function () {
          cb('failed again');
          setTimeout(function () {
            if (count === 2) {
              done();
            }
          }, 100)
        })
      } else {
        cb('failed');
      }
    }, {
      autoResume: true,
      failTaskOnProcessException: true,
      maxRetries: Infinity,
      id: 'id'
    })
    q.push({ id: 'a', x: 1 });
    this.q = q;
  })

})


<|start_filename|>node_modules/event-source-polyfill/tests/stop.js<|end_filename|>
this.windowStop = this.stop;


<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-prop-list.h<|end_filename|>
/*
 * This file is part of The Croco Library
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 *
 * Author: <NAME>
 * See COPYRIGHTS file for copyrights information.
 */

#ifndef __CR_PROP_LIST_H__
#define __CR_PROP_LIST_H__

#include "cr-utils.h"
#include "cr-declaration.h"
#include "cr-string.h"

G_BEGIN_DECLS

typedef struct _CRPropList CRPropList ;
typedef struct _CRPropListPriv CRPropListPriv ;

struct _CRPropList 
{
	CRPropListPriv * priv;
} ;

CRPropList * cr_prop_list_append (CRPropList *a_this,
				  CRPropList *a_to_append) ;

CRPropList * cr_prop_list_append2 (CRPropList *a_this,
				   CRString *a_prop,
				   CRDeclaration *a_decl) ;

CRPropList * cr_prop_list_prepend (CRPropList *a_this,
				   CRPropList *a_to_append) ;

CRPropList *  cr_prop_list_prepend2 (CRPropList *a_this,
				     CRString *a_prop,
				     CRDeclaration *a_decl) ;

enum CRStatus cr_prop_list_set_prop (CRPropList *a_this,
				     CRString *a_prop) ;

enum CRStatus cr_prop_list_get_prop (CRPropList const *a_this,
				     CRString **a_prop) ;

enum CRStatus cr_prop_list_lookup_prop (CRPropList *a_this,
					CRString *a_prop,
					CRPropList**a_pair) ;

CRPropList * cr_prop_list_get_next (CRPropList *a_this) ;

CRPropList * cr_prop_list_get_prev (CRPropList *a_this) ;

enum CRStatus cr_prop_list_set_decl (CRPropList *a_this,
				     CRDeclaration *a_decl);

enum CRStatus cr_prop_list_get_decl (CRPropList const *a_this,
				     CRDeclaration **a_decl) ;

CRPropList * cr_prop_list_unlink (CRPropList *a_this, 
				  CRPropList *a_pair) ;

void cr_prop_list_destroy (CRPropList *a_this) ;

G_END_DECLS

#endif /*__CR_PROP_LIST_H__*/


<|start_filename|>node_modules/bin-wrapper/node_modules/import-lazy/index.js<|end_filename|>
'use strict';
const lazy = (mod, fn, id) => mod === undefined ? fn(id) : mod;

module.exports = fn => {
	return id => {
		let mod;

		const handler = {
			get: (target, property) => {
				mod = lazy(mod, fn, id);
				return Reflect.get(mod, property);
			},
			apply: (target, thisArg, argumentsList) => {
				mod = lazy(mod, fn, id);
				return Reflect.apply(mod, thisArg, argumentsList);
			},
			construct: (target, argumentsList) => {
				mod = lazy(mod, fn, id);
				return Reflect.construct(mod, argumentsList);
			}
		};

		// eslint-disable-next-line prefer-arrow-callback
		return new Proxy(function () {}, handler);
	};
};


<|start_filename|>node_modules/sharp/vendor/include/gsf/gsf-msole-utils.h<|end_filename|>
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * gsf-msole-utils.h: various tools for handling MS OLE files
 *
 * Copyright (C) 2002-2006 <NAME> (<EMAIL>)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

#ifndef GSF_MSOLE_UTILS_H
#define GSF_MSOLE_UTILS_H

#include <gsf/gsf-fwd.h>

G_BEGIN_DECLS

GError *gsf_doc_meta_data_read_from_msole (GsfDocMetaData *accum,
					   GsfInput *in);
gboolean gsf_doc_meta_data_write_to_msole (GsfDocMetaData const *meta_data,
                                           GsfOutput *out,
					   gboolean doc_not_component);

#ifndef GSF_DISABLE_DEPRECATED
GSF_DEPRECATED_FOR (gsf_doc_meta_data_read_from_msole)
GError	   *gsf_msole_metadata_read	  (GsfInput *in,
					   GsfDocMetaData *accum);
GSF_DEPRECATED_FOR (gsf_doc_meta_data_write_to_msole)
gboolean    gsf_msole_metadata_write	  (GsfOutput *out,
					   GsfDocMetaData const *meta_data,
					   gboolean doc_not_component);
#endif

guint	    gsf_msole_lid_for_language	  (char const *lang);
guint	    gsf_msole_codepage_to_lid	  (int codepage);
int	    gsf_msole_lid_to_codepage	  (guint lid);
gchar	   *gsf_msole_lid_to_codepage_str (guint lid);
char const *gsf_msole_language_for_lid	  (guint lid);

int	    gsf_msole_iconv_win_codepage    (void) ;
GIConv	    gsf_msole_iconv_open_for_import (int codepage) ;
GIConv	    gsf_msole_iconv_open_for_export (void) ;

GIConv	    gsf_msole_iconv_open_codepage_for_import  (char const *to, int codepage);
GIConv	    gsf_msole_iconv_open_codepages_for_export (int codepage_to, char const *from);
GIConv	    gsf_msole_iconv_open_codepage_for_export  (int codepage_to);

GByteArray *gsf_msole_inflate (GsfInput *input, gsf_off_t offset);

typedef struct GsfMSOleSortingKey_ GsfMSOleSortingKey;
GType gsf_msole_sorting_key_get_type (void);
GsfMSOleSortingKey *gsf_msole_sorting_key_new (const char *name);
void gsf_msole_sorting_key_free (GsfMSOleSortingKey *sk);
int gsf_msole_sorting_key_cmp (const GsfMSOleSortingKey *a,
			       const GsfMSOleSortingKey *b);

G_END_DECLS

#endif /* GSF_MSOLE_UTILS_H */


<|start_filename|>node_modules/event-source-polyfill/tests/simple/server.js<|end_filename|>

var http = require("http");
var url = require("url");

http.createServer(function (request, response) {
  var parsedURL = url.parse(request.url, true);
  var query = parsedURL.query;

  var contentType = query.contentType;
  var count = parseInt(query.count, 10);
  var delay = parseInt(query.delay, 10);  
  response.writeHead(200, {
    "Content-Type": contentType,
    "Cache-Control": "no-store",
    "Access-Control-Allow-Origin": "*"
  });
  var start = Date.now();
  response.write("");
  var i = 0;
  var next = function () {
    if (i < count) {
      setTimeout(next, delay);
      response.write("TEST_TRICKLE:" + (Date.now() - start) + "\n");
      i += 1;
    } else {
      response.write("!");
      setTimeout(function () {
        response.end("");
      }, 40);
    }
  };
  next();
}).listen(801);


<|start_filename|>node_modules/sharp/vendor/include/orc/orctarget.h<|end_filename|>

#ifndef _ORC_TARGET_H_
#define _ORC_TARGET_H_

#include <orc/orcutils.h>
#include <orc/orclimits.h>
#include <orc/orcrule.h>

ORC_BEGIN_DECLS


enum {
  ORC_TARGET_C_C99 = (1<<0),
  ORC_TARGET_C_BARE = (1<<1),
  ORC_TARGET_C_NOEXEC = (1<<2),
  ORC_TARGET_C_OPCODE = (1<<3),
  ORC_TARGET_CLEAN_COMPILE = (1<<29),
  ORC_TARGET_FAST_NAN = (1<<30),
  ORC_TARGET_FAST_DENORMAL = (1<<31)
};

enum {
  ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0)
};

enum {
  ORC_TARGET_NEON_CLEAN_COMPILE = (1<<0),
  ORC_TARGET_NEON_NEON = (1<<1),
  ORC_TARGET_NEON_EDSP = (1<<2)
};

enum {
  ORC_TARGET_ARM_EDSP = (1<<2),
  ORC_TARGET_ARM_ARM6 = (1<<3)
};

typedef enum {
  ORC_TARGET_MMX_MMX = (1<<0),
  ORC_TARGET_MMX_MMXEXT = (1<<1),
  ORC_TARGET_MMX_3DNOW = (1<<2),
  ORC_TARGET_MMX_3DNOWEXT = (1<<3),
  ORC_TARGET_MMX_SSSE3 = (1<<4),
  ORC_TARGET_MMX_SSE4_1 = (1<<5),
  ORC_TARGET_MMX_SSE4_2 = (1<<6),
  ORC_TARGET_MMX_FRAME_POINTER = (1<<7),
  ORC_TARGET_MMX_SHORT_JUMPS = (1<<8),
  ORC_TARGET_MMX_64BIT = (1<<9)
} OrcTargetMMXFlags;

typedef enum {
  ORC_TARGET_SSE_SSE2 = (1<<0),
  ORC_TARGET_SSE_SSE3 = (1<<1),
  ORC_TARGET_SSE_SSSE3 = (1<<2),
  ORC_TARGET_SSE_SSE4_1 = (1<<3),
  ORC_TARGET_SSE_SSE4_2 = (1<<4),
  ORC_TARGET_SSE_SSE4A = (1<<5),
  ORC_TARGET_SSE_SSE5 = (1<<6),
  ORC_TARGET_SSE_FRAME_POINTER = (1<<7),
  ORC_TARGET_SSE_SHORT_JUMPS = (1<<8),
  ORC_TARGET_SSE_64BIT = (1<<9)
}OrcTargetSSEFlags;


/**
 * OrcTarget:
 *
 */
struct _OrcTarget {
  const char *name;
  orc_bool executable;
  int data_register_offset;

  unsigned int (*get_default_flags)(void);
  void (*compiler_init)(OrcCompiler *compiler);
  void (*compile)(OrcCompiler *compiler);

  OrcRuleSet rule_sets[ORC_N_RULE_SETS];
  int n_rule_sets;

  const char * (*get_asm_preamble)(void);
  void (*load_constant)(OrcCompiler *compiler, int reg, int size, int value);
  const char * (*get_flag_name)(int shift);
  void (*flush_cache) (OrcCode *code);
  void (*load_constant_long)(OrcCompiler *compiler, int reg,
      OrcConstant *constant);

  void *_unused[5];
};


OrcRule * orc_target_get_rule (OrcTarget *target, OrcStaticOpcode *opcode,
    unsigned int target_flags);
OrcTarget * orc_target_get_default (void);
unsigned int orc_target_get_default_flags (OrcTarget *target);
const char * orc_target_get_name (OrcTarget *target);
const char * orc_target_get_flag_name (OrcTarget *target, int shift);

const char *orc_target_get_asm_preamble (const char *target);
const char * orc_target_get_preamble (OrcTarget *target);
const char * orc_target_c_get_typedefs (void);

void orc_target_register (OrcTarget *target);
OrcTarget *orc_target_get_by_name (const char *target_name);

ORC_END_DECLS

#endif



<|start_filename|>node_modules/@jimp/plugin-gaussian/dist/index.js<|end_filename|>
"use strict";

require("core-js/modules/es6.object.define-property");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _utils = require("@jimp/utils");

/**
 * Applies a true Gaussian blur to the image (warning: this is VERY slow)
 * @param {number} r the pixel radius of the blur
 * @param {function(Error, Jimp)} cb (optional) a callback for when complete
 * @returns {Jimp} this for chaining of methods
 */
var _default = function _default() {
  return {
    gaussian: function gaussian(r, cb) {
      // http://blog.ivank.net/fastest-gaussian-blur.html
      if (typeof r !== 'number') {
        return _utils.throwError.call(this, 'r must be a number', cb);
      }

      if (r < 1) {
        return _utils.throwError.call(this, 'r must be greater than 0', cb);
      }

      var rs = Math.ceil(r * 2.57); // significant radius

      var range = rs * 2 + 1;
      var rr2 = r * r * 2;
      var rr2pi = rr2 * Math.PI;
      var weights = [];

      for (var y = 0; y < range; y++) {
        weights[y] = [];

        for (var x = 0; x < range; x++) {
          var dsq = Math.pow(x - rs, 2) + Math.pow(y - rs, 2);
          weights[y][x] = Math.exp(-dsq / rr2) / rr2pi;
        }
      }

      for (var _y = 0; _y < this.bitmap.height; _y++) {
        for (var _x = 0; _x < this.bitmap.width; _x++) {
          var red = 0;
          var green = 0;
          var blue = 0;
          var alpha = 0;
          var wsum = 0;

          for (var iy = 0; iy < range; iy++) {
            for (var ix = 0; ix < range; ix++) {
              var x1 = Math.min(this.bitmap.width - 1, Math.max(0, ix + _x - rs));
              var y1 = Math.min(this.bitmap.height - 1, Math.max(0, iy + _y - rs));
              var weight = weights[iy][ix];

              var _idx = y1 * this.bitmap.width + x1 << 2;

              red += this.bitmap.data[_idx] * weight;
              green += this.bitmap.data[_idx + 1] * weight;
              blue += this.bitmap.data[_idx + 2] * weight;
              alpha += this.bitmap.data[_idx + 3] * weight;
              wsum += weight;
            }

            var idx = _y * this.bitmap.width + _x << 2;
            this.bitmap.data[idx] = Math.round(red / wsum);
            this.bitmap.data[idx + 1] = Math.round(green / wsum);
            this.bitmap.data[idx + 2] = Math.round(blue / wsum);
            this.bitmap.data[idx + 3] = Math.round(alpha / wsum);
          }
        }
      }

      if ((0, _utils.isNodePattern)(cb)) {
        cb.call(this, null, this);
      }

      return this;
    }
  };
};

exports.default = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/sharp/vendor/include/pango/pango-renderer.h<|end_filename|>
/* Pango
 * pango-renderer.h: Base class for rendering
 *
 * Copyright (C) 2004, Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */
#ifndef __PANGO_RENDERER_H_
#define __PANGO_RENDERER_H_

#include <pango/pango-layout.h>

G_BEGIN_DECLS

#define PANGO_TYPE_RENDERER            (pango_renderer_get_type())
#define PANGO_RENDERER(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_RENDERER, PangoRenderer))
#define PANGO_IS_RENDERER(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_RENDERER))
#define PANGO_RENDERER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_RENDERER, PangoRendererClass))
#define PANGO_IS_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_RENDERER))
#define PANGO_RENDERER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_RENDERER, PangoRendererClass))

typedef struct _PangoRenderer        PangoRenderer;
typedef struct _PangoRendererClass   PangoRendererClass;
typedef struct _PangoRendererPrivate PangoRendererPrivate;

/**
 * PangoRenderPart:
 * @PANGO_RENDER_PART_FOREGROUND: the text itself
 * @PANGO_RENDER_PART_BACKGROUND: the area behind the text
 * @PANGO_RENDER_PART_UNDERLINE: underlines
 * @PANGO_RENDER_PART_STRIKETHROUGH: strikethrough lines
 *
 * #PangoRenderPart defines different items to render for such
 * purposes as setting colors.
 *
 * Since: 1.8
 **/
/* When extending, note N_RENDER_PARTS #define in pango-renderer.c */
typedef enum
{
  PANGO_RENDER_PART_FOREGROUND,
  PANGO_RENDER_PART_BACKGROUND,
  PANGO_RENDER_PART_UNDERLINE,
  PANGO_RENDER_PART_STRIKETHROUGH
} PangoRenderPart;

/**
 * PangoRenderer:
 * @matrix: (nullable): the current transformation matrix for
 *    the Renderer; may be %NULL, which should be treated the
 *    same as the identity matrix.
 *
 * #PangoRenderer is a base class for objects that are used to
 * render Pango objects such as #PangoGlyphString and
 * #PangoLayout.
 *
 * Since: 1.8
 **/
struct _PangoRenderer
{
  /*< private >*/
  GObject parent_instance;

  PangoUnderline underline;
  gboolean strikethrough;
  int active_count;

  /*< public >*/
  PangoMatrix *matrix;		/* May be NULL */

  /*< private >*/
  PangoRendererPrivate *priv;
};

/**
 * PangoRendererClass:
 * @draw_glyphs: draws a #PangoGlyphString
 * @draw_rectangle: draws a rectangle
 * @draw_error_underline: draws a squiggly line that approximately
 * covers the given rectangle in the style of an underline used to
 * indicate a spelling error.
 * @draw_shape: draw content for a glyph shaped with #PangoAttrShape.
 *   @x, @y are the coordinates of the left edge of the baseline,
 *   in user coordinates.
 * @draw_trapezoid: draws a trapezoidal filled area
 * @draw_glyph: draws a single glyph
 * @part_changed: do renderer specific processing when rendering
 *  attributes change
 * @begin: Do renderer-specific initialization before drawing
 * @end: Do renderer-specific cleanup after drawing
 * @prepare_run: updates the renderer for a new run
 * @draw_glyph_item: draws a #PangoGlyphItem
 *
 * Class structure for #PangoRenderer.
 *
 * Since: 1.8
 **/
struct _PangoRendererClass
{
  /*< private >*/
  GObjectClass parent_class;

  /* vtable - not signals */
  /*< public >*/

  /* All of the following have default implementations
   * and take as coordinates user coordinates in Pango units
   */
  void (*draw_glyphs) (PangoRenderer     *renderer,
		       PangoFont         *font,
		       PangoGlyphString  *glyphs,
		       int                x,
		       int                y);
  void (*draw_rectangle) (PangoRenderer     *renderer,
			  PangoRenderPart    part,
			  int                x,
			  int                y,
			  int                width,
			  int                height);
  void (*draw_error_underline) (PangoRenderer     *renderer,
				int                x,
				int                y,
				int                width,
				int                height);

  /* Nothing is drawn for shaped glyphs unless this is implemented */
  void (*draw_shape) (PangoRenderer  *renderer,
		      PangoAttrShape *attr,
		      int             x,
		      int             y);

  /* These two must be implemented and take coordinates in
   * device space as doubles.
   */
  void (*draw_trapezoid) (PangoRenderer  *renderer,
			  PangoRenderPart part,
			  double          y1_,
			  double          x11,
			  double          x21,
			  double          y2,
			  double          x12,
			  double          x22);
  void (*draw_glyph) (PangoRenderer *renderer,
		      PangoFont     *font,
		      PangoGlyph     glyph,
		      double         x,
		      double         y);

  /* Notification of change in rendering attributes
   */
  void (*part_changed) (PangoRenderer   *renderer,
			PangoRenderPart  part);

  /* Paired around drawing operations
   */
  void (*begin) (PangoRenderer *renderer);
  void (*end)   (PangoRenderer *renderer);

  /* Hooks into the details of layout rendering
   */
  void (*prepare_run) (PangoRenderer  *renderer,
		       PangoLayoutRun *run);

  /* All of the following have default implementations
   * and take as coordinates user coordinates in Pango units
   */
  void (*draw_glyph_item) (PangoRenderer     *renderer,
			   const char        *text,
			   PangoGlyphItem    *glyph_item,
			   int                x,
			   int                y);

  /*< private >*/

  /* Padding for future expansion */
  void (*_pango_reserved2) (void);
  void (*_pango_reserved3) (void);
  void (*_pango_reserved4) (void);
};

PANGO_AVAILABLE_IN_1_8
GType pango_renderer_get_type    (void) G_GNUC_CONST;

PANGO_AVAILABLE_IN_1_8
void pango_renderer_draw_layout          (PangoRenderer    *renderer,
					  PangoLayout      *layout,
					  int               x,
					  int               y);
PANGO_AVAILABLE_IN_1_8
void pango_renderer_draw_layout_line     (PangoRenderer    *renderer,
					  PangoLayoutLine  *line,
					  int               x,
					  int               y);
PANGO_AVAILABLE_IN_1_8
void pango_renderer_draw_glyphs          (PangoRenderer    *renderer,
					  PangoFont        *font,
					  PangoGlyphString *glyphs,
					  int               x,
					  int               y);
PANGO_AVAILABLE_IN_1_22
void pango_renderer_draw_glyph_item      (PangoRenderer    *renderer,
					  const char       *text,
					  PangoGlyphItem   *glyph_item,
					  int               x,
					  int               y);
PANGO_AVAILABLE_IN_1_8
void pango_renderer_draw_rectangle       (PangoRenderer    *renderer,
					  PangoRenderPart   part,
					  int               x,
					  int               y,
					  int               width,
					  int               height);
PANGO_AVAILABLE_IN_1_8
void pango_renderer_draw_error_underline (PangoRenderer    *renderer,
					  int               x,
					  int               y,
					  int               width,
					  int               height);
PANGO_AVAILABLE_IN_1_8
void pango_renderer_draw_trapezoid       (PangoRenderer    *renderer,
					  PangoRenderPart   part,
					  double            y1_,
					  double            x11,
					  double            x21,
					  double            y2,
					  double            x12,
					  double            x22);
PANGO_AVAILABLE_IN_1_8
void pango_renderer_draw_glyph           (PangoRenderer    *renderer,
					  PangoFont        *font,
					  PangoGlyph        glyph,
					  double            x,
					  double            y);

PANGO_AVAILABLE_IN_1_8
void pango_renderer_activate             (PangoRenderer    *renderer);
PANGO_AVAILABLE_IN_1_8
void pango_renderer_deactivate           (PangoRenderer    *renderer);

PANGO_AVAILABLE_IN_1_8
void        pango_renderer_part_changed (PangoRenderer   *renderer,
					 PangoRenderPart  part);

PANGO_AVAILABLE_IN_1_8
void        pango_renderer_set_color (PangoRenderer    *renderer,
				      PangoRenderPart   part,
				      const PangoColor *color);
PANGO_AVAILABLE_IN_1_8
PangoColor *pango_renderer_get_color (PangoRenderer    *renderer,
				      PangoRenderPart   part);

PANGO_AVAILABLE_IN_1_38
void        pango_renderer_set_alpha (PangoRenderer    *renderer,
				      PangoRenderPart   part,
				      guint16           alpha);
PANGO_AVAILABLE_IN_1_38
guint16     pango_renderer_get_alpha (PangoRenderer    *renderer,
				      PangoRenderPart   part);

PANGO_AVAILABLE_IN_1_8
void                        pango_renderer_set_matrix (PangoRenderer     *renderer,
						       const PangoMatrix *matrix);
PANGO_AVAILABLE_IN_1_8
const PangoMatrix          *pango_renderer_get_matrix (PangoRenderer     *renderer);

PANGO_AVAILABLE_IN_1_20
PangoLayout     *pango_renderer_get_layout      (PangoRenderer     *renderer);
PANGO_AVAILABLE_IN_1_20
PangoLayoutLine *pango_renderer_get_layout_line (PangoRenderer     *renderer);

G_END_DECLS

#endif /* __PANGO_RENDERER_H_ */



<|start_filename|>node_modules/graphql/jsutils/nodejsCustomInspectSymbol.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;
var _default = nodejsCustomInspectSymbol;
exports.default = _default;


<|start_filename|>node_modules/graphql/validation/rules/NoUnusedVariables.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.unusedVariableMessage = unusedVariableMessage;
exports.NoUnusedVariables = NoUnusedVariables;

var _GraphQLError = require("../../error/GraphQLError");

function unusedVariableMessage(varName, opName) {
  return opName ? "Variable \"$".concat(varName, "\" is never used in operation \"").concat(opName, "\".") : "Variable \"$".concat(varName, "\" is never used.");
}
/**
 * No unused variables
 *
 * A GraphQL operation is only valid if all variables defined by an operation
 * are used, either directly or within a spread fragment.
 */


function NoUnusedVariables(context) {
  var variableDefs = [];
  return {
    OperationDefinition: {
      enter: function enter() {
        variableDefs = [];
      },
      leave: function leave(operation) {
        var variableNameUsed = Object.create(null);
        var usages = context.getRecursiveVariableUsages(operation);
        var opName = operation.name ? operation.name.value : null;

        for (var _i2 = 0; _i2 < usages.length; _i2++) {
          var _ref2 = usages[_i2];
          var node = _ref2.node;
          variableNameUsed[node.name.value] = true;
        }

        for (var _i4 = 0, _variableDefs2 = variableDefs; _i4 < _variableDefs2.length; _i4++) {
          var variableDef = _variableDefs2[_i4];
          var variableName = variableDef.variable.name.value;

          if (variableNameUsed[variableName] !== true) {
            context.reportError(new _GraphQLError.GraphQLError(unusedVariableMessage(variableName, opName), variableDef));
          }
        }
      }
    },
    VariableDefinition: function VariableDefinition(def) {
      variableDefs.push(def);
    }
  };
}


<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-style.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */

/*
 * This file is part of The Croco Library
 *
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 *
 * Author: <NAME>.
 * See COPYRIGHTS file for copyright information.
 */

#ifndef __CR_STYLE_H__
#define __CR_STYLE_H__

#include "cr-utils.h"
#include "cr-statement.h"
#include "cr-fonts.h"

/**
 *@file
 *The declaration of the #CRStyle class.
 */
G_BEGIN_DECLS

typedef struct _CRStyle CRStyle ;

enum CRBorderStyle
{
        BORDER_STYLE_NONE = 0,
        BORDER_STYLE_HIDDEN,
        BORDER_STYLE_DOTTED,
        BORDER_STYLE_DASHED,
        BORDER_STYLE_SOLID,
        BORDER_STYLE_DOUBLE,
        BORDER_STYLE_GROOVE,
        BORDER_STYLE_RIDGE,
        BORDER_STYLE_INSET,
        BORDER_STYLE_OUTSET,
	BORDER_STYLE_INHERIT
} ;

enum CRDisplayType
{
        DISPLAY_NONE,
        DISPLAY_INLINE,
        DISPLAY_BLOCK,
        DISPLAY_LIST_ITEM,
        DISPLAY_RUN_IN,
        DISPLAY_COMPACT,
        DISPLAY_MARKER,
        DISPLAY_TABLE,
        DISPLAY_INLINE_TABLE,
        DISPLAY_TABLE_ROW_GROUP,
        DISPLAY_TABLE_HEADER_GROUP,
        DISPLAY_TABLE_FOOTER_GROUP,
        DISPLAY_TABLE_ROW,
        DISPLAY_TABLE_COLUMN_GROUP,
        DISPLAY_TABLE_COLUMN,
        DISPLAY_TABLE_CELL,
        DISPLAY_TABLE_CAPTION,
        DISPLAY_INHERIT
} ;

enum CRPositionType
{
        POSITION_STATIC,
        POSITION_RELATIVE,
        POSITION_ABSOLUTE,
        POSITION_FIXED,
        POSITION_INHERIT
} ;

enum CRFloatType
{
        FLOAT_NONE,
        FLOAT_LEFT,
        FLOAT_RIGHT,
        FLOAT_INHERIT
} ;

enum CRWhiteSpaceType
{
	WHITE_SPACE_NORMAL,
	WHITE_SPACE_PRE,
	WHITE_SPACE_NOWRAP,
	WHITE_SPACE_INHERIT
} ;


#define BORDER_THIN 2
#define BORDER_MEDIUM 4
#define BORDER_THICK 6


/**
 *A numerical css property value.
 *This data type is actually split in 3 parts:
 *1/the specified value
 *2/the computed value
 *3/the actual value.
 *To understand the semantic of these three parts,
 *see css2 spec chap 6.1 ("Specified, computed and actual values.").
 */
typedef struct _CRNumPropVal CRNumPropVal ;
struct _CRNumPropVal
{
        /**specified value*/
        CRNum sv ;
        /**computed value*/
        CRNum cv ;
        /**actual value*/
        CRNum av ;
} ;

/**
 *An rgb css property value.
 *This data type is actually split in 3 parts:
 *1/the specified value
 *2/the computed value
 *3/the actual value.
 *To understand the semantic of these three parts,
 *see css2 spec chap 6.1 ("Specified, computed and actual values.").
 */
typedef struct _CRRgbPropVal CRRgbPropVal ;
struct _CRRgbPropVal
{        
        /**specified value*/
        CRRgb sv ;
        /**computed value*/
        CRRgb cv ;
        /**actual value*/
        CRRgb av ;
} ;


enum CRNumProp
{        
        NUM_PROP_TOP=0,
        NUM_PROP_RIGHT,
        NUM_PROP_BOTTOM,
        NUM_PROP_LEFT,/*3*/

        NUM_PROP_PADDING_TOP,
        NUM_PROP_PADDING_RIGHT,
        NUM_PROP_PADDING_BOTTOM,
        NUM_PROP_PADDING_LEFT,/*7*/

        NUM_PROP_BORDER_TOP,
        NUM_PROP_BORDER_RIGHT,
        NUM_PROP_BORDER_BOTTOM,
        NUM_PROP_BORDER_LEFT,/*11*/

        NUM_PROP_MARGIN_TOP,
        NUM_PROP_MARGIN_RIGHT,
        NUM_PROP_MARGIN_BOTTOM,
        NUM_PROP_MARGIN_LEFT,/*15*/

        NUM_PROP_WIDTH,

        /*must be last*/
        NB_NUM_PROPS
} ;

enum CRRgbProp
{
        RGB_PROP_BORDER_TOP_COLOR = 0,
        RGB_PROP_BORDER_RIGHT_COLOR,
        RGB_PROP_BORDER_BOTTOM_COLOR,
        RGB_PROP_BORDER_LEFT_COLOR,
        RGB_PROP_COLOR,
        RGB_PROP_BACKGROUND_COLOR,

        /*must be last*/
        NB_RGB_PROPS
} ;


enum CRBorderStyleProp
{
        BORDER_STYLE_PROP_TOP = 0,
        BORDER_STYLE_PROP_RIGHT,
        BORDER_STYLE_PROP_BOTTOM,
        BORDER_STYLE_PROP_LEFT,
        
        /*must be last*/
        NB_BORDER_STYLE_PROPS
} ;

enum CRBoxOffsetProp
{
        BOX_OFFSET_PROP_TOP = 0,
        BOX_OFFSET_PROP_RIGHT,
        BOX_OFFSET_PROP_BOTTOM,
        BOX_OFFSET_PROP_LEFT,

        /*must be last*/
        NB_BOX_OFFSET_PROPS
} ;

typedef struct _CRFontSizeVal CRFontSizeVal ;
struct _CRFontSizeVal {
        /*specified value*/
        CRFontSize sv ;
        /*computed value*/
        CRFontSize cv ;
        /*actual value*/
        CRFontSize av ;
} ;

/**
 *The css2 style class.
 *Contains computed and actual values
 *inferred from the declarations found
 *in the stylesheets.
 *See css2 spec chapter 6.
 */
struct _CRStyle
{
        /**
         *numerical properties.
         *the properties are indexed by
         *enum #CRNumProp. 
         */
        CRNumPropVal num_props[NB_NUM_PROPS] ;

        /**
         *color properties.
         *They are indexed by enum #CRRgbProp .
         */
        CRRgbPropVal rgb_props[NB_RGB_PROPS] ;

        /**
         *border style properties.
         *They are indexed by enum #CRBorderStyleProp .
         */
        enum CRBorderStyle border_style_props[NB_BORDER_STYLE_PROPS] ;

        /**box display type*/
        enum CRDisplayType display ;

        /**the positioning scheme*/
        enum CRPositionType position ;

        /**the float property*/
        enum CRFloatType float_type ;

        /*
         *the 'font-family' property.
         */
        CRFontFamily *font_family ;

        /**
         *the 'font-size' property.
         */
        CRFontSizeVal font_size ;
        CRFontSizeAdjust *font_size_adjust ;
        enum CRFontStyle font_style ;
        enum CRFontVariant font_variant ;
        enum CRFontWeight font_weight ;
        enum CRFontStretch font_stretch ;

	/**
	 * the 'tex' properties
	 */
	enum CRWhiteSpaceType white_space;

        gboolean inherited_props_resolved ;
        CRStyle *parent_style ;
        gulong ref_count ;
} ;

enum CRStatus cr_style_white_space_type_to_string (enum CRWhiteSpaceType a_code,
                                                   GString * a_str, guint a_nb_indent) ;

enum CRStatus cr_style_num_prop_val_to_string (CRNumPropVal *a_prop_val,
                                               GString *a_str,
                                               guint a_nb_indent) ;

enum CRStatus cr_style_rgb_prop_val_to_string (CRRgbPropVal *a_prop_val,
                                               GString *a_str,
                                               guint a_nb_indent) ;

enum CRStatus cr_style_border_style_to_string (enum CRBorderStyle a_prop,
                                               GString *a_str,
                                               guint a_nb_indent) ;

enum CRStatus cr_style_display_type_to_string (enum CRDisplayType a_code,
                                               GString *a_str,
                                               guint a_nb_indent) ;

enum CRStatus cr_style_position_type_to_string (enum CRPositionType a_code,
                                                GString *a_str,
                                                guint a_nb_indent) ;

enum CRStatus cr_style_float_type_to_string (enum CRFloatType a_code,
                                             GString *a_str,
                                             guint a_nb_indent) ;

CRStyle * cr_style_new (gboolean a_set_props_to_initial_values) ;

enum CRStatus cr_style_set_props_to_default_values (CRStyle *a_this) ;
enum CRStatus cr_style_set_props_to_initial_values (CRStyle *a_this) ;
enum CRStatus cr_style_resolve_inherited_properties (CRStyle *a_this) ;
enum CRStatus cr_style_propagate_from_parent (CRStyle *a_this);

enum CRStatus cr_style_set_style_from_decl (CRStyle *a_this, 
					    CRDeclaration *a_decl) ;


enum CRStatus cr_style_copy (CRStyle *a_dest, CRStyle *a_src) ;

enum CRStatus cr_style_ref (CRStyle *a_this) ;

gboolean cr_style_unref (CRStyle *a_this) ;

void cr_style_destroy (CRStyle *a_this) ;

CRStyle * cr_style_dup (CRStyle *a_this) ;

enum CRStatus cr_style_to_string (CRStyle *a_this, 
                                  GString **a_str, 
                                  guint a_nb_indent) ;

G_END_DECLS

#endif /*__CR_STYLE_H__*/


<|start_filename|>node_modules/sharp/vendor/include/vips/dispatch.h<|end_filename|>
/* VIPS function dispatch.
 *
 * <NAME>, 8/4/93.
 */

/*

    This file is part of VIPS.
    
    VIPS is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301  USA

 */

/*

    These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk

 */

#ifndef IM_DISPATCH_H
#define IM_DISPATCH_H

#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/

#include <glib-object.h>
#include <vips/vips.h>
#include <vips/util.h>

/* Type names. You may define your own, but if you use one of these, then
 * you should use the built-in VIPS type converters.
 */
#define IM_TYPE_IMAGEVEC "imagevec"	/* im_object is ptr to IMAGE[] */
#define IM_TYPE_DOUBLEVEC "doublevec"	/* im_object is ptr to double[] */
#define IM_TYPE_INTVEC "intvec"		/* im_object is ptr to int[] */
#define IM_TYPE_DOUBLE "double"		/* im_object is ptr to double */
#define IM_TYPE_INT "integer"		/* 32-bit integer */
#define IM_TYPE_COMPLEX "complex"	/* Pair of doubles */
#define IM_TYPE_STRING "string"         /* Zero-terminated char array */
#define IM_TYPE_IMASK "intmask"		/* Integer mask type */
#define IM_TYPE_DMASK "doublemask"	/* Double mask type */
#define IM_TYPE_IMAGE "image"           /* IMAGE descriptor */
#define IM_TYPE_DISPLAY "display"	/* Display descriptor */
#define IM_TYPE_GVALUE "gvalue"		/* GValue wrapper */
#define IM_TYPE_INTERPOLATE "interpolate"/* A subclass of VipsInterpolate */
typedef char *im_arg_type;              /* Type of argument id */

/* Internal representation of an argument to an image processing function.
 */ 
typedef void *im_object;

/* These bits are ored together to make the flags in a type descriptor.
 *
 * IM_TYPE_OUTPUT: set to indicate output, otherwise input. If the IM_TYPE_RW 
 * bit is set and IM_TYPE_OUTPUT is not set, both input and output (ie. the 
 * operation side-effects this argument).
 *
 * IM_TYPE_ARG: Two ways of making an im_object --- with and without a 
 * command-line string to help you along. Arguments with a string are thing 
 * like IMAGE descriptors, which require a filename to initialise. 
 * Arguments without are things like output numbers, where making the object 
 * simply involves allocating storage.
 */
typedef enum {
	IM_TYPE_NONE = 0,		/* No flags */
	IM_TYPE_OUTPUT = 0x1,		/* Output/input object */
	IM_TYPE_ARG = 0x2,		/* Uses a str arg in construction */
	IM_TYPE_RW = 0x4		/* Read-write */
} im_type_flags;

/* Initialise, destroy and write objects. The "str" argument to the
 * init function will not be supplied if this is not an ARG type. The
 * write function writes to the GString.
 */
typedef int (*im_init_obj_fn)( im_object *obj, char *str );
typedef int (*im_dest_obj_fn)( im_object obj );

/* Describe a VIPS type.
 */
typedef struct {
	im_arg_type type;		/* Type of argument */
	int size;			/* sizeof( im_object repres. ) */
	im_type_flags flags;		/* Flags */
	im_init_obj_fn init; 		/* Operation functions */
	im_dest_obj_fn dest;            /* Destroy object */
} im_type_desc;

/* Success on an argument. This is called if the image processing function 
 * succeeds and should be used to (for example) print output.
 */
typedef int (*im_print_obj_fn)( im_object obj );

/* Describe a VIPS command argument.
 */
typedef struct {
	char *name;			/* eg. "width" */
	im_type_desc *desc; 		/* Type description */
	im_print_obj_fn print;		/* Print some output objects */
} im_arg_desc;

/* Type of VIPS dispatch funtion.
 */
typedef int (*im_dispatch_fn)( im_object *argv );

/* Maximum size of arg table.
 */
#define IM_MAX_ARGS (1000)

/* Flags for functions. These are for information only, and more may be
 * added.
 */
typedef enum {
	IM_FN_NONE = 0,		/* No flags set */
	IM_FN_PIO = 0x1,	/* Is a partial function */
	IM_FN_TRANSFORM = 0x2,	/* Performs coordinate transformations */
	IM_FN_PTOP = 0x4,	/* Point-to-point ... can be done with a LUT */
	IM_FN_NOCACHE = 0x8	/* Result should not be cached */
} im_fn_flags;

/* Describe a VIPS function.
 */
typedef struct {
	char *name;		/* eg "im_invert" */
	char *desc;		/* Description - eg "photographic negative" */
	im_fn_flags flags;	/* Flags for this function */
	im_dispatch_fn disp;	/* Dispatch */
	int argc;		/* Number of args */
	im_arg_desc *argv; 	/* Arg table */
} im_function;

/* A set of VIPS functions forming a package.
 */
typedef struct {
	char *name;		/* Package name (eg "arithmetic") */
	int nfuncs;		/* Number of functions in package */
	im_function **table;	/* Array of function descriptors */
} im_package;

/* Externs for dispatch.
 */

/* Struct for mask IO to a file.
 */
typedef struct {
	char *name;		/* Command-line name in */
	void *mask;		/* Mask --- DOUBLE or INT */
} im_mask_object;

/* Struct for doublevec IO
 */
typedef struct {
	int n;			/* Vector length */
	double *vec;		/* Vector */
} im_doublevec_object;

/* Struct for intvec IO
 */
typedef struct {
	int n;			/* Vector length */
	int *vec;		/* Vector */
} im_intvec_object;

/* Struct for imagevec IO
 */
typedef struct {
	int n;			/* Vector length */
	IMAGE **vec;		/* Vector */
} im_imagevec_object;

/* Built-in VIPS types.
 */
extern im_type_desc im__input_int;
extern im_type_desc im__input_intvec;
extern im_type_desc im__input_imask;
extern im_type_desc im__output_int;
extern im_type_desc im__output_intvec;
extern im_type_desc im__output_imask;

extern im_type_desc im__input_double;
extern im_type_desc im__input_doublevec;
extern im_type_desc im__input_dmask;
extern im_type_desc im__output_double;
extern im_type_desc im__output_doublevec;
extern im_type_desc im__output_dmask;
extern im_type_desc im__output_dmask_screen;

extern im_type_desc im__output_complex;

extern im_type_desc im__input_string;
extern im_type_desc im__output_string;

extern im_type_desc im__input_imagevec;
extern im_type_desc im__input_image;
extern im_type_desc im__output_image;
extern im_type_desc im__rw_image;

extern im_type_desc im__input_display;
extern im_type_desc im__output_display;

extern im_type_desc im__input_gvalue;
extern im_type_desc im__output_gvalue;

extern im_type_desc im__input_interpolate;

/* VIPS print functions.
 */
int im__iprint( im_object obj );		/* int */
int im__ivprint( im_object obj );		/* intvec */
int im__dprint( im_object obj );		/* double */
int im__dvprint( im_object obj );		/* doublevec */
int im__dmsprint( im_object obj );		/* DOUBLEMASK as stats */
int im__cprint( im_object obj );		/* complex */
int im__sprint( im_object obj );		/* string */
int im__displayprint( im_object obj );		/* im_col_display */
int im__gprint( im_object obj );		/* GValue */

/* Macros for convenient creation.
 */
#define IM_INPUT_INT( S ) { S, &im__input_int, NULL }
#define IM_INPUT_INTVEC( S ) { S, &im__input_intvec, NULL }
#define IM_INPUT_IMASK( S ) { S, &im__input_imask, NULL }
#define IM_OUTPUT_INT( S ) { S, &im__output_int, im__iprint }
#define IM_OUTPUT_INTVEC( S ) { S, &im__output_intvec, im__ivprint }
#define IM_OUTPUT_IMASK( S ) { S, &im__output_imask, NULL }

#define IM_INPUT_DOUBLE( S ) { S, &im__input_double, NULL }
#define IM_INPUT_DOUBLEVEC( S ) { S, &im__input_doublevec, NULL }
#define IM_INPUT_DMASK( S ) { S, &im__input_dmask, NULL }
#define IM_OUTPUT_DOUBLE( S ) { S, &im__output_double, im__dprint }
#define IM_OUTPUT_DOUBLEVEC( S ) { S, &im__output_doublevec, im__dvprint }
#define IM_OUTPUT_DMASK( S ) { S, &im__output_dmask, NULL }
#define IM_OUTPUT_DMASK_STATS( S ) { S, &im__output_dmask_screen, im__dmsprint }

#define IM_OUTPUT_COMPLEX( S ) { S, &im__output_complex, im__cprint }

#define IM_INPUT_STRING( S ) { S, &im__input_string, NULL }
#define IM_OUTPUT_STRING( S ) { S, &im__output_string, im__sprint }

#define IM_INPUT_IMAGE( S ) { S, &im__input_image, NULL }
#define IM_INPUT_IMAGEVEC( S ) { S, &im__input_imagevec, NULL }
#define IM_OUTPUT_IMAGE( S ) { S, &im__output_image, NULL }
#define IM_RW_IMAGE( S ) { S, &im__rw_image, NULL }

#define IM_INPUT_DISPLAY( S ) { S, &im__input_display, NULL }
#define IM_OUTPUT_DISPLAY( S ) { S, &im__output_display, im__displayprint }

#define IM_INPUT_GVALUE( S ) { S, &im__input_gvalue, NULL }
#define IM_OUTPUT_GVALUE( S ) { S, &im__output_gvalue, im__gprint }

#define IM_INPUT_INTERPOLATE( S ) { S, &im__input_interpolate, NULL }

/* Add a plug-in package.
 */
im_package *im_load_plugin( const char *name );
int im_load_plugins( const char *fmt, ... )
	__attribute__((format(printf, 1, 2)));

/* Close all plug-ins.
 */
int im_close_plugins( void );

/* Loop over all loaded packages.
 */
void *im_map_packages( VipsSListMap2Fn fn, void *a );

/* Convenience functions for finding packages, functions, etc.
 */
im_function *im_find_function( const char *name );
im_package *im_find_package( const char *name );
im_package *im_package_of_function( const char *name );

/* Allocate space for, and free im_object argument lists.
 */
int im_free_vargv( im_function *fn, im_object *vargv );
int im_allocate_vargv( im_function *fn, im_object *vargv );

/* Run a VIPS command by name.
 */
int im_run_command( char *name, int argc, char **argv );

int vips__input_interpolate_init( im_object *obj, char *str );

#ifdef __cplusplus
}
#endif /*__cplusplus*/

#endif /*IM_DISPATCH_H*/


<|start_filename|>node_modules/cache-manager/Makefile<|end_filename|>
BASE = .

NYC = ./node_modules/.bin/nyc
COVERAGE_OPTS = --lines 99 --statements 95 --branches 90 --functions 95

main: lint test docs

cover:
	$(NYC) test/run.js

check-coverage:
	$(NYC) check-coverage $(COVERAGE_OPTS)

test: cover check-coverage


test-cov: cover check-coverage
	open coverage/lcov-report/index.html

test-travis: lint
	./node_modules/.bin/nyc test/run.js --report lcovonly \
	  -- -T unit,functional -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
lint:
	./node_modules/.bin/eslint ./lib && \
	./node_modules/.bin/eslint ./test && \
	./node_modules/.bin/eslint ./examples

docs:
	./node_modules/.bin/jsdoc lib --recurse --readme README.md --package package.json
	echo docs available in ./out/index.html

.PHONY: test


<|start_filename|>node_modules/graphql/validation/rules/VariablesAreInputTypes.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.nonInputTypeOnVarMessage = nonInputTypeOnVarMessage;
exports.VariablesAreInputTypes = VariablesAreInputTypes;

var _GraphQLError = require("../../error/GraphQLError");

var _printer = require("../../language/printer");

var _definition = require("../../type/definition");

var _typeFromAST = require("../../utilities/typeFromAST");

function nonInputTypeOnVarMessage(variableName, typeName) {
  return "Variable \"$".concat(variableName, "\" cannot be non-input type \"").concat(typeName, "\".");
}
/**
 * Variables are input types
 *
 * A GraphQL operation is only valid if all the variables it defines are of
 * input types (scalar, enum, or input object).
 */


function VariablesAreInputTypes(context) {
  return {
    VariableDefinition: function VariableDefinition(node) {
      var type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.type); // If the variable type is not an input type, return an error.

      if (type && !(0, _definition.isInputType)(type)) {
        var variableName = node.variable.name.value;
        context.reportError(new _GraphQLError.GraphQLError(nonInputTypeOnVarMessage(variableName, (0, _printer.print)(node.type)), node.type));
      }
    }
  };
}


<|start_filename|>node_modules/sharp/vendor/include/vips/private.h<|end_filename|>
/* Declarations which are public-facing, but private. See internal.h for
 * declarations which are only used internally by vips and which are not
 * externally visible.
 *
 * 6/7/09
 * 	- from vips.h
 */

/*

    This file is part of VIPS.
    
    VIPS is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301  USA

 */

/*

    These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk

 */

#ifndef VIPS_PRIVATE_H
#define VIPS_PRIVATE_H

#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/

#define VIPS_SPARE (8)

/* Private to iofuncs: the minimum number of scanlines we add above and below 
 * the window as a margin for slop.
 */
#define VIPS__WINDOW_MARGIN_PIXELS (128)

/* Private to iofuncs: add at least this many bytes above and below the window. 
 * There's no point mapping just a few KB of a small image.
 */
#define VIPS__WINDOW_MARGIN_BYTES (1024 * 1024 * 10)

/* sizeof() a VIPS header on disc.
 */
#define VIPS_SIZEOF_HEADER (64)

/* What we track for each mmap window. Have a list of these on an openin
 * VipsImage.
 */
typedef struct {
	int ref_count;		/* # of regions referencing us */
	struct _VipsImage *im;	/* VipsImage we are attached to */

	int top; 		/* Area of image we have mapped, in pixels */
	int height;
	VipsPel *data;		/* First pixel of line 'top' */

	void *baseaddr;		/* Base of window */
	size_t length;		/* Size of window */
} VipsWindow;

int vips_window_unref( VipsWindow *window );
void vips_window_print( VipsWindow *window );

/* Per-thread buffer state. Held in a GPrivate.
 */
typedef struct {
	GHashTable *hash;	/* VipsImage -> VipsBufferCache* */
	GThread *thread;	/* Just for sanity checking */
} VipsBufferThread;

/* Per-image buffer cache. This keeps a list of "done" VipsBuffer that this
 * worker has generated. We use this to reuse results within a thread. 
 *
 * Hash to this from VipsBufferThread::hash.
 * We can't store the GSList directly in the hash table as GHashTable lacks an
 * update operation and we'd need to _remove() and _insert() on every list
 * operation.
 */
typedef struct _VipsBufferCache {
	GSList *buffers;	/* GSList of "done" VipsBuffer* */
	GThread *thread;	/* Just for sanity checking */
	struct _VipsImage *im;
	VipsBufferThread *buffer_thread;
	GSList *reserve;	/* VipsBuffer kept in reserve */
	int n_reserve;		/* Number in reserve */
} VipsBufferCache;

/* What we track for each pixel buffer. These can move between caches and
 * between threads, but not between images. 
 *
 * Moving between threads is difficult, use region ownership stuff. 
 */
typedef struct _VipsBuffer {
	int ref_count;		/* # of regions referencing us */
	struct _VipsImage *im;	/* VipsImage we are attached to */

	VipsRect area;		/* Area this pixel buffer covers */
	gboolean done;		/* Calculated and in a cache */
	VipsBufferCache *cache;	/* The cache this buffer is published on */
	VipsPel *buf;		/* Private malloc() area */
	size_t bsize;		/* Size of private malloc() */
} VipsBuffer;

void vips_buffer_dump_all( void );
void vips_buffer_done( VipsBuffer *buffer );
void vips_buffer_undone( VipsBuffer *buffer );
void vips_buffer_unref( VipsBuffer *buffer );
VipsBuffer *vips_buffer_new( struct _VipsImage *im, VipsRect *area );
VipsBuffer *vips_buffer_ref( struct _VipsImage *im, VipsRect *area );
VipsBuffer *vips_buffer_unref_ref( VipsBuffer *buffer, 
	struct _VipsImage *im, VipsRect *area );
void vips_buffer_print( VipsBuffer *buffer );

void vips__render_shutdown( void );

/* Sections of region.h that are private to VIPS.
 */

/* Region types.
 */
typedef enum _RegionType {
	VIPS_REGION_NONE,
	VIPS_REGION_BUFFER,		/* A VipsBuffer */
	VIPS_REGION_OTHER_REGION, 	/* Memory on another region */
	VIPS_REGION_OTHER_IMAGE,	/* Memory on another image */
	VIPS_REGION_WINDOW		/* A VipsWindow on fd */
} RegionType;

/* Private to iofuncs: the size of the `tiles' requested by 
 * vips_image_generate() when acting as a data sink.
 */
#define VIPS__TILE_WIDTH (128)
#define VIPS__TILE_HEIGHT (128)

/* The height of the strips for the other two request styles.
 */
#define VIPS__THINSTRIP_HEIGHT (1)
#define VIPS__FATSTRIP_HEIGHT (16)

/* Functions on regions.
 */
struct _VipsRegion;
void vips__region_take_ownership( struct _VipsRegion *reg );
void vips__region_check_ownership( struct _VipsRegion *reg );
void vips__region_no_ownership( struct _VipsRegion *reg );

typedef int (*VipsRegionFillFn)( struct _VipsRegion *, void * );
int vips_region_fill( struct _VipsRegion *reg, 
	const VipsRect *r, VipsRegionFillFn fn, void *a );

int vips__image_wio_output( struct _VipsImage *image );
int vips__image_pio_output( struct _VipsImage *image );

VipsArgumentInstance *vips__argument_get_instance( 
	VipsArgumentClass *argument_class,
	VipsObject *object);
VipsArgument *vips__argument_table_lookup( VipsArgumentTable *table, 
	GParamSpec *pspec);

void vips__demand_hint_array( struct _VipsImage *image, 
	int hint, struct _VipsImage **in );
int vips__image_copy_fields_array( struct _VipsImage *out, 
	struct _VipsImage *in[] );

void vips__region_count_pixels( struct _VipsRegion *region, const char *nickname );
void vips_region_dump_all( void );

/* Deprecated.
 */
int vips__init( const char *argv0 );
size_t vips__get_sizeof_vipsobject( void );
int vips_region_prepare_many( struct _VipsRegion **reg, const VipsRect *r );

/* Handy for debugging.
 */
int vips__view_image( struct _VipsImage *image );

/* Pre 8.7 libvipses used this for allocating argument ids.
 */
extern int _vips__argument_id;

#ifdef __cplusplus
}
#endif /*__cplusplus*/

#endif /*VIPS_PRIVATE_H*/


<|start_filename|>node_modules/sharp/vendor/include/libcroco/cr-string.h<|end_filename|>
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */

/*
 * This file is part of The Croco Library
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 * 
 * See COPYRIGHTS file for copyright information.
 */

/**
 *@file
 *Declaration file of the #CRString class.
 */

#ifndef __CR_STRING_H__
#define __CR_STRING_H__

#include <glib.h>
#include "cr-utils.h"
#include "cr-parsing-location.h"

G_BEGIN_DECLS

typedef struct _CRString CRString ;

/**
 *This is a ship implementation of string based on GString.
 *Actually, the aim of CRString is to store the parsing location
 *(line,column,byte offset) at which a given string has been parsed
 *in the input CSS.
 *So this class has a gstring field of type GString that users can
 *freely manipulate, and also a CRParginLocation type where the
 *parsing location is store. If you don't want to deal with parsing
 *location stuffs, then use GString instead. If we were in C++ for example,
 *CRString would just inherit GString and just add accessors to
 *the CRParsingLocation data ... but we are not and we still have
 *to provide the parsing location information.
 */
struct _CRString {
	/**
	 *The GString where all the string
	 *operation happen.
	 */
	GString *stryng ;
	/**
	 *The parsing location storage area.
	 */
	CRParsingLocation location ;
} ;

CRString * cr_string_new (void) ;

CRString  *cr_string_new_from_string (const gchar * a_string) ;
CRString * cr_string_new_from_gstring (GString const *a_string) ;
CRString *cr_string_dup (CRString const *a_this) ;
gchar *cr_string_dup2 (CRString const *a_this) ;
const gchar *cr_string_peek_raw_str (CRString const *a_this) ;
gint cr_string_peek_raw_str_len (CRString const *a_this) ;
void cr_string_destroy (CRString *a_this) ;

G_END_DECLS

#endif 


<|start_filename|>node_modules/is-valid-path/test.js<|end_filename|>
/*!
 * is-valid-path <https://github.com/jonschlinkert/is-valid-path>
 *
 * Copyright (c) 2014-2015, <NAME>.
 * Licensed under the MIT License.
 */

'use strict';

/* deps: mocha */
require('should');
var isValid = require('./');

describe('isValid', function () {
  it('should return `true` if the path is valid:', function () {
    isValid('.').should.be.true;
    isValid('aa').should.be.true;
    isValid('abc.js').should.be.true;
    isValid('abc/def/ghi.js').should.be.true;
  });

  it('should return `false` if it is a glob pattern:', function () {
    isValid('*.js').should.be.false;
    isValid('!*.js').should.be.false;
    isValid('!foo').should.be.false;
    isValid('!foo.js').should.be.false;
    isValid('**/abc.js').should.be.false;
    isValid('abc/*.js').should.be.false;
  });

  it('should return `false` if the path has brace characters:', function () {
    isValid('abc/{a,b}.js').should.be.false;
    isValid('abc/{a..z}.js').should.be.false;
    isValid('abc/{a..z..2}.js').should.be.false;
  });

  it('should return `false` if it has an extglob:', function () {
    isValid('abc/@(a).js').should.be.false;
    isValid('abc/!(a).js').should.be.false;
    isValid('abc/+(a).js').should.be.false;
    isValid('abc/*(a).js').should.be.false;
    isValid('abc/?(a).js').should.be.false;
  });

  it('should return `false` if it has extglob characters:', function () {
    isValid('abc/@.js').should.be.false;
    isValid('abc/!.js').should.be.false;
    isValid('abc/+.js').should.be.false;
    isValid('abc/*.js').should.be.false;
    isValid('abc/?.js').should.be.false;
  });

  it('should return `false` if the path has regex characters:', function () {
    isValid('abc/(aaa|bbb).js').should.be.false;
    isValid('abc/?.js').should.be.false;
    isValid('?.js').should.be.false;
    isValid('[abc].js').should.be.false;
    isValid('[^abc].js').should.be.false;
    isValid('a/b/c/[a-z].js').should.be.false;
    isValid('[a-j]*[^c]b/c').should.be.false;
  });

  it('should return `false` if it is not a string:', function () {
    isValid().should.be.false;
    isValid({}).should.be.false;
    isValid(null).should.be.false;
    isValid(['**/*.js']).should.be.false;
    isValid(['foo.js']).should.be.false;
  });
});



<|start_filename|>node_modules/yurnalist/examples/step.js<|end_filename|>
/* @noflow */
const report = require('../dist');
const emoji = require('node-emoji');

report.step(1, 3, 'One');
report.step(2, 3, 'Two');
report.step(3, 3, 'Three');

report.step(1, 3, 'Go', emoji.get(':boom:'));
report.step(2, 3, 'Run', emoji.get(':runner:'));
report.step(3, 3, 'Finish', emoji.get(':checkered_flag:'));


<|start_filename|>node_modules/better-queue/test/store.js<|end_filename|>
var assert = require('assert');
var Queue = require('../lib/queue');

describe('Store Usage', function() {

  it('should retry connect', function (done) {
    var tries = 0;
    var s = {
      connect: function (cb) {
        tries++;
        if (tries < 3) {
          return cb('failed');
        }
        done();
      },
      getTask: function (taskId, cb) { cb() },
      putTask: function (taskId, task, priority, cb) { cb() },
      takeFirstN: function (n, cb) { cb() },
      takeLastN: function (n, cb) { cb() }
    }
    var q = new Queue(function (batch, cb) { cb() }, {
      storeMaxRetries: 5,
      storeRetryTimeout: 1,
      store: s
    })
  })

  it('should fail retry', function (done) {
    var tries = 0;
    var s = {
      connect: function (cb) {
        tries++;
        cb('failed');
      },
      getTask: function (taskId, cb) { cb() },
      putTask: function (taskId, task, priority, cb) { cb() },
      takeFirstN: function (n, cb) { cb() },
      takeLastN: function (n, cb) { cb() }
    }
    var q = new Queue(function (batch, cb) { cb() }, {
      storeMaxRetries: 2,
      storeRetryTimeout: 1,
      store: s
    })
      .on('error', function (e) {
        assert.ok(e);
        done();
      })
  })

  it('should queue length', function (done) {
    var queued = false;
    var s = {
      connect: function (cb) { cb(null, 5) },
      getTask: function (taskId, cb) { cb() },
      putTask: function (taskId, task, priority, cb) { cb() },
      getLock: function (lockId, cb) { cb(null, { 'task-id': queued ? 2 : 1 }) },
      getRunningTasks: function (cb) { cb(null, {}) },
      takeFirstN: function (n, cb) { cb(null, 'lock-id') },
      takeLastN: function (n, cb) { cb() },
      releaseLock: function (lockId, cb) { cb(null) },
    }
    var q = new Queue(function (n, cb) {
      if (n === 2) {
        assert.equal(q.length, 5);
        done();
      }
      cb();
    }, { store: s, autoResume: false })
    q.push(1).on('queued', function (e) {
      queued = true;
      assert.equal(q.length, 6);
    })
  })

  it('should fail if there is no length on connect', function (done) {
    var queued = false;
    var s = {
      connect: function (cb) { cb() }
    }
    try {
      var q = new Queue(function (n, cb) {}, { store: s })
    } catch (e) {
      done();
    }
  })

  // TODO: Test progress

})


<|start_filename|>node_modules/archive-type/index.js<|end_filename|>
'use strict';
const fileType = require('file-type');

const exts = new Set([
	'7z',
	'bz2',
	'gz',
	'rar',
	'tar',
	'zip',
	'xz',
	'gz'
]);

module.exports = input => {
	const ret = fileType(input);
	return exts.has(ret && ret.ext) ? ret : null;
};


<|start_filename|>node_modules/opentracing/lib/examples/demo/demo.js<|end_filename|>
"use strict";
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
var index_1 = require("../../index");
console.log('\nRunning demo...\n');
var tracer = new index_1.MockTracer();
console.log('Starting parent.');
var parent = tracer.startSpan('parent_span');
parent.setTag('custom', 'tag value');
parent.setTag('alpha', '1000');
console.log('Waiting to start child...');
setTimeout(function () {
    console.log('Starting child span.');
    var child = tracer.startSpan('child_span', { childOf: parent });
    child.setTag('alpha', '200');
    child.setTag('beta', '50');
    child.log({ state: 'waiting' });
    console.log('Waiting...');
    setTimeout(function () {
        console.log('Finishing child and parent.');
        child.log({ state: 'done' });
        child.finish();
        parent.finish();
        // Print some information about the two spans. Note the `report` method
        // is specific to the MockTracer implementation and is not part of the
        // OpenTracing API.
        console.log('\nSpans:');
        var report = tracer.report();
        for (var _i = 0, _a = report.spans; _i < _a.length; _i++) {
            var span = _a[_i];
            var tags = span.tags();
            var tagKeys = Object.keys(tags);
            console.log("    " + span.operationName() + " - " + span.durationMs() + "ms");
            for (var _b = 0, tagKeys_1 = tagKeys; _b < tagKeys_1.length; _b++) {
                var key = tagKeys_1[_b];
                var value = tags[key];
                console.log("        tag '" + key + "':'" + value + "'");
            }
        }
    }, 500);
}, 1000);
//# sourceMappingURL=demo.js.map

<|start_filename|>node_modules/bin-check/index.js<|end_filename|>
'use strict';
const execa = require('execa');
const executable = require('executable');

module.exports = (bin, args) => {
	if (!Array.isArray(args)) {
		args = ['--help'];
	}

	return executable(bin)
		.then(works => {
			if (!works) {
				throw new Error(`Couldn't execute the \`${bin}\` binary. Make sure it has the right permissions.`);
			}

			return execa(bin, args);
		})
		.then(res => res.code === 0);
};

module.exports.sync = (bin, args) => {
	if (!Array.isArray(args)) {
		args = ['--help'];
	}

	if (!executable.sync(bin)) {
		throw new Error(`Couldn't execute the \`${bin}\` binary. Make sure it has the right permissions.`);
	}

	return execa.sync(bin, args).status === 0;
};


<|start_filename|>node_modules/@mikaelkristiansson/domready/src/ender.js<|end_filename|>
!function ($) {
  var ready = require('domready')
  $.ender({domReady: ready})
  $.ender({
    ready: function (f) {
      ready(f)
      return this
    }
  }, true)
}(ender);

<|start_filename|>node_modules/graphql/utilities/assertValidName.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.assertValidName = assertValidName;
exports.isValidNameError = isValidNameError;

var _devAssert = _interopRequireDefault(require("../jsutils/devAssert"));

var _GraphQLError = require("../error/GraphQLError");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var NAME_RX = /^[_a-zA-Z][_a-zA-Z0-9]*$/;
/**
 * Upholds the spec rules about naming.
 */

function assertValidName(name) {
  var error = isValidNameError(name);

  if (error) {
    throw error;
  }

  return name;
}
/**
 * Returns an Error if a name is invalid.
 */


function isValidNameError(name, node) {
  typeof name === 'string' || (0, _devAssert.default)(0, 'Expected string');

  if (name.length > 1 && name[0] === '_' && name[1] === '_') {
    return new _GraphQLError.GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection."), node);
  }

  if (!NAME_RX.test(name)) {
    return new _GraphQLError.GraphQLError("Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"".concat(name, "\" does not."), node);
  }
}


<|start_filename|>node_modules/sharp/vendor/include/glib-2.0/gio/gtask.h<|end_filename|>
/* GIO - GLib Input, Output and Streaming Library
 *
 * Copyright 2011 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __G_TASK_H__
#define __G_TASK_H__

#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif

#include <gio/giotypes.h>

G_BEGIN_DECLS

#define G_TYPE_TASK         (g_task_get_type ())
#define G_TASK(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_TASK, GTask))
#define G_TASK_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_TASK, GTaskClass))
#define G_IS_TASK(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_TASK))
#define G_IS_TASK_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_TASK))
#define G_TASK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_TASK, GTaskClass))

typedef struct _GTaskClass   GTaskClass;

GLIB_AVAILABLE_IN_2_36
GType         g_task_get_type              (void) G_GNUC_CONST;

GLIB_AVAILABLE_IN_2_36
GTask        *g_task_new                   (gpointer             source_object,
                                            GCancellable        *cancellable,
                                            GAsyncReadyCallback  callback,
                                            gpointer             callback_data);

GLIB_AVAILABLE_IN_2_36
void          g_task_report_error          (gpointer             source_object,
                                            GAsyncReadyCallback  callback,
                                            gpointer             callback_data,
                                            gpointer             source_tag,
                                            GError              *error);
GLIB_AVAILABLE_IN_2_36
void          g_task_report_new_error      (gpointer             source_object,
                                            GAsyncReadyCallback  callback,
                                            gpointer             callback_data,
                                            gpointer             source_tag,
                                            GQuark               domain,
                                            gint                 code,
                                            const char          *format,
                                            ...) G_GNUC_PRINTF(7, 8);

GLIB_AVAILABLE_IN_2_36
void          g_task_set_task_data         (GTask               *task,
                                            gpointer             task_data,
                                            GDestroyNotify       task_data_destroy);
GLIB_AVAILABLE_IN_2_36
void          g_task_set_priority          (GTask               *task,
                                            gint                 priority);
GLIB_AVAILABLE_IN_2_36
void          g_task_set_check_cancellable (GTask               *task,
                                            gboolean             check_cancellable);
GLIB_AVAILABLE_IN_2_36
void          g_task_set_source_tag        (GTask               *task,
                                            gpointer             source_tag);
GLIB_AVAILABLE_IN_2_60
void          g_task_set_name              (GTask               *task,
                                            const gchar         *name);

GLIB_AVAILABLE_IN_2_36
gpointer      g_task_get_source_object     (GTask               *task);
GLIB_AVAILABLE_IN_2_36
gpointer      g_task_get_task_data         (GTask               *task);
GLIB_AVAILABLE_IN_2_36
gint          g_task_get_priority          (GTask               *task);
GLIB_AVAILABLE_IN_2_36
GMainContext *g_task_get_context           (GTask               *task);
GLIB_AVAILABLE_IN_2_36
GCancellable *g_task_get_cancellable       (GTask               *task);
GLIB_AVAILABLE_IN_2_36
gboolean      g_task_get_check_cancellable (GTask               *task);
GLIB_AVAILABLE_IN_2_36
gpointer      g_task_get_source_tag        (GTask               *task);
GLIB_AVAILABLE_IN_2_60
const gchar  *g_task_get_name              (GTask               *task);

GLIB_AVAILABLE_IN_2_36
gboolean      g_task_is_valid              (gpointer             result,
                                            gpointer             source_object);


typedef void (*GTaskThreadFunc)           (GTask           *task,
                                           gpointer         source_object,
                                           gpointer         task_data,
                                           GCancellable    *cancellable);
GLIB_AVAILABLE_IN_2_36
void          g_task_run_in_thread        (GTask           *task,
                                           GTaskThreadFunc  task_func);
GLIB_AVAILABLE_IN_2_36
void          g_task_run_in_thread_sync   (GTask           *task,
                                           GTaskThreadFunc  task_func);
GLIB_AVAILABLE_IN_2_36
gboolean      g_task_set_return_on_cancel (GTask           *task,
                                           gboolean         return_on_cancel);
GLIB_AVAILABLE_IN_2_36
gboolean      g_task_get_return_on_cancel (GTask           *task);

GLIB_AVAILABLE_IN_2_36
void          g_task_attach_source        (GTask           *task,
                                           GSource         *source,
                                           GSourceFunc      callback);


GLIB_AVAILABLE_IN_2_36
void          g_task_return_pointer            (GTask           *task,
                                                gpointer         result,
                                                GDestroyNotify   result_destroy);
GLIB_AVAILABLE_IN_2_36
void          g_task_return_boolean            (GTask           *task,
                                                gboolean         result);
GLIB_AVAILABLE_IN_2_36
void          g_task_return_int                (GTask           *task,
                                                gssize           result);

GLIB_AVAILABLE_IN_2_36
void          g_task_return_error              (GTask           *task,
                                                GError          *error);
GLIB_AVAILABLE_IN_2_36
void          g_task_return_new_error          (GTask           *task,
                                                GQuark           domain,
                                                gint             code,
                                                const char      *format,
                                                ...) G_GNUC_PRINTF (4, 5);

GLIB_AVAILABLE_IN_2_36
gboolean      g_task_return_error_if_cancelled (GTask           *task);

GLIB_AVAILABLE_IN_2_36
gpointer      g_task_propagate_pointer         (GTask           *task,
                                                GError         **error);
GLIB_AVAILABLE_IN_2_36
gboolean      g_task_propagate_boolean         (GTask           *task,
                                                GError         **error);
GLIB_AVAILABLE_IN_2_36
gssize        g_task_propagate_int             (GTask           *task,
                                                GError         **error);
GLIB_AVAILABLE_IN_2_36
gboolean      g_task_had_error                 (GTask           *task);
GLIB_AVAILABLE_IN_2_44
gboolean      g_task_get_completed             (GTask           *task);

G_END_DECLS

#endif /* __G_TASK_H__ */


<|start_filename|>node_modules/graphql-config/lib/__tests__/basic/getGraphQLConfig.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ava_1 = require("ava");
var path_1 = require("path");
var graphql_1 = require("graphql");
var _1 = require("../../");
var CONFIG_DIR = path_1.join(__dirname, 'config');
var config;
ava_1.default.beforeEach(function () {
    config = _1.getGraphQLConfig(CONFIG_DIR);
});
ava_1.default('returns a correct name', function (t) {
    var testWithSchemaConfig = config.getProjectConfig('testWithSchema');
    t.deepEqual(testWithSchemaConfig.projectName, 'testWithSchema');
});
ava_1.default('returns config for file', function (t) {
    var testWithSchemaConfig = config.getConfigForFile(path_1.resolve('./config/schema-a.graphql'));
    if (testWithSchemaConfig) {
        t.deepEqual(testWithSchemaConfig.projectName, 'testWithSchema');
    }
    else {
        t.fail();
    }
});
ava_1.default('returns a correct root dir', function (t) {
    t.deepEqual(config.configDir, CONFIG_DIR);
});
ava_1.default('returns a correct schema path', function (t) {
    t.deepEqual(config.getProjectConfig('testWithSchema').schemaPath, path_1.join(CONFIG_DIR, '__schema__/StarWarsSchema.graphql'));
    t.deepEqual(config.getProjectConfig('testWithoutSchema').schemaPath, null);
});
ava_1.default('reads single schema', function (t) {
    var typeDefs = "type Query {\n  hello: String!\n}\n";
    t.is(graphql_1.printSchema(config.getProjectConfig('testSchemaA').getSchema()), typeDefs);
});
ava_1.default('reads imported schema', function (t) {
    var typeDefs = "type Query {\n  hello: String!\n  user: User!\n}\n\ntype User {\n  name: String\n}\n";
    t.is(graphql_1.printSchema(config.getProjectConfig('testSchemaB').getSchema()), typeDefs);
});


<|start_filename|>node_modules/graphql/polyfills/isFinite.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

/* eslint-disable no-redeclare */
// $FlowFixMe workaround for: https://github.com/facebook/flow/issues/4441
var isFinitePolyfill = Number.isFinite || function (value) {
  return typeof value === 'number' && isFinite(value);
};

var _default = isFinitePolyfill;
exports.default = _default;


<|start_filename|>node_modules/sharp/vendor/include/cairo-version.h<|end_filename|>
#ifndef CAIRO_VERSION_H
#define CAIRO_VERSION_H

#define CAIRO_VERSION_MAJOR 1
#define CAIRO_VERSION_MINOR 16
#define CAIRO_VERSION_MICRO 0

#endif


<|start_filename|>node_modules/load-bmfont/index.js<|end_filename|>
var fs = require('fs')
var url = require('url')
var path = require('path')
var request = require('phin')
var parseASCII = require('parse-bmfont-ascii')
var parseXML = require('parse-bmfont-xml')
var readBinary = require('parse-bmfont-binary')
var mime = require('mime')
var noop = function() {}
var isBinary = require('./lib/is-binary')

function parseFont(file, data, cb) {
  var result, binary

  if (isBinary(data)) {
    if (typeof data === 'string') data = new Buffer(data, 'binary')
    binary = true
  } else data = data.toString().trim()

  try {
    if (binary) result = readBinary(data)
    else if (/json/.test(mime.lookup(file)) || data.charAt(0) === '{')
      result = JSON.parse(data)
    else if (/xml/.test(mime.lookup(file)) || data.charAt(0) === '<')
      result = parseXML(data)
    else result = parseASCII(data)
  } catch (e) {
    cb(e)
    cb = noop
  }

  cb(null, result)
}

module.exports = function loadFont(opt, cb) {
  cb = typeof cb === 'function' ? cb : noop

  if (typeof opt === 'string') opt = { uri: opt, url: opt }
  else if (!opt) opt = {}

  var file = opt.uri || opt.url
  
  function handleData(err, data) {
    if (err) return cb(err)
    parseFont(file, data.body || data, cb)
  }

  if (url.parse(file).host) {
    request(opt, handleData)
  } else {
    fs.readFile(file, opt, handleData)
  }
}


<|start_filename|>node_modules/sharp/vendor/include/libexif/exif-format.h<|end_filename|>
/*! \file exif-format.h
 *  \brief Handling native EXIF data types
 */
/*
 *
 * Copyright (c) 2001 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA.
 */

#ifndef __EXIF_FORMAT_H__
#define __EXIF_FORMAT_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/*! EXIF tag data formats */
typedef enum {
        EXIF_FORMAT_BYTE       =  1,
        EXIF_FORMAT_ASCII      =  2,
        EXIF_FORMAT_SHORT      =  3,
        EXIF_FORMAT_LONG       =  4,
        EXIF_FORMAT_RATIONAL   =  5,
	EXIF_FORMAT_SBYTE      =  6,
        EXIF_FORMAT_UNDEFINED  =  7,
	EXIF_FORMAT_SSHORT     =  8,
        EXIF_FORMAT_SLONG      =  9,
        EXIF_FORMAT_SRATIONAL  = 10,
	EXIF_FORMAT_FLOAT      = 11,
	EXIF_FORMAT_DOUBLE     = 12
} ExifFormat;

/*! Return a textual representation of the given EXIF data type.
 *
 * \param[in] format EXIF data format
 * \return localized textual name
 */
const char   *exif_format_get_name (ExifFormat format);

/*! Return the raw size of the given EXIF data type.
 *
 * \param[in] format EXIF data format
 * \return size in bytes
 */
unsigned char exif_format_get_size (ExifFormat format);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __EXIF_FORMAT_H__ */


<|start_filename|>node_modules/sharp/vendor/include/cairo-quartz.h<|end_filename|>
/* cairo - a vector graphics library with display and print output
 *
 * Copyright © 2006, 2007 Mozilla Corporation
 *
 * This library is free software; you can redistribute it and/or
 * modify it either under the terms of the GNU Lesser General Public
 * License version 2.1 as published by the Free Software Foundation
 * (the "LGPL") or, at your option, under the terms of the Mozilla
 * Public License Version 1.1 (the "MPL"). If you do not alter this
 * notice, a recipient may use your version of this file under either
 * the MPL or the LGPL.
 *
 * You should have received a copy of the LGPL along with this library
 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
 * You should have received a copy of the MPL along with this library
 * in the file COPYING-MPL-1.1
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
 * the specific language governing rights and limitations.
 *
 * The Original Code is the cairo graphics library.
 *
 * The Initial Developer of the Original Code is Mozilla Foundation.
 *
 * Contributor(s):
 *      <NAME> <<EMAIL>>
 */

#ifndef CAIRO_QUARTZ_H
#define CAIRO_QUARTZ_H

#include "cairo.h"

#if CAIRO_HAS_QUARTZ_SURFACE

#include <ApplicationServices/ApplicationServices.h>

CAIRO_BEGIN_DECLS

cairo_public cairo_surface_t *
cairo_quartz_surface_create (cairo_format_t format,
                             unsigned int width,
                             unsigned int height);

cairo_public cairo_surface_t *
cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext,
                                            unsigned int width,
                                            unsigned int height);

cairo_public CGContextRef
cairo_quartz_surface_get_cg_context (cairo_surface_t *surface);

#if CAIRO_HAS_QUARTZ_FONT

/*
 * Quartz font support
 */

cairo_public cairo_font_face_t *
cairo_quartz_font_face_create_for_cgfont (CGFontRef font);

cairo_public cairo_font_face_t *
cairo_quartz_font_face_create_for_atsu_font_id (ATSUFontID font_id);

#endif /* CAIRO_HAS_QUARTZ_FONT */

CAIRO_END_DECLS

#else

# error Cairo was not compiled with support for the quartz backend

#endif /* CAIRO_HAS_QUARTZ_SURFACE */

#endif /* CAIRO_QUARTZ_H */


<|start_filename|>node_modules/gatsby/cache-dir/commonjs/strip-prefix.js<|end_filename|>
"use strict";

exports.__esModule = true;
exports.default = void 0;

/**
 * Remove a prefix from a string. Return the input string if the given prefix
 * isn't found.
 */
var _default = (str, prefix = ``) => {
  if (!prefix) {
    return str;
  }

  prefix += `/`;

  if (str.substr(0, prefix.length) === prefix) {
    return str.slice(prefix.length - 1);
  }

  return str;
};

exports.default = _default;

<|start_filename|>node_modules/pngquant-bin/cli.js<|end_filename|>
#!/usr/bin/env node
'use strict';
const execa = require('execa');
const m = require('.');

execa(m, process.argv.slice(2), {stdio: 'inherit'});


<|start_filename|>node_modules/sharp/vendor/include/orc/orcparse.h<|end_filename|>

#ifndef __ORC_PARSE_H__
#define __ORC_PARSE_H__

#include <orc/orcutils.h>

ORC_BEGIN_DECLS

int orc_parse (const char *code, OrcProgram ***programs);
int orc_parse_full (const char *code, OrcProgram ***programs, char **log);
const char * orc_parse_get_init_function (OrcProgram *program);

ORC_END_DECLS

#endif



<|start_filename|>node_modules/bin-build/index.js<|end_filename|>
'use strict';
const decompress = require('decompress');
const download = require('download');
const execa = require('execa');
const pMapSeries = require('p-map-series');
const tempfile = require('tempfile');

const exec = (cmd, cwd) => pMapSeries(cmd, x => execa.shell(x, {cwd}));

exports.directory = (dir, cmd) => {
	if (typeof dir !== 'string') {
		return Promise.reject(new TypeError(`Expected a \`string\`, got \`${typeof dir}\``));
	}

	return exec(cmd, dir);
};

exports.file = (file, cmd, opts) => {
	opts = Object.assign({strip: 1}, opts);

	if (typeof file !== 'string') {
		return Promise.reject(new TypeError(`Expected a \`string\`, got \`${typeof file}\``));
	}

	const tmp = tempfile();

	return decompress(file, tmp, opts).then(() => exec(cmd, tmp));
};

exports.url = (url, cmd, opts) => {
	opts = Object.assign({
		extract: true,
		strip: 1
	}, opts);

	if (typeof url !== 'string') {
		return Promise.reject(new TypeError(`Expected a \`string\`, got \`${typeof url}\``));
	}

	const tmp = tempfile();

	return download(url, tmp, opts).then(() => exec(cmd, tmp));
};


<|start_filename|>node_modules/better-queue/test/fixtures/SqliteAdapter.js<|end_filename|>
var fs            = require('fs-extra');
var uuid          = require('uuid');
var SqliteAdapter = require('../../lib/stores/SqliteAdapter');

function MockSqliteAdapter(opts) {
  opts.verbose = false;
  opts.path = opts.path || uuid.v4() + '.sqlite';
  SqliteAdapter.call(this, opts);
}

MockSqliteAdapter.prototype = Object.create(SqliteAdapter.prototype);

MockSqliteAdapter.prototype.close = function (cb) {
  var after = function () {
    SqliteAdapter.prototype.close.call(this, cb)
  }
  if (this.path === ':memory:') return after();
  fs.unlink(this.path, function (err) {
    after();
  });
}

module.exports = MockSqliteAdapter;


<|start_filename|>node_modules/sharp/vendor/include/gsf/gsf-utils.h<|end_filename|>
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * gsf-utils.h:
 *
 * Copyright (C) 2002-2006 <NAME> (<EMAIL>)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

#ifndef GSF_UTILS_H
#define GSF_UTILS_H

#include <gsf/gsf-fwd.h>

G_BEGIN_DECLS

/* Do this the ugly way so that we don't have to worry about alignment */

/**
 * GSF_LE_GET_GUINT8:
 * @p: pointer to storage
 *
 * Interpret binary data as an unsigned 8-bit integer in little endian order.
 *
 * Returns: interpreted data
 */
#define GSF_LE_GET_GUINT8(p) (*(guint8 const *)(p))

/**
 * GSF_LE_GET_GUINT16:
 * @p: pointer to storage
 *
 * Interpret binary data as an unsigned 16-bit integer in little endian order.
 *
 * Returns: interpreted data
 */
#define GSF_LE_GET_GUINT16(p)				\
	(guint16)((((guint8 const *)(p))[0] << 0)  |	\
		  (((guint8 const *)(p))[1] << 8))

/**
 * GSF_LE_GET_GUINT32:
 * @p: pointer to storage
 *
 * Interpret binary data as an unsigned 32-bit integer in little endian order.
 *
 * Returns: interpreted data
 */
#define GSF_LE_GET_GUINT32(p)					\
	(guint32)(((guint32)((guint8 const *)(p))[0] << 0)  |	\
		  ((guint32)((guint8 const *)(p))[1] << 8)  |	\
		  ((guint32)((guint8 const *)(p))[2] << 16) |	\
		  ((guint32)((guint8 const *)(p))[3] << 24))

/**
 * GSF_LE_GET_GUINT64:
 * @p: pointer to storage
 *
 * Interpret binary data as an unsigned 64-bit integer in little endian order.
 *
 * Returns: interpreted data
 */
#define GSF_LE_GET_GUINT64(p) (gsf_le_get_guint64 (p))

/**
 * GSF_LE_GET_GINT8:
 * @p: pointer to storage
 *
 * Interpret binary data as a signed 8-bit integer in little endian order.
 *
 * Returns: interpreted data
 */
#define GSF_LE_GET_GINT8(p) ((gint8)GSF_LE_GET_GUINT8(p))

/**
 * GSF_LE_GET_GINT16:
 * @p: pointer to storage
 *
 * Interpret binary data as a signed 16-bit integer in little endian order.
 *
 * Returns: interpreted data
 */
#define GSF_LE_GET_GINT16(p) ((gint16)GSF_LE_GET_GUINT16(p))

/**
 * GSF_LE_GET_GINT32:
 * @p: pointer to storage
 *
 * Interpret binary data as a signed 32-bit integer in little endian order.
 *
 * Returns: interpreted data
 */
#define GSF_LE_GET_GINT32(p) ((gint32)GSF_LE_GET_GUINT32(p))

/**
 * GSF_LE_GET_GINT64:
 * @p: pointer to storage
 *
 * Interpret binary data as a signed 64-bit integer in little endian order.
 *
 * Returns: interpreted data
 */
#define GSF_LE_GET_GINT64(p) ((gint64)GSF_LE_GET_GUINT64(p))

/**
 * GSF_LE_GET_FLOAT:
 * @p: pointer to storage
 *
 * Interpret binary data as a float in little endian order.
 *
 * Returns: interpreted data
 */
#define GSF_LE_GET_FLOAT(p) (gsf_le_get_float (p))

/**
 * GSF_LE_GET_DOUBLE:
 * @p: pointer to storage
 *
 * Interpret binary data as a double in little endian order.
 *
 * Returns: interpreted data
 */
#define GSF_LE_GET_DOUBLE(p) (gsf_le_get_double (p))

guint64 gsf_le_get_guint64 (void const *p);
float   gsf_le_get_float   (void const *p);
double  gsf_le_get_double  (void const *p);

/**
 * GSF_LE_SET_GUINT8:
 * @p: pointer to storage
 * @dat: 8-bit unsigned integer
 *
 * Store @dat in little endian order in memory pointed to by @p.
 */
#define GSF_LE_SET_GUINT8(p, dat)			\
	(*((guint8 *)(p))      = ((dat)        & 0xff))

/**
 * GSF_LE_SET_GUINT16:
 * @p: pointer to storage
 * @dat: 16-bit unsigned integer
 *
 * Store @dat in little endian order in memory pointed to by @p.
 */
#define GSF_LE_SET_GUINT16(p, dat)					\
	((*((guint8 *)(p) + 0) = (guint8)((guint16)(dat))       & 0xff), \
	 (*((guint8 *)(p) + 1) = (guint8)((guint16)(dat) >>  8) & 0xff))

/**
 * GSF_LE_SET_GUINT32:
 * @p: pointer to storage
 * @dat: 32-bit unsigned integer
 *
 * Store @dat in little endian order in memory pointed to by @p.
 */
#define GSF_LE_SET_GUINT32(p, dat)					\
	((*((guint8 *)(p) + 0) = (guint8)((guint32)(dat))       & 0xff), \
	 (*((guint8 *)(p) + 1) = (guint8)((guint32)(dat) >>  8) & 0xff), \
	 (*((guint8 *)(p) + 2) = (guint8)((guint32)(dat) >> 16) & 0xff), \
	 (*((guint8 *)(p) + 3) = (guint8)((guint32)(dat) >> 24) & 0xff))

/**
 * GSF_LE_SET_GUINT64:
 * @p: pointer to storage
 * @dat: 64-bit unsigned integer
 *
 * Store @dat in little endian order in memory pointed to by @p.
 */
#define GSF_LE_SET_GUINT64(p, dat)			\
	((*((guint8 *)(p) + 0) = (guint8)((guint64)(dat))       & 0xff), \
	 (*((guint8 *)(p) + 1) = (guint8)((guint64)(dat) >>  8) & 0xff), \
	 (*((guint8 *)(p) + 2) = (guint8)((guint64)(dat) >> 16) & 0xff), \
	 (*((guint8 *)(p) + 3) = (guint8)((guint64)(dat) >> 24) & 0xff), \
	 (*((guint8 *)(p) + 4) = (guint8)((guint64)(dat) >> 32) & 0xff), \
	 (*((guint8 *)(p) + 5) = (guint8)((guint64)(dat) >> 40) & 0xff), \
	 (*((guint8 *)(p) + 6) = (guint8)((guint64)(dat) >> 48) & 0xff), \
	 (*((guint8 *)(p) + 7) = (guint8)((guint64)(dat) >> 56) & 0xff))

/**
 * GSF_LE_SET_GINT8:
 * @p: pointer to storage
 * @dat: 8-bit signed integer
 *
 * Store @dat in little endian order in memory pointed to by @p.
 */
#define GSF_LE_SET_GINT8(p,dat) GSF_LE_SET_GUINT8((p),(dat))

/**
 * GSF_LE_SET_GINT16:
 * @p: pointer to storage
 * @dat: 16-bit signed integer
 *
 * Store @dat in little endian order in memory pointed to by @p.
 */
#define GSF_LE_SET_GINT16(p,dat) GSF_LE_SET_GUINT16((p),(dat))

/**
 * GSF_LE_SET_GINT32:
 * @p: pointer to storage
 * @dat: 32-bit signed integer
 *
 * Store @dat in little endian order in memory pointed to by @p.
 */
#define GSF_LE_SET_GINT32(p,dat) GSF_LE_SET_GUINT32((p),(dat))

/**
 * GSF_LE_SET_GINT64:
 * @p: pointer to storage
 * @dat: 64-bit signed integer
 *
 * Store @dat in little endian order in memory pointed to by @p.
 */
#define GSF_LE_SET_GINT64(p,dat) GSF_LE_SET_GUINT64((p),(dat))

/**
 * GSF_LE_SET_FLOAT:
 * @p: pointer to storage
 * @dat: float to be stored
 *
 * Store @dat in little endian order in memory pointed to by @p.
 */
#define GSF_LE_SET_FLOAT(p,dat) gsf_le_set_float((p),(dat))

/**
 * GSF_LE_SET_DOUBLE:
 * @p: pointer to storage
 * @dat: double to be stored
 *
 * Store @dat in little endian order in memory pointed to by @p.
 */
#define GSF_LE_SET_DOUBLE(p,dat) gsf_le_set_double((p),(dat))

void gsf_le_set_float  (void *p, float f);
void gsf_le_set_double (void *p, double d);

void gsf_init (void);
void gsf_shutdown (void);
void gsf_init_dynamic	  (GTypeModule *module);
void gsf_shutdown_dynamic (GTypeModule *module);
gboolean gsf_debug_flag (const char *flag);

/* Debugging utilities */
void gsf_mem_dump   (guint8 const *ptr, size_t len);
void gsf_input_dump (GsfInput *input, gboolean dump_as_hex);

/* base64 encoding utilities */
guint8 *gsf_base64_encode_simple (guint8 const *data, size_t len);
size_t  gsf_base64_encode_close  (guint8 const *in, size_t inlen,
				  gboolean break_lines, guint8 *out,
				  int *state, guint *save);
size_t  gsf_base64_encode_step   (guint8 const *in, size_t len,
				  gboolean break_lines, guint8 *out,
				  int *state, guint *save);

size_t  gsf_base64_decode_simple (guint8 *data, size_t len);
size_t  gsf_base64_decode_step   (guint8 const *in, size_t len,
				  guint8 *out, int *state, guint *save);


/* For putting filenames into error messages.  */
char *gsf_filename_to_utf8 (char const *filename, gboolean quoted);

/* Some version checking */

/**
 * libgsf_major_version:
 *
 * Major version number of libgsf, indicating the ABI version.
 */
extern int libgsf_major_version;

/**
 * libgsf_minor_version:
 *
 * Minor (secondary) version number of libgsf, indicating the API version.
 */
extern int libgsf_minor_version;

/**
 * libgsf_micro_version:
 *
 * Micro (tertiary) version number of libgsf, indicating bug fixes.
 */
extern int libgsf_micro_version;

char const *gsf_extension_pointer (char const * path);
void	    gsf_iconv_close (GIConv handle);

void        gsf_property_settings_collect_valist (GType object_type,
						  GParameter **p_params,
						  size_t *p_n_params,
						  const gchar *first_property_name,
						  va_list var_args);
void        gsf_property_settings_collect (GType object_type,
					   GParameter **p_params,
					   size_t *p_n_params,
					   const gchar *first_property_name,
					   ...);
const GParameter *gsf_property_settings_find (const char *name,
					      const GParameter *params,
					      size_t n_params);
void        gsf_property_settings_free (GParameter *params,
					size_t n_params);



/* Errors */

#define GSF_ERROR (gsf_error_quark ())

/**
 * GsfError:
 * @GSF_ERROR_OUT_OF_MEMORY: Memory allocation failed
 * @GSF_ERROR_INVALID_DATA: Invalid data encountered (e.g. not enough data)
 */

typedef enum {
	GSF_ERROR_OUT_OF_MEMORY,
	GSF_ERROR_INVALID_DATA
} GsfError;

GQuark gsf_error_quark (void);


G_END_DECLS

#endif /* GSF_UTILS_H */


<|start_filename|>node_modules/graphql-config/lib/__tests__/introspection-query/getSchema.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ava_1 = require("ava");
var graphql_1 = require("graphql");
var _1 = require("../../");
ava_1.default('reads single schema', function (t) {
    var config = _1.getGraphQLConfig(__dirname);
    var typeDefs = "schema {\n  query: RootQueryType\n}\n\ntype Bar {\n  widgets: [Widget]\n}\n\ntype RootQueryType {\n  foo: String\n  bar: Bar\n}\n\ntype Widget {\n  count: Int\n}\n";
    t.is(graphql_1.printSchema(config.getProjectConfig('testSchemaA').getSchema()), typeDefs);
});


<|start_filename|>node_modules/sharp/vendor/include/orc/orcprogram.h<|end_filename|>

#ifndef _ORC_PROGRAM_H_
#define _ORC_PROGRAM_H_

#include <orc/orcutils.h>
#include <orc/orclimits.h>
#include <orc/orcexecutor.h>
#include <orc/orccode.h>
#include <orc/orcbytecode.h>
#include <orc/orccompiler.h>
#include <orc/orctarget.h>
#include <orc/orcrule.h>

ORC_BEGIN_DECLS


#define ORC_PROGRAM_ERROR(program, ...) do { \
  program->error = TRUE; \
  orc_debug_print(ORC_DEBUG_WARNING, __FILE__, ORC_FUNCTION, __LINE__, __VA_ARGS__); \
} while (0)

/**
 * OrcProgram:
 *
 * The OrcProgram structure has no public members
 */
struct _OrcProgram {
  /*< private >*/
  struct {
    OrcStaticOpcode *opcode;
    int dest_args[ORC_STATIC_OPCODE_N_DEST];
    int src_args[ORC_STATIC_OPCODE_N_SRC];

    OrcRule *rule;
  } _unused[ORC_N_INSNS]; /* needed for ABI compatibility */
  int n_insns;

  struct {
    char *name;
    char *type_name;

    int size;
    OrcVarType vartype;

    int used;
    int first_use;
    int last_use;
    int replaced;
    int replacement;

    int alloc;
    int is_chained;
    int is_aligned;
    int is_uncached;

    int value;

    int ptr_register;
    int ptr_offset;
    int mask_alloc;
    int aligned_data;
    int param_type;
    int load_dest;
  } _unused3[ORC_N_VARIABLES]; /* needed for ABI compatibility */

  int n_src_vars;
  int n_dest_vars;
  int n_param_vars;
  int n_const_vars;
  int n_temp_vars;
  int n_accum_vars;

  char *name;
  char *asm_code;

  unsigned char *_unused2;
  /* The offset of code_exec in this structure is part of the ABI */
  void *code_exec;

  OrcInstruction insns[ORC_N_INSNS];
  OrcVariable vars[ORC_N_VARIABLES];

  void *backup_func;
  char *backup_name;
  int is_2d;
  int constant_n;
  int n_multiple;
  int n_minimum;
  int n_maximum;
  int constant_m;

  OrcCode *orccode;

  /* Hide this here.  Belongs in a Parser object */
  char *init_function;
  char *error_msg;
  unsigned int current_line;
};

#define ORC_SRC_ARG(p,i,n) ((p)->vars[(i)->src_args[(n)]].alloc)
#define ORC_DEST_ARG(p,i,n) ((p)->vars[(i)->dest_args[(n)]].alloc)
#define ORC_SRC_TYPE(p,i,n) ((p)->vars[(i)->src_args[(n)]].vartype)
#define ORC_DEST_TYPE(p,i,n) ((p)->vars[(i)->dest_args[(n)]].vartype)
#define ORC_SRC_VAL(p,insn,n) ((p)->vars[(insn)->src_args[(n)]].value.i)
#define ORC_DEST_VAL(p,insn,n) ((p)->vars[(insn)->dest_args[(n)]].value.i)


void orc_init (void);

OrcProgram * orc_program_new (void);
OrcProgram * orc_program_new_ds (int size1, int size2);
OrcProgram * orc_program_new_dss (int size1, int size2, int size3);
OrcProgram * orc_program_new_as (int size1, int size2);
OrcProgram * orc_program_new_ass (int size1, int size2, int size3);
OrcProgram * orc_program_new_from_static_bytecode (const orc_uint8 *bytecode);

const char * orc_program_get_name (OrcProgram *program);
void orc_program_set_name (OrcProgram *program, const char *name);
void orc_program_set_line (OrcProgram *program, unsigned int line);
void orc_program_set_2d (OrcProgram *program);
void orc_program_set_constant_n (OrcProgram *program, int n);
void orc_program_set_n_multiple (OrcProgram *ex, int n);
void orc_program_set_n_minimum (OrcProgram *ex, int n);
void orc_program_set_n_maximum (OrcProgram *ex, int n);
void orc_program_set_constant_m (OrcProgram *program, int m);

void orc_program_append (OrcProgram *p, const char *opcode, int arg0, int arg1, int arg2);
void orc_program_append_2 (OrcProgram *program, const char *name,
    unsigned int flags, int arg0, int arg1, int arg2, int arg3);
void orc_program_append_str (OrcProgram *p, const char *opcode,
    const char * arg0, const char * arg1, const char * arg2);
void orc_program_append_str_2 (OrcProgram *program, const char *name,
    unsigned int flags, const char *arg1, const char *arg2, const char *arg3,
    const char *arg4);
void orc_program_append_ds (OrcProgram *program, const char *opcode, int arg0,
    int arg1);
void orc_program_append_ds_str (OrcProgram *p, const char *opcode,
    const char * arg0, const char * arg1);
void orc_program_append_dds_str (OrcProgram *program, const char *name,
    const char *arg1, const char *arg2, const char *arg3);

OrcCompileResult orc_program_compile (OrcProgram *p);
OrcCompileResult orc_program_compile_for_target (OrcProgram *p, OrcTarget *target);
OrcCompileResult orc_program_compile_full (OrcProgram *p, OrcTarget *target,
    unsigned int flags);
void orc_program_set_backup_function (OrcProgram *p, OrcExecutorFunc func);
void orc_program_set_backup_name (OrcProgram *p, const char *name);
void orc_program_free (OrcProgram *program);

int orc_program_find_var_by_name (OrcProgram *program, const char *name);

int orc_program_add_temporary (OrcProgram *program, int size, const char *name);
int orc_program_dup_temporary (OrcProgram *program, int i, int j);
int orc_program_add_source (OrcProgram *program, int size, const char *name);
int orc_program_add_source_full (OrcProgram *program, int size, const char *name,
    const char *type_name, int alignment);
int orc_program_add_destination (OrcProgram *program, int size, const char *name);
int orc_program_add_destination_full (OrcProgram *program, int size, const char *name,
    const char *type_name, int alignment);
int orc_program_add_constant (OrcProgram *program, int size, int value, const char *name);
int orc_program_add_constant_int64 (OrcProgram *program, int size, orc_int64 value, const char *name);
int orc_program_add_constant_float (OrcProgram *program, int size, float value, const char *name);
int orc_program_add_constant_double (OrcProgram *program, int size, double value, const char *name);
int orc_program_add_constant_str (OrcProgram *program, int size, const char *value, const char *name);
int orc_program_add_parameter (OrcProgram *program, int size, const char *name);
int orc_program_add_parameter_float (OrcProgram *program, int size, const char *name);
int orc_program_add_parameter_double (OrcProgram *program, int size, const char *name);
int orc_program_add_parameter_int64 (OrcProgram *program, int size, const char *name);
int orc_program_add_accumulator (OrcProgram *program, int size, const char *name);
void orc_program_set_type_name (OrcProgram *program, int var, const char *type_name);
void orc_program_set_var_alignment (OrcProgram *program, int var, int alignment);
void orc_program_set_sampling_type (OrcProgram *program, int var, int sampling_type);

int orc_program_allocate_register (OrcProgram *program, int is_data);

void orc_program_reset (OrcProgram *program);
OrcCode *orc_program_take_code (OrcProgram *program);

const char *orc_program_get_asm_code (OrcProgram *program);
const char * orc_program_get_error (OrcProgram *program);
void orc_program_set_error (OrcProgram *program, const char *error);

int orc_program_get_max_array_size (OrcProgram *program);
int orc_program_get_max_accumulator_size (OrcProgram *program);


ORC_END_DECLS

#endif



<|start_filename|>node_modules/cache-manager/test/support.js<|end_filename|>
var fs = require('fs');
var util = require('util');
var assert = require('assert');

var support = {
    random: {
        string: function(strLen) {
            strLen = strLen || 8;
            var chars = "abcdefghiklmnopqrstuvwxyz";
            var randomStr = '';
            for (var i = 0; i < strLen; i++) {
                var rnum = Math.floor(Math.random() * chars.length);
                randomStr += chars.substring(rnum, rnum + 1);
            }
            return randomStr;
        },

        number: function(max) {
            max = max || 1000;
            return Math.floor((Math.random() * max));
        }
    },

    checkErr: function(err) {
        if (err) {
            var msg;

            if (err instanceof Error) {
                msg = err;
            } else if (err.msg) {
                msg = err.msg;
            } else {
                msg = util.inspect(err);
            }

            var error = new Error(msg);
            throw error;
        }
    },

    assertBetween: function(actual, lower, upper) {
        assert.ok(actual >= lower, "Expected " + actual + " to be >= " + lower);
        assert.ok(actual <= upper, "Expected " + actual + " to be <= " + upper);
    },

    assertWithin: function(actual, expected, delta) {
        var lower = expected - delta;
        var upper = expected + delta;
        this.assertBetween(actual, lower, upper);
    },

    walkDir: function(dir, validationFunction, cb) {
        if (arguments.length === 2) {
            cb = validationFunction;
            validationFunction = null;
        }

        var results = [];
        fs.readdir(dir, function(err, list) {
            if (err) { return cb(err); }

            var pending = list.length;

            if (!pending) { return cb(null, results); }

            list.forEach(function(file) {
                file = dir + '/' + file;
                fs.stat(file, function(err, stat) {
                    if (stat && stat.isDirectory()) {
                        support.walkDir(file, validationFunction, function(err, res) {
                            results = results.concat(res);
                            if (!--pending) { cb(null, results); }
                        });
                    } else {
                        if (typeof validationFunction === 'function') {
                            if (validationFunction(file)) {
                                results.push(file);
                            }
                        } else {
                            results.push(file);
                        }

                        if (!--pending) { cb(null, results); }
                    }
                });
            });
        });
    },

    testSetGetDel: function(cache, cb) {
        var key = 'TEST' + support.random.string();
        var val = support.random.string();

        cache.set(key, val, function(err) {
            if (err) { return cb(err); }

            cache.get(key, function(err, result) {
                if (err) { return cb(err); }
                assert.equal(result, val);

                cache.del(key, function(err) {
                    if (err) { return cb(err); }

                    cache.get(key, function(err, result) {
                        if (err) { return cb(err); }
                        assert.ok(!result);
                        cb();
                    });
                });
            });
        });
    }
};

module.exports = support;


<|start_filename|>node_modules/yurnalist/examples/select.js<|end_filename|>
/* @noflow */
/* eslint-disable babel/func-params-comma-dangle */
/* eslint-disable flowtype/require-return-type */
const report = require('../dist');

async function chooseLife() {
  const answer = await report.select('What do you choose?', 'Your choice', [
    {
      name: 'The blue pill',
      value: 'blue',
    },
    {
      name: 'The red pill',
      value: 'red',
    },
  ]);

  switch (answer) {
    case 'blue':
      report.success('You choose knowledge, freedom and the sometimes painful truth of reality');
      break;
    case 'red':
      report.success('You choose falsehood, security and the blissful ignorance of illusion');
      break;
  }
}

chooseLife();


<|start_filename|>node_modules/@jimp/bmp/dist/index.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

require("core-js/modules/es6.object.define-property");

var _bmpJs = _interopRequireDefault(require("bmp-js"));

var _utils = require("@jimp/utils");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var MIME_TYPE = 'image/bmp';
var MIME_TYPE_SECOND = 'image/x-ms-bmp';

function toAGBR(image) {
  return (0, _utils.scan)(image, 0, 0, image.bitmap.width, image.bitmap.height, function (x, y, index) {
    var red = this.bitmap.data[index + 0];
    var green = this.bitmap.data[index + 1];
    var blue = this.bitmap.data[index + 2];
    var alpha = this.bitmap.data[index + 3];
    this.bitmap.data[index + 0] = alpha;
    this.bitmap.data[index + 1] = blue;
    this.bitmap.data[index + 2] = green;
    this.bitmap.data[index + 3] = red;
  }).bitmap;
}

function fromAGBR(bitmap) {
  return (0, _utils.scan)({
    bitmap: bitmap
  }, 0, 0, bitmap.width, bitmap.height, function (x, y, index) {
    var alpha = this.bitmap.data[index + 0];
    var blue = this.bitmap.data[index + 1];
    var green = this.bitmap.data[index + 2];
    var red = this.bitmap.data[index + 3];
    this.bitmap.data[index + 0] = red;
    this.bitmap.data[index + 1] = green;
    this.bitmap.data[index + 2] = blue;
    this.bitmap.data[index + 3] = bitmap.is_with_alpha ? alpha : 0xff;
  }).bitmap;
}

var decode = function decode(data) {
  return fromAGBR(_bmpJs.default.decode(data));
};

var encode = function encode(image) {
  return _bmpJs.default.encode(toAGBR(image)).data;
};

var _default = function _default() {
  var _decoders, _encoders;

  return {
    mime: _defineProperty({}, MIME_TYPE, ['bmp']),
    constants: {
      MIME_BMP: MIME_TYPE,
      MIME_X_MS_BMP: MIME_TYPE_SECOND
    },
    decoders: (_decoders = {}, _defineProperty(_decoders, MIME_TYPE, decode), _defineProperty(_decoders, MIME_TYPE_SECOND, decode), _decoders),
    encoders: (_encoders = {}, _defineProperty(_encoders, MIME_TYPE, encode), _defineProperty(_encoders, MIME_TYPE_SECOND, encode), _encoders)
  };
};

exports.default = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/sharp/vendor/include/libcroco/libcroco-config.h<|end_filename|>
#ifndef LIBCROCO_VERSION_NUMBER
#define LIBCROCO_VERSION_NUMBER 612
#endif

#ifndef LIBCROCO_VERSION
#define LIBCROCO_VERSION "0.6.12"
#endif

#ifndef G_DISABLE_CHECKS
#if 0
#define G_DISABLE_CHECKS 0
#endif
#endif

#ifndef CROCO_HAVE_LIBXML2
#define CROCO_HAVE_LIBXML2 (1)
#endif


<|start_filename|>node_modules/@mikaelkristiansson/domready/Makefile<|end_filename|>
boosh:
	node make/build.js

<|start_filename|>node_modules/graphql/validation/rules/KnownFragmentNames.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.unknownFragmentMessage = unknownFragmentMessage;
exports.KnownFragmentNames = KnownFragmentNames;

var _GraphQLError = require("../../error/GraphQLError");

function unknownFragmentMessage(fragName) {
  return "Unknown fragment \"".concat(fragName, "\".");
}
/**
 * Known fragment names
 *
 * A GraphQL document is only valid if all `...Fragment` fragment spreads refer
 * to fragments defined in the same document.
 */


function KnownFragmentNames(context) {
  return {
    FragmentSpread: function FragmentSpread(node) {
      var fragmentName = node.name.value;
      var fragment = context.getFragment(fragmentName);

      if (!fragment) {
        context.reportError(new _GraphQLError.GraphQLError(unknownFragmentMessage(fragmentName), node.name));
      }
    }
  };
}


<|start_filename|>node_modules/graphql-config/lib/errors.js<|end_filename|>
"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
function ExtendableBuiltin(cls) {
    function ExtendableBuiltin() {
        cls.apply(this, arguments);
    }
    ExtendableBuiltin.prototype = Object.create(cls.prototype);
    Object.setPrototypeOf(ExtendableBuiltin, cls);
    return ExtendableBuiltin;
}
var ConfigNotFoundError = /** @class */ (function (_super) {
    __extends(ConfigNotFoundError, _super);
    function ConfigNotFoundError(message) {
        var _this = _super.call(this, message) || this;
        _this.name = _this.constructor.name;
        _this.message = message;
        return _this;
    }
    return ConfigNotFoundError;
}(ExtendableBuiltin(Error)));
exports.ConfigNotFoundError = ConfigNotFoundError;


<|start_filename|>node_modules/@jimp/plugins/es/index.js<|end_filename|>
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }

function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }

import { mergeDeep } from 'timm';
import dither from '@jimp/plugin-dither';
import resize from '@jimp/plugin-resize';
import blit from '@jimp/plugin-blit';
import rotate from '@jimp/plugin-rotate';
import color from '@jimp/plugin-color';
import print from '@jimp/plugin-print';
import blur from '@jimp/plugin-blur';
import crop from '@jimp/plugin-crop';
import normalize from '@jimp/plugin-normalize';
import invert from '@jimp/plugin-invert';
import gaussian from '@jimp/plugin-gaussian';
import flip from '@jimp/plugin-flip';
import mask from '@jimp/plugin-mask';
import scale from '@jimp/plugin-scale';
import displace from '@jimp/plugin-displace';
import contain from '@jimp/plugin-contain';
import cover from '@jimp/plugin-cover';
var plugins = [dither, resize, blit, rotate, color, print, blur, crop, normalize, invert, gaussian, flip, mask, scale, displace, contain, cover];
export default (function (jimpEvChange) {
  var initializedPlugins = plugins.map(function (pluginModule) {
    var plugin = pluginModule(jimpEvChange) || {};

    if (!plugin.class && !plugin.constants) {
      // Default to class function
      plugin = {
        class: plugin
      };
    }

    return plugin;
  });
  return mergeDeep.apply(void 0, _toConsumableArray(initializedPlugins));
});
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/lokijs/src/loki-incremental-adapter.js<|end_filename|>
(function (root, factory) {

  module.exports = factory();

}(this, function () {
  return (function () {

    const fs = require('fs');

    const accessDataDir = (datadir) => {
      return new Promise((resolve, reject) => {
        fs.lstat(datadir, (err, stats) => {
          if (err) {
            reject({
              message: 'Dir does not exist'
            });
          }
          resolve(stats);
        });
      });
    };

    const saveRecord = (coll, obj, dir) => {
      console.log(`File is ${dir}/${coll}/${obj.$loki}.json`);
      fs.writeFile(`${dir}/${coll}/${obj.$loki}.json`, JSON.stringify(obj), {
        encoding: 'utf8'
      }, (err) => {
        if (err) {
          console.log('Document save failed.');
          throw err;
        }
        console.log('Document saved correctly');
      });
    };

    const iterateFolders = (db, dir) => {
      console.log(`Colls: ${db.listCollections().length}`);

      console.log(`Changes: ${db.generateChangesNotification().length}`);
      db.generateChangesNotification().forEach(change => {
        saveRecord(change.name, change.obj, dir);
      });
    };

    class LokiIncrementalAdapter {
      constructor(options) {
        const config = options || {
          journaling: false,
          format: 'json'
        };
        this.mode = 'reference';
        this.journaling = config.journaling;
        this.format = config.format;
      }

      checkAvailability() {
        if (typeof fs !== 'undefined' && fs) return true;
        return false;
      }

      exportDatabase(dir, dbref, callback) {
        console.log('Saving with incremental adapter');

        console.log('Database dir is ' + dir);
        const promise = accessDataDir(dir);
        console.log(promise);
        promise.then(() => {
          console.log('iterating folders...');
          iterateFolders(dbref, dir);
        });
        promise.catch((err) => {
          console.log(err);
        });
        if (callback) {
          callback();
        }
      }

      loadDatabase(dbname, callback) {
        console.log(this, dbname, callback);
      }
    }

    return LokiIncrementalAdapter;

  }());
}));


<|start_filename|>node_modules/cache-manager/test/stores/none.unit.js<|end_filename|>
var assert = require('assert');
// var support = require('../support');
var noneStore = require('../../lib/stores/none');

describe('none store', function() {
    var key = 'test-key';
    var value = 'test-value';
    var key2 = 'test-key-2';
    var value2 = 'test-value-2';

    describe('with callback', function() {
        var origPromise;
        var noneCache;

        beforeEach(function() {
            origPromise = global.Promise;
            delete global.Promise;
            noneCache = noneStore.create({noPromises: true});
        });

        afterEach(function() {
            global.Promise = origPromise;
        });

        it('set()', function(done) {
            assert.strictEqual(noneCache.set(key, value), undefined);
            noneCache.set(key, value, function(err) {
                assert.strictEqual(err, null);
                noneCache.set(key, value, {}, done);
            });
        });

        it('mset()', function(done) {
            assert.strictEqual(noneCache.mset(key, value), undefined);
            noneCache.mset(key, value, key2, value2, function(err) {
                assert.strictEqual(err, null);
                noneCache.mset(key, value, {}, done);
            });
        });

        it('get()', function(done) {
            assert.strictEqual(noneCache.get(key), undefined);
            noneCache.get(key2, function(err, result) {
                assert.strictEqual(err, null);
                assert.strictEqual(result, undefined);
                noneCache.get(key2, {}, done);
            });
        });

        it('mget()', function(done) {
            assert.deepEqual(noneCache.mget(key, key2), [undefined, undefined]);
            noneCache.mget(key, key2, function(err, result) {
                assert.strictEqual(err, null);
                assert.deepEqual(result, [undefined, undefined]);
                noneCache.mget(key, key2, key, {}, function(err, result) {
                    assert.strictEqual(err, null);
                    assert.deepEqual(result, [undefined, undefined, undefined]);
                    done();
                });
            });
        });

        it('del()', function(done) {
            assert.strictEqual(noneCache.del(), undefined);
            noneCache.del(function() {
                noneCache.del({}, done);
            });
        });

        it('reset()', function(done) {
            assert.strictEqual(noneCache.reset(), undefined);
            noneCache.reset(done);
        });

        it('keys()', function(done) {
            assert.deepEqual(noneCache.keys(), []);
            noneCache.keys(function(err, keys) {
                assert.deepEqual(keys, []);
                done();
            });
        });
    });

    describe('with promise', function() {
        var noneCache;

        beforeEach(function() {
            noneCache = noneStore.create({promiseDependency: global.Promise});
        });

        it('get() global promise', function(done) {
            noneStore.create()
                .get(key)
                .then(function(result) {
                    assert.strictEqual(result, undefined);
                    done();
                });
        });

        it('set()', function(done) {
            noneCache.set(key, value)
                .then(function(result) {
                    assert.equal(result, value);
                    done();
                });
        });

        it('mset()', function(done) {
            noneCache.mset(key, value, key2, value2)
                .then(function(result) {
                    assert.deepEqual(result, [value, value2]);
                    done();
                });
        });

        it('get()', function(done) {
            noneCache.get(key)
                .then(function(result) {
                    assert.strictEqual(result, undefined);
                    done();
                });
        });

        it('mget()', function(done) {
            noneCache.mget(key, key2)
                .then(function(result) {
                    assert.deepEqual(result, [undefined, undefined]);
                    done();
                });
        });

        it('del()', function(done) {
            noneCache.del(key).then(done);
        });

        it('reset()', function(done) {
            noneCache.reset().then(done);
        });

        it('keys()', function(done) {
            noneCache.keys()
                .then(function(result) {
                    assert.deepEqual(result, []);
                    done();
                });
        });
    });
});


<|start_filename|>node_modules/opentracing/lib/ext/tags.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/** SPAN_KIND hints at relationship between spans, e.g. client/server */
exports.SPAN_KIND = 'span.kind';
/** Marks a span representing the client-side of an RPC or other remote call */
exports.SPAN_KIND_RPC_CLIENT = 'client';
/** Marks a span representing the server-side of an RPC or other remote call */
exports.SPAN_KIND_RPC_SERVER = 'server';
/** Marks a span representing the producing-side within a messaging system or other remote call */
exports.SPAN_KIND_MESSAGING_PRODUCER = 'producer';
/** Marks a span representing the consuming-side within a messaging system or other remote call */
exports.SPAN_KIND_MESSAGING_CONSUMER = 'consumer';
/**
 * ERROR (boolean) true if and only if the application considers the operation
 * represented by the Span to have failed
 */
exports.ERROR = 'error';
/**
 * COMPONENT (string) ia s low-cardinality identifier of the module, library,
 * or package that is generating a span.
 */
exports.COMPONENT = 'component';
/**
 * SAMPLING_PRIORITY (number) determines the priority of sampling this Span.
 * If greater than 0, a hint to the Tracer to do its best to capture the trace.
 * If 0, a hint to the trace to not-capture the trace. If absent, the Tracer
 * should use its default sampling mechanism.
 */
exports.SAMPLING_PRIORITY = 'sampling.priority';
// ---------------------------------------------------------------------------
// PEER_* tags can be emitted by either client-side of server-side to describe
// the other side/service in a peer-to-peer communications, like an RPC call.
// ---------------------------------------------------------------------------
/**
 * PEER_SERVICE (string) Remote service name (for some unspecified
 * definition of "service"). E.g., "elasticsearch", "a_custom_microservice", "memcache"
 */
exports.PEER_SERVICE = 'peer.service';
/** PEER_HOSTNAME (string) Remote hostname. E.g., "opentracing.io", "internal.dns.name" */
exports.PEER_HOSTNAME = 'peer.hostname';
/**
 * PEER_ADDRESS (string) Remote "address", suitable for use in a
 * networking client library. This may be a "ip:port", a bare
 * "hostname", a FQDN, or even a JDBC substring like "mysql://prod-db:3306"
 */
exports.PEER_ADDRESS = 'peer.address';
/**
 * PEER_HOST_IPV4 (number) Remote IPv4 address as a .-separated tuple.
 * E.g., "127.0.0.1"
 */
exports.PEER_HOST_IPV4 = 'peer.ipv4';
// PEER_HOST_IPV6 (string) Remote IPv6 address as a string of
// colon-separated 4-char hex tuples. E.g., "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
exports.PEER_HOST_IPV6 = 'peer.ipv6';
// PEER_PORT (number) Remote port. E.g., 80
exports.PEER_PORT = 'peer.port';
// ---------------------------------------------------------------------------
// HTTP tags
// ---------------------------------------------------------------------------
/**
 * HTTP_URL (string) URL of the request being handled in this segment of the
 * trace, in standard URI format. E.g., "https://domain.net/path/to?resource=here"
 */
exports.HTTP_URL = 'http.url';
/**
 * HTTP_METHOD (string) HTTP method of the request for the associated Span. E.g.,
 * "GET", "POST"
 */
exports.HTTP_METHOD = 'http.method';
/**
 * HTTP_STATUS_CODE (number) HTTP response status code for the associated Span.
 * E.g., 200, 503, 404
 */
exports.HTTP_STATUS_CODE = 'http.status_code';
// -------------------------------------------------------------------------
// Messaging tags
// -------------------------------------------------------------------------
/**
 * MESSAGE_BUS_DESTINATION (string) An address at which messages can be exchanged.
 * E.g. A Kafka record has an associated "topic name" that can be extracted
 * by the instrumented producer or consumer and stored using this tag.
 */
exports.MESSAGE_BUS_DESTINATION = 'message_bus.destination';
// --------------------------------------------------------------------------
// Database tags
// --------------------------------------------------------------------------
/**
 * DB_INSTANCE (string) Database instance name. E.g., In java, if the
 * jdbc.url="jdbc:mysql://127.0.0.1:3306/customers", the instance name is "customers".
 */
exports.DB_INSTANCE = 'db.instance';
/**
 * DB_STATEMENT (string) A database statement for the given database type.
 * E.g., for db.type="SQL", "SELECT * FROM wuser_table";
 * for db.type="redis", "SET mykey 'WuValue'".
 */
exports.DB_STATEMENT = 'db.statement';
/**
 * DB_TYPE (string) Database type. For any SQL database, "sql". For others,
 * the lower-case database category, e.g. "cassandra", "hbase", or "redis".
 */
exports.DB_TYPE = 'db.type';
/**
 * DB_USER (string) Username for accessing database. E.g., "readonly_user"
 * or "reporting_user"
 */
exports.DB_USER = 'db.user';
//# sourceMappingURL=tags.js.map

<|start_filename|>node_modules/sharp/vendor/include/graphite2/Types.h<|end_filename|>
/*  GRAPHITE2 LICENSING

    Copyright 2010, SIL International
    All rights reserved.

    This library is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published
    by the Free Software Foundation; either version 2.1 of License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should also have received a copy of the GNU Lesser General Public
    License along with this library in the file named "LICENSE".
    If not, write to the Free Software Foundation, 51 Franklin Street,
    Suite 500, Boston, MA 02110-1335, USA or visit their web page on the
    internet at http://www.fsf.org/licenses/lgpl.html.

    Alternatively, the contents of this file may be used under the terms
    of the Mozilla Public License (http://mozilla.org/MPL) or the GNU
    General Public License, as published by the Free Software Foundation,
    either version 2 of the License or (at your option) any later version.
*/
#pragma once

#include <stddef.h>

typedef unsigned char   gr_uint8;
typedef gr_uint8        gr_byte;
typedef signed char     gr_int8;
typedef unsigned short  gr_uint16;
typedef short           gr_int16;
typedef unsigned int    gr_uint32;
typedef int             gr_int32;

enum gr_encform {
  gr_utf8 = 1/*sizeof(uint8)*/, gr_utf16 = 2/*sizeof(uint16)*/, gr_utf32 = 4/*sizeof(uint32)*/
};


// Define API function declspec/attributes and how each supported compiler or OS
// allows us to specify them.
#if defined __GNUC__
  #define _gr2_and ,
  #define _gr2_tag_fn(a)        __attribute__((a))
  #define _gr2_deprecated_flag  deprecated
  #define _gr2_export_flag      visibility("default")
  #define _gr2_import_flag      visibility("default")
  #define _gr2_static_flag      visibility("hidden")
#endif

#if defined _WIN32 || defined __CYGWIN__
  #if defined __GNUC__  // These three will be redefined for Windows
    #undef _gr2_export_flag
    #undef _gr2_import_flag
    #undef _gr2_static_flag
  #else  // How MSVC sepcifies function level attributes adn deprecation
    #define _gr2_and
    #define _gr2_tag_fn(a)       __declspec(a)
    #define _gr2_deprecated_flag deprecated
  #endif
  #define _gr2_export_flag     dllexport
  #define _gr2_import_flag     dllimport
  #define _gr2_static_flag
#endif

#if defined GRAPHITE2_STATIC
  #define GR2_API             _gr2_tag_fn(_gr2_static_flag)
  #define GR2_DEPRECATED_API  _gr2_tag_fn(_gr2_deprecated_flag _gr2_and _gr2_static_flag)
#elif defined GRAPHITE2_EXPORTING
  #define GR2_API             _gr2_tag_fn(_gr2_export_flag)
  #define GR2_DEPRECATED_API  _gr2_tag_fn(_gr2_deprecated_flag _gr2_and _gr2_export_flag)
#else
  #define GR2_API             _gr2_tag_fn(_gr2_import_flag)
  #define GR2_DEPRECATED_API  _gr2_tag_fn(_gr2_deprecated_flag _gr2_and _gr2_import_flag)
#endif


<|start_filename|>node_modules/graphql/utilities/concatAST.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.concatAST = concatAST;

var _flatMap = _interopRequireDefault(require("../polyfills/flatMap"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * Provided a collection of ASTs, presumably each from different files,
 * concatenate the ASTs together into batched AST, useful for validating many
 * GraphQL source files which together represent one conceptual application.
 */
function concatAST(asts) {
  return {
    kind: 'Document',
    definitions: (0, _flatMap.default)(asts, function (ast) {
      return ast.definitions;
    })
  };
}


<|start_filename|>node_modules/graphql/validation/rules/KnownDirectives.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.unknownDirectiveMessage = unknownDirectiveMessage;
exports.misplacedDirectiveMessage = misplacedDirectiveMessage;
exports.KnownDirectives = KnownDirectives;

var _GraphQLError = require("../../error/GraphQLError");

var _kinds = require("../../language/kinds");

var _directiveLocation = require("../../language/directiveLocation");

var _directives = require("../../type/directives");

function unknownDirectiveMessage(directiveName) {
  return "Unknown directive \"".concat(directiveName, "\".");
}

function misplacedDirectiveMessage(directiveName, location) {
  return "Directive \"".concat(directiveName, "\" may not be used on ").concat(location, ".");
}
/**
 * Known directives
 *
 * A GraphQL document is only valid if all `@directives` are known by the
 * schema and legally positioned.
 */


function KnownDirectives(context) {
  var locationsMap = Object.create(null);
  var schema = context.getSchema();
  var definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives;

  for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {
    var directive = definedDirectives[_i2];
    locationsMap[directive.name] = directive.locations;
  }

  var astDefinitions = context.getDocument().definitions;

  for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {
    var def = astDefinitions[_i4];

    if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
      locationsMap[def.name.value] = def.locations.map(function (name) {
        return name.value;
      });
    }
  }

  return {
    Directive: function Directive(node, key, parent, path, ancestors) {
      var name = node.name.value;
      var locations = locationsMap[name];

      if (!locations) {
        context.reportError(new _GraphQLError.GraphQLError(unknownDirectiveMessage(name), node));
        return;
      }

      var candidateLocation = getDirectiveLocationForASTPath(ancestors);

      if (candidateLocation && locations.indexOf(candidateLocation) === -1) {
        context.reportError(new _GraphQLError.GraphQLError(misplacedDirectiveMessage(name, candidateLocation), node));
      }
    }
  };
}

function getDirectiveLocationForASTPath(ancestors) {
  var appliedTo = ancestors[ancestors.length - 1];

  if (!Array.isArray(appliedTo)) {
    switch (appliedTo.kind) {
      case _kinds.Kind.OPERATION_DEFINITION:
        switch (appliedTo.operation) {
          case 'query':
            return _directiveLocation.DirectiveLocation.QUERY;

          case 'mutation':
            return _directiveLocation.DirectiveLocation.MUTATION;

          case 'subscription':
            return _directiveLocation.DirectiveLocation.SUBSCRIPTION;
        }

        break;

      case _kinds.Kind.FIELD:
        return _directiveLocation.DirectiveLocation.FIELD;

      case _kinds.Kind.FRAGMENT_SPREAD:
        return _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD;

      case _kinds.Kind.INLINE_FRAGMENT:
        return _directiveLocation.DirectiveLocation.INLINE_FRAGMENT;

      case _kinds.Kind.FRAGMENT_DEFINITION:
        return _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION;

      case _kinds.Kind.VARIABLE_DEFINITION:
        return _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION;

      case _kinds.Kind.SCHEMA_DEFINITION:
      case _kinds.Kind.SCHEMA_EXTENSION:
        return _directiveLocation.DirectiveLocation.SCHEMA;

      case _kinds.Kind.SCALAR_TYPE_DEFINITION:
      case _kinds.Kind.SCALAR_TYPE_EXTENSION:
        return _directiveLocation.DirectiveLocation.SCALAR;

      case _kinds.Kind.OBJECT_TYPE_DEFINITION:
      case _kinds.Kind.OBJECT_TYPE_EXTENSION:
        return _directiveLocation.DirectiveLocation.OBJECT;

      case _kinds.Kind.FIELD_DEFINITION:
        return _directiveLocation.DirectiveLocation.FIELD_DEFINITION;

      case _kinds.Kind.INTERFACE_TYPE_DEFINITION:
      case _kinds.Kind.INTERFACE_TYPE_EXTENSION:
        return _directiveLocation.DirectiveLocation.INTERFACE;

      case _kinds.Kind.UNION_TYPE_DEFINITION:
      case _kinds.Kind.UNION_TYPE_EXTENSION:
        return _directiveLocation.DirectiveLocation.UNION;

      case _kinds.Kind.ENUM_TYPE_DEFINITION:
      case _kinds.Kind.ENUM_TYPE_EXTENSION:
        return _directiveLocation.DirectiveLocation.ENUM;

      case _kinds.Kind.ENUM_VALUE_DEFINITION:
        return _directiveLocation.DirectiveLocation.ENUM_VALUE;

      case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION:
      case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION:
        return _directiveLocation.DirectiveLocation.INPUT_OBJECT;

      case _kinds.Kind.INPUT_VALUE_DEFINITION:
        {
          var parentNode = ancestors[ancestors.length - 3];
          return parentNode.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION ? _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION : _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION;
        }
    }
  }
}


<|start_filename|>node_modules/sharp/vendor/include/vips/basic.h<|end_filename|>
/* A few basic types needed everywhere.
 *
 * 27/10/11
 * 	- from type.h
 */

/*

    This file is part of VIPS.

    VIPS is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301  USA

 */

/*

    These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk

 */

#ifndef VIPS_BASIC_H
#define VIPS_BASIC_H

#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/

/**
 * VipsPel:
 *
 * A picture element. Cast this to whatever the associated VipsBandFormat says
 * to get the value.
 */
typedef unsigned char VipsPel;

/* Also used for eg. vips_local() and friends.
 */
typedef int (*VipsCallbackFn)( void *a, void *b );

/* Like GFunc, but return a value.
 */
typedef void *(*VipsSListMap2Fn)( void *item, 
	void *a, void *b );
typedef void *(*VipsSListMap4Fn)( void *item, 
	void *a, void *b, void *c, void *d );
typedef void *(*VipsSListFold2Fn)( void *item, 
	void *a, void *b, void *c );

typedef enum {
	VIPS_PRECISION_INTEGER,
	VIPS_PRECISION_FLOAT,
	VIPS_PRECISION_APPROXIMATE,
	VIPS_PRECISION_LAST
} VipsPrecision;

/* Just for testing.
 */
char *vips_path_filename7( const char *path );
char *vips_path_mode7( const char *path );

#ifdef __cplusplus
}
#endif /*__cplusplus*/

#endif /*VIPS_BASIC_H*/


<|start_filename|>node_modules/cache-manager/examples/redis_example/example.js<|end_filename|>
// Setup:
// npm install redis@0.12.1 sol-redis-pool@0.2.0
// node examples/redis_example/example.js

var util = require('util');
var assert = require('assert');
var cacheManager = require('../../');
var redisStore = require('./redis_store');
// Note: ttl is in seconds
var redisCache = cacheManager.caching({store: redisStore, db: 0, ttl: 100});
var ttl = 60;

console.log("set/get/del example:");

redisCache.set('foo', 'bar', {ttl: ttl}, function(err) {
    if (err) { throw err; }

    redisCache.get('foo', function(err, result) {
        if (err) { throw err; }
        console.log("result fetched from cache: " + result);
        // >> 'bar'

        redisCache.ttl('foo', function(err, result) {
            if (err) { throw err; }
            assert.ok(result > 59 && result < 61);

            redisCache.del('foo', function(err) {
                if (err) { throw err; }
            });
        });
    });
});

// TTL defaults to what we passed into the caching function (100)
redisCache.set('foo-no-ttl', 'bar-no-ttl', function(err) {
    if (err) { throw err; }

    redisCache.get('foo-no-ttl', function(err, result) {
        if (err) { throw err; }
        console.log("result fetched from cache: " + result);
        // >> 'bar'

        redisCache.ttl('foo-no-ttl', function(err, result) {
            if (err) { throw err; }
            assert.ok(result > 99 && result < 101);

            redisCache.del('foo-no-ttl', function(err) {
                if (err) { throw err; }
            });
        });
    });
});

// Calls Redis 'set' instead of 'setex'
redisCache.set('foo-zero-ttl', 'bar-zero-ttl', {ttl: 0}, function(err) {
    if (err) { throw err; }

    redisCache.get('foo-zero-ttl', function(err, result) {
        if (err) { throw err; }
        console.log("result fetched from cache: " + result);
        // >> 'bar'

        redisCache.ttl('foo-zero-ttl', function(err, result) {
            if (err) { throw err; }
            assert.ok(result < 0);

            redisCache.del('foo-zero-ttl', function(err) {
                if (err) { throw err; }
            });
        });
    });
});

var userId = 123;

function createKey(id) {
    return 'user_' + id;
}

function getUser(id, cb) {
    setTimeout(function() {
        console.log("\n\nReturning user from slow database.");
        cb(null, {id: id, name: 'Bob'});
    }, 100);
}

function getUserFromCache(id, cb) {
    var key = createKey(id);
    redisCache.wrap(key, function(cacheCb) {
        getUser(userId, cacheCb);
    }, {ttl: ttl}, cb);
}

getUserFromCache(userId, function(err, user) {
    console.log(user);

    // Second time fetches user from redisCache
    getUserFromCache(userId, function(err, user) {
        console.log("user from second cache request:");
        console.log(user);

        redisCache.keys(function(err, keys) {
            console.log("keys: " + util.inspect(keys));

            var key = createKey(userId);
            redisCache.del(key, function(err) {
                if (err) { throw err; }
            });
        });
    });
});

// Outputs:
// { id: 123, name: 'Bob' }
// user from second cache request:
// { id: 123, name: 'Bob' }
// keys: [ 'user_123' ]

var redisCache2 = cacheManager.caching({store: redisStore, db: 1, ttl: 100});
var multiCache = cacheManager.multiCaching([redisCache, redisCache2]);
var userId2 = 456;
var key2 = 'user_' + userId;
var ttl2 = 50;

multiCache.wrap(key2, function(cb) {
    getUser(userId2, cb);
}, {ttl: ttl2}, function(err, user) {
    console.log("user: ", user);

    // Second time fetches user from redisCache, since it's highest priority.
    // If the data expires in the redisCache, the next fetch would pull it from
    // redisCache2, and set the data in redisCache again.
    multiCache.wrap(key2, function(cb) {
        getUser(userId2, cb);
    }, function(err, user) {
        console.log("user, second fetch:", user);
    });

    multiCache.getAndPassUp(key2, function(err, result) {
        console.log("\ngetAndPassUp result: ", result);

        multiCache.del(key2, function(err) {
            if (err) { throw err; }
            process.exit();
        });
    });
});


<|start_filename|>node_modules/lokijs/src/aws-s3-sync-adapter.js<|end_filename|>
/**
 * LokiJS AWSS3SyncAdapter
 * @author <NAME> <https://github.com/hutch120>
 *
 * A remote sync adapter for LokiJS to AWS S3
 *
 * Basic usage:
 *
   const AWS = require('aws-sdk')
   const Loki = require('lokijs')
   const AWSS3SyncAdapter = require('./aws-s3-sync-adapter.js')
   var db

   var _init = function () {
     const options = {
       'AWS': AWS,
       'accessKeyId': process.env.accessKeyId, // Avoid hardcoding credentials
       'secretAccessKey': process.env.secretAccessKey, // Avoid hardcoding credentials
       'bucket': '...'
     }
     const adapter = new AWSS3SyncAdapter(options);
     db = new Loki('somefile.json', {
       autoload: false,
       autosave: true,
       adapter: adapter
     })
   }

   var _save = function () {
     db.saveDatabase(function (err, data) {
       if (err) {
         console.log(err)
         process.exit()
       } else {
         console.log('DB saved to AWS S3')
         _load() // Now attempt to load it back.
       }
     })
   }

   var _load = function () {
     db.loadDatabase({}, function (err) {
       if (err) {
         console.log(err)
         process.exit()
       } else {
         console.log('DB loaded from AWS S3')
         process.exit()
       }
     })
   }

   _init()
   _save()
 *
 */

/* eslint */
/* global define */

/* jslint browser: true, node: true, plusplus: true, indent: 2 */

(function (root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD
    define([], factory);
  } else if (typeof exports === 'object') {
    // CommonJS
    module.exports = factory();
  } else {
    // Browser globals
    root.lokiAWSS3SyncAdapter = factory();
  }
}(this, function () {
  return (function (options) {
    'use strict';

    function AWSS3SyncAdapterError (message) {
      this.name = 'AWSS3SyncAdapterError';
      this.message = (message || '');
    }

    AWSS3SyncAdapterError.prototype = Error.prototype;

    /**
     * This adapter requires an object options is passed containing the following properties:
     *  AWS: Reference to the AWS SDK.
     *  accessKeyId: AWS access key ID
     *  secretAccessKey: AWS secret access key
     *  bucket: A global aws bucket name
     */

    function AWSS3SyncAdapter (options) {
      this.options = options;

      if (!options) {
        throw new AWSS3SyncAdapterError('No options configured in AWSS3SyncAdapter');
      }

      if (!options.AWS) {
        throw new AWSS3SyncAdapterError('No AWS library specified in options');
      }

      if (!options.accessKeyId) {
        throw new AWSS3SyncAdapterError('No accessKeyId property specified in options');
      }

      if (!options.secretAccessKey) {
        throw new AWSS3SyncAdapterError('No secretAccessKey property specified in options');
      }

      if (!options.bucket) {
        throw new AWSS3SyncAdapterError('No bucket property specified in options');
      }

      this.options.AWS.config.update({accessKeyId: options.accessKeyId, secretAccessKey: options.secretAccessKey});
    }

    AWSS3SyncAdapter.prototype.saveDatabase = function (name, data, callback) {
      console.log('AWSS3SyncAdapter.prototype.saveDatabase():', name);

      const s3 = new this.options.AWS.S3();
      const base64str = Buffer.from(data).toString('base64');

      var params = {
        Body: base64str,
        Bucket: this.options.bucket,
        Key: name,
        ServerSideEncryption: 'AES256',
        Tagging: '' // key1=value1&key2=value2
      };

      s3.putObject(params, function (err, data) {
        if (err) {
          console.log('AWSS3SyncAdapter.prototype.saveDatabase() Error:', err, err.stack);
          throw new AWSS3SyncAdapterError('Remote sync failed');
        } else {
          return callback(null, data);
        }
      });
    };

    AWSS3SyncAdapter.prototype.loadDatabase = function (name, callback) {
      console.log('AWSS3SyncAdapter.prototype.loadDatabase():', name);
      const s3 = new this.options.AWS.S3();

      var params = {
        Bucket: this.options.bucket,
        Key: name
      };

      s3.getObject(params, function (err, data) {
        if (err) {
          console.log('AWSS3SyncAdapter.prototype.loadDatabase() Error:', err, err.stack);
          throw new AWSS3SyncAdapterError('Remote load failed');
        } else {
          if (!data.Body) {
            throw new AWSS3SyncAdapterError('Remote load failed, no data found');
          }
          try {
            var base64data = data.Body.toString();
            var asciiData = Buffer.from(base64data, 'base64').toString();
            var lokiDBObj = JSON.parse(asciiData); // For json objects
            console.log('AWSS3SyncAdapter.prototype.loadDatabase() asciiData:', lokiDBObj);
            return callback(lokiDBObj);
          } catch (e) {
            throw new AWSS3SyncAdapterError('Remote load failed, invalid loki database');
          }
        }
      });
    };

    return AWSS3SyncAdapter;
  }());
}));


<|start_filename|>node_modules/probe-image-size/lib/parse_stream/bmp.js<|end_filename|>
'use strict';


var ParserStream = require('../common').ParserStream;
var str2arr      = require('../common').str2arr;
var sliceEq      = require('../common').sliceEq;


var SIG_BM = str2arr('BM');


module.exports = function () {
  var parser = new ParserStream();

  parser._bytes(26, function (data) {
    parser._skipBytes(Infinity);

    if (!sliceEq(data, 0, SIG_BM)) {
      parser.push(null);
      return;
    }

    parser.push({
      width:  data.readUInt16LE(18),
      height: data.readUInt16LE(22),
      type: 'bmp',
      mime: 'image/bmp',
      wUnits: 'px',
      hUnits: 'px'
    });

    parser.push(null);
  });

  return parser;
};


<|start_filename|>node_modules/logalot/index.js<|end_filename|>
'use strict';

var figures = require('figures');
var Squeak = require('squeak');

/**
 * Initialize `log`
 */

var log = new Squeak({separator: ' '});

/**
 * Add types
 */

log.type('info', {
	color: 'cyan',
	prefix: figures.info
});

log.type('warn', {
	color: 'yellow',
	prefix: figures.warning
});

log.type('success', {
	color: 'green',
	prefix: figures.tick
});

log.type('error', {
	color: 'red',
	prefix: figures.cross
});

/**
 * Module exports
 */

module.exports = log;


<|start_filename|>node_modules/sharp/vendor/include/libexif/exif-mnote-data.h<|end_filename|>
/*! \file exif-mnote-data.h
 *  \brief Handling EXIF MakerNote tags
 */
/*
 * Copyright (c) 2003 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA.
 */

#ifndef __EXIF_MNOTE_DATA_H__
#define __EXIF_MNOTE_DATA_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include <libexif/exif-log.h>

/*! Data found in the MakerNote tag */
typedef struct _ExifMnoteData ExifMnoteData;

void exif_mnote_data_ref   (ExifMnoteData *);
void exif_mnote_data_unref (ExifMnoteData *);

/*! Load the MakerNote data from a memory buffer.
 *
 * \param[in] d MakerNote data
 * \param[in] buf pointer to raw MakerNote tag data
 * \param[in] buf_siz number of bytes of data at buf
 */
void exif_mnote_data_load (ExifMnoteData *d, const unsigned char *buf,
			   unsigned int buf_siz);

/*!
 * Save the raw MakerNote data into a memory buffer.  The buffer is
 * allocated by this function and must subsequently be freed by the
 * caller.
 *
 * \param[in,out] d extract the data from this structure 
 * \param[out] buf pointer to buffer pointer containing MakerNote data on return
 * \param[out] buf_siz pointer to the size of the buffer
 */
void exif_mnote_data_save (ExifMnoteData *d, unsigned char **buf,
			   unsigned int *buf_siz);

/*! Return the number of tags in the MakerNote.
 *
 * \param[in] d MakerNote data
 * \return number of tags, or 0 if no MakerNote or the type is not supported
 */
unsigned int exif_mnote_data_count           (ExifMnoteData *d);

/*! Return the MakerNote tag number for the tag at the specified index within
 * the MakerNote.
 *
 * \param[in] d MakerNote data
 * \param[in] n index of the entry within the MakerNote data
 * \return MakerNote tag number
 */
unsigned int exif_mnote_data_get_id          (ExifMnoteData *d, unsigned int n);

/*! Returns textual name of the given MakerNote tag. The name is a short,
 * unique (within this type of MakerNote), non-localized text string
 * containing only US-ASCII alphanumeric characters.
 *
 * \param[in] d MakerNote data
 * \param[in] n index of the entry within the MakerNote data
 * \return textual name of the tag
 */
const char  *exif_mnote_data_get_name        (ExifMnoteData *d, unsigned int n);

/*! Returns textual title of the given MakerNote tag.
 * The title is a short, localized textual description of the tag.
 *
 * \param[in] d MakerNote data
 * \param[in] n index of the entry within the MakerNote data
 * \return textual name of the tag
 */
const char  *exif_mnote_data_get_title       (ExifMnoteData *d, unsigned int n);

/*! Returns verbose textual description of the given MakerNote tag.
 *
 * \param[in] d MakerNote data
 * \param[in] n index of the entry within the MakerNote data
 * \return textual description of the tag
 */
const char  *exif_mnote_data_get_description (ExifMnoteData *d, unsigned int n);

/*! Return a textual representation of the value of the MakerNote entry.
 *
 * \warning The character set of the returned string may be in
 *          the encoding of the current locale or the native encoding
 *          of the camera.
 *
 * \param[in] d MakerNote data
 * \param[in] n index of the entry within the MakerNote data
 * \param[out] val buffer in which to store value
 * \param[in] maxlen length of the buffer val
 * \return val pointer, or NULL on error
 */
char  *exif_mnote_data_get_value (ExifMnoteData *d, unsigned int n, char *val, unsigned int maxlen);

void exif_mnote_data_log (ExifMnoteData *, ExifLog *);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __EXIF_MNOTE_DATA_H__ */


<|start_filename|>node_modules/sharp/vendor/include/gdk-pixbuf/gdk-pixbuf-io.h<|end_filename|>
/* GdkPixbuf library - Io handling.  This is an internal header for 
 * GdkPixbuf. You should never use it unless you are doing development for 
 * GdkPixbuf itself.
 *
 * Copyright (C) 1999 The Free Software Foundation
 *
 * Authors: <NAME> <<EMAIL>>
 *          <NAME> <<EMAIL>>
 *          <NAME> <<EMAIL>>
 *          <NAME> <<EMAIL>>
 *          <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */

#ifndef GDK_PIXBUF_IO_H
#define GDK_PIXBUF_IO_H

#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
#endif

#include <stdio.h>
#include <glib.h>
#include <gmodule.h>
#include <gdk-pixbuf/gdk-pixbuf-core.h>
#include <gdk-pixbuf/gdk-pixbuf-animation.h>

G_BEGIN_DECLS

typedef struct _GdkPixbufFormat GdkPixbufFormat;

GDK_PIXBUF_AVAILABLE_IN_ALL
GType gdk_pixbuf_format_get_type (void) G_GNUC_CONST;

GDK_PIXBUF_AVAILABLE_IN_ALL
GSList    *gdk_pixbuf_get_formats            (void);
GDK_PIXBUF_AVAILABLE_IN_2_2
gchar     *gdk_pixbuf_format_get_name        (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_2
gchar     *gdk_pixbuf_format_get_description (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_2
gchar    **gdk_pixbuf_format_get_mime_types  (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_2
gchar    **gdk_pixbuf_format_get_extensions  (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_36
gboolean   gdk_pixbuf_format_is_save_option_supported (GdkPixbufFormat *format,
                                                       const gchar     *option_key);
GDK_PIXBUF_AVAILABLE_IN_2_2
gboolean   gdk_pixbuf_format_is_writable     (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_6
gboolean   gdk_pixbuf_format_is_scalable     (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_6
gboolean   gdk_pixbuf_format_is_disabled     (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_6
void       gdk_pixbuf_format_set_disabled    (GdkPixbufFormat *format,
					      gboolean         disabled);
GDK_PIXBUF_AVAILABLE_IN_2_6
gchar     *gdk_pixbuf_format_get_license     (GdkPixbufFormat *format);

GDK_PIXBUF_AVAILABLE_IN_2_4
GdkPixbufFormat *gdk_pixbuf_get_file_info    (const gchar     *filename,
					      gint            *width, 
					      gint            *height);
GDK_PIXBUF_AVAILABLE_IN_2_32
void             gdk_pixbuf_get_file_info_async  (const gchar          *filename,
						  GCancellable         *cancellable,
						  GAsyncReadyCallback   callback,
						  gpointer              user_data);
GDK_PIXBUF_AVAILABLE_IN_2_32
GdkPixbufFormat *gdk_pixbuf_get_file_info_finish (GAsyncResult         *async_result,
						  gint                 *width,
						  gint                 *height,
						  GError              **error);

GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufFormat *gdk_pixbuf_format_copy (const GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_ALL
void             gdk_pixbuf_format_free (GdkPixbufFormat       *format);

#ifdef GDK_PIXBUF_ENABLE_BACKEND



/**
 * GdkPixbufModuleSizeFunc:
 * @width: pointer to a location containing the current image width
 * @height: pointer to a location containing the current image height
 * @user_data: the loader.
 * 
 * Defines the type of the function that gets called once the size 
 * of the loaded image is known.
 * 
 * The function is expected to set @width and @height to the desired
 * size to which the image should be scaled. If a module has no efficient 
 * way to achieve the desired scaling during the loading of the image, it may
 * either ignore the size request, or only approximate it - gdk-pixbuf will
 * then perform the required scaling on the completely loaded image. 
 * 
 * If the function sets @width or @height to zero, the module should interpret
 * this as a hint that it will be closed soon and shouldn't allocate further 
 * resources. This convention is used to implement gdk_pixbuf_get_file_info()
 * efficiently.
 * 
 * Since: 2.2
 */
typedef void (* GdkPixbufModuleSizeFunc)           (gint *width, 
						    gint *height, 
						    gpointer user_data);

/**
 * GdkPixbufModulePreparedFunc:
 * @pixbuf: the #GdkPixbuf that is currently being loaded.
 * @anim: if an animation is being loaded, the #GdkPixbufAnimation, else %NULL.
 * @user_data: the loader.
 * 
 * Defines the type of the function that gets called once the initial 
 * setup of @pixbuf is done.
 * 
 * #GdkPixbufLoader uses a function of this type to emit the 
 * "<link linkend="GdkPixbufLoader-area-prepared">area_prepared</link>"
 * signal.
 * 
 * Since: 2.2
 */
typedef void (* GdkPixbufModulePreparedFunc) (GdkPixbuf          *pixbuf,
					      GdkPixbufAnimation *anim,
					      gpointer            user_data);

/**
 * GdkPixbufModuleUpdatedFunc:
 * @pixbuf: the #GdkPixbuf that is currently being loaded.
 * @x: the X origin of the updated area.
 * @y: the Y origin of the updated area.
 * @width: the width of the updated area.
 * @height: the height of the updated area.
 * @user_data: the loader.
 * 
 * Defines the type of the function that gets called every time a region
 * of @pixbuf is updated.
 * 
 * #GdkPixbufLoader uses a function of this type to emit the 
 * "<link linkend="GdkPixbufLoader-area-updated">area_updated</link>"
 * signal.
 * 
 * Since: 2.2
 */
typedef void (* GdkPixbufModuleUpdatedFunc)  (GdkPixbuf *pixbuf,
					      int        x,
					      int        y,
					      int        width,
					      int        height,
					      gpointer   user_data);

/**
 * GdkPixbufModulePattern:
 * @prefix: the prefix for this pattern
 * @mask: mask containing bytes which modify how the prefix is matched against
 *  test data
 * @relevance: relevance of this pattern
 * 
 * The signature of a module is a set of prefixes. Prefixes are encoded as
 * pairs of ordinary strings, where the second string, called the mask, if 
 * not %NULL, must be of the same length as the first one and may contain 
 * ' ', '!', 'x', 'z', and 'n' to indicate bytes that must be matched, 
 * not matched, "don't-care"-bytes, zeros and non-zeros. 
 * Each prefix has an associated integer that describes the relevance of 
 * the prefix, with 0 meaning a mismatch and 100 a "perfect match".
 * 
 * Starting with gdk-pixbuf 2.8, the first byte of the mask may be '*', 
 * indicating an unanchored pattern that matches not only at the beginning, 
 * but also in the middle. Versions prior to 2.8 will interpret the '*'
 * like an 'x'. 
 * 
 * The signature of a module is stored as an array of 
 * #GdkPixbufModulePatterns. The array is terminated by a pattern
 * where the @prefix is %NULL.
 * 
 * 
 * <informalexample><programlisting>
 * GdkPixbufModulePattern *signature[] = {
 *   { "abcdx", " !x z", 100 },
 *   { "bla", NULL,  90 },
 *   { NULL, NULL, 0 }
 * };
 * </programlisting>
 * The example matches e.g. "auud\0" with relevance 100, and "blau" with 
 * relevance 90.</informalexample>
 * 
 * Since: 2.2
 */
typedef struct _GdkPixbufModulePattern GdkPixbufModulePattern;
struct _GdkPixbufModulePattern {
	char *prefix;
	char *mask;
	int relevance;
};

/**
 * GdkPixbufModule:
 * @module_name: the name of the module, usually the same as the
 *  usual file extension for images of this type, eg. "xpm", "jpeg" or "png".
 * @module_path: the path from which the module is loaded.
 * @module: the loaded #GModule.
 * @info: a #GdkPixbufFormat holding information about the module.
 * @load: loads an image from a file.
 * @load_xpm_data: loads an image from data in memory.
 * @begin_load: begins an incremental load.
 * @stop_load: stops an incremental load.
 * @load_increment: continues an incremental load.
 * @load_animation: loads an animation from a file.
 * @save: saves a #GdkPixbuf to a file.
 * @save_to_callback: saves a #GdkPixbuf by calling the given #GdkPixbufSaveFunc.
 * @is_save_option_supported: returns whether a save option key is supported by the module
 * 
 * A #GdkPixbufModule contains the necessary functions to load and save 
 * images in a certain file format. 
 * 
 * A #GdkPixbufModule can be loaded dynamically from a #GModule.
 * Each loadable module must contain a #GdkPixbufModuleFillVtableFunc function 
 * named <function>fill_vtable</function>, which will get called when the module
 * is loaded and must set the function pointers of the #GdkPixbufModule. 
 */
typedef struct _GdkPixbufModule GdkPixbufModule;
struct _GdkPixbufModule {
	char *module_name;
	char *module_path;
	GModule *module;
	GdkPixbufFormat *info;
	
        GdkPixbuf *(* load) (FILE    *f,
                             GError **error);
        GdkPixbuf *(* load_xpm_data) (const char **data);

        /* Incremental loading */

        gpointer (* begin_load)     (GdkPixbufModuleSizeFunc size_func,
                                     GdkPixbufModulePreparedFunc prepare_func,
                                     GdkPixbufModuleUpdatedFunc update_func,
                                     gpointer user_data,
                                     GError **error);
        gboolean (* stop_load)      (gpointer context,
                                     GError **error);
        gboolean (* load_increment) (gpointer      context,
                                     const guchar *buf,
                                     guint         size,
                                     GError      **error);

	/* Animation loading */
	GdkPixbufAnimation *(* load_animation) (FILE    *f,
                                                GError **error);

        /* Saving */
        gboolean (* save) (FILE      *f,
                           GdkPixbuf *pixbuf,
                           gchar    **param_keys,
                           gchar    **param_values,
                           GError   **error);

        gboolean (*save_to_callback) (GdkPixbufSaveFunc save_func,
				      gpointer user_data,
				      GdkPixbuf *pixbuf,
				      gchar **option_keys,
				      gchar **option_values,
				      GError **error);
  
        gboolean (* is_save_option_supported) (const gchar *option_key);

  /*< private >*/
	void (*_reserved1) (void); 
	void (*_reserved2) (void); 
	void (*_reserved3) (void); 
	void (*_reserved4) (void);
};

/**
 * GdkPixbufModuleFillVtableFunc:
 * @module: a #GdkPixbufModule.
 * 
 * Defines the type of the function used to set the vtable of a 
 * #GdkPixbufModule when it is loaded. 
 * 
 * Since: 2.2
 */

typedef void (* GdkPixbufModuleFillVtableFunc) (GdkPixbufModule *module);

/**
 * GdkPixbufModuleFillInfoFunc:
 * @info: a #GdkPixbufFormat.
 * 
 * Defines the type of the function used to fill a 
 * #GdkPixbufFormat structure with information about a module.
 * 
 * Since: 2.2
 */
typedef void (* GdkPixbufModuleFillInfoFunc) (GdkPixbufFormat *info);

/**
 * GdkPixbufFormatFlags:
 * @GDK_PIXBUF_FORMAT_WRITABLE: the module can write out images in the format.
 * @GDK_PIXBUF_FORMAT_SCALABLE: the image format is scalable
 * @GDK_PIXBUF_FORMAT_THREADSAFE: the module is threadsafe. gdk-pixbuf
 *     ignores modules that are not marked as threadsafe. (Since 2.28).
 * 
 * Flags which allow a module to specify further details about the supported
 * operations.
 * 
 * Since: 2.2
 */
typedef enum /*< skip >*/
{
  GDK_PIXBUF_FORMAT_WRITABLE = 1 << 0,
  GDK_PIXBUF_FORMAT_SCALABLE = 1 << 1,
  GDK_PIXBUF_FORMAT_THREADSAFE = 1 << 2
} GdkPixbufFormatFlags;

/**
 * GdkPixbufFormat:
 * @name: the name of the image format.
 * @signature: the signature of the module.
 * @domain: the message domain for the @description.
 * @description: a description of the image format.
 * @mime_types: a %NULL-terminated array of MIME types for the image format.
 * @extensions: a %NULL-terminated array of typical filename extensions for the
 *  image format.
 * @flags: a combination of #GdkPixbufFormatFlags.
 * @disabled: a boolean determining whether the loader is disabled.
 * @license: a string containing license information, typically set to 
 *  shorthands like "GPL", "LGPL", etc.
 * 
 * A #GdkPixbufFormat contains information about the image format accepted by a
 * module. Only modules should access the fields directly, applications should
 * use the <function>gdk_pixbuf_format_*</function> functions.
 * 
 * Since: 2.2
 */
struct _GdkPixbufFormat {
  gchar *name;
  GdkPixbufModulePattern *signature;
  gchar *domain;
  gchar *description;
  gchar **mime_types;
  gchar **extensions;
  guint32 flags;
  gboolean disabled;
  gchar *license;
};

#endif /* GDK_PIXBUF_ENABLE_BACKEND */

G_END_DECLS

#endif /* GDK_PIXBUF_IO_H */


<|start_filename|>node_modules/lru-cache/test/inspect.js<|end_filename|>
// vim: set nowrap:
var util = require('util')
var t = require('tap')
var LRU = require('../')

var l = LRU()

function inspect (str) {
  t.equal(util.inspect(l), str)
  t.equal(l.inspect(), str)
}

inspect('LRUCache {}')

l.max = 10
inspect('LRUCache {\n  max: 10\n}')

l.maxAge = 50
inspect('LRUCache {\n  max: 10,\n  maxAge: 50\n}')

l.set({ foo: 'bar' }, 'baz')
inspect("LRUCache {\n  max: 10,\n  maxAge: 50,\n\n  { foo: 'bar' } => { value: 'baz' }\n}")

l.maxAge = 0
l.set(1, {a: {b: {c: {d: {e: {f: {}}}}}}})
inspect("LRUCache {\n  max: 10,\n\n  1 => { value: { a: { b: [Object] } } },\n  { foo: 'bar' } => { value: 'baz', maxAge: 50 }\n}")

l.allowStale = true
inspect("LRUCache {\n  allowStale: true,\n  max: 10,\n\n  1 => { value: { a: { b: [Object] } } },\n  { foo: 'bar' } => { value: 'baz', maxAge: 50 }\n}")

setTimeout(function () {
  inspect("LRUCache {\n  allowStale: true,\n  max: 10,\n\n  1 => { value: { a: { b: [Object] } } },\n  { foo: 'bar' } => { value: 'baz', maxAge: 50, stale: true }\n}")

  // prune stale items
  l.forEach(function () {})
  inspect('LRUCache {\n  allowStale: true,\n  max: 10,\n\n  1 => { value: { a: { b: [Object] } } }\n}')

  l.lengthCalculator = function () { return 5 }
  inspect('LRUCache {\n  allowStale: true,\n  max: 10,\n  length: 5,\n\n  1 => { value: { a: { b: [Object] } }, length: 5 }\n}')

  l.max = 0
  inspect('LRUCache {\n  allowStale: true,\n  length: 5,\n\n  1 => { value: { a: { b: [Object] } }, length: 5 }\n}')

  l.maxAge = 100
  inspect('LRUCache {\n  allowStale: true,\n  maxAge: 100,\n  length: 5,\n\n  1 => { value: { a: { b: [Object] } }, maxAge: 0, length: 5 }\n}')
  l.allowStale = false
  inspect('LRUCache {\n  maxAge: 100,\n  length: 5,\n\n  1 => { value: { a: { b: [Object] } }, maxAge: 0, length: 5 }\n}')

  l.maxAge = 0
  inspect('LRUCache {\n  length: 5,\n\n  1 => { value: { a: { b: [Object] } }, length: 5 }\n}')

  l.lengthCalculator = null
  inspect('LRUCache {\n  1 => { value: { a: { b: [Object] } } }\n}')
}, 100)


<|start_filename|>node_modules/ext-name/index.js<|end_filename|>
'use strict';
const extList = require('ext-list');
const sortKeysLength = require('sort-keys-length');

module.exports = str => {
	const obj = sortKeysLength.desc(extList());
	const exts = Object.keys(obj).filter(x => str.endsWith(x));

	if (exts.length === 0) {
		return [];
	}

	return exts.map(x => ({
		ext: x,
		mime: obj[x]
	}));
};

module.exports.mime = str => {
	const obj = sortKeysLength.desc(extList());
	const exts = Object.keys(obj).filter(x => obj[x] === str);

	if (exts.length === 0) {
		return [];
	}

	return exts.map(x => ({
		ext: x,
		mime: obj[x]
	}));
};


<|start_filename|>node_modules/sharp/vendor/include/fribidi-unicode.h<|end_filename|>
/* FriBidi
 * fribidi-unicode.h - general Unicode definitions
 *
 * Author:
 *   <NAME>, 2001, 2002, 2004
 *
 * Copyright (C) 2004 <NAME>, Inc
 * Copyright (C) 2001,2002 <NAME>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library, in a file named COPYING; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA
 * 
 * For licensing issues, contact <<EMAIL>>.
 */
#ifndef _FRIBIDI_UNICODE_H
#define _FRIBIDI_UNICODE_H

#include "fribidi-common.h"

#include "fribidi-types.h"

#include "fribidi-begindecls.h"

/* We do not support surrogates yet */
#define FRIBIDI_UNICODE_CHARS	(sizeof(FriBidiChar) >= 4 ? 0x110000 : 0xFFFE)

/* Unicode version - FRIBIDI_UNICODE_VERSION */
#ifdef DONT_HAVE_FRIBIDI_UNICODE_VERSION_H
# define FRIBIDI_UNICODE_VERSION "unknown"
#else /* !DONT_HAVE_FRIBIDI_UNICODE_VERSION_H */
# include "fribidi-unicode-version.h"
#endif /* !DONT_HAVE_FRIBIDI_UNICODE_VERSION_H */

/* An string containing the version the Unicode standard implemented,
 * in the form of "x.y.z", or "unknown". */
extern const char *fribidi_unicode_version;


/* Unicode Bidirectional Algorithm definitions: */

/* Number of types defined in the bidi algorithm */
#define FRIBIDI_BIDI_NUM_TYPES			19

/* The maximum embedding level value assigned by explicit marks */
#define FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL		125

/* The maximum *number* of different resolved embedding levels: 0-126 */
#define FRIBIDI_BIDI_MAX_RESOLVED_LEVELS	127

/* The maximum *number* of nested brackets: 0-63 */
#define FRIBIDI_BIDI_MAX_NESTED_BRACKET_PAIRS   63

/* A few Unicode characters: */

/* Bidirectional marks */
#define FRIBIDI_CHAR_LRM		0x200E
#define FRIBIDI_CHAR_RLM		0x200F
#define FRIBIDI_CHAR_LRE		0x202A
#define FRIBIDI_CHAR_RLE		0x202B
#define FRIBIDI_CHAR_PDF		0x202C
#define FRIBIDI_CHAR_LRO		0x202D
#define FRIBIDI_CHAR_RLO		0x202E
#define FRIBIDI_CHAR_LRI		0x2066
#define FRIBIDI_CHAR_RLI		0x2067
#define FRIBIDI_CHAR_FSI		0x2068
#define FRIBIDI_CHAR_PDI		0x2069

/* Line and Paragraph Separators */
#define FRIBIDI_CHAR_LS			0x2028
#define FRIBIDI_CHAR_PS			0x2029

/* Arabic Joining marks */
#define FRIBIDI_CHAR_ZWNJ		0x200C
#define FRIBIDI_CHAR_ZWJ		0x200D

/* Hebrew and Arabic */
#define FRIBIDI_CHAR_HEBREW_ALEF	0x05D0
#define FRIBIDI_CHAR_ARABIC_ALEF	0x0627
#define FRIBIDI_CHAR_ARABIC_ZERO	0x0660
#define FRIBIDI_CHAR_PERSIAN_ZERO	0x06F0

/* Misc */
#define FRIBIDI_CHAR_ZWNBSP		0xFEFF

/* Char we place for a deleted slot, to delete later */
#define FRIBIDI_CHAR_FILL		FRIBIDI_CHAR_ZWNBSP

#include "fribidi-enddecls.h"

#endif /* !_FRIBIDI_UNICODE_H */
/* Editor directions:
 * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
 */


<|start_filename|>node_modules/sharp/vendor/include/orc/orcinternal.h<|end_filename|>

#ifndef _ORC_INTERNAL_H_
#define _ORC_INTERNAL_H_

#include <orc/orcutils.h>
#include <orc/orclimits.h>

ORC_BEGIN_DECLS

#ifdef ORC_ENABLE_UNSTABLE_API

void orc_mmx_init (void);
void orc_sse_init (void);
void orc_arm_init (void);
void orc_powerpc_init (void);
void orc_c_init (void);
void orc_neon_init (void);
void orc_c64x_init (void);
void orc_c64x_c_init (void);
void orc_mips_init (void);

extern int _orc_data_cache_size_level1;
extern int _orc_data_cache_size_level2;
extern int _orc_data_cache_size_level3;
extern int _orc_cpu_family;
extern int _orc_cpu_model;
extern int _orc_cpu_stepping;
extern const char *_orc_cpu_name;

#endif

ORC_END_DECLS

#endif



<|start_filename|>node_modules/sharp/vendor/include/hb-map.h<|end_filename|>
/*
 * Copyright © 2018  Google, Inc.
 *
 *  This is part of HarfBuzz, a text shaping library.
 *
 * Permission is hereby granted, without written agreement and without
 * license or royalty fees, to use, copy, modify, and distribute this
 * software and its documentation for any purpose, provided that the
 * above copyright notice and the following two paragraphs appear in
 * all copies of this software.
 *
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 *
 * Google Author(s): <NAME>
 */

#ifndef HB_H_IN
#error "Include <hb.h> instead."
#endif

#ifndef HB_MAP_H
#define HB_MAP_H

#include "hb-common.h"

HB_BEGIN_DECLS


/*
 * Since: 1.7.7
 */
#define HB_MAP_VALUE_INVALID ((hb_codepoint_t) -1)

typedef struct hb_map_t hb_map_t;


HB_EXTERN hb_map_t *
hb_map_create (void);

HB_EXTERN hb_map_t *
hb_map_get_empty (void);

HB_EXTERN hb_map_t *
hb_map_reference (hb_map_t *map);

HB_EXTERN void
hb_map_destroy (hb_map_t *map);

HB_EXTERN hb_bool_t
hb_map_set_user_data (hb_map_t           *map,
		      hb_user_data_key_t *key,
		      void *              data,
		      hb_destroy_func_t   destroy,
		      hb_bool_t           replace);

HB_EXTERN void *
hb_map_get_user_data (hb_map_t           *map,
		      hb_user_data_key_t *key);


/* Returns false if allocation has failed before */
HB_EXTERN hb_bool_t
hb_map_allocation_successful (const hb_map_t *map);

HB_EXTERN void
hb_map_clear (hb_map_t *map);

HB_EXTERN hb_bool_t
hb_map_is_empty (const hb_map_t *map);

HB_EXTERN unsigned int
hb_map_get_population (const hb_map_t *map);

HB_EXTERN void
hb_map_set (hb_map_t       *map,
	    hb_codepoint_t  key,
	    hb_codepoint_t  value);

HB_EXTERN hb_codepoint_t
hb_map_get (const hb_map_t *map,
	    hb_codepoint_t  key);

HB_EXTERN void
hb_map_del (hb_map_t       *map,
	    hb_codepoint_t  key);

HB_EXTERN hb_bool_t
hb_map_has (const hb_map_t *map,
	    hb_codepoint_t  key);


HB_END_DECLS

#endif /* HB_MAP_H */


<|start_filename|>node_modules/graphql/jsutils/didYouMean.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = didYouMean;
var MAX_SUGGESTIONS = 5;
/**
 * Given [ A, B, C ] return ' Did you mean A, B, or C?'.
 */

// eslint-disable-next-line no-redeclare
function didYouMean(firstArg, secondArg) {
  var _ref = typeof firstArg === 'string' ? [firstArg, secondArg] : [undefined, firstArg],
      subMessage = _ref[0],
      suggestions = _ref[1];

  var message = ' Did you mean ';

  if (subMessage) {
    message += subMessage + ' ';
  }

  switch (suggestions.length) {
    case 0:
      return '';

    case 1:
      return message + suggestions[0] + '?';

    case 2:
      return message + suggestions[0] + ' or ' + suggestions[1] + '?';
  }

  var selected = suggestions.slice(0, MAX_SUGGESTIONS);
  var lastItem = selected.pop();
  return message + selected.join(', ') + ', or ' + lastItem + '?';
}


<|start_filename|>node_modules/better-queue/test/tickets.js<|end_filename|>
var assert = require('assert');
var Ticket = require('../lib/ticket');
var Tickets = require('../lib/tickets');

describe('Tickets', function() {
  var ts, t1, t2;

  before(function () {
    t1 = new Ticket();
    t2 = new Ticket();
    ts = new Tickets();
    ts.push(t1);
    ts.push(t2);
  })

  it('should accept', function () {
    assert.ok(!t1.isAccepted, 'ticket 1 is not accepted');
    assert.ok(!t2.isAccepted, 'ticket 2 is not accepted');
    ts.accept();
    assert.ok(t1.isAccepted, 'ticket 1 is accepted');
    assert.ok(t2.isAccepted, 'ticket 2 is accepted');
  })

  it('should queue', function () {
    assert.ok(!t1.isQueued, 'ticket 1 is not queued');
    assert.ok(!t2.isQueued, 'ticket 2 is not queued');
    ts.queued();
    assert.ok(t1.isQueued, 'ticket 1 is queued');
    assert.ok(t2.isQueued, 'ticket 2 is queued');
  })

  it('should start and stop', function () {
    assert.ok(!t1.isStarted, 'ticket 1 is not started');
    assert.ok(!t2.isStarted, 'ticket 2 is not started');
    ts.started();
    assert.ok(t1.isStarted, 'ticket 1 is started');
    assert.ok(t2.isStarted, 'ticket 2 is started');
    ts.stopped();
    assert.ok(!t1.isStarted, 'ticket 1 is stopped');
    assert.ok(!t2.isStarted, 'ticket 2 is stopped');
  })

  it('should finish and emit', function (done) {
    assert.ok(!t1.isFinished, 'ticket 1 is not finished');
    assert.ok(!t2.isFinished, 'ticket 2 is not finished');
    t2.once('finish', function (result) {
      assert.deepEqual(result, { x: 1 });
      assert.ok(t2.isFinished, 'ticket 2 is finished');
      done();
    })
    ts.finish({ x: 1 });
  })

  it('should fail and emit', function (done) {
    assert.ok(!t1.isFailed, 'ticket 1 not failed');
    assert.ok(!t2.isFailed, 'ticket 2 not failed');
    var called = 0;
    t1.once('failed', function (err) {
      assert.equal(err, 'some_error');
      assert.ok(t1.isFailed, 'ticket 1 failed');
      called++;
      if (called == 2) { done() }
    })
    t2.once('failed', function (err) {
      assert.equal(err, 'some_error');
      assert.ok(t2.isFailed, 'ticket 2 failed');
      called++;
      if (called == 2) { done() }
    })
    ts.failed('some_error');
  })

  it('should progress and emit', function (done) {
    t1.once('progress', function (progress) {
      assert.equal(progress.pct, 50);
      assert.equal(progress.complete, 1);
      assert.equal(progress.total, 2);
      assert.equal(progress.message, 'test');
      assert.equal(typeof progress.eta, 'string');
      done()
    });
    ts.progress({
      complete: 1,
      total: 2,
      message: 'test'
    });
  })
  
  
})


<|start_filename|>node_modules/probe-image-size/sync.js<|end_filename|>
'use strict';


var parsers = require('./lib/parsers_sync');


function probeBuffer(buffer) {
  var parser_names = Object.keys(parsers);

  for (var i = 0; i < parser_names.length; i++) {
    var result = parsers[parser_names[i]](buffer);

    if (result) return result;
  }

  return null;
}


///////////////////////////////////////////////////////////////////////
// Exports
//

module.exports = function get_image_size(src) {
  return probeBuffer(src);
};

module.exports.parsers = parsers;


<|start_filename|>node_modules/lru-cache/benchmarks/insertion-time.js<|end_filename|>
var LRU = require('../')
var uuid = require("uuid")

var start = Date.now()

var lru = new LRU({
  max: 64 * 1024 * 1024, // 64MB
  length: function (v) {
    return v.key.length + v.value.length
  }
})


var total = 0

console.log("Iters\tAvg\tBytes")
for (x = 0; x < 5000000; ++x) {
  var d = new Date()
  var key = <KEY>
  lru.set(key, {
    key: key,
    value: uuid.v4()
  })

  total += new Date() - d
  var length = lru.length

  if (x % 10000 === 0) {
    console.log(x + "\t" + (total / 10000) + "\t" + length)
    total = 0
  }
}


<|start_filename|>node_modules/npm-conf/lib/util.js<|end_filename|>
'use strict';
const fs = require('fs');
const path = require('path');
const types = require('./types');

// https://github.com/npm/npm/blob/latest/lib/config/core.js#L409-L423
const envReplace = str => {
	if (typeof str !== 'string' || !str) {
		return str;
	}

	// Replace any ${ENV} values with the appropriate environment
	const regex = /(\\*)\$\{([^}]+)\}/g;

	return str.replace(regex, (orig, esc, name) => {
		esc = esc.length > 0 && esc.length % 2;

		if (esc) {
			return orig;
		}

		if (process.env[name] === undefined) {
			throw new Error(`Failed to replace env in config: ${orig}`);
		}

		return process.env[name];
	});
};

// https://github.com/npm/npm/blob/latest/lib/config/core.js#L362-L407
const parseField = (field, key) => {
	if (typeof field !== 'string') {
		return field;
	}

	const typeList = [].concat(types[key]);
	const isPath = typeList.indexOf(path) !== -1;
	const isBool = typeList.indexOf(Boolean) !== -1;
	const isString = typeList.indexOf(String) !== -1;
	const isNumber = typeList.indexOf(Number) !== -1;

	field = `${field}`.trim();

	if (/^".*"$/.test(field)) {
		try {
			field = JSON.parse(field);
		} catch (err) {
			throw new Error(`Failed parsing JSON config key ${key}: ${field}`);
		}
	}

	if (isBool && !isString && field === '') {
		return true;
	}

	switch (field) { // eslint-disable-line default-case
		case 'true': {
			return true;
		}

		case 'false': {
			return false;
		}

		case 'null': {
			return null;
		}

		case 'undefined': {
			return undefined;
		}
	}

	field = envReplace(field);

	if (isPath) {
		const regex = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\//;

		if (regex.test(field) && process.env.HOME) {
			field = path.resolve(process.env.HOME, field.substr(2));
		}

		field = path.resolve(field);
	}

	if (isNumber && !field.isNan()) {
		field = Number(field);
	}

	return field;
};

// https://github.com/npm/npm/blob/latest/lib/config/find-prefix.js
const findPrefix = name => {
	name = path.resolve(name);

	let walkedUp = false;

	while (path.basename(name) === 'node_modules') {
		name = path.dirname(name);
		walkedUp = true;
	}

	if (walkedUp) {
		return name;
	}

	const find = (name, original) => {
		const regex = /^[a-zA-Z]:(\\|\/)?$/;

		if (name === '/' || (process.platform === 'win32' && regex.test(name))) {
			return original;
		}

		try {
			const files = fs.readdirSync(name);

			if (files.indexOf('node_modules') !== -1 || files.indexOf('package.json') !== -1) {
				return name;
			}

			const dirname = path.dirname(name);

			if (dirname === name) {
				return original;
			}

			return find(dirname, original);
		} catch (err) {
			if (name === original) {
				if (err.code === 'ENOENT') {
					return original;
				}

				throw err;
			}

			return original;
		}
	};

	return find(name, name);
};

exports.envReplace = envReplace;
exports.findPrefix = findPrefix;
exports.parseField = parseField;


<|start_filename|>node_modules/type-of/test/tests.js<|end_filename|>
var type   = require('../')
var test = require('tape')

test('should match objects', function (t) {
  function Foo(){}
  t.plan(4)
  t.equal(type({}), 'object')
  t.equal(type(new Foo), 'object')
  t.equal(type(new Boolean(true)), 'object')
  t.equal(type(new Number(123)), 'object')
})

test('should match numbers', function (t) {
  t.plan(1)
  t.equal(type(12), 'number')
})

test('should match strings', function (t) {
  t.plan(1)
  t.equal(type("test"), 'string')
})

test('should match dates', function (t) {
  t.plan(1)
  t.equal(type(new Date), 'date')
})

test('should match booleans', function (t) {
  t.plan(2)
  t.equal(type(true), 'boolean')
  t.equal(type(false), 'boolean')
})

test('should match null', function (t) {
  t.plan(1)
  t.equal(type(null), 'null')
})

test('should match undefined', function (t) {
  t.plan(1)
  t.equal(type(undefined), 'undefined')
})

test('should match arrays', function (t) {
  t.plan(1)
  t.equal(type([]), 'array')
})

test('should match regexps', function (t) {
  t.plan(2)
  t.equal(type(/asdf/), 'regexp')
  t.equal(type(new RegExp('weee')), 'regexp')
})

test('should match functions', function (t) {
  t.plan(1)
  t.equal(type(function(){}), 'function')
})

test('should match arguments', function (t) {
  t.plan(1)
  t.equal(type((function(){ return arguments })()), 'arguments')
})

if (typeof document !== 'undefined') {
  test('should match elements', function (t) {
    t.plan(1)
    t.equal(type(document.createElement('div')), 'element')
  })
}

<|start_filename|>node_modules/lokijs/src/loki-fs-sync-adapter.js<|end_filename|>
/*
  A synchronous version of the Loki Filesystem adapter for node.js

  Intended for diagnostics or environments where synchronous i/o is required.

  This adapter will perform worse than the default LokiFsAdapter but 
  is provided for quick adaptation to synchronous code.
*/

(function (root, factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD
        define([], factory);
    } else if (typeof exports === 'object') {
        // Node, CommonJS-like
        module.exports = factory();
    } else {
        // Browser globals (root is window)
        root.LokiFsSyncAdapter = factory();
    }
}(this, function () {
  return (function() {
    'use strict';

    /**
     * A loki persistence adapter which persists using node fs module
     * @constructor LokiFsSyncAdapter
     */
    function LokiFsSyncAdapter() {
      this.fs = require('fs');
    }

    /**
     * loadDatabase() - Load data from file, will throw an error if the file does not exist
     * @param {string} dbname - the filename of the database to load
     * @param {function} callback - the callback to handle the result
     * @memberof LokiFsSyncAdapter
     */
    LokiFsSyncAdapter.prototype.loadDatabase = function loadDatabase(dbname, callback) {
      var self = this;
      var contents;

      try {
        var stats = this.fs.statSync(dbname);
        if (stats.isFile()) {
          contents = self.fs.readFileSync(dbname, {
            encoding: 'utf8'
          });
          
          callback(contents);
        }
        else {
          callback(null);
        }
      }
      catch (err) {
        // first autoload when file doesn't exist yet
        // should not throw error but leave default
        // blank database.
        if (err.code === "ENOENT") {
          callback(null);
        }
        
        callback(err);
      }
    };

    /**
     * saveDatabase() - save data to file, will throw an error if the file can't be saved
     * might want to expand this to avoid dataloss on partial save
     * @param {string} dbname - the filename of the database to load
     * @param {function} callback - the callback to handle the result
     * @memberof LokiFsSyncAdapter
     */
    LokiFsSyncAdapter.prototype.saveDatabase = function saveDatabase(dbname, dbstring, callback) {
      try {
        this.fs.writeFileSync(dbname, dbstring);
        callback();
      }
      catch (err) {
        callback(err);
      }
    };

    /**
     * deleteDatabase() - delete the database file, will throw an error if the
     * file can't be deleted
     * @param {string} dbname - the filename of the database to delete
     * @param {function} callback - the callback to handle the result
     * @memberof LokiFsSyncAdapter
     */
    LokiFsSyncAdapter.prototype.deleteDatabase = function deleteDatabase(dbname, callback) {
      try {
        this.fs.unlinkSync(dbname);
        callback();
      }
      catch (err) {
        callback(err);
      }
    };

    return LokiFsSyncAdapter;

  }());
}));


<|start_filename|>node_modules/probe-image-size/lib/parse_sync/gif.js<|end_filename|>
'use strict';

/* eslint-disable consistent-return */

var str2arr      = require('../common').str2arr;
var sliceEq      = require('../common').sliceEq;
var readUInt16LE = require('../common').readUInt16LE;


var SIG_GIF87a = str2arr('GIF87a');
var SIG_GIF89a = str2arr('GIF89a');


module.exports = function (data) {
  if (data.length < 10) return;

  if (!sliceEq(data, 0, SIG_GIF87a) && !sliceEq(data, 0, SIG_GIF89a)) return;

  return {
    width:  readUInt16LE(data, 6),
    height: readUInt16LE(data, 8),
    type: 'gif',
    mime: 'image/gif',
    wUnits: 'px',
    hUnits: 'px'
  };
};


<|start_filename|>node_modules/hasha/thread.js<|end_filename|>
'use strict';
const fs = require('fs');
const crypto = require('crypto');
const {parentPort} = require('worker_threads');

const handlers = {
	hashFile: (algorithm, filePath) => new Promise((resolve, reject) => {
		const hasher = crypto.createHash(algorithm);
		fs.createReadStream(filePath)
			// TODO: Use `Stream.pipeline` when targeting Node.js 12.
			.on('error', reject)
			.pipe(hasher)
			.on('error', reject)
			.on('finish', () => {
				const {buffer} = hasher.read();
				resolve({value: buffer, transferList: [buffer]});
			});
	}),
	hash: async (algorithm, input) => {
		const hasher = crypto.createHash(algorithm);

		if (Array.isArray(input)) {
			for (const part of input) {
				hasher.update(part);
			}
		} else {
			hasher.update(input);
		}

		const hash = hasher.digest().buffer;
		return {value: hash, transferList: [hash]};
	}
};

parentPort.on('message', async message => {
	try {
		const {method, args} = message;
		const handler = handlers[method];

		if (handler === undefined) {
			throw new Error(`Unknown method '${method}'`);
		}

		const {value, transferList} = await handler(...args);
		parentPort.postMessage({id: message.id, value}, transferList);
	} catch (error) {
		const newError = {message: error.message, stack: error.stack};

		for (const [key, value] of Object.entries(error)) {
			if (typeof value !== 'object') {
				newError[key] = value;
			}
		}

		parentPort.postMessage({id: message.id, error: newError});
	}
});


<|start_filename|>node_modules/opentracing/lib/noop.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var span_1 = require("./span");
var span_context_1 = require("./span_context");
var tracer_1 = require("./tracer");
exports.tracer = null;
exports.spanContext = null;
exports.span = null;
// Deferred initialization to avoid a dependency cycle where Tracer depends on
// Span which depends on the noop tracer.
function initialize() {
    exports.tracer = new tracer_1.default();
    exports.span = new span_1.default();
    exports.spanContext = new span_context_1.default();
}
exports.initialize = initialize;
//# sourceMappingURL=noop.js.map

<|start_filename|>node_modules/sharp/vendor/include/vips/memory.h<|end_filename|>
/* memory utilities
 *
 * J.Cupitt, 8/4/93
 */

/*

    This file is part of VIPS.

    VIPS is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301  USA

 */

/*

    These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk

 */

#ifndef VIPS_MEMORY_H
#define VIPS_MEMORY_H

#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/

#define VIPS_FREEF( F, S ) G_STMT_START { \
        if( S ) { \
                (void) F( (S) ); \
                (S) = 0; \
        } \
} G_STMT_END

#define VIPS_FREE( S ) VIPS_FREEF( g_free, (S) );

#define VIPS_SETSTR( S, V ) \
G_STMT_START { \
        const char *sst = (V); \
	\
        if( (S) != sst ) { \
                if( !(S) || !sst || strcmp( (S), sst ) != 0 ) { \
                        VIPS_FREE( S ); \
                        if( sst ) \
                                (S) = g_strdup( sst ); \
                } \
        } \
} G_STMT_END

#define VIPS_NEW( OBJ, T ) \
	((T *) vips_malloc( VIPS_OBJECT( OBJ ), sizeof( T )))
#define VIPS_ARRAY( OBJ, N, T ) \
	((T *) vips_malloc( VIPS_OBJECT( OBJ ), (N) * sizeof( T )))

void *vips_malloc( VipsObject *object, size_t size );
char *vips_strdup( VipsObject *object, const char *str );
int vips_free( void *buf );

void vips_tracked_free( void *s );
void *vips_tracked_malloc( size_t size );
size_t vips_tracked_get_mem( void );
size_t vips_tracked_get_mem_highwater( void );
int vips_tracked_get_allocs( void );

int vips_tracked_open( const char *pathname, int flags, ... );
int vips_tracked_close( int fd );
int vips_tracked_get_files( void );

#ifdef __cplusplus
}
#endif /*__cplusplus*/

#endif /*IM_MEMORY_H*/


<|start_filename|>node_modules/@jimp/jpeg/dist/index.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

require("core-js/modules/es6.object.define-property");

var _jpegJs = _interopRequireDefault(require("jpeg-js"));

var _utils = require("@jimp/utils");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var MIME_TYPE = 'image/jpeg';

var _default = function _default() {
  return {
    mime: _defineProperty({}, MIME_TYPE, ['jpeg', 'jpg', 'jpe']),
    constants: {
      MIME_JPEG: MIME_TYPE
    },
    decoders: _defineProperty({}, MIME_TYPE, _jpegJs.default.decode),
    encoders: _defineProperty({}, MIME_TYPE, function (image) {
      return _jpegJs.default.encode(image.bitmap, image._quality).data;
    }),
    class: {
      // The quality to be used when saving JPEG images
      _quality: 100,

      /**
       * Sets the quality of the image when saving as JPEG format (default is 100)
       * @param {number} n The quality to use 0-100
       * @param {function(Error, Jimp)} cb (optional) a callback for when complete
       * @returns {Jimp} this for chaining of methods
       */
      quality: function quality(n, cb) {
        if (typeof n !== 'number') {
          return _utils.throwError.call(this, 'n must be a number', cb);
        }

        if (n < 0 || n > 100) {
          return _utils.throwError.call(this, 'n must be a number 0 - 100', cb);
        }

        this._quality = Math.round(n);

        if ((0, _utils.isNodePattern)(cb)) {
          cb.call(this, null, this);
        }

        return this;
      }
    }
  };
};

exports.default = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/sharp/vendor/include/orc-test/orcprofile.h<|end_filename|>
/*
 * Orc - Oil Runtime Compiler
 * Copyright (c) 2003,2004 <NAME> <<EMAIL>>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef _ORC_PROFILE_H_
#define _ORC_PROFILE_H_

#include <orc/orcutils.h>

ORC_BEGIN_DECLS

/**
 * ORC_PROFILE_HIST_LENGTH
 *
 * Internal definition of the number of histogram entries in #OrcProfile.
 */
#define ORC_PROFILE_HIST_LENGTH 10

typedef struct _OrcProfile OrcProfile;
/**
 * OrcProfile:
 *
 * An opaque structure representing profiling information.
 */
struct _OrcProfile {
  /*< private >*/
  unsigned long start;
  unsigned long stop;
  unsigned long min;
  unsigned long last;
  unsigned long total;
  int n;

  int hist_n;
  unsigned long hist_time[ORC_PROFILE_HIST_LENGTH];
  int hist_count[ORC_PROFILE_HIST_LENGTH];
};

unsigned long orc_profile_stamp(void);
void orc_profile_init(OrcProfile *prof);
void orc_profile_stop_handle(OrcProfile *prof);
void orc_profile_get_ave_std (OrcProfile *prof, double *ave_p, double *std_p);

/**
 * orc_profile_start:
 * @x: a pointer to an OrcProfile structure
 *
 * Starts a profiling run by obtaining a timestamp via orc_profile_stamp()
 * and writing it into @x.
 */
#define orc_profile_start(x) do{ \
	(x)->start = orc_profile_stamp(); \
}while(0)
/**
 * orc_profile_stop:
 * @x: a pointer to an OrcProfile structure
 *
 * Stops a profiling run by obtaining a timestamp via orc_profile_stamp()
 * and writing it into @x.  It then calls orc_profile_stop_handle() to
 * handle post-processing of the profiling run.
 */
#define orc_profile_stop(x) do{ \
	(x)->stop = orc_profile_stamp(); \
        orc_profile_stop_handle(x); \
}while(0)


ORC_END_DECLS

#endif



<|start_filename|>node_modules/yurnalist/examples/messages-with-symbols.js<|end_filename|>
/* @noflow */
const report = require('../dist').createReporter({
  useMessageSymbols: true,
});

report.log('A normal message without any decoration');
report.info('An info message');
report.warn('This is a warning');
report.error('A plain error message');
report.error(new Error('A message from an Error object'));
report.success('Congratulations');
report.success('Success with a check', '✔');
report.command('echo "some command"');

report.info(report.lang('savedNewDependencies', 53738));


<|start_filename|>node_modules/lokijs/src/loki-nativescript-adapter.js<|end_filename|>
 /**
 * LokiNativescriptAdapter
 * @author <NAME> <<EMAIL>>
 *
 * Lokijs adapter for nativescript framework (http://www.nativescript.org)
 *
 * The db file is created in the app documents folder. 
 
 * How to use:
 * Just create a new loki db and your ready to go: 
 * 
 * let db = new loki('loki.json',{autosave:true});
 * 
 */

function LokiNativescriptAdapter() {
      this.fs = require("file-system");
  }
  
LokiNativescriptAdapter.prototype.loadDatabase = function(dbname, callback){
    var documents = this.fs.knownFolders.documents();
    var myFile = documents.getFile(dbname);    
    //Read from filesystem
    myFile.readText()
            .then(function (content) {
                //The file is empty or missing
                if (content===""){
                    callback(new Error("DB file does not exist"));
                } else {
                    callback(content);    
                }
            }, function (error) {
                console.log("Error opening db "+dbname+": "+ error);
                 callback(new Error(error));
            });
};

LokiNativescriptAdapter.prototype.saveDatabase = function(dbname, serialized, callback){
    var documents = this.fs.knownFolders.documents();
    var myFile = documents.getFile(dbname);    
    myFile.writeText(serialized)
            .then(function () {
                callback();
            }, function (error) {
                console.log("Error saving db "+dbname+": "+ error);
            });
    
};

LokiNativescriptAdapter.prototype.deleteDatabase = function deleteDatabase(dbname, callback) {
      var documents = this.fs.knownFolders.documents();
      var file = documents.getFile(dbname);
      file.remove()
            .then(function (result) {
            callback();
            }, function (error) {
                callback(error);
            });
    };
    
module.exports = LokiNativescriptAdapter;

<|start_filename|>node_modules/probe-image-size/lib/parse_sync/tiff.js<|end_filename|>
'use strict';

/* eslint-disable consistent-return */

var str2arr = require('../common').str2arr;
var sliceEq = require('../common').sliceEq;
var readUInt16LE = require('../common').readUInt16LE;
var readUInt16BE = require('../common').readUInt16BE;
var readUInt32LE = require('../common').readUInt32LE;
var readUInt32BE = require('../common').readUInt32BE;


var SIG_1 = str2arr('II\x2A\0');
var SIG_2 = str2arr('MM\0\x2A');


function readUInt16(buffer, offset, is_big_endian) {
  return is_big_endian ? readUInt16BE(buffer, offset) : readUInt16LE(buffer, offset);
}

function readUInt32(buffer, offset, is_big_endian) {
  return is_big_endian ? readUInt32BE(buffer, offset) : readUInt32LE(buffer, offset);
}

function readIFDValue(data, data_offset, is_big_endian) {
  var type       = readUInt16(data, data_offset + 2, is_big_endian);
  var values     = readUInt32(data, data_offset + 4, is_big_endian);

  if (values !== 1 || (type !== 3 && type !== 4)) return null;

  if (type === 3) {
    return readUInt16(data, data_offset + 8, is_big_endian);
  }

  return readUInt32(data, data_offset + 8, is_big_endian);
}

module.exports = function (data) {
  if (data.length < 8) return;

  // check TIFF signature
  if (!sliceEq(data, 0, SIG_1) && !sliceEq(data, 0, SIG_2)) return;

  var is_big_endian = (data[0] === 77 /* 'MM' */);
  var count = readUInt32(data, 4, is_big_endian) - 8;

  if (count < 0) return;

  // skip until IFD
  var offset = count + 8;

  if (data.length - offset < 2) return;

  // read number of IFD entries
  var ifd_size = readUInt16(data, offset + 0, is_big_endian) * 12;

  if (ifd_size <= 0) return;

  offset += 2;

  // read all IFD entries
  if (data.length - offset < ifd_size) return;

  var i, width, height, tag;

  for (i = 0; i < ifd_size; i += 12) {
    tag = readUInt16(data, offset + i, is_big_endian);

    if (tag === 256) {
      width = readIFDValue(data, offset + i, is_big_endian);
    } else if (tag === 257) {
      height = readIFDValue(data, offset + i, is_big_endian);
    }
  }

  if (width && height) {
    return {
      width:  width,
      height: height,
      type:   'tiff',
      mime:   'image/tiff',
      wUnits: 'px',
      hUnits: 'px'
    };
  }
};


<|start_filename|>node_modules/get-proxy/index.js<|end_filename|>
'use strict';
const npmConf = require('npm-conf')();

module.exports = () => {
	return process.env.HTTPS_PROXY ||
		process.env.https_proxy ||
		process.env.HTTP_PROXY ||
		process.env.http_proxy ||
		npmConf.get('https-proxy') ||
		npmConf.get('http-proxy') ||
		npmConf.get('proxy') ||
		null;
};


<|start_filename|>node_modules/sharp/vendor/include/orc/orconce.h<|end_filename|>

#ifndef _ORC_ONCE_H_
#define _ORC_ONCE_H_

#include <orc/orcutils.h>

ORC_BEGIN_DECLS

typedef struct _OrcMutex OrcMutex;

typedef struct _OrcOnce OrcOnce;

struct _OrcOnce {
  int inited;
  void *value;
};

void orc_once_mutex_lock (void);
void orc_once_mutex_unlock (void);

ORC_END_DECLS

#endif



<|start_filename|>node_modules/sharp/vendor/include/orc/orcmips.h<|end_filename|>
/*
  Copyright 2002 - 2009 <NAME> <<EMAIL>>
  Copyright 2012 MIPS Technologies, Inc.

  Author: <NAME> <<EMAIL>>

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:
  1. Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in the
     documentation and/or other materials provided with the distribution.

  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.

*/

#ifndef _ORC_MIPS_H_
#define _ORC_MIPS_H_

#include <orc/orcutils.h>
#include <orc/orcprogram.h>

ORC_BEGIN_DECLS

#ifdef ORC_ENABLE_UNSTABLE_API

typedef enum {
  ORC_TARGET_MIPS_FRAME_POINTER = (1<<0),
} OrcTargetMipsFlags;

typedef enum {
  ORC_MIPS_ZERO = ORC_GP_REG_BASE+0,
  ORC_MIPS_AT,
  ORC_MIPS_V0,
  ORC_MIPS_V1,
  ORC_MIPS_A0,
  ORC_MIPS_A1,
  ORC_MIPS_A2,
  ORC_MIPS_A3,
  ORC_MIPS_T0,
  ORC_MIPS_T1,
  ORC_MIPS_T2,
  ORC_MIPS_T3,
  ORC_MIPS_T4,
  ORC_MIPS_T5,
  ORC_MIPS_T6,
  ORC_MIPS_T7,
  ORC_MIPS_S0,
  ORC_MIPS_S1,
  ORC_MIPS_S2,
  ORC_MIPS_S3,
  ORC_MIPS_S4,
  ORC_MIPS_S5,
  ORC_MIPS_S6,
  ORC_MIPS_S7,
  ORC_MIPS_T8,
  ORC_MIPS_T9,
  ORC_MIPS_K0,
  ORC_MIPS_K1,
  ORC_MIPS_GP,
  ORC_MIPS_SP,
  ORC_MIPS_FP,
  ORC_MIPS_RA
} OrcMipsRegister;

void orc_mips_emit_label (OrcCompiler *compiler, unsigned int label);

void orc_mips_emit_nop (OrcCompiler *compiler);

void orc_mips_emit_sw (OrcCompiler *compiler, OrcMipsRegister reg,
                       OrcMipsRegister base, unsigned int offset);
void orc_mips_emit_swr (OrcCompiler *compiler, OrcMipsRegister reg,
                        OrcMipsRegister base, unsigned int offset);
void orc_mips_emit_swl (OrcCompiler *compiler, OrcMipsRegister reg,
                        OrcMipsRegister base, unsigned int offset);
void orc_mips_emit_sh (OrcCompiler *compiler, OrcMipsRegister reg,
                       OrcMipsRegister base, unsigned int offset);
void orc_mips_emit_sb (OrcCompiler *compiler, OrcMipsRegister reg,
                       OrcMipsRegister base, unsigned int offset);
void orc_mips_emit_lw (OrcCompiler *compiler, OrcMipsRegister dest,
                       OrcMipsRegister base, unsigned int offset);
void orc_mips_emit_lwr (OrcCompiler *compiler, OrcMipsRegister dest,
                        OrcMipsRegister base, unsigned int offset);
void orc_mips_emit_lwl (OrcCompiler *compiler, OrcMipsRegister dest,
                        OrcMipsRegister base, unsigned int offset);
void orc_mips_emit_lh (OrcCompiler *compiler, OrcMipsRegister dest,
                       OrcMipsRegister base, unsigned int offset);
void orc_mips_emit_lb (OrcCompiler *compiler, OrcMipsRegister dest,
                       OrcMipsRegister base, unsigned int offset);
void orc_mips_emit_lbu (OrcCompiler *compiler, OrcMipsRegister dest,
                       OrcMipsRegister base, unsigned int offset);

void orc_mips_emit_jr (OrcCompiler *compiler, OrcMipsRegister address_reg);
void orc_mips_emit_conditional_branch (OrcCompiler *compiler, int condition,
                                       OrcMipsRegister rs, OrcMipsRegister rt,
                                       unsigned int label);
void orc_mips_emit_conditional_branch_with_offset (OrcCompiler *compiler,
                                                   int condition,
                                                   OrcMipsRegister rs,
                                                   OrcMipsRegister rt,
                                                   int offset);

enum {
  ORC_MIPS_BEQ = 04,
  ORC_MIPS_BNE,
  ORC_MIPS_BLEZ,
  ORC_MIPS_BGTZ,

  /* instructions are encoded differently from here on*/
  ORC_MIPS_BLTZ,
  ORC_MIPS_BGEZ,
};

#define orc_mips_emit_beqz(compiler, reg, label) \
    orc_mips_emit_conditional_branch(compiler, ORC_MIPS_BEQ, reg, ORC_MIPS_ZERO, label)
#define orc_mips_emit_bnez(compiler, reg, label) \
    orc_mips_emit_conditional_branch(compiler, ORC_MIPS_BNE, reg, ORC_MIPS_ZERO, label)
#define orc_mips_emit_blez(compiler, reg, label) \
    orc_mips_emit_conditional_branch(compiler, ORC_MIPS_BLEZ, reg, ORC_MIPS_ZERO, label)
#define orc_mips_emit_beq(compiler, reg1, reg2, label) \
    orc_mips_emit_conditional_branch(compiler, ORC_MIPS_BEQ, reg1, reg2, label)

void orc_mips_emit_addiu (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value);
void orc_mips_emit_addi (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value);
void orc_mips_emit_add (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_addu (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_addu_qb (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_addu_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_addq_s_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_adduh_r_qb (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_move (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source);
void orc_mips_emit_sub (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_subu_qb (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_subq_s_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_subq_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_subu_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_srl (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value);
void orc_mips_emit_sll (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value);
void orc_mips_emit_sra (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value);
void orc_mips_emit_shll_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value);
void orc_mips_emit_shra_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value);
void orc_mips_emit_shrl_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value);
void orc_mips_emit_andi (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value);
void orc_mips_emit_or (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_and (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_ori (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value);
void orc_mips_emit_lui (OrcCompiler *compiler, OrcMipsRegister dest, int value);
void orc_mips_emit_mul (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_mul_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);

void orc_mips_emit_append (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int shift_amount);

void orc_mips_emit_prepend (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int shift_amount);

void orc_mips_emit_mtlo (OrcCompiler *compiler, OrcMipsRegister source);

void orc_mips_emit_extr_s_h (OrcCompiler *compiler, OrcMipsRegister dest, int accumulator, int shift);

void orc_mips_emit_slt (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister src1, OrcMipsRegister src2);
void orc_mips_emit_movn (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister src, OrcMipsRegister condition);

void orc_mips_emit_repl_ph (OrcCompiler *compiler, OrcMipsRegister dest, int value);
void orc_mips_emit_replv_qb (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source);
void orc_mips_emit_replv_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source);
void orc_mips_emit_preceu_ph_qbr (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source);
void orc_mips_emit_precr_qb_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_precrq_qb_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_cmp_lt_ph (OrcCompiler *compiler, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_pick_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);

void orc_mips_emit_packrl_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2);
void orc_mips_emit_align (OrcCompiler *compiler, int align_shift);

void orc_mips_emit_wsbh (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source);
void orc_mips_emit_seh (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source);

void orc_mips_emit_pref (OrcCompiler *compiler, int hint, OrcMipsRegister base, int offset);

void orc_mips_do_fixups (OrcCompiler *compiler);

/* ORC_STRUCT_OFFSET doesn't work for cross-compiling, so we use that */

#define ORC_MIPS_EXECUTOR_OFFSET_PROGRAM 0
#define ORC_MIPS_EXECUTOR_OFFSET_N 4
#define ORC_MIPS_EXECUTOR_OFFSET_COUNTER1 8
#define ORC_MIPS_EXECUTOR_OFFSET_COUNTER2 12
#define ORC_MIPS_EXECUTOR_OFFSET_COUNTER3 16
#define ORC_MIPS_EXECUTOR_OFFSET_ARRAYS(i) (20 + 4 * i)
#define ORC_MIPS_EXECUTOR_OFFSET_PARAMS(i) (276 + 4 * i)
#define ORC_MIPS_EXECUTOR_OFFSET_ACCUMULATORS(i) (532 + 4 * i)

#endif /* ORC_ENABLE_UNSTABLE_API */

ORC_END_DECLS

#endif /* _ORC_MIPS_H_ */


<|start_filename|>node_modules/yurnalist/examples/inspect.js<|end_filename|>
/* @noflow */
const report = require('../dist');
/* eslint-disable flowtype/require-return-type */
const anArray = ['some', 'values', () => 'hello', 3654, true];
const anObject = {
  string: 'value',
  fun: (a, b) => a + b,
  number: 42,
  symbol: Symbol('some symbol'),
  boolean: true,
  array: anArray,
};

anObject.nestedObject = Object.assign({}, anObject);

report.inspect(anObject);


<|start_filename|>node_modules/sift/test/immutable-test.js<|end_filename|>
var assert = require("assert"),
Immutable = require("immutable"),
sift = require(".."),
ObjectID = require('bson').pure().ObjectID;

describe(__filename + "#", function() {

  it("can use custom operators", function() {

    var i = 0;

    sift.use({
      $abba: function(a, b) {
        i++;
      }
    });

    sift({ a: {$abba:-1}}, Immutable.List([1, 2, 3]));

    // expect(i).to.be(3);
    assert.equal(i, 3);
  });

  var topic = Immutable.List([1, 2, 3, 4, 5, 6, 6, 4, 3]);

  it("works with Immutable.List", function() {
    assert.equal(sift({$notb: 6 }, topic).includes(6), false);
  });

  var persons = Immutable.fromJS([{ person: {age: 3} }, { person: {age: 5} }, { person: {age: 8} }]);

  it("works with Immutable.Map in a Immutable.List", function() {
    assert.equal(sift({ 'person.age' : { $gt: 4 } }, persons).size, 2);
    assert.equal(persons.filter(sift({ 'person.age' : { $gt: 4 } })).size, 2);
  });
});


<|start_filename|>node_modules/react-hot-loader/index.js<|end_filename|>
'use strict';

if (process.env.NODE_ENV === 'production') {
  module.exports = require('./dist/react-hot-loader.production.min.js');
} else if (process.env.NODE_ENV === 'test') {
  module.exports = require('./dist/react-hot-loader.production.min.js');
} else if (typeof window === 'undefined') {
  // this is just server environment
  module.exports = require('./dist/react-hot-loader.production.min.js');
} else if (!module.hot) {
  module.exports = require('./dist/react-hot-loader.production.min.js');
  module.exports.AppContainer.warnAboutHMRDisabled = true;
  module.exports.hot.shouldWrapWithAppContainer = true;
} else {
  var evalAllowed = false;
  var evalError = null;
  try {
    eval('evalAllowed = true');
  } catch (e) {
    // eval not allowed due to CSP
    evalError = e && e.message ? e.message : 'unknown reason';
  }

  // TODO: dont use eval to update methods. see #1273
  // RHL needs setPrototypeOf to operate Component inheritance, and eval to patch methods
  var jsFeaturesPresent = !!Object.setPrototypeOf;

  if (!jsFeaturesPresent || !evalAllowed) {
    // we are not in prod mode, but RHL could not be activated
    console.warn(
      'React-Hot-Loader is not supported in this environment:',
      [
        !jsFeaturesPresent && "some JS features are missing",
        !evalAllowed && "`eval` is not allowed(" + evalError + ")"
      ].join(','),
      '.'
    );
    module.exports = require('./dist/react-hot-loader.production.min.js');
  } else {
    module.exports = window.reactHotLoaderGlobal = require('./dist/react-hot-loader.development.js');
  }
}


<|start_filename|>node_modules/better-queue/test/fixtures/PostgresAdapter.js<|end_filename|>
var PostgresAdapter = require('../../lib/stores/PostgresAdapter');

function MockPostgresAdapter(opts) {
  opts.verbose = false;
  opts.username = 'diamond';
  opts.dbname = 'diamond';
  PostgresAdapter.call(this, opts);
}

MockPostgresAdapter.prototype = Object.create(PostgresAdapter.prototype);

module.exports = MockPostgresAdapter;


<|start_filename|>node_modules/sharp/vendor/include/glib-2.0/gio/gvfs.h<|end_filename|>
/* GIO - GLib Input, Output and Streaming Library
 *
 * Copyright (C) 2006-2007 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
 *
 * Author: <NAME> <<EMAIL>>
 */

#ifndef __G_VFS_H__
#define __G_VFS_H__

#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif

#include <gio/giotypes.h>

G_BEGIN_DECLS

#define G_TYPE_VFS         (g_vfs_get_type ())
#define G_VFS(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VFS, GVfs))
#define G_VFS_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VFS, GVfsClass))
#define G_VFS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VFS, GVfsClass))
#define G_IS_VFS(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VFS))
#define G_IS_VFS_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VFS))

/**
 * GVfsFileLookupFunc:
 * @vfs: a #GVfs
 * @identifier: the identifier to lookup a #GFile for. This can either
 *     be an URI or a parse name as returned by g_file_get_parse_name()
 * @user_data: user data passed to the function
 *
 * This function type is used by g_vfs_register_uri_scheme() to make it
 * possible for a client to associate an URI scheme to a different #GFile
 * implementation.
 *
 * The client should return a reference to the new file that has been
 * created for @uri, or %NULL to continue with the default implementation.
 *
 * Returns: (transfer full): a #GFile for @identifier.
 *
 * Since: 2.50
 */
typedef GFile * (* GVfsFileLookupFunc) (GVfs       *vfs,
                                        const char *identifier,
                                        gpointer    user_data);

/**
 * G_VFS_EXTENSION_POINT_NAME:
 *
 * Extension point for #GVfs functionality.
 * See [Extending GIO][extending-gio].
 */
#define G_VFS_EXTENSION_POINT_NAME "gio-vfs"

/**
 * GVfs:
 *
 * Virtual File System object.
 **/
typedef struct _GVfsClass    GVfsClass;

struct _GVfs
{
  GObject parent_instance;
};

struct _GVfsClass
{
  GObjectClass parent_class;

  /* Virtual Table */

  gboolean              (* is_active)                 (GVfs       *vfs);
  GFile               * (* get_file_for_path)         (GVfs       *vfs,
                                                       const char *path);
  GFile               * (* get_file_for_uri)          (GVfs       *vfs,
                                                       const char *uri);
  const gchar * const * (* get_supported_uri_schemes) (GVfs       *vfs);
  GFile               * (* parse_name)                (GVfs       *vfs,
                                                       const char *parse_name);

  /*< private >*/
  void                  (* local_file_add_info)       (GVfs       *vfs,
						       const char *filename,
						       guint64     device,
						       GFileAttributeMatcher *attribute_matcher,
						       GFileInfo  *info,
						       GCancellable *cancellable,
						       gpointer   *extra_data,
						       GDestroyNotify *free_extra_data);
  void                  (* add_writable_namespaces)   (GVfs       *vfs,
						       GFileAttributeInfoList *list);
  gboolean              (* local_file_set_attributes) (GVfs       *vfs,
						       const char *filename,
						       GFileInfo  *info,
                                                       GFileQueryInfoFlags flags,
                                                       GCancellable *cancellable,
						       GError    **error);
  void                  (* local_file_removed)        (GVfs       *vfs,
						       const char *filename);
  void                  (* local_file_moved)          (GVfs       *vfs,
						       const char *source,
						       const char *dest);
  GIcon *               (* deserialize_icon)          (GVfs       *vfs,
                                                       GVariant   *value);
  /* Padding for future expansion */
  void (*_g_reserved1) (void);
  void (*_g_reserved2) (void);
  void (*_g_reserved3) (void);
  void (*_g_reserved4) (void);
  void (*_g_reserved5) (void);
  void (*_g_reserved6) (void);
};

GLIB_AVAILABLE_IN_ALL
GType                 g_vfs_get_type                  (void) G_GNUC_CONST;

GLIB_AVAILABLE_IN_ALL
gboolean              g_vfs_is_active                 (GVfs       *vfs);
GLIB_AVAILABLE_IN_ALL
GFile *               g_vfs_get_file_for_path         (GVfs       *vfs,
                                                       const char *path);
GLIB_AVAILABLE_IN_ALL
GFile *               g_vfs_get_file_for_uri          (GVfs       *vfs,
                                                       const char *uri);
GLIB_AVAILABLE_IN_ALL
const gchar* const * g_vfs_get_supported_uri_schemes  (GVfs       *vfs);

GLIB_AVAILABLE_IN_ALL
GFile *               g_vfs_parse_name                (GVfs       *vfs,
                                                       const char *parse_name);

GLIB_AVAILABLE_IN_ALL
GVfs *                g_vfs_get_default               (void);
GLIB_AVAILABLE_IN_ALL
GVfs *                g_vfs_get_local                 (void);

GLIB_AVAILABLE_IN_2_50
gboolean              g_vfs_register_uri_scheme       (GVfs               *vfs,
                                                       const char         *scheme,
                                                       GVfsFileLookupFunc  uri_func,
                                                       gpointer            uri_data,
                                                       GDestroyNotify      uri_destroy,
                                                       GVfsFileLookupFunc  parse_name_func,
                                                       gpointer            parse_name_data,
                                                       GDestroyNotify      parse_name_destroy);
GLIB_AVAILABLE_IN_2_50
gboolean              g_vfs_unregister_uri_scheme     (GVfs               *vfs,
                                                       const char         *scheme);


G_END_DECLS

#endif /* __G_VFS_H__ */


<|start_filename|>node_modules/graphql-config/lib/findGraphQLConfigFile.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var path_1 = require("path");
var fs_1 = require("fs");
var errors_1 = require("./errors");
exports.GRAPHQL_CONFIG_NAME = '.graphqlconfig';
exports.GRAPHQL_CONFIG_YAML_NAME = '.graphqlconfig.yaml';
exports.GRAPHQL_CONFIG_YML_NAME = '.graphqlconfig.yml';
function isRootDir(path) {
    return path_1.dirname(path) === path;
}
function findGraphQLConfigFile(filePath) {
    filePath = path_1.resolve(filePath);
    if (filePath.endsWith(exports.GRAPHQL_CONFIG_NAME) ||
        filePath.endsWith(exports.GRAPHQL_CONFIG_YAML_NAME) ||
        filePath.endsWith(exports.GRAPHQL_CONFIG_YML_NAME)) {
        return filePath;
    }
    var currentDir = filePath;
    while (!isRootDir(currentDir)) {
        var configPath = path_1.join(currentDir, exports.GRAPHQL_CONFIG_NAME);
        if (fs_1.existsSync(configPath)) {
            return configPath;
        }
        if (fs_1.existsSync(configPath + '.yaml')) {
            return configPath + '.yaml';
        }
        if (fs_1.existsSync(configPath + '.yml')) {
            return configPath + '.yml';
        }
        currentDir = path_1.dirname(currentDir);
    }
    // Try to find GraphQL config in first level of sub-directories.
    var subDirectories = fs_1.readdirSync(filePath).map(function (dir) { return path_1.join(filePath, dir); }).filter(function (dir) {
        return (fs_1.lstatSync(dir).isDirectory());
    });
    var subDirectoriesWithGraphQLConfig = subDirectories.map(function (subDirectory) {
        var subDirectoryFiles = fs_1.readdirSync(subDirectory)
            .filter(function (file) {
            return !(fs_1.lstatSync(path_1.join(subDirectory, file)).isDirectory());
        })
            .map(function (file) {
            return path_1.basename(path_1.join(subDirectory, file));
        });
        if (subDirectoryFiles.includes(exports.GRAPHQL_CONFIG_NAME)) {
            return subDirectory + "/" + exports.GRAPHQL_CONFIG_NAME;
        }
        if (subDirectoryFiles.includes(exports.GRAPHQL_CONFIG_NAME + ".yml")) {
            return subDirectory + "/" + exports.GRAPHQL_CONFIG_NAME + ".yml";
        }
        if (subDirectoryFiles.includes(exports.GRAPHQL_CONFIG_NAME + ".yaml")) {
            return subDirectory + "/" + exports.GRAPHQL_CONFIG_NAME + ".yaml";
        }
    }).filter(function (subDirectory) { return Boolean(subDirectory); });
    if (subDirectoriesWithGraphQLConfig.length > 0) {
        return subDirectoriesWithGraphQLConfig[0];
    }
    throw new errors_1.ConfigNotFoundError("\"" + exports.GRAPHQL_CONFIG_NAME + "\" file is not available in the provided config " +
        ("directory: " + filePath + "\nPlease check the config directory."));
}
exports.findGraphQLConfigFile = findGraphQLConfigFile;


<|start_filename|>node_modules/react-side-effect/lib/index.es.js<|end_filename|>
import React, { Component } from 'react';
import ExecutionEnvironment from 'exenv';
import shallowEqual from 'shallowequal';

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

function withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {
  if (typeof reducePropsToState !== 'function') {
    throw new Error('Expected reducePropsToState to be a function.');
  }
  if (typeof handleStateChangeOnClient !== 'function') {
    throw new Error('Expected handleStateChangeOnClient to be a function.');
  }
  if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {
    throw new Error('Expected mapStateOnServer to either be undefined or a function.');
  }

  function getDisplayName(WrappedComponent) {
    return WrappedComponent.displayName || WrappedComponent.name || 'Component';
  }

  return function wrap(WrappedComponent) {
    if (typeof WrappedComponent !== 'function') {
      throw new Error('Expected WrappedComponent to be a React component.');
    }

    var mountedInstances = [];
    var state = void 0;

    function emitChange() {
      state = reducePropsToState(mountedInstances.map(function (instance) {
        return instance.props;
      }));

      if (SideEffect.canUseDOM) {
        handleStateChangeOnClient(state);
      } else if (mapStateOnServer) {
        state = mapStateOnServer(state);
      }
    }

    var SideEffect = function (_Component) {
      _inherits(SideEffect, _Component);

      function SideEffect() {
        _classCallCheck(this, SideEffect);

        return _possibleConstructorReturn(this, _Component.apply(this, arguments));
      }

      // Try to use displayName of wrapped component
      SideEffect.peek = function peek() {
        return state;
      };

      // Expose canUseDOM so tests can monkeypatch it


      SideEffect.rewind = function rewind() {
        if (SideEffect.canUseDOM) {
          throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');
        }

        var recordedState = state;
        state = undefined;
        mountedInstances = [];
        return recordedState;
      };

      SideEffect.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
        return !shallowEqual(nextProps, this.props);
      };

      SideEffect.prototype.componentWillMount = function componentWillMount() {
        mountedInstances.push(this);
        emitChange();
      };

      SideEffect.prototype.componentDidUpdate = function componentDidUpdate() {
        emitChange();
      };

      SideEffect.prototype.componentWillUnmount = function componentWillUnmount() {
        var index = mountedInstances.indexOf(this);
        mountedInstances.splice(index, 1);
        emitChange();
      };

      SideEffect.prototype.render = function render() {
        return React.createElement(WrappedComponent, this.props);
      };

      return SideEffect;
    }(Component);

    SideEffect.displayName = 'SideEffect(' + getDisplayName(WrappedComponent) + ')';
    SideEffect.canUseDOM = ExecutionEnvironment.canUseDOM;


    return SideEffect;
  };
}

export default withSideEffect;


<|start_filename|>node_modules/console-stream/test/index.js<|end_filename|>
var ConsoleStream = require("../index")
var console = require("console")
var test = require("tape")

test("console stream", function (assert) {
    var stream = ConsoleStream()

    assert.ok(stream.write)
    assert.ok(stream.end)
    assert.ok(stream.destroy)

    assert.end()
})

test("console stream destroy", function (assert) {
    var stream = ConsoleStream()

    stream.once("close", function () {
        assert.ok(true)
        assert.end()
    })

    stream.destroy()
})

test("console stream end", function (assert) {
    var old = console.log
    console.log = intercept

    var closed = false
    var stream = ConsoleStream()
    var list = []

    stream.once("close", function () {
        closed = true

        console.log = old

        assert.deepEqual(list, ["foo"])
        assert.equal(closed, true)

        assert.end()
    })

    stream.end("foo")

    function intercept(chunk) {
        list.push(chunk)

        // old.apply(this, arguments)
    }
})

test("console stream write", function (assert) {
    var old = console.log
    console.log = intercept

    var list = []
    var stream = ConsoleStream()

    stream.write("one")
    stream.write("two")
    stream.write("three")
    stream.write("four\n")
    stream.write("five\na")
    stream.write("bar")
    stream.end()

    console.log = old

    assert.deepEqual(list, [
        "onetwothreefour"
        , "five"
        , "abar"
    ])
    assert.end()

    function intercept(chunk) {
        list.push(chunk)

        // old.apply(this, arguments)
    }
})


<|start_filename|>node_modules/opentracing/lib/test/api_compatibility.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var index_1 = require("../index");
/**
 * A function that takes a tracer factory, and tests wheter the initialized tracer
 * fulfills Opentracing's api requirements.
 *
 * @param {object} createTracer - a factory function that allocates a tracer.
 * @param {object} [options] - the options to be set on api compatibility
 */
function apiCompatibilityChecks(createTracer, options) {
    if (createTracer === void 0) { createTracer = function () { return new index_1.Tracer(); }; }
    if (options === void 0) { options = { skipBaggageChecks: false, skipInjectExtractChecks: false }; }
    describe('OpenTracing API Compatibility', function () {
        var tracer;
        var span;
        beforeEach(function () {
            tracer = createTracer();
            span = tracer.startSpan('test-span');
        });
        describe('Tracer', function () {
            describe('startSpan', function () {
                it('should handle Spans and SpanContexts', function () {
                    chai_1.expect(function () { tracer.startSpan('child', { childOf: span }); }).to.not.throw(Error);
                    chai_1.expect(function () { tracer.startSpan('child', { childOf: span.context() }); }).to.not.throw(Error);
                });
            });
            describe('inject', function () {
                (options.skipInjectExtractChecks ? it.skip : it)('should not throw exception on required carrier types', function () {
                    var spanContext = span.context();
                    var textCarrier = {};
                    var binCarrier = new index_1.BinaryCarrier([1, 2, 3]);
                    chai_1.expect(function () { tracer.inject(spanContext, index_1.FORMAT_TEXT_MAP, textCarrier); }).to.not.throw(Error);
                    chai_1.expect(function () { tracer.inject(spanContext, index_1.FORMAT_BINARY, binCarrier); }).to.not.throw(Error);
                    chai_1.expect(function () { tracer.inject(spanContext, index_1.FORMAT_BINARY, {}); }).to.not.throw(Error);
                });
                (options.skipInjectExtractChecks ? it.skip : it)('should handle Spans and SpanContexts', function () {
                    var textCarrier = {};
                    chai_1.expect(function () { tracer.inject(span, index_1.FORMAT_TEXT_MAP, textCarrier); }).to.not.throw(Error);
                    chai_1.expect(function () { tracer.inject(span.context(), index_1.FORMAT_TEXT_MAP, textCarrier); }).to.not.throw(Error);
                });
            });
            describe('extract', function () {
                (options.skipInjectExtractChecks ? it.skip : it)('should not throw exception on required carrier types', function () {
                    var textCarrier = {};
                    var binCarrier = new index_1.BinaryCarrier([1, 2, 3]);
                    chai_1.expect(function () { tracer.extract(index_1.FORMAT_TEXT_MAP, textCarrier); }).to.not.throw(Error);
                    chai_1.expect(function () { tracer.extract(index_1.FORMAT_BINARY, binCarrier); }).to.not.throw(Error);
                    chai_1.expect(function () { tracer.extract(index_1.FORMAT_BINARY, {}); }).to.not.throw(Error);
                    chai_1.expect(function () { tracer.extract(index_1.FORMAT_BINARY, { buffer: null }); }).to.not.throw(Error);
                });
            });
        });
        describe('Span', function () {
            (options.skipBaggageChecks ? it.skip : it)('should set baggage and retrieve baggage', function () {
                span.setBaggageItem('some-key', 'some-value');
                var val = span.getBaggageItem('some-key');
                chai_1.assert.equal('some-value', val);
            });
            describe('finish', function () {
                it('should not throw exceptions on valid arguments', function () {
                    span = tracer.startSpan('test-span');
                    chai_1.expect(function () { return span.finish(Date.now()); }).to.not.throw(Error);
                });
            });
        });
        describe('Reference', function () {
            it('should handle Spans and span.context()', function () {
                chai_1.expect(function () { return new index_1.Reference(index_1.REFERENCE_CHILD_OF, span); }).to.not.throw(Error);
                chai_1.expect(function () { return new index_1.Reference(index_1.REFERENCE_CHILD_OF, span.context()); }).to.not.throw(Error);
            });
        });
        describe('SpanContext', function () {
            describe('toTraceId', function () {
                it('should return a string', function () {
                    span = tracer.startSpan('test-span');
                    console.log(span.context().toTraceId());
                    chai_1.expect(function () { return span.context().toTraceId(); }).to.not.throw(Error);
                    chai_1.expect(span.context().toTraceId()).to.be.a('string');
                });
            });
            describe('toSpanId', function () {
                it('should return a string', function () {
                    span = tracer.startSpan('test-span');
                    chai_1.expect(function () { return span.context().toSpanId(); }).to.not.throw(Error);
                    chai_1.expect(span.context().toSpanId()).to.be.a('string');
                });
            });
        });
    });
}
exports.default = apiCompatibilityChecks;
//# sourceMappingURL=api_compatibility.js.map

<|start_filename|>node_modules/gatsby/dist/bin/gatsby.js<|end_filename|>
#!/usr/bin/env node
"use strict";

require(`gatsby-cli`);
//# sourceMappingURL=gatsby.js.map

<|start_filename|>node_modules/noms/test.js<|end_filename|>
'use strict';
var test = require('tape');
var noms = require('./');

function countObj(num) {
  var i = 20;
  return noms.obj(function(next) {
    if (++i < num) {
      this.push({
        num: i
      });
    } else {
      this.push(null);
    }
    process.nextTick(function () {
      next();
    });
  }, function (next){
    this.push({
      num: 0
    });
    i = 1;
    next(null, {num: 1});
  });
}
function countObjWithNext(num) {
  var i = -1;
  return noms.obj(function(next) {
    if (++i < num) {
       process.nextTick(function () {
        next(null, {
          num: i
        });
      });
    } else {
      process.nextTick(function () {
        next(null, null);
      });
    }
  });
}
function dripWordAsync(string, opts) {
  // from from2's tests
  return noms(opts||{}, function(size, next) {
    if (string.length <= 0) {
      return next(null, null);
    }
    var chunk = string.slice(0, size);
    string = string.slice(size);
    process.nextTick(function () {
      next(null, chunk);
    });
  });
}
function dripWord(string, opts) {
  // from from2's tests
  return noms(opts||{}, function(size, next) {
    if (string.length <= 0) {
      return next(null, null);
    }
    var chunk = string.slice(0, size);
    string = string.slice(size);
    next(null, chunk);
  });
}
test('works', function (t) {
  t.plan(10);
  countObj(10).on('data', function (d) {
    t.ok(true, d.num);
  });
});
test('works with next', function (t) {
  t.plan(10);
  countObjWithNext(10).on('data', function (d) {
    t.ok(true, d.num);
  });
});
test('works with size 1', function (t) {
  t.plan(3);
  var stream = dripWord('abc');

  t.equals(stream.read(1).toString(), 'a');
  t.equals(stream.read(1).toString(), 'b');
  t.equals(stream.read(1).toString(), 'c');

});
test('works with size 2', function (t) {
  t.plan(3);
  dripWord('abcde', {highWaterMark: 2}).on('data', function (d) {
    t.ok(true, d.toString());
  });
});
test('works with size async 1', function (t) {
  t.plan(3);
  var stream = dripWordAsync('abc');
  stream.on('readable', function () {
    t.equals(stream.read(1).toString(), 'a');
    t.equals(stream.read(1).toString(), 'b');
    t.equals(stream.read(1).toString(), 'c');
  });
});
test('works with size async 2', function (t) {
  t.plan(3);
  dripWordAsync('abcde', {highWaterMark: 2}).on('data', function (d) {
    t.ok(true, d.toString());
  });
});

<|start_filename|>node_modules/p-event/index.js<|end_filename|>
'use strict';
const pTimeout = require('p-timeout');

module.exports = (emitter, event, opts) => {
	let cancel;

	const ret = new Promise((resolve, reject) => {
		if (typeof opts === 'function') {
			opts = {filter: opts};
		}

		opts = Object.assign({
			rejectionEvents: ['error'],
			multiArgs: false
		}, opts);

		let addListener = emitter.on || emitter.addListener || emitter.addEventListener;
		let removeListener = emitter.off || emitter.removeListener || emitter.removeEventListener;

		if (!addListener || !removeListener) {
			throw new TypeError('Emitter is not compatible');
		}

		addListener = addListener.bind(emitter);
		removeListener = removeListener.bind(emitter);

		const resolveHandler = function (value) {
			if (opts.multiArgs) {
				value = [].slice.apply(arguments);
			}

			if (opts.filter && !opts.filter(value)) {
				return;
			}

			cancel();
			resolve(value);
		};

		const rejectHandler = function (reason) {
			cancel();

			if (opts.multiArgs) {
				reject([].slice.apply(arguments));
			} else {
				reject(reason);
			}
		};

		cancel = () => {
			removeListener(event, resolveHandler);

			for (const rejectionEvent of opts.rejectionEvents) {
				removeListener(rejectionEvent, rejectHandler);
			}
		};

		addListener(event, resolveHandler);

		for (const rejectionEvent of opts.rejectionEvents) {
			addListener(rejectionEvent, rejectHandler);
		}
	});

	ret.cancel = cancel;

	if (typeof opts.timeout === 'number') {
		return pTimeout(ret, opts.timeout);
	}

	return ret;
};


<|start_filename|>node_modules/sharp/vendor/include/orc/orccpu.h<|end_filename|>

#ifndef _ORC_CPU_H_
#define _ORC_CPU_H_

#include <orc/orcutils.h>
#include <orc/orclimits.h>

ORC_BEGIN_DECLS


void orc_get_data_cache_sizes (int *level1, int *level2, int *level3);
void orc_get_cpu_family_model_stepping (int *family, int *model, int *stepping);
const char * orc_get_cpu_name (void);


ORC_END_DECLS

#endif



<|start_filename|>node_modules/graphql/jsutils/isPromise.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isPromise;

/**
 * Returns true if the value acts like a Promise, i.e. has a "then" function,
 * otherwise returns false.
 */
// eslint-disable-next-line no-redeclare
function isPromise(value) {
  return Boolean(value && typeof value.then === 'function');
}


<|start_filename|>node_modules/sharp/vendor/include/fribidi-common.h<|end_filename|>
/* FriBidi
 * fribidi-common.h - common include for library headers
 *
 * Author:
 *   <NAME>, 2004
 *
 * Copyright (C) 2004 <NAME>, Inc.
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library, in a file named COPYING; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA
 * 
 * For licensing issues, contact <<EMAIL>>.
 */
#ifndef _FRIBIDI_COMMON_H
#define _FRIBIDI_COMMON_H

#ifdef DONT_HAVE_FRIBIDI_CONFIG_H
# define FRIBIDI "fribidi"
# define FRIBIDI_NAME "fribidi"
# define FRIBIDI_VERSION "unknown"
# define FRIBIDI_BUGREPORT "unknown"
# define FRIBIDI_INTERFACE_VERSION_STRING "unknown"
#else /* !DONT_HAVE_FRIBIDI_CONFIG_H */
# include "fribidi-config.h"
#endif /* !DONT_HAVE_FRIBIDI_CONFIG_H */

#ifdef HAVE_FRIBIDI_CUSTOM_H
# include <fribidi-custom.h>
#endif /* HAVE_FRIBIDI_CUSTOM_H */


/* FRIBIDI_ENTRY is a macro used to declare library entry points. */
#ifndef FRIBIDI_ENTRY
# if (defined(_MSC_VER) || defined(FRIBIDI_BUILT_WITH_MSVC)) && !defined(FRIBIDI_STATIC)
/* if we're building fribidi itself with MSVC, FRIBIDI_ENTRY will be defined,
 * so if we're here then this is an external user including fribidi headers.
 * The dllimport is needed here mostly for the fribidi_version_info variable,
 * for functions it's not required. Probably needs more fine-tuning if
 * someone starts building fribidi as static library with MSVC. We'll cross
 * that brige when we get there. */
#  define FRIBIDI_ENTRY __declspec(dllimport) extern
# else
#  define FRIBIDI_ENTRY extern
# endif
#endif /* !FRIBIDI_ENTRY */

#ifdef __ICC
#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS               \
  _Pragma ("warning (push)")                            \
  _Pragma ("warning (disable:1478)")
#define FRIBIDI_END_IGNORE_DEPRECATIONS			\
  _Pragma ("warning (pop)")
#elif    __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS		\
  _Pragma ("GCC diagnostic push")			\
  _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
#define FRIBIDI_END_IGNORE_DEPRECATIONS			\
  _Pragma ("GCC diagnostic pop")
#elif defined (_MSC_VER) && (_MSC_VER >= 1500)
#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS		\
  __pragma (warning (push))                             \
  __pragma (warning (disable : 4996))
#define FRIBIDI_END_IGNORE_DEPRECATIONS			\
  __pragma (warning (pop))
#elif defined (__clang__)
#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS               \
  _Pragma("clang diagnostic push")                      \
  _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
#define FRIBIDI_END_IGNORE_DEPRECATIONS \
  _Pragma("clang diagnostic pop")
#else
#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS
#define FRIBIDI_END_IGNORE_DEPRECATIONS
#endif

#if defined(__GNUC__) && (__GNUC__ > 2)
# define FRIBIDI_GNUC_WARN_UNUSED __attribute__((__warn_unused_result__))
# define FRIBIDI_GNUC_MALLOC      __attribute__((__malloc__))
# define FRIBIDI_GNUC_HIDDEN      __attribute__((__visibility__ ("hidden")))
# define FRIBIDI_GNUC_CONST       __attribute__((__const__))
# define FRIBIDI_GNUC_DEPRECATED  __attribute__((__unused__))
#else /* __GNUC__ */
# define FRIBIDI_GNUC_WARN_UNUSED
# define FRIBIDI_GNUC_MALLOC
# define FRIBIDI_GNUC_HIDDEN
# define FRIBIDI_GNUC_CONST
# define FRIBIDI_GNUC_DEPRECATED
#endif	/* __GNUC__ */

/* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations,
 * so that C++ compilers don't mangle their names.  Use FRIBIDI_END_DECLS at
 * the end of C declarations. */
#ifndef FRIBIDI_BEGIN_DECLS
# ifdef __cplusplus
#  define FRIBIDI_BEGIN_DECLS extern "C" {
#  define FRIBIDI_END_DECLS }
# else /* !__cplusplus */
#  define FRIBIDI_BEGIN_DECLS	/* empty */
#  define FRIBIDI_END_DECLS	/* empty */
# endif	/* !__cplusplus */
#endif /* !FRIBIDI_BEGIN_DECLS */




/* fribidi_debug_status - get current debug state
 *
 */
FRIBIDI_ENTRY int fribidi_debug_status (
  void
);

/* fribidi_set_debug - set debug state
 *
 */
FRIBIDI_ENTRY int
fribidi_set_debug (
  int state		/* new state to set */
);











#endif /* !_FRIBIDI_COMMON_H */
/* Editor directions:
 * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
 */


<|start_filename|>node_modules/sharp/vendor/include/glib-2.0/gio/gdrive.h<|end_filename|>
/* GIO - GLib Input, Output and Streaming Library
 *
 * Copyright (C) 2006-2007 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
 *
 * Author: <NAME> <<EMAIL>>
 *         <NAME> <<EMAIL>>
 */

#ifndef __G_DRIVE_H__
#define __G_DRIVE_H__

#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif

#include <gio/giotypes.h>

G_BEGIN_DECLS

/**
 * G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE:
 *
 * The string used to obtain a Unix device path with g_drive_get_identifier().
 *
 * Since: 2.58
 */
#define G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE "unix-device"

#define G_TYPE_DRIVE           (g_drive_get_type ())
#define G_DRIVE(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DRIVE, GDrive))
#define G_IS_DRIVE(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DRIVE))
#define G_DRIVE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DRIVE, GDriveIface))

/**
 * GDriveIface:
 * @g_iface: The parent interface.
 * @changed: Signal emitted when the drive is changed.
 * @disconnected: The removed signal that is emitted when the #GDrive have been disconnected. If the recipient is holding references to the object they should release them so the object can be finalized.
 * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
 * @get_name: Returns the name for the given #GDrive.
 * @get_icon: Returns a #GIcon for the given #GDrive.
 * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
 * @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
 * @is_removable: Returns %TRUE if the #GDrive and/or its media is considered removable by the user. Since 2.50.
 * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
 * @has_media: Returns %TRUE if the #GDrive has media inserted.
 * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
 * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
 * @can_eject: Returns %TRUE if the #GDrive can eject media.
 * @eject: Ejects a #GDrive.
 * @eject_finish: Finishes an eject operation.
 * @poll_for_media: Poll for media insertion/removal on a #GDrive.
 * @poll_for_media_finish: Finishes a media poll operation.
 * @get_identifier: Returns the identifier of the given kind, or %NULL if
 *    the #GDrive doesn't have one.
 * @enumerate_identifiers: Returns an array strings listing the kinds
 *    of identifiers which the #GDrive has.
 * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
 * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
 * @stop: Stops a #GDrive. Since 2.22.
 * @stop_finish: Finishes a stop operation. Since 2.22.
 * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
 * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
 * @start: Starts a #GDrive. Since 2.22.
 * @start_finish: Finishes a start operation. Since 2.22.
 * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
 * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
 * @get_sort_key: Gets a key used for sorting #GDrive instances or %NULL if no such key exists. Since 2.32.
 * @get_symbolic_icon: Returns a symbolic #GIcon for the given #GDrive. Since 2.34.
 *
 * Interface for creating #GDrive implementations.
 */
typedef struct _GDriveIface    GDriveIface;

struct _GDriveIface
{
  GTypeInterface g_iface;

  /* signals */
  void     (* changed)                  (GDrive              *drive);
  void     (* disconnected)             (GDrive              *drive);
  void     (* eject_button)             (GDrive              *drive);

  /* Virtual Table */
  char *   (* get_name)                 (GDrive              *drive);
  GIcon *  (* get_icon)                 (GDrive              *drive);
  gboolean (* has_volumes)              (GDrive              *drive);
  GList *  (* get_volumes)              (GDrive              *drive);
  gboolean (* is_media_removable)       (GDrive              *drive);
  gboolean (* has_media)                (GDrive              *drive);
  gboolean (* is_media_check_automatic) (GDrive              *drive);
  gboolean (* can_eject)                (GDrive              *drive);
  gboolean (* can_poll_for_media)       (GDrive              *drive);
  void     (* eject)                    (GDrive              *drive,
                                         GMountUnmountFlags   flags,
                                         GCancellable        *cancellable,
                                         GAsyncReadyCallback  callback,
                                         gpointer             user_data);
  gboolean (* eject_finish)             (GDrive              *drive,
                                         GAsyncResult        *result,
                                         GError             **error);
  void     (* poll_for_media)           (GDrive              *drive,
                                         GCancellable        *cancellable,
                                         GAsyncReadyCallback  callback,
                                         gpointer             user_data);
  gboolean (* poll_for_media_finish)    (GDrive              *drive,
                                         GAsyncResult        *result,
                                         GError             **error);

  char *   (* get_identifier)           (GDrive              *drive,
                                         const char          *kind);
  char **  (* enumerate_identifiers)    (GDrive              *drive);

  GDriveStartStopType (* get_start_stop_type) (GDrive        *drive);

  gboolean (* can_start)                (GDrive              *drive);
  gboolean (* can_start_degraded)       (GDrive              *drive);
  void     (* start)                    (GDrive              *drive,
                                         GDriveStartFlags     flags,
                                         GMountOperation     *mount_operation,
                                         GCancellable        *cancellable,
                                         GAsyncReadyCallback  callback,
                                         gpointer             user_data);
  gboolean (* start_finish)             (GDrive              *drive,
                                         GAsyncResult        *result,
                                         GError             **error);

  gboolean (* can_stop)                 (GDrive              *drive);
  void     (* stop)                     (GDrive              *drive,
                                         GMountUnmountFlags   flags,
                                         GMountOperation     *mount_operation,
                                         GCancellable        *cancellable,
                                         GAsyncReadyCallback  callback,
                                         gpointer             user_data);
  gboolean (* stop_finish)              (GDrive              *drive,
                                         GAsyncResult        *result,
                                         GError             **error);
  /* signal, not VFunc */
  void     (* stop_button)              (GDrive              *drive);

  void        (* eject_with_operation)      (GDrive              *drive,
                                             GMountUnmountFlags   flags,
                                             GMountOperation     *mount_operation,
                                             GCancellable        *cancellable,
                                             GAsyncReadyCallback  callback,
                                             gpointer             user_data);
  gboolean    (* eject_with_operation_finish) (GDrive            *drive,
                                             GAsyncResult        *result,
                                             GError             **error);

  const gchar * (* get_sort_key)        (GDrive              *drive);
  GIcon *       (* get_symbolic_icon)   (GDrive              *drive);
  gboolean      (* is_removable)        (GDrive              *drive);

};

GLIB_AVAILABLE_IN_ALL
GType    g_drive_get_type                 (void) G_GNUC_CONST;

GLIB_AVAILABLE_IN_ALL
char *   g_drive_get_name                 (GDrive               *drive);
GLIB_AVAILABLE_IN_ALL
GIcon *  g_drive_get_icon                 (GDrive               *drive);
GLIB_AVAILABLE_IN_ALL
GIcon *  g_drive_get_symbolic_icon        (GDrive               *drive);
GLIB_AVAILABLE_IN_ALL
gboolean g_drive_has_volumes              (GDrive               *drive);
GLIB_AVAILABLE_IN_ALL
GList *  g_drive_get_volumes              (GDrive               *drive);
GLIB_AVAILABLE_IN_2_50
gboolean g_drive_is_removable             (GDrive               *drive);
GLIB_AVAILABLE_IN_ALL
gboolean g_drive_is_media_removable       (GDrive               *drive);
GLIB_AVAILABLE_IN_ALL
gboolean g_drive_has_media                (GDrive               *drive);
GLIB_AVAILABLE_IN_ALL
gboolean g_drive_is_media_check_automatic (GDrive               *drive);
GLIB_AVAILABLE_IN_ALL
gboolean g_drive_can_poll_for_media       (GDrive               *drive);
GLIB_AVAILABLE_IN_ALL
gboolean g_drive_can_eject                (GDrive               *drive);
GLIB_DEPRECATED_FOR(g_drive_eject_with_operation)
void     g_drive_eject                    (GDrive               *drive,
                                           GMountUnmountFlags    flags,
                                           GCancellable         *cancellable,
                                           GAsyncReadyCallback   callback,
                                           gpointer              user_data);

GLIB_DEPRECATED_FOR(g_drive_eject_with_operation_finish)
gboolean g_drive_eject_finish             (GDrive               *drive,
                                           GAsyncResult         *result,
                                           GError              **error);
GLIB_AVAILABLE_IN_ALL
void     g_drive_poll_for_media           (GDrive               *drive,
                                           GCancellable         *cancellable,
                                           GAsyncReadyCallback   callback,
                                           gpointer              user_data);
GLIB_AVAILABLE_IN_ALL
gboolean g_drive_poll_for_media_finish    (GDrive               *drive,
                                           GAsyncResult         *result,
                                           GError              **error);
GLIB_AVAILABLE_IN_ALL
char *   g_drive_get_identifier           (GDrive              *drive,
                                           const char          *kind);
GLIB_AVAILABLE_IN_ALL
char **  g_drive_enumerate_identifiers    (GDrive              *drive);

GLIB_AVAILABLE_IN_ALL
GDriveStartStopType g_drive_get_start_stop_type (GDrive        *drive);

GLIB_AVAILABLE_IN_ALL
gboolean g_drive_can_start                (GDrive              *drive);
GLIB_AVAILABLE_IN_ALL
gboolean g_drive_can_start_degraded       (GDrive              *drive);
GLIB_AVAILABLE_IN_ALL
void     g_drive_start                    (GDrive              *drive,
                                           GDriveStartFlags     flags,
                                           GMountOperation     *mount_operation,
                                           GCancellable        *cancellable,
                                           GAsyncReadyCallback  callback,
                                           gpointer             user_data);
GLIB_AVAILABLE_IN_ALL
gboolean g_drive_start_finish             (GDrive               *drive,
                                           GAsyncResult         *result,
                                           GError              **error);

GLIB_AVAILABLE_IN_ALL
gboolean g_drive_can_stop                 (GDrive               *drive);
GLIB_AVAILABLE_IN_ALL
void     g_drive_stop                     (GDrive               *drive,
                                           GMountUnmountFlags    flags,
                                           GMountOperation      *mount_operation,
                                           GCancellable         *cancellable,
                                           GAsyncReadyCallback   callback,
                                           gpointer              user_data);
GLIB_AVAILABLE_IN_ALL
gboolean g_drive_stop_finish              (GDrive               *drive,
                                           GAsyncResult         *result,
                                           GError              **error);

GLIB_AVAILABLE_IN_ALL
void        g_drive_eject_with_operation      (GDrive              *drive,
                                               GMountUnmountFlags   flags,
                                               GMountOperation     *mount_operation,
                                               GCancellable        *cancellable,
                                               GAsyncReadyCallback  callback,
                                               gpointer             user_data);
GLIB_AVAILABLE_IN_ALL
gboolean    g_drive_eject_with_operation_finish (GDrive            *drive,
                                               GAsyncResult        *result,
                                               GError             **error);

GLIB_AVAILABLE_IN_2_32
const gchar *g_drive_get_sort_key         (GDrive               *drive);

G_END_DECLS

#endif /* __G_DRIVE_H__ */


<|start_filename|>node_modules/@jimp/custom/es/index.js<|end_filename|>
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }

function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }

function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

import Jimp, { addType, addJimpMethods, addConstants, jimpEvChange } from '@jimp/core';
export default function configure(configuration) {
  var jimpInstance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Jimp;
  var jimpConfig = {
    hasAlpha: {},
    encoders: {},
    decoders: {},
    class: {},
    constants: {}
  };

  function addToConfig(newConfig) {
    Object.entries(newConfig).forEach(function (_ref) {
      var _ref2 = _slicedToArray(_ref, 2),
          key = _ref2[0],
          value = _ref2[1];

      jimpConfig[key] = _objectSpread({}, jimpConfig[key], value);
    });
  }

  function addImageType(typeModule) {
    var type = typeModule();

    if (Array.isArray(type.mime)) {
      addType.apply(void 0, _toConsumableArray(type.mime));
    } else {
      Object.entries(type.mime).forEach(function (mimeType) {
        return addType.apply(void 0, _toConsumableArray(mimeType));
      });
    }

    delete type.mime;
    addToConfig(type);
  }

  function addPlugin(pluginModule) {
    var plugin = pluginModule(jimpEvChange) || {};

    if (!plugin.class && !plugin.constants) {
      // Default to class function
      addToConfig({
        class: plugin
      });
    } else {
      addToConfig(plugin);
    }
  }

  if (configuration.types) {
    configuration.types.forEach(addImageType);
    jimpInstance.decoders = _objectSpread({}, jimpInstance.decoders, jimpConfig.decoders);
    jimpInstance.encoders = _objectSpread({}, jimpInstance.encoders, jimpConfig.encoders);
    jimpInstance.hasAlpha = _objectSpread({}, jimpInstance.hasAlpha, jimpConfig.hasAlpha);
  }

  if (configuration.plugins) {
    configuration.plugins.forEach(addPlugin);
  }

  addJimpMethods(jimpConfig.class, jimpInstance);
  addConstants(jimpConfig.constants, jimpInstance);
  return Jimp;
}
//# sourceMappingURL=index.js.map

<|start_filename|>node_modules/react-side-effect/lib/index.umd.js<|end_filename|>
(function (global, factory) {
	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react')) :
	typeof define === 'function' && define.amd ? define(['react'], factory) :
	(global.withSideEffect = factory(global.React));
}(this, (function (React) { 'use strict';

var React__default = 'default' in React ? React['default'] : React;

function createCommonjsModule(fn, module) {
	return module = { exports: {} }, fn(module, module.exports), module.exports;
}

var exenv = createCommonjsModule(function (module) {
/*!
  Copyright (c) 2015 <NAME>.
  Based on code that is Copyright 2013-2015, Facebook, Inc.
  All rights reserved.
*/
/* global define */

(function () {

	var canUseDOM = !!(
		typeof window !== 'undefined' &&
		window.document &&
		window.document.createElement
	);

	var ExecutionEnvironment = {

		canUseDOM: canUseDOM,

		canUseWorkers: typeof Worker !== 'undefined',

		canUseEventListeners:
			canUseDOM && !!(window.addEventListener || window.attachEvent),

		canUseViewport: canUseDOM && !!window.screen

	};

	if (typeof undefined === 'function' && typeof undefined.amd === 'object' && undefined.amd) {
		undefined(function () {
			return ExecutionEnvironment;
		});
	} else if ('object' !== 'undefined' && module.exports) {
		module.exports = ExecutionEnvironment;
	} else {
		window.ExecutionEnvironment = ExecutionEnvironment;
	}

}());
});

var shallowequal = function shallowEqual(objA, objB, compare, compareContext) {

    var ret = compare ? compare.call(compareContext, objA, objB) : void 0;

    if(ret !== void 0) {
        return !!ret;
    }

    if(objA === objB) {
        return true;
    }

    if(typeof objA !== 'object' || !objA ||
       typeof objB !== 'object' || !objB) {
        return false;
    }

    var keysA = Object.keys(objA);
    var keysB = Object.keys(objB);

    if(keysA.length !== keysB.length) {
        return false;
    }

    var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);

    // Test for A's keys different from B.
    for(var idx = 0; idx < keysA.length; idx++) {

        var key = keysA[idx];

        if(!bHasOwnProperty(key)) {
            return false;
        }

        var valueA = objA[key];
        var valueB = objB[key];

        ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;

        if(ret === false ||
           ret === void 0 && valueA !== valueB) {
            return false;
        }

    }

    return true;

};

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

function withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {
  if (typeof reducePropsToState !== 'function') {
    throw new Error('Expected reducePropsToState to be a function.');
  }
  if (typeof handleStateChangeOnClient !== 'function') {
    throw new Error('Expected handleStateChangeOnClient to be a function.');
  }
  if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {
    throw new Error('Expected mapStateOnServer to either be undefined or a function.');
  }

  function getDisplayName(WrappedComponent) {
    return WrappedComponent.displayName || WrappedComponent.name || 'Component';
  }

  return function wrap(WrappedComponent) {
    if (typeof WrappedComponent !== 'function') {
      throw new Error('Expected WrappedComponent to be a React component.');
    }

    var mountedInstances = [];
    var state = void 0;

    function emitChange() {
      state = reducePropsToState(mountedInstances.map(function (instance) {
        return instance.props;
      }));

      if (SideEffect.canUseDOM) {
        handleStateChangeOnClient(state);
      } else if (mapStateOnServer) {
        state = mapStateOnServer(state);
      }
    }

    var SideEffect = function (_Component) {
      _inherits(SideEffect, _Component);

      function SideEffect() {
        _classCallCheck(this, SideEffect);

        return _possibleConstructorReturn(this, _Component.apply(this, arguments));
      }

      // Try to use displayName of wrapped component
      SideEffect.peek = function peek() {
        return state;
      };

      // Expose canUseDOM so tests can monkeypatch it


      SideEffect.rewind = function rewind() {
        if (SideEffect.canUseDOM) {
          throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');
        }

        var recordedState = state;
        state = undefined;
        mountedInstances = [];
        return recordedState;
      };

      SideEffect.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
        return !shallowequal(nextProps, this.props);
      };

      SideEffect.prototype.componentWillMount = function componentWillMount() {
        mountedInstances.push(this);
        emitChange();
      };

      SideEffect.prototype.componentDidUpdate = function componentDidUpdate() {
        emitChange();
      };

      SideEffect.prototype.componentWillUnmount = function componentWillUnmount() {
        var index = mountedInstances.indexOf(this);
        mountedInstances.splice(index, 1);
        emitChange();
      };

      SideEffect.prototype.render = function render() {
        return React__default.createElement(WrappedComponent, this.props);
      };

      return SideEffect;
    }(React.Component);

    SideEffect.displayName = 'SideEffect(' + getDisplayName(WrappedComponent) + ')';
    SideEffect.canUseDOM = exenv.canUseDOM;


    return SideEffect;
  };
}

return withSideEffect;

})));


<|start_filename|>node_modules/probe-image-size/lib/parse_stream/png.js<|end_filename|>
'use strict';


var ParserStream = require('../common').ParserStream;
var str2arr      = require('../common').str2arr;
var sliceEq      = require('../common').sliceEq;


var SIG_PNG  = str2arr('\x89PNG\r\n\x1a\n');
var SIG_IHDR = str2arr('IHDR');


module.exports = function () {
  var parser = new ParserStream();

  parser._bytes(24, function (data) {
    parser._skipBytes(Infinity);

    // check PNG signature
    if (!sliceEq(data, 0, SIG_PNG)) {
      parser.push(null);
      return;
    }

    // check that first chunk is IHDR
    if (!sliceEq(data, 12, SIG_IHDR)) {
      parser.push(null);
      return;
    }

    parser.push({
      width:  data.readUInt32BE(16),
      height: data.readUInt32BE(20),
      type: 'png',
      mime: 'image/png',
      wUnits: 'px',
      hUnits: 'px'
    });

    parser.push(null);
  });

  return parser;
};


<|start_filename|>node_modules/graphql-config/lib/getGraphQLConfig.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("./utils");
var findGraphQLConfigFile_1 = require("./findGraphQLConfigFile");
var GraphQLConfig_1 = require("./GraphQLConfig");
function getGraphQLConfig(rootDir) {
    if (rootDir === void 0) { rootDir = process.cwd(); }
    var configPath = findGraphQLConfigFile_1.findGraphQLConfigFile(rootDir);
    var config = utils_1.readConfig(configPath);
    utils_1.validateConfig(config);
    return new GraphQLConfig_1.GraphQLConfig(config, configPath);
}
exports.getGraphQLConfig = getGraphQLConfig;
function getGraphQLProjectConfig(rootDir, projectName) {
    if (projectName === void 0) { projectName = process.env.GRAPHQL_CONFIG_PROJECT; }
    return getGraphQLConfig(rootDir).getProjectConfig(projectName);
}
exports.getGraphQLProjectConfig = getGraphQLProjectConfig;


<|start_filename|>node_modules/yoga-layout-prebuilt/yoga-layout/dist/entry-common.js<|end_filename|>
'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/**
 * Copyright (c) 2014-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * 
 * @format
 */

var CONSTANTS = require('./YGEnums');

var Layout = function () {
  function Layout(left, right, top, bottom, width, height) {
    _classCallCheck(this, Layout);

    this.left = left;
    this.right = right;
    this.top = top;
    this.bottom = bottom;
    this.width = width;
    this.height = height;
  }

  _createClass(Layout, [{
    key: 'fromJS',
    value: function fromJS(expose) {
      expose(this.left, this.right, this.top, this.bottom, this.width, this.height);
    }
  }, {
    key: 'toString',
    value: function toString() {
      return '<Layout#' + this.left + ':' + this.right + ';' + this.top + ':' + this.bottom + ';' + this.width + ':' + this.height + '>';
    }
  }]);

  return Layout;
}();

var Size = function () {
  _createClass(Size, null, [{
    key: 'fromJS',
    value: function fromJS(_ref) {
      var width = _ref.width,
          height = _ref.height;

      return new Size(width, height);
    }
  }]);

  function Size(width, height) {
    _classCallCheck(this, Size);

    this.width = width;
    this.height = height;
  }

  _createClass(Size, [{
    key: 'fromJS',
    value: function fromJS(expose) {
      expose(this.width, this.height);
    }
  }, {
    key: 'toString',
    value: function toString() {
      return '<Size#' + this.width + 'x' + this.height + '>';
    }
  }]);

  return Size;
}();

var Value = function () {
  function Value(unit, value) {
    _classCallCheck(this, Value);

    this.unit = unit;
    this.value = value;
  }

  _createClass(Value, [{
    key: 'fromJS',
    value: function fromJS(expose) {
      expose(this.unit, this.value);
    }
  }, {
    key: 'toString',
    value: function toString() {
      switch (this.unit) {
        case CONSTANTS.UNIT_POINT:
          return String(this.value);
        case CONSTANTS.UNIT_PERCENT:
          return this.value + '%';
        case CONSTANTS.UNIT_AUTO:
          return 'auto';
        default:
          {
            return this.value + '?';
          }
      }
    }
  }, {
    key: 'valueOf',
    value: function valueOf() {
      return this.value;
    }
  }]);

  return Value;
}();

module.exports = function (bind, lib) {
  function patch(prototype, name, fn) {
    var original = prototype[name];

    prototype[name] = function () {
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }

      return fn.call.apply(fn, [this, original].concat(args));
    };
  }

  var _arr = ['setPosition', 'setMargin', 'setFlexBasis', 'setWidth', 'setHeight', 'setMinWidth', 'setMinHeight', 'setMaxWidth', 'setMaxHeight', 'setPadding'];

  var _loop = function _loop() {
    var _methods;

    var fnName = _arr[_i];
    var methods = (_methods = {}, _defineProperty(_methods, CONSTANTS.UNIT_POINT, lib.Node.prototype[fnName]), _defineProperty(_methods, CONSTANTS.UNIT_PERCENT, lib.Node.prototype[fnName + 'Percent']), _defineProperty(_methods, CONSTANTS.UNIT_AUTO, lib.Node.prototype[fnName + 'Auto']), _methods);

    patch(lib.Node.prototype, fnName, function (original) {
      for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
        args[_key2 - 1] = arguments[_key2];
      }

      // We patch all these functions to add support for the following calls:
      // .setWidth(100) / .setWidth("100%") / .setWidth(.getWidth()) / .setWidth("auto")

      var value = args.pop();
      var unit = void 0,
          asNumber = void 0;

      if (value === 'auto') {
        unit = CONSTANTS.UNIT_AUTO;
        asNumber = undefined;
      } else if (value instanceof Value) {
        unit = value.unit;
        asNumber = value.valueOf();
      } else {
        unit = typeof value === 'string' && value.endsWith('%') ? CONSTANTS.UNIT_PERCENT : CONSTANTS.UNIT_POINT;
        asNumber = parseFloat(value);
        if (!Number.isNaN(value) && Number.isNaN(asNumber)) {
          throw new Error('Invalid value ' + value + ' for ' + fnName);
        }
      }

      if (!methods[unit]) throw new Error('Failed to execute "' + fnName + '": Unsupported unit \'' + value + '\'');

      if (asNumber !== undefined) {
        var _methods$unit;

        return (_methods$unit = methods[unit]).call.apply(_methods$unit, [this].concat(args, [asNumber]));
      } else {
        var _methods$unit2;

        return (_methods$unit2 = methods[unit]).call.apply(_methods$unit2, [this].concat(args));
      }
    });
  };

  for (var _i = 0; _i < _arr.length; _i++) {
    _loop();
  }

  patch(lib.Config.prototype, 'free', function () {
    // Since we handle the memory allocation ourselves (via lib.Config.create),
    // we also need to handle the deallocation
    lib.Config.destroy(this);
  });

  patch(lib.Node, 'create', function (_, config) {
    // We decide the constructor we want to call depending on the parameters
    return config ? lib.Node.createWithConfig(config) : lib.Node.createDefault();
  });

  patch(lib.Node.prototype, 'free', function () {
    // Since we handle the memory allocation ourselves (via lib.Node.create),
    // we also need to handle the deallocation
    lib.Node.destroy(this);
  });

  patch(lib.Node.prototype, 'freeRecursive', function () {
    for (var t = 0, T = this.getChildCount(); t < T; ++t) {
      this.getChild(0).freeRecursive();
    }
    this.free();
  });

  patch(lib.Node.prototype, 'setMeasureFunc', function (original, measureFunc) {
    // This patch is just a convenience patch, since it helps write more
    // idiomatic source code (such as .setMeasureFunc(null))
    // We also automatically convert the return value of the measureFunc
    // to a Size object, so that we can return anything that has .width and
    // .height properties
    if (measureFunc) {
      return original.call(this, function () {
        return Size.fromJS(measureFunc.apply(undefined, arguments));
      });
    } else {
      return this.unsetMeasureFunc();
    }
  });

  patch(lib.Node.prototype, 'calculateLayout', function (original) {
    var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NaN;
    var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NaN;
    var direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : CONSTANTS.DIRECTION_LTR;

    // Just a small patch to add support for the function default parameters
    return original.call(this, width, height, direction);
  });

  return _extends({
    Config: lib.Config,
    Node: lib.Node,
    Layout: bind('Layout', Layout),
    Size: bind('Size', Size),
    Value: bind('Value', Value),
    getInstanceCount: function getInstanceCount() {
      return lib.getInstanceCount.apply(lib, arguments);
    }
  }, CONSTANTS);
};

<|start_filename|>node_modules/graphql/jsutils/dedent.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = dedent;

/**
 * An ES6 string tag that fixes indentation. Also removes leading newlines
 * and trailing spaces and tabs, but keeps trailing newlines.
 *
 * Example usage:
 * const str = dedent`
 *   {
 *     test
 *   }
 * `;
 * str === "{\n  test\n}\n";
 */
function dedent(strings) {
  var str = '';

  for (var i = 0; i < strings.length; ++i) {
    str += strings[i];

    if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) {
      str += i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1]; // interpolation
    }
  }

  var trimmedStr = str.replace(/^\n*/m, '') //  remove leading newline
  .replace(/[ \t]*$/, ''); // remove trailing spaces and tabs
  // fixes indentation by removing leading spaces and tabs from each line

  var indent = '';

  for (var _i2 = 0; _i2 < trimmedStr.length; _i2++) {
    var char = trimmedStr[_i2];

    if (char !== ' ' && char !== '\t') {
      break;
    }

    indent += char;
  }

  return trimmedStr.replace(RegExp('^' + indent, 'mg'), ''); // remove indent
}


<|start_filename|>node_modules/is-jpg/index.js<|end_filename|>
'use strict';
module.exports = buffer => {
	if (!buffer || buffer.length < 3) {
		return false;
	}

	return buffer[0] === 255 &&
		buffer[1] === 216 &&
		buffer[2] === 255;
};


<|start_filename|>node_modules/opentracing/lib/binary_carrier.js<|end_filename|>
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Convenience class to use as a binary carrier.
 *
 * Any valid Object with a field named `buffer` may be used as a binary carrier;
 * this class is only one such type of object that can be used.
 */
var BinaryCarrier = /** @class */ (function () {
    function BinaryCarrier(buffer) {
        this.buffer = buffer;
    }
    return BinaryCarrier;
}());
exports.default = BinaryCarrier;
//# sourceMappingURL=binary_carrier.js.map

<|start_filename|>node_modules/eslint-plugin-graphql/lib/index.js<|end_filename|>
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.processors = exports.rules = undefined;

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _fs = require("fs");

var _fs2 = _interopRequireDefault(_fs);

var _path = require("path");

var _path2 = _interopRequireDefault(_path);

var _graphql = require("graphql");

var _lodash = require("lodash");

var _graphqlConfig = require("graphql-config");

var _customGraphQLValidationRules = require("./customGraphQLValidationRules");

var customRules = _interopRequireWildcard(_customGraphQLValidationRules);

var _constants = require("./constants");

var _createRule = require("./createRule");

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var allGraphQLValidatorNames = _graphql.specifiedRules.map(function (rule) {
  return rule.name;
});

// Map of env name to list of rule names.
var envGraphQLValidatorNames = {
  apollo: (0, _lodash.without)(allGraphQLValidatorNames, "KnownFragmentNames", "NoUnusedFragments"),
  lokka: (0, _lodash.without)(allGraphQLValidatorNames, "KnownFragmentNames", "NoUnusedFragments"),
  fraql: (0, _lodash.without)(allGraphQLValidatorNames, "KnownFragmentNames", "NoUnusedFragments"),
  relay: (0, _lodash.without)(allGraphQLValidatorNames, "KnownDirectives", "KnownFragmentNames", "NoUndefinedVariables", "NoUnusedFragments",
  // `graphql` < 14
  "ProvidedNonNullArguments",
  // `graphql`@14
  "ProvidedRequiredArguments", "ScalarLeafs"),
  literal: (0, _lodash.without)(allGraphQLValidatorNames, "KnownFragmentNames", "NoUnusedFragments")
};

var gqlFiles = ["gql", "graphql"];

var defaultRuleProperties = {
  env: {
    enum: ["lokka", "fraql", "relay", "apollo", "literal"]
  },
  schemaJson: {
    type: "object"
  },
  schemaJsonFilepath: {
    type: "string"
  },
  schemaString: {
    type: "string"
  },
  tagName: {
    type: "string",
    pattern: "^[$_a-zA-Z$_][a-zA-Z0-9$_]+(\\.[a-zA-Z0-9$_]+)?$"
  },
  projectName: {
    type: "string"
  }
};

// schemaJson, schemaJsonFilepath, schemaString and projectName are mutually exclusive:
var schemaPropsExclusiveness = {
  oneOf: [{
    required: ["schemaJson"],
    not: { required: ["schemaString", "schemaJsonFilepath", "projectName"] }
  }, {
    required: ["schemaJsonFilepath"],
    not: { required: ["schemaJson", "schemaString", "projectName"] }
  }, {
    required: ["schemaString"],
    not: { required: ["schemaJson", "schemaJsonFilepath", "projectName"] }
  }, {
    not: {
      anyOf: [{ required: ["schemaString"] }, { required: ["schemaJson"] }, { required: ["schemaJsonFilepath"] }]
    }
  }]
};

var rules = exports.rules = {
  "template-strings": {
    meta: {
      schema: {
        type: "array",
        items: _extends({
          additionalProperties: false,
          properties: _extends({}, defaultRuleProperties, {
            validators: {
              oneOf: [{
                type: "array",
                uniqueItems: true,
                items: {
                  enum: allGraphQLValidatorNames
                }
              }, {
                enum: ["all"]
              }]
            }
          })
        }, schemaPropsExclusiveness)
      }
    },
    create: function create(context) {
      return (0, _createRule.createRule)(context, function (optionGroup) {
        return parseOptions(optionGroup, context);
      });
    }
  },
  "named-operations": {
    meta: {
      schema: {
        type: "array",
        items: _extends({
          additionalProperties: false,
          properties: _extends({}, defaultRuleProperties)
        }, schemaPropsExclusiveness)
      }
    },
    create: function create(context) {
      return (0, _createRule.createRule)(context, function (optionGroup) {
        return parseOptions(_extends({
          validators: ["OperationsMustHaveNames"]
        }, optionGroup), context);
      });
    }
  },
  "required-fields": {
    meta: {
      schema: {
        type: "array",
        minItems: 1,
        items: _extends({
          additionalProperties: false,
          properties: _extends({}, defaultRuleProperties, {
            requiredFields: {
              type: "array",
              items: {
                type: "string"
              }
            }
          }),
          required: ["requiredFields"]
        }, schemaPropsExclusiveness)
      }
    },
    create: function create(context) {
      return (0, _createRule.createRule)(context, function (optionGroup) {
        return parseOptions(_extends({
          validators: ["RequiredFields"],
          options: { requiredFields: optionGroup.requiredFields }
        }, optionGroup), context);
      });
    }
  },
  "capitalized-type-name": {
    meta: {
      schema: {
        type: "array",
        items: _extends({
          additionalProperties: false,
          properties: _extends({}, defaultRuleProperties)
        }, schemaPropsExclusiveness)
      }
    },
    create: function create(context) {
      return (0, _createRule.createRule)(context, function (optionGroup) {
        return parseOptions(_extends({
          validators: ["typeNamesShouldBeCapitalized"]
        }, optionGroup), context);
      });
    }
  },
  "no-deprecated-fields": {
    meta: {
      schema: {
        type: "array",
        items: _extends({
          additionalProperties: false,
          properties: _extends({}, defaultRuleProperties)
        }, schemaPropsExclusiveness)
      }
    },
    create: function create(context) {
      return (0, _createRule.createRule)(context, function (optionGroup) {
        return parseOptions(_extends({
          validators: ["noDeprecatedFields"]
        }, optionGroup), context);
      });
    }
  }
};

var schemaCache = {};
var projectCache = {};

function parseOptions(optionGroup, context) {
  var schemaJson = optionGroup.schemaJson,
      schemaJsonFilepath = optionGroup.schemaJsonFilepath,
      schemaString = optionGroup.schemaString,
      env = optionGroup.env,
      projectName = optionGroup.projectName,
      tagNameOption = optionGroup.tagName,
      validatorNamesOption = optionGroup.validators;


  var cacheHit = schemaCache[JSON.stringify(optionGroup)];
  if (cacheHit && env !== "literal") {
    return cacheHit;
  }

  // Validate and unpack schema
  var schema = void 0;
  if (schemaJson) {
    schema = initSchema(schemaJson);
  } else if (schemaJsonFilepath) {
    schema = initSchemaFromFile(schemaJsonFilepath);
  } else if (schemaString) {
    schema = initSchemaFromString(schemaString);
  } else {
    try {
      var config = (0, _graphqlConfig.getGraphQLConfig)(_path2.default.dirname(context.getFilename()));
      var projectConfig = void 0;
      if (projectName) {
        projectConfig = config.getProjects()[projectName];
        if (!projectConfig) {
          throw new Error("Project with name \"" + projectName + "\" not found in " + config.configPath + ".");
        }
      } else {
        projectConfig = config.getConfigForFile(context.getFilename());
      }
      if (projectConfig) {
        var key = config.configPath + "[" + projectConfig.projectName + "]";
        schema = projectCache[key];
        if (!schema) {
          schema = projectConfig.getSchema();
          projectCache[key] = schema;
        }
      }
      if (cacheHit) {
        return _extends({}, cacheHit, { schema: schema });
      }
    } catch (e) {
      if (e instanceof _graphqlConfig.ConfigNotFoundError) {
        throw new Error("Must provide .graphqlconfig file or pass in `schemaJson` option " + "with schema object or `schemaJsonFilepath` with absolute path to the json file.");
      }
      throw e;
    }
  }

  // Validate env
  if (env && env !== "lokka" && env !== "fraql" && env !== "relay" && env !== "apollo" && env !== "literal") {
    throw new Error("Invalid option for env, only `apollo`, `lokka`, `fraql`, `relay`, and `literal` supported.");
  }

  // Validate tagName and set default
  var tagName = void 0;
  if (tagNameOption) {
    tagName = tagNameOption;
  } else if (env === "relay") {
    tagName = "Relay.QL";
  } else if (env === "literal") {
    tagName = _constants.internalTag;
  } else {
    tagName = "gql";
  }

  // The validator list may be:
  //    The string 'all' to use all rules.
  //    An array of rule names.
  //    null/undefined to use the default rule set of the environment, or all rules.
  var validatorNames = void 0;
  if (validatorNamesOption === "all") {
    validatorNames = allGraphQLValidatorNames;
  } else if (validatorNamesOption) {
    validatorNames = validatorNamesOption;
  } else {
    validatorNames = envGraphQLValidatorNames[env] || allGraphQLValidatorNames;
  }

  var validators = validatorNames.map(function (name) {
    if (name in customRules) {
      return customRules[name];
    } else {
      return require("graphql/validation/rules/" + name)[name];
    }
  });
  var results = { schema: schema, env: env, tagName: tagName, validators: validators };
  schemaCache[JSON.stringify(optionGroup)] = results;
  return results;
}

function initSchema(json) {
  var unpackedSchemaJson = json.data ? json.data : json;
  if (!unpackedSchemaJson.__schema) {
    throw new Error("Please pass a valid GraphQL introspection query result.");
  }
  return (0, _graphql.buildClientSchema)(unpackedSchemaJson);
}

function initSchemaFromFile(jsonFile) {
  return initSchema(JSON.parse(_fs2.default.readFileSync(jsonFile, "utf8")));
}

function initSchemaFromString(source) {
  return (0, _graphql.buildSchema)(source);
}

var gqlProcessor = {
  preprocess: function preprocess(text) {
    // Wrap the text in backticks and prepend the internal tag. First the text
    // must be escaped, because of the three sequences that have special
    // meaning in JavaScript template literals, and could change the meaning of
    // the text or cause syntax errors.
    // https://tc39.github.io/ecma262/#prod-TemplateCharacter
    //
    // - "`" would end the template literal.
    // - "\" would start an escape sequence.
    // - "${" would start an interpolation.
    var escaped = text.replace(/[`\\]|\$\{/g, "\\$&");
    return [_constants.internalTag + "`" + escaped + "`"];
  },
  postprocess: function postprocess(messages) {
    // only report graphql-errors
    return (0, _lodash.flatten)(messages).filter(function (message) {
      return (0, _lodash.includes)((0, _lodash.keys)(rules).map(function (key) {
        return "graphql/" + key;
      }), message.ruleId);
    });
  }
};

var processors = exports.processors = (0, _lodash.reduce)(gqlFiles, function (result, value) {
  return _extends({}, result, _defineProperty({}, "." + value, gqlProcessor));
}, {});

exports.default = {
  rules: rules,
  processors: processors
};