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AK,SAAkB,GAC/C,OACE,OAAQ,EAAS,KAAO,EAAS,MAC/B,KAAK,EAGH,OAFA,EAAS,KAAO,EAChB,EAAS,KAAO,EACT,KAAK,aAAa,GAE3B,KAAK,EACH,EAAM,EAAS,KACf,EAAY,EAEA,OAAR,IACF,EAAS,KAAM,GACf,GAAa,IAGE,OAAb,GAAqB,GAAY,GAAa,IAChD,YAAW,WACT,EAAO,aAAa,EAAW,EAAU,EAAU,EACrD,GAAG,GAEL,EAAS,KAAO,GAChB,MAEF,KAAK,EACH,EAAS,KAAO,EAChB,EAAS,GAAK,EAAgB,MAAE,GAEhC,EAAS,EAAS,GAAI,MACtB,YAAW,WACT,EAAO,aAAa,EAAY,EAAU,EAAU,EACtD,GAAG,GAEL,KAAK,GACL,IAAK,MACH,OAAO,EAAS,OAGxB,GAAG,EAAS,KAAM,CAAC,CAAC,EAAG,IACzB,KAEA,SAAsB,GACpB,OAAO,EAAK,MAAM,KAAM,UAC1B,IAWD,CACD,IAAK,SACL,OACM,EAAQ,iBAA+B,mBAAmB,MAAK,SAAS,EAAS,GACnF,IAEI,EAAO,EAFP,EAAc,UAAU,OAAS,QAAsB,IAAjB,UAAU,GAAmB,UAAU,GAAK,IAItF,OAAO,mBAAmB,MAAK,SAAmB,GAChD,OACE,OAAQ,EAAU,KAAO,EAAU,MACjC,KAAK,EAEH,OADA,EAAU,KAAO,EACV,KAAK,qBAEd,KAAK,EACH,EAAQ,EAAU,KAClB,EAAc,EAAM,YAGpB,KAAK,aAAa,EAAa,KAAM,EAAU,GAEjD,KAAK,EACL,IAAK,MACH,OAAO,EAAU,OAGzB,GAAG,EAAU,KACf,KAEA,SAAgB,GACd,OAAO,EAAM,MAAM,KAAM,UAC3B,MAKG,CACT,CA9VU,GAgWV,OAAO,QAAU","file":"/npm/sscjs@0.0.9/lib/ssc.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.19.2.\n * Original file: /npm/sscjs@0.0.9/lib/ssc.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n!(function(global) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  var inModule = typeof module === \"object\";\n  var runtime = global.regeneratorRuntime;\n  if (runtime) {\n    if (inModule) {\n      // If regeneratorRuntime is defined globally and we're in a module,\n      // make the exports object identical to regeneratorRuntime.\n      module.exports = runtime;\n    }\n    // Don't bother evaluating the rest of this file if the runtime was\n    // already defined globally.\n    return;\n  }\n\n  // Define the runtime globally (as expected by generated code) as either\n  // module.exports (if we're in a module) or a new, empty object.\n  runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n    return generator;\n  }\n  runtime.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  IteratorPrototype[iteratorSymbol] = function () {\n    return this;\n  };\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n  GeneratorFunctionPrototype.constructor = GeneratorFunction;\n  GeneratorFunctionPrototype[toStringTagSymbol] =\n    GeneratorFunction.displayName = \"GeneratorFunction\";\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      prototype[method] = function(arg) {\n        return this._invoke(method, arg);\n      };\n    });\n  }\n\n  runtime.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  runtime.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      if (!(toStringTagSymbol in genFun)) {\n        genFun[toStringTagSymbol] = \"GeneratorFunction\";\n      }\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  runtime.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return Promise.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return Promise.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration. If the Promise is rejected, however, the\n          // result for this iteration will be rejected with the same\n          // reason. Note that rejections of yielded Promises are not\n          // thrown back into the generator function, as is the case\n          // when an awaited Promise is rejected. This difference in\n          // behavior between yield and await is important, because it\n          // allows the consumer to decide what to do with the yielded\n          // rejection (swallow it and continue, manually .throw it back\n          // into the generator, abandon iteration, whatever). With\n          // await, by contrast, there is no opportunity to examine the\n          // rejection reason outside the generator function, so the\n          // only option is to throw it from the await expression, and\n          // let the generator function handle the exception.\n          result.value = unwrapped;\n          resolve(result);\n        }, reject);\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new Promise(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    this._invoke = enqueue;\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n    return this;\n  };\n  runtime.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList)\n    );\n\n    return runtime.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method always terminates the yield* loop.\n      context.delegate = null;\n\n      if (context.method === \"throw\") {\n        if (delegate.iterator.return) {\n          // If the delegate iterator has a return method, give it a\n          // chance to clean up.\n          context.method = \"return\";\n          context.arg = undefined;\n          maybeInvokeDelegate(delegate, context);\n\n          if (context.method === \"throw\") {\n            // If maybeInvokeDelegate(context) changed context.method from\n            // \"return\" to \"throw\", let that override the TypeError below.\n            return ContinueSentinel;\n          }\n        }\n\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a 'throw' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  Gp[toStringTagSymbol] = \"Generator\";\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  Gp[iteratorSymbol] = function() {\n    return this;\n  };\n\n  Gp.toString = function() {\n    return \"[object Generator]\";\n  };\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  runtime.keys = function(object) {\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  runtime.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n})(\n  // In sloppy mode, unbound `this` refers to the global object, fallback to\n  // Function constructor if we're in global strict mode. That is sadly a form\n  // of indirect eval which violates Content Security Policy.\n  (function() { return this })() || Function(\"return this\")()\n);\n\n'use strict';\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar axios = _interopDefault(require('axios'));\n\nvar asyncToGenerator = function (fn) {\n  return function () {\n    var gen = fn.apply(this, arguments);\n    return new Promise(function (resolve, reject) {\n      function step(key, arg) {\n        try {\n          var info = gen[key](arg);\n          var value = info.value;\n        } catch (error) {\n          reject(error);\n          return;\n        }\n\n        if (info.done) {\n          resolve(value);\n        } else {\n          return Promise.resolve(value).then(function (value) {\n            step(\"next\", value);\n          }, function (err) {\n            step(\"throw\", err);\n          });\n        }\n      }\n\n      return step(\"next\");\n    });\n  };\n};\n\nvar classCallCheck = function (instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n};\n\nvar createClass = function () {\n  function defineProperties(target, props) {\n    for (var i = 0; i < props.length; i++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      Object.defineProperty(target, descriptor.key, descriptor);\n    }\n  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar BLOCKCHAIN_API = 'blockchain';\nvar CONTRACTAPI = 'contracts';\n\nvar SSC = function () {\n  /**\n   * send a JSON RPC request\n   * @param {String} rpcNodeUrl the url of the JSON RPC node\n   * @param {Number} timeout timeout after which the request is aborted, default 15 secs\n   */\n  function SSC(rpcNodeUrl) {\n    var timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 15000;\n    classCallCheck(this, SSC);\n\n    this.axios = axios.create({\n      baseURL: rpcNodeUrl,\n      timeout: timeout,\n      headers: {\n        'Content-Type': 'application/json',\n        'Access-Control-Allow-Origin': '*'\n      }\n    });\n\n    this.id = 1;\n  }\n\n  /**\n   * send a JSON RPC request\n   * @param {String} endpoint endpoint\n   * @param {JSON} request request\n   * @param {Function} callback callback called after the request is sent if passed (a promise is returned otherwise)\n   */\n\n\n  createClass(SSC, [{\n    key: 'send',\n    value: function send(endpoint, request, callback) {\n\n      if (callback) {\n        this.sendWithCallback(endpoint, request, callback);\n      }\n\n      return this.sendWithPromise(endpoint, request);\n    }\n\n    /**\n     * send a JSON RPC request with callback\n     * @param {String} endpoint endpoint\n     * @param {JSON} request request\n     * @param {Function} callback callback called after the request is sent\n     */\n\n  }, {\n    key: 'sendWithCallback',\n    value: function sendWithCallback(endpoint, request, callback) {\n      var postData = _extends({\n        jsonrpc: '2.0',\n        id: this.id\n      }, request);\n\n      this.id += 1;\n\n      this.axios.post(endpoint, postData).then(function (response) {\n        callback(null, response.data.result);\n      }).catch(function (error) {\n        callback(error, null);\n      });\n    }\n\n    /**\n     * send a JSON RPC request, return a promise\n     * @param {String} endpoint endpoint\n     * @param {JSON} request request\n     * @returns {Promise<JSON>} returns a promise\n     */\n\n  }, {\n    key: 'sendWithPromise',\n    value: function sendWithPromise(endpoint, request) {\n      var _this = this;\n\n      var postData = _extends({\n        jsonrpc: '2.0',\n        id: this.id\n      }, request);\n\n      this.id += 1;\n\n      return new Promise(function (resolve, reject) {\n        _this.axios.post(endpoint, postData).then(function (response) {\n          resolve(response.data.result);\n        }).catch(function (error) {\n          reject(error);\n        });\n      });\n    }\n\n    /**\n     * Get the information of a contract (owner, source code, etc...)\n     * @param {String} name contract name\n     * @param {Function} callback callback called if passed\n     * @returns {Promise<JSON>} returns a promise if no callback passed\n     */\n\n  }, {\n    key: 'getContractInfo',\n    value: function getContractInfo(name) {\n      var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      var request = {\n        'method': 'getContract',\n        'params': {\n          name: name\n        }\n      };\n\n      return this.send(CONTRACTAPI, request, callback);\n    }\n\n    /**\n     * retrieve a record from the table of a contract\n     * @param {String} contract contract name\n     * @param {String} table table name\n     * @param {JSON} query query to perform on the table\n     * @param {Function} callback callback called if passed\n     * @returns {Promise<JSON>} returns a promise if no callback passed\n     */\n\n  }, {\n    key: 'findOne',\n    value: function findOne(contract, table, query) {\n      var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n      var request = {\n        'method': 'findOne',\n        'params': {\n          contract: contract,\n          table: table,\n          query: query\n        }\n      };\n\n      return this.send(CONTRACTAPI, request, callback);\n    }\n\n    /**\n     * retrieve records from the table of a contract\n     * @param {String} contract contract name\n     * @param {String} table table name\n     * @param {JSON} query query to perform on the table\n     * @param {Integer} limit limit the number of records to retrieve\n     * @param {Integer} offset offset applied to the records set\n     * @param {Array<Object>} indexes array of index definitions { index: string, descending: boolean }\n     * @param {Function} callback callback called if passed\n     * @returns {Promise<JSON>} returns a promise if no callback passed\n     */\n\n  }, {\n    key: 'find',\n    value: function find(contract, table, query) {\n      var limit = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1000;\n      var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n      var indexes = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];\n      var callback = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;\n\n      var request = {\n        'method': 'find',\n        'params': {\n          contract: contract,\n          table: table,\n          query: query,\n          limit: limit,\n          offset: offset,\n          indexes: indexes\n        }\n      };\n\n      return this.send(CONTRACTAPI, request, callback);\n    }\n\n    /**\n     * retrieve the latest block info of the sidechain\n     * @param {Function} callback callback called if passed\n     * @returns {Promise<JSON>} returns a promise if no callback passed\n     */\n\n  }, {\n    key: 'getLatestBlockInfo',\n    value: function getLatestBlockInfo() {\n      var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n      var request = {\n        'method': 'getLatestBlockInfo'\n      };\n\n      return this.send(BLOCKCHAIN_API, request, callback);\n    }\n\n    /**\n     * retrieve the specified block info of the sidechain\n     * @param {Number} blockNumber block number\n     * @param {Function} callback callback called if passed\n     * @returns {Promise<JSON>} returns a promise if no callback passed\n     */\n\n  }, {\n    key: 'getBlockInfo',\n    value: function getBlockInfo(blockNumber) {\n      var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      var request = {\n        'method': 'getBlockInfo',\n        'params': {\n          blockNumber: blockNumber\n        }\n      };\n\n      return this.send(BLOCKCHAIN_API, request, callback);\n    }\n\n    /**\n     * retrieve the specified transaction info of the sidechain\n     * @param {String} txid transaction id\n     * @param {Function} callback callback called if passed\n     * @returns {Promise<JSON>} returns a promise if no callback passed\n     */\n\n  }, {\n    key: 'getTransactionInfo',\n    value: function getTransactionInfo(txid) {\n      var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n      var request = {\n        'method': 'getTransactionInfo',\n        'params': {\n          txid: txid\n        }\n      };\n\n      return this.send(BLOCKCHAIN_API, request, callback);\n    }\n\n    /**\n     * stream part of the sidechain\n     * @param {Number} startBlock the first block to retrieve\n     * @param {Number} endBlock if passed the stream will stop after the block is retrieved\n     * @param {Function} callback callback called everytime a block is retrieved\n     * @param {Number} pollingTime polling time, default 1 sec\n     */\n\n  }, {\n    key: 'streamFromTo',\n    value: function () {\n      var _ref = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(startBlock) {\n        var endBlock = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n        var _this2 = this;\n\n        var callback = arguments[2];\n        var pollingTime = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1000;\n        var res, nextBlock;\n        return regeneratorRuntime.wrap(function _callee$(_context) {\n          while (1) {\n            switch (_context.prev = _context.next) {\n              case 0:\n                _context.prev = 0;\n                _context.next = 3;\n                return this.getBlockInfo(startBlock);\n\n              case 3:\n                res = _context.sent;\n                nextBlock = startBlock;\n\n                if (res !== null) {\n                  callback(null, res);\n                  nextBlock += 1;\n                }\n\n                if (endBlock === null || endBlock && nextBlock <= endBlock) {\n                  setTimeout(function () {\n                    _this2.streamFromTo(nextBlock, endBlock, callback, pollingTime);\n                  }, pollingTime);\n                }\n                _context.next = 13;\n                break;\n\n              case 9:\n                _context.prev = 9;\n                _context.t0 = _context['catch'](0);\n\n                callback(_context.t0, null);\n                setTimeout(function () {\n                  _this2.streamFromTo(startBlock, endBlock, callback, pollingTime);\n                }, pollingTime);\n\n              case 13:\n              case 'end':\n                return _context.stop();\n            }\n          }\n        }, _callee, this, [[0, 9]]);\n      }));\n\n      function streamFromTo(_x13) {\n        return _ref.apply(this, arguments);\n      }\n\n      return streamFromTo;\n    }()\n\n    /**\n     * stream the sidechain (starting from the latest block produced)\n     * @param {Function} callback callback called everytime a block is retrieved\n     * @param {Number} pollingTime polling time, default 1 sec\n     */\n\n  }, {\n    key: 'stream',\n    value: function () {\n      var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(callback) {\n        var pollingTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n\n        var _ref3, blockNumber;\n\n        return regeneratorRuntime.wrap(function _callee2$(_context2) {\n          while (1) {\n            switch (_context2.prev = _context2.next) {\n              case 0:\n                _context2.next = 2;\n                return this.getLatestBlockInfo();\n\n              case 2:\n                _ref3 = _context2.sent;\n                blockNumber = _ref3.blockNumber;\n\n\n                this.streamFromTo(blockNumber, null, callback, pollingTime);\n\n              case 5:\n              case 'end':\n                return _context2.stop();\n            }\n          }\n        }, _callee2, this);\n      }));\n\n      function stream(_x15) {\n        return _ref2.apply(this, arguments);\n      }\n\n      return stream;\n    }()\n  }]);\n  return SSC;\n}();\n\nmodule.exports = SSC;\n"]}