{"version":3,"file":"application-CrS2fcfV.js","sources":["../../../assets/javascripts/common/base/togglable-cookie.js","../../../node_modules/@vimeo/player/dist/player.es.js","../../../assets/javascripts/common/components/video-player.js","../../../assets/javascripts/common/components/live-seminar-video-player.js","../../../node_modules/shepherd.js/dist/js/shepherd.esm.js","../../../assets/javascripts/common/components/shepherd.js","../../../assets/javascripts/common/components/news-box.js","../../../assets/javascripts/common/components/side-menu.js","../../../assets/javascripts/common/components/course-analysis-video-player.js","../../../assets/javascripts/application/base/print.js","../../../node_modules/js-utils/src/position.js","../../../assets/javascripts/application/components/hnav.js","../../../assets/javascripts/application/components/nav-bar.js","../../../node_modules/sticky-sidebar/src/sticky-sidebar.js","../../../assets/javascripts/application/components/layout-main.js","../../../assets/javascripts/application/components/library.js","../../../assets/javascripts/application/components/highlights.js","../../../node_modules/tabbable/index.js","../../../node_modules/focus-trap/index.js","../../../assets/javascripts/application/components/sidebar-user.js","../../../assets/javascripts/application/components/the-article.js","../../../assets/javascripts/application/components/the-article-documents.js","../../../assets/javascripts/application/components/quiz.js","../../../assets/javascripts/application/components/post-share.js","../../../node_modules/js-utils/src/animation.js","../../../assets/javascripts/application/components/welcomebar.js","../../../assets/javascripts/application/components/paywall.js","../../../assets/javascripts/application/components/save-search-form.js","../../../node_modules/@rails/request.js/src/fetch_response.js","../../../node_modules/@rails/request.js/src/request_interceptor.js","../../../node_modules/@rails/request.js/src/lib/utils.js","../../../node_modules/@rails/request.js/src/fetch_request.js","../../../assets/javascripts/application/components/education-certificate.js","../../../node_modules/sortablejs/modular/sortable.esm.js","../../../assets/javascripts/application/components/sortable.js","../../../assets/javascripts/application/components/seminar-booking.js","../../../assets/javascripts/application/components/seminar-suggest.js","../../../assets/javascripts/application/components/single-item-purchase.js","../../../assets/javascripts/application/components/login-modal.js","../../../assets/javascripts/application/components/user-settings.js","../../../assets/javascripts/application/components/purchase-notice.js","../../../assets/javascripts/application/components/inner-tabs.js","../../../assets/javascripts/application/components/seminar-questions.js","../../../assets/javascripts/site/components/register-email.js","../../../assets/entrypoints/application.js"],"sourcesContent":["import { getElements } from 'js-utils/src/selector';\nimport Cookies from 'js-cookie';\n\nimport init from './init';\n\ninit(() => {\n  const toggleCookie = getElements('.toggle--cookie');\n  if(!toggleCookie.length) return;\n\n  toggleCookie.forEach((trigger) => {\n    trigger.addEventListener('click', (e) => {\n      e.preventDefault();\n\n      const container = trigger.closest('.togglable');\n      const cookieVal = Cookies.get(container.getAttribute('data-category-name'));\n\n      if(cookieVal == 'true') {\n        Cookies.remove(container.getAttribute('data-category-name'));\n      }\n      else {\n        Cookies.set(container.getAttribute('data-category-name'), 'true', { expires: 365 });\n      }\n    });\n  });\n});\n","/*! @vimeo/player v2.25.1 | (c) 2025 Vimeo | MIT License | https://github.com/vimeo/player.js */\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    enumerableOnly && (symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    })), keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = null != arguments[i] ? arguments[i] : {};\n    i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n      Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n    });\n  }\n  return target;\n}\nfunction _regeneratorRuntime() {\n  _regeneratorRuntime = function () {\n    return exports;\n  };\n  var exports = {},\n    Op = Object.prototype,\n    hasOwn = Op.hasOwnProperty,\n    defineProperty = Object.defineProperty || function (obj, key, desc) {\n      obj[key] = desc.value;\n    },\n    $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n    iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n    asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n    toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n  function define(obj, key, value) {\n    return Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: !0,\n      configurable: !0,\n      writable: !0\n    }), obj[key];\n  }\n  try {\n    define({}, \"\");\n  } catch (err) {\n    define = function (obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n      generator = Object.create(protoGenerator.prototype),\n      context = new Context(tryLocsList || []);\n    return defineProperty(generator, \"_invoke\", {\n      value: makeInvokeMethod(innerFn, self, context)\n    }), generator;\n  }\n  function tryCatch(fn, obj, arg) {\n    try {\n      return {\n        type: \"normal\",\n        arg: fn.call(obj, arg)\n      };\n    } catch (err) {\n      return {\n        type: \"throw\",\n        arg: err\n      };\n    }\n  }\n  exports.wrap = wrap;\n  var ContinueSentinel = {};\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n  var getProto = Object.getPrototypeOf,\n    NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function (method) {\n      define(prototype, method, function (arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (\"throw\" !== record.type) {\n        var result = record.arg,\n          value = result.value;\n        return value && \"object\" == typeof value && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n          invoke(\"next\", value, resolve, reject);\n        }, function (err) {\n          invoke(\"throw\", err, resolve, reject);\n        }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n          result.value = unwrapped, resolve(result);\n        }, function (error) {\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n      reject(record.arg);\n    }\n    var previousPromise;\n    defineProperty(this, \"_invoke\", {\n      value: function (method, arg) {\n        function callInvokeWithMethodAndArg() {\n          return new PromiseImpl(function (resolve, reject) {\n            invoke(method, arg, resolve, reject);\n          });\n        }\n        return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n      }\n    });\n  }\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = \"suspendedStart\";\n    return function (method, arg) {\n      if (\"executing\" === state) throw new Error(\"Generator is already running\");\n      if (\"completed\" === state) {\n        if (\"throw\" === method) throw arg;\n        return doneResult();\n      }\n      for (context.method = method, context.arg = arg;;) {\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        if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n          if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n          context.dispatchException(context.arg);\n        } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n        state = \"executing\";\n        var record = tryCatch(innerFn, self, context);\n        if (\"normal\" === record.type) {\n          if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n          return {\n            value: record.arg,\n            done: context.done\n          };\n        }\n        \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n      }\n    };\n  }\n  function maybeInvokeDelegate(delegate, context) {\n    var methodName = context.method,\n      method = delegate.iterator[methodName];\n    if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator.return && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n    var record = tryCatch(method, delegate.iterator, context.arg);\n    if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n    var info = record.arg;\n    return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n  }\n  function pushTryEntry(locs) {\n    var entry = {\n      tryLoc: locs[0]\n    };\n    1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n  }\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\", delete record.arg, entry.completion = record;\n  }\n  function Context(tryLocsList) {\n    this.tryEntries = [{\n      tryLoc: \"root\"\n    }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n  }\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) return iteratorMethod.call(iterable);\n      if (\"function\" == typeof iterable.next) return iterable;\n      if (!isNaN(iterable.length)) {\n        var i = -1,\n          next = function next() {\n            for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n            return next.value = undefined, next.done = !0, next;\n          };\n        return next.next = next;\n      }\n    }\n    return {\n      next: doneResult\n    };\n  }\n  function doneResult() {\n    return {\n      value: undefined,\n      done: !0\n    };\n  }\n  return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n    value: GeneratorFunctionPrototype,\n    configurable: !0\n  }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n    value: GeneratorFunction,\n    configurable: !0\n  }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n    var ctor = \"function\" == typeof genFun && genFun.constructor;\n    return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n  }, exports.mark = function (genFun) {\n    return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n  }, exports.awrap = function (arg) {\n    return {\n      __await: arg\n    };\n  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    void 0 === PromiseImpl && (PromiseImpl = Promise);\n    var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n    return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n      return result.done ? result.value : iter.next();\n    });\n  }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n    return this;\n  }), define(Gp, \"toString\", function () {\n    return \"[object Generator]\";\n  }), exports.keys = function (val) {\n    var object = Object(val),\n      keys = [];\n    for (var key in object) keys.push(key);\n    return keys.reverse(), function next() {\n      for (; keys.length;) {\n        var key = keys.pop();\n        if (key in object) return next.value = key, next.done = !1, next;\n      }\n      return next.done = !0, next;\n    };\n  }, exports.values = values, Context.prototype = {\n    constructor: Context,\n    reset: function (skipTempReset) {\n      if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n    },\n    stop: function () {\n      this.done = !0;\n      var rootRecord = this.tryEntries[0].completion;\n      if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n      return this.rval;\n    },\n    dispatchException: function (exception) {\n      if (this.done) throw exception;\n      var context = this;\n      function handle(loc, caught) {\n        return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n      }\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i],\n          record = entry.completion;\n        if (\"root\" === entry.tryLoc) return handle(\"end\");\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n            hasFinally = hasOwn.call(entry, \"finallyLoc\");\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n          } else {\n            if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\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 && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n      finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n      var record = finallyEntry ? finallyEntry.completion : {};\n      return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n    },\n    complete: function (record, afterLoc) {\n      if (\"throw\" === record.type) throw record.arg;\n      return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\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) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\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 (\"throw\" === record.type) {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n      throw new Error(\"illegal catch attempt\");\n    },\n    delegateYield: function (iterable, resultName, nextLoc) {\n      return this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n    }\n  }, exports;\n}\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, 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  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\nfunction _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n      args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n      _next(undefined);\n    });\n  };\n}\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\nfunction _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, _toPropertyKey(descriptor.key), descriptor);\n  }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n  key = _toPropertyKey(key);\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  Object.defineProperty(subClass, \"prototype\", {\n    writable: false\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}\nfunction _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n  try {\n    Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\nfunction _construct(Parent, args, Class) {\n  if (_isNativeReflectConstruct()) {\n    _construct = Reflect.construct.bind();\n  } else {\n    _construct = function _construct(Parent, args, Class) {\n      var a = [null];\n      a.push.apply(a, args);\n      var Constructor = Function.bind.apply(Parent, a);\n      var instance = new Constructor();\n      if (Class) _setPrototypeOf(instance, Class.prototype);\n      return instance;\n    };\n  }\n  return _construct.apply(null, arguments);\n}\nfunction _isNativeFunction(fn) {\n  return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\nfunction _wrapNativeSuper(Class) {\n  var _cache = typeof Map === \"function\" ? new Map() : undefined;\n  _wrapNativeSuper = function _wrapNativeSuper(Class) {\n    if (Class === null || !_isNativeFunction(Class)) return Class;\n    if (typeof Class !== \"function\") {\n      throw new TypeError(\"Super expression must either be null or a function\");\n    }\n    if (typeof _cache !== \"undefined\") {\n      if (_cache.has(Class)) return _cache.get(Class);\n      _cache.set(Class, Wrapper);\n    }\n    function Wrapper() {\n      return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n    }\n    Wrapper.prototype = Object.create(Class.prototype, {\n      constructor: {\n        value: Wrapper,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n    return _setPrototypeOf(Wrapper, Class);\n  };\n  return _wrapNativeSuper(Class);\n}\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n  return self;\n}\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n  return _assertThisInitialized(self);\n}\nfunction _createSuper(Derived) {\n  var hasNativeReflectConstruct = _isNativeReflectConstruct();\n  return function _createSuperInternal() {\n    var Super = _getPrototypeOf(Derived),\n      result;\n    if (hasNativeReflectConstruct) {\n      var NewTarget = _getPrototypeOf(this).constructor;\n      result = Reflect.construct(Super, arguments, NewTarget);\n    } else {\n      result = Super.apply(this, arguments);\n    }\n    return _possibleConstructorReturn(this, result);\n  };\n}\nfunction _toPrimitive(input, hint) {\n  if (typeof input !== \"object\" || input === null) return input;\n  var prim = input[Symbol.toPrimitive];\n  if (prim !== undefined) {\n    var res = prim.call(input, hint || \"default\");\n    if (typeof res !== \"object\") return res;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n  var key = _toPrimitive(arg, \"string\");\n  return typeof key === \"symbol\" ? key : String(key);\n}\n\n/**\n * @module lib/functions\n */\n\n/**\n * Check to see this is a node environment.\n * @type {Boolean}\n */\n/* global global */\nvar isNode = typeof global !== 'undefined' && {}.toString.call(global) === '[object global]';\n\n/**\n * Get the name of the method for a given getter or setter.\n *\n * @param {string} prop The name of the property.\n * @param {string} type Either “get” or “set”.\n * @return {string}\n */\nfunction getMethodName(prop, type) {\n  if (prop.indexOf(type.toLowerCase()) === 0) {\n    return prop;\n  }\n  return \"\".concat(type.toLowerCase()).concat(prop.substr(0, 1).toUpperCase()).concat(prop.substr(1));\n}\n\n/**\n * Check to see if the object is a DOM Element.\n *\n * @param {*} element The object to check.\n * @return {boolean}\n */\nfunction isDomElement(element) {\n  return Boolean(element && element.nodeType === 1 && 'nodeName' in element && element.ownerDocument && element.ownerDocument.defaultView);\n}\n\n/**\n * Check to see whether the value is a number.\n *\n * @see http://dl.dropboxusercontent.com/u/35146/js/tests/isNumber.html\n * @param {*} value The value to check.\n * @param {boolean} integer Check if the value is an integer.\n * @return {boolean}\n */\nfunction isInteger(value) {\n  // eslint-disable-next-line eqeqeq\n  return !isNaN(parseFloat(value)) && isFinite(value) && Math.floor(value) == value;\n}\n\n/**\n * Check to see if the URL is a Vimeo url.\n *\n * @param {string} url The url string.\n * @return {boolean}\n */\nfunction isVimeoUrl(url) {\n  return /^(https?:)?\\/\\/((((player|www)\\.)?vimeo\\.com)|((player\\.)?[a-zA-Z0-9-]+\\.(videoji\\.(hk|cn)|vimeo\\.work)))(?=$|\\/)/.test(url);\n}\n\n/**\n * Check to see if the URL is for a Vimeo embed.\n *\n * @param {string} url The url string.\n * @return {boolean}\n */\nfunction isVimeoEmbed(url) {\n  var expr = /^https:\\/\\/player\\.((vimeo\\.com)|([a-zA-Z0-9-]+\\.(videoji\\.(hk|cn)|vimeo\\.work)))\\/video\\/\\d+/;\n  return expr.test(url);\n}\nfunction getOembedDomain(url) {\n  var match = (url || '').match(/^(?:https?:)?(?:\\/\\/)?([^/?]+)/);\n  var domain = (match && match[1] || '').replace('player.', '');\n  var customDomains = ['.videoji.hk', '.vimeo.work', '.videoji.cn'];\n  for (var _i = 0, _customDomains = customDomains; _i < _customDomains.length; _i++) {\n    var customDomain = _customDomains[_i];\n    if (domain.endsWith(customDomain)) {\n      return domain;\n    }\n  }\n  return 'vimeo.com';\n}\n\n/**\n * Get the Vimeo URL from an element.\n * The element must have either a data-vimeo-id or data-vimeo-url attribute.\n *\n * @param {object} oEmbedParameters The oEmbed parameters.\n * @return {string}\n */\nfunction getVimeoUrl() {\n  var oEmbedParameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var id = oEmbedParameters.id;\n  var url = oEmbedParameters.url;\n  var idOrUrl = id || url;\n  if (!idOrUrl) {\n    throw new Error('An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.');\n  }\n  if (isInteger(idOrUrl)) {\n    return \"https://vimeo.com/\".concat(idOrUrl);\n  }\n  if (isVimeoUrl(idOrUrl)) {\n    return idOrUrl.replace('http:', 'https:');\n  }\n  if (id) {\n    throw new TypeError(\"\\u201C\".concat(id, \"\\u201D is not a valid video id.\"));\n  }\n  throw new TypeError(\"\\u201C\".concat(idOrUrl, \"\\u201D is not a vimeo.com url.\"));\n}\n\n/* eslint-disable max-params */\n/**\n * A utility method for attaching and detaching event handlers\n *\n * @param {EventTarget} target\n * @param {string | string[]} eventName\n * @param {function} callback\n * @param {'addEventListener' | 'on'} onName\n * @param {'removeEventListener' | 'off'} offName\n * @return {{cancel: (function(): void)}}\n */\nvar subscribe = function subscribe(target, eventName, callback) {\n  var onName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'addEventListener';\n  var offName = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'removeEventListener';\n  var eventNames = typeof eventName === 'string' ? [eventName] : eventName;\n  eventNames.forEach(function (evName) {\n    target[onName](evName, callback);\n  });\n  return {\n    cancel: function cancel() {\n      return eventNames.forEach(function (evName) {\n        return target[offName](evName, callback);\n      });\n    }\n  };\n};\n\nvar arrayIndexOfSupport = typeof Array.prototype.indexOf !== 'undefined';\nvar postMessageSupport = typeof window !== 'undefined' && typeof window.postMessage !== 'undefined';\nif (!isNode && (!arrayIndexOfSupport || !postMessageSupport)) {\n  throw new Error('Sorry, the Vimeo Player API is not available in this browser.');\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\n/*!\n * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill\n * https://github.com/polygonplanet/weakmap-polyfill\n * Copyright (c) 2015-2021 polygonplanet <polygon.planet.aqua@gmail.com>\n * @license MIT\n */\n\n(function (self) {\n\n  if (self.WeakMap) {\n    return;\n  }\n  var hasOwnProperty = Object.prototype.hasOwnProperty;\n  var hasDefine = Object.defineProperty && function () {\n    try {\n      // Avoid IE8's broken Object.defineProperty\n      return Object.defineProperty({}, 'x', {\n        value: 1\n      }).x === 1;\n    } catch (e) {}\n  }();\n  var defineProperty = function (object, name, value) {\n    if (hasDefine) {\n      Object.defineProperty(object, name, {\n        configurable: true,\n        writable: true,\n        value: value\n      });\n    } else {\n      object[name] = value;\n    }\n  };\n  self.WeakMap = function () {\n    // ECMA-262 23.3 WeakMap Objects\n    function WeakMap() {\n      if (this === void 0) {\n        throw new TypeError(\"Constructor WeakMap requires 'new'\");\n      }\n      defineProperty(this, '_id', genId('_WeakMap'));\n\n      // ECMA-262 23.3.1.1 WeakMap([iterable])\n      if (arguments.length > 0) {\n        // Currently, WeakMap `iterable` argument is not supported\n        throw new TypeError('WeakMap iterable is not supported');\n      }\n    }\n\n    // ECMA-262 23.3.3.2 WeakMap.prototype.delete(key)\n    defineProperty(WeakMap.prototype, 'delete', function (key) {\n      checkInstance(this, 'delete');\n      if (!isObject(key)) {\n        return false;\n      }\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        delete key[this._id];\n        return true;\n      }\n      return false;\n    });\n\n    // ECMA-262 23.3.3.3 WeakMap.prototype.get(key)\n    defineProperty(WeakMap.prototype, 'get', function (key) {\n      checkInstance(this, 'get');\n      if (!isObject(key)) {\n        return void 0;\n      }\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        return entry[1];\n      }\n      return void 0;\n    });\n\n    // ECMA-262 23.3.3.4 WeakMap.prototype.has(key)\n    defineProperty(WeakMap.prototype, 'has', function (key) {\n      checkInstance(this, 'has');\n      if (!isObject(key)) {\n        return false;\n      }\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        return true;\n      }\n      return false;\n    });\n\n    // ECMA-262 23.3.3.5 WeakMap.prototype.set(key, value)\n    defineProperty(WeakMap.prototype, 'set', function (key, value) {\n      checkInstance(this, 'set');\n      if (!isObject(key)) {\n        throw new TypeError('Invalid value used as weak map key');\n      }\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        entry[1] = value;\n        return this;\n      }\n      defineProperty(key, this._id, [key, value]);\n      return this;\n    });\n    function checkInstance(x, methodName) {\n      if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {\n        throw new TypeError(methodName + ' method called on incompatible receiver ' + typeof x);\n      }\n    }\n    function genId(prefix) {\n      return prefix + '_' + rand() + '.' + rand();\n    }\n    function rand() {\n      return Math.random().toString().substring(2);\n    }\n    defineProperty(WeakMap, '_polyfill', true);\n    return WeakMap;\n  }();\n  function isObject(x) {\n    return Object(x) === x;\n  }\n})(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : commonjsGlobal);\n\nvar npo_src = createCommonjsModule(function (module) {\n/*! Native Promise Only\n    v0.8.1 (c) Kyle Simpson\n    MIT License: http://getify.mit-license.org\n*/\n\n(function UMD(name, context, definition) {\n  // special form of UMD for polyfilling across evironments\n  context[name] = context[name] || definition();\n  if ( module.exports) {\n    module.exports = context[name];\n  }\n})(\"Promise\", typeof commonjsGlobal != \"undefined\" ? commonjsGlobal : commonjsGlobal, function DEF() {\n\n  var builtInProp,\n    cycle,\n    scheduling_queue,\n    ToString = Object.prototype.toString,\n    timer = typeof setImmediate != \"undefined\" ? function timer(fn) {\n      return setImmediate(fn);\n    } : setTimeout;\n\n  // dammit, IE8.\n  try {\n    Object.defineProperty({}, \"x\", {});\n    builtInProp = function builtInProp(obj, name, val, config) {\n      return Object.defineProperty(obj, name, {\n        value: val,\n        writable: true,\n        configurable: config !== false\n      });\n    };\n  } catch (err) {\n    builtInProp = function builtInProp(obj, name, val) {\n      obj[name] = val;\n      return obj;\n    };\n  }\n\n  // Note: using a queue instead of array for efficiency\n  scheduling_queue = function Queue() {\n    var first, last, item;\n    function Item(fn, self) {\n      this.fn = fn;\n      this.self = self;\n      this.next = void 0;\n    }\n    return {\n      add: function add(fn, self) {\n        item = new Item(fn, self);\n        if (last) {\n          last.next = item;\n        } else {\n          first = item;\n        }\n        last = item;\n        item = void 0;\n      },\n      drain: function drain() {\n        var f = first;\n        first = last = cycle = void 0;\n        while (f) {\n          f.fn.call(f.self);\n          f = f.next;\n        }\n      }\n    };\n  }();\n  function schedule(fn, self) {\n    scheduling_queue.add(fn, self);\n    if (!cycle) {\n      cycle = timer(scheduling_queue.drain);\n    }\n  }\n\n  // promise duck typing\n  function isThenable(o) {\n    var _then,\n      o_type = typeof o;\n    if (o != null && (o_type == \"object\" || o_type == \"function\")) {\n      _then = o.then;\n    }\n    return typeof _then == \"function\" ? _then : false;\n  }\n  function notify() {\n    for (var i = 0; i < this.chain.length; i++) {\n      notifyIsolated(this, this.state === 1 ? this.chain[i].success : this.chain[i].failure, this.chain[i]);\n    }\n    this.chain.length = 0;\n  }\n\n  // NOTE: This is a separate function to isolate\n  // the `try..catch` so that other code can be\n  // optimized better\n  function notifyIsolated(self, cb, chain) {\n    var ret, _then;\n    try {\n      if (cb === false) {\n        chain.reject(self.msg);\n      } else {\n        if (cb === true) {\n          ret = self.msg;\n        } else {\n          ret = cb.call(void 0, self.msg);\n        }\n        if (ret === chain.promise) {\n          chain.reject(TypeError(\"Promise-chain cycle\"));\n        } else if (_then = isThenable(ret)) {\n          _then.call(ret, chain.resolve, chain.reject);\n        } else {\n          chain.resolve(ret);\n        }\n      }\n    } catch (err) {\n      chain.reject(err);\n    }\n  }\n  function resolve(msg) {\n    var _then,\n      self = this;\n\n    // already triggered?\n    if (self.triggered) {\n      return;\n    }\n    self.triggered = true;\n\n    // unwrap\n    if (self.def) {\n      self = self.def;\n    }\n    try {\n      if (_then = isThenable(msg)) {\n        schedule(function () {\n          var def_wrapper = new MakeDefWrapper(self);\n          try {\n            _then.call(msg, function $resolve$() {\n              resolve.apply(def_wrapper, arguments);\n            }, function $reject$() {\n              reject.apply(def_wrapper, arguments);\n            });\n          } catch (err) {\n            reject.call(def_wrapper, err);\n          }\n        });\n      } else {\n        self.msg = msg;\n        self.state = 1;\n        if (self.chain.length > 0) {\n          schedule(notify, self);\n        }\n      }\n    } catch (err) {\n      reject.call(new MakeDefWrapper(self), err);\n    }\n  }\n  function reject(msg) {\n    var self = this;\n\n    // already triggered?\n    if (self.triggered) {\n      return;\n    }\n    self.triggered = true;\n\n    // unwrap\n    if (self.def) {\n      self = self.def;\n    }\n    self.msg = msg;\n    self.state = 2;\n    if (self.chain.length > 0) {\n      schedule(notify, self);\n    }\n  }\n  function iteratePromises(Constructor, arr, resolver, rejecter) {\n    for (var idx = 0; idx < arr.length; idx++) {\n      (function IIFE(idx) {\n        Constructor.resolve(arr[idx]).then(function $resolver$(msg) {\n          resolver(idx, msg);\n        }, rejecter);\n      })(idx);\n    }\n  }\n  function MakeDefWrapper(self) {\n    this.def = self;\n    this.triggered = false;\n  }\n  function MakeDef(self) {\n    this.promise = self;\n    this.state = 0;\n    this.triggered = false;\n    this.chain = [];\n    this.msg = void 0;\n  }\n  function Promise(executor) {\n    if (typeof executor != \"function\") {\n      throw TypeError(\"Not a function\");\n    }\n    if (this.__NPO__ !== 0) {\n      throw TypeError(\"Not a promise\");\n    }\n\n    // instance shadowing the inherited \"brand\"\n    // to signal an already \"initialized\" promise\n    this.__NPO__ = 1;\n    var def = new MakeDef(this);\n    this[\"then\"] = function then(success, failure) {\n      var o = {\n        success: typeof success == \"function\" ? success : true,\n        failure: typeof failure == \"function\" ? failure : false\n      };\n      // Note: `then(..)` itself can be borrowed to be used against\n      // a different promise constructor for making the chained promise,\n      // by substituting a different `this` binding.\n      o.promise = new this.constructor(function extractChain(resolve, reject) {\n        if (typeof resolve != \"function\" || typeof reject != \"function\") {\n          throw TypeError(\"Not a function\");\n        }\n        o.resolve = resolve;\n        o.reject = reject;\n      });\n      def.chain.push(o);\n      if (def.state !== 0) {\n        schedule(notify, def);\n      }\n      return o.promise;\n    };\n    this[\"catch\"] = function $catch$(failure) {\n      return this.then(void 0, failure);\n    };\n    try {\n      executor.call(void 0, function publicResolve(msg) {\n        resolve.call(def, msg);\n      }, function publicReject(msg) {\n        reject.call(def, msg);\n      });\n    } catch (err) {\n      reject.call(def, err);\n    }\n  }\n  var PromisePrototype = builtInProp({}, \"constructor\", Promise, /*configurable=*/false);\n\n  // Note: Android 4 cannot use `Object.defineProperty(..)` here\n  Promise.prototype = PromisePrototype;\n\n  // built-in \"brand\" to signal an \"uninitialized\" promise\n  builtInProp(PromisePrototype, \"__NPO__\", 0, /*configurable=*/false);\n  builtInProp(Promise, \"resolve\", function Promise$resolve(msg) {\n    var Constructor = this;\n\n    // spec mandated checks\n    // note: best \"isPromise\" check that's practical for now\n    if (msg && typeof msg == \"object\" && msg.__NPO__ === 1) {\n      return msg;\n    }\n    return new Constructor(function executor(resolve, reject) {\n      if (typeof resolve != \"function\" || typeof reject != \"function\") {\n        throw TypeError(\"Not a function\");\n      }\n      resolve(msg);\n    });\n  });\n  builtInProp(Promise, \"reject\", function Promise$reject(msg) {\n    return new this(function executor(resolve, reject) {\n      if (typeof resolve != \"function\" || typeof reject != \"function\") {\n        throw TypeError(\"Not a function\");\n      }\n      reject(msg);\n    });\n  });\n  builtInProp(Promise, \"all\", function Promise$all(arr) {\n    var Constructor = this;\n\n    // spec mandated checks\n    if (ToString.call(arr) != \"[object Array]\") {\n      return Constructor.reject(TypeError(\"Not an array\"));\n    }\n    if (arr.length === 0) {\n      return Constructor.resolve([]);\n    }\n    return new Constructor(function executor(resolve, reject) {\n      if (typeof resolve != \"function\" || typeof reject != \"function\") {\n        throw TypeError(\"Not a function\");\n      }\n      var len = arr.length,\n        msgs = Array(len),\n        count = 0;\n      iteratePromises(Constructor, arr, function resolver(idx, msg) {\n        msgs[idx] = msg;\n        if (++count === len) {\n          resolve(msgs);\n        }\n      }, reject);\n    });\n  });\n  builtInProp(Promise, \"race\", function Promise$race(arr) {\n    var Constructor = this;\n\n    // spec mandated checks\n    if (ToString.call(arr) != \"[object Array]\") {\n      return Constructor.reject(TypeError(\"Not an array\"));\n    }\n    return new Constructor(function executor(resolve, reject) {\n      if (typeof resolve != \"function\" || typeof reject != \"function\") {\n        throw TypeError(\"Not a function\");\n      }\n      iteratePromises(Constructor, arr, function resolver(idx, msg) {\n        resolve(msg);\n      }, reject);\n    });\n  });\n  return Promise;\n});\n});\n\n/**\n * @module lib/callbacks\n */\n\nvar callbackMap = new WeakMap();\n\n/**\n * Store a callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @param {(function(this:Player, *): void|{resolve: function, reject: function})} callback\n *        The callback to call or an object with resolve and reject functions for a promise.\n * @return {void}\n */\nfunction storeCallback(player, name, callback) {\n  var playerCallbacks = callbackMap.get(player.element) || {};\n  if (!(name in playerCallbacks)) {\n    playerCallbacks[name] = [];\n  }\n  playerCallbacks[name].push(callback);\n  callbackMap.set(player.element, playerCallbacks);\n}\n\n/**\n * Get the callbacks for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @return {function[]}\n */\nfunction getCallbacks(player, name) {\n  var playerCallbacks = callbackMap.get(player.element) || {};\n  return playerCallbacks[name] || [];\n}\n\n/**\n * Remove a stored callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @param {function} [callback] The specific callback to remove.\n * @return {boolean} Was this the last callback?\n */\nfunction removeCallback(player, name, callback) {\n  var playerCallbacks = callbackMap.get(player.element) || {};\n  if (!playerCallbacks[name]) {\n    return true;\n  }\n\n  // If no callback is passed, remove all callbacks for the event\n  if (!callback) {\n    playerCallbacks[name] = [];\n    callbackMap.set(player.element, playerCallbacks);\n    return true;\n  }\n  var index = playerCallbacks[name].indexOf(callback);\n  if (index !== -1) {\n    playerCallbacks[name].splice(index, 1);\n  }\n  callbackMap.set(player.element, playerCallbacks);\n  return playerCallbacks[name] && playerCallbacks[name].length === 0;\n}\n\n/**\n * Return the first stored callback for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @return {function} The callback, or false if there were none\n */\nfunction shiftCallbacks(player, name) {\n  var playerCallbacks = getCallbacks(player, name);\n  if (playerCallbacks.length < 1) {\n    return false;\n  }\n  var callback = playerCallbacks.shift();\n  removeCallback(player, name, callback);\n  return callback;\n}\n\n/**\n * Move callbacks associated with an element to another element.\n *\n * @param {HTMLElement} oldElement The old element.\n * @param {HTMLElement} newElement The new element.\n * @return {void}\n */\nfunction swapCallbacks(oldElement, newElement) {\n  var playerCallbacks = callbackMap.get(oldElement);\n  callbackMap.set(newElement, playerCallbacks);\n  callbackMap.delete(oldElement);\n}\n\n/**\n * @module lib/postmessage\n */\n\n/**\n * Parse a message received from postMessage.\n *\n * @param {*} data The data received from postMessage.\n * @return {object}\n */\nfunction parseMessageData(data) {\n  if (typeof data === 'string') {\n    try {\n      data = JSON.parse(data);\n    } catch (error) {\n      // If the message cannot be parsed, throw the error as a warning\n      console.warn(error);\n      return {};\n    }\n  }\n  return data;\n}\n\n/**\n * Post a message to the specified target.\n *\n * @param {Player} player The player object to use.\n * @param {string} method The API method to call.\n * @param {object} params The parameters to send to the player.\n * @return {void}\n */\nfunction postMessage(player, method, params) {\n  if (!player.element.contentWindow || !player.element.contentWindow.postMessage) {\n    return;\n  }\n  var message = {\n    method: method\n  };\n  if (params !== undefined) {\n    message.value = params;\n  }\n\n  // IE 8 and 9 do not support passing messages, so stringify them\n  var ieVersion = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\\d+).*$/, '$1'));\n  if (ieVersion >= 8 && ieVersion < 10) {\n    message = JSON.stringify(message);\n  }\n  player.element.contentWindow.postMessage(message, player.origin);\n}\n\n/**\n * Parse the data received from a message event.\n *\n * @param {Player} player The player that received the message.\n * @param {(Object|string)} data The message data. Strings will be parsed into JSON.\n * @return {void}\n */\nfunction processData(player, data) {\n  data = parseMessageData(data);\n  var callbacks = [];\n  var param;\n  if (data.event) {\n    if (data.event === 'error') {\n      var promises = getCallbacks(player, data.data.method);\n      promises.forEach(function (promise) {\n        var error = new Error(data.data.message);\n        error.name = data.data.name;\n        promise.reject(error);\n        removeCallback(player, data.data.method, promise);\n      });\n    }\n    callbacks = getCallbacks(player, \"event:\".concat(data.event));\n    param = data.data;\n  } else if (data.method) {\n    var callback = shiftCallbacks(player, data.method);\n    if (callback) {\n      callbacks.push(callback);\n      param = data.value;\n    }\n  }\n  callbacks.forEach(function (callback) {\n    try {\n      if (typeof callback === 'function') {\n        callback.call(player, param);\n        return;\n      }\n      callback.resolve(param);\n    } catch (e) {\n      // empty\n    }\n  });\n}\n\n/**\n * @module lib/embed\n */\nvar oEmbedParameters = ['airplay', 'audio_tracks', 'audiotrack', 'autopause', 'autoplay', 'background', 'byline', 'cc', 'chapter_id', 'chapters', 'chromecast', 'color', 'colors', 'controls', 'dnt', 'end_time', 'fullscreen', 'height', 'id', 'interactive_params', 'keyboard', 'loop', 'maxheight', 'maxwidth', 'muted', 'play_button_position', 'playsinline', 'portrait', 'progress_bar', 'quality_selector', 'responsive', 'speed', 'start_time', 'texttrack', 'title', 'transcript', 'transparent', 'unmute_button', 'url', 'vimeo_logo', 'volume', 'watch_full_video', 'width'];\n\n/**\n * Get the 'data-vimeo'-prefixed attributes from an element as an object.\n *\n * @param {HTMLElement} element The element.\n * @param {Object} [defaults={}] The default values to use.\n * @return {Object<string, string>}\n */\nfunction getOEmbedParameters(element) {\n  var defaults = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return oEmbedParameters.reduce(function (params, param) {\n    var value = element.getAttribute(\"data-vimeo-\".concat(param));\n    if (value || value === '') {\n      params[param] = value === '' ? 1 : value;\n    }\n    return params;\n  }, defaults);\n}\n\n/**\n * Create an embed from oEmbed data inside an element.\n *\n * @param {object} data The oEmbed data.\n * @param {HTMLElement} element The element to put the iframe in.\n * @return {HTMLIFrameElement} The iframe embed.\n */\nfunction createEmbed(_ref, element) {\n  var html = _ref.html;\n  if (!element) {\n    throw new TypeError('An element must be provided');\n  }\n  if (element.getAttribute('data-vimeo-initialized') !== null) {\n    return element.querySelector('iframe');\n  }\n  var div = document.createElement('div');\n  div.innerHTML = html;\n  element.appendChild(div.firstChild);\n  element.setAttribute('data-vimeo-initialized', 'true');\n  return element.querySelector('iframe');\n}\n\n/**\n * Make an oEmbed call for the specified URL.\n *\n * @param {string} videoUrl The vimeo.com url for the video.\n * @param {Object} [params] Parameters to pass to oEmbed.\n * @param {HTMLElement} element The element.\n * @return {Promise}\n */\nfunction getOEmbedData(videoUrl) {\n  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var element = arguments.length > 2 ? arguments[2] : undefined;\n  return new Promise(function (resolve, reject) {\n    if (!isVimeoUrl(videoUrl)) {\n      throw new TypeError(\"\\u201C\".concat(videoUrl, \"\\u201D is not a vimeo.com url.\"));\n    }\n    var domain = getOembedDomain(videoUrl);\n    var url = \"https://\".concat(domain, \"/api/oembed.json?url=\").concat(encodeURIComponent(videoUrl));\n    for (var param in params) {\n      if (params.hasOwnProperty(param)) {\n        url += \"&\".concat(param, \"=\").concat(encodeURIComponent(params[param]));\n      }\n    }\n    var xhr = 'XDomainRequest' in window ? new XDomainRequest() : new XMLHttpRequest();\n    xhr.open('GET', url, true);\n    xhr.onload = function () {\n      if (xhr.status === 404) {\n        reject(new Error(\"\\u201C\".concat(videoUrl, \"\\u201D was not found.\")));\n        return;\n      }\n      if (xhr.status === 403) {\n        reject(new Error(\"\\u201C\".concat(videoUrl, \"\\u201D is not embeddable.\")));\n        return;\n      }\n      try {\n        var json = JSON.parse(xhr.responseText);\n        // Check api response for 403 on oembed\n        if (json.domain_status_code === 403) {\n          // We still want to create the embed to give users visual feedback\n          createEmbed(json, element);\n          reject(new Error(\"\\u201C\".concat(videoUrl, \"\\u201D is not embeddable.\")));\n          return;\n        }\n        resolve(json);\n      } catch (error) {\n        reject(error);\n      }\n    };\n    xhr.onerror = function () {\n      var status = xhr.status ? \" (\".concat(xhr.status, \")\") : '';\n      reject(new Error(\"There was an error fetching the embed code from Vimeo\".concat(status, \".\")));\n    };\n    xhr.send();\n  });\n}\n\n/**\n * Initialize all embeds within a specific element\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nfunction initializeEmbeds() {\n  var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n  var elements = [].slice.call(parent.querySelectorAll('[data-vimeo-id], [data-vimeo-url]'));\n  var handleError = function handleError(error) {\n    if ('console' in window && console.error) {\n      console.error(\"There was an error creating an embed: \".concat(error));\n    }\n  };\n  elements.forEach(function (element) {\n    try {\n      // Skip any that have data-vimeo-defer\n      if (element.getAttribute('data-vimeo-defer') !== null) {\n        return;\n      }\n      var params = getOEmbedParameters(element);\n      var url = getVimeoUrl(params);\n      getOEmbedData(url, params, element).then(function (data) {\n        return createEmbed(data, element);\n      }).catch(handleError);\n    } catch (error) {\n      handleError(error);\n    }\n  });\n}\n\n/**\n * Resize embeds when messaged by the player.\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nfunction resizeEmbeds() {\n  var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n  // Prevent execution if users include the player.js script multiple times.\n  if (window.VimeoPlayerResizeEmbeds_) {\n    return;\n  }\n  window.VimeoPlayerResizeEmbeds_ = true;\n  var onMessage = function onMessage(event) {\n    if (!isVimeoUrl(event.origin)) {\n      return;\n    }\n\n    // 'spacechange' is fired only on embeds with cards\n    if (!event.data || event.data.event !== 'spacechange') {\n      return;\n    }\n    var iframes = parent.querySelectorAll('iframe');\n    for (var i = 0; i < iframes.length; i++) {\n      if (iframes[i].contentWindow !== event.source) {\n        continue;\n      }\n\n      // Change padding-bottom of the enclosing div to accommodate\n      // card carousel without distorting aspect ratio\n      var space = iframes[i].parentElement;\n      space.style.paddingBottom = \"\".concat(event.data.data[0].bottom, \"px\");\n      break;\n    }\n  };\n  window.addEventListener('message', onMessage);\n}\n\n/**\n * Add chapters to existing metadata for Google SEO\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nfunction initAppendVideoMetadata() {\n  var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n  //  Prevent execution if users include the player.js script multiple times.\n  if (window.VimeoSeoMetadataAppended) {\n    return;\n  }\n  window.VimeoSeoMetadataAppended = true;\n  var onMessage = function onMessage(event) {\n    if (!isVimeoUrl(event.origin)) {\n      return;\n    }\n    var data = parseMessageData(event.data);\n    if (!data || data.event !== 'ready') {\n      return;\n    }\n    var iframes = parent.querySelectorAll('iframe');\n    for (var i = 0; i < iframes.length; i++) {\n      var iframe = iframes[i];\n\n      // Initiate appendVideoMetadata if iframe is a Vimeo embed\n      var isValidMessageSource = iframe.contentWindow === event.source;\n      if (isVimeoEmbed(iframe.src) && isValidMessageSource) {\n        var player = new Player(iframe);\n        player.callMethod('appendVideoMetadata', window.location.href);\n      }\n    }\n  };\n  window.addEventListener('message', onMessage);\n}\n\n/**\n * Seek to time indicated by vimeo_t query parameter if present in URL\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nfunction checkUrlTimeParam() {\n  var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n  //  Prevent execution if users include the player.js script multiple times.\n  if (window.VimeoCheckedUrlTimeParam) {\n    return;\n  }\n  window.VimeoCheckedUrlTimeParam = true;\n  var handleError = function handleError(error) {\n    if ('console' in window && console.error) {\n      console.error(\"There was an error getting video Id: \".concat(error));\n    }\n  };\n  var onMessage = function onMessage(event) {\n    if (!isVimeoUrl(event.origin)) {\n      return;\n    }\n    var data = parseMessageData(event.data);\n    if (!data || data.event !== 'ready') {\n      return;\n    }\n    var iframes = parent.querySelectorAll('iframe');\n    var _loop = function _loop() {\n      var iframe = iframes[i];\n      var isValidMessageSource = iframe.contentWindow === event.source;\n      if (isVimeoEmbed(iframe.src) && isValidMessageSource) {\n        var player = new Player(iframe);\n        player.getVideoId().then(function (videoId) {\n          var matches = new RegExp(\"[?&]vimeo_t_\".concat(videoId, \"=([^&#]*)\")).exec(window.location.href);\n          if (matches && matches[1]) {\n            var sec = decodeURI(matches[1]);\n            player.setCurrentTime(sec);\n          }\n          return;\n        }).catch(handleError);\n      }\n    };\n    for (var i = 0; i < iframes.length; i++) {\n      _loop();\n    }\n  };\n  window.addEventListener('message', onMessage);\n}\n\n/* MIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\nTerms */\n\nfunction initializeScreenfull() {\n  var fn = function () {\n    var val;\n    var fnMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror'],\n    // New WebKit\n    ['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror'],\n    // Old WebKit\n    ['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror'], ['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror'], ['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError']];\n    var i = 0;\n    var l = fnMap.length;\n    var ret = {};\n    for (; i < l; i++) {\n      val = fnMap[i];\n      if (val && val[1] in document) {\n        for (i = 0; i < val.length; i++) {\n          ret[fnMap[0][i]] = val[i];\n        }\n        return ret;\n      }\n    }\n    return false;\n  }();\n  var eventNameMap = {\n    fullscreenchange: fn.fullscreenchange,\n    fullscreenerror: fn.fullscreenerror\n  };\n  var screenfull = {\n    request: function request(element) {\n      return new Promise(function (resolve, reject) {\n        var onFullScreenEntered = function onFullScreenEntered() {\n          screenfull.off('fullscreenchange', onFullScreenEntered);\n          resolve();\n        };\n        screenfull.on('fullscreenchange', onFullScreenEntered);\n        element = element || document.documentElement;\n        var returnPromise = element[fn.requestFullscreen]();\n        if (returnPromise instanceof Promise) {\n          returnPromise.then(onFullScreenEntered).catch(reject);\n        }\n      });\n    },\n    exit: function exit() {\n      return new Promise(function (resolve, reject) {\n        if (!screenfull.isFullscreen) {\n          resolve();\n          return;\n        }\n        var onFullScreenExit = function onFullScreenExit() {\n          screenfull.off('fullscreenchange', onFullScreenExit);\n          resolve();\n        };\n        screenfull.on('fullscreenchange', onFullScreenExit);\n        var returnPromise = document[fn.exitFullscreen]();\n        if (returnPromise instanceof Promise) {\n          returnPromise.then(onFullScreenExit).catch(reject);\n        }\n      });\n    },\n    on: function on(event, callback) {\n      var eventName = eventNameMap[event];\n      if (eventName) {\n        document.addEventListener(eventName, callback);\n      }\n    },\n    off: function off(event, callback) {\n      var eventName = eventNameMap[event];\n      if (eventName) {\n        document.removeEventListener(eventName, callback);\n      }\n    }\n  };\n  Object.defineProperties(screenfull, {\n    isFullscreen: {\n      get: function get() {\n        return Boolean(document[fn.fullscreenElement]);\n      }\n    },\n    element: {\n      enumerable: true,\n      get: function get() {\n        return document[fn.fullscreenElement];\n      }\n    },\n    isEnabled: {\n      enumerable: true,\n      get: function get() {\n        // Coerce to boolean in case of old WebKit\n        return Boolean(document[fn.fullscreenEnabled]);\n      }\n    }\n  });\n  return screenfull;\n}\n\n/** @typedef {import('./timing-src-connector.types').PlayerControls} PlayerControls */\n/** @typedef {import('./timing-object.types').TimingObject} TimingObject */\n/** @typedef {import('./timing-src-connector.types').TimingSrcConnectorOptions} TimingSrcConnectorOptions */\n/** @typedef {(msg: string) => any} Logger */\n/** @typedef {import('timing-object.types').TConnectionState} TConnectionState */\n\n/**\n * @type {TimingSrcConnectorOptions}\n *\n * For details on these properties and their effects, see the typescript definition referenced above.\n */\nvar defaultOptions = {\n  role: 'viewer',\n  autoPlayMuted: true,\n  allowedDrift: 0.3,\n  maxAllowedDrift: 1,\n  minCheckInterval: 0.1,\n  maxRateAdjustment: 0.2,\n  maxTimeToCatchUp: 1\n};\n\n/**\n * There's a proposed W3C spec for the Timing Object which would introduce a new set of APIs that would simplify time-synchronization tasks for browser applications.\n *\n * Proposed spec: https://webtiming.github.io/timingobject/\n * V3 Spec: https://timingsrc.readthedocs.io/en/latest/\n * Demuxed talk: https://www.youtube.com/watch?v=cZSjDaGDmX8\n *\n * This class makes it easy to connect Vimeo.Player to a provided TimingObject via Vimeo.Player.setTimingSrc(myTimingObject, options) and the synchronization will be handled automatically.\n *\n * There are 5 general responsibilities in TimingSrcConnector:\n *\n * 1. `updatePlayer()` which sets the player's currentTime, playbackRate and pause/play state based on current state of the TimingObject.\n * 2. `updateTimingObject()` which sets the TimingObject's position and velocity from the player's state.\n * 3. `playerUpdater` which listens for change events on the TimingObject and will respond by calling updatePlayer.\n * 4. `timingObjectUpdater` which listens to the player events of seeked, play and pause and will respond by calling `updateTimingObject()`.\n * 5. `maintainPlaybackPosition` this is code that constantly monitors the player to make sure it's always in sync with the TimingObject. This is needed because videos will generally not play with precise time accuracy and there will be some drift which becomes more noticeable over longer periods (as noted in the timing-object spec). More details on this method below.\n */\nvar TimingSrcConnector = /*#__PURE__*/function (_EventTarget) {\n  _inherits(TimingSrcConnector, _EventTarget);\n  var _super = _createSuper(TimingSrcConnector);\n  /**\n   * @param {PlayerControls} player\n   * @param {TimingObject} timingObject\n   * @param {TimingSrcConnectorOptions} options\n   * @param {Logger} logger\n   */\n  function TimingSrcConnector(_player, timingObject) {\n    var _this;\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    var logger = arguments.length > 3 ? arguments[3] : undefined;\n    _classCallCheck(this, TimingSrcConnector);\n    _this = _super.call(this);\n    _defineProperty(_assertThisInitialized(_this), \"logger\", void 0);\n    _defineProperty(_assertThisInitialized(_this), \"speedAdjustment\", 0);\n    /**\n     * @param {PlayerControls} player\n     * @param {number} newAdjustment\n     * @return {Promise<void>}\n     */\n    _defineProperty(_assertThisInitialized(_this), \"adjustSpeed\", /*#__PURE__*/function () {\n      var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(player, newAdjustment) {\n        var newPlaybackRate;\n        return _regeneratorRuntime().wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              if (!(_this.speedAdjustment === newAdjustment)) {\n                _context.next = 2;\n                break;\n              }\n              return _context.abrupt(\"return\");\n            case 2:\n              _context.next = 4;\n              return player.getPlaybackRate();\n            case 4:\n              _context.t0 = _context.sent;\n              _context.t1 = _this.speedAdjustment;\n              _context.t2 = _context.t0 - _context.t1;\n              _context.t3 = newAdjustment;\n              newPlaybackRate = _context.t2 + _context.t3;\n              _this.log(\"New playbackRate:  \".concat(newPlaybackRate));\n              _context.next = 12;\n              return player.setPlaybackRate(newPlaybackRate);\n            case 12:\n              _this.speedAdjustment = newAdjustment;\n            case 13:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee);\n      }));\n      return function (_x, _x2) {\n        return _ref.apply(this, arguments);\n      };\n    }());\n    _this.logger = logger;\n    _this.init(timingObject, _player, _objectSpread2(_objectSpread2({}, defaultOptions), options));\n    return _this;\n  }\n  _createClass(TimingSrcConnector, [{\n    key: \"disconnect\",\n    value: function disconnect() {\n      this.dispatchEvent(new Event('disconnect'));\n    }\n\n    /**\n     * @param {TimingObject} timingObject\n     * @param {PlayerControls} player\n     * @param {TimingSrcConnectorOptions} options\n     * @return {Promise<void>}\n     */\n  }, {\n    key: \"init\",\n    value: function () {\n      var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(timingObject, player, options) {\n        var _this2 = this;\n        var playerUpdater, positionSync, timingObjectUpdater;\n        return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n          while (1) switch (_context2.prev = _context2.next) {\n            case 0:\n              _context2.next = 2;\n              return this.waitForTOReadyState(timingObject, 'open');\n            case 2:\n              if (!(options.role === 'viewer')) {\n                _context2.next = 10;\n                break;\n              }\n              _context2.next = 5;\n              return this.updatePlayer(timingObject, player, options);\n            case 5:\n              playerUpdater = subscribe(timingObject, 'change', function () {\n                return _this2.updatePlayer(timingObject, player, options);\n              });\n              positionSync = this.maintainPlaybackPosition(timingObject, player, options);\n              this.addEventListener('disconnect', function () {\n                positionSync.cancel();\n                playerUpdater.cancel();\n              });\n              _context2.next = 14;\n              break;\n            case 10:\n              _context2.next = 12;\n              return this.updateTimingObject(timingObject, player);\n            case 12:\n              timingObjectUpdater = subscribe(player, ['seeked', 'play', 'pause', 'ratechange'], function () {\n                return _this2.updateTimingObject(timingObject, player);\n              }, 'on', 'off');\n              this.addEventListener('disconnect', function () {\n                return timingObjectUpdater.cancel();\n              });\n            case 14:\n            case \"end\":\n              return _context2.stop();\n          }\n        }, _callee2, this);\n      }));\n      function init(_x3, _x4, _x5) {\n        return _init.apply(this, arguments);\n      }\n      return init;\n    }()\n    /**\n     * Sets the TimingObject's state to reflect that of the player\n     *\n     * @param {TimingObject} timingObject\n     * @param {PlayerControls} player\n     * @return {Promise<void>}\n     */\n  }, {\n    key: \"updateTimingObject\",\n    value: function () {\n      var _updateTimingObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(timingObject, player) {\n        return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n          while (1) switch (_context3.prev = _context3.next) {\n            case 0:\n              _context3.t0 = timingObject;\n              _context3.next = 3;\n              return player.getCurrentTime();\n            case 3:\n              _context3.t1 = _context3.sent;\n              _context3.next = 6;\n              return player.getPaused();\n            case 6:\n              if (!_context3.sent) {\n                _context3.next = 10;\n                break;\n              }\n              _context3.t2 = 0;\n              _context3.next = 13;\n              break;\n            case 10:\n              _context3.next = 12;\n              return player.getPlaybackRate();\n            case 12:\n              _context3.t2 = _context3.sent;\n            case 13:\n              _context3.t3 = _context3.t2;\n              _context3.t4 = {\n                position: _context3.t1,\n                velocity: _context3.t3\n              };\n              _context3.t0.update.call(_context3.t0, _context3.t4);\n            case 16:\n            case \"end\":\n              return _context3.stop();\n          }\n        }, _callee3);\n      }));\n      function updateTimingObject(_x6, _x7) {\n        return _updateTimingObject.apply(this, arguments);\n      }\n      return updateTimingObject;\n    }()\n    /**\n     * Sets the player's timing state to reflect that of the TimingObject\n     *\n     * @param {TimingObject} timingObject\n     * @param {PlayerControls} player\n     * @param {TimingSrcConnectorOptions} options\n     * @return {Promise<void>}\n     */\n  }, {\n    key: \"updatePlayer\",\n    value: function () {\n      var _updatePlayer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(timingObject, player, options) {\n        var _timingObject$query, position, velocity;\n        return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n          while (1) switch (_context5.prev = _context5.next) {\n            case 0:\n              _timingObject$query = timingObject.query(), position = _timingObject$query.position, velocity = _timingObject$query.velocity;\n              if (typeof position === 'number') {\n                player.setCurrentTime(position);\n              }\n              if (!(typeof velocity === 'number')) {\n                _context5.next = 25;\n                break;\n              }\n              if (!(velocity === 0)) {\n                _context5.next = 11;\n                break;\n              }\n              _context5.next = 6;\n              return player.getPaused();\n            case 6:\n              _context5.t0 = _context5.sent;\n              if (!(_context5.t0 === false)) {\n                _context5.next = 9;\n                break;\n              }\n              player.pause();\n            case 9:\n              _context5.next = 25;\n              break;\n            case 11:\n              if (!(velocity > 0)) {\n                _context5.next = 25;\n                break;\n              }\n              _context5.next = 14;\n              return player.getPaused();\n            case 14:\n              _context5.t1 = _context5.sent;\n              if (!(_context5.t1 === true)) {\n                _context5.next = 19;\n                break;\n              }\n              _context5.next = 18;\n              return player.play().catch( /*#__PURE__*/function () {\n                var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(err) {\n                  return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n                    while (1) switch (_context4.prev = _context4.next) {\n                      case 0:\n                        if (!(err.name === 'NotAllowedError' && options.autoPlayMuted)) {\n                          _context4.next = 5;\n                          break;\n                        }\n                        _context4.next = 3;\n                        return player.setMuted(true);\n                      case 3:\n                        _context4.next = 5;\n                        return player.play().catch(function (err2) {\n                          return console.error('Couldn\\'t play the video from TimingSrcConnector. Error:', err2);\n                        });\n                      case 5:\n                      case \"end\":\n                        return _context4.stop();\n                    }\n                  }, _callee4);\n                }));\n                return function (_x11) {\n                  return _ref2.apply(this, arguments);\n                };\n              }());\n            case 18:\n              this.updatePlayer(timingObject, player, options);\n            case 19:\n              _context5.next = 21;\n              return player.getPlaybackRate();\n            case 21:\n              _context5.t2 = _context5.sent;\n              _context5.t3 = velocity;\n              if (!(_context5.t2 !== _context5.t3)) {\n                _context5.next = 25;\n                break;\n              }\n              player.setPlaybackRate(velocity);\n            case 25:\n            case \"end\":\n              return _context5.stop();\n          }\n        }, _callee5, this);\n      }));\n      function updatePlayer(_x8, _x9, _x10) {\n        return _updatePlayer.apply(this, arguments);\n      }\n      return updatePlayer;\n    }()\n    /**\n     * Since video players do not play with 100% time precision, we need to closely monitor\n     * our player to be sure it remains in sync with the TimingObject.\n     *\n     * If out of sync, we use the current conditions and the options provided to determine\n     * whether to re-sync via setting currentTime or adjusting the playbackRate\n     *\n     * @param {TimingObject} timingObject\n     * @param {PlayerControls} player\n     * @param {TimingSrcConnectorOptions} options\n     * @return {{cancel: (function(): void)}}\n     */\n  }, {\n    key: \"maintainPlaybackPosition\",\n    value: function maintainPlaybackPosition(timingObject, player, options) {\n      var _this3 = this;\n      var allowedDrift = options.allowedDrift,\n        maxAllowedDrift = options.maxAllowedDrift,\n        minCheckInterval = options.minCheckInterval,\n        maxRateAdjustment = options.maxRateAdjustment,\n        maxTimeToCatchUp = options.maxTimeToCatchUp;\n      var syncInterval = Math.min(maxTimeToCatchUp, Math.max(minCheckInterval, maxAllowedDrift)) * 1000;\n      var check = /*#__PURE__*/function () {\n        var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {\n          var diff, diffAbs, min, max, adjustment;\n          return _regeneratorRuntime().wrap(function _callee6$(_context6) {\n            while (1) switch (_context6.prev = _context6.next) {\n              case 0:\n                _context6.t0 = timingObject.query().velocity === 0;\n                if (_context6.t0) {\n                  _context6.next = 6;\n                  break;\n                }\n                _context6.next = 4;\n                return player.getPaused();\n              case 4:\n                _context6.t1 = _context6.sent;\n                _context6.t0 = _context6.t1 === true;\n              case 6:\n                if (!_context6.t0) {\n                  _context6.next = 8;\n                  break;\n                }\n                return _context6.abrupt(\"return\");\n              case 8:\n                _context6.t2 = timingObject.query().position;\n                _context6.next = 11;\n                return player.getCurrentTime();\n              case 11:\n                _context6.t3 = _context6.sent;\n                diff = _context6.t2 - _context6.t3;\n                diffAbs = Math.abs(diff);\n                _this3.log(\"Drift: \".concat(diff));\n                if (!(diffAbs > maxAllowedDrift)) {\n                  _context6.next = 22;\n                  break;\n                }\n                _context6.next = 18;\n                return _this3.adjustSpeed(player, 0);\n              case 18:\n                player.setCurrentTime(timingObject.query().position);\n                _this3.log('Resync by currentTime');\n                _context6.next = 29;\n                break;\n              case 22:\n                if (!(diffAbs > allowedDrift)) {\n                  _context6.next = 29;\n                  break;\n                }\n                min = diffAbs / maxTimeToCatchUp;\n                max = maxRateAdjustment;\n                adjustment = min < max ? (max - min) / 2 : max;\n                _context6.next = 28;\n                return _this3.adjustSpeed(player, adjustment * Math.sign(diff));\n              case 28:\n                _this3.log('Resync by playbackRate');\n              case 29:\n              case \"end\":\n                return _context6.stop();\n            }\n          }, _callee6);\n        }));\n        return function check() {\n          return _ref3.apply(this, arguments);\n        };\n      }();\n      var interval = setInterval(function () {\n        return check();\n      }, syncInterval);\n      return {\n        cancel: function cancel() {\n          return clearInterval(interval);\n        }\n      };\n    }\n\n    /**\n     * @param {string} msg\n     */\n  }, {\n    key: \"log\",\n    value: function log(msg) {\n      var _this$logger;\n      (_this$logger = this.logger) === null || _this$logger === void 0 ? void 0 : _this$logger.call(this, \"TimingSrcConnector: \".concat(msg));\n    }\n  }, {\n    key: \"waitForTOReadyState\",\n    value:\n    /**\n     * @param {TimingObject} timingObject\n     * @param {TConnectionState} state\n     * @return {Promise<void>}\n     */\n    function waitForTOReadyState(timingObject, state) {\n      return new Promise(function (resolve) {\n        var check = function check() {\n          if (timingObject.readyState === state) {\n            resolve();\n          } else {\n            timingObject.addEventListener('readystatechange', check, {\n              once: true\n            });\n          }\n        };\n        check();\n      });\n    }\n  }]);\n  return TimingSrcConnector;\n}( /*#__PURE__*/_wrapNativeSuper(EventTarget));\n\nvar playerMap = new WeakMap();\nvar readyMap = new WeakMap();\nvar screenfull = {};\nvar Player = /*#__PURE__*/function () {\n  /**\n   * Create a Player.\n   *\n   * @param {(HTMLIFrameElement|HTMLElement|string|jQuery)} element A reference to the Vimeo\n   *        player iframe, and id, or a jQuery object.\n   * @param {object} [options] oEmbed parameters to use when creating an embed in the element.\n   * @return {Player}\n   */\n  function Player(element) {\n    var _this = this;\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    _classCallCheck(this, Player);\n    /* global jQuery */\n    if (window.jQuery && element instanceof jQuery) {\n      if (element.length > 1 && window.console && console.warn) {\n        console.warn('A jQuery object with multiple elements was passed, using the first element.');\n      }\n      element = element[0];\n    }\n\n    // Find an element by ID\n    if (typeof document !== 'undefined' && typeof element === 'string') {\n      element = document.getElementById(element);\n    }\n\n    // Not an element!\n    if (!isDomElement(element)) {\n      throw new TypeError('You must pass either a valid element or a valid id.');\n    }\n\n    // Already initialized an embed in this div, so grab the iframe\n    if (element.nodeName !== 'IFRAME') {\n      var iframe = element.querySelector('iframe');\n      if (iframe) {\n        element = iframe;\n      }\n    }\n\n    // iframe url is not a Vimeo url\n    if (element.nodeName === 'IFRAME' && !isVimeoUrl(element.getAttribute('src') || '')) {\n      throw new Error('The player element passed isn’t a Vimeo embed.');\n    }\n\n    // If there is already a player object in the map, return that\n    if (playerMap.has(element)) {\n      return playerMap.get(element);\n    }\n    this._window = element.ownerDocument.defaultView;\n    this.element = element;\n    this.origin = '*';\n    var readyPromise = new npo_src(function (resolve, reject) {\n      _this._onMessage = function (event) {\n        if (!isVimeoUrl(event.origin) || _this.element.contentWindow !== event.source) {\n          return;\n        }\n        if (_this.origin === '*') {\n          _this.origin = event.origin;\n        }\n        var data = parseMessageData(event.data);\n        var isError = data && data.event === 'error';\n        var isReadyError = isError && data.data && data.data.method === 'ready';\n        if (isReadyError) {\n          var error = new Error(data.data.message);\n          error.name = data.data.name;\n          reject(error);\n          return;\n        }\n        var isReadyEvent = data && data.event === 'ready';\n        var isPingResponse = data && data.method === 'ping';\n        if (isReadyEvent || isPingResponse) {\n          _this.element.setAttribute('data-ready', 'true');\n          resolve();\n          return;\n        }\n        processData(_this, data);\n      };\n      _this._window.addEventListener('message', _this._onMessage);\n      if (_this.element.nodeName !== 'IFRAME') {\n        var params = getOEmbedParameters(element, options);\n        var url = getVimeoUrl(params);\n        getOEmbedData(url, params, element).then(function (data) {\n          var iframe = createEmbed(data, element);\n          // Overwrite element with the new iframe,\n          // but store reference to the original element\n          _this.element = iframe;\n          _this._originalElement = element;\n          swapCallbacks(element, iframe);\n          playerMap.set(_this.element, _this);\n          return data;\n        }).catch(reject);\n      }\n    });\n\n    // Store a copy of this Player in the map\n    readyMap.set(this, readyPromise);\n    playerMap.set(this.element, this);\n\n    // Send a ping to the iframe so the ready promise will be resolved if\n    // the player is already ready.\n    if (this.element.nodeName === 'IFRAME') {\n      postMessage(this, 'ping');\n    }\n    if (screenfull.isEnabled) {\n      var exitFullscreen = function exitFullscreen() {\n        return screenfull.exit();\n      };\n      this.fullscreenchangeHandler = function () {\n        if (screenfull.isFullscreen) {\n          storeCallback(_this, 'event:exitFullscreen', exitFullscreen);\n        } else {\n          removeCallback(_this, 'event:exitFullscreen', exitFullscreen);\n        }\n        // eslint-disable-next-line\n        _this.ready().then(function () {\n          postMessage(_this, 'fullscreenchange', screenfull.isFullscreen);\n        });\n      };\n      screenfull.on('fullscreenchange', this.fullscreenchangeHandler);\n    }\n    return this;\n  }\n\n  /**\n   * Get a promise for a method.\n   *\n   * @param {string} name The API method to call.\n   * @param {Object} [args={}] Arguments to send via postMessage.\n   * @return {Promise}\n   */\n  _createClass(Player, [{\n    key: \"callMethod\",\n    value: function callMethod(name) {\n      var _this2 = this;\n      var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      return new npo_src(function (resolve, reject) {\n        // We are storing the resolve/reject handlers to call later, so we\n        // can’t return here.\n        // eslint-disable-next-line promise/always-return\n        return _this2.ready().then(function () {\n          storeCallback(_this2, name, {\n            resolve: resolve,\n            reject: reject\n          });\n          postMessage(_this2, name, args);\n        }).catch(reject);\n      });\n    }\n\n    /**\n     * Get a promise for the value of a player property.\n     *\n     * @param {string} name The property name\n     * @return {Promise}\n     */\n  }, {\n    key: \"get\",\n    value: function get(name) {\n      var _this3 = this;\n      return new npo_src(function (resolve, reject) {\n        name = getMethodName(name, 'get');\n\n        // We are storing the resolve/reject handlers to call later, so we\n        // can’t return here.\n        // eslint-disable-next-line promise/always-return\n        return _this3.ready().then(function () {\n          storeCallback(_this3, name, {\n            resolve: resolve,\n            reject: reject\n          });\n          postMessage(_this3, name);\n        }).catch(reject);\n      });\n    }\n\n    /**\n     * Get a promise for setting the value of a player property.\n     *\n     * @param {string} name The API method to call.\n     * @param {mixed} value The value to set.\n     * @return {Promise}\n     */\n  }, {\n    key: \"set\",\n    value: function set(name, value) {\n      var _this4 = this;\n      return new npo_src(function (resolve, reject) {\n        name = getMethodName(name, 'set');\n        if (value === undefined || value === null) {\n          throw new TypeError('There must be a value to set.');\n        }\n\n        // We are storing the resolve/reject handlers to call later, so we\n        // can’t return here.\n        // eslint-disable-next-line promise/always-return\n        return _this4.ready().then(function () {\n          storeCallback(_this4, name, {\n            resolve: resolve,\n            reject: reject\n          });\n          postMessage(_this4, name, value);\n        }).catch(reject);\n      });\n    }\n\n    /**\n     * Add an event listener for the specified event. Will call the\n     * callback with a single parameter, `data`, that contains the data for\n     * that event.\n     *\n     * @param {string} eventName The name of the event.\n     * @param {function(*)} callback The function to call when the event fires.\n     * @return {void}\n     */\n  }, {\n    key: \"on\",\n    value: function on(eventName, callback) {\n      if (!eventName) {\n        throw new TypeError('You must pass an event name.');\n      }\n      if (!callback) {\n        throw new TypeError('You must pass a callback function.');\n      }\n      if (typeof callback !== 'function') {\n        throw new TypeError('The callback must be a function.');\n      }\n      var callbacks = getCallbacks(this, \"event:\".concat(eventName));\n      if (callbacks.length === 0) {\n        this.callMethod('addEventListener', eventName).catch(function () {\n          // Ignore the error. There will be an error event fired that\n          // will trigger the error callback if they are listening.\n        });\n      }\n      storeCallback(this, \"event:\".concat(eventName), callback);\n    }\n\n    /**\n     * Remove an event listener for the specified event. Will remove all\n     * listeners for that event if a `callback` isn’t passed, or only that\n     * specific callback if it is passed.\n     *\n     * @param {string} eventName The name of the event.\n     * @param {function} [callback] The specific callback to remove.\n     * @return {void}\n     */\n  }, {\n    key: \"off\",\n    value: function off(eventName, callback) {\n      if (!eventName) {\n        throw new TypeError('You must pass an event name.');\n      }\n      if (callback && typeof callback !== 'function') {\n        throw new TypeError('The callback must be a function.');\n      }\n      var lastCallback = removeCallback(this, \"event:\".concat(eventName), callback);\n\n      // If there are no callbacks left, remove the listener\n      if (lastCallback) {\n        this.callMethod('removeEventListener', eventName).catch(function (e) {\n          // Ignore the error. There will be an error event fired that\n          // will trigger the error callback if they are listening.\n        });\n      }\n    }\n\n    /**\n     * A promise to load a new video.\n     *\n     * @promise LoadVideoPromise\n     * @fulfill {number} The video with this id or url successfully loaded.\n     * @reject {TypeError} The id was not a number.\n     */\n    /**\n     * Load a new video into this embed. The promise will be resolved if\n     * the video is successfully loaded, or it will be rejected if it could\n     * not be loaded.\n     *\n     * @param {number|string|object} options The id of the video, the url of the video, or an object with embed options.\n     * @return {LoadVideoPromise}\n     */\n  }, {\n    key: \"loadVideo\",\n    value: function loadVideo(options) {\n      return this.callMethod('loadVideo', options);\n    }\n\n    /**\n     * A promise to perform an action when the Player is ready.\n     *\n     * @todo document errors\n     * @promise LoadVideoPromise\n     * @fulfill {void}\n     */\n    /**\n     * Trigger a function when the player iframe has initialized. You do not\n     * need to wait for `ready` to trigger to begin adding event listeners\n     * or calling other methods.\n     *\n     * @return {ReadyPromise}\n     */\n  }, {\n    key: \"ready\",\n    value: function ready() {\n      var readyPromise = readyMap.get(this) || new npo_src(function (resolve, reject) {\n        reject(new Error('Unknown player. Probably unloaded.'));\n      });\n      return npo_src.resolve(readyPromise);\n    }\n\n    /**\n     * A promise to add a cue point to the player.\n     *\n     * @promise AddCuePointPromise\n     * @fulfill {string} The id of the cue point to use for removeCuePoint.\n     * @reject {RangeError} the time was less than 0 or greater than the\n     *         video’s duration.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Add a cue point to the player.\n     *\n     * @param {number} time The time for the cue point.\n     * @param {object} [data] Arbitrary data to be returned with the cue point.\n     * @return {AddCuePointPromise}\n     */\n  }, {\n    key: \"addCuePoint\",\n    value: function addCuePoint(time) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      return this.callMethod('addCuePoint', {\n        time: time,\n        data: data\n      });\n    }\n\n    /**\n     * A promise to remove a cue point from the player.\n     *\n     * @promise AddCuePointPromise\n     * @fulfill {string} The id of the cue point that was removed.\n     * @reject {InvalidCuePoint} The cue point with the specified id was not\n     *         found.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Remove a cue point from the video.\n     *\n     * @param {string} id The id of the cue point to remove.\n     * @return {RemoveCuePointPromise}\n     */\n  }, {\n    key: \"removeCuePoint\",\n    value: function removeCuePoint(id) {\n      return this.callMethod('removeCuePoint', id);\n    }\n\n    /**\n     * A representation of a text track on a video.\n     *\n     * @typedef {Object} VimeoTextTrack\n     * @property {string} language The ISO language code.\n     * @property {string} kind The kind of track it is (captions or subtitles).\n     * @property {string} label The human‐readable label for the track.\n     */\n    /**\n     * A promise to enable a text track.\n     *\n     * @promise EnableTextTrackPromise\n     * @fulfill {VimeoTextTrack} The text track that was enabled.\n     * @reject {InvalidTrackLanguageError} No track was available with the\n     *         specified language.\n     * @reject {InvalidTrackError} No track was available with the specified\n     *         language and kind.\n     */\n    /**\n     * Enable the text track with the specified language, and optionally the\n     * specified kind (captions or subtitles).\n     *\n     * When set via the API, the track language will not change the viewer’s\n     * stored preference.\n     *\n     * @param {string} language The two‐letter language code.\n     * @param {string} [kind] The kind of track to enable (captions or subtitles).\n     * @return {EnableTextTrackPromise}\n     */\n  }, {\n    key: \"enableTextTrack\",\n    value: function enableTextTrack(language, kind) {\n      if (!language) {\n        throw new TypeError('You must pass a language.');\n      }\n      return this.callMethod('enableTextTrack', {\n        language: language,\n        kind: kind\n      });\n    }\n\n    /**\n     * A promise to disable the active text track.\n     *\n     * @promise DisableTextTrackPromise\n     * @fulfill {void} The track was disabled.\n     */\n    /**\n     * Disable the currently-active text track.\n     *\n     * @return {DisableTextTrackPromise}\n     */\n  }, {\n    key: \"disableTextTrack\",\n    value: function disableTextTrack() {\n      return this.callMethod('disableTextTrack');\n    }\n\n    /**\n     * A promise to pause the video.\n     *\n     * @promise PausePromise\n     * @fulfill {void} The video was paused.\n     */\n    /**\n     * Pause the video if it’s playing.\n     *\n     * @return {PausePromise}\n     */\n  }, {\n    key: \"pause\",\n    value: function pause() {\n      return this.callMethod('pause');\n    }\n\n    /**\n     * A promise to play the video.\n     *\n     * @promise PlayPromise\n     * @fulfill {void} The video was played.\n     */\n    /**\n     * Play the video if it’s paused. **Note:** on iOS and some other\n     * mobile devices, you cannot programmatically trigger play. Once the\n     * viewer has tapped on the play button in the player, however, you\n     * will be able to use this function.\n     *\n     * @return {PlayPromise}\n     */\n  }, {\n    key: \"play\",\n    value: function play() {\n      return this.callMethod('play');\n    }\n\n    /**\n     * Request that the player enters fullscreen.\n     * @return {Promise}\n     */\n  }, {\n    key: \"requestFullscreen\",\n    value: function requestFullscreen() {\n      if (screenfull.isEnabled) {\n        return screenfull.request(this.element);\n      }\n      return this.callMethod('requestFullscreen');\n    }\n\n    /**\n     * Request that the player exits fullscreen.\n     * @return {Promise}\n     */\n  }, {\n    key: \"exitFullscreen\",\n    value: function exitFullscreen() {\n      if (screenfull.isEnabled) {\n        return screenfull.exit();\n      }\n      return this.callMethod('exitFullscreen');\n    }\n\n    /**\n     * Returns true if the player is currently fullscreen.\n     * @return {Promise}\n     */\n  }, {\n    key: \"getFullscreen\",\n    value: function getFullscreen() {\n      if (screenfull.isEnabled) {\n        return npo_src.resolve(screenfull.isFullscreen);\n      }\n      return this.get('fullscreen');\n    }\n\n    /**\n     * Request that the player enters picture-in-picture.\n     * @return {Promise}\n     */\n  }, {\n    key: \"requestPictureInPicture\",\n    value: function requestPictureInPicture() {\n      return this.callMethod('requestPictureInPicture');\n    }\n\n    /**\n     * Request that the player exits picture-in-picture.\n     * @return {Promise}\n     */\n  }, {\n    key: \"exitPictureInPicture\",\n    value: function exitPictureInPicture() {\n      return this.callMethod('exitPictureInPicture');\n    }\n\n    /**\n     * Returns true if the player is currently picture-in-picture.\n     * @return {Promise}\n     */\n  }, {\n    key: \"getPictureInPicture\",\n    value: function getPictureInPicture() {\n      return this.get('pictureInPicture');\n    }\n\n    /**\n     * A promise to prompt the viewer to initiate remote playback.\n     *\n     * @promise RemotePlaybackPromptPromise\n     * @fulfill {void}\n     * @reject {NotFoundError} No remote playback device is available.\n     */\n    /**\n     * Request to prompt the user to initiate remote playback.\n     *\n     * @return {RemotePlaybackPromptPromise}\n     */\n  }, {\n    key: \"remotePlaybackPrompt\",\n    value: function remotePlaybackPrompt() {\n      return this.callMethod('remotePlaybackPrompt');\n    }\n\n    /**\n     * A promise to unload the video.\n     *\n     * @promise UnloadPromise\n     * @fulfill {void} The video was unloaded.\n     */\n    /**\n     * Return the player to its initial state.\n     *\n     * @return {UnloadPromise}\n     */\n  }, {\n    key: \"unload\",\n    value: function unload() {\n      return this.callMethod('unload');\n    }\n\n    /**\n     * Cleanup the player and remove it from the DOM\n     *\n     * It won't be usable and a new one should be constructed\n     *  in order to do any operations.\n     *\n     * @return {Promise}\n     */\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var _this5 = this;\n      return new npo_src(function (resolve) {\n        readyMap.delete(_this5);\n        playerMap.delete(_this5.element);\n        if (_this5._originalElement) {\n          playerMap.delete(_this5._originalElement);\n          _this5._originalElement.removeAttribute('data-vimeo-initialized');\n        }\n        if (_this5.element && _this5.element.nodeName === 'IFRAME' && _this5.element.parentNode) {\n          // If we've added an additional wrapper div, remove that from the DOM.\n          // If not, just remove the iframe element.\n          if (_this5.element.parentNode.parentNode && _this5._originalElement && _this5._originalElement !== _this5.element.parentNode) {\n            _this5.element.parentNode.parentNode.removeChild(_this5.element.parentNode);\n          } else {\n            _this5.element.parentNode.removeChild(_this5.element);\n          }\n        }\n\n        // If the clip is private there is a case where the element stays the\n        // div element. Destroy should reset the div and remove the iframe child.\n        if (_this5.element && _this5.element.nodeName === 'DIV' && _this5.element.parentNode) {\n          _this5.element.removeAttribute('data-vimeo-initialized');\n          var iframe = _this5.element.querySelector('iframe');\n          if (iframe && iframe.parentNode) {\n            // If we've added an additional wrapper div, remove that from the DOM.\n            // If not, just remove the iframe element.\n            if (iframe.parentNode.parentNode && _this5._originalElement && _this5._originalElement !== iframe.parentNode) {\n              iframe.parentNode.parentNode.removeChild(iframe.parentNode);\n            } else {\n              iframe.parentNode.removeChild(iframe);\n            }\n          }\n        }\n        _this5._window.removeEventListener('message', _this5._onMessage);\n        if (screenfull.isEnabled) {\n          screenfull.off('fullscreenchange', _this5.fullscreenchangeHandler);\n        }\n        resolve();\n      });\n    }\n\n    /**\n     * A promise to get the autopause behavior of the video.\n     *\n     * @promise GetAutopausePromise\n     * @fulfill {boolean} Whether autopause is turned on or off.\n     * @reject {UnsupportedError} Autopause is not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Get the autopause behavior for this player.\n     *\n     * @return {GetAutopausePromise}\n     */\n  }, {\n    key: \"getAutopause\",\n    value: function getAutopause() {\n      return this.get('autopause');\n    }\n\n    /**\n     * A promise to set the autopause behavior of the video.\n     *\n     * @promise SetAutopausePromise\n     * @fulfill {boolean} Whether autopause is turned on or off.\n     * @reject {UnsupportedError} Autopause is not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Enable or disable the autopause behavior of this player.\n     *\n     * By default, when another video is played in the same browser, this\n     * player will automatically pause. Unless you have a specific reason\n     * for doing so, we recommend that you leave autopause set to the\n     * default (`true`).\n     *\n     * @param {boolean} autopause\n     * @return {SetAutopausePromise}\n     */\n  }, {\n    key: \"setAutopause\",\n    value: function setAutopause(autopause) {\n      return this.set('autopause', autopause);\n    }\n\n    /**\n     * A promise to get the buffered property of the video.\n     *\n     * @promise GetBufferedPromise\n     * @fulfill {Array} Buffered Timeranges converted to an Array.\n     */\n    /**\n     * Get the buffered property of the video.\n     *\n     * @return {GetBufferedPromise}\n     */\n  }, {\n    key: \"getBuffered\",\n    value: function getBuffered() {\n      return this.get('buffered');\n    }\n\n    /**\n     * @typedef {Object} CameraProperties\n     * @prop {number} props.yaw - Number between 0 and 360.\n     * @prop {number} props.pitch - Number between -90 and 90.\n     * @prop {number} props.roll - Number between -180 and 180.\n     * @prop {number} props.fov - The field of view in degrees.\n     */\n    /**\n     * A promise to get the camera properties of the player.\n     *\n     * @promise GetCameraPromise\n     * @fulfill {CameraProperties} The camera properties.\n     */\n    /**\n     * For 360° videos get the camera properties for this player.\n     *\n     * @return {GetCameraPromise}\n     */\n  }, {\n    key: \"getCameraProps\",\n    value: function getCameraProps() {\n      return this.get('cameraProps');\n    }\n\n    /**\n     * A promise to set the camera properties of the player.\n     *\n     * @promise SetCameraPromise\n     * @fulfill {Object} The camera was successfully set.\n     * @reject {RangeError} The range was out of bounds.\n     */\n    /**\n     * For 360° videos set the camera properties for this player.\n     *\n     * @param {CameraProperties} camera The camera properties\n     * @return {SetCameraPromise}\n     */\n  }, {\n    key: \"setCameraProps\",\n    value: function setCameraProps(camera) {\n      return this.set('cameraProps', camera);\n    }\n\n    /**\n     * A representation of a chapter.\n     *\n     * @typedef {Object} VimeoChapter\n     * @property {number} startTime The start time of the chapter.\n     * @property {object} title The title of the chapter.\n     * @property {number} index The place in the order of Chapters. Starts at 1.\n     */\n    /**\n     * A promise to get chapters for the video.\n     *\n     * @promise GetChaptersPromise\n     * @fulfill {VimeoChapter[]} The chapters for the video.\n     */\n    /**\n     * Get an array of all the chapters for the video.\n     *\n     * @return {GetChaptersPromise}\n     */\n  }, {\n    key: \"getChapters\",\n    value: function getChapters() {\n      return this.get('chapters');\n    }\n\n    /**\n     * A promise to get the currently active chapter.\n     *\n     * @promise GetCurrentChaptersPromise\n     * @fulfill {VimeoChapter|undefined} The current chapter for the video.\n     */\n    /**\n     * Get the currently active chapter for the video.\n     *\n     * @return {GetCurrentChaptersPromise}\n     */\n  }, {\n    key: \"getCurrentChapter\",\n    value: function getCurrentChapter() {\n      return this.get('currentChapter');\n    }\n\n    /**\n     * A promise to get the accent color of the player.\n     *\n     * @promise GetColorPromise\n     * @fulfill {string} The hex color of the player.\n     */\n    /**\n     * Get the accent color for this player. Note this is deprecated in place of `getColorTwo`.\n     *\n     * @return {GetColorPromise}\n     */\n  }, {\n    key: \"getColor\",\n    value: function getColor() {\n      return this.get('color');\n    }\n\n    /**\n     * A promise to get all colors for the player in an array.\n     *\n     * @promise GetColorsPromise\n     * @fulfill {string[]} The hex colors of the player.\n     */\n    /**\n     * Get all the colors for this player in an array: [colorOne, colorTwo, colorThree, colorFour]\n     *\n     * @return {GetColorPromise}\n     */\n  }, {\n    key: \"getColors\",\n    value: function getColors() {\n      return npo_src.all([this.get('colorOne'), this.get('colorTwo'), this.get('colorThree'), this.get('colorFour')]);\n    }\n\n    /**\n     * A promise to set the accent color of the player.\n     *\n     * @promise SetColorPromise\n     * @fulfill {string} The color was successfully set.\n     * @reject {TypeError} The string was not a valid hex or rgb color.\n     * @reject {ContrastError} The color was set, but the contrast is\n     *         outside of the acceptable range.\n     * @reject {EmbedSettingsError} The owner of the player has chosen to\n     *         use a specific color.\n     */\n    /**\n     * Set the accent color of this player to a hex or rgb string. Setting the\n     * color may fail if the owner of the video has set their embed\n     * preferences to force a specific color.\n     * Note this is deprecated in place of `setColorTwo`.\n     *\n     * @param {string} color The hex or rgb color string to set.\n     * @return {SetColorPromise}\n     */\n  }, {\n    key: \"setColor\",\n    value: function setColor(color) {\n      return this.set('color', color);\n    }\n\n    /**\n     * A promise to set all colors for the player.\n     *\n     * @promise SetColorsPromise\n     * @fulfill {string[]} The colors were successfully set.\n     * @reject {TypeError} The string was not a valid hex or rgb color.\n     * @reject {ContrastError} The color was set, but the contrast is\n     *         outside of the acceptable range.\n     * @reject {EmbedSettingsError} The owner of the player has chosen to\n     *         use a specific color.\n     */\n    /**\n     * Set the colors of this player to a hex or rgb string. Setting the\n     * color may fail if the owner of the video has set their embed\n     * preferences to force a specific color.\n     * The colors should be passed in as an array: [colorOne, colorTwo, colorThree, colorFour].\n     * If a color should not be set, the index in the array can be left as null.\n     *\n     * @param {string[]} colors Array of the hex or rgb color strings to set.\n     * @return {SetColorsPromise}\n     */\n  }, {\n    key: \"setColors\",\n    value: function setColors(colors) {\n      if (!Array.isArray(colors)) {\n        return new npo_src(function (resolve, reject) {\n          return reject(new TypeError('Argument must be an array.'));\n        });\n      }\n      var nullPromise = new npo_src(function (resolve) {\n        return resolve(null);\n      });\n      var colorPromises = [colors[0] ? this.set('colorOne', colors[0]) : nullPromise, colors[1] ? this.set('colorTwo', colors[1]) : nullPromise, colors[2] ? this.set('colorThree', colors[2]) : nullPromise, colors[3] ? this.set('colorFour', colors[3]) : nullPromise];\n      return npo_src.all(colorPromises);\n    }\n\n    /**\n     * A representation of a cue point.\n     *\n     * @typedef {Object} VimeoCuePoint\n     * @property {number} time The time of the cue point.\n     * @property {object} data The data passed when adding the cue point.\n     * @property {string} id The unique id for use with removeCuePoint.\n     */\n    /**\n     * A promise to get the cue points of a video.\n     *\n     * @promise GetCuePointsPromise\n     * @fulfill {VimeoCuePoint[]} The cue points added to the video.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Get an array of the cue points added to the video.\n     *\n     * @return {GetCuePointsPromise}\n     */\n  }, {\n    key: \"getCuePoints\",\n    value: function getCuePoints() {\n      return this.get('cuePoints');\n    }\n\n    /**\n     * A promise to get the current time of the video.\n     *\n     * @promise GetCurrentTimePromise\n     * @fulfill {number} The current time in seconds.\n     */\n    /**\n     * Get the current playback position in seconds.\n     *\n     * @return {GetCurrentTimePromise}\n     */\n  }, {\n    key: \"getCurrentTime\",\n    value: function getCurrentTime() {\n      return this.get('currentTime');\n    }\n\n    /**\n     * A promise to set the current time of the video.\n     *\n     * @promise SetCurrentTimePromise\n     * @fulfill {number} The actual current time that was set.\n     * @reject {RangeError} the time was less than 0 or greater than the\n     *         video’s duration.\n     */\n    /**\n     * Set the current playback position in seconds. If the player was\n     * paused, it will remain paused. Likewise, if the player was playing,\n     * it will resume playing once the video has buffered.\n     *\n     * You can provide an accurate time and the player will attempt to seek\n     * to as close to that time as possible. The exact time will be the\n     * fulfilled value of the promise.\n     *\n     * @param {number} currentTime\n     * @return {SetCurrentTimePromise}\n     */\n  }, {\n    key: \"setCurrentTime\",\n    value: function setCurrentTime(currentTime) {\n      return this.set('currentTime', currentTime);\n    }\n\n    /**\n     * A promise to get the duration of the video.\n     *\n     * @promise GetDurationPromise\n     * @fulfill {number} The duration in seconds.\n     */\n    /**\n     * Get the duration of the video in seconds. It will be rounded to the\n     * nearest second before playback begins, and to the nearest thousandth\n     * of a second after playback begins.\n     *\n     * @return {GetDurationPromise}\n     */\n  }, {\n    key: \"getDuration\",\n    value: function getDuration() {\n      return this.get('duration');\n    }\n\n    /**\n     * A promise to get the ended state of the video.\n     *\n     * @promise GetEndedPromise\n     * @fulfill {boolean} Whether or not the video has ended.\n     */\n    /**\n     * Get the ended state of the video. The video has ended if\n     * `currentTime === duration`.\n     *\n     * @return {GetEndedPromise}\n     */\n  }, {\n    key: \"getEnded\",\n    value: function getEnded() {\n      return this.get('ended');\n    }\n\n    /**\n     * A promise to get the loop state of the player.\n     *\n     * @promise GetLoopPromise\n     * @fulfill {boolean} Whether or not the player is set to loop.\n     */\n    /**\n     * Get the loop state of the player.\n     *\n     * @return {GetLoopPromise}\n     */\n  }, {\n    key: \"getLoop\",\n    value: function getLoop() {\n      return this.get('loop');\n    }\n\n    /**\n     * A promise to set the loop state of the player.\n     *\n     * @promise SetLoopPromise\n     * @fulfill {boolean} The loop state that was set.\n     */\n    /**\n     * Set the loop state of the player. When set to `true`, the player\n     * will start over immediately once playback ends.\n     *\n     * @param {boolean} loop\n     * @return {SetLoopPromise}\n     */\n  }, {\n    key: \"setLoop\",\n    value: function setLoop(loop) {\n      return this.set('loop', loop);\n    }\n\n    /**\n     * A promise to set the muted state of the player.\n     *\n     * @promise SetMutedPromise\n     * @fulfill {boolean} The muted state that was set.\n     */\n    /**\n     * Set the muted state of the player. When set to `true`, the player\n     * volume will be muted.\n     *\n     * @param {boolean} muted\n     * @return {SetMutedPromise}\n     */\n  }, {\n    key: \"setMuted\",\n    value: function setMuted(muted) {\n      return this.set('muted', muted);\n    }\n\n    /**\n     * A promise to get the muted state of the player.\n     *\n     * @promise GetMutedPromise\n     * @fulfill {boolean} Whether or not the player is muted.\n     */\n    /**\n     * Get the muted state of the player.\n     *\n     * @return {GetMutedPromise}\n     */\n  }, {\n    key: \"getMuted\",\n    value: function getMuted() {\n      return this.get('muted');\n    }\n\n    /**\n     * A promise to get the paused state of the player.\n     *\n     * @promise GetLoopPromise\n     * @fulfill {boolean} Whether or not the video is paused.\n     */\n    /**\n     * Get the paused state of the player.\n     *\n     * @return {GetLoopPromise}\n     */\n  }, {\n    key: \"getPaused\",\n    value: function getPaused() {\n      return this.get('paused');\n    }\n\n    /**\n     * A promise to get the playback rate of the player.\n     *\n     * @promise GetPlaybackRatePromise\n     * @fulfill {number} The playback rate of the player on a scale from 0 to 2.\n     */\n    /**\n     * Get the playback rate of the player on a scale from `0` to `2`.\n     *\n     * @return {GetPlaybackRatePromise}\n     */\n  }, {\n    key: \"getPlaybackRate\",\n    value: function getPlaybackRate() {\n      return this.get('playbackRate');\n    }\n\n    /**\n     * A promise to set the playbackrate of the player.\n     *\n     * @promise SetPlaybackRatePromise\n     * @fulfill {number} The playback rate was set.\n     * @reject {RangeError} The playback rate was less than 0 or greater than 2.\n     */\n    /**\n     * Set the playback rate of the player on a scale from `0` to `2`. When set\n     * via the API, the playback rate will not be synchronized to other\n     * players or stored as the viewer's preference.\n     *\n     * @param {number} playbackRate\n     * @return {SetPlaybackRatePromise}\n     */\n  }, {\n    key: \"setPlaybackRate\",\n    value: function setPlaybackRate(playbackRate) {\n      return this.set('playbackRate', playbackRate);\n    }\n\n    /**\n     * A promise to get the played property of the video.\n     *\n     * @promise GetPlayedPromise\n     * @fulfill {Array} Played Timeranges converted to an Array.\n     */\n    /**\n     * Get the played property of the video.\n     *\n     * @return {GetPlayedPromise}\n     */\n  }, {\n    key: \"getPlayed\",\n    value: function getPlayed() {\n      return this.get('played');\n    }\n\n    /**\n     * A promise to get the qualities available of the current video.\n     *\n     * @promise GetQualitiesPromise\n     * @fulfill {Array} The qualities of the video.\n     */\n    /**\n     * Get the qualities of the current video.\n     *\n     * @return {GetQualitiesPromise}\n     */\n  }, {\n    key: \"getQualities\",\n    value: function getQualities() {\n      return this.get('qualities');\n    }\n\n    /**\n     * A promise to get the current set quality of the video.\n     *\n     * @promise GetQualityPromise\n     * @fulfill {string} The current set quality.\n     */\n    /**\n     * Get the current set quality of the video.\n     *\n     * @return {GetQualityPromise}\n     */\n  }, {\n    key: \"getQuality\",\n    value: function getQuality() {\n      return this.get('quality');\n    }\n\n    /**\n     * A promise to set the video quality.\n     *\n     * @promise SetQualityPromise\n     * @fulfill {number} The quality was set.\n     * @reject {RangeError} The quality is not available.\n     */\n    /**\n     * Set a video quality.\n     *\n     * @param {string} quality\n     * @return {SetQualityPromise}\n     */\n  }, {\n    key: \"setQuality\",\n    value: function setQuality(quality) {\n      return this.set('quality', quality);\n    }\n\n    /**\n     * A promise to get the remote playback availability.\n     *\n     * @promise RemotePlaybackAvailabilityPromise\n     * @fulfill {boolean} Whether remote playback is available.\n     */\n    /**\n     * Get the availability of remote playback.\n     *\n     * @return {RemotePlaybackAvailabilityPromise}\n     */\n  }, {\n    key: \"getRemotePlaybackAvailability\",\n    value: function getRemotePlaybackAvailability() {\n      return this.get('remotePlaybackAvailability');\n    }\n\n    /**\n     * A promise to get the current remote playback state.\n     *\n     * @promise RemotePlaybackStatePromise\n     * @fulfill {string} The state of the remote playback: connecting, connected, or disconnected.\n     */\n    /**\n     * Get the current remote playback state.\n     *\n     * @return {RemotePlaybackStatePromise}\n     */\n  }, {\n    key: \"getRemotePlaybackState\",\n    value: function getRemotePlaybackState() {\n      return this.get('remotePlaybackState');\n    }\n\n    /**\n     * A promise to get the seekable property of the video.\n     *\n     * @promise GetSeekablePromise\n     * @fulfill {Array} Seekable Timeranges converted to an Array.\n     */\n    /**\n     * Get the seekable property of the video.\n     *\n     * @return {GetSeekablePromise}\n     */\n  }, {\n    key: \"getSeekable\",\n    value: function getSeekable() {\n      return this.get('seekable');\n    }\n\n    /**\n     * A promise to get the seeking property of the player.\n     *\n     * @promise GetSeekingPromise\n     * @fulfill {boolean} Whether or not the player is currently seeking.\n     */\n    /**\n     * Get if the player is currently seeking.\n     *\n     * @return {GetSeekingPromise}\n     */\n  }, {\n    key: \"getSeeking\",\n    value: function getSeeking() {\n      return this.get('seeking');\n    }\n\n    /**\n     * A promise to get the text tracks of a video.\n     *\n     * @promise GetTextTracksPromise\n     * @fulfill {VimeoTextTrack[]} The text tracks associated with the video.\n     */\n    /**\n     * Get an array of the text tracks that exist for the video.\n     *\n     * @return {GetTextTracksPromise}\n     */\n  }, {\n    key: \"getTextTracks\",\n    value: function getTextTracks() {\n      return this.get('textTracks');\n    }\n\n    /**\n     * A promise to get the embed code for the video.\n     *\n     * @promise GetVideoEmbedCodePromise\n     * @fulfill {string} The `<iframe>` embed code for the video.\n     */\n    /**\n     * Get the `<iframe>` embed code for the video.\n     *\n     * @return {GetVideoEmbedCodePromise}\n     */\n  }, {\n    key: \"getVideoEmbedCode\",\n    value: function getVideoEmbedCode() {\n      return this.get('videoEmbedCode');\n    }\n\n    /**\n     * A promise to get the id of the video.\n     *\n     * @promise GetVideoIdPromise\n     * @fulfill {number} The id of the video.\n     */\n    /**\n     * Get the id of the video.\n     *\n     * @return {GetVideoIdPromise}\n     */\n  }, {\n    key: \"getVideoId\",\n    value: function getVideoId() {\n      return this.get('videoId');\n    }\n\n    /**\n     * A promise to get the title of the video.\n     *\n     * @promise GetVideoTitlePromise\n     * @fulfill {number} The title of the video.\n     */\n    /**\n     * Get the title of the video.\n     *\n     * @return {GetVideoTitlePromise}\n     */\n  }, {\n    key: \"getVideoTitle\",\n    value: function getVideoTitle() {\n      return this.get('videoTitle');\n    }\n\n    /**\n     * A promise to get the native width of the video.\n     *\n     * @promise GetVideoWidthPromise\n     * @fulfill {number} The native width of the video.\n     */\n    /**\n     * Get the native width of the currently‐playing video. The width of\n     * the highest‐resolution available will be used before playback begins.\n     *\n     * @return {GetVideoWidthPromise}\n     */\n  }, {\n    key: \"getVideoWidth\",\n    value: function getVideoWidth() {\n      return this.get('videoWidth');\n    }\n\n    /**\n     * A promise to get the native height of the video.\n     *\n     * @promise GetVideoHeightPromise\n     * @fulfill {number} The native height of the video.\n     */\n    /**\n     * Get the native height of the currently‐playing video. The height of\n     * the highest‐resolution available will be used before playback begins.\n     *\n     * @return {GetVideoHeightPromise}\n     */\n  }, {\n    key: \"getVideoHeight\",\n    value: function getVideoHeight() {\n      return this.get('videoHeight');\n    }\n\n    /**\n     * A promise to get the vimeo.com url for the video.\n     *\n     * @promise GetVideoUrlPromise\n     * @fulfill {number} The vimeo.com url for the video.\n     * @reject {PrivacyError} The url isn’t available because of the video’s privacy setting.\n     */\n    /**\n     * Get the vimeo.com url for the video.\n     *\n     * @return {GetVideoUrlPromise}\n     */\n  }, {\n    key: \"getVideoUrl\",\n    value: function getVideoUrl() {\n      return this.get('videoUrl');\n    }\n\n    /**\n     * A promise to get the volume level of the player.\n     *\n     * @promise GetVolumePromise\n     * @fulfill {number} The volume level of the player on a scale from 0 to 1.\n     */\n    /**\n     * Get the current volume level of the player on a scale from `0` to `1`.\n     *\n     * Most mobile devices do not support an independent volume from the\n     * system volume. In those cases, this method will always return `1`.\n     *\n     * @return {GetVolumePromise}\n     */\n  }, {\n    key: \"getVolume\",\n    value: function getVolume() {\n      return this.get('volume');\n    }\n\n    /**\n     * A promise to set the volume level of the player.\n     *\n     * @promise SetVolumePromise\n     * @fulfill {number} The volume was set.\n     * @reject {RangeError} The volume was less than 0 or greater than 1.\n     */\n    /**\n     * Set the volume of the player on a scale from `0` to `1`. When set\n     * via the API, the volume level will not be synchronized to other\n     * players or stored as the viewer’s preference.\n     *\n     * Most mobile devices do not support setting the volume. An error will\n     * *not* be triggered in that situation.\n     *\n     * @param {number} volume\n     * @return {SetVolumePromise}\n     */\n  }, {\n    key: \"setVolume\",\n    value: function setVolume(volume) {\n      return this.set('volume', volume);\n    }\n\n    /** @typedef {import('./lib/timing-object.types').TimingObject} TimingObject */\n    /** @typedef {import('./lib/timing-src-connector.types').TimingSrcConnectorOptions} TimingSrcConnectorOptions */\n    /** @typedef {import('./lib/timing-src-connector').TimingSrcConnector} TimingSrcConnector */\n\n    /**\n     * Connects a TimingObject to the video player (https://webtiming.github.io/timingobject/)\n     *\n     * @param {TimingObject} timingObject\n     * @param {TimingSrcConnectorOptions} options\n     *\n     * @return {Promise<TimingSrcConnector>}\n     */\n  }, {\n    key: \"setTimingSrc\",\n    value: function () {\n      var _setTimingSrc = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(timingObject, options) {\n        var _this6 = this;\n        var connector;\n        return _regeneratorRuntime().wrap(function _callee$(_context) {\n          while (1) switch (_context.prev = _context.next) {\n            case 0:\n              if (timingObject) {\n                _context.next = 2;\n                break;\n              }\n              throw new TypeError('A Timing Object must be provided.');\n            case 2:\n              _context.next = 4;\n              return this.ready();\n            case 4:\n              connector = new TimingSrcConnector(this, timingObject, options);\n              postMessage(this, 'notifyTimingObjectConnect');\n              connector.addEventListener('disconnect', function () {\n                return postMessage(_this6, 'notifyTimingObjectDisconnect');\n              });\n              return _context.abrupt(\"return\", connector);\n            case 8:\n            case \"end\":\n              return _context.stop();\n          }\n        }, _callee, this);\n      }));\n      function setTimingSrc(_x, _x2) {\n        return _setTimingSrc.apply(this, arguments);\n      }\n      return setTimingSrc;\n    }()\n  }]);\n  return Player;\n}(); // Setup embed only if this is not a node environment\nif (!isNode) {\n  screenfull = initializeScreenfull();\n  initializeEmbeds();\n  resizeEmbeds();\n  initAppendVideoMetadata();\n  checkUrlTimeParam();\n}\n\nexport default Player;\n","import { getElements } from 'js-utils/src/selector';\nimport VimeoPlayer from '@vimeo/player';\nimport _ from 'underscore';\nimport init from '../base/init';\n\ninit(() => {\n\n  let video = document.querySelectorAll(\".video-player:not(.course-analysis-video-player)\");\n  if(!video.length) return;\n\n  video = video[0];\n\n  let activeSection = 0, sectionTimes = [];\n  let currentTime = parseInt(video.getAttribute('data-video-current-time'));\n  const player = document.querySelector('.video-player');\n  const playVideoButtons = getElements('.play-video');\n  const vimeoPlayer = new VimeoPlayer(getElements('.video-player iframe')[0]);\n  const videoSections = getElements('.video-sections__inner-wrapper li');\n  const mobileToggler = getElements('.video-sections__expander')[0];\n  let sectionsOpen = false;\n  const video_type = window.LEXNOVA.aet.props.available_to_user === \"true\" ? 'video' : 'trailer';\n  const videoDuration = vimeoPlayer.getDuration();\n\n  vimeoPlayer.setColor('#d61368');\n  vimeoPlayer.setCurrentTime(currentTime);\n\n  playVideoButtons.forEach( (button) => {\n    button.addEventListener('click', () => {\n      player.classList.add('video-player--overlay-hidden');\n      vimeoPlayer.play();\n\n      window.dispatchEvent(new CustomEvent('AET', {detail: {\n        name: `${window.LEXNOVA.section_name}.${video_type}_play`,\n        props: window.LEXNOVA.aet.props\n      }}));\n    });\n  });\n\n  vimeoPlayer.on('ended', () => {\n    videoEvent({ event: 'ended', type: video_type });\n    player.classList.remove('video-player--overlay-hidden');\n    player.classList.remove('video-player--playing');\n\n    window.dispatchEvent(new CustomEvent('AET', {detail: {\n      name: `${window.LEXNOVA.section_name}.${video_type}_finished`,\n      props: window.LEXNOVA.aet.props\n    }}));\n  });\n\n  vimeoPlayer.on('play', () => {\n    videoEvent({ event: 'play', type: video_type });\n    player.classList.add('video-player--playing');\n\n    window.dispatchEvent(new CustomEvent('AET', {detail: {\n      name: `${window.LEXNOVA.section_name}.${video_type}_play`,\n      props: window.LEXNOVA.aet.props\n    }}));\n  });\n\n  vimeoPlayer.on('pause', (data) => {\n    videoEvent({ event: 'pause', seconds: data.seconds, type: video_type });\n    player.classList.remove('video-player--playing');\n\n    window.dispatchEvent(new CustomEvent('AET', {detail: {\n      name: `${window.LEXNOVA.section_name}.${video_type}_pause`,\n      props: window.LEXNOVA.aet.props\n    }}));\n  });\n\n  vimeoPlayer.on('timeupdate', (data) => {\n    videoEvent({ event: 'progress', seconds: data.seconds, type: video_type });\n\n\n    if (getElements('.quiz.is-hidden').length > 0) {\n      // Add cue point for showing quiz at 90%\n      videoDuration.then((time) => {\n        if (currentTime> parseInt(time * 0.9)) {\n          showQuiz();\n        }\n      });\n    }\n  });\n\n  const fireVideoEvent = (dataObject) => {\n    // User#do_not_track must be set to false\n    if (video_type === 'video') {\n      fetch('/api/v1/playbacks/' + video.getAttribute('data-video-resource-id'), {\n        method: \"PATCH\",\n        credentials: 'same-origin',\n        headers: {\n          'Content-Type': 'application/json; charset=utf-8',\n        },\n        body: JSON.stringify(dataObject),\n      });\n    }\n  };\n\n  const videoEvent = _.throttle(\n    fireVideoEvent, 5.0 * 1000\n  );\n\n  const sectionProgress = () => {\n    let progress = ((currentTime - sectionTimes[activeSection][0]) / (sectionTimes[activeSection][1] - sectionTimes[activeSection][0])) * 100;\n    document.querySelectorAll('.video-sections__inner-wrapper li')[activeSection].firstElementChild.style.width = progress+'%';\n  };\n\n  const adjustActiveSection = () => {\n    sectionTimes.map((i, index) => {\n      if( currentTime > i[0] && currentTime < i[1] ){\n        activeSection = index;\n\n        videoSections.forEach((item)=>{\n          item.classList.remove('active');\n        });\n\n        videoSections[activeSection].classList.add('active');\n      }\n    });\n  };\n\n  // if we can access full video then we also allow navigation in sections\n  if( !getElements('.video-player--access-false').length > 0 ){\n\n    if(!videoSections.length) return;\n\n    vimeoPlayer.on('timeupdate', (data) => {\n      currentTime = data.seconds;\n      adjustActiveSection();\n      sectionProgress();\n    });\n\n    videoSections.forEach((item) => {\n\n      let timesArray = [];\n      timesArray.push(parseInt(item.getAttribute('data-timestart')));\n      timesArray.push(parseInt(item.getAttribute('data-timeend')));\n      sectionTimes.push(timesArray);\n\n      item.addEventListener('click', () => {\n        currentTime = parseInt(item.getAttribute('data-timestart'));\n        vimeoPlayer.setCurrentTime(currentTime);\n\n        player.classList.add('video-player--overlay-hidden');\n        vimeoPlayer.play();\n\n        videoSections.forEach((item) => {\n          item.classList.remove('active');\n        });\n\n        item.classList.add('active');\n\n      });\n    });\n\n  }\n\n  //sections toggle on mobile\n\n  const videoSectionsContainer = document.querySelector('.video-sections__list-wrapper');\n\n  const toggleSections = () => {\n\n    if(!videoSectionsContainer.length) return;\n\n    videoSectionsContainer.style.height = videoSectionsContainer.firstElementChild.offsetHeight + 'px';\n    videoSectionsContainer.classList.toggle('open');\n    mobileToggler.classList.toggle('open');\n\n    if( sectionsOpen ) {\n      window.requestAnimationFrame( () => {\n        videoSectionsContainer.style.height = 0;\n      });\n      sectionsOpen = false;\n    } else {\n      sectionsOpen = true;\n    }\n  };\n\n  if (videoSectionsContainer) {\n    videoSectionsContainer.addEventListener('transitionend', () => {\n      if( sectionsOpen ) {\n        videoSectionsContainer.style.height = 'auto';\n      } else {\n        videoSectionsContainer.removeAttribute('style');\n      }\n    });\n  }\n\n  if (mobileToggler) {\n    mobileToggler.addEventListener('click', () => {\n      toggleSections();\n    });\n  }\n\n  const showQuiz = () => {\n    getElements('.quiz.is-hidden')[0].classList.remove('is-hidden');\n  }\n});\n","import { getElements } from 'js-utils/src/selector';\nimport VimeoPlayer from '@vimeo/player';\nimport _ from 'underscore';\nimport init from '../base/init';\n\ninit(() => {\n  let video = document.getElementsByClassName(\"live-seminar-video-player\");\n  // if(!video.length) return;\n\n  video = video[0];\n  const player = document.querySelector('.live-seminar-video-player');\n  const frame = getElements('.live-seminar-video-player iframe')[0];\n  if(!frame) return;\n\n  const vimeoPlayer = new VimeoPlayer(frame);\n  const available_to_user = window.LEXNOVA.aet.props.available_to_user === \"true\";\n\n  vimeoPlayer.setColor('#d61368');\n\n  vimeoPlayer.on('ended', () => {\n    videoEvent({ event: 'ended' });\n    player.classList.remove('video-player--overlay-hidden');\n    player.classList.remove('video-player--playing');\n  });\n\n  vimeoPlayer.on('play', () => {\n    videoEvent({ event: 'play' });\n    player.classList.add('video-player--playing');\n\n    window.dispatchEvent(new CustomEvent('AET', {detail: {\n      name: `${window.LEXNOVA.section_name}.seminar_play`,\n      props: window.LEXNOVA.aet.props\n    }}));\n  });\n\n  vimeoPlayer.on('pause', (data) => {\n    videoEvent({ event: 'pause', seconds: data.seconds });\n    player.classList.remove('video-player--playing');\n  });\n\n  vimeoPlayer.on('timeupdate', (data) => {\n    videoEvent({ event: 'progress', seconds: data.seconds });\n  });\n\n  const fireVideoEvent = (dataObject) => {\n    // User#do_not_track must be set to false\n    if (available_to_user) {\n      fetch('/api/v1/seminar_playbacks/' + video.getAttribute('data-video-resource-id'), {\n        method: \"PATCH\",\n        credentials: 'same-origin',\n        headers: {\n          'Content-Type': 'application/json; charset=utf-8',\n        },\n        body: JSON.stringify(dataObject),\n      });\n    }\n  };\n\n  const videoEvent = _.throttle(\n    fireVideoEvent, 5.0 * 1000\n  );\n});\n","/*! shepherd.js 2.10.0 */\n\nfunction _typeof(obj) {\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function (obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function (obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _extends() {\n  _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\n  return _extends.apply(this, arguments);\n}\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    var ownKeys = Object.keys(source);\n\n    if (typeof Object.getOwnPropertySymbols === 'function') {\n      ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n      }));\n    }\n\n    ownKeys.forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    });\n  }\n\n  return target;\n}\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n    return call;\n  }\n\n  return _assertThisInitialized(self);\n}\n\nfunction _slicedToArray(arr, i) {\n  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n  var _e = undefined;\n\n  try {\n    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n\n  return _arr;\n}\n\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\n/**\n * lodash 4.0.0 (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\nvar lodash_isobjectlike = isObjectLike;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n * @param {*} value The param to check if it is a function\n */\nfunction isFunction(value) {\n  return typeof value === 'function';\n}\n/**\n * Checks if `value` is classified as a `Number` object.\n * @param {*} value The param to check if it is a number\n */\n\nfunction isNumber(value) {\n  return typeof value === 'number';\n}\n/**\n * Checks if `value` is classified as a `String` object.\n * @param {*} value The param to check if it is a string\n */\n\nfunction isString(value) {\n  return typeof value === 'string';\n}\n/**\n * Checks if `value` is undefined.\n * @param {*} value The param to check if it is undefined\n */\n\nfunction isUndefined(value) {\n  return value === undefined;\n}\n\n/**\n * lodash 4.1.3 (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    object[key] = value;\n  }\n}\n\n/**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\nfunction baseZipObject(props, values, assignFunc) {\n  var index = -1,\n      length = props.length,\n      valsLength = values.length,\n      result = {};\n\n  while (++index < length) {\n    var value = index < valsLength ? values[index] : undefined;\n    assignFunc(result, props[index], value);\n  }\n  return result;\n}\n\n/**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction zipObject(props, values) {\n  return baseZipObject(props || [], values || [], assignValue);\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'user': 'fred' };\n * var other = { 'user': 'fred' };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nvar lodash_zipobject = zipObject;\n\n/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.15.0\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nvar longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nvar timeoutDuration = 0;\nfor (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n  if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n    timeoutDuration = 1;\n    break;\n  }\n}\n\nfunction microtaskDebounce(fn) {\n  var called = false;\n  return function () {\n    if (called) {\n      return;\n    }\n    called = true;\n    window.Promise.resolve().then(function () {\n      called = false;\n      fn();\n    });\n  };\n}\n\nfunction taskDebounce(fn) {\n  var scheduled = false;\n  return function () {\n    if (!scheduled) {\n      scheduled = true;\n      setTimeout(function () {\n        scheduled = false;\n        fn();\n      }, timeoutDuration);\n    }\n  };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction$1(functionToCheck) {\n  var getType = {};\n  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n  if (element.nodeType !== 1) {\n    return [];\n  }\n  // NOTE: 1 DOM access here\n  var window = element.ownerDocument.defaultView;\n  var css = window.getComputedStyle(element, null);\n  return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n  if (element.nodeName === 'HTML') {\n    return element;\n  }\n  return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n  // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n  if (!element) {\n    return document.body;\n  }\n\n  switch (element.nodeName) {\n    case 'HTML':\n    case 'BODY':\n      return element.ownerDocument.body;\n    case '#document':\n      return element.body;\n  }\n\n  // Firefox want us to check `-x` and `-y` variations as well\n\n  var _getStyleComputedProp = getStyleComputedProperty(element),\n      overflow = _getStyleComputedProp.overflow,\n      overflowX = _getStyleComputedProp.overflowX,\n      overflowY = _getStyleComputedProp.overflowY;\n\n  if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n    return element;\n  }\n\n  return getScrollParent(getParentNode(element));\n}\n\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nfunction isIE(version) {\n  if (version === 11) {\n    return isIE11;\n  }\n  if (version === 10) {\n    return isIE10;\n  }\n  return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n  if (!element) {\n    return document.documentElement;\n  }\n\n  var noOffsetParent = isIE(10) ? document.body : null;\n\n  // NOTE: 1 DOM access here\n  var offsetParent = element.offsetParent || null;\n  // Skip hidden elements which don't have an offsetParent\n  while (offsetParent === noOffsetParent && element.nextElementSibling) {\n    offsetParent = (element = element.nextElementSibling).offsetParent;\n  }\n\n  var nodeName = offsetParent && offsetParent.nodeName;\n\n  if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n    return element ? element.ownerDocument.documentElement : document.documentElement;\n  }\n\n  // .offsetParent will return the closest TH, TD or TABLE in case\n  // no offsetParent is present, I hate this job...\n  if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n    return getOffsetParent(offsetParent);\n  }\n\n  return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n  var nodeName = element.nodeName;\n\n  if (nodeName === 'BODY') {\n    return false;\n  }\n  return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n  if (node.parentNode !== null) {\n    return getRoot(node.parentNode);\n  }\n\n  return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n  // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n  if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n    return document.documentElement;\n  }\n\n  // Here we make sure to give as \"start\" the element that comes first in the DOM\n  var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n  var start = order ? element1 : element2;\n  var end = order ? element2 : element1;\n\n  // Get common ancestor container\n  var range = document.createRange();\n  range.setStart(start, 0);\n  range.setEnd(end, 0);\n  var commonAncestorContainer = range.commonAncestorContainer;\n\n  // Both nodes are inside #document\n\n  if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n    if (isOffsetContainer(commonAncestorContainer)) {\n      return commonAncestorContainer;\n    }\n\n    return getOffsetParent(commonAncestorContainer);\n  }\n\n  // one of the nodes is inside shadowDOM, find which one\n  var element1root = getRoot(element1);\n  if (element1root.host) {\n    return findCommonOffsetParent(element1root.host, element2);\n  } else {\n    return findCommonOffsetParent(element1, getRoot(element2).host);\n  }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n  var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n  var nodeName = element.nodeName;\n\n  if (nodeName === 'BODY' || nodeName === 'HTML') {\n    var html = element.ownerDocument.documentElement;\n    var scrollingElement = element.ownerDocument.scrollingElement || html;\n    return scrollingElement[upperSide];\n  }\n\n  return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n  var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n  var scrollTop = getScroll(element, 'top');\n  var scrollLeft = getScroll(element, 'left');\n  var modifier = subtract ? -1 : 1;\n  rect.top += scrollTop * modifier;\n  rect.bottom += scrollTop * modifier;\n  rect.left += scrollLeft * modifier;\n  rect.right += scrollLeft * modifier;\n  return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n  var sideA = axis === 'x' ? 'Left' : 'Top';\n  var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n  return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n  return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\n\nfunction getWindowSizes(document) {\n  var body = document.body;\n  var html = document.documentElement;\n  var computedStyle = isIE(10) && getComputedStyle(html);\n\n  return {\n    height: getSize('Height', body, html, computedStyle),\n    width: getSize('Width', body, html, computedStyle)\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\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n};\n\nvar _extends$1 = 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\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n  return _extends$1({}, offsets, {\n    right: offsets.left + offsets.width,\n    bottom: offsets.top + offsets.height\n  });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n  var rect = {};\n\n  // IE10 10 FIX: Please, don't ask, the element isn't\n  // considered in DOM in some circumstances...\n  // This isn't reproducible in IE10 compatibility mode of IE11\n  try {\n    if (isIE(10)) {\n      rect = element.getBoundingClientRect();\n      var scrollTop = getScroll(element, 'top');\n      var scrollLeft = getScroll(element, 'left');\n      rect.top += scrollTop;\n      rect.left += scrollLeft;\n      rect.bottom += scrollTop;\n      rect.right += scrollLeft;\n    } else {\n      rect = element.getBoundingClientRect();\n    }\n  } catch (e) {}\n\n  var result = {\n    left: rect.left,\n    top: rect.top,\n    width: rect.right - rect.left,\n    height: rect.bottom - rect.top\n  };\n\n  // subtract scrollbar size from sizes\n  var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n  var width = sizes.width || element.clientWidth || result.right - result.left;\n  var height = sizes.height || element.clientHeight || result.bottom - result.top;\n\n  var horizScrollbar = element.offsetWidth - width;\n  var vertScrollbar = element.offsetHeight - height;\n\n  // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n  // we make this check conditional for performance reasons\n  if (horizScrollbar || vertScrollbar) {\n    var styles = getStyleComputedProperty(element);\n    horizScrollbar -= getBordersSize(styles, 'x');\n    vertScrollbar -= getBordersSize(styles, 'y');\n\n    result.width -= horizScrollbar;\n    result.height -= vertScrollbar;\n  }\n\n  return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n  var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n  var isIE10 = isIE(10);\n  var isHTML = parent.nodeName === 'HTML';\n  var childrenRect = getBoundingClientRect(children);\n  var parentRect = getBoundingClientRect(parent);\n  var scrollParent = getScrollParent(children);\n\n  var styles = getStyleComputedProperty(parent);\n  var borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n  var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);\n\n  // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n  if (fixedPosition && isHTML) {\n    parentRect.top = Math.max(parentRect.top, 0);\n    parentRect.left = Math.max(parentRect.left, 0);\n  }\n  var offsets = getClientRect({\n    top: childrenRect.top - parentRect.top - borderTopWidth,\n    left: childrenRect.left - parentRect.left - borderLeftWidth,\n    width: childrenRect.width,\n    height: childrenRect.height\n  });\n  offsets.marginTop = 0;\n  offsets.marginLeft = 0;\n\n  // Subtract margins of documentElement in case it's being used as parent\n  // we do this only on HTML because it's the only element that behaves\n  // differently when margins are applied to it. The margins are included in\n  // the box of the documentElement, in the other cases not.\n  if (!isIE10 && isHTML) {\n    var marginTop = parseFloat(styles.marginTop, 10);\n    var marginLeft = parseFloat(styles.marginLeft, 10);\n\n    offsets.top -= borderTopWidth - marginTop;\n    offsets.bottom -= borderTopWidth - marginTop;\n    offsets.left -= borderLeftWidth - marginLeft;\n    offsets.right -= borderLeftWidth - marginLeft;\n\n    // Attach marginTop and marginLeft because in some circumstances we may need them\n    offsets.marginTop = marginTop;\n    offsets.marginLeft = marginLeft;\n  }\n\n  if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n    offsets = includeScroll(offsets, parent);\n  }\n\n  return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n  var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n  var html = element.ownerDocument.documentElement;\n  var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n  var width = Math.max(html.clientWidth, window.innerWidth || 0);\n  var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n  var scrollTop = !excludeScroll ? getScroll(html) : 0;\n  var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n  var offset = {\n    top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n    left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n    width: width,\n    height: height\n  };\n\n  return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n  var nodeName = element.nodeName;\n  if (nodeName === 'BODY' || nodeName === 'HTML') {\n    return false;\n  }\n  if (getStyleComputedProperty(element, 'position') === 'fixed') {\n    return true;\n  }\n  var parentNode = getParentNode(element);\n  if (!parentNode) {\n    return false;\n  }\n  return isFixed(parentNode);\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nfunction getFixedPositionOffsetParent(element) {\n  // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n  if (!element || !element.parentElement || isIE()) {\n    return document.documentElement;\n  }\n  var el = element.parentElement;\n  while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n    el = el.parentElement;\n  }\n  return el || document.documentElement;\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n  var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n  // NOTE: 1 DOM access here\n\n  var boundaries = { top: 0, left: 0 };\n  var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n\n  // Handle viewport case\n  if (boundariesElement === 'viewport') {\n    boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n  } else {\n    // Handle other cases based on DOM element used as boundaries\n    var boundariesNode = void 0;\n    if (boundariesElement === 'scrollParent') {\n      boundariesNode = getScrollParent(getParentNode(reference));\n      if (boundariesNode.nodeName === 'BODY') {\n        boundariesNode = popper.ownerDocument.documentElement;\n      }\n    } else if (boundariesElement === 'window') {\n      boundariesNode = popper.ownerDocument.documentElement;\n    } else {\n      boundariesNode = boundariesElement;\n    }\n\n    var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n\n    // In case of HTML, we need a different computation\n    if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n      var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n          height = _getWindowSizes.height,\n          width = _getWindowSizes.width;\n\n      boundaries.top += offsets.top - offsets.marginTop;\n      boundaries.bottom = height + offsets.top;\n      boundaries.left += offsets.left - offsets.marginLeft;\n      boundaries.right = width + offsets.left;\n    } else {\n      // for all the other DOM elements, this one is good\n      boundaries = offsets;\n    }\n  }\n\n  // Add paddings\n  padding = padding || 0;\n  var isPaddingNumber = typeof padding === 'number';\n  boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n  boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n  boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n  boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n\n  return boundaries;\n}\n\nfunction getArea(_ref) {\n  var width = _ref.width,\n      height = _ref.height;\n\n  return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n  var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n  if (placement.indexOf('auto') === -1) {\n    return placement;\n  }\n\n  var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n  var rects = {\n    top: {\n      width: boundaries.width,\n      height: refRect.top - boundaries.top\n    },\n    right: {\n      width: boundaries.right - refRect.right,\n      height: boundaries.height\n    },\n    bottom: {\n      width: boundaries.width,\n      height: boundaries.bottom - refRect.bottom\n    },\n    left: {\n      width: refRect.left - boundaries.left,\n      height: boundaries.height\n    }\n  };\n\n  var sortedAreas = Object.keys(rects).map(function (key) {\n    return _extends$1({\n      key: key\n    }, rects[key], {\n      area: getArea(rects[key])\n    });\n  }).sort(function (a, b) {\n    return b.area - a.area;\n  });\n\n  var filteredAreas = sortedAreas.filter(function (_ref2) {\n    var width = _ref2.width,\n        height = _ref2.height;\n    return width >= popper.clientWidth && height >= popper.clientHeight;\n  });\n\n  var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n  var variation = placement.split('-')[1];\n\n  return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n  var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n  var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);\n  return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n  var window = element.ownerDocument.defaultView;\n  var styles = window.getComputedStyle(element);\n  var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n  var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n  var result = {\n    width: element.offsetWidth + y,\n    height: element.offsetHeight + x\n  };\n  return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n  var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n  placement = placement.split('-')[0];\n\n  // Get popper node sizes\n  var popperRect = getOuterSizes(popper);\n\n  // Add position, width and height to our offsets object\n  var popperOffsets = {\n    width: popperRect.width,\n    height: popperRect.height\n  };\n\n  // depending by the popper placement we have to compute its offsets slightly differently\n  var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n  var mainSide = isHoriz ? 'top' : 'left';\n  var secondarySide = isHoriz ? 'left' : 'top';\n  var measurement = isHoriz ? 'height' : 'width';\n  var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n  popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n  if (placement === secondarySide) {\n    popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n  } else {\n    popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n  }\n\n  return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n  // use native find if supported\n  if (Array.prototype.find) {\n    return arr.find(check);\n  }\n\n  // use `filter` to obtain the same behavior of `find`\n  return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n  // use native findIndex if supported\n  if (Array.prototype.findIndex) {\n    return arr.findIndex(function (cur) {\n      return cur[prop] === value;\n    });\n  }\n\n  // use `find` + `indexOf` if `findIndex` isn't supported\n  var match = find(arr, function (obj) {\n    return obj[prop] === value;\n  });\n  return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n  var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n  modifiersToRun.forEach(function (modifier) {\n    if (modifier['function']) {\n      // eslint-disable-line dot-notation\n      console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n    }\n    var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n    if (modifier.enabled && isFunction$1(fn)) {\n      // Add properties to offsets to make them a complete clientRect object\n      // we do this before each modifier to make sure the previous one doesn't\n      // mess with these values\n      data.offsets.popper = getClientRect(data.offsets.popper);\n      data.offsets.reference = getClientRect(data.offsets.reference);\n\n      data = fn(data, modifier);\n    }\n  });\n\n  return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.<br />\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n  // if popper is destroyed, don't perform any further update\n  if (this.state.isDestroyed) {\n    return;\n  }\n\n  var data = {\n    instance: this,\n    styles: {},\n    arrowStyles: {},\n    attributes: {},\n    flipped: false,\n    offsets: {}\n  };\n\n  // compute reference element offsets\n  data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n  // compute auto placement, store placement inside the data object,\n  // modifiers will be able to edit `placement` if needed\n  // and refer to originalPlacement to know the original value\n  data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n  // store the computed placement inside `originalPlacement`\n  data.originalPlacement = data.placement;\n\n  data.positionFixed = this.options.positionFixed;\n\n  // compute the popper offsets\n  data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n  data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n  // run the modifiers\n  data = runModifiers(this.modifiers, data);\n\n  // the first `update` will call `onCreate` callback\n  // the other ones will call `onUpdate` callback\n  if (!this.state.isCreated) {\n    this.state.isCreated = true;\n    this.options.onCreate(data);\n  } else {\n    this.options.onUpdate(data);\n  }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n  return modifiers.some(function (_ref) {\n    var name = _ref.name,\n        enabled = _ref.enabled;\n    return enabled && name === modifierName;\n  });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n  var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n  var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n  for (var i = 0; i < prefixes.length; i++) {\n    var prefix = prefixes[i];\n    var toCheck = prefix ? '' + prefix + upperProp : property;\n    if (typeof document.body.style[toCheck] !== 'undefined') {\n      return toCheck;\n    }\n  }\n  return null;\n}\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n  this.state.isDestroyed = true;\n\n  // touch DOM only if `applyStyle` modifier is enabled\n  if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n    this.popper.removeAttribute('x-placement');\n    this.popper.style.position = '';\n    this.popper.style.top = '';\n    this.popper.style.left = '';\n    this.popper.style.right = '';\n    this.popper.style.bottom = '';\n    this.popper.style.willChange = '';\n    this.popper.style[getSupportedPropertyName('transform')] = '';\n  }\n\n  this.disableEventListeners();\n\n  // remove the popper if user explicity asked for the deletion on destroy\n  // do not use `remove` because IE11 doesn't support it\n  if (this.options.removeOnDestroy) {\n    this.popper.parentNode.removeChild(this.popper);\n  }\n  return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n  var ownerDocument = element.ownerDocument;\n  return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n  var isBody = scrollParent.nodeName === 'BODY';\n  var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n  target.addEventListener(event, callback, { passive: true });\n\n  if (!isBody) {\n    attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n  }\n  scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n  // Resize event listener on window\n  state.updateBound = updateBound;\n  getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n  // Scroll event listener on scroll parents\n  var scrollElement = getScrollParent(reference);\n  attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n  state.scrollElement = scrollElement;\n  state.eventsEnabled = true;\n\n  return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n  if (!this.state.eventsEnabled) {\n    this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n  }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n  // Remove resize event listener on window\n  getWindow(reference).removeEventListener('resize', state.updateBound);\n\n  // Remove scroll event listener on scroll parents\n  state.scrollParents.forEach(function (target) {\n    target.removeEventListener('scroll', state.updateBound);\n  });\n\n  // Reset state\n  state.updateBound = null;\n  state.scrollParents = [];\n  state.scrollElement = null;\n  state.eventsEnabled = false;\n  return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n  if (this.state.eventsEnabled) {\n    cancelAnimationFrame(this.scheduleUpdate);\n    this.state = removeEventListeners(this.reference, this.state);\n  }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n  return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n  Object.keys(styles).forEach(function (prop) {\n    var unit = '';\n    // add unit if the value is numeric and is one of the following\n    if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n      unit = 'px';\n    }\n    element.style[prop] = styles[prop] + unit;\n  });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n  Object.keys(attributes).forEach(function (prop) {\n    var value = attributes[prop];\n    if (value !== false) {\n      element.setAttribute(prop, attributes[prop]);\n    } else {\n      element.removeAttribute(prop);\n    }\n  });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n  // any property present in `data.styles` will be applied to the popper,\n  // in this way we can make the 3rd party modifiers add custom styles to it\n  // Be aware, modifiers could override the properties defined in the previous\n  // lines of this modifier!\n  setStyles(data.instance.popper, data.styles);\n\n  // any property present in `data.attributes` will be applied to the popper,\n  // they will be set as HTML attributes of the element\n  setAttributes(data.instance.popper, data.attributes);\n\n  // if arrowElement is defined and arrowStyles has some properties\n  if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n    setStyles(data.arrowElement, data.arrowStyles);\n  }\n\n  return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n  // compute reference element offsets\n  var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n  // compute auto placement, store placement inside the data object,\n  // modifiers will be able to edit `placement` if needed\n  // and refer to originalPlacement to know the original value\n  var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n  popper.setAttribute('x-placement', placement);\n\n  // Apply `position` to popper before anything else because\n  // without the position applied we can't guarantee correct computations\n  setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n  return options;\n}\n\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nfunction getRoundedOffsets(data, shouldRound) {\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n  var round = Math.round,\n      floor = Math.floor;\n\n  var noRound = function noRound(v) {\n    return v;\n  };\n\n  var referenceWidth = round(reference.width);\n  var popperWidth = round(popper.width);\n\n  var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n  var isVariation = data.placement.indexOf('-') !== -1;\n  var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n  var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n  var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n  var verticalToInteger = !shouldRound ? noRound : round;\n\n  return {\n    left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n    top: verticalToInteger(popper.top),\n    bottom: verticalToInteger(popper.bottom),\n    right: horizontalToInteger(popper.right)\n  };\n}\n\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n  var x = options.x,\n      y = options.y;\n  var popper = data.offsets.popper;\n\n  // Remove this legacy support in Popper.js v2\n\n  var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n    return modifier.name === 'applyStyle';\n  }).gpuAcceleration;\n  if (legacyGpuAccelerationOption !== undefined) {\n    console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n  }\n  var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n  var offsetParent = getOffsetParent(data.instance.popper);\n  var offsetParentRect = getBoundingClientRect(offsetParent);\n\n  // Styles\n  var styles = {\n    position: popper.position\n  };\n\n  var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n\n  var sideA = x === 'bottom' ? 'top' : 'bottom';\n  var sideB = y === 'right' ? 'left' : 'right';\n\n  // if gpuAcceleration is set to `true` and transform is supported,\n  //  we use `translate3d` to apply the position to the popper we\n  // automatically use the supported prefixed version if needed\n  var prefixedProperty = getSupportedPropertyName('transform');\n\n  // now, let's make a step back and look at this code closely (wtf?)\n  // If the content of the popper grows once it's been positioned, it\n  // may happen that the popper gets misplaced because of the new content\n  // overflowing its reference element\n  // To avoid this problem, we provide two options (x and y), which allow\n  // the consumer to define the offset origin.\n  // If we position a popper on top of a reference element, we can set\n  // `x` to `top` to make the popper grow towards its top instead of\n  // its bottom.\n  var left = void 0,\n      top = void 0;\n  if (sideA === 'bottom') {\n    // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)\n    // and not the bottom of the html element\n    if (offsetParent.nodeName === 'HTML') {\n      top = -offsetParent.clientHeight + offsets.bottom;\n    } else {\n      top = -offsetParentRect.height + offsets.bottom;\n    }\n  } else {\n    top = offsets.top;\n  }\n  if (sideB === 'right') {\n    if (offsetParent.nodeName === 'HTML') {\n      left = -offsetParent.clientWidth + offsets.right;\n    } else {\n      left = -offsetParentRect.width + offsets.right;\n    }\n  } else {\n    left = offsets.left;\n  }\n  if (gpuAcceleration && prefixedProperty) {\n    styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n    styles[sideA] = 0;\n    styles[sideB] = 0;\n    styles.willChange = 'transform';\n  } else {\n    // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n    var invertTop = sideA === 'bottom' ? -1 : 1;\n    var invertLeft = sideB === 'right' ? -1 : 1;\n    styles[sideA] = top * invertTop;\n    styles[sideB] = left * invertLeft;\n    styles.willChange = sideA + ', ' + sideB;\n  }\n\n  // Attributes\n  var attributes = {\n    'x-placement': data.placement\n  };\n\n  // Update `data` attributes, styles and arrowStyles\n  data.attributes = _extends$1({}, attributes, data.attributes);\n  data.styles = _extends$1({}, styles, data.styles);\n  data.arrowStyles = _extends$1({}, data.offsets.arrow, data.arrowStyles);\n\n  return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.<br />\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n  var requesting = find(modifiers, function (_ref) {\n    var name = _ref.name;\n    return name === requestingName;\n  });\n\n  var isRequired = !!requesting && modifiers.some(function (modifier) {\n    return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n  });\n\n  if (!isRequired) {\n    var _requesting = '`' + requestingName + '`';\n    var requested = '`' + requestedName + '`';\n    console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n  }\n  return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n  var _data$offsets$arrow;\n\n  // arrow depends on keepTogether in order to work\n  if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n    return data;\n  }\n\n  var arrowElement = options.element;\n\n  // if arrowElement is a string, suppose it's a CSS selector\n  if (typeof arrowElement === 'string') {\n    arrowElement = data.instance.popper.querySelector(arrowElement);\n\n    // if arrowElement is not found, don't run the modifier\n    if (!arrowElement) {\n      return data;\n    }\n  } else {\n    // if the arrowElement isn't a query selector we must check that the\n    // provided DOM node is child of its popper node\n    if (!data.instance.popper.contains(arrowElement)) {\n      console.warn('WARNING: `arrow.element` must be child of its popper element!');\n      return data;\n    }\n  }\n\n  var placement = data.placement.split('-')[0];\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n  var len = isVertical ? 'height' : 'width';\n  var sideCapitalized = isVertical ? 'Top' : 'Left';\n  var side = sideCapitalized.toLowerCase();\n  var altSide = isVertical ? 'left' : 'top';\n  var opSide = isVertical ? 'bottom' : 'right';\n  var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n  //\n  // extends keepTogether behavior making sure the popper and its\n  // reference have enough pixels in conjunction\n  //\n\n  // top/left side\n  if (reference[opSide] - arrowElementSize < popper[side]) {\n    data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n  }\n  // bottom/right side\n  if (reference[side] + arrowElementSize > popper[opSide]) {\n    data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n  }\n  data.offsets.popper = getClientRect(data.offsets.popper);\n\n  // compute center of the popper\n  var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n  // Compute the sideValue using the updated popper offsets\n  // take popper margin in account because we don't have this info available\n  var css = getStyleComputedProperty(data.instance.popper);\n  var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);\n  var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);\n  var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n  // prevent arrowElement from being placed not contiguously to its popper\n  sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n  data.arrowElement = arrowElement;\n  data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n  return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n  if (variation === 'end') {\n    return 'start';\n  } else if (variation === 'start') {\n    return 'end';\n  }\n  return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.<br />\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.<br />\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n  var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n  var index = validPlacements.indexOf(placement);\n  var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n  return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n  FLIP: 'flip',\n  CLOCKWISE: 'clockwise',\n  COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n  // if `inner` modifier is enabled, we can't use the `flip` modifier\n  if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n    return data;\n  }\n\n  if (data.flipped && data.placement === data.originalPlacement) {\n    // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n    return data;\n  }\n\n  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n\n  var placement = data.placement.split('-')[0];\n  var placementOpposite = getOppositePlacement(placement);\n  var variation = data.placement.split('-')[1] || '';\n\n  var flipOrder = [];\n\n  switch (options.behavior) {\n    case BEHAVIORS.FLIP:\n      flipOrder = [placement, placementOpposite];\n      break;\n    case BEHAVIORS.CLOCKWISE:\n      flipOrder = clockwise(placement);\n      break;\n    case BEHAVIORS.COUNTERCLOCKWISE:\n      flipOrder = clockwise(placement, true);\n      break;\n    default:\n      flipOrder = options.behavior;\n  }\n\n  flipOrder.forEach(function (step, index) {\n    if (placement !== step || flipOrder.length === index + 1) {\n      return data;\n    }\n\n    placement = data.placement.split('-')[0];\n    placementOpposite = getOppositePlacement(placement);\n\n    var popperOffsets = data.offsets.popper;\n    var refOffsets = data.offsets.reference;\n\n    // using floor because the reference offsets may contain decimals we are not going to consider here\n    var floor = Math.floor;\n    var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n    var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n    var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n    var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n    var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n    var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n    // flip the variation if required\n    var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n    // flips variation if reference element overflows boundaries\n    var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n    // flips variation if popper content overflows boundaries\n    var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);\n\n    var flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n    if (overlapsRef || overflowsBoundaries || flippedVariation) {\n      // this boolean to detect any flip loop\n      data.flipped = true;\n\n      if (overlapsRef || overflowsBoundaries) {\n        placement = flipOrder[index + 1];\n      }\n\n      if (flippedVariation) {\n        variation = getOppositeVariation(variation);\n      }\n\n      data.placement = placement + (variation ? '-' + variation : '');\n\n      // this object contains `position`, we want to preserve it along with\n      // any additional property we may add in the future\n      data.offsets.popper = _extends$1({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n      data = runModifiers(data.instance.modifiers, data, 'flip');\n    }\n  });\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var placement = data.placement.split('-')[0];\n  var floor = Math.floor;\n  var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n  var side = isVertical ? 'right' : 'bottom';\n  var opSide = isVertical ? 'left' : 'top';\n  var measurement = isVertical ? 'width' : 'height';\n\n  if (popper[side] < floor(reference[opSide])) {\n    data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n  }\n  if (popper[opSide] > floor(reference[side])) {\n    data.offsets.popper[opSide] = floor(reference[side]);\n  }\n\n  return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n  // separate value from unit\n  var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n  var value = +split[1];\n  var unit = split[2];\n\n  // If it's not a number it's an operator, I guess\n  if (!value) {\n    return str;\n  }\n\n  if (unit.indexOf('%') === 0) {\n    var element = void 0;\n    switch (unit) {\n      case '%p':\n        element = popperOffsets;\n        break;\n      case '%':\n      case '%r':\n      default:\n        element = referenceOffsets;\n    }\n\n    var rect = getClientRect(element);\n    return rect[measurement] / 100 * value;\n  } else if (unit === 'vh' || unit === 'vw') {\n    // if is a vh or vw, we calculate the size based on the viewport\n    var size = void 0;\n    if (unit === 'vh') {\n      size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n    } else {\n      size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n    }\n    return size / 100 * value;\n  } else {\n    // if is an explicit pixel unit, we get rid of the unit and keep the value\n    // if is an implicit unit, it's px, and we return just the value\n    return value;\n  }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n  var offsets = [0, 0];\n\n  // Use height if placement is left or right and index is 0 otherwise use width\n  // in this way the first offset will use an axis and the second one\n  // will use the other one\n  var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n  // Split the offset string to obtain a list of values and operands\n  // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n  var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n    return frag.trim();\n  });\n\n  // Detect if the offset string contains a pair of values or a single one\n  // they could be separated by comma or space\n  var divider = fragments.indexOf(find(fragments, function (frag) {\n    return frag.search(/,|\\s/) !== -1;\n  }));\n\n  if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n    console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n  }\n\n  // If divider is found, we divide the list of values and operands to divide\n  // them by ofset X and Y.\n  var splitRegex = /\\s*,\\s*|\\s+/;\n  var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n  // Convert the values with units to absolute pixels to allow our computations\n  ops = ops.map(function (op, index) {\n    // Most of the units rely on the orientation of the popper\n    var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n    var mergeWithPrevious = false;\n    return op\n    // This aggregates any `+` or `-` sign that aren't considered operators\n    // e.g.: 10 + +5 => [10, +, +5]\n    .reduce(function (a, b) {\n      if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n        a[a.length - 1] = b;\n        mergeWithPrevious = true;\n        return a;\n      } else if (mergeWithPrevious) {\n        a[a.length - 1] += b;\n        mergeWithPrevious = false;\n        return a;\n      } else {\n        return a.concat(b);\n      }\n    }, [])\n    // Here we convert the string values into number values (in px)\n    .map(function (str) {\n      return toValue(str, measurement, popperOffsets, referenceOffsets);\n    });\n  });\n\n  // Loop trough the offsets arrays and execute the operations\n  ops.forEach(function (op, index) {\n    op.forEach(function (frag, index2) {\n      if (isNumeric(frag)) {\n        offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n      }\n    });\n  });\n  return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n  var offset = _ref.offset;\n  var placement = data.placement,\n      _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var basePlacement = placement.split('-')[0];\n\n  var offsets = void 0;\n  if (isNumeric(+offset)) {\n    offsets = [+offset, 0];\n  } else {\n    offsets = parseOffset(offset, popper, reference, basePlacement);\n  }\n\n  if (basePlacement === 'left') {\n    popper.top += offsets[0];\n    popper.left -= offsets[1];\n  } else if (basePlacement === 'right') {\n    popper.top += offsets[0];\n    popper.left += offsets[1];\n  } else if (basePlacement === 'top') {\n    popper.left += offsets[0];\n    popper.top -= offsets[1];\n  } else if (basePlacement === 'bottom') {\n    popper.left += offsets[0];\n    popper.top += offsets[1];\n  }\n\n  data.popper = popper;\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n  var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n  // If offsetParent is the reference element, we really want to\n  // go one step up and use the next offsetParent as reference to\n  // avoid to make this modifier completely useless and look like broken\n  if (data.instance.reference === boundariesElement) {\n    boundariesElement = getOffsetParent(boundariesElement);\n  }\n\n  // NOTE: DOM access here\n  // resets the popper's position so that the document size can be calculated excluding\n  // the size of the popper element itself\n  var transformProp = getSupportedPropertyName('transform');\n  var popperStyles = data.instance.popper.style; // assignment to help minification\n  var top = popperStyles.top,\n      left = popperStyles.left,\n      transform = popperStyles[transformProp];\n\n  popperStyles.top = '';\n  popperStyles.left = '';\n  popperStyles[transformProp] = '';\n\n  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);\n\n  // NOTE: DOM access here\n  // restores the original style properties after the offsets have been computed\n  popperStyles.top = top;\n  popperStyles.left = left;\n  popperStyles[transformProp] = transform;\n\n  options.boundaries = boundaries;\n\n  var order = options.priority;\n  var popper = data.offsets.popper;\n\n  var check = {\n    primary: function primary(placement) {\n      var value = popper[placement];\n      if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n        value = Math.max(popper[placement], boundaries[placement]);\n      }\n      return defineProperty({}, placement, value);\n    },\n    secondary: function secondary(placement) {\n      var mainSide = placement === 'right' ? 'left' : 'top';\n      var value = popper[mainSide];\n      if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n        value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n      }\n      return defineProperty({}, mainSide, value);\n    }\n  };\n\n  order.forEach(function (placement) {\n    var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n    popper = _extends$1({}, popper, check[side](placement));\n  });\n\n  data.offsets.popper = popper;\n\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n  var placement = data.placement;\n  var basePlacement = placement.split('-')[0];\n  var shiftvariation = placement.split('-')[1];\n\n  // if shift shiftvariation is specified, run the modifier\n  if (shiftvariation) {\n    var _data$offsets = data.offsets,\n        reference = _data$offsets.reference,\n        popper = _data$offsets.popper;\n\n    var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n    var side = isVertical ? 'left' : 'top';\n    var measurement = isVertical ? 'width' : 'height';\n\n    var shiftOffsets = {\n      start: defineProperty({}, side, reference[side]),\n      end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n    };\n\n    data.offsets.popper = _extends$1({}, popper, shiftOffsets[shiftvariation]);\n  }\n\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n  if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n    return data;\n  }\n\n  var refRect = data.offsets.reference;\n  var bound = find(data.instance.modifiers, function (modifier) {\n    return modifier.name === 'preventOverflow';\n  }).boundaries;\n\n  if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n    // Avoid unnecessary DOM access if visibility hasn't changed\n    if (data.hide === true) {\n      return data;\n    }\n\n    data.hide = true;\n    data.attributes['x-out-of-boundaries'] = '';\n  } else {\n    // Avoid unnecessary DOM access if visibility hasn't changed\n    if (data.hide === false) {\n      return data;\n    }\n\n    data.hide = false;\n    data.attributes['x-out-of-boundaries'] = false;\n  }\n\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n  var placement = data.placement;\n  var basePlacement = placement.split('-')[0];\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n  var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n  popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n  data.placement = getOppositePlacement(placement);\n  data.offsets.popper = getClientRect(popper);\n\n  return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.<br />\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.<br />\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n  /**\n   * Modifier used to shift the popper on the start or end of its reference\n   * element.<br />\n   * It will read the variation of the `placement` property.<br />\n   * It can be one either `-end` or `-start`.\n   * @memberof modifiers\n   * @inner\n   */\n  shift: {\n    /** @prop {number} order=100 - Index used to define the order of execution */\n    order: 100,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: shift\n  },\n\n  /**\n   * The `offset` modifier can shift your popper on both its axis.\n   *\n   * It accepts the following units:\n   * - `px` or unit-less, interpreted as pixels\n   * - `%` or `%r`, percentage relative to the length of the reference element\n   * - `%p`, percentage relative to the length of the popper element\n   * - `vw`, CSS viewport width unit\n   * - `vh`, CSS viewport height unit\n   *\n   * For length is intended the main axis relative to the placement of the popper.<br />\n   * This means that if the placement is `top` or `bottom`, the length will be the\n   * `width`. In case of `left` or `right`, it will be the `height`.\n   *\n   * You can provide a single value (as `Number` or `String`), or a pair of values\n   * as `String` divided by a comma or one (or more) white spaces.<br />\n   * The latter is a deprecated method because it leads to confusion and will be\n   * removed in v2.<br />\n   * Additionally, it accepts additions and subtractions between different units.\n   * Note that multiplications and divisions aren't supported.\n   *\n   * Valid examples are:\n   * ```\n   * 10\n   * '10%'\n   * '10, 10'\n   * '10%, 10'\n   * '10 + 10%'\n   * '10 - 5vh + 3%'\n   * '-10px + 5vh, 5px - 6%'\n   * ```\n   * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n   * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n   * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  offset: {\n    /** @prop {number} order=200 - Index used to define the order of execution */\n    order: 200,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: offset,\n    /** @prop {Number|String} offset=0\n     * The offset value as described in the modifier description\n     */\n    offset: 0\n  },\n\n  /**\n   * Modifier used to prevent the popper from being positioned outside the boundary.\n   *\n   * A scenario exists where the reference itself is not within the boundaries.<br />\n   * We can say it has \"escaped the boundaries\" — or just \"escaped\".<br />\n   * In this case we need to decide whether the popper should either:\n   *\n   * - detach from the reference and remain \"trapped\" in the boundaries, or\n   * - if it should ignore the boundary and \"escape with its reference\"\n   *\n   * When `escapeWithReference` is set to`true` and reference is completely\n   * outside its boundaries, the popper will overflow (or completely leave)\n   * the boundaries in order to remain attached to the edge of the reference.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  preventOverflow: {\n    /** @prop {number} order=300 - Index used to define the order of execution */\n    order: 300,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: preventOverflow,\n    /**\n     * @prop {Array} [priority=['left','right','top','bottom']]\n     * Popper will try to prevent overflow following these priorities by default,\n     * then, it could overflow on the left and on top of the `boundariesElement`\n     */\n    priority: ['left', 'right', 'top', 'bottom'],\n    /**\n     * @prop {number} padding=5\n     * Amount of pixel used to define a minimum distance between the boundaries\n     * and the popper. This makes sure the popper always has a little padding\n     * between the edges of its container\n     */\n    padding: 5,\n    /**\n     * @prop {String|HTMLElement} boundariesElement='scrollParent'\n     * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n     * `viewport` or any DOM element.\n     */\n    boundariesElement: 'scrollParent'\n  },\n\n  /**\n   * Modifier used to make sure the reference and its popper stay near each other\n   * without leaving any gap between the two. Especially useful when the arrow is\n   * enabled and you want to ensure that it points to its reference element.\n   * It cares only about the first axis. You can still have poppers with margin\n   * between the popper and its reference element.\n   * @memberof modifiers\n   * @inner\n   */\n  keepTogether: {\n    /** @prop {number} order=400 - Index used to define the order of execution */\n    order: 400,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: keepTogether\n  },\n\n  /**\n   * This modifier is used to move the `arrowElement` of the popper to make\n   * sure it is positioned between the reference element and its popper element.\n   * It will read the outer size of the `arrowElement` node to detect how many\n   * pixels of conjunction are needed.\n   *\n   * It has no effect if no `arrowElement` is provided.\n   * @memberof modifiers\n   * @inner\n   */\n  arrow: {\n    /** @prop {number} order=500 - Index used to define the order of execution */\n    order: 500,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: arrow,\n    /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n    element: '[x-arrow]'\n  },\n\n  /**\n   * Modifier used to flip the popper's placement when it starts to overlap its\n   * reference element.\n   *\n   * Requires the `preventOverflow` modifier before it in order to work.\n   *\n   * **NOTE:** this modifier will interrupt the current update cycle and will\n   * restart it if it detects the need to flip the placement.\n   * @memberof modifiers\n   * @inner\n   */\n  flip: {\n    /** @prop {number} order=600 - Index used to define the order of execution */\n    order: 600,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: flip,\n    /**\n     * @prop {String|Array} behavior='flip'\n     * The behavior used to change the popper's placement. It can be one of\n     * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n     * placements (with optional variations)\n     */\n    behavior: 'flip',\n    /**\n     * @prop {number} padding=5\n     * The popper will flip if it hits the edges of the `boundariesElement`\n     */\n    padding: 5,\n    /**\n     * @prop {String|HTMLElement} boundariesElement='viewport'\n     * The element which will define the boundaries of the popper position.\n     * The popper will never be placed outside of the defined boundaries\n     * (except if `keepTogether` is enabled)\n     */\n    boundariesElement: 'viewport',\n    /**\n     * @prop {Boolean} flipVariations=false\n     * The popper will switch placement variation between `-start` and `-end` when\n     * the reference element overlaps its boundaries.\n     *\n     * The original placement should have a set variation.\n     */\n    flipVariations: false,\n    /**\n     * @prop {Boolean} flipVariationsByContent=false\n     * The popper will switch placement variation between `-start` and `-end` when\n     * the popper element overlaps its reference boundaries.\n     *\n     * The original placement should have a set variation.\n     */\n    flipVariationsByContent: false\n  },\n\n  /**\n   * Modifier used to make the popper flow toward the inner of the reference element.\n   * By default, when this modifier is disabled, the popper will be placed outside\n   * the reference element.\n   * @memberof modifiers\n   * @inner\n   */\n  inner: {\n    /** @prop {number} order=700 - Index used to define the order of execution */\n    order: 700,\n    /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n    enabled: false,\n    /** @prop {ModifierFn} */\n    fn: inner\n  },\n\n  /**\n   * Modifier used to hide the popper when its reference element is outside of the\n   * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n   * be used to hide with a CSS selector the popper when its reference is\n   * out of boundaries.\n   *\n   * Requires the `preventOverflow` modifier before it in order to work.\n   * @memberof modifiers\n   * @inner\n   */\n  hide: {\n    /** @prop {number} order=800 - Index used to define the order of execution */\n    order: 800,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: hide\n  },\n\n  /**\n   * Computes the style that will be applied to the popper element to gets\n   * properly positioned.\n   *\n   * Note that this modifier will not touch the DOM, it just prepares the styles\n   * so that `applyStyle` modifier can apply it. This separation is useful\n   * in case you need to replace `applyStyle` with a custom implementation.\n   *\n   * This modifier has `850` as `order` value to maintain backward compatibility\n   * with previous versions of Popper.js. Expect the modifiers ordering method\n   * to change in future major versions of the library.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  computeStyle: {\n    /** @prop {number} order=850 - Index used to define the order of execution */\n    order: 850,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: computeStyle,\n    /**\n     * @prop {Boolean} gpuAcceleration=true\n     * If true, it uses the CSS 3D transformation to position the popper.\n     * Otherwise, it will use the `top` and `left` properties\n     */\n    gpuAcceleration: true,\n    /**\n     * @prop {string} [x='bottom']\n     * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n     * Change this if your popper should grow in a direction different from `bottom`\n     */\n    x: 'bottom',\n    /**\n     * @prop {string} [x='left']\n     * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n     * Change this if your popper should grow in a direction different from `right`\n     */\n    y: 'right'\n  },\n\n  /**\n   * Applies the computed styles to the popper element.\n   *\n   * All the DOM manipulations are limited to this modifier. This is useful in case\n   * you want to integrate Popper.js inside a framework or view library and you\n   * want to delegate all the DOM manipulations to it.\n   *\n   * Note that if you disable this modifier, you must make sure the popper element\n   * has its position set to `absolute` before Popper.js can do its work!\n   *\n   * Just disable this modifier and define your own to achieve the desired effect.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  applyStyle: {\n    /** @prop {number} order=900 - Index used to define the order of execution */\n    order: 900,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: applyStyle,\n    /** @prop {Function} */\n    onLoad: applyStyleOnLoad,\n    /**\n     * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n     * @prop {Boolean} gpuAcceleration=true\n     * If true, it uses the CSS 3D transformation to position the popper.\n     * Otherwise, it will use the `top` and `left` properties\n     */\n    gpuAcceleration: undefined\n  }\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.<br />\n * These can be overridden using the `options` argument of Popper.js.<br />\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n *   modifiers: {\n *     preventOverflow: { enabled: false }\n *   }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n  /**\n   * Popper's placement.\n   * @prop {Popper.placements} placement='bottom'\n   */\n  placement: 'bottom',\n\n  /**\n   * Set this to true if you want popper to position it self in 'fixed' mode\n   * @prop {Boolean} positionFixed=false\n   */\n  positionFixed: false,\n\n  /**\n   * Whether events (resize, scroll) are initially enabled.\n   * @prop {Boolean} eventsEnabled=true\n   */\n  eventsEnabled: true,\n\n  /**\n   * Set to true if you want to automatically remove the popper when\n   * you call the `destroy` method.\n   * @prop {Boolean} removeOnDestroy=false\n   */\n  removeOnDestroy: false,\n\n  /**\n   * Callback called when the popper is created.<br />\n   * By default, it is set to no-op.<br />\n   * Access Popper.js instance with `data.instance`.\n   * @prop {onCreate}\n   */\n  onCreate: function onCreate() {},\n\n  /**\n   * Callback called when the popper is updated. This callback is not called\n   * on the initialization/creation of the popper, but only on subsequent\n   * updates.<br />\n   * By default, it is set to no-op.<br />\n   * Access Popper.js instance with `data.instance`.\n   * @prop {onUpdate}\n   */\n  onUpdate: function onUpdate() {},\n\n  /**\n   * List of modifiers used to modify the offsets before they are applied to the popper.\n   * They provide most of the functionalities of Popper.js.\n   * @prop {modifiers}\n   */\n  modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n  /**\n   * Creates a new Popper.js instance.\n   * @class Popper\n   * @param {Element|referenceObject} reference - The reference element used to position the popper\n   * @param {Element} popper - The HTML / XML element used as the popper\n   * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n   * @return {Object} instance - The generated Popper.js instance\n   */\n  function Popper(reference, popper) {\n    var _this = this;\n\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    classCallCheck(this, Popper);\n\n    this.scheduleUpdate = function () {\n      return requestAnimationFrame(_this.update);\n    };\n\n    // make update() debounced, so that it only runs at most once-per-tick\n    this.update = debounce(this.update.bind(this));\n\n    // with {} we create a new object with the options inside it\n    this.options = _extends$1({}, Popper.Defaults, options);\n\n    // init state\n    this.state = {\n      isDestroyed: false,\n      isCreated: false,\n      scrollParents: []\n    };\n\n    // get reference and popper elements (allow jQuery wrappers)\n    this.reference = reference && reference.jquery ? reference[0] : reference;\n    this.popper = popper && popper.jquery ? popper[0] : popper;\n\n    // Deep merge modifiers options\n    this.options.modifiers = {};\n    Object.keys(_extends$1({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n      _this.options.modifiers[name] = _extends$1({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n    });\n\n    // Refactoring modifiers' list (Object => Array)\n    this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n      return _extends$1({\n        name: name\n      }, _this.options.modifiers[name]);\n    })\n    // sort the modifiers by order\n    .sort(function (a, b) {\n      return a.order - b.order;\n    });\n\n    // modifiers have the ability to execute arbitrary code when Popper.js get inited\n    // such code is executed in the same order of its modifier\n    // they could add new properties to their options configuration\n    // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n    this.modifiers.forEach(function (modifierOptions) {\n      if (modifierOptions.enabled && isFunction$1(modifierOptions.onLoad)) {\n        modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n      }\n    });\n\n    // fire the first update to position the popper in the right place\n    this.update();\n\n    var eventsEnabled = this.options.eventsEnabled;\n    if (eventsEnabled) {\n      // setup event listeners, they will take care of update the position in specific situations\n      this.enableEventListeners();\n    }\n\n    this.state.eventsEnabled = eventsEnabled;\n  }\n\n  // We can't use class properties because they don't get listed in the\n  // class prototype and break stuff like Sinon stubs\n\n\n  createClass(Popper, [{\n    key: 'update',\n    value: function update$$1() {\n      return update.call(this);\n    }\n  }, {\n    key: 'destroy',\n    value: function destroy$$1() {\n      return destroy.call(this);\n    }\n  }, {\n    key: 'enableEventListeners',\n    value: function enableEventListeners$$1() {\n      return enableEventListeners.call(this);\n    }\n  }, {\n    key: 'disableEventListeners',\n    value: function disableEventListeners$$1() {\n      return disableEventListeners.call(this);\n    }\n\n    /**\n     * Schedules an update. It will run on the next UI update available.\n     * @method scheduleUpdate\n     * @memberof Popper\n     */\n\n\n    /**\n     * Collection of utilities useful when writing custom modifiers.\n     * Starting from version 1.7, this method is available only if you\n     * include `popper-utils.js` before `popper.js`.\n     *\n     * **DEPRECATION**: This way to access PopperUtils is deprecated\n     * and will be removed in v2! Use the PopperUtils module directly instead.\n     * Due to the high instability of the methods contained in Utils, we can't\n     * guarantee them to follow semver. Use them at your own risk!\n     * @static\n     * @private\n     * @type {Object}\n     * @deprecated since version 1.8\n     * @member Utils\n     * @memberof Popper\n     */\n\n  }]);\n  return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.<br />\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\n/**!\n* tippy.js v4.3.4\n* (c) 2017-2019 atomiks\n* MIT License\n*/\n\nvar css = \".tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{transition-timing-function:cubic-bezier(.165,.84,.44,1);max-width:calc(100% - 8px);pointer-events:none;outline:0}.tippy-popper[x-placement^=top] .tippy-backdrop{border-radius:40% 40% 0 0}.tippy-popper[x-placement^=top] .tippy-roundarrow{bottom:-7px;bottom:-6.5px;-webkit-transform-origin:50% 0;transform-origin:50% 0;margin:0 3px}.tippy-popper[x-placement^=top] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.tippy-popper[x-placement^=top] .tippy-arrow{border-top:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;bottom:-7px;margin:0 3px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-backdrop{-webkit-transform-origin:0 25%;transform-origin:0 25%}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-55%);transform:scale(1) translate(-50%,-55%)}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%,-45%);transform:scale(.2) translate(-50%,-45%);opacity:0}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.tippy-popper[x-placement^=top] [data-animation=perspective]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(-10px) rotateX(0);transform:perspective(700px) translateY(-10px) rotateX(0)}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(60deg);transform:perspective(700px) translateY(0) rotateX(60deg)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=top] [data-animation=scale]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(-10px) scale(1);transform:translateY(-10px) scale(1)}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px) scale(.5);transform:translateY(-10px) scale(.5)}.tippy-popper[x-placement^=bottom] .tippy-backdrop{border-radius:0 0 30% 30%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow{top:-7px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%;margin:0 3px}.tippy-popper[x-placement^=bottom] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(0);transform:rotate(0)}.tippy-popper[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;top:-7px;margin:0 3px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-backdrop{-webkit-transform-origin:0 -50%;transform-origin:0 -50%}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-45%);transform:scale(1) translate(-50%,-45%)}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%);transform:scale(.2) translate(-50%);opacity:0}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}.tippy-popper[x-placement^=bottom] [data-animation=perspective]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(10px) rotateX(0);transform:perspective(700px) translateY(10px) rotateX(0)}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(-60deg);transform:perspective(700px) translateY(0) rotateX(-60deg)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=bottom] [data-animation=scale]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(10px) scale(1);transform:translateY(10px) scale(1)}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px) scale(.5);transform:translateY(10px) scale(.5)}.tippy-popper[x-placement^=left] .tippy-backdrop{border-radius:50% 0 0 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow{right:-12px;-webkit-transform-origin:33.33333333% 50%;transform-origin:33.33333333% 50%;margin:3px 0}.tippy-popper[x-placement^=left] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tippy-popper[x-placement^=left] .tippy-arrow{border-left:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;right:-7px;margin:3px 0;-webkit-transform-origin:0 50%;transform-origin:0 50%}.tippy-popper[x-placement^=left] .tippy-backdrop{-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-75%,-50%);transform:scale(.2) translate(-75%,-50%);opacity:0}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}.tippy-popper[x-placement^=left] [data-animation=perspective]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(-10px) rotateY(0);transform:perspective(700px) translateX(-10px) rotateY(0)}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(-60deg);transform:perspective(700px) translateX(0) rotateY(-60deg)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=left] [data-animation=scale]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(-10px) scale(1);transform:translateX(-10px) scale(1)}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px) scale(.5);transform:translateX(-10px) scale(.5)}.tippy-popper[x-placement^=right] .tippy-backdrop{border-radius:0 50% 50% 0}.tippy-popper[x-placement^=right] .tippy-roundarrow{left:-12px;-webkit-transform-origin:66.66666666% 50%;transform-origin:66.66666666% 50%;margin:3px 0}.tippy-popper[x-placement^=right] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.tippy-popper[x-placement^=right] .tippy-arrow{border-right:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;left:-7px;margin:3px 0;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.tippy-popper[x-placement^=right] .tippy-backdrop{-webkit-transform-origin:-50% 0;transform-origin:-50% 0}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-25%,-50%);transform:scale(.2) translate(-25%,-50%);opacity:0}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}.tippy-popper[x-placement^=right] [data-animation=perspective]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(10px) rotateY(0);transform:perspective(700px) translateX(10px) rotateY(0)}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(60deg);transform:perspective(700px) translateX(0) rotateY(60deg)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=right] [data-animation=scale]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(10px) scale(1);transform:translateX(10px) scale(1)}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px) scale(.5);transform:translateX(10px) scale(.5)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;padding:.3125rem .5625rem;line-height:1.4;text-align:center;background-color:#333}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-animatefill]{overflow:hidden;background-color:transparent}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] .tippy-roundarrow path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow,.tippy-roundarrow{position:absolute;width:0;height:0}.tippy-roundarrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop:after{content:\\\"\\\";float:left;padding-top:100%}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=visible]{opacity:1}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}\";\n\nfunction _extends$2() {\n  _extends$2 = 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\n  return _extends$2.apply(this, arguments);\n}\n\nvar version = \"4.3.4\";\n\nvar isBrowser$1 = typeof window !== 'undefined' && typeof document !== 'undefined';\nvar ua = isBrowser$1 ? navigator.userAgent : '';\nvar isIE$1 = /MSIE |Trident\\//.test(ua);\nvar isUCBrowser = /UCBrowser\\//.test(ua);\nvar isIOS = isBrowser$1 && /iPhone|iPad|iPod/.test(navigator.platform) && !window.MSStream;\n\nvar defaultProps = {\n  a11y: true,\n  allowHTML: true,\n  animateFill: true,\n  animation: 'shift-away',\n  appendTo: function appendTo() {\n    return document.body;\n  },\n  aria: 'describedby',\n  arrow: false,\n  arrowType: 'sharp',\n  boundary: 'scrollParent',\n  content: '',\n  delay: 0,\n  distance: 10,\n  duration: [325, 275],\n  flip: true,\n  flipBehavior: 'flip',\n  flipOnUpdate: false,\n  followCursor: false,\n  hideOnClick: true,\n  ignoreAttributes: false,\n  inertia: false,\n  interactive: false,\n  interactiveBorder: 2,\n  interactiveDebounce: 0,\n  lazy: true,\n  maxWidth: 350,\n  multiple: false,\n  offset: 0,\n  onHidden: function onHidden() {},\n  onHide: function onHide() {},\n  onMount: function onMount() {},\n  onShow: function onShow() {},\n  onShown: function onShown() {},\n  onTrigger: function onTrigger() {},\n  placement: 'top',\n  popperOptions: {},\n  role: 'tooltip',\n  showOnInit: false,\n  size: 'regular',\n  sticky: false,\n  target: '',\n  theme: 'dark',\n  touch: true,\n  touchHold: false,\n  trigger: 'mouseenter focus',\n  triggerTarget: null,\n  updateDuration: 0,\n  wait: null,\n  zIndex: 9999\n  /**\n   * If the set() method encounters one of these, the popperInstance must be\n   * recreated\n   */\n\n};\nvar POPPER_INSTANCE_DEPENDENCIES = ['arrow', 'arrowType', 'boundary', 'distance', 'flip', 'flipBehavior', 'flipOnUpdate', 'offset', 'placement', 'popperOptions'];\n\nvar elementProto = isBrowser$1 ? Element.prototype : {};\nvar matches = elementProto.matches || elementProto.matchesSelector || elementProto.webkitMatchesSelector || elementProto.mozMatchesSelector || elementProto.msMatchesSelector;\n/**\n * Ponyfill for Array.from - converts iterable values to an array\n */\n\nfunction arrayFrom(value) {\n  return [].slice.call(value);\n}\n/**\n * Ponyfill for Element.prototype.closest\n */\n\nfunction closest(element, selector) {\n  return closestCallback(element, function (el) {\n    return matches.call(el, selector);\n  });\n}\n/**\n * Works like Element.prototype.closest, but uses a callback instead\n */\n\nfunction closestCallback(element, callback) {\n  while (element) {\n    if (callback(element)) {\n      return element;\n    }\n\n    element = element.parentElement;\n  }\n\n  return null;\n}\n\n// Passive event listener config\nvar PASSIVE = {\n  passive: true // Popper `preventOverflow` padding\n\n};\nvar PADDING = 4; // Popper attributes\n// In Popper v2 these will be `data-*` instead of `x-*` to adhere to HTML5 spec\n\nvar PLACEMENT_ATTRIBUTE = 'x-placement';\nvar OUT_OF_BOUNDARIES_ATTRIBUTE = 'x-out-of-boundaries'; // Classes\n\nvar IOS_CLASS = \"tippy-iOS\";\nvar ACTIVE_CLASS = \"tippy-active\";\nvar POPPER_CLASS = \"tippy-popper\";\nvar TOOLTIP_CLASS = \"tippy-tooltip\";\nvar CONTENT_CLASS = \"tippy-content\";\nvar BACKDROP_CLASS = \"tippy-backdrop\";\nvar ARROW_CLASS = \"tippy-arrow\";\nvar ROUND_ARROW_CLASS = \"tippy-roundarrow\"; // Selectors\n\nvar POPPER_SELECTOR = \".\".concat(POPPER_CLASS);\nvar TOOLTIP_SELECTOR = \".\".concat(TOOLTIP_CLASS);\nvar CONTENT_SELECTOR = \".\".concat(CONTENT_CLASS);\nvar BACKDROP_SELECTOR = \".\".concat(BACKDROP_CLASS);\nvar ARROW_SELECTOR = \".\".concat(ARROW_CLASS);\nvar ROUND_ARROW_SELECTOR = \".\".concat(ROUND_ARROW_CLASS);\n\nvar isUsingTouch = false;\nfunction onDocumentTouch() {\n  if (isUsingTouch) {\n    return;\n  }\n\n  isUsingTouch = true;\n\n  if (isIOS) {\n    document.body.classList.add(IOS_CLASS);\n  }\n\n  if (window.performance) {\n    document.addEventListener('mousemove', onDocumentMouseMove);\n  }\n}\nvar lastMouseMoveTime = 0;\nfunction onDocumentMouseMove() {\n  var now = performance.now(); // Chrome 60+ is 1 mousemove per animation frame, use 20ms time difference\n\n  if (now - lastMouseMoveTime < 20) {\n    isUsingTouch = false;\n    document.removeEventListener('mousemove', onDocumentMouseMove);\n\n    if (!isIOS) {\n      document.body.classList.remove(IOS_CLASS);\n    }\n  }\n\n  lastMouseMoveTime = now;\n}\nfunction onWindowBlur() {\n  var _document = document,\n      activeElement = _document.activeElement;\n\n  if (activeElement && activeElement.blur && activeElement._tippy) {\n    activeElement.blur();\n  }\n}\n/**\n * Adds the needed global event listeners\n */\n\nfunction bindGlobalEventListeners() {\n  document.addEventListener('touchstart', onDocumentTouch, PASSIVE);\n  window.addEventListener('blur', onWindowBlur);\n}\n\nvar keys = Object.keys(defaultProps);\n/**\n * Returns an object of optional props from data-tippy-* attributes\n */\n\nfunction getDataAttributeOptions(reference) {\n  return keys.reduce(function (acc, key) {\n    var valueAsString = (reference.getAttribute(\"data-tippy-\".concat(key)) || '').trim();\n\n    if (!valueAsString) {\n      return acc;\n    }\n\n    if (key === 'content') {\n      acc[key] = valueAsString;\n    } else {\n      try {\n        acc[key] = JSON.parse(valueAsString);\n      } catch (e) {\n        acc[key] = valueAsString;\n      }\n    }\n\n    return acc;\n  }, {});\n}\n/**\n * Polyfills the virtual reference (plain object) with Element.prototype props\n * Mutating because DOM elements are mutated, adds `_tippy` property\n */\n\nfunction polyfillElementPrototypeProperties(virtualReference) {\n  var polyfills = {\n    isVirtual: true,\n    attributes: virtualReference.attributes || {},\n    contains: function contains() {},\n    setAttribute: function setAttribute(key, value) {\n      virtualReference.attributes[key] = value;\n    },\n    getAttribute: function getAttribute(key) {\n      return virtualReference.attributes[key];\n    },\n    removeAttribute: function removeAttribute(key) {\n      delete virtualReference.attributes[key];\n    },\n    hasAttribute: function hasAttribute(key) {\n      return key in virtualReference.attributes;\n    },\n    addEventListener: function addEventListener() {},\n    removeEventListener: function removeEventListener() {},\n    classList: {\n      classNames: {},\n      add: function add(key) {\n        virtualReference.classList.classNames[key] = true;\n      },\n      remove: function remove(key) {\n        delete virtualReference.classList.classNames[key];\n      },\n      contains: function contains(key) {\n        return key in virtualReference.classList.classNames;\n      }\n    }\n  };\n\n  for (var key in polyfills) {\n    virtualReference[key] = polyfills[key];\n  }\n}\n\n/**\n * Determines if a value is a \"bare\" virtual element (before mutations done\n * by `polyfillElementPrototypeProperties()`). JSDOM elements show up as\n * [object Object], we can check if the value is \"element-like\" if it has\n * `addEventListener`\n */\n\nfunction isBareVirtualElement(value) {\n  return {}.toString.call(value) === '[object Object]' && !value.addEventListener;\n}\n/**\n * Determines if the value is a reference element\n */\n\nfunction isReferenceElement(value) {\n  return !!value._tippy && !matches.call(value, POPPER_SELECTOR);\n}\n/**\n * Safe .hasOwnProperty check, for prototype-less objects\n */\n\nfunction hasOwnProperty$1(obj, key) {\n  return {}.hasOwnProperty.call(obj, key);\n}\n/**\n * Returns an array of elements based on the value\n */\n\nfunction getArrayOfElements(value) {\n  if (isSingular(value)) {\n    // TODO: VirtualReference is not compatible to type Element\n    return [value];\n  }\n\n  if (value instanceof NodeList) {\n    return arrayFrom(value);\n  }\n\n  if (Array.isArray(value)) {\n    return value;\n  }\n\n  try {\n    return arrayFrom(document.querySelectorAll(value));\n  } catch (e) {\n    return [];\n  }\n}\n/**\n * Returns a value at a given index depending on if it's an array or number\n */\n\nfunction getValue(value, index, defaultValue) {\n  if (Array.isArray(value)) {\n    var v = value[index];\n    return v == null ? defaultValue : v;\n  }\n\n  return value;\n}\n/**\n * Debounce utility. To avoid bloating bundle size, we're only passing 1\n * argument here, a more generic function would pass all arguments. Only\n * `onMouseMove` uses this which takes the event object for now.\n */\n\nfunction debounce$1(fn, ms) {\n  // Avoid wrapping in `setTimeout` if ms is 0 anyway\n  if (ms === 0) {\n    return fn;\n  }\n\n  var timeout;\n  return function (arg) {\n    clearTimeout(timeout);\n    timeout = setTimeout(function () {\n      fn(arg);\n    }, ms);\n  };\n}\n/**\n * Prevents errors from being thrown while accessing nested modifier objects\n * in `popperOptions`\n */\n\nfunction getModifier(obj, key) {\n  return obj && obj.modifiers && obj.modifiers[key];\n}\n/**\n * Determines if an array or string includes a value\n */\n\nfunction includes(a, b) {\n  return a.indexOf(b) > -1;\n}\n/**\n * Determines if the value is a real element\n */\n\nfunction isRealElement(value) {\n  return value instanceof Element;\n}\n/**\n * Determines if the value is singular-like\n */\n\nfunction isSingular(value) {\n  return !!(value && hasOwnProperty$1(value, 'isVirtual')) || isRealElement(value);\n}\n/**\n * Firefox extensions don't allow setting .innerHTML directly, this will trick it\n */\n\nfunction innerHTML() {\n  return 'innerHTML';\n}\n/**\n * Evaluates a function if one, or returns the value\n */\n\nfunction invokeWithArgsOrReturn(value, args) {\n  return typeof value === 'function' ? value.apply(null, args) : value;\n}\n/**\n * Sets a popperInstance `flip` modifier's enabled state\n */\n\nfunction setFlipModifierEnabled(modifiers, value) {\n  modifiers.filter(function (m) {\n    return m.name === 'flip';\n  })[0].enabled = value;\n}\n/**\n * Determines if an element can receive focus\n * Always returns true for virtual objects\n */\n\nfunction canReceiveFocus(element) {\n  return isRealElement(element) ? matches.call(element, 'a[href],area[href],button,details,input,textarea,select,iframe,[tabindex]') && !element.hasAttribute('disabled') : true;\n}\n/**\n * Returns a new `div` element\n */\n\nfunction div() {\n  return document.createElement('div');\n}\n/**\n * Applies a transition duration to a list of elements\n */\n\nfunction setTransitionDuration(els, value) {\n  els.forEach(function (el) {\n    if (el) {\n      el.style.transitionDuration = \"\".concat(value, \"ms\");\n    }\n  });\n}\n/**\n * Sets the visibility state to elements so they can begin to transition\n */\n\nfunction setVisibilityState(els, state) {\n  els.forEach(function (el) {\n    if (el) {\n      el.setAttribute('data-state', state);\n    }\n  });\n}\n/**\n * Evaluates the props object by merging data attributes and\n * disabling conflicting options where necessary\n */\n\nfunction evaluateProps(reference, props) {\n  var out = _extends$2({}, props, {\n    content: invokeWithArgsOrReturn(props.content, [reference])\n  }, props.ignoreAttributes ? {} : getDataAttributeOptions(reference));\n\n  if (out.arrow || isUCBrowser) {\n    out.animateFill = false;\n  }\n\n  return out;\n}\n/**\n * Validates an object of options with the valid default props object\n */\n\nfunction validateOptions(options, defaultProps) {\n  Object.keys(options).forEach(function (option) {\n    if (!hasOwnProperty$1(defaultProps, option)) {\n      throw new Error(\"[tippy]: `\".concat(option, \"` is not a valid option\"));\n    }\n  });\n}\n\n/**\n * Sets the innerHTML of an element\n */\n\nfunction setInnerHTML(element, html) {\n  element[innerHTML()] = isRealElement(html) ? html[innerHTML()] : html;\n}\n/**\n * Sets the content of a tooltip\n */\n\nfunction setContent(contentEl, props) {\n  if (isRealElement(props.content)) {\n    setInnerHTML(contentEl, '');\n    contentEl.appendChild(props.content);\n  } else if (typeof props.content !== 'function') {\n    var key = props.allowHTML ? 'innerHTML' : 'textContent';\n    contentEl[key] = props.content;\n  }\n}\n/**\n * Returns the child elements of a popper element\n */\n\nfunction getChildren(popper) {\n  return {\n    tooltip: popper.querySelector(TOOLTIP_SELECTOR),\n    backdrop: popper.querySelector(BACKDROP_SELECTOR),\n    content: popper.querySelector(CONTENT_SELECTOR),\n    arrow: popper.querySelector(ARROW_SELECTOR) || popper.querySelector(ROUND_ARROW_SELECTOR)\n  };\n}\n/**\n * Adds `data-inertia` attribute\n */\n\nfunction addInertia(tooltip) {\n  tooltip.setAttribute('data-inertia', '');\n}\n/**\n * Removes `data-inertia` attribute\n */\n\nfunction removeInertia(tooltip) {\n  tooltip.removeAttribute('data-inertia');\n}\n/**\n * Creates an arrow element and returns it\n */\n\nfunction createArrowElement(arrowType) {\n  var arrow = div();\n\n  if (arrowType === 'round') {\n    arrow.className = ROUND_ARROW_CLASS;\n    setInnerHTML(arrow, '<svg viewBox=\"0 0 18 7\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z\"/></svg>');\n  } else {\n    arrow.className = ARROW_CLASS;\n  }\n\n  return arrow;\n}\n/**\n * Creates a backdrop element and returns it\n */\n\nfunction createBackdropElement() {\n  var backdrop = div();\n  backdrop.className = BACKDROP_CLASS;\n  backdrop.setAttribute('data-state', 'hidden');\n  return backdrop;\n}\n/**\n * Adds interactive-related attributes\n */\n\nfunction addInteractive(popper, tooltip) {\n  popper.setAttribute('tabindex', '-1');\n  tooltip.setAttribute('data-interactive', '');\n}\n/**\n * Removes interactive-related attributes\n */\n\nfunction removeInteractive(popper, tooltip) {\n  popper.removeAttribute('tabindex');\n  tooltip.removeAttribute('data-interactive');\n}\n/**\n * Add/remove transitionend listener from tooltip\n */\n\nfunction updateTransitionEndListener(tooltip, action, listener) {\n  // UC Browser hasn't adopted the `transitionend` event despite supporting\n  // unprefixed transitions...\n  var eventName = isUCBrowser && document.body.style.webkitTransition !== undefined ? 'webkitTransitionEnd' : 'transitionend';\n  tooltip[action + 'EventListener'](eventName, listener);\n}\n/**\n * Returns the popper's placement, ignoring shifting (top-start, etc)\n */\n\nfunction getBasicPlacement(popper) {\n  var fullPlacement = popper.getAttribute(PLACEMENT_ATTRIBUTE);\n  return fullPlacement ? fullPlacement.split('-')[0] : '';\n}\n/**\n * Triggers reflow\n */\n\nfunction reflow(popper) {\n  void popper.offsetHeight;\n}\n/**\n * Adds/removes theme from tooltip's classList\n */\n\nfunction updateTheme(tooltip, action, theme) {\n  theme.split(' ').forEach(function (themeName) {\n    tooltip.classList[action](themeName + '-theme');\n  });\n}\n/**\n * Constructs the popper element and returns it\n */\n\nfunction createPopperElement(id, props) {\n  var popper = div();\n  popper.className = POPPER_CLASS;\n  popper.id = \"tippy-\".concat(id);\n  popper.style.zIndex = '' + props.zIndex;\n  popper.style.position = 'absolute';\n  popper.style.top = '0';\n  popper.style.left = '0';\n\n  if (props.role) {\n    popper.setAttribute('role', props.role);\n  }\n\n  var tooltip = div();\n  tooltip.className = TOOLTIP_CLASS;\n  tooltip.style.maxWidth = props.maxWidth + (typeof props.maxWidth === 'number' ? 'px' : '');\n  tooltip.setAttribute('data-size', props.size);\n  tooltip.setAttribute('data-animation', props.animation);\n  tooltip.setAttribute('data-state', 'hidden');\n  updateTheme(tooltip, 'add', props.theme);\n  var content = div();\n  content.className = CONTENT_CLASS;\n  content.setAttribute('data-state', 'hidden');\n\n  if (props.interactive) {\n    addInteractive(popper, tooltip);\n  }\n\n  if (props.arrow) {\n    tooltip.appendChild(createArrowElement(props.arrowType));\n  }\n\n  if (props.animateFill) {\n    tooltip.appendChild(createBackdropElement());\n    tooltip.setAttribute('data-animatefill', '');\n  }\n\n  if (props.inertia) {\n    addInertia(tooltip);\n  }\n\n  setContent(content, props);\n  tooltip.appendChild(content);\n  popper.appendChild(tooltip);\n  return popper;\n}\n/**\n * Updates the popper element based on the new props\n */\n\nfunction updatePopperElement(popper, prevProps, nextProps) {\n  var _getChildren = getChildren(popper),\n      tooltip = _getChildren.tooltip,\n      content = _getChildren.content,\n      backdrop = _getChildren.backdrop,\n      arrow = _getChildren.arrow;\n\n  popper.style.zIndex = '' + nextProps.zIndex;\n  tooltip.setAttribute('data-size', nextProps.size);\n  tooltip.setAttribute('data-animation', nextProps.animation);\n  tooltip.style.maxWidth = nextProps.maxWidth + (typeof nextProps.maxWidth === 'number' ? 'px' : '');\n\n  if (nextProps.role) {\n    popper.setAttribute('role', nextProps.role);\n  } else {\n    popper.removeAttribute('role');\n  }\n\n  if (prevProps.content !== nextProps.content) {\n    setContent(content, nextProps);\n  } // animateFill\n\n\n  if (!prevProps.animateFill && nextProps.animateFill) {\n    tooltip.appendChild(createBackdropElement());\n    tooltip.setAttribute('data-animatefill', '');\n  } else if (prevProps.animateFill && !nextProps.animateFill) {\n    tooltip.removeChild(backdrop);\n    tooltip.removeAttribute('data-animatefill');\n  } // arrow\n\n\n  if (!prevProps.arrow && nextProps.arrow) {\n    tooltip.appendChild(createArrowElement(nextProps.arrowType));\n  } else if (prevProps.arrow && !nextProps.arrow) {\n    tooltip.removeChild(arrow);\n  } // arrowType\n\n\n  if (prevProps.arrow && nextProps.arrow && prevProps.arrowType !== nextProps.arrowType) {\n    tooltip.replaceChild(createArrowElement(nextProps.arrowType), arrow);\n  } // interactive\n\n\n  if (!prevProps.interactive && nextProps.interactive) {\n    addInteractive(popper, tooltip);\n  } else if (prevProps.interactive && !nextProps.interactive) {\n    removeInteractive(popper, tooltip);\n  } // inertia\n\n\n  if (!prevProps.inertia && nextProps.inertia) {\n    addInertia(tooltip);\n  } else if (prevProps.inertia && !nextProps.inertia) {\n    removeInertia(tooltip);\n  } // theme\n\n\n  if (prevProps.theme !== nextProps.theme) {\n    updateTheme(tooltip, 'remove', prevProps.theme);\n    updateTheme(tooltip, 'add', nextProps.theme);\n  }\n}\n/**\n * Hides all visible poppers on the document\n */\n\nfunction hideAll() {\n  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n      excludedReferenceOrInstance = _ref.exclude,\n      duration = _ref.duration;\n\n  arrayFrom(document.querySelectorAll(POPPER_SELECTOR)).forEach(function (popper) {\n    var instance = popper._tippy;\n\n    if (instance) {\n      var isExcluded = false;\n\n      if (excludedReferenceOrInstance) {\n        isExcluded = isReferenceElement(excludedReferenceOrInstance) ? instance.reference === excludedReferenceOrInstance : popper === excludedReferenceOrInstance.popper;\n      }\n\n      if (!isExcluded) {\n        instance.hide(duration);\n      }\n    }\n  });\n}\n/**\n * Determines if the mouse cursor is outside of the popper's interactive border\n * region\n */\n\nfunction isCursorOutsideInteractiveBorder(popperPlacement, popperRect, event, props) {\n  if (!popperPlacement) {\n    return true;\n  }\n\n  var x = event.clientX,\n      y = event.clientY;\n  var interactiveBorder = props.interactiveBorder,\n      distance = props.distance;\n  var exceedsTop = popperRect.top - y > (popperPlacement === 'top' ? interactiveBorder + distance : interactiveBorder);\n  var exceedsBottom = y - popperRect.bottom > (popperPlacement === 'bottom' ? interactiveBorder + distance : interactiveBorder);\n  var exceedsLeft = popperRect.left - x > (popperPlacement === 'left' ? interactiveBorder + distance : interactiveBorder);\n  var exceedsRight = x - popperRect.right > (popperPlacement === 'right' ? interactiveBorder + distance : interactiveBorder);\n  return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight;\n}\n/**\n * Returns the distance offset, taking into account the default offset due to\n * the transform: translate() rule (10px) in CSS\n */\n\nfunction getOffsetDistanceInPx(distance) {\n  return -(distance - 10) + 'px';\n}\n\nvar idCounter = 1; // Workaround for IE11's lack of new MouseEvent constructor\n\nvar mouseMoveListeners = [];\n/**\n * Creates and returns a Tippy object. We're using a closure pattern instead of\n * a class so that the exposed object API is clean without private members\n * prefixed with `_`.\n */\n\nfunction createTippy(reference, collectionProps) {\n  var props = evaluateProps(reference, collectionProps); // If the reference shouldn't have multiple tippys, return null early\n\n  if (!props.multiple && reference._tippy) {\n    return null;\n  }\n  /* ======================= 🔒 Private members 🔒 ======================= */\n\n\n  var lastTriggerEventType;\n  var lastMouseMoveEvent;\n  var showTimeoutId;\n  var hideTimeoutId;\n  var scheduleHideAnimationFrameId;\n  var isScheduledToShow = false;\n  var isBeingDestroyed = false;\n  var previousPlacement;\n  var wasVisibleDuringPreviousUpdate = false;\n  var hasMountCallbackRun = false;\n  var currentMountCallback;\n  var currentTransitionEndListener;\n  var listeners = [];\n  var currentComputedPadding;\n  var debouncedOnMouseMove = debounce$1(onMouseMove, props.interactiveDebounce);\n  /* ======================= 🔑 Public members 🔑 ======================= */\n\n  var id = idCounter++;\n  var popper = createPopperElement(id, props);\n  var popperChildren = getChildren(popper);\n  var popperInstance = null;\n  var state = {\n    // Is the instance currently enabled?\n    isEnabled: true,\n    // Is the tippy currently showing and not transitioning out?\n    isVisible: false,\n    // Has the instance been destroyed?\n    isDestroyed: false,\n    // Is the tippy currently mounted to the DOM?\n    isMounted: false,\n    // Has the tippy finished transitioning in?\n    isShown: false\n  };\n  var instance = {\n    // properties\n    id: id,\n    reference: reference,\n    popper: popper,\n    popperChildren: popperChildren,\n    popperInstance: popperInstance,\n    props: props,\n    state: state,\n    // methods\n    clearDelayTimeouts: clearDelayTimeouts,\n    set: set,\n    setContent: setContent,\n    show: show,\n    hide: hide,\n    enable: enable,\n    disable: disable,\n    destroy: destroy\n    /* ==================== Initial instance mutations =================== */\n\n  };\n  reference._tippy = instance;\n  popper._tippy = instance;\n  addTriggersToReference();\n\n  if (!props.lazy) {\n    createPopperInstance();\n  }\n\n  if (props.showOnInit) {\n    scheduleShow();\n  } // Ensure the event listeners target can receive focus\n\n\n  if (props.a11y && !props.target && !canReceiveFocus(getEventListenersTarget())) {\n    getEventListenersTarget().setAttribute('tabindex', '0');\n  } // Prevent a tippy with a delay from hiding if the cursor left then returned\n  // before it started hiding\n\n\n  popper.addEventListener('mouseenter', function (event) {\n    if (instance.props.interactive && instance.state.isVisible && lastTriggerEventType === 'mouseenter') {\n      // We don't want props.onTrigger() to be called here, since the `event`\n      // object is not related to the reference element\n      scheduleShow(event, true);\n    }\n  });\n  popper.addEventListener('mouseleave', function () {\n    if (instance.props.interactive && lastTriggerEventType === 'mouseenter') {\n      document.addEventListener('mousemove', debouncedOnMouseMove);\n    }\n  });\n  return instance;\n  /* ======================= 🔒 Private methods 🔒 ======================= */\n\n  /**\n   * Removes the follow cursor listener\n   */\n\n  function removeFollowCursorListener() {\n    document.removeEventListener('mousemove', positionVirtualReferenceNearCursor);\n  }\n  /**\n   * Cleans up interactive mouse listeners\n   */\n\n\n  function cleanupInteractiveMouseListeners() {\n    document.body.removeEventListener('mouseleave', scheduleHide);\n    document.removeEventListener('mousemove', debouncedOnMouseMove);\n    mouseMoveListeners = mouseMoveListeners.filter(function (listener) {\n      return listener !== debouncedOnMouseMove;\n    });\n  }\n  /**\n   * Returns correct target used for event listeners\n   */\n\n\n  function getEventListenersTarget() {\n    return instance.props.triggerTarget || reference;\n  }\n  /**\n   * Adds the document click event listener for the instance\n   */\n\n\n  function addDocumentClickListener() {\n    document.addEventListener('click', onDocumentClick, true);\n  }\n  /**\n   * Removes the document click event listener for the instance\n   */\n\n\n  function removeDocumentClickListener() {\n    document.removeEventListener('click', onDocumentClick, true);\n  }\n  /**\n   * Returns transitionable inner elements used in show/hide methods\n   */\n\n\n  function getTransitionableElements() {\n    return [instance.popperChildren.tooltip, instance.popperChildren.backdrop, instance.popperChildren.content];\n  }\n  /**\n   * Determines if the instance is in `followCursor` mode.\n   * NOTE: in v5, touch devices will use `initial` behavior no matter the value.\n   */\n\n\n  function getIsInLooseFollowCursorMode() {\n    var followCursor = instance.props.followCursor;\n    return followCursor && lastTriggerEventType !== 'focus' || isUsingTouch && followCursor === 'initial';\n  }\n  /**\n   * Updates the tooltip's position on each animation frame\n   */\n\n\n  function makeSticky() {\n    setTransitionDuration([popper], isIE$1 ? 0 : instance.props.updateDuration);\n\n    function updatePosition() {\n      instance.popperInstance.scheduleUpdate();\n\n      if (instance.state.isMounted) {\n        requestAnimationFrame(updatePosition);\n      } else {\n        setTransitionDuration([popper], 0);\n      }\n    }\n\n    updatePosition();\n  }\n  /**\n   * Invokes a callback once the tooltip has fully transitioned out\n   */\n\n\n  function onTransitionedOut(duration, callback) {\n    onTransitionEnd(duration, function () {\n      if (!instance.state.isVisible && popper.parentNode && popper.parentNode.contains(popper)) {\n        callback();\n      }\n    });\n  }\n  /**\n   * Invokes a callback once the tooltip has fully transitioned in\n   */\n\n\n  function onTransitionedIn(duration, callback) {\n    onTransitionEnd(duration, callback);\n  }\n  /**\n   * Invokes a callback once the tooltip's CSS transition ends\n   */\n\n\n  function onTransitionEnd(duration, callback) {\n    var tooltip = instance.popperChildren.tooltip;\n    /**\n     * Listener added as the `transitionend` handler\n     */\n\n    function listener(event) {\n      if (event.target === tooltip) {\n        updateTransitionEndListener(tooltip, 'remove', listener);\n        callback();\n      }\n    } // Make callback synchronous if duration is 0\n    // `transitionend` won't fire otherwise\n\n\n    if (duration === 0) {\n      return callback();\n    }\n\n    updateTransitionEndListener(tooltip, 'remove', currentTransitionEndListener);\n    updateTransitionEndListener(tooltip, 'add', listener);\n    currentTransitionEndListener = listener;\n  }\n  /**\n   * Adds an event listener to the reference and stores it in `listeners`\n   */\n\n\n  function on(eventType, handler) {\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    getEventListenersTarget().addEventListener(eventType, handler, options);\n    listeners.push({\n      eventType: eventType,\n      handler: handler,\n      options: options\n    });\n  }\n  /**\n   * Adds event listeners to the reference based on the `trigger` prop\n   */\n\n\n  function addTriggersToReference() {\n    if (instance.props.touchHold && !instance.props.target) {\n      on('touchstart', onTrigger, PASSIVE);\n      on('touchend', onMouseLeave, PASSIVE);\n    }\n\n    instance.props.trigger.trim().split(' ').forEach(function (eventType) {\n      if (eventType === 'manual') {\n        return;\n      } // Non-delegates\n\n\n      if (!instance.props.target) {\n        on(eventType, onTrigger);\n\n        switch (eventType) {\n          case 'mouseenter':\n            on('mouseleave', onMouseLeave);\n            break;\n\n          case 'focus':\n            on(isIE$1 ? 'focusout' : 'blur', onBlur);\n            break;\n        }\n      } else {\n        // Delegates\n        switch (eventType) {\n          case 'mouseenter':\n            on('mouseover', onDelegateShow);\n            on('mouseout', onDelegateHide);\n            break;\n\n          case 'focus':\n            on('focusin', onDelegateShow);\n            on('focusout', onDelegateHide);\n            break;\n\n          case 'click':\n            on(eventType, onDelegateShow);\n            break;\n        }\n      }\n    });\n  }\n  /**\n   * Removes event listeners from the reference\n   */\n\n\n  function removeTriggersFromReference() {\n    listeners.forEach(function (_ref) {\n      var eventType = _ref.eventType,\n          handler = _ref.handler,\n          options = _ref.options;\n      getEventListenersTarget().removeEventListener(eventType, handler, options);\n    });\n    listeners = [];\n  }\n  /**\n   * Positions the virtual reference near the cursor\n   */\n\n\n  function positionVirtualReferenceNearCursor(event) {\n    var _lastMouseMoveEvent = lastMouseMoveEvent = event,\n        x = _lastMouseMoveEvent.clientX,\n        y = _lastMouseMoveEvent.clientY; // Gets set once popperInstance `onCreate` has been called\n\n\n    if (!currentComputedPadding) {\n      return;\n    } // If the instance is interactive, avoid updating the position unless it's\n    // over the reference element\n\n\n    var isCursorOverReference = closestCallback(event.target, function (el) {\n      return el === reference;\n    });\n    var rect = reference.getBoundingClientRect();\n    var followCursor = instance.props.followCursor;\n    var isHorizontal = followCursor === 'horizontal';\n    var isVertical = followCursor === 'vertical'; // The virtual reference needs some size to prevent itself from overflowing\n\n    var isVerticalPlacement = includes(['top', 'bottom'], getBasicPlacement(popper));\n    var fullPlacement = popper.getAttribute(PLACEMENT_ATTRIBUTE);\n    var isVariation = fullPlacement ? !!fullPlacement.split('-')[1] : false;\n    var size = isVerticalPlacement ? popper.offsetWidth : popper.offsetHeight;\n    var halfSize = size / 2;\n    var verticalIncrease = isVerticalPlacement ? 0 : isVariation ? size : halfSize;\n    var horizontalIncrease = isVerticalPlacement ? isVariation ? size : halfSize : 0;\n\n    if (isCursorOverReference || !instance.props.interactive) {\n      instance.popperInstance.reference = _extends$2({}, instance.popperInstance.reference, {\n        // These `client` values don't get used by Popper.js if they are 0\n        clientWidth: 0,\n        clientHeight: 0,\n        getBoundingClientRect: function getBoundingClientRect() {\n          return {\n            width: isVerticalPlacement ? size : 0,\n            height: isVerticalPlacement ? 0 : size,\n            top: (isHorizontal ? rect.top : y) - verticalIncrease,\n            bottom: (isHorizontal ? rect.bottom : y) + verticalIncrease,\n            left: (isVertical ? rect.left : x) - horizontalIncrease,\n            right: (isVertical ? rect.right : x) + horizontalIncrease\n          };\n        }\n      });\n      instance.popperInstance.update();\n    }\n\n    if (followCursor === 'initial' && instance.state.isVisible) {\n      removeFollowCursorListener();\n    }\n  }\n  /**\n   * Creates the tippy instance for a delegate when it's been triggered\n   */\n\n\n  function createDelegateChildTippy(event) {\n    if (event) {\n      var targetEl = closest(event.target, instance.props.target);\n\n      if (targetEl && !targetEl._tippy) {\n        createTippy(targetEl, _extends$2({}, instance.props, {\n          content: invokeWithArgsOrReturn(collectionProps.content, [targetEl]),\n          appendTo: collectionProps.appendTo,\n          target: '',\n          showOnInit: true\n        }));\n      }\n    }\n  }\n  /**\n   * Event listener invoked upon trigger\n   */\n\n\n  function onTrigger(event) {\n    if (!instance.state.isEnabled || isEventListenerStopped(event)) {\n      return;\n    }\n\n    if (!instance.state.isVisible) {\n      lastTriggerEventType = event.type;\n\n      if (event instanceof MouseEvent) {\n        lastMouseMoveEvent = event; // If scrolling, `mouseenter` events can be fired if the cursor lands\n        // over a new target, but `mousemove` events don't get fired. This\n        // causes interactive tooltips to get stuck open until the cursor is\n        // moved\n\n        mouseMoveListeners.forEach(function (listener) {\n          return listener(event);\n        });\n      }\n    } // Toggle show/hide when clicking click-triggered tooltips\n\n\n    if (event.type === 'click' && instance.props.hideOnClick !== false && instance.state.isVisible) {\n      scheduleHide();\n    } else {\n      scheduleShow(event);\n    }\n  }\n  /**\n   * Event listener used for interactive tooltips to detect when they should\n   * hide\n   */\n\n\n  function onMouseMove(event) {\n    var isCursorOverPopper = closest(event.target, POPPER_SELECTOR) === popper;\n    var isCursorOverReference = closestCallback(event.target, function (el) {\n      return el === reference;\n    });\n\n    if (isCursorOverPopper || isCursorOverReference) {\n      return;\n    }\n\n    if (isCursorOutsideInteractiveBorder(getBasicPlacement(popper), popper.getBoundingClientRect(), event, instance.props)) {\n      cleanupInteractiveMouseListeners();\n      scheduleHide();\n    }\n  }\n  /**\n   * Event listener invoked upon mouseleave\n   */\n\n\n  function onMouseLeave(event) {\n    if (isEventListenerStopped(event)) {\n      return;\n    }\n\n    if (instance.props.interactive) {\n      document.body.addEventListener('mouseleave', scheduleHide);\n      document.addEventListener('mousemove', debouncedOnMouseMove);\n      mouseMoveListeners.push(debouncedOnMouseMove);\n      return;\n    }\n\n    scheduleHide();\n  }\n  /**\n   * Event listener invoked upon blur\n   */\n\n\n  function onBlur(event) {\n    if (event.target !== getEventListenersTarget()) {\n      return;\n    }\n\n    if (instance.props.interactive && event.relatedTarget && popper.contains(event.relatedTarget)) {\n      return;\n    }\n\n    scheduleHide();\n  }\n  /**\n   * Event listener invoked when a child target is triggered\n   */\n\n\n  function onDelegateShow(event) {\n    if (closest(event.target, instance.props.target)) {\n      scheduleShow(event);\n    }\n  }\n  /**\n   * Event listener invoked when a child target should hide\n   */\n\n\n  function onDelegateHide(event) {\n    if (closest(event.target, instance.props.target)) {\n      scheduleHide();\n    }\n  }\n  /**\n   * Determines if an event listener should stop further execution due to the\n   * `touchHold` option\n   */\n\n\n  function isEventListenerStopped(event) {\n    var supportsTouch = 'ontouchstart' in window;\n    var isTouchEvent = includes(event.type, 'touch');\n    var touchHold = instance.props.touchHold;\n    return supportsTouch && isUsingTouch && touchHold && !isTouchEvent || isUsingTouch && !touchHold && isTouchEvent;\n  }\n  /**\n   * Runs the mount callback\n   */\n\n\n  function runMountCallback() {\n    if (!hasMountCallbackRun && currentMountCallback) {\n      hasMountCallbackRun = true;\n      reflow(popper);\n      currentMountCallback();\n    }\n  }\n  /**\n   * Creates the popper instance for the instance\n   */\n\n\n  function createPopperInstance() {\n    var popperOptions = instance.props.popperOptions;\n    var _instance$popperChild = instance.popperChildren,\n        tooltip = _instance$popperChild.tooltip,\n        arrow = _instance$popperChild.arrow;\n    var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow');\n\n    function applyMutations(data) {\n      if (instance.props.flip && !instance.props.flipOnUpdate) {\n        if (data.flipped) {\n          instance.popperInstance.options.placement = data.placement;\n        }\n\n        setFlipModifierEnabled(instance.popperInstance.modifiers, false);\n      } // Apply all of the popper's attributes to the tootip node as well.\n      // Allows users to avoid using the .tippy-popper selector for themes.\n\n\n      tooltip.setAttribute(PLACEMENT_ATTRIBUTE, data.placement);\n\n      if (data.attributes[OUT_OF_BOUNDARIES_ATTRIBUTE] !== false) {\n        tooltip.setAttribute(OUT_OF_BOUNDARIES_ATTRIBUTE, '');\n      } else {\n        tooltip.removeAttribute(OUT_OF_BOUNDARIES_ATTRIBUTE);\n      } // Prevents a transition when changing placements (while tippy is visible)\n      // for scroll/resize updates\n\n\n      if (previousPlacement && previousPlacement !== data.placement && wasVisibleDuringPreviousUpdate) {\n        tooltip.style.transition = 'none';\n        requestAnimationFrame(function () {\n          tooltip.style.transition = '';\n        });\n      }\n\n      previousPlacement = data.placement;\n      wasVisibleDuringPreviousUpdate = instance.state.isVisible;\n      var basicPlacement = getBasicPlacement(popper);\n      var styles = tooltip.style; // Account for the `distance` offset\n\n      styles.top = styles.bottom = styles.left = styles.right = '';\n      styles[basicPlacement] = getOffsetDistanceInPx(instance.props.distance);\n      var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PADDING;\n      var isPaddingNumber = typeof padding === 'number';\n\n      var computedPadding = _extends$2({\n        top: isPaddingNumber ? padding : padding.top,\n        bottom: isPaddingNumber ? padding : padding.bottom,\n        left: isPaddingNumber ? padding : padding.left,\n        right: isPaddingNumber ? padding : padding.right\n      }, !isPaddingNumber && padding);\n\n      computedPadding[basicPlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[basicPlacement] || 0) + instance.props.distance;\n      instance.popperInstance.modifiers.filter(function (m) {\n        return m.name === 'preventOverflow';\n      })[0].padding = computedPadding;\n      currentComputedPadding = computedPadding;\n    }\n\n    var config = _extends$2({\n      eventsEnabled: false,\n      placement: instance.props.placement\n    }, popperOptions, {\n      modifiers: _extends$2({}, popperOptions ? popperOptions.modifiers : {}, {\n        preventOverflow: _extends$2({\n          boundariesElement: instance.props.boundary,\n          padding: PADDING\n        }, preventOverflowModifier),\n        arrow: _extends$2({\n          element: arrow,\n          enabled: !!arrow\n        }, getModifier(popperOptions, 'arrow')),\n        flip: _extends$2({\n          enabled: instance.props.flip,\n          // The tooltip is offset by 10px from the popper in CSS,\n          // we need to account for its distance\n          padding: instance.props.distance + PADDING,\n          behavior: instance.props.flipBehavior\n        }, getModifier(popperOptions, 'flip')),\n        offset: _extends$2({\n          offset: instance.props.offset\n        }, getModifier(popperOptions, 'offset'))\n      }),\n      onCreate: function onCreate(data) {\n        applyMutations(data);\n        runMountCallback();\n\n        if (popperOptions && popperOptions.onCreate) {\n          popperOptions.onCreate(data);\n        }\n      },\n      onUpdate: function onUpdate(data) {\n        applyMutations(data);\n        runMountCallback();\n\n        if (popperOptions && popperOptions.onUpdate) {\n          popperOptions.onUpdate(data);\n        }\n      }\n    });\n\n    instance.popperInstance = new Popper(reference, popper, config);\n  }\n  /**\n   * Mounts the tooltip to the DOM\n   */\n\n\n  function mount() {\n    hasMountCallbackRun = false;\n    var isInLooseFollowCursorMode = getIsInLooseFollowCursorMode();\n\n    if (instance.popperInstance) {\n      setFlipModifierEnabled(instance.popperInstance.modifiers, instance.props.flip);\n\n      if (!isInLooseFollowCursorMode) {\n        instance.popperInstance.reference = reference;\n        instance.popperInstance.enableEventListeners();\n      }\n\n      instance.popperInstance.scheduleUpdate();\n    } else {\n      createPopperInstance();\n\n      if (!isInLooseFollowCursorMode) {\n        instance.popperInstance.enableEventListeners();\n      }\n    }\n\n    var appendTo = instance.props.appendTo;\n    var parentNode = appendTo === 'parent' ? reference.parentNode : invokeWithArgsOrReturn(appendTo, [reference]);\n\n    if (!parentNode.contains(popper)) {\n      parentNode.appendChild(popper);\n      instance.props.onMount(instance);\n      instance.state.isMounted = true;\n    }\n  }\n  /**\n   * Setup before show() is invoked (delays, etc.)\n   */\n\n\n  function scheduleShow(event, shouldAvoidCallingOnTrigger) {\n    clearDelayTimeouts();\n\n    if (instance.state.isVisible) {\n      return;\n    } // Is a delegate, create an instance for the child target\n\n\n    if (instance.props.target) {\n      return createDelegateChildTippy(event);\n    }\n\n    isScheduledToShow = true;\n\n    if (event && !shouldAvoidCallingOnTrigger) {\n      instance.props.onTrigger(instance, event);\n    }\n\n    if (instance.props.wait) {\n      return instance.props.wait(instance, event);\n    } // If the tooltip has a delay, we need to be listening to the mousemove as\n    // soon as the trigger event is fired, so that it's in the correct position\n    // upon mount.\n    // Edge case: if the tooltip is still mounted, but then scheduleShow() is\n    // called, it causes a jump.\n\n\n    if (getIsInLooseFollowCursorMode() && !instance.state.isMounted) {\n      if (!instance.popperInstance) {\n        createPopperInstance();\n      }\n\n      document.addEventListener('mousemove', positionVirtualReferenceNearCursor);\n    }\n\n    addDocumentClickListener();\n    var delay = getValue(instance.props.delay, 0, defaultProps.delay);\n\n    if (delay) {\n      showTimeoutId = setTimeout(function () {\n        show();\n      }, delay);\n    } else {\n      show();\n    }\n  }\n  /**\n   * Setup before hide() is invoked (delays, etc.)\n   */\n\n\n  function scheduleHide() {\n    clearDelayTimeouts();\n\n    if (!instance.state.isVisible) {\n      return removeFollowCursorListener();\n    }\n\n    isScheduledToShow = false;\n    var delay = getValue(instance.props.delay, 1, defaultProps.delay);\n\n    if (delay) {\n      hideTimeoutId = setTimeout(function () {\n        if (instance.state.isVisible) {\n          hide();\n        }\n      }, delay);\n    } else {\n      // Fixes a `transitionend` problem when it fires 1 frame too\n      // late sometimes, we don't want hide() to be called.\n      scheduleHideAnimationFrameId = requestAnimationFrame(function () {\n        hide();\n      });\n    }\n  }\n  /**\n   * Listener to handle clicks on the document to determine if the\n   * instance should hide\n   */\n\n\n  function onDocumentClick(event) {\n    // Clicked on interactive popper\n    if (instance.props.interactive && popper.contains(event.target)) {\n      return;\n    } // Clicked on the event listeners target\n\n\n    if (getEventListenersTarget().contains(event.target)) {\n      if (isUsingTouch) {\n        return;\n      }\n\n      if (instance.state.isVisible && includes(instance.props.trigger, 'click')) {\n        return;\n      }\n    }\n\n    if (instance.props.hideOnClick === true) {\n      clearDelayTimeouts();\n      hide();\n    }\n  }\n  /* ======================= 🔑 Public methods 🔑 ======================= */\n\n  /**\n   * Enables the instance to allow it to show or hide\n   */\n\n\n  function enable() {\n    instance.state.isEnabled = true;\n  }\n  /**\n   * Disables the instance to disallow it to show or hide\n   */\n\n\n  function disable() {\n    instance.state.isEnabled = false;\n  }\n  /**\n   * Clears pending timeouts related to the `delay` prop if any\n   */\n\n\n  function clearDelayTimeouts() {\n    clearTimeout(showTimeoutId);\n    clearTimeout(hideTimeoutId);\n    cancelAnimationFrame(scheduleHideAnimationFrameId);\n  }\n  /**\n   * Sets new props for the instance and redraws the tooltip\n   */\n\n\n  function set(options) {\n    // Backwards-compatible after TypeScript change\n    options = options || {};\n    validateOptions(options, defaultProps);\n    removeTriggersFromReference();\n    var prevProps = instance.props;\n    var nextProps = evaluateProps(reference, _extends$2({}, instance.props, options, {\n      ignoreAttributes: true\n    }));\n    nextProps.ignoreAttributes = hasOwnProperty$1(options, 'ignoreAttributes') ? options.ignoreAttributes || false : prevProps.ignoreAttributes;\n    instance.props = nextProps;\n    addTriggersToReference();\n    cleanupInteractiveMouseListeners();\n    debouncedOnMouseMove = debounce$1(onMouseMove, nextProps.interactiveDebounce);\n    updatePopperElement(popper, prevProps, nextProps);\n    instance.popperChildren = getChildren(popper);\n\n    if (instance.popperInstance) {\n      if (POPPER_INSTANCE_DEPENDENCIES.some(function (prop) {\n        return hasOwnProperty$1(options, prop) && options[prop] !== prevProps[prop];\n      })) {\n        instance.popperInstance.destroy();\n        createPopperInstance();\n\n        if (instance.state.isVisible) {\n          instance.popperInstance.enableEventListeners();\n        }\n\n        if (instance.props.followCursor && lastMouseMoveEvent) {\n          positionVirtualReferenceNearCursor(lastMouseMoveEvent);\n        }\n      } else {\n        instance.popperInstance.update();\n      }\n    }\n  }\n  /**\n   * Shortcut for .set({ content: newContent })\n   */\n\n\n  function setContent(content) {\n    set({\n      content: content\n    });\n  }\n  /**\n   * Shows the tooltip\n   */\n\n\n  function show() {\n    var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 0, defaultProps.duration[1]);\n\n    if (instance.state.isDestroyed || !instance.state.isEnabled || isUsingTouch && !instance.props.touch) {\n      return;\n    } // Standardize `disabled` behavior across browsers.\n    // Firefox allows events on disabled elements, but Chrome doesn't.\n    // Using a wrapper element (i.e. <span>) is recommended.\n\n\n    if (getEventListenersTarget().hasAttribute('disabled')) {\n      return;\n    }\n\n    if (instance.props.onShow(instance) === false) {\n      return;\n    }\n\n    addDocumentClickListener();\n    popper.style.visibility = 'visible';\n    instance.state.isVisible = true;\n\n    if (instance.props.interactive) {\n      getEventListenersTarget().classList.add(ACTIVE_CLASS);\n    } // Prevent a transition if the popper is at the opposite placement\n\n\n    var transitionableElements = getTransitionableElements();\n    setTransitionDuration(transitionableElements.concat(popper), 0);\n\n    currentMountCallback = function currentMountCallback() {\n      if (!instance.state.isVisible) {\n        return;\n      }\n\n      var isInLooseFollowCursorMode = getIsInLooseFollowCursorMode();\n\n      if (isInLooseFollowCursorMode && lastMouseMoveEvent) {\n        positionVirtualReferenceNearCursor(lastMouseMoveEvent);\n      } else if (!isInLooseFollowCursorMode) {\n        // Double update will apply correct mutations\n        instance.popperInstance.update();\n      }\n\n      if (instance.popperChildren.backdrop) {\n        instance.popperChildren.content.style.transitionDelay = Math.round(duration / 12) + 'ms';\n      }\n\n      if (instance.props.sticky) {\n        makeSticky();\n      }\n\n      setTransitionDuration([popper], instance.props.updateDuration);\n      setTransitionDuration(transitionableElements, duration);\n      setVisibilityState(transitionableElements, 'visible');\n      onTransitionedIn(duration, function () {\n        if (instance.props.aria) {\n          getEventListenersTarget().setAttribute(\"aria-\".concat(instance.props.aria), popper.id);\n        }\n\n        instance.props.onShown(instance);\n        instance.state.isShown = true;\n      });\n    };\n\n    mount();\n  }\n  /**\n   * Hides the tooltip\n   */\n\n\n  function hide() {\n    var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 1, defaultProps.duration[1]);\n\n    if (instance.state.isDestroyed || !instance.state.isEnabled && !isBeingDestroyed) {\n      return;\n    }\n\n    if (instance.props.onHide(instance) === false && !isBeingDestroyed) {\n      return;\n    }\n\n    removeDocumentClickListener();\n    popper.style.visibility = 'hidden';\n    instance.state.isVisible = false;\n    instance.state.isShown = false;\n    wasVisibleDuringPreviousUpdate = false;\n\n    if (instance.props.interactive) {\n      getEventListenersTarget().classList.remove(ACTIVE_CLASS);\n    }\n\n    var transitionableElements = getTransitionableElements();\n    setTransitionDuration(transitionableElements, duration);\n    setVisibilityState(transitionableElements, 'hidden');\n    onTransitionedOut(duration, function () {\n      if (!isScheduledToShow) {\n        removeFollowCursorListener();\n      }\n\n      if (instance.props.aria) {\n        getEventListenersTarget().removeAttribute(\"aria-\".concat(instance.props.aria));\n      }\n\n      instance.popperInstance.disableEventListeners();\n      instance.popperInstance.options.placement = instance.props.placement;\n      popper.parentNode.removeChild(popper);\n      instance.props.onHidden(instance);\n      instance.state.isMounted = false;\n    });\n  }\n  /**\n   * Destroys the tooltip\n   */\n\n\n  function destroy(destroyTargetInstances) {\n    if (instance.state.isDestroyed) {\n      return;\n    }\n\n    isBeingDestroyed = true; // If the popper is currently mounted to the DOM, we want to ensure it gets\n    // hidden and unmounted instantly upon destruction\n\n    if (instance.state.isMounted) {\n      hide(0);\n    }\n\n    removeTriggersFromReference();\n    delete reference._tippy;\n    var target = instance.props.target;\n\n    if (target && destroyTargetInstances && isRealElement(reference)) {\n      arrayFrom(reference.querySelectorAll(target)).forEach(function (child) {\n        if (child._tippy) {\n          child._tippy.destroy();\n        }\n      });\n    }\n\n    if (instance.popperInstance) {\n      instance.popperInstance.destroy();\n    }\n\n    isBeingDestroyed = false;\n    instance.state.isDestroyed = true;\n  }\n}\n\n/**\n * Groups an array of instances by taking control of their props during\n * certain lifecycles.\n */\nfunction group(instances) {\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      _ref$delay = _ref.delay,\n      delay = _ref$delay === void 0 ? instances[0].props.delay : _ref$delay,\n      _ref$duration = _ref.duration,\n      duration = _ref$duration === void 0 ? 0 : _ref$duration;\n\n  var isAnyTippyOpen = false;\n  instances.forEach(function (instance) {\n    if (instance._originalProps) {\n      instance.set(instance._originalProps);\n    } else {\n      instance._originalProps = _extends$2({}, instance.props);\n    }\n  });\n\n  function setIsAnyTippyOpen(value) {\n    isAnyTippyOpen = value;\n    updateInstances();\n  }\n\n  function onShow(instance) {\n    instance._originalProps.onShow(instance);\n\n    instances.forEach(function (instance) {\n      instance.set({\n        duration: duration\n      });\n\n      if (instance.state.isVisible) {\n        instance.hide();\n      }\n    });\n    setIsAnyTippyOpen(true);\n  }\n\n  function onHide(instance) {\n    instance._originalProps.onHide(instance);\n\n    setIsAnyTippyOpen(false);\n  }\n\n  function onShown(instance) {\n    instance._originalProps.onShown(instance);\n\n    instance.set({\n      duration: instance._originalProps.duration\n    });\n  }\n\n  function updateInstances() {\n    instances.forEach(function (instance) {\n      instance.set({\n        onShow: onShow,\n        onShown: onShown,\n        onHide: onHide,\n        delay: isAnyTippyOpen ? [0, Array.isArray(delay) ? delay[1] : delay] : delay,\n        duration: isAnyTippyOpen ? duration : instance._originalProps.duration\n      });\n    });\n  }\n\n  updateInstances();\n}\n\nvar globalEventListenersBound = false;\n/**\n * Exported module\n */\n\nfunction tippy(targets, options) {\n  validateOptions(options || {}, defaultProps);\n\n  if (!globalEventListenersBound) {\n    bindGlobalEventListeners();\n    globalEventListenersBound = true;\n  }\n\n  var props = _extends$2({}, defaultProps, options); // If they are specifying a virtual positioning reference, we need to polyfill\n  // some native DOM props\n\n\n  if (isBareVirtualElement(targets)) {\n    polyfillElementPrototypeProperties(targets);\n  }\n\n  var instances = getArrayOfElements(targets).reduce(function (acc, reference) {\n    var instance = reference && createTippy(reference, props);\n\n    if (instance) {\n      acc.push(instance);\n    }\n\n    return acc;\n  }, []);\n  return isSingular(targets) ? instances[0] : instances;\n}\n/**\n * Static props\n */\n\n\ntippy.version = version;\ntippy.defaults = defaultProps;\n/**\n * Static methods\n */\n\ntippy.setDefaults = function (partialDefaults) {\n  Object.keys(partialDefaults).forEach(function (key) {\n    // @ts-ignore\n    defaultProps[key] = partialDefaults[key];\n  });\n};\n\ntippy.hideAll = hideAll;\ntippy.group = group;\n/**\n * Auto-init tooltips for elements with a `data-tippy=\"...\"` attribute\n */\n\nfunction autoInit() {\n  arrayFrom(document.querySelectorAll('[data-tippy]')).forEach(function (el) {\n    var content = el.getAttribute('data-tippy');\n\n    if (content) {\n      tippy(el, {\n        content: content\n      });\n    }\n  });\n}\n\nif (isBrowser$1) {\n  setTimeout(autoInit);\n}\n\n/**\n * Injects a string of CSS styles to a style node in <head>\n */\n\nfunction injectCSS(css) {\n  if (isBrowser$1) {\n    var style = document.createElement('style');\n    style.type = 'text/css';\n    style.textContent = css;\n    style.setAttribute('data-tippy-stylesheet', '');\n    var head = document.head;\n    var firstChild = head.firstChild;\n\n    if (firstChild) {\n      head.insertBefore(style, firstChild);\n    } else {\n      head.appendChild(style);\n    }\n  }\n}\n\ninjectCSS(css);\n\nvar missingTippy = 'Using the attachment feature of Shepherd requires the Tippy.js library';\n\nvar addShepherdClass = {\n  enabled: true,\n  fn: function fn(data) {\n    data.instance.popper.classList.add('shepherd-popper');\n    return data;\n  }\n};\nvar centeredStylePopperModifier = {\n  computeStyle: {\n    enabled: true,\n    fn: function fn(data) {\n      data.styles = _extends({}, data.styles, {\n        left: '50%',\n        top: '50%',\n        transform: 'translate(-50%, -50%)'\n      });\n      return data;\n    }\n  },\n  addShepherdClass: addShepherdClass\n}; // Used to compose settings for tippyOptions.popperOptions (https://atomiks.github.io/tippyjs/#popper-options-option)\n\nvar defaultPopperOptions = {\n  positionFixed: true,\n  modifiers: {\n    addShepherdClass: addShepherdClass\n  }\n};\n/**\n * TODO rewrite the way items are being added to use more performant documentFragment code\n * @param html\n * @return {HTMLElement} The element created from the passed HTML string\n */\n\nfunction createFromHTML(html) {\n  var el = document.createElement('div');\n  el.innerHTML = html;\n  return el.children[0];\n}\n/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing.\n * @param {Function} func The function to invoke\n * @param {Number} wait The time to wait in ms\n * @param {Boolean} immediate If true, the function will be invoked immediately\n * @return {Function}\n */\n\nfunction debounce$2(func, wait, immediate) {\n  var timeout;\n  return function () {\n    var context = this;\n    var args = arguments;\n\n    var later = function later() {\n      timeout = null;\n\n      if (!immediate) {\n        func.apply(context, args);\n      }\n    };\n\n    var callNow = immediate && !timeout;\n    clearTimeout(timeout);\n    timeout = setTimeout(later, wait);\n\n    if (callNow) {\n      func.apply(context, args);\n    }\n  };\n}\n/**\n * Creates a slice of `arr` with n elements dropped from the beginning.\n * @param {Array} arr\n * @param {Number} n\n * @return {*}\n */\n\nfunction drop(arr) {\n  var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n\n  if (Array.isArray(arr)) {\n    return arr.slice(n);\n  }\n\n  return [];\n}\n/**\n * Parse the position object or string to return the attachment and element to attach to\n * @param {Object|String} position Either a string or object denoting the selector and position for attachment\n * @return {Object} The object with `element` and `on` for the step\n * @private\n */\n\nfunction _parseAttachToOpts(opts) {\n  if (lodash_isobjectlike(opts)) {\n    if (opts.hasOwnProperty('element') && opts.hasOwnProperty('on')) {\n      return opts;\n    }\n\n    return null;\n  }\n\n  var positionRe = /^(.+) ((auto|top|left|right|bottom)(-start|-end)?)$/;\n  var matches = positionRe.exec(opts);\n\n  if (!matches) {\n    return null;\n  }\n\n  return {\n    element: matches[1],\n    on: matches[2]\n  };\n}\n/**\n * @param obj\n * @param {Array} props\n * @return {*}\n */\n\nfunction parseShorthand(obj, props) {\n  if (obj === null || isUndefined(obj)) {\n    return obj;\n  } else if (lodash_isobjectlike(obj)) {\n    return obj;\n  }\n\n  var values = obj.split(' ');\n  return lodash_zipobject(props, values);\n}\n/**\n * Determines options for the tooltip and initializes\n * `this.tooltip` as a Tippy.js instance.\n */\n\nfunction setupTooltip() {\n  if (isUndefined(tippy)) {\n    throw new Error(missingTippy);\n  }\n\n  if (this.tooltip) {\n    this.tooltip.destroy();\n  }\n\n  var attachToOpts = this.parseAttachTo();\n  this.tooltip = _makeTippyInstance.call(this, attachToOpts);\n  this.target = attachToOpts.element || document.body;\n  this.el.classList.add('shepherd-element');\n}\n/**\n * Passes `options.attachTo` to `_parseAttachToOpts` to get the correct `attachTo` format\n * @returns {({} & {element, on}) | ({})}\n * `element` is a qualified HTML Element\n * `on` is a string position value\n */\n\nfunction parseAttachTo() {\n  var options = _parseAttachToOpts(this.options.attachTo) || {};\n\n  var returnOpts = _extends({}, options);\n\n  if (isString(options.element)) {\n    // Can't override the element in user opts reference because we can't\n    // guarantee that the element will exist in the future.\n    try {\n      returnOpts.element = document.querySelector(options.element);\n    } catch (e) {// TODO\n    }\n\n    if (!returnOpts.element) {\n      console.error(\"The element for this Shepherd step was not found \".concat(options.element));\n    }\n  }\n\n  return returnOpts;\n}\n/**\n * Generates a `Tippy` instance from a set of base `attachTo` options\n *\n * @return {tippy} The final tippy instance\n * @private\n */\n\nfunction _makeTippyInstance(attachToOptions) {\n  if (!attachToOptions.element) {\n    return _makeCenteredTippy.call(this);\n  }\n\n  var tippyOptions = _makeAttachedTippyOptions.call(this, attachToOptions);\n\n  return tippy(attachToOptions.element, tippyOptions);\n}\n/**\n * Generates the hash of options that will be passed to `Tippy` instances\n * target an element in the DOM.\n *\n * @param {Object} attachToOptions The local `attachTo` options\n * @return {Object} The final tippy options  object\n * @private\n */\n\n\nfunction _makeAttachedTippyOptions(attachToOptions) {\n  var resultingTippyOptions = {\n    content: this.el,\n    flipOnUpdate: true,\n    placement: attachToOptions.on || 'right'\n  };\n\n  _extends(resultingTippyOptions, this.options.tippyOptions);\n\n  if (this.options.title) {\n    var existingTheme = resultingTippyOptions.theme;\n    resultingTippyOptions.theme = existingTheme ? \"\".concat(existingTheme, \" shepherd-has-title\") : 'shepherd-has-title';\n  }\n\n  if (this.options.tippyOptions && this.options.tippyOptions.popperOptions) {\n    _extends(defaultPopperOptions, this.options.tippyOptions.popperOptions);\n  }\n\n  resultingTippyOptions.popperOptions = defaultPopperOptions;\n  return resultingTippyOptions;\n}\n/**\n * Generates a `Tippy` instance for a tooltip that doesn't have a\n * target element in the DOM -- and thus is positioned in the center\n * of the view\n *\n * @return {tippy} The final tippy instance\n * @private\n */\n\n\nfunction _makeCenteredTippy() {\n  var tippyOptions = _objectSpread({\n    content: this.el,\n    placement: 'top'\n  }, this.options.tippyOptions);\n\n  tippyOptions.arrow = false;\n  tippyOptions.popperOptions = tippyOptions.popperOptions || {};\n\n  var finalPopperOptions = _extends({}, defaultPopperOptions, tippyOptions.popperOptions, {\n    modifiers: _extends(centeredStylePopperModifier, tippyOptions.popperOptions.modifiers)\n  });\n\n  tippyOptions.popperOptions = finalPopperOptions;\n  return tippy(document.body, tippyOptions);\n}\n\nvar Evented =\n/*#__PURE__*/\nfunction () {\n  function Evented() {\n    _classCallCheck(this, Evented);\n  }\n\n  _createClass(Evented, [{\n    key: \"on\",\n    value: function on(event, handler, ctx) {\n      var once = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];\n\n      if (isUndefined(this.bindings)) {\n        this.bindings = {};\n      }\n\n      if (isUndefined(this.bindings[event])) {\n        this.bindings[event] = [];\n      }\n\n      this.bindings[event].push({\n        handler: handler,\n        ctx: ctx,\n        once: once\n      });\n    }\n  }, {\n    key: \"once\",\n    value: function once(event, handler, ctx) {\n      this.on(event, handler, ctx, true);\n    }\n  }, {\n    key: \"off\",\n    value: function off(event, handler) {\n      var _this = this;\n\n      if (isUndefined(this.bindings) || isUndefined(this.bindings[event])) {\n        return false;\n      }\n\n      if (isUndefined(handler)) {\n        delete this.bindings[event];\n      } else {\n        this.bindings[event].forEach(function (binding, index) {\n          if (binding.handler === handler) {\n            _this.bindings[event].splice(index, 1);\n          }\n        });\n      }\n    }\n  }, {\n    key: \"trigger\",\n    value: function trigger(event) {\n      var _this2 = this;\n\n      if (!isUndefined(this.bindings) && this.bindings[event]) {\n        var args = drop(Array.prototype.slice.call(arguments));\n        this.bindings[event].forEach(function (binding, index) {\n          var ctx = binding.ctx,\n              handler = binding.handler,\n              once = binding.once;\n          var context = ctx || _this2;\n          handler.apply(context, args);\n\n          if (once) {\n            _this2.bindings[event].splice(index, 1);\n          }\n        });\n      }\n    }\n  }]);\n\n  return Evented;\n}();\n\n/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto$1 = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$2 = objectProto$1.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto$1.toString;\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('<body>');\n * // => false\n */\nfunction isElement(value) {\n  return !!value && value.nodeType === 1 && isObjectLike$1(value) && !isPlainObject(value);\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike$1(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike$1(value) ||\n      objectToString.call(value) != objectTag || isHostObject(value)) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty$2.call(proto, 'constructor') && proto.constructor;\n  return (typeof Ctor == 'function' &&\n    Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n}\n\nvar lodash_iselement = isElement;\n\n/**\n * Sets up the handler to determine if we should advance the tour\n * @private\n */\n\nfunction _setupAdvanceOnHandler(selector) {\n  var _this = this;\n\n  return function (event) {\n    if (_this.isOpen()) {\n      var targetIsEl = _this.el && event.target === _this.el;\n      var targetIsSelector = !isUndefined(selector) && event.target.matches(selector);\n\n      if (targetIsSelector || targetIsEl) {\n        _this.tour.next();\n      }\n    }\n  };\n}\n/**\n * Bind the event handler for advanceOn\n */\n\n\nfunction bindAdvance() {\n  // An empty selector matches the step element\n  var _parseShorthand = parseShorthand(this.options.advanceOn, ['selector', 'event']),\n      event = _parseShorthand.event,\n      selector = _parseShorthand.selector;\n\n  var handler = _setupAdvanceOnHandler.call(this, selector); // TODO: this should also bind/unbind on show/hide\n\n\n  var el = document.querySelector(selector);\n\n  if (!isUndefined(selector) && el) {\n    el.addEventListener(event, handler);\n  } else {\n    document.body.addEventListener(event, handler, true);\n  }\n\n  this.on('destroy', function () {\n    return document.body.removeEventListener(event, handler, true);\n  });\n}\n/**\n * Bind events to the buttons for next, back, etc\n * @param {Object} cfg An object containing the config options for the button\n * @param {HTMLElement} el The element for the button\n */\n\nfunction bindButtonEvents(cfg, el) {\n  var _this2 = this;\n\n  cfg.events = cfg.events || {};\n\n  if (!isUndefined(cfg.action)) {\n    // Including both a click event and an action is not supported\n    cfg.events.click = cfg.action;\n  }\n\n  if (cfg.events) {\n    Object.entries(cfg.events).forEach(function (_ref) {\n      var _ref2 = _slicedToArray(_ref, 2),\n          event = _ref2[0],\n          handler = _ref2[1];\n\n      if (isString(handler)) {\n        var page = handler;\n\n        handler = function handler() {\n          return _this2.tour.show(page);\n        };\n      }\n\n      el.dataset.buttonEvent = true;\n      el.addEventListener(event, handler); // Cleanup event listeners on destroy\n\n      _this2.on('destroy', function () {\n        el.removeAttribute('data-button-event');\n        el.removeEventListener(event, handler);\n      });\n    });\n  }\n}\n/**\n * Add a click listener to the cancel link that cancels the tour\n * @param {HTMLElement} link The cancel link element\n */\n\nfunction bindCancelLink(link) {\n  var _this3 = this;\n\n  link.addEventListener('click', function (e) {\n    e.preventDefault();\n\n    _this3.cancel();\n  });\n}\n/**\n * Take an array of strings and look up methods by name, then bind them to `this`\n * @param {String[]} methods The names of methods to bind\n */\n\nfunction bindMethods(methods) {\n  var _this4 = this;\n\n  methods.map(function (method) {\n    _this4[method] = _this4[method].bind(_this4);\n  });\n}\n\nif (!Element.prototype.matches) {\n    Element.prototype.matches =\n        Element.prototype.matchesSelector ||\n        Element.prototype.msMatchesSelector ||\n        Element.prototype.webkitMatchesSelector;\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar smoothscroll = createCommonjsModule(function (module, exports) {\n/* smoothscroll v0.4.4 - 2019 - Dustan Kasten, Jeremias Menichelli - MIT License */\n(function () {\n\n  // polyfill\n  function polyfill() {\n    // aliases\n    var w = window;\n    var d = document;\n\n    // return if scroll behavior is supported and polyfill is not forced\n    if (\n      'scrollBehavior' in d.documentElement.style &&\n      w.__forceSmoothScrollPolyfill__ !== true\n    ) {\n      return;\n    }\n\n    // globals\n    var Element = w.HTMLElement || w.Element;\n    var SCROLL_TIME = 468;\n\n    // object gathering original scroll methods\n    var original = {\n      scroll: w.scroll || w.scrollTo,\n      scrollBy: w.scrollBy,\n      elementScroll: Element.prototype.scroll || scrollElement,\n      scrollIntoView: Element.prototype.scrollIntoView\n    };\n\n    // define timing method\n    var now =\n      w.performance && w.performance.now\n        ? w.performance.now.bind(w.performance)\n        : Date.now;\n\n    /**\n     * indicates if a the current browser is made by Microsoft\n     * @method isMicrosoftBrowser\n     * @param {String} userAgent\n     * @returns {Boolean}\n     */\n    function isMicrosoftBrowser(userAgent) {\n      var userAgentPatterns = ['MSIE ', 'Trident/', 'Edge/'];\n\n      return new RegExp(userAgentPatterns.join('|')).test(userAgent);\n    }\n\n    /*\n     * IE has rounding bug rounding down clientHeight and clientWidth and\n     * rounding up scrollHeight and scrollWidth causing false positives\n     * on hasScrollableSpace\n     */\n    var ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;\n\n    /**\n     * changes scroll position inside an element\n     * @method scrollElement\n     * @param {Number} x\n     * @param {Number} y\n     * @returns {undefined}\n     */\n    function scrollElement(x, y) {\n      this.scrollLeft = x;\n      this.scrollTop = y;\n    }\n\n    /**\n     * returns result of applying ease math function to a number\n     * @method ease\n     * @param {Number} k\n     * @returns {Number}\n     */\n    function ease(k) {\n      return 0.5 * (1 - Math.cos(Math.PI * k));\n    }\n\n    /**\n     * indicates if a smooth behavior should be applied\n     * @method shouldBailOut\n     * @param {Number|Object} firstArg\n     * @returns {Boolean}\n     */\n    function shouldBailOut(firstArg) {\n      if (\n        firstArg === null ||\n        typeof firstArg !== 'object' ||\n        firstArg.behavior === undefined ||\n        firstArg.behavior === 'auto' ||\n        firstArg.behavior === 'instant'\n      ) {\n        // first argument is not an object/null\n        // or behavior is auto, instant or undefined\n        return true;\n      }\n\n      if (typeof firstArg === 'object' && firstArg.behavior === 'smooth') {\n        // first argument is an object and behavior is smooth\n        return false;\n      }\n\n      // throw error when behavior is not supported\n      throw new TypeError(\n        'behavior member of ScrollOptions ' +\n          firstArg.behavior +\n          ' is not a valid value for enumeration ScrollBehavior.'\n      );\n    }\n\n    /**\n     * indicates if an element has scrollable space in the provided axis\n     * @method hasScrollableSpace\n     * @param {Node} el\n     * @param {String} axis\n     * @returns {Boolean}\n     */\n    function hasScrollableSpace(el, axis) {\n      if (axis === 'Y') {\n        return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;\n      }\n\n      if (axis === 'X') {\n        return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;\n      }\n    }\n\n    /**\n     * indicates if an element has a scrollable overflow property in the axis\n     * @method canOverflow\n     * @param {Node} el\n     * @param {String} axis\n     * @returns {Boolean}\n     */\n    function canOverflow(el, axis) {\n      var overflowValue = w.getComputedStyle(el, null)['overflow' + axis];\n\n      return overflowValue === 'auto' || overflowValue === 'scroll';\n    }\n\n    /**\n     * indicates if an element can be scrolled in either axis\n     * @method isScrollable\n     * @param {Node} el\n     * @param {String} axis\n     * @returns {Boolean}\n     */\n    function isScrollable(el) {\n      var isScrollableY = hasScrollableSpace(el, 'Y') && canOverflow(el, 'Y');\n      var isScrollableX = hasScrollableSpace(el, 'X') && canOverflow(el, 'X');\n\n      return isScrollableY || isScrollableX;\n    }\n\n    /**\n     * finds scrollable parent of an element\n     * @method findScrollableParent\n     * @param {Node} el\n     * @returns {Node} el\n     */\n    function findScrollableParent(el) {\n      while (el !== d.body && isScrollable(el) === false) {\n        el = el.parentNode || el.host;\n      }\n\n      return el;\n    }\n\n    /**\n     * self invoked function that, given a context, steps through scrolling\n     * @method step\n     * @param {Object} context\n     * @returns {undefined}\n     */\n    function step(context) {\n      var time = now();\n      var value;\n      var currentX;\n      var currentY;\n      var elapsed = (time - context.startTime) / SCROLL_TIME;\n\n      // avoid elapsed times higher than one\n      elapsed = elapsed > 1 ? 1 : elapsed;\n\n      // apply easing to elapsed time\n      value = ease(elapsed);\n\n      currentX = context.startX + (context.x - context.startX) * value;\n      currentY = context.startY + (context.y - context.startY) * value;\n\n      context.method.call(context.scrollable, currentX, currentY);\n\n      // scroll more if we have not reached our destination\n      if (currentX !== context.x || currentY !== context.y) {\n        w.requestAnimationFrame(step.bind(w, context));\n      }\n    }\n\n    /**\n     * scrolls window or element with a smooth behavior\n     * @method smoothScroll\n     * @param {Object|Node} el\n     * @param {Number} x\n     * @param {Number} y\n     * @returns {undefined}\n     */\n    function smoothScroll(el, x, y) {\n      var scrollable;\n      var startX;\n      var startY;\n      var method;\n      var startTime = now();\n\n      // define scroll context\n      if (el === d.body) {\n        scrollable = w;\n        startX = w.scrollX || w.pageXOffset;\n        startY = w.scrollY || w.pageYOffset;\n        method = original.scroll;\n      } else {\n        scrollable = el;\n        startX = el.scrollLeft;\n        startY = el.scrollTop;\n        method = scrollElement;\n      }\n\n      // scroll looping over a frame\n      step({\n        scrollable: scrollable,\n        method: method,\n        startTime: startTime,\n        startX: startX,\n        startY: startY,\n        x: x,\n        y: y\n      });\n    }\n\n    // ORIGINAL METHODS OVERRIDES\n    // w.scroll and w.scrollTo\n    w.scroll = w.scrollTo = function() {\n      // avoid action when no arguments are passed\n      if (arguments[0] === undefined) {\n        return;\n      }\n\n      // avoid smooth behavior if not required\n      if (shouldBailOut(arguments[0]) === true) {\n        original.scroll.call(\n          w,\n          arguments[0].left !== undefined\n            ? arguments[0].left\n            : typeof arguments[0] !== 'object'\n              ? arguments[0]\n              : w.scrollX || w.pageXOffset,\n          // use top prop, second argument if present or fallback to scrollY\n          arguments[0].top !== undefined\n            ? arguments[0].top\n            : arguments[1] !== undefined\n              ? arguments[1]\n              : w.scrollY || w.pageYOffset\n        );\n\n        return;\n      }\n\n      // LET THE SMOOTHNESS BEGIN!\n      smoothScroll.call(\n        w,\n        d.body,\n        arguments[0].left !== undefined\n          ? ~~arguments[0].left\n          : w.scrollX || w.pageXOffset,\n        arguments[0].top !== undefined\n          ? ~~arguments[0].top\n          : w.scrollY || w.pageYOffset\n      );\n    };\n\n    // w.scrollBy\n    w.scrollBy = function() {\n      // avoid action when no arguments are passed\n      if (arguments[0] === undefined) {\n        return;\n      }\n\n      // avoid smooth behavior if not required\n      if (shouldBailOut(arguments[0])) {\n        original.scrollBy.call(\n          w,\n          arguments[0].left !== undefined\n            ? arguments[0].left\n            : typeof arguments[0] !== 'object' ? arguments[0] : 0,\n          arguments[0].top !== undefined\n            ? arguments[0].top\n            : arguments[1] !== undefined ? arguments[1] : 0\n        );\n\n        return;\n      }\n\n      // LET THE SMOOTHNESS BEGIN!\n      smoothScroll.call(\n        w,\n        d.body,\n        ~~arguments[0].left + (w.scrollX || w.pageXOffset),\n        ~~arguments[0].top + (w.scrollY || w.pageYOffset)\n      );\n    };\n\n    // Element.prototype.scroll and Element.prototype.scrollTo\n    Element.prototype.scroll = Element.prototype.scrollTo = function() {\n      // avoid action when no arguments are passed\n      if (arguments[0] === undefined) {\n        return;\n      }\n\n      // avoid smooth behavior if not required\n      if (shouldBailOut(arguments[0]) === true) {\n        // if one number is passed, throw error to match Firefox implementation\n        if (typeof arguments[0] === 'number' && arguments[1] === undefined) {\n          throw new SyntaxError('Value could not be converted');\n        }\n\n        original.elementScroll.call(\n          this,\n          // use left prop, first number argument or fallback to scrollLeft\n          arguments[0].left !== undefined\n            ? ~~arguments[0].left\n            : typeof arguments[0] !== 'object' ? ~~arguments[0] : this.scrollLeft,\n          // use top prop, second argument or fallback to scrollTop\n          arguments[0].top !== undefined\n            ? ~~arguments[0].top\n            : arguments[1] !== undefined ? ~~arguments[1] : this.scrollTop\n        );\n\n        return;\n      }\n\n      var left = arguments[0].left;\n      var top = arguments[0].top;\n\n      // LET THE SMOOTHNESS BEGIN!\n      smoothScroll.call(\n        this,\n        this,\n        typeof left === 'undefined' ? this.scrollLeft : ~~left,\n        typeof top === 'undefined' ? this.scrollTop : ~~top\n      );\n    };\n\n    // Element.prototype.scrollBy\n    Element.prototype.scrollBy = function() {\n      // avoid action when no arguments are passed\n      if (arguments[0] === undefined) {\n        return;\n      }\n\n      // avoid smooth behavior if not required\n      if (shouldBailOut(arguments[0]) === true) {\n        original.elementScroll.call(\n          this,\n          arguments[0].left !== undefined\n            ? ~~arguments[0].left + this.scrollLeft\n            : ~~arguments[0] + this.scrollLeft,\n          arguments[0].top !== undefined\n            ? ~~arguments[0].top + this.scrollTop\n            : ~~arguments[1] + this.scrollTop\n        );\n\n        return;\n      }\n\n      this.scroll({\n        left: ~~arguments[0].left + this.scrollLeft,\n        top: ~~arguments[0].top + this.scrollTop,\n        behavior: arguments[0].behavior\n      });\n    };\n\n    // Element.prototype.scrollIntoView\n    Element.prototype.scrollIntoView = function() {\n      // avoid smooth behavior if not required\n      if (shouldBailOut(arguments[0]) === true) {\n        original.scrollIntoView.call(\n          this,\n          arguments[0] === undefined ? true : arguments[0]\n        );\n\n        return;\n      }\n\n      // LET THE SMOOTHNESS BEGIN!\n      var scrollableParent = findScrollableParent(this);\n      var parentRects = scrollableParent.getBoundingClientRect();\n      var clientRects = this.getBoundingClientRect();\n\n      if (scrollableParent !== d.body) {\n        // reveal element inside parent\n        smoothScroll.call(\n          this,\n          scrollableParent,\n          scrollableParent.scrollLeft + clientRects.left - parentRects.left,\n          scrollableParent.scrollTop + clientRects.top - parentRects.top\n        );\n\n        // reveal parent in viewport unless is fixed\n        if (w.getComputedStyle(scrollableParent).position !== 'fixed') {\n          w.scrollBy({\n            left: parentRects.left,\n            top: parentRects.top,\n            behavior: 'smooth'\n          });\n        }\n      } else {\n        // reveal element in viewport\n        w.scrollBy({\n          left: clientRects.left,\n          top: clientRects.top,\n          behavior: 'smooth'\n        });\n      }\n    };\n  }\n\n  {\n    // commonjs\n    module.exports = { polyfill: polyfill };\n  }\n\n}());\n});\nvar smoothscroll_1 = smoothscroll.polyfill;\n\nsmoothscroll.polyfill();\n/**\n * Creates incremented ID for each newly created step\n *\n * @private\n * @return {Number} The unique id for the step\n */\n\nvar uniqueId = function () {\n  var id = 0;\n  return function () {\n    return ++id;\n  };\n}();\n/**\n * A class representing steps to be added to a tour.\n * @extends {Evented}\n */\n\n\nvar Step =\n/*#__PURE__*/\nfunction (_Evented) {\n  _inherits(Step, _Evented);\n\n  /**\n   * Create a step\n   * @param {Tour} tour The tour for the step\n   * @param {Object} options The options for the step\n   * @param {Object|string} options.attachTo What element the step should be attached to on the page.\n   * It can either be a string of the form `[element] [on]` (where [element] is an element selector path):\n   * ```js\n   * const new Step(tour, {\n   *   attachTo: '.some .selector-path left',\n   *   ...moreOptions,\n   * })'\n   * ```\n   * Or an object with those properties:\n   * ```js\n   * const new Step(tour, {\n   *   attachTo: { element: '.some .selector-path', on: 'left' },\n   *   ...moreOptions\n   * })'\n   * ```\n   * If you use the object syntax, element can also be a DOM element. If you don’t specify an attachTo the\n   * element will appear in the middle of the screen.\n   * @param {HTMLElement|string} options.attachTo.element\n   * @param {string} options.attachTo.on\n   * @param {Object|string} options.advanceOn An action on the page which should advance shepherd to the next step.\n   * It can be of the form `\"selector event\"`:\n   * ```js\n   * const new Step(tour, {\n   *   advanceOn: '.some .selector-path click',\n   *   ...moreOptions\n   * })'\n   * ```\n   * ...or an object with those properties:\n   * ```js\n   * const new Step(tour, {\n   *   advanceOn: { selector: '.some .selector-path', event: 'click' },\n   *   ...moreOptions\n   * })'\n   * ```\n   * `event` doesn’t have to be an event inside the tour, it can be any event fired on any element on the page.\n   * You can also always manually advance the Tour by calling `myTour.next()`.\n   * @param {function} options.beforeShowPromise A function that returns a promise.\n   * When the promise resolves, the rest of the `show` code for the step will execute.\n   * @param {Object[]} options.buttons An array of buttons to add to the step. These will be rendered in a\n   * footer below the main body text.\n   * @param {function} options.buttons.button.action A function executed when the button is clicked on\n   * @param {string} options.buttons.button.classes Extra classes to apply to the `<a>`\n   * @param {Object} options.buttons.button.events A hash of events to bind onto the button, for example\n   * `{'mouseover': function(){}}`. Adding a `click` event to events when you already have an `action` specified is not supported.\n   * You can use events to skip steps or navigate to specific steps, with something like:\n   * ```js\n   * events: {\n   *   click: function() {\n   *     return Shepherd.activeTour.show('some_step_name');\n   *   }\n   * }\n   * ```\n   * @param {string} options.buttons.button.text The HTML text of the button\n   * @param {string} options.classes A string of extra classes to add to the step's content element.\n   * @param {string} options.highlightClass An extra class to apply to the `attachTo` element when it is\n   * highlighted (that is, when its step is active). You can then target that selector in your CSS.\n   * @param {Object} options.tippyOptions Extra [options to pass to tippy.js]{@link https://atomiks.github.io/tippyjs/#all-options}\n   * @param {boolean|Object} options.scrollTo Should the element be scrolled to when this step is shown? If true, uses the default `scrollIntoView`,\n   * if an object, passes that object as the params to `scrollIntoView` i.e. `{behavior: 'smooth', block: 'center'}`\n   * @param {function} options.scrollToHandler A function that lets you override the default scrollTo behavior and\n   * define a custom action to do the scrolling, and possibly other logic.\n   * @param {boolean} options.showCancelLink Should a cancel “✕” be shown in the header of the step?\n   * @param {function} options.showOn A function that, when it returns `true`, will show the step.\n   * If it returns false, the step will be skipped.\n   * @param {string} options.text The text in the body of the step. It can be one of four types:\n   * ```\n   * - HTML string\n   * - Array of HTML strings\n   * - `HTMLElement` object\n   * - `Function` to be executed when the step is built. It must return one of the three options above.\n   * ```\n   * @param {string} options.title The step's title. It becomes an `h3` at the top of the step.\n   * @param {Object} options.when You can define `show`, `hide`, etc events inside `when`. For example:\n   * ```js\n   * when: {\n   *   show: function() {\n   *     window.scrollTo(0, 0);\n   *   }\n   * }\n   * ```\n   * @param {Number} options.modalOverlayOpeningPadding An amount of padding to add around the modal overlay opening\n   * @return {Step} The newly created Step instance\n   */\n  function Step(tour, options) {\n    var _this;\n\n    _classCallCheck(this, Step);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Step).call(this, tour, options));\n    _this.tour = tour;\n    bindMethods.call(_assertThisInitialized(_this), ['_show', 'cancel', 'complete', 'destroy', 'hide', 'isOpen', 'scrollTo', 'setupElements', 'show']);\n\n    _this.setOptions(options);\n\n    _this.bindAdvance = bindAdvance.bind(_assertThisInitialized(_this));\n    _this.bindButtonEvents = bindButtonEvents.bind(_assertThisInitialized(_this));\n    _this.bindCancelLink = bindCancelLink.bind(_assertThisInitialized(_this));\n    _this.setupTooltip = setupTooltip.bind(_assertThisInitialized(_this));\n    _this.parseAttachTo = parseAttachTo.bind(_assertThisInitialized(_this));\n    return _possibleConstructorReturn(_this, _assertThisInitialized(_this));\n  }\n  /**\n   * Adds buttons to the step as passed into options\n   *\n   * @private\n   * @param {HTMLElement} content The element for the step, to append the footer with buttons to\n   */\n\n\n  _createClass(Step, [{\n    key: \"_addButtons\",\n    value: function _addButtons(content) {\n      var _this2 = this;\n\n      if (Array.isArray(this.options.buttons) && this.options.buttons.length) {\n        var footer = document.createElement('footer');\n        var buttons = createFromHTML('<ul class=\"shepherd-buttons\"></ul>');\n        footer.classList.add('shepherd-footer');\n        this.options.buttons.map(function (cfg) {\n          var button = createFromHTML(\"<li><a class=\\\"shepherd-button \".concat(cfg.classes || '', \"\\\" tabindex=\\\"0\\\">\").concat(cfg.text, \"</a>\"));\n          buttons.appendChild(button);\n\n          _this2.bindButtonEvents(cfg, button.querySelector('a'));\n        });\n        footer.appendChild(buttons);\n        content.appendChild(footer);\n      }\n    }\n    /**\n     * Adds the \"x\" button to cancel the tour\n     * @param {HTMLElement} element The step element\n     * @param {HTMLElement} header The header element for the step\n     * @private\n     */\n\n  }, {\n    key: \"_addCancelLink\",\n    value: function _addCancelLink(element, header) {\n      if (this.options.showCancelLink) {\n        var link = createFromHTML('<a href class=\"shepherd-cancel-link\"></a>');\n        header.appendChild(link);\n        element.classList.add('shepherd-has-cancel-link');\n        this.bindCancelLink(link);\n      }\n    }\n    /**\n     * Adds text passed in as options\n     *\n     * @private\n     * @param {HTMLElement} content The content to append the text to\n     */\n\n  }, {\n    key: \"_addContent\",\n    value: function _addContent(content) {\n      var text = createFromHTML('<div class=\"shepherd-text\"></div>');\n      var paragraphs = this.options.text;\n\n      if (isFunction(paragraphs)) {\n        paragraphs = paragraphs.call(this, text);\n      }\n\n      if (paragraphs instanceof HTMLElement) {\n        text.appendChild(paragraphs);\n      } else {\n        if (isString(paragraphs)) {\n          paragraphs = [paragraphs];\n        }\n\n        paragraphs.map(function (paragraph) {\n          text.innerHTML += \"<p>\".concat(paragraph, \"</p>\");\n        });\n      }\n\n      content.appendChild(text);\n    }\n    /**\n     * Creates Shepherd element for step based on options\n     *\n     * @private\n     * @return {HTMLElement} The DOM element for the step tooltip\n     */\n\n  }, {\n    key: \"_createTooltipContent\",\n    value: function _createTooltipContent() {\n      var content = document.createElement('div');\n      var classes = this.options.classes || '';\n      var element = createFromHTML(\"<div class=\\\"\".concat(classes, \"\\\" data-shepherd-step-id=\\\"\").concat(this.id, \"\\\">\"));\n      var header = document.createElement('header');\n\n      if (this.options.title) {\n        var title = document.createElement('h3');\n        title.classList.add('shepherd-title');\n        title.innerHTML = \"\".concat(this.options.title);\n        header.appendChild(title);\n        element.classList.add('shepherd-has-title');\n      }\n\n      content.classList.add('shepherd-content');\n      header.classList.add('shepherd-header');\n      element.appendChild(content);\n      content.appendChild(header);\n\n      if (!isUndefined(this.options.text)) {\n        this._addContent(content);\n      }\n\n      this._addButtons(content);\n\n      this._addCancelLink(element, header);\n\n      return element;\n    }\n    /**\n     * Returns the tour for the step\n     * @return {Tour} The tour instance\n     */\n\n  }, {\n    key: \"getTour\",\n    value: function getTour() {\n      return this.tour;\n    }\n    /**\n     * Cancel the tour\n     * Triggers the `cancel` event\n     */\n\n  }, {\n    key: \"cancel\",\n    value: function cancel() {\n      this.tour.cancel();\n      this.trigger('cancel');\n    }\n    /**\n     * Complete the tour\n     * Triggers the `complete` event\n     */\n\n  }, {\n    key: \"complete\",\n    value: function complete() {\n      this.tour.complete();\n      this.trigger('complete');\n    }\n    /**\n     * Remove the step, delete the step's element, and destroy the tippy instance for the step\n     * Triggers `destroy` event\n     */\n\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      if (this.tooltip) {\n        this.tooltip.destroy();\n        this.tooltip = null;\n      }\n\n      if (lodash_iselement(this.el) && this.el.parentNode) {\n        this.el.parentNode.removeChild(this.el);\n        this.el = null;\n      }\n\n      if (this.target) {\n        this._updateStepTargetOnHide();\n      }\n\n      this.trigger('destroy');\n    }\n    /**\n     * Hide the step and destroy the tippy instance\n     */\n\n  }, {\n    key: \"hide\",\n    value: function hide() {\n      this.tour.modal.hide();\n      this.trigger('before-hide');\n      document.body.removeAttribute('data-shepherd-step');\n\n      if (this.target) {\n        this._updateStepTargetOnHide();\n      }\n\n      if (this.tooltip) {\n        this.tooltip.hide();\n      }\n\n      this.trigger('hide');\n    }\n    /**\n     * Check if the step is open and visible\n     * @return {boolean} True if the step is open and visible\n     */\n\n  }, {\n    key: \"isOpen\",\n    value: function isOpen() {\n      return Boolean(this.tooltip && this.tooltip.state && this.tooltip.state.isVisible);\n    }\n    /**\n     * Create the element and set up the tippy instance\n     */\n\n  }, {\n    key: \"setupElements\",\n    value: function setupElements() {\n      if (!isUndefined(this.el)) {\n        this.destroy();\n      }\n\n      this.el = this._createTooltipContent();\n\n      if (this.options.advanceOn) {\n        this.bindAdvance();\n      }\n\n      this.setupTooltip();\n    }\n    /**\n     * If a custom scrollToHandler is defined, call that, otherwise do the generic\n     * scrollIntoView call.\n     *\n     * @param {boolean|Object} scrollToOptions If true, uses the default `scrollIntoView`,\n     * if an object, passes that object as the params to `scrollIntoView` i.e. `{ behavior: 'smooth', block: 'center' }`\n     */\n\n  }, {\n    key: \"scrollTo\",\n    value: function scrollTo(scrollToOptions) {\n      var _this$parseAttachTo = this.parseAttachTo(),\n          element = _this$parseAttachTo.element;\n\n      if (isFunction(this.options.scrollToHandler)) {\n        this.options.scrollToHandler(element);\n      } else if (lodash_iselement(element)) {\n        element.scrollIntoView(scrollToOptions);\n      }\n    }\n    /**\n     * Sets the options for the step, maps `when` to events, sets up buttons\n     * @param {Object} options The options for the step\n     */\n\n  }, {\n    key: \"setOptions\",\n    value: function setOptions() {\n      var _this3 = this;\n\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      this.options = options;\n      var when = this.options.when;\n      this.destroy();\n      this.id = this.options.id || \"step-\".concat(uniqueId());\n\n      if (when) {\n        Object.entries(when).forEach(function (_ref) {\n          var _ref2 = _slicedToArray(_ref, 2),\n              event = _ref2[0],\n              handler = _ref2[1];\n\n          _this3.on(event, handler, _this3);\n        });\n      }\n    }\n    /**\n     * Wraps `_show` and ensures `beforeShowPromise` resolves before calling show\n     * @return {*|Promise}\n     */\n\n  }, {\n    key: \"show\",\n    value: function show() {\n      var _this4 = this;\n\n      if (isFunction(this.options.beforeShowPromise)) {\n        var beforeShowPromise = this.options.beforeShowPromise();\n\n        if (!isUndefined(beforeShowPromise)) {\n          return beforeShowPromise.then(function () {\n            return _this4._show();\n          });\n        }\n      }\n\n      this._show();\n    }\n    /**\n     * Triggers `before-show`, generates the tooltip DOM content,\n     * sets up a tippy instance for the tooltip, then triggers `show`.\n     * @private\n     */\n\n  }, {\n    key: \"_show\",\n    value: function _show() {\n      var _this5 = this;\n\n      this.tour.beforeShowStep(this);\n      this.trigger('before-show');\n\n      if (!this.el) {\n        this.setupElements();\n      }\n\n      this.target.classList.add('shepherd-enabled', 'shepherd-target');\n      document.body.setAttribute('data-shepherd-step', this.id);\n\n      if (this.options.scrollTo) {\n        setTimeout(function () {\n          _this5.scrollTo(_this5.options.scrollTo);\n        });\n      }\n\n      this.tooltip.show();\n      this.trigger('show');\n    }\n    /**\n     * When a step is hidden, remove the highlightClass and 'shepherd-enabled'\n     * and 'shepherd-target' classes\n     * @private\n     */\n\n  }, {\n    key: \"_updateStepTargetOnHide\",\n    value: function _updateStepTargetOnHide() {\n      if (this.options.highlightClass) {\n        this.target.classList.remove(this.options.highlightClass);\n      }\n\n      this.target.classList.remove('shepherd-enabled', 'shepherd-target');\n    }\n  }]);\n\n  return Step;\n}(Evented);\n\nvar svgNS = 'http://www.w3.org/2000/svg';\nvar elementIds = {\n  modalOverlay: 'shepherdModalOverlayContainer',\n  modalOverlayMask: 'shepherdModalMask',\n  modalOverlayMaskRect: 'shepherdModalMaskRect',\n  modalOverlayMaskOpening: 'shepherdModalMaskOpening'\n};\nvar classNames = {\n  isVisible: 'shepherd-modal-is-visible',\n  modalTarget: 'shepherd-modal-target'\n};\n/**\n * <svg id=\"shepherdModalOverlayContainer\" xmlns=\"http://www.w3.org/2000/svg\">\n */\n\nfunction _createModalContainer() {\n  var element = document.createElementNS(svgNS, 'svg');\n  element.setAttributeNS(null, 'id', elementIds.modalOverlay);\n  return element;\n}\n/**\n * <mask id=\"shepherdModalMask\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\">\n */\n\n\nfunction _createMaskContainer() {\n  var element = document.createElementNS(svgNS, 'mask');\n\n  _setAttributes(element, {\n    height: '100%',\n    id: elementIds.modalOverlayMask,\n    width: '100%',\n    x: '0',\n    y: '0'\n  });\n\n  return element;\n}\n/**\n *  <rect id=\"modalOverlayMaskRect\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"#FFFFFF\"/>\n */\n\n\nfunction _createMaskRect() {\n  var element = document.createElementNS(svgNS, 'rect');\n\n  _setAttributes(element, {\n    fill: '#FFFFFF',\n    height: '100%',\n    id: elementIds.modalOverlayMaskRect,\n    width: '100%',\n    x: '0',\n    y: '0'\n  });\n\n  return element;\n}\n/**\n * <rect id=\"shepherdModalMaskOpening\" fill=\"#000000\"/>\n */\n\n\nfunction _createMaskOpening() {\n  var element = document.createElementNS(svgNS, 'rect');\n\n  _setAttributes(element, {\n    fill: '#000000',\n    id: elementIds.modalOverlayMaskOpening\n  });\n\n  return element;\n}\n/**\n * <rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" mask=\"url(#shepherdModalMask)\"/>\n */\n\n\nfunction _createMaskConsumer() {\n  var element = document.createElementNS(svgNS, 'rect');\n\n  _setAttributes(element, {\n    height: '100%',\n    width: '100%',\n    x: '0',\n    y: '0'\n  });\n\n  element.setAttribute('mask', \"url(#\".concat(elementIds.modalOverlayMask, \")\"));\n  return element;\n}\n/**\n * Generates an SVG with the following structure:\n * ```html\n *  <svg id=\"shepherdModalOverlayContainer\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <mask id=\"shepherdModalMask\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" >\n <rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"#FFFFFF\"/>\n <!-- This element will \"punch a hole\" through the mask by preventing it from rendering within the perimeter -->\n <rect id=\"shepherdModalMaskOpening\"/>\n </mask>\n </defs>\n <rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" mask=\"url(#shepherdModalMask)\"/>\n </svg>\n * ```\n */\n\n\nfunction createModalOverlay() {\n  var containerElement = _createModalContainer();\n\n  var defsElement = document.createElementNS(svgNS, 'defs');\n\n  var maskContainer = _createMaskContainer();\n\n  var maskRect = _createMaskRect();\n\n  var maskOpening = _createMaskOpening();\n\n  var maskConsumer = _createMaskConsumer();\n\n  maskContainer.appendChild(maskRect);\n  maskContainer.appendChild(maskOpening);\n  defsElement.appendChild(maskContainer);\n  containerElement.appendChild(defsElement);\n  containerElement.appendChild(maskConsumer);\n  return containerElement;\n}\n/**\n * Uses the bounds of the element we want the opening overtop of to set the dimensions of the opening and position it\n * @param {HTMLElement} targetElement The element the opening will expose\n * @param {SVGElement} openingElement The svg mask for the opening\n * @param {Number} modalOverlayOpeningPadding An amount of padding to add around the modal overlay opening\n */\n\n\nfunction positionModalOpening(targetElement, openingElement) {\n  var modalOverlayOpeningPadding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n  if (targetElement.getBoundingClientRect && openingElement instanceof SVGElement) {\n    var _targetElement$getBou = targetElement.getBoundingClientRect(),\n        x = _targetElement$getBou.x,\n        y = _targetElement$getBou.y,\n        width = _targetElement$getBou.width,\n        height = _targetElement$getBou.height,\n        left = _targetElement$getBou.left,\n        top = _targetElement$getBou.top; // getBoundingClientRect is not consistent. Some browsers use x and y, while others use left and top\n\n\n    _setAttributes(openingElement, {\n      x: (x || left) - modalOverlayOpeningPadding,\n      y: (y || top) - modalOverlayOpeningPadding,\n      width: width + modalOverlayOpeningPadding * 2,\n      height: height + modalOverlayOpeningPadding * 2\n    });\n  }\n}\n\nfunction closeModalOpening(openingElement) {\n  if (openingElement && openingElement instanceof SVGElement) {\n    _setAttributes(openingElement, {\n      height: '0',\n      x: '0',\n      y: '0',\n      width: '0'\n    });\n  }\n}\n\nfunction getModalMaskOpening(modalElement) {\n  return modalElement.querySelector(\"#\".concat(elementIds.modalOverlayMaskOpening));\n}\n\nfunction preventModalBodyTouch(event) {\n  event.preventDefault();\n}\n\nfunction preventModalOverlayTouch(event) {\n  event.stopPropagation();\n}\n/**\n * Remove any leftover modal target classes and add the modal target class to the currentElement\n * @param {HTMLElement} currentElement The element for the current step\n */\n\n\nfunction toggleShepherdModalClass(currentElement) {\n  var shepherdModal = document.querySelector(\"\".concat(classNames.modalTarget));\n\n  if (shepherdModal) {\n    shepherdModal.classList.remove(classNames.modalTarget);\n  }\n\n  currentElement.classList.add(classNames.modalTarget);\n}\n/**\n * Set multiple attributes on an element, via a hash\n * @param {HTMLElement|SVGElement} el The element to set the attributes on\n * @param {Object} attrs A hash of key value pairs for attributes to set\n * @private\n */\n\n\nfunction _setAttributes(el, attrs) {\n  Object.keys(attrs).forEach(function (key) {\n    el.setAttribute(key, attrs[key]);\n  });\n}\n\n/**\n * Get the element from an option object\n *\n * @method getElementFromObject\n * @param Object attachTo\n * @returns {Element}\n * @private\n */\n\n\nfunction getElementFromObject(attachTo) {\n  var op = attachTo.element;\n\n  if (op instanceof HTMLElement) {\n    return op;\n  }\n\n  return document.querySelector(op);\n}\n/**\n * Return the element for a step\n *\n * @method getElementForStep\n * @param step step the step to get an element for\n * @returns {Element} the element for this step\n * @private\n */\n\n\nfunction getElementForStep(step) {\n  var attachTo = step.options.attachTo;\n\n  if (!attachTo) {\n    return null;\n  }\n\n  var type = _typeof(attachTo);\n\n  var element;\n\n  if (type === 'string') {\n    element = getElementFromString(attachTo);\n  } else if (type === 'object') {\n    element = getElementFromObject(attachTo);\n  } else {\n    /* istanbul ignore next: cannot test undefined attachTo, but it does work! */\n    element = null;\n  }\n\n  return element;\n}\n/**\n * Get the element from an option string\n *\n * @method getElementFromString\n * @param element the string in the step configuration\n * @returns {Element} the element from the string\n * @private\n */\n\n\nfunction getElementFromString(element) {\n  var _element$split = element.split(' '),\n      _element$split2 = _slicedToArray(_element$split, 1),\n      selector = _element$split2[0];\n\n  return document.querySelector(selector);\n}\n\nfunction addStepEventListeners() {\n  if (typeof this._onScreenChange === 'function') {\n    window.removeEventListener('resize', this._onScreenChange, false);\n    window.removeEventListener('scroll', this._onScreenChange, true);\n  }\n\n  window.addEventListener('resize', this._onScreenChange, false);\n  window.addEventListener('scroll', this._onScreenChange, true);\n  var overlay = document.querySelector(\"#\".concat(elementIds.modalOverlay)); // Prevents window from moving on touch.\n\n  window.addEventListener('touchmove', preventModalBodyTouch, {\n    passive: false\n  }); // Allows content to move on touch.\n\n  if (overlay) {\n    overlay.addEventListener('touchmove', preventModalOverlayTouch, false);\n  }\n}\n\n/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number} Returns the timer id.\n */\nfunction baseDelay(func, wait, args) {\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  return setTimeout(function() { func.apply(undefined, args); }, wait);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = array;\n    return apply(func, this, otherArgs);\n  };\n}\n\n/**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n *   console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one or more milliseconds.\n */\nvar defer = baseRest(function(func, args) {\n  return baseDelay(func, 1, args);\n});\n\nvar lodash_defer = defer;\n\nvar Modal =\n/*#__PURE__*/\nfunction () {\n  function Modal(options) {\n    _classCallCheck(this, Modal);\n\n    this.createModalOverlay();\n    this.options = options;\n    return this;\n  }\n  /**\n   * Removes svg mask from modal overlay and removes classes for modal being visible\n   */\n\n\n  _createClass(Modal, [{\n    key: \"cleanup\",\n    value: function cleanup() {\n      var _this = this;\n\n      lodash_defer(function () {\n        var element = _this._modalOverlayElem;\n\n        if (element && element instanceof SVGElement) {\n          element.parentNode.removeChild(element);\n        }\n\n        _this._modalOverlayElem = null;\n        document.body.classList.remove(classNames.isVisible);\n      });\n    }\n    /**\n     * Create the modal overlay, if it does not already exist\n     */\n\n  }, {\n    key: \"createModalOverlay\",\n    value: function createModalOverlay$1() {\n      if (!this._modalOverlayElem) {\n        this._modalOverlayElem = createModalOverlay();\n        this._modalOverlayOpening = getModalMaskOpening(this._modalOverlayElem); // don't show yet -- each step will control that\n\n        this.hide();\n        document.body.appendChild(this._modalOverlayElem);\n      }\n    }\n    /**\n     * Hide the modal overlay\n     */\n\n  }, {\n    key: \"hide\",\n    value: function hide() {\n      document.body.classList.remove(classNames.isVisible);\n\n      if (this._modalOverlayElem) {\n        this._modalOverlayElem.style.display = 'none';\n      }\n    }\n    /**\n     * If modal is enabled, setup the svg mask opening and modal overlay for the step\n     * @param step\n     */\n\n  }, {\n    key: \"setupForStep\",\n    value: function setupForStep(step) {\n      if (this.options.useModalOverlay) {\n        this._styleForStep(step);\n\n        this.show();\n      } else {\n        this.hide();\n      }\n    }\n    /**\n     * Show the modal overlay\n     */\n\n  }, {\n    key: \"show\",\n    value: function show() {\n      document.body.classList.add(classNames.isVisible);\n\n      if (this._modalOverlayElem) {\n        this._modalOverlayElem.style.display = 'block';\n      }\n    }\n    /**\n     * Style the modal for the step\n     * @param {Step} step The step to style the opening for\n     * @private\n     */\n\n  }, {\n    key: \"_styleForStep\",\n    value: function _styleForStep(step) {\n      var modalOverlayOpening = this._modalOverlayOpening;\n      var targetElement = getElementForStep(step);\n      var modalOverlayOpeningPadding = step.options.modalOverlayOpeningPadding;\n\n      if (targetElement) {\n        positionModalOpening(targetElement, modalOverlayOpening, modalOverlayOpeningPadding);\n        this._onScreenChange = debounce$2(positionModalOpening.bind(this, targetElement, modalOverlayOpening, modalOverlayOpeningPadding), 0);\n        addStepEventListeners.call(this);\n      } else {\n        closeModalOpening(this._modalOverlayOpening);\n      }\n    }\n  }]);\n\n  return Modal;\n}();\n\nvar defaults = {\n  trigger: 'manual',\n  arrow: true,\n  animation: 'fade',\n  duration: 420,\n  flip: true,\n  animateFill: false,\n  // https://atomiks.github.io/tippyjs/#animate-fill-option\n  interactive: true,\n  // https://atomiks.github.io/tippyjs/#interactive-option\n  hideOnClick: 'toggle',\n  // https://atomiks.github.io/tippyjs/#hide-on-click-option\n  multiple: true // https://atomiks.github.io/tippyjs/#multiple-option\n\n};\n\n/**\n * Cleanup the steps and set pointerEvents back to 'auto'\n * @param tour The tour object\n */\n\nfunction cleanupSteps(tour) {\n  if (tour) {\n    var steps = tour.steps;\n    steps.forEach(function (step) {\n      if (step.options && step.options.canClickTarget === false && step.options.attachTo) {\n        var stepElement = getElementForStep(step);\n\n        if (stepElement instanceof HTMLElement) {\n          stepElement.style.pointerEvents = 'auto';\n        }\n      }\n    });\n  }\n}\n/**\n * Remove resize and scroll event listeners\n */\n\nfunction cleanupStepEventListeners() {\n  if (typeof this._onScreenChange === 'function') {\n    window.removeEventListener('resize', this._onScreenChange, false);\n    window.removeEventListener('scroll', this._onScreenChange, false);\n    this._onScreenChange = null;\n  }\n\n  window.removeEventListener('touchmove', preventModalBodyTouch, {\n    passive: false\n  });\n}\n\n/**\n * Creates incremented ID for each newly created tour\n *\n * @private\n * @return {Number} The unique id for the tour\n */\n\nvar uniqueId$1 = function () {\n  var id = 0;\n  return function () {\n    return ++id;\n  };\n}();\n\nvar Shepherd = new Evented();\n/**\n * Class representing the site tour\n * @extends {Evented}\n */\n\nvar Tour =\n/*#__PURE__*/\nfunction (_Evented) {\n  _inherits(Tour, _Evented);\n\n  /**\n   * @param {Object} options The options for the tour\n   * @param {Object} options.defaultStepOptions Default options for Steps ({@link Step#constructor}), created through `addStep`\n   * @param {Step[]} options.steps An array of Step instances to initialize the tour with\n   * @param {string} options.tourName An optional \"name\" for the tour. This will be appended to the the tour's\n   * dynamically generated `id` property -- which is also set on the `body` element as the `data-shepherd-active-tour` attribute\n   * whenever the tour becomes active.\n   * @param {boolean} options.useModalOverlay Whether or not steps should be placed above a darkened\n   * modal overlay. If true, the overlay will create an opening around the target element so that it\n   * can remain interactive\n   * @returns {Tour}\n   */\n  function Tour() {\n    var _this;\n\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    _classCallCheck(this, Tour);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Tour).call(this, options));\n    bindMethods.call(_assertThisInitialized(_this), ['back', 'cancel', 'complete', 'hide', 'next']);\n    _this.options = options;\n    _this.steps = _this.options.steps || []; // Pass these events onto the global Shepherd object\n\n    var events = ['active', 'cancel', 'complete', 'inactive', 'show', 'start'];\n    events.map(function (event) {\n      (function (e) {\n        _this.on(e, function (opts) {\n          opts = opts || {};\n          opts.tour = _assertThisInitialized(_this);\n          Shepherd.trigger(e, opts);\n        });\n      })(event);\n    });\n    _this.modal = new Modal(options);\n\n    _this._setTooltipDefaults();\n\n    _this._setTourID();\n\n    return _possibleConstructorReturn(_this, _assertThisInitialized(_this));\n  }\n  /**\n   * Adds a new step to the tour\n   * @param {Object|Number|Step|String} arg1\n   * When arg2 is defined, arg1 can either be a string or number, to use for the `id` for the step\n   * When arg2 is undefined, arg1 is either an object containing step options or a Step instance\n   * @param {Object|Step} arg2 An object containing step options or a Step instance\n   * @return {Step} The newly added step\n   */\n\n\n  _createClass(Tour, [{\n    key: \"addStep\",\n    value: function addStep(arg1, arg2) {\n      var name, step; // If we just have one argument, we can assume it is an object of step options, with an id\n\n      if (isUndefined(arg2)) {\n        step = arg1;\n      } else {\n        name = arg1;\n        step = arg2;\n      }\n\n      if (!(step instanceof Step)) {\n        step = this.setupStep(step, name);\n      } else {\n        step.tour = this;\n      }\n\n      this.steps.push(step);\n      return step;\n    }\n    /**\n     * Go to the previous step in the tour\n     */\n\n  }, {\n    key: \"back\",\n    value: function back() {\n      var index = this.steps.indexOf(this.currentStep);\n      this.show(index - 1, false);\n    }\n    /**\n     * Calls done() triggering the 'cancel' event\n     * If `confirmCancel` is true, will show a window.confirm before cancelling\n     */\n\n  }, {\n    key: \"cancel\",\n    value: function cancel() {\n      if (this.options.confirmCancel) {\n        var cancelMessage = this.options.confirmCancelMessage || 'Are you sure you want to stop the tour?';\n        var stopTour = window.confirm(cancelMessage);\n\n        if (stopTour) {\n          this.done('cancel');\n        }\n      } else {\n        this.done('cancel');\n      }\n    }\n    /**\n     * Calls done() triggering the `complete` event\n     */\n\n  }, {\n    key: \"complete\",\n    value: function complete() {\n      this.done('complete');\n    }\n    /**\n     * Called whenever the tour is cancelled or completed, basically anytime we exit the tour\n     * @param {String} event The event name to trigger\n     */\n\n  }, {\n    key: \"done\",\n    value: function done(event) {\n      if (Array.isArray(this.steps)) {\n        this.steps.forEach(function (step) {\n          return step.destroy();\n        });\n      }\n\n      cleanupStepEventListeners.call(this);\n      cleanupSteps(this.tourObject);\n      this.modal.cleanup();\n      this.trigger(event);\n      Shepherd.activeTour = null;\n\n      this._removeBodyAttrs();\n\n      this.trigger('inactive', {\n        tour: this\n      });\n    }\n    /**\n     * Gets the step from a given id\n     * @param {Number|String} id The id of the step to retrieve\n     * @return {Step} The step corresponding to the `id`\n     */\n\n  }, {\n    key: \"getById\",\n    value: function getById(id) {\n      return this.steps.find(function (step) {\n        return step.id === id;\n      });\n    }\n    /**\n     * Gets the current step\n     * @returns {Step|null}\n     */\n\n  }, {\n    key: \"getCurrentStep\",\n    value: function getCurrentStep() {\n      return this.currentStep;\n    }\n    /**\n     * Hide the current step\n     */\n\n  }, {\n    key: \"hide\",\n    value: function hide() {\n      var currentStep = this.getCurrentStep();\n\n      if (currentStep) {\n        return currentStep.hide();\n      }\n    }\n    /**\n     * Check if the tour is active\n     * @return {boolean}\n     */\n\n  }, {\n    key: \"isActive\",\n    value: function isActive() {\n      return Shepherd.activeTour === this;\n    }\n    /**\n     * Go to the next step in the tour\n     * If we are at the end, call `complete`\n     */\n\n  }, {\n    key: \"next\",\n    value: function next() {\n      var index = this.steps.indexOf(this.currentStep);\n\n      if (index === this.steps.length - 1) {\n        this.complete();\n      } else {\n        this.show(index + 1, true);\n      }\n    }\n    /**\n     * Removes the step from the tour\n     * @param {String} name The id for the step to remove\n     */\n\n  }, {\n    key: \"removeStep\",\n    value: function removeStep(name) {\n      var _this2 = this;\n\n      var current = this.getCurrentStep(); // Find the step, destroy it and remove it from this.steps\n\n      this.steps.some(function (step, i) {\n        if (step.id === name) {\n          if (step.isOpen()) {\n            step.hide();\n          }\n\n          step.destroy();\n\n          _this2.steps.splice(i, 1);\n\n          return true;\n        }\n      });\n\n      if (current && current.id === name) {\n        this.currentStep = undefined; // If we have steps left, show the first one, otherwise just cancel the tour\n\n        this.steps.length ? this.show(0) : this.cancel();\n      }\n    }\n    /**\n     * Setup a new step object\n     * @param {Object} stepOptions The object describing the options for the step\n     * @param {String|Number} name The string or number to use as the `id` for the step\n     * @return {Step} The step instance\n     */\n\n  }, {\n    key: \"setupStep\",\n    value: function setupStep(stepOptions, name) {\n      if (isString(name) || isNumber(name)) {\n        stepOptions.id = name.toString();\n      }\n\n      stepOptions = _extends({}, this.options.defaultStepOptions, stepOptions);\n      return new Step(this, stepOptions);\n    }\n  }, {\n    key: \"beforeShowStep\",\n    value: function beforeShowStep(step) {\n      this.modal.setupForStep(step);\n\n      this._styleTargetElementForStep(step);\n    }\n    /**\n     * Show a specific step in the tour\n     * @param {Number|String} key The key to look up the step by\n     * @param {Boolean} forward True if we are going forward, false if backward\n     */\n\n  }, {\n    key: \"show\",\n    value: function show() {\n      var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n      var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var step = isString(key) ? this.getById(key) : this.steps[key];\n\n      if (step) {\n        this._updateStateBeforeShow();\n\n        var shouldSkipStep = isFunction(step.options.showOn) && !step.options.showOn(); // If `showOn` returns false, we want to skip the step, otherwise, show the step like normal\n\n        if (shouldSkipStep) {\n          this._skipStep(step, forward);\n        } else {\n          this.trigger('show', {\n            step: step,\n            previous: this.currentStep\n          });\n          this.currentStep = step;\n          step.show();\n        }\n      }\n    }\n    /**\n     * Start the tour\n     */\n\n  }, {\n    key: \"start\",\n    value: function start() {\n      this.trigger('start');\n      this.currentStep = null;\n\n      this._setupActiveTour();\n\n      this.next();\n    }\n    /**\n     * Make this tour \"active\"\n     * @private\n     */\n\n  }, {\n    key: \"_setupActiveTour\",\n    value: function _setupActiveTour() {\n      this.modal.createModalOverlay();\n\n      this._addBodyAttrs();\n\n      this.trigger('active', {\n        tour: this\n      });\n      Shepherd.activeTour = this;\n    }\n    /**\n     * Modulates the styles of the passed step's target element, based on the step's options and\n     * the tour's `modal` option, to visually emphasize the element\n     *\n     * @param step The step object that attaches to the element\n     * @private\n     */\n\n  }, {\n    key: \"_styleTargetElementForStep\",\n    value: function _styleTargetElementForStep(step) {\n      var targetElement = getElementForStep(step);\n\n      if (!targetElement) {\n        return;\n      }\n\n      toggleShepherdModalClass(targetElement);\n\n      if (step.options.highlightClass) {\n        targetElement.classList.add(step.options.highlightClass);\n      }\n\n      if (step.options.canClickTarget === false) {\n        targetElement.style.pointerEvents = 'none';\n      }\n    }\n    /**\n     * Called when `showOn` evaluates to false, to skip the step\n     * @param {Step} step The step to skip\n     * @param {Boolean} forward True if we are going forward, false if backward\n     * @private\n     */\n\n  }, {\n    key: \"_skipStep\",\n    value: function _skipStep(step, forward) {\n      var index = this.steps.indexOf(step);\n      var nextIndex = forward ? index + 1 : index - 1;\n      this.show(nextIndex, forward);\n    }\n    /**\n     * Set the tippy defaults\n     * @private\n     */\n\n  }, {\n    key: \"_setTooltipDefaults\",\n    value: function _setTooltipDefaults() {\n      tippy.setDefaults(defaults);\n    }\n    /**\n     * Before showing, hide the current step and if the tour is not\n     * already active, call `this._setupActiveTour`.\n     * @private\n     */\n\n  }, {\n    key: \"_updateStateBeforeShow\",\n    value: function _updateStateBeforeShow() {\n      if (this.currentStep) {\n        this.currentStep.hide();\n      }\n\n      if (!this.isActive()) {\n        this._setupActiveTour();\n      }\n    }\n    /**\n     * Sets this.id to `${tourName}--${uuid}`\n     * @private\n     */\n\n  }, {\n    key: \"_setTourID\",\n    value: function _setTourID() {\n      var tourName = this.options.tourName || 'tour';\n      var uuid = uniqueId$1();\n      this.id = \"\".concat(tourName, \"--\").concat(uuid);\n    }\n    /**\n     * Adds the data-shepherd-active-tour attribute and the 'shepherd-active'\n     * class to the body.\n     * @private\n     */\n\n  }, {\n    key: \"_addBodyAttrs\",\n    value: function _addBodyAttrs() {\n      document.body.setAttribute('data-shepherd-active-tour', this.id);\n      document.body.classList.add('shepherd-active');\n    }\n    /**\n     * Removes the data-shepherd-active-tour attribute and the 'shepherd-active'\n     * class from the body.\n     * @private\n     */\n\n  }, {\n    key: \"_removeBodyAttrs\",\n    value: function _removeBodyAttrs() {\n      document.body.removeAttribute('data-shepherd-active-tour');\n      document.body.classList.remove('shepherd-active');\n    }\n  }]);\n\n  return Tour;\n}(Evented);\n\n_extends(Shepherd, {\n  Tour: Tour,\n  Step: Step,\n  Evented: Evented\n});\n\nexport default Shepherd;\n//# sourceMappingURL=shepherd.esm.js.map\n","// https://shipshapecode.github.io/shepherd/esdoc/\n\n// TODO: edge cases:\n// - element is `display:hidden` on mobile: perform a check and move to the next step\n\nimport Shepherd from 'shepherd.js';\n\n// filter's panel toggler for mobile\n\nimport init from '../base/init';\n\ninit(() => {\n  if(!window.SHEPHERD_TOURS) return;\n\n  window.SHEPHERD_TOURS.forEach(data => {\n    const tour = new Shepherd.Tour({\n      defaultStepOptions: {\n        scrollTo: true,\n        showCancelLink: true,\n      },\n      useModalOverlay: true,\n    });\n\n    data.steps.forEach((stepData, i) => {\n      const buttons = [];\n\n      if(i > 0) {\n        buttons.push({\n          action: tour.back,\n          classes: 'shepherd-button-secondary',\n          text: data.locales.prev,\n        });\n      }\n\n      buttons.push({\n        action: tour.next,\n        text: i < data.steps.length - 1 ? data.locales.next : data.locales.finish,\n      });\n\n      tour.addStep('example', {\n        buttons,\n        ...stepData,\n      });\n    });\n\n    if(data.trigger === 'onload') {\n      tour.start();\n    }\n    else { // selector\n      const trigger = document.querySelector(data.trigger);\n      if(trigger) {\n        trigger.addEventListener('click', (e) => {\n          e.preventDefault();\n          tour.start();\n        });\n      }\n    }\n  });\n});\n\n// expand overlay mask opening a bit for a nicer view\n\n// Shepherd.on('show', () => setTimeout(() => {\n//   const maskOpening = document.querySelector('rect#shepherdModalMaskOpening');\n//   if(!maskOpening) return;\n//\n//   // alert(maskOpening.getAttribute('x'));\n//\n//   const x = Math.max(maskOpening.x.baseVal.value - 10, 0);\n//   const y = Math.max(maskOpening.y.baseVal.value - 10, 0);\n//   const width = maskOpening.width.baseVal.value + 20;\n//   const height = maskOpening.height.baseVal.value + 20;\n//\n//   alert(maskOpening.width.baseVal.value + ' - ' + width);\n//\n//   maskOpening.setAttribute('x', x);\n//   maskOpening.setAttribute('y', y);\n//   maskOpening.setAttribute('width', width);\n//   maskOpening.setAttribute('height', height);\n// }, 500));\n","import init from \"../base/init\"\n\ninit(() => {\n  const newsBoxEls = document.querySelectorAll(\n    \"article.news-box\",\n  )\n\n  const bookedMarkedItems = window.bookmarked_items\n\n  Array.prototype.forEach.call(newsBoxEls, (el) => {\n    const { id, type } = el.dataset;\n    let bookedMarked = false;\n    let currentBookmark = null;\n\n    (bookedMarkedItems?.data || []).forEach((bookmark) => {\n      (bookmark?.items || []).forEach((bookmarkContent) => {\n        if (id === `${bookmarkContent.id}` && type === `${bookmarkContent.type}`) {\n          bookedMarked = true;\n          currentBookmark = bookmark;\n        }\n      });\n    });\n\n    if (bookedMarked && currentBookmark) {\n      const bookmarkEl = el.querySelector('.lxn-bookmark');\n      if (!bookmarkEl) return;\n\n      const bookmarkLink = bookmarkEl.querySelector('a');\n\n      bookmarkEl.style.display = 'block';\n\n      if (!bookmarkLink) return;\n      bookmarkLink.href = `/bibliotek/${currentBookmark.slug}`;\n      bookmarkLink.title = `Denna artikel är sparad i ${currentBookmark.name}`;\n    }\n  });\n});\n","import init from \"../base/init\"\n\ninit(() => {\n  const btnEl = document.getElementById(\"my_lexnova_side_menu_btn\")\n\n  if (!btnEl) return\n\n  btnEl.addEventListener(\"click\", () => {\n    document.querySelector('.sidebar-user').classList.toggle('--active')\n  })\n})\n","import { getElements } from \"js-utils/src/selector\"\nimport VimeoPlayer from \"@vimeo/player\"\nimport _ from \"underscore\"\nimport init from \"../base/init\"\n\nconst selectVideo = (newVimeoId) => {\n  const player = document.querySelector(\".course-analysis-video-player\")\n  const vimeoIframeEl = player.querySelector(\"iframe\")\n  vimeoIframeEl.src = `https://player.vimeo.com/video/${newVimeoId}?title=0&byline=0&portrait=0`\n  vimeoIframeEl.dataset.vimeoId = newVimeoId\n}\n\nconst initVideoPlayer = (videoItemEl) => {\n  console.log(\"initVideoPlayer\")\n  const player = document.querySelector(\".course-analysis-video-player\")\n  const video = player\n  let activeSection = 0, sectionTimes = []\n  let currentTime = parseInt(video.getAttribute(\"data-video-current-time\"))\n  const playVideoButtons = getElements(\".play-video\")\n  const vimeoPlayer = new VimeoPlayer(player.querySelector(\"iframe\"))\n  const videoSections = videoItemEl.querySelectorAll(\".video-sections__inner-wrapper li\")\n  console.log('videoSections', videoSections)\n  const mobileToggler = videoItemEl.querySelector(\".video-sections__expander\")\n  let sectionsOpen = false\n  const video_type = window.LEXNOVA.aet.props.available_to_user === \"true\" ? \"video\" : \"trailer\"\n  const videoDuration = vimeoPlayer.getDuration()\n\n  const eventListeners = []\n\n  const addEventListener = (element, event, handler) => {\n    if (!element.addEventListener) {\n      console.error(\"Element does not support addEventListener\")\n      return\n    }\n    element.addEventListener(event, handler)\n    eventListeners.push({ element, event, handler })\n  }\n\n  const removeEventListeners = () => {\n    eventListeners.forEach(({ element, event, handler }) => {\n      element.removeEventListener(event, handler)\n    })\n  }\n\n  vimeoPlayer.setColor(\"#d61368\")\n  vimeoPlayer.setCurrentTime(currentTime)\n\n  playVideoButtons.forEach((button) => {\n    addEventListener(button, \"click\", () => {\n      player.classList.add(\"video-player--overlay-hidden\")\n      vimeoPlayer.play()\n\n      window.dispatchEvent(new CustomEvent(\"AET\", {\n        detail: {\n          name: `${window.LEXNOVA.section_name}.${video_type}_play`,\n          props: window.LEXNOVA.aet.props,\n        },\n      }))\n    })\n  })\n\n  vimeoPlayer.on(\"ended\", () => {\n    videoEvent({ event: \"ended\", type: video_type })\n    player.classList.remove(\"video-player--overlay-hidden\")\n    player.classList.remove(\"video-player--playing\")\n\n    window.dispatchEvent(new CustomEvent(\"AET\", {\n      detail: {\n        name: `${window.LEXNOVA.section_name}.${video_type}_finished`,\n        props: window.LEXNOVA.aet.props,\n      },\n    }))\n  })\n\n  vimeoPlayer.on(\"play\", () => {\n    videoEvent({ event: \"play\", type: video_type })\n    player.classList.add(\"video-player--playing\")\n\n    window.dispatchEvent(new CustomEvent(\"AET\", {\n      detail: {\n        name: `${window.LEXNOVA.section_name}.${video_type}_play`,\n        props: window.LEXNOVA.aet.props,\n      },\n    }))\n  })\n\n  vimeoPlayer.on(\"pause\", (data) => {\n    videoEvent({ event: \"pause\", seconds: data.seconds, type: video_type })\n    player.classList.remove(\"video-player--playing\")\n\n    window.dispatchEvent(new CustomEvent(\"AET\", {\n      detail: {\n        name: `${window.LEXNOVA.section_name}.${video_type}_pause`,\n        props: window.LEXNOVA.aet.props,\n      },\n    }))\n  })\n\n  vimeoPlayer.on(\"timeupdate\", (data) => {\n    videoEvent({ event: \"progress\", seconds: data.seconds, type: video_type })\n\n    if (getElements(\".quiz.is-hidden\").length > 0) {\n      // Add cue point for showing quiz at 90%\n      videoDuration.then((time) => {\n        if (currentTime > parseInt(time * 0.9)) {\n          showQuiz()\n        }\n      })\n    }\n  })\n\n  const fireVideoEvent = (dataObject) => {\n    // User#do_not_track must be set to false\n    if (video_type === \"video\") {\n      fetch(\"/api/v1/playbacks/\" + video.getAttribute(\"data-video-resource-id\"), {\n        method: \"PATCH\",\n        credentials: \"same-origin\",\n        headers: {\n          \"Content-Type\": \"application/json; charset=utf-8\",\n        },\n        body: JSON.stringify(dataObject),\n      })\n    }\n  }\n\n  const videoEvent = _.throttle(\n    fireVideoEvent, 5000\n  )\n\n  const sectionProgress = () => {\n    let progress = ((currentTime - sectionTimes[activeSection][0]) / (sectionTimes[activeSection][1] - sectionTimes[activeSection][0])) * 100\n    videoItemEl.querySelectorAll(\".video-sections__inner-wrapper li\")[activeSection].firstElementChild.style.width = progress + \"%\"\n  }\n\n  const adjustActiveSection = () => {\n    sectionTimes.map((i, index) => {\n      if (currentTime > i[0] && currentTime < i[1]) {\n        activeSection = index\n\n        videoSections.forEach((item) => {\n          item.classList.remove(\"active\")\n        })\n\n        videoSections[activeSection].classList.add(\"active\")\n      }\n    })\n  }\n\n  // if we can access full video then we also allow navigation in sections\n  if (!getElements(\".video-player--access-false\").length > 0) {\n\n    console.log('videoSections.length', videoSections.length)\n\n    if (!videoSections.length) return\n\n    vimeoPlayer.on(\"timeupdate\", (data) => {\n      currentTime = data.seconds\n      adjustActiveSection()\n      sectionProgress()\n      console.log('timeupdate sectionProgress')\n    })\n\n    videoSections.forEach((item) => {\n\n      let timesArray = []\n      timesArray.push(parseInt(item.getAttribute(\"data-timestart\")))\n      timesArray.push(parseInt(item.getAttribute(\"data-timeend\")))\n      sectionTimes.push(timesArray)\n\n      addEventListener(item, \"click\", () => {\n        currentTime = parseInt(item.getAttribute(\"data-timestart\"))\n        vimeoPlayer.setCurrentTime(currentTime)\n\n        player.classList.add(\"video-player--overlay-hidden\")\n        vimeoPlayer.play()\n\n        videoSections.forEach((item) => {\n          item.classList.remove(\"active\")\n        })\n\n        item.classList.add(\"active\")\n      })\n    })\n  }\n\n  // sections toggle on mobile\n\n  const videoSectionsContainer = videoItemEl.querySelector(\".video-sections__list-wrapper\")\n\n  const toggleSections = () => {\n\n    if (!videoSectionsContainer.length) return\n\n    videoSectionsContainer.style.height = videoSectionsContainer.firstElementChild.offsetHeight + \"px\"\n    videoSectionsContainer.classList.toggle(\"open\")\n    mobileToggler.classList.toggle(\"open\")\n\n    if (sectionsOpen) {\n      window.requestAnimationFrame(() => {\n        videoSectionsContainer.style.height = 0\n      })\n      sectionsOpen = false\n    } else {\n      sectionsOpen = true\n    }\n  }\n\n  if (videoSectionsContainer) {\n    addEventListener(videoSectionsContainer, \"transitionend\", () => {\n      if (sectionsOpen) {\n        videoSectionsContainer.style.height = \"auto\"\n      } else {\n        videoSectionsContainer.removeAttribute(\"style\")\n      }\n    })\n  }\n\n  if (mobileToggler) {\n    addEventListener(mobileToggler, \"click\", () => {\n      toggleSections()\n    })\n  }\n\n  const showQuiz = () => {\n    getElements(\".quiz.is-hidden\")[0].classList.remove(\"is-hidden\")\n  }\n\n  return () => {\n    removeEventListeners()\n    video.setAttribute(\"data-video-current-time\", \"0\")\n    vimeoPlayer.off(\"ended\");\n    vimeoPlayer.off(\"play\");\n    vimeoPlayer.off(\"pause\");\n    vimeoPlayer.off(\"timeupdate\");\n  }\n}\n\nconst setLoading = (loading) => {\n  const videoItemEls = document.querySelectorAll(\".course-analysis-video-sections\")\n  Array.prototype.forEach.call(videoItemEls, (el) => {\n    el.style.opacity = loading ? 0.5 : 1\n  })\n}\n\ninit(() => {\n  let video = document.getElementsByClassName(\"course-analysis-video-player\")\n  if (!video.length) return\n\n  const videoItemEls = document.querySelectorAll(\".course-analysis-video-sections\")\n  const vimeoIframeEl = document.querySelector(\".video-player iframe\")\n  let cleanUpCb = null\n\n  Array.prototype.forEach.call(videoItemEls, (el) => {\n    const btnEl = el.querySelector('.course-analysis-video-sections__video');\n    btnEl.addEventListener(\"click\", function() {\n      if (vimeoIframeEl.dataset.vimeoId === btnEl.dataset.vimeoVideoId) {\n        return\n      }\n\n      if (cleanUpCb) {\n        cleanUpCb()\n      }\n\n      Array.prototype.forEach.call(videoItemEls, (el) => {\n        el.style.height = \"56px\";\n        el.classList.remove('-active');\n      })\n      el.style.height = \"auto\";\n      el.classList.add('-active');\n\n      setLoading(true);\n      selectVideo(btnEl.dataset.vimeoVideoId)\n      setTimeout(() => {\n        cleanUpCb = initVideoPlayer(el)\n        setLoading(false);\n      }, 1000)\n    })\n  })\n\n  cleanUpCb = initVideoPlayer(videoItemEls[0])\n})\n","import init from '../../common/base/init';\n\ninit(() => {\n  const beforePrint = () => {\n    document.querySelector('html').classList.add('html--print');\n  };\n\n  const afterPrint = () => {\n    document.querySelector('html').classList.remove('html--print');\n    window.dispatchEvent(new CustomEvent('resize'));\n  };\n\n  // safari\n  const mediaQueryList = window.matchMedia('print');\n  mediaQueryList.addListener(function(mql) {\n    mql.matches ? beforePrint() : afterPrint();\n  });\n\n  // the rest\n  window.onbeforeprint = beforePrint;\n  window.onafterprint = afterPrint;\n});\n","import { getElements } from \"./selector.js\"\n\n/*\n  ------------------------------------------------------------------------------\n  Returns top/left offsets of an element\n\n  @param {String|Element|NodeList|Array} elements Selector, single or multiple elements\n  @returns {Object}\n*/\n\nconst getOffset = (elements) => {\n  const element = getElements(elements)\n\n  if (!element.length) {\n    return null\n  }\n\n  const rect = element[0].getBoundingClientRect()\n\n  return {\n    top: rect.top + document.body.scrollTop,\n    left: rect.left + document.body.scrollLeft,\n  }\n}\n\n/*\n  ------------------------------------------------------------------------------\n*/\n\nexport { getOffset }\n","import { getElements } from 'js-utils/src/selector';\nimport { getOffset } from 'js-utils/src/position';\nimport { debounce } from 'js-utils/src/function';\n\nimport init from '../../common/base/init';\n\ninit(() => {\n  const navs = getElements('.hnav');\n  if(!navs.length) return;\n\n  const centerOnActiveItem = (nav) => {\n    const item = nav.querySelector('.\\\\--active');\n    if(!item) return;\n    const pos = nav.scrollLeft + getOffset(item).left - getOffset(nav).left - nav.offsetWidth/2 + item.offsetWidth/2;\n    nav.scrollLeft = pos;\n  };\n\n  navs.forEach((nav) => {\n    window.addEventListener('resize', debounce(300, () => {\n      centerOnActiveItem(nav);\n    }));\n\n    centerOnActiveItem(nav);\n  });\n});\n","import { debounce } from 'js-utils/src/function';\n\nimport init from '../../common/base/init';\n\n// stickyness\n\ninit(() => {\n  const bar = document.querySelector('.nav-bar');\n  if(!bar) return;\n\n  let distance = bar.offsetTop - window.pageYOffset;\n\n  window.addEventListener('scroll', () => {\n    distance = bar.offsetTop - window.pageYOffset;\n    bar.classList.toggle(\n      '--fixed',\n      distance <= 0 && !document.body.classList.contains('shepherd-active'),\n    );\n  });\n});\n\n// toggler visibility\n\ninit(() => {\n  const nav = document.querySelector('.nav-bar .hnav');\n  const toggle = document.querySelector('.nav-bar .-toggle');\n  if(!nav || !toggle) return;\n\n  const toggleVisibility = () => {\n    const hide = nav.scrollWidth <= nav.offsetWidth;\n    toggle.classList.toggle('is-hidden', hide);\n  };\n\n  window.addEventListener('resize', debounce(300, toggleVisibility));\n  toggleVisibility();\n});\n","/**\r\n * Sticky Sidebar JavaScript Plugin.\r\n * @version 3.3.1\r\n * @author Ahmed Bouhuolia <a.bouhuolia@gmail.com>\r\n * @license The MIT License (MIT)\r\n */\r\nconst StickySidebar = (() => {\r\n  \r\n    // ---------------------------------\r\n    // # Define Constants\r\n    // ---------------------------------\r\n    //\r\n    const EVENT_KEY = '.stickySidebar';\r\n    const VERSION   = '3.3.1';\r\n  \r\n    const DEFAULTS = {\r\n      \r\n      /**\r\n       * Additional top spacing of the element when it becomes sticky.\r\n       * @type {Numeric|Function}\r\n       */\r\n      topSpacing: 0,\r\n  \r\n      /**\r\n       * Additional bottom spacing of the element when it becomes sticky.\r\n       * @type {Numeric|Function}\r\n       */\r\n      bottomSpacing: 0,\r\n  \r\n      /**\r\n       * Container sidebar selector to know what the beginning and end of sticky element.\r\n       * @type {String|False}\r\n       */\r\n      containerSelector: false,\r\n  \r\n      /**\r\n       * Inner wrapper selector.\r\n       * @type {String}\r\n       */\r\n      innerWrapperSelector: '.inner-wrapper-sticky',\r\n  \r\n      /**\r\n       * The name of CSS class to apply to elements when they have become stuck.\r\n       * @type {String|False}\r\n       */\r\n      stickyClass: 'is-affixed',\r\n  \r\n      /**\r\n       * Detect when sidebar and its container change height so re-calculate their dimensions.\r\n       * @type {Boolean}\r\n       */\r\n      resizeSensor: true,\r\n  \r\n      /**\r\n       * The sidebar returns to its normal position if its width below this value.\r\n       * @type {Numeric}\r\n       */\r\n      minWidth: false\r\n    };\r\n  \r\n    // ---------------------------------\r\n    // # Class Definition\r\n    // ---------------------------------\r\n    //\r\n    /**\r\n     * Sticky Sidebar Class.\r\n     * @public\r\n     */\r\n    class StickySidebar{\r\n  \r\n      /**\r\n       * Sticky Sidebar Constructor.\r\n       * @constructor\r\n       * @param {HTMLElement|String} sidebar - The sidebar element or sidebar selector.\r\n       * @param {Object} options - The options of sticky sidebar.\r\n       */\r\n      constructor(sidebar, options = {}){\r\n        this.options = StickySidebar.extend(DEFAULTS, options);\r\n  \r\n        // Sidebar element query if there's no one, throw error.\r\n        this.sidebar = ('string' === typeof sidebar ) ? document.querySelector(sidebar) : sidebar;\r\n        if( 'undefined' === typeof this.sidebar )\r\n          throw new Error(\"There is no specific sidebar element.\");\r\n  \r\n        this.sidebarInner = false;\r\n        this.container = this.sidebar.parentElement;\r\n  \r\n        // Current Affix Type of sidebar element.\r\n        this.affixedType = 'STATIC';\r\n        this.direction = 'down';\r\n        this.support = {\r\n          transform:   false,\r\n          transform3d: false\r\n        };\r\n  \r\n        this._initialized = false;\r\n        this._reStyle = false;\r\n        this._breakpoint = false;\r\n        this._resizeListeners = [];\r\n        \r\n        // Dimensions of sidebar, container and screen viewport.\r\n        this.dimensions = {\r\n          translateY: 0,\r\n          topSpacing: 0,\r\n          lastTopSpacing: 0,\r\n          bottomSpacing: 0,\r\n          lastBottomSpacing: 0,\r\n          sidebarHeight: 0,\r\n          sidebarWidth: 0,\r\n          containerTop: 0,\r\n          containerHeight: 0,\r\n          viewportHeight: 0,\r\n          viewportTop: 0, \r\n          lastViewportTop: 0,\r\n        };\r\n  \r\n        // Bind event handlers for referencability.\r\n        ['handleEvent'].forEach( (method) => {\r\n          this[method] = this[method].bind(this);\r\n        });\r\n  \r\n        // Initialize sticky sidebar for first time.\r\n        this.initialize();\r\n      }\r\n  \r\n      /**\r\n       * Initializes the sticky sidebar by adding inner wrapper, define its container, \r\n       * min-width breakpoint, calculating dimensions, adding helper classes and inline style.\r\n       * @private\r\n       */\r\n      initialize(){\r\n        this._setSupportFeatures();\r\n  \r\n        // Get sticky sidebar inner wrapper, if not found, will create one.\r\n        if( this.options.innerWrapperSelector ){\r\n          this.sidebarInner = this.sidebar.querySelector(this.options.innerWrapperSelector);\r\n  \r\n          if( null === this.sidebarInner )\r\n            this.sidebarInner = false;\r\n        }\r\n        \r\n        if( ! this.sidebarInner ){\r\n          let wrapper = document.createElement('div');\r\n          wrapper.setAttribute('class', 'inner-wrapper-sticky');\r\n          this.sidebar.appendChild(wrapper);\r\n  \r\n          while( this.sidebar.firstChild != wrapper )\r\n            wrapper.appendChild(this.sidebar.firstChild);\r\n  \r\n          this.sidebarInner = this.sidebar.querySelector('.inner-wrapper-sticky');\r\n        }\r\n  \r\n        // Container wrapper of the sidebar.\r\n        if( this.options.containerSelector ){\r\n          let containers = document.querySelectorAll(this.options.containerSelector);\r\n          containers = Array.prototype.slice.call(containers);\r\n  \r\n          containers.forEach((container, item) => {\r\n            if( ! container.contains(this.sidebar) ) return;\r\n            this.container = container;\r\n          });\r\n  \r\n          if( ! containers.length )\r\n            throw new Error(\"The container does not contains on the sidebar.\");\r\n        }\r\n        \r\n        // If top/bottom spacing is not function parse value to integer.\r\n        if( 'function' !== typeof this.options.topSpacing )\r\n          this.options.topSpacing = parseInt(this.options.topSpacing) || 0;\r\n  \r\n        if( 'function' !== typeof this.options.bottomSpacing )\r\n          this.options.bottomSpacing = parseInt(this.options.bottomSpacing) || 0;\r\n            \r\n        // Breakdown sticky sidebar if screen width below `options.minWidth`.\r\n        this._widthBreakpoint();\r\n  \r\n        // Calculate dimensions of sidebar, container and viewport.\r\n        this.calcDimensions();\r\n  \r\n        // Affix sidebar in proper position.\r\n        this.stickyPosition();\r\n  \r\n        // Bind all events.\r\n        this.bindEvents();\r\n        \r\n        // Inform other properties the sticky sidebar is initialized.\r\n        this._initialized = true;\r\n      }\r\n  \r\n      /**\r\n       * Bind all events of sticky sidebar plugin.\r\n       * @protected\r\n       */\r\n      bindEvents(){\r\n        window.addEventListener('resize', this, {passive: true, capture: false});\r\n        window.addEventListener('scroll', this, {passive: true, capture: false});\r\n  \r\n        this.sidebar.addEventListener('update' + EVENT_KEY, this);\r\n  \r\n        if( this.options.resizeSensor && 'undefined' !== typeof ResizeSensor ){\r\n          new ResizeSensor(this.sidebarInner, this.handleEvent);\r\n          new ResizeSensor(this.container, this.handleEvent);\r\n        }\r\n      }\r\n  \r\n      /**\r\n       * Handles all events of the plugin.\r\n       * @param {Object} event - Event object passed from listener.\r\n       */\r\n      handleEvent(event){\r\n        this.updateSticky(event);\r\n      }\r\n  \r\n      /**\r\n       * Calculates dimensions of sidebar, container and screen viewpoint\r\n       * @public\r\n       */\r\n      calcDimensions(){\r\n        if( this._breakpoint ) return;\r\n        var dims = this.dimensions;\r\n  \r\n        // Container of sticky sidebar dimensions.\r\n        dims.containerTop    = StickySidebar.offsetRelative(this.container).top;\r\n        dims.containerHeight = this.container.clientHeight;\r\n        dims.containerBottom = dims.containerTop + dims.containerHeight;\r\n  \r\n        // Sidebar dimensions.\r\n        dims.sidebarHeight = this.sidebarInner.offsetHeight;\r\n        dims.sidebarWidth  = this.sidebar.offsetWidth;\r\n        \r\n        // Screen viewport dimensions.\r\n        dims.viewportHeight = window.innerHeight;\r\n  \r\n        this._calcDimensionsWithScroll();\r\n      }\r\n  \r\n      /**\r\n       * Some dimensions values need to be up-to-date when scrolling the page.\r\n       * @private\r\n       */\r\n      _calcDimensionsWithScroll(){\r\n        var dims = this.dimensions;\r\n  \r\n        dims.sidebarLeft = StickySidebar.offsetRelative(this.sidebar).left;\r\n  \r\n        dims.viewportTop    = document.documentElement.scrollTop || document.body.scrollTop;\r\n        dims.viewportBottom = dims.viewportTop + dims.viewportHeight;\r\n        dims.viewportLeft   = document.documentElement.scrollLeft || document.body.scrollLeft;\r\n  \r\n        dims.topSpacing    = this.options.topSpacing;\r\n        dims.bottomSpacing = this.options.bottomSpacing;\r\n  \r\n        if( 'function' === typeof dims.topSpacing )\r\n            dims.topSpacing = parseInt(dims.topSpacing(this.sidebar)) || 0;\r\n  \r\n        if( 'function' === typeof dims.bottomSpacing )\r\n            dims.bottomSpacing = parseInt(dims.bottomSpacing(this.sidebar)) || 0;\r\n        \r\n        if( 'VIEWPORT-TOP' === this.affixedType ){\r\n          // Adjust translate Y in the case decrease top spacing value.\r\n          if( dims.topSpacing < dims.lastTopSpacing ){\r\n            dims.translateY += dims.lastTopSpacing - dims.topSpacing;\r\n            this._reStyle = true; \r\n          }\r\n        \r\n        } else if( 'VIEWPORT-BOTTOM' === this.affixedType ){\r\n          // Adjust translate Y in the case decrease bottom spacing value.\r\n          if( dims.bottomSpacing < dims.lastBottomSpacing ){\r\n            dims.translateY += dims.lastBottomSpacing - dims.bottomSpacing;\r\n            this._reStyle = true;\r\n          }\r\n        }\r\n        \r\n        dims.lastTopSpacing    = dims.topSpacing;\r\n        dims.lastBottomSpacing = dims.bottomSpacing;\r\n      }\r\n      \r\n      /**\r\n       * Determine whether the sidebar is bigger than viewport.\r\n       * @public\r\n       * @return {Boolean}\r\n       */\r\n      isSidebarFitsViewport(){\r\n        return this.dimensions.sidebarHeight < this.dimensions.viewportHeight;\r\n      }\r\n  \r\n      /**\r\n       * Observe browser scrolling direction top and down.\r\n       */\r\n      observeScrollDir(){\r\n        var dims = this.dimensions;\r\n        if( dims.lastViewportTop === dims.viewportTop ) return;\r\n  \r\n        var furthest = 'down' === this.direction ? Math.min : Math.max;\r\n        \r\n        // If the browser is scrolling not in the same direction.\r\n        if( dims.viewportTop === furthest(dims.viewportTop, dims.lastViewportTop) )\r\n          this.direction = 'down' === this.direction ?  'up' : 'down';\r\n      }\r\n  \r\n      /**\r\n       * Gets affix type of sidebar according to current scrollTop and scrollLeft.\r\n       * Holds all logical affix of the sidebar when scrolling up and down and when sidebar \r\n       * is bigger than viewport and vice versa.\r\n       * @public\r\n       * @return {String|False} - Proper affix type.\r\n       */\r\n      getAffixType(){\r\n        var dims = this.dimensions, affixType = false;\r\n  \r\n        this._calcDimensionsWithScroll();\r\n  \r\n        var sidebarBottom = dims.sidebarHeight + dims.containerTop;\r\n        var colliderTop = dims.viewportTop + dims.topSpacing;\r\n        var colliderBottom = dims.viewportBottom - dims.bottomSpacing;\r\n  \r\n        // When browser is scrolling top.\r\n        if( 'up' === this.direction ){\r\n          if( colliderTop <= dims.containerTop ){\r\n            dims.translateY = 0;\r\n            affixType = 'STATIC';\r\n  \r\n          } else if( colliderTop <= dims.translateY + dims.containerTop ){\r\n            dims.translateY = colliderTop - dims.containerTop;\r\n            affixType = 'VIEWPORT-TOP';\r\n  \r\n          } else if( ! this.isSidebarFitsViewport() && dims.containerTop <= colliderTop ){\r\n            affixType = 'VIEWPORT-UNBOTTOM';\r\n          }\r\n        // When browser is scrolling up.\r\n        } else {\r\n          // When sidebar element is not bigger than screen viewport.\r\n          if( this.isSidebarFitsViewport() ){\r\n  \r\n            if( dims.sidebarHeight + colliderTop >= dims.containerBottom ){\r\n              dims.translateY = dims.containerBottom - sidebarBottom;\r\n              affixType = 'CONTAINER-BOTTOM'; \r\n  \r\n            } else if( colliderTop >= dims.containerTop ){\r\n              dims.translateY = colliderTop - dims.containerTop;\r\n              affixType = 'VIEWPORT-TOP';\r\n            }\r\n          // When sidebar element is bigger than screen viewport.\r\n          } else {\r\n      \r\n            if( dims.containerBottom <= colliderBottom ){\r\n              dims.translateY = dims.containerBottom - sidebarBottom; \r\n              affixType = 'CONTAINER-BOTTOM';    \r\n  \r\n            } else if( sidebarBottom + dims.translateY <= colliderBottom ){\r\n              dims.translateY = colliderBottom - sidebarBottom;\r\n              affixType = 'VIEWPORT-BOTTOM';\r\n            \r\n            } else if( dims.containerTop + dims.translateY <= colliderTop ){\r\n              affixType = 'VIEWPORT-UNBOTTOM';\r\n            }\r\n          }\r\n        }\r\n  \r\n        // Make sure the translate Y is not bigger than container height.\r\n        dims.translateY = Math.max(0, dims.translateY);\r\n        dims.translateY = Math.min(dims.containerHeight, dims.translateY);\r\n  \r\n        dims.lastViewportTop = dims.viewportTop;\r\n        return affixType;\r\n      }\r\n  \r\n      /**\r\n       * Gets inline style of sticky sidebar wrapper and inner wrapper according \r\n       * to its affix type.\r\n       * @private\r\n       * @param {String} affixType - Affix type of sticky sidebar.\r\n       * @return {Object}\r\n       */\r\n      _getStyle(affixType){\r\n        if( 'undefined' === typeof affixType ) return;\r\n  \r\n        var style = {inner: {}, outer: {}};\r\n        var dims = this.dimensions;\r\n  \r\n        switch( affixType ){\r\n          case 'VIEWPORT-TOP':\r\n            style.inner = {position: 'fixed', top: dims.topSpacing,\r\n                  left: dims.sidebarLeft - dims.viewportLeft, width: dims.sidebarWidth};\r\n            break;\r\n          case 'VIEWPORT-BOTTOM':\r\n            style.inner = {position: 'fixed', top: 'auto', left: dims.sidebarLeft,\r\n                  bottom: dims.bottomSpacing, width: dims.sidebarWidth};\r\n            break;\r\n          case 'CONTAINER-BOTTOM':\r\n          case 'VIEWPORT-UNBOTTOM':\r\n            let translate = this._getTranslate(0, dims.translateY + 'px');\r\n            \r\n            if( translate )\r\n              style.inner = {transform: translate};\r\n            else \r\n              style.inner = {position: 'absolute', top: dims.translateY, width: dims.sidebarWidth};\r\n            break;\r\n        }\r\n        \r\n        switch( affixType ){\r\n          case 'VIEWPORT-TOP':\r\n          case 'VIEWPORT-BOTTOM':\r\n          case 'VIEWPORT-UNBOTTOM':\r\n          case 'CONTAINER-BOTTOM':\r\n            style.outer = {height: dims.sidebarHeight, position: 'relative'};\r\n            break;\r\n        }\r\n  \r\n        style.outer = StickySidebar.extend({height: '', position: ''}, style.outer);\r\n        style.inner = StickySidebar.extend({position: 'relative', top: '', left: '',\r\n            bottom: '', width: '',  transform: this._getTranslate()}, style.inner);\r\n  \r\n        return style;\r\n      }\r\n     \r\n      /**\r\n       * Cause the sidebar to be sticky according to affix type by adding inline\r\n       * style, adding helper class and trigger events.\r\n       * @function\r\n       * @protected\r\n       * @param {string} force - Update sticky sidebar position by force.\r\n       */\r\n      stickyPosition(force){\r\n        if( this._breakpoint ) return;\r\n  \r\n        force = this._reStyle || force || false;\r\n        \r\n        var offsetTop = this.options.topSpacing;\r\n        var offsetBottom = this.options.bottomSpacing;\r\n  \r\n        var affixType = this.getAffixType();\r\n        var style = this._getStyle(affixType);\r\n        \r\n        if( (this.affixedType != affixType || force) && affixType ){\r\n          let affixEvent = 'affix.' + affixType.toLowerCase().replace('viewport-', '') + EVENT_KEY;\r\n          StickySidebar.eventTrigger(this.sidebar, affixEvent);\r\n  \r\n          if( 'STATIC' === affixType )\r\n            StickySidebar.removeClass(this.sidebar, this.options.stickyClass);\r\n          else\r\n            StickySidebar.addClass(this.sidebar, this.options.stickyClass);\r\n          \r\n          for( let key in style.outer ){\r\n            let _unit = ('number' === typeof style.outer[key]) ? 'px' : '';\r\n            this.sidebar.style[key] = style.outer[key];\r\n          }\r\n  \r\n          for( let key in style.inner ){\r\n            let _unit = ('number' === typeof style.inner[key]) ? 'px' : '';\r\n            this.sidebarInner.style[key] = style.inner[key] + _unit;\r\n          }\r\n          \r\n          let affixedEvent = 'affixed.'+ affixType.toLowerCase().replace('viewport-', '') + EVENT_KEY;\r\n          StickySidebar.eventTrigger(this.sidebar, affixedEvent);\r\n        } else {\r\n          if( this._initialized ) this.sidebarInner.style.left = style.inner.left;\r\n        }\r\n  \r\n        this.affixedType = affixType;\r\n      }\r\n  \r\n      /**\r\n       * Breakdown sticky sidebar when window width is below `options.minWidth` value.\r\n       * @protected\r\n       */\r\n      _widthBreakpoint(){\r\n  \r\n        if( window.innerWidth <= this.options.minWidth ){\r\n          this._breakpoint = true;\r\n          this.affixedType = 'STATIC';\r\n  \r\n          this.sidebar.removeAttribute('style');\r\n          StickySidebar.removeClass(this.sidebar, this.options.stickyClass);\r\n          this.sidebarInner.removeAttribute('style');\r\n        } else {\r\n          this._breakpoint = false;\r\n        }\r\n      }\r\n  \r\n      /**\r\n       * Switches between functions stack for each event type, if there's no \r\n       * event, it will re-initialize sticky sidebar.\r\n       * @public\r\n       */\r\n      updateSticky(event = {}){\r\n        if( this._running ) return;\r\n        this._running = true;\r\n  \r\n        ((eventType) => {\r\n\r\n          requestAnimationFrame(() => {\r\n            switch( eventType ){\r\n              // When browser is scrolling and re-calculate just dimensions\r\n              // within scroll. \r\n              case 'scroll':\r\n                this._calcDimensionsWithScroll();\r\n                this.observeScrollDir();\r\n                this.stickyPosition();\r\n                break;\r\n  \r\n              // When browser is resizing or there's no event, observe width\r\n              // breakpoint and re-calculate dimensions.\r\n              case 'resize':\r\n              default: \r\n                this._widthBreakpoint();\r\n                this.calcDimensions();\r\n                this.stickyPosition(true);\r\n                break;\r\n            }\r\n            this._running = false;\r\n          });\r\n        })(event.type);\r\n      }\r\n  \r\n      /**\r\n       * Set browser support features to the public property.\r\n       * @private\r\n       */\r\n      _setSupportFeatures(){\r\n        var support = this.support;\r\n  \r\n        support.transform = StickySidebar.supportTransform();\r\n        support.transform3d = StickySidebar.supportTransform(true);\r\n      }\r\n  \r\n      /**\r\n       * Get translate value, if the browser supports transfrom3d, it will adopt it.\r\n       * and the same with translate. if browser doesn't support both return false.\r\n       * @param {Number} y - Value of Y-axis.\r\n       * @param {Number} x - Value of X-axis.\r\n       * @param {Number} z - Value of Z-axis.\r\n       * @return {String|False}\r\n       */\r\n      _getTranslate(y = 0, x = 0, z = 0){\r\n        if( this.support.transform3d ) return 'translate3d(' + y +', '+ x +', '+ z +')';\r\n        else if( this.support.translate ) return 'translate('+ y +', '+ x +')';\r\n        else return false;\r\n      }\r\n  \r\n      /**\r\n       * Destroy sticky sidebar plugin.\r\n       * @public\r\n       */\r\n      destroy(){\r\n        window.removeEventListener('resize', this, {caption: false});\r\n        window.removeEventListener('scroll', this, {caption: false});\r\n  \r\n        this.sidebar.classList.remove(this.options.stickyClass);\r\n        this.sidebar.style.minHeight = '';\r\n  \r\n        this.sidebar.removeEventListener('update' + EVENT_KEY, this);\r\n  \r\n        var styleReset = {inner: {}, outer: {}};\r\n  \r\n        styleReset.inner = {position: '', top: '', left: '', bottom: '', width: '',  transform: ''};\r\n        styleReset.outer = {height: '', position: ''};\r\n  \r\n        for( let key in styleReset.outer )\r\n          this.sidebar.style[key] = styleReset.outer[key];\r\n  \r\n        for( let key in styleReset.inner )\r\n          this.sidebarInner.style[key] = styleReset.inner[key];\r\n  \r\n        if( this.options.resizeSensor && 'undefined' !== typeof ResizeSensor ){\r\n          ResizeSensor.detach(this.sidebarInner, this.handleEvent);\r\n          ResizeSensor.detach(this.container, this.handleEvent);\r\n        }\r\n      }\r\n  \r\n      /**\r\n       * Determine if the browser supports CSS transform feature.\r\n       * @function\r\n       * @static\r\n       * @param {Boolean} transform3d - Detect transform with translate3d.\r\n       * @return {String}\r\n       */\r\n      static supportTransform(transform3d){\r\n        var result = false,\r\n            property = (transform3d) ? 'perspective' : 'transform',\r\n            upper = property.charAt(0).toUpperCase() + property.slice(1),\r\n            prefixes = ['Webkit', 'Moz', 'O', 'ms'],\r\n            support = document.createElement('support'),\r\n            style = support.style;\r\n  \r\n        (property + ' ' + prefixes.join(upper + ' ') + upper).split(' ').forEach(function(property, i) {\r\n          if (style[property] !== undefined) {\r\n            result = property;\r\n            return false;\r\n          }\r\n        });\r\n        return result;\r\n      }\r\n  \r\n      /**\r\n       * Trigger custom event.\r\n       * @static\r\n       * @param {DOMObject} element - Target element on the DOM.\r\n       * @param {String} eventName - Event name.\r\n       * @param {Object} data - \r\n       */\r\n      static eventTrigger(element, eventName, data){\r\n        try{\r\n          var event = new CustomEvent(eventName, {detail: data});\r\n        } catch(e){\r\n          var event = document.createEvent('CustomEvent');\r\n          event.initCustomEvent(eventName, true, true, data);\r\n        }\r\n        element.dispatchEvent(event);\r\n      }\r\n  \r\n      /**\r\n       * Extend options object with defaults.\r\n       * @function\r\n       * @static\r\n       */\r\n      static extend(defaults, options){\r\n        var results = {};\r\n        for( let key in defaults ){\r\n          if( 'undefined' !== typeof options[key] ) results[key] = options[key];\r\n          else results[key] = defaults[key];\r\n        }\r\n        return results;\r\n      }\r\n  \r\n      /**\r\n       * Get current coordinates left and top of specific element.\r\n       * @static\r\n       */\r\n      static offsetRelative(element){\r\n        var result = {left: 0, top: 0};\r\n\r\n        do{\r\n          let offsetTop = element.offsetTop;\r\n          let offsetLeft = element.offsetLeft;\r\n  \r\n          if( ! isNaN(offsetTop) )\r\n            result.top += offsetTop;\r\n  \r\n          if( ! isNaN(offsetLeft) )\r\n            result.left += offsetLeft;\r\n\r\n          element = ( 'BODY' === element.tagName ) ?\r\n                      element.parentElement : element.offsetParent;\r\n        } while(element)\r\n        return result;\r\n      }\r\n  \r\n      /**\r\n       * Add specific class name to specific element.\r\n       * @static \r\n       * @param {ObjectDOM} element \r\n       * @param {String} className \r\n       */\r\n      static addClass(element, className){\r\n        if( ! StickySidebar.hasClass(element, className) ){\r\n          if (element.classList)\r\n            element.classList.add(className);\r\n          else\r\n            element.className += ' ' + className;\r\n        }\r\n      }\r\n      \r\n      /**\r\n       * Remove specific class name to specific element\r\n       * @static\r\n       * @param {ObjectDOM} element \r\n       * @param {String} className \r\n       */\r\n      static removeClass(element, className){\r\n        if( StickySidebar.hasClass(element, className) ){\r\n          if (element.classList)\r\n            element.classList.remove(className);\r\n          else\r\n            element.className = element.className.replace(new RegExp('(^|\\\\b)' + className.split(' ').join('|') + '(\\\\b|$)', 'gi'), ' ');\r\n        }\r\n      }\r\n\r\n      /**\r\n       * Determine weather the element has specific class name.\r\n       * @static\r\n       * @param {ObjectDOM} element \r\n       * @param {String} className \r\n       */\r\n      static hasClass(element, className){\r\n        if (element.classList)\r\n          return element.classList.contains(className);\r\n        else\r\n          return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);\r\n      }\r\n    }\r\n  \r\n    return StickySidebar;\r\n  })();\r\n  \r\n  export default StickySidebar;\r\n  \r\n  // Global\r\n  // -------------------------\r\n  window.StickySidebar = StickySidebar;","// Sidebar sticky when scrolling\n\nimport StickySidebar from 'sticky-sidebar';\nimport { debounce } from 'js-utils/src/function';\nimport { getElements } from 'js-utils/src/selector';\nimport { addEventListener } from 'js-utils/src/event';\n\nimport init from '../../common/base/init';\n\ninit(() => {\n  const sidebarSelector = '.layout-main__aside';\n  let sidebar = document.querySelector(sidebarSelector);\n  if(!sidebar) return;\n\n  let fixedHeader = document.querySelector('.header--fixed');\n  let topSpacing = fixedHeader ? 100 : 73;\n\n  let Sticky = null;\n  const stickyMQ = '(min-width: 60.0625em)'; // 'large' in SASS\n  const stickyConfig = {\n    topSpacing: topSpacing,\n    bottomSpacing: 20,\n    minWidth: 640,\n  };\n\n  const toggleSticky = () => {\n    if(window.matchMedia(stickyMQ).matches) {\n      if(!Sticky) {\n        Sticky = new StickySidebar(sidebarSelector, stickyConfig);\n      }\n    }\n    else {\n      if(Sticky) {\n        Sticky.destroy();\n        Sticky = null;\n      }\n    }\n  };\n\n  toggleSticky();\n  window.addEventListener('resize', debounce(300, toggleSticky));\n\n  addEventListener(getElements('.toggle', sidebar), 'click', () => {\n    if(Sticky) {\n      Sticky.updateSticky();\n    }\n  });\n});\n","import { getElements } from \"js-utils/src/selector\";\nimport { addClass, removeClass } from \"js-utils/src/attribute\";\nimport { addEventListener } from \"js-utils/src/event\";\nimport Fuse from \"fuse.js\";\n\nimport init from \"../../common/base/init\";\n\n// overflows\ninit(() => {\n  const overflowTriggers = getElements('.js--show-overflow');\n\n  if (!overflowTriggers) return;\n\n  overflowTriggers.forEach((trigger) => {\n    addEventListener(trigger, 'click', (e) => {\n      e.preventDefault;\n\n      const overflowContainer = trigger.parentNode;\n\n      overflowContainer.classList.remove(\"js--overflow\");\n    });\n  });\n});\n\n// bookmark options context menu\n\ninit(() => {\n  if (!document.querySelector(\".library-wrap\")) return;\n\n  document.addEventListener(\"click\", e => {\n    const toggle = e.target.closest(\".library-wrap .-options .-toggle\");\n    let opened = false;\n\n    if (toggle) {\n      opened = toggle.closest(\".-options\").classList.contains(\"--open\");\n    }\n\n    removeClass(\".library-wrap .-options.\\\\--open\", \"--open\");\n\n    if (toggle && !opened) {\n      toggle.closest(\".-options\").classList.add(\"--open\");\n    }\n  });\n});\n\n// move bookmark cta\n\ninit(() => {\n  const toggles = document.querySelectorAll(\".library-wrap .-options .-move\");\n  if (!toggles.length) return;\n\n  let formAction = null;\n  addEventListener(toggles, \"click\", e => {\n    e.preventDefault();\n\n    const toggle = e.currentTarget;\n    const modal = document.querySelector(\".library-save\");\n    const modalTitle = modal.querySelector(\".-title\");\n    const form = modal.querySelector(\".-form\");\n    const idInput = form.querySelector(\"#bookmark_content_id\");\n    const row = toggle.closest(\"tr\");\n    const bookmarkId = row.dataset.id;\n    const bookmarkTitle = row.dataset.title;\n\n    formAction = formAction || form.action;\n    form.action = `${formAction}/${bookmarkId}`;\n    modalTitle.innerHTML = bookmarkTitle;\n    idInput.value = bookmarkId;\n  });\n});\n\n// edit bookmark cta\n\ninit(() => {\n  const toggles = document.querySelectorAll(\".library-wrap .-options .-edit\");\n  if (!toggles.length) return;\n\n  let formAction = null;\n  addEventListener(toggles, \"click\", e => {\n    e.preventDefault();\n\n    const toggle = e.currentTarget;\n    const row = toggle.closest(\"tr\");\n    const bookmarkId = row.dataset.id;\n    const bookmarkTitle = row.dataset.title;\n    const modal = document.querySelector(\".library-edit\");\n    const form = modal.querySelector(\".-form\");\n    const nameInput = modal.querySelector(\"#bookmark_content_title\");\n    const idInput = modal.querySelector(\"#bookmark_content_id\");\n\n    formAction = formAction || form.action;\n    form.action = `${formAction}${bookmarkId}`;\n    nameInput.value = bookmarkTitle;\n    idInput.value = bookmarkId;\n  });\n});\n\n// save/move modal: conditional field toggle\n\ninit(() => {\n  const containers = getElements(\".library-save\");\n  if (!containers) return;\n\n  containers.forEach(container => {\n    const form = container.querySelector(\".-form\");\n    const folderDropdown = container.querySelector(\n      \".-bookmark-folder-input\"\n    );\n\n    const sectionDropdown = container.querySelector(\n      \".-bookmark-section-input\"\n    );\n\n    const mainSectionChoice = {\n      id: \"\",\n      title: sectionDropdown ? sectionDropdown.dataset.labelMain : \"\",\n      selected: true\n    };\n\n    const newSectionChoice = {\n      id: \"0\",\n      title: sectionDropdown ? sectionDropdown.dataset.labelNew : \"\"\n    };\n\n    const newFolderName = container.querySelector(\n      \".-new-folder-name\"\n    );\n\n    const sectionContainer = container.querySelector(\n      \".-bookmark-section\"\n    );\n\n    const newSectionName = container.querySelector(\n      \".-new-section-name\"\n    );\n\n    if (folderDropdown) {\n      folderDropdown.addEventListener(\n        \"change\",\n        e => {\n          removeClass(newSectionName, \"--visible\");\n          sectionDropdown.CHOICES_INSTANCE.clearStore();\n\n          if (e.detail.value === \"0\") {\n            addClass(newFolderName, \"--visible\");\n            sectionDropdown.CHOICES_INSTANCE.setChoices(\n              [mainSectionChoice, newSectionChoice],\n              \"id\",\n              \"title\",\n              true\n            );\n          } else {\n            addClass(sectionContainer, \"--visible\");\n            removeClass(newFolderName, \"--visible\");\n\n            fetch(`/bibliotek/${e.detail.value}.json`)\n              .then(resp => resp.json())\n              .then(resp => {\n                const sections = [\n                  mainSectionChoice,\n                  ...resp.sections,\n                  newSectionChoice\n                ];\n                sectionDropdown.CHOICES_INSTANCE.setChoices(\n                  sections,\n                  \"id\",\n                  \"title\",\n                  true\n                );\n              })\n              .catch(() => {\n                alert('Error. Please and try again.');\n                form.reset();\n              });\n          }\n        },\n        false\n      );\n    }\n\n    if (sectionDropdown) {\n      sectionDropdown.addEventListener(\n        \"addItem\",\n        e => {\n          newSectionName.classList.toggle(\"--visible\", e.detail.value === \"0\");\n        },\n        false\n      );\n    }\n  });\n});\n\n// save/move modal: reset form on close\n\ninit(() => {\n  const modal = document.querySelector(\"#library-save-form-modal\");\n  if (!modal || !modal.A11yDialogInstance) return;\n\n  const form = modal.querySelector(\".-form\");\n\n  modal.A11yDialogInstance.on(\"hide\", () => {\n    form.reset();\n    const newInputs = document.querySelectorAll(\n      \".-new-folder-name, .-new-section-name\"\n    );\n    removeClass(newInputs, \"--visible\");\n  });\n});\n\ninit(() => {\n  const modal = document.querySelector(\"#library-save-highlight-modal\");\n  if (!modal || !modal.A11yDialogInstance) return;\n\n  const form = modal.querySelector(\".-form\");\n\n  modal.A11yDialogInstance.on(\"hide\", () => {\n    form.reset();\n    const newInputs = document.querySelectorAll(\n      \".-new-folder-name, .-new-section-name\"\n    );\n    removeClass(newInputs, \"--visible\");\n  });\n});\n\n// save/move form submission: basic validation\n\ninit(() => {\n  const form = document.querySelector(\".library-save .-form\");\n  if (!form) return;\n\n  const submitButton = form.querySelector('input[type=\"submit\"]');\n  const reenableBtn = () =>\n    setTimeout(() => (submitButton.disabled = false), 200);\n\n  form.addEventListener(\"submit\", e => {\n    const newFolderInput = form.querySelector(\n      \".-new-folder-name.\\\\--visible input\"\n    );\n    if (newFolderInput && newFolderInput.value == \"\") {\n      e.preventDefault();\n      reenableBtn();\n    }\n\n    const newSectionInput = form.querySelector(\n      \".-new-section-name.\\\\--visible input\"\n    );\n    if (newSectionInput && newSectionInput.value == \"\") {\n      e.preventDefault();\n      reenableBtn();\n    }\n  });\n});\n\ninit(() => {\n  const library_content = getElements(\".js--search-titles\");\n  const library_sections = getElements(`div[data-section-id].-section`);\n  const library_bookmarks = getElements(\".js--search-titles tr[data-title]\");\n  if (!library_content.length) return;\n  const searchData = [];\n\n  library_bookmarks.map(bookmark => {\n    searchData.push({\n      id: bookmark.getAttribute(\"data-id\"),\n      title: bookmark.getAttribute(\"data-title\"),\n      section: bookmark.getAttribute(\"data-section\")\n    });\n  });\n\n  const fuse = new Fuse(searchData, {\n    threshold: 0.4,\n    keys: [\"title\"]\n  });\n\n  addEventListener(\".js--searchbox\", \"input\", e => {\n    const searchTerm = e.currentTarget.value;\n    removeClass(library_bookmarks, 'is-hidden');\n    addClass(library_sections, 'open');\n    removeClass(library_sections, 'closed');\n\n    if (searchTerm.length < 3) return;\n\n    const matchingItems = fuse.search(searchTerm);\n\n    addClass(library_bookmarks, 'is-hidden');\n    removeClass(library_sections, 'open');\n    addClass(library_sections, 'closed');\n    matchingItems.map(item => {\n      const row = getElements(`tr[data-id=\"${item.id}\"]`);\n      const section = getElements(`div[data-section-id=\"${item.section}\"].-section`);\n      removeClass(row, 'is-hidden');\n      removeClass(section, 'closed');\n      addClass(section, 'open');\n    })\n  });\n});\n","import { debounce } from 'js-utils/src/function';\nimport init from \"../../common/base/init\";\n\ninit(() => {\n  const highlightsActivator = document.getElementById('highlights-activator');\n\n  if (!highlightsActivator) return;\n\n  const windowSelection = window.getSelection();\n  const contentInput = document.getElementById('highlights_bookmark_content_bookmarkable_content');\n  const highlightsHelper1 = document.createRange();\n        highlightsHelper1.selectNode(document.getElementById('highlights-helper-1'));\n  const highlightsHelper2 = document.createRange();\n        highlightsHelper2.selectNode(document.getElementById('highlights-helper-2'));\n\n  window.addEventListener('mouseup', debounce(50, () => {\n    const highlightedText = windowSelection.toString();\n\n    if (!windowSelection.isCollapsed) {\n      var r = windowSelection.getRangeAt(0).getBoundingClientRect();\n      var rb1 = highlightsHelper1.getBoundingClientRect();\n      var rb2 = highlightsHelper2.getBoundingClientRect();\n      highlightsActivator.style.top = (r.bottom - rb2.top)*100/(rb1.top-rb2.top) + 'px'; //this will place ele below the selection\n      highlightsActivator.style.left = (r.left - rb2.left)*100/(rb1.left-rb2.left) + 'px'; //this will align the right edges together\n      //\n      contentInput.value = highlightedText;\n\n      highlightsActivator.style.display = 'block';\n    }\n  }));\n\n  window.addEventListener('mousedown', debounce(50, () => {\n    setTimeout(() => {\n      highlightsActivator.style.display = 'none';\n    }, 150);\n  }));\n});\n","module.exports = function(el, options) {\n  options = options || {};\n\n  var elementDocument = el.ownerDocument || el;\n  var basicTabbables = [];\n  var orderedTabbables = [];\n\n  // A node is \"available\" if\n  // - it's computed style\n  var isUnavailable = createIsUnavailable(elementDocument);\n\n  var candidateSelectors = [\n    'input',\n    'select',\n    'a[href]',\n    'textarea',\n    'button',\n    '[tabindex]',\n  ];\n\n  var candidates = el.querySelectorAll(candidateSelectors.join(','));\n\n  if (options.includeContainer) {\n    var matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n    if (\n      candidateSelectors.some(function(candidateSelector) {\n        return matches.call(el, candidateSelector);\n      })\n    ) {\n      candidates = Array.prototype.slice.apply(candidates);\n      candidates.unshift(el);\n    }\n  }\n\n  var candidate, candidateIndexAttr, candidateIndex;\n  for (var i = 0, l = candidates.length; i < l; i++) {\n    candidate = candidates[i];\n    candidateIndexAttr = parseInt(candidate.getAttribute('tabindex'), 10)\n    candidateIndex = isNaN(candidateIndexAttr) ? candidate.tabIndex : candidateIndexAttr;\n\n    if (\n      candidateIndex < 0\n      || (candidate.tagName === 'INPUT' && candidate.type === 'hidden')\n      || candidate.disabled\n      || isUnavailable(candidate, elementDocument)\n    ) {\n      continue;\n    }\n\n    if (candidateIndex === 0) {\n      basicTabbables.push(candidate);\n    } else {\n      orderedTabbables.push({\n        index: i,\n        tabIndex: candidateIndex,\n        node: candidate,\n      });\n    }\n  }\n\n  var tabbableNodes = orderedTabbables\n    .sort(function(a, b) {\n      return a.tabIndex === b.tabIndex ? a.index - b.index : a.tabIndex - b.tabIndex;\n    })\n    .map(function(a) {\n      return a.node\n    });\n\n  Array.prototype.push.apply(tabbableNodes, basicTabbables);\n\n  return tabbableNodes;\n}\n\nfunction createIsUnavailable(elementDocument) {\n  // Node cache must be refreshed on every check, in case\n  // the content of the element has changed\n  var isOffCache = [];\n\n  // \"off\" means `display: none;`, as opposed to \"hidden\",\n  // which means `visibility: hidden;`. getComputedStyle\n  // accurately reflects visiblity in context but not\n  // \"off\" state, so we need to recursively check parents.\n\n  function isOff(node, nodeComputedStyle) {\n    if (node === elementDocument.documentElement) return false;\n\n    // Find the cached node (Array.prototype.find not available in IE9)\n    for (var i = 0, length = isOffCache.length; i < length; i++) {\n      if (isOffCache[i][0] === node) return isOffCache[i][1];\n    }\n\n    nodeComputedStyle = nodeComputedStyle || elementDocument.defaultView.getComputedStyle(node);\n\n    var result = false;\n\n    if (nodeComputedStyle.display === 'none') {\n      result = true;\n    } else if (node.parentNode) {\n      result = isOff(node.parentNode);\n    }\n\n    isOffCache.push([node, result]);\n\n    return result;\n  }\n\n  return function isUnavailable(node) {\n    if (node === elementDocument.documentElement) return false;\n\n    var computedStyle = elementDocument.defaultView.getComputedStyle(node);\n\n    if (isOff(node, computedStyle)) return true;\n\n    return computedStyle.visibility === 'hidden';\n  }\n}\n","var tabbable = require('tabbable');\n\nvar listeningFocusTrap = null;\n\nfunction focusTrap(element, userOptions) {\n  var tabbableNodes = [];\n  var firstTabbableNode = null;\n  var lastTabbableNode = null;\n  var nodeFocusedBeforeActivation = null;\n  var active = false;\n  var paused = false;\n  var tabEvent = null;\n\n  var container = (typeof element === 'string')\n    ? document.querySelector(element)\n    : element;\n\n  var config = userOptions || {};\n  config.returnFocusOnDeactivate = (userOptions && userOptions.returnFocusOnDeactivate !== undefined)\n    ? userOptions.returnFocusOnDeactivate\n    : true;\n  config.escapeDeactivates = (userOptions && userOptions.escapeDeactivates !== undefined)\n    ? userOptions.escapeDeactivates\n    : true;\n\n  var trap = {\n    activate: activate,\n    deactivate: deactivate,\n    pause: pause,\n    unpause: unpause,\n  };\n\n  return trap;\n\n  function activate(activateOptions) {\n    if (active) return;\n\n    var defaultedActivateOptions = {\n      onActivate: (activateOptions && activateOptions.onActivate !== undefined)\n        ? activateOptions.onActivate\n        : config.onActivate,\n    };\n\n    active = true;\n    paused = false;\n    nodeFocusedBeforeActivation = document.activeElement;\n\n    if (defaultedActivateOptions.onActivate) {\n      defaultedActivateOptions.onActivate();\n    }\n\n    addListeners();\n    return trap;\n  }\n\n  function deactivate(deactivateOptions) {\n    if (!active) return;\n\n    var defaultedDeactivateOptions = {\n      returnFocus: (deactivateOptions && deactivateOptions.returnFocus !== undefined)\n        ? deactivateOptions.returnFocus\n        : config.returnFocusOnDeactivate,\n      onDeactivate: (deactivateOptions && deactivateOptions.onDeactivate !== undefined)\n        ? deactivateOptions.onDeactivate\n        : config.onDeactivate,\n    };\n\n    removeListeners();\n\n    if (defaultedDeactivateOptions.onDeactivate) {\n      defaultedDeactivateOptions.onDeactivate();\n    }\n\n    if (defaultedDeactivateOptions.returnFocus) {\n      setTimeout(function () {\n        tryFocus(nodeFocusedBeforeActivation);\n      }, 0);\n    }\n\n    active = false;\n    paused = false;\n    return this;\n  }\n\n  function pause() {\n    if (paused || !active) return;\n    paused = true;\n    removeListeners();\n  }\n\n  function unpause() {\n    if (!paused || !active) return;\n    paused = false;\n    addListeners();\n  }\n\n  function addListeners() {\n    if (!active) return;\n\n    // There can be only one listening focus trap at a time\n    if (listeningFocusTrap) {\n      listeningFocusTrap.pause();\n    }\n    listeningFocusTrap = trap;\n\n    updateTabbableNodes();\n    // Ensure that the focused element doesn't capture the event that caused the focus trap activation\n    setTimeout(function () {\n      tryFocus(firstFocusNode());\n    }, 0);\n    document.addEventListener('focus', checkFocus, true);\n    document.addEventListener('click', checkClick, true);\n    document.addEventListener('mousedown', checkPointerDown, true);\n    document.addEventListener('touchstart', checkPointerDown, true);\n    document.addEventListener('keydown', checkKey, true);\n\n    return trap;\n  }\n\n  function removeListeners() {\n    if (!active || listeningFocusTrap !== trap) return;\n\n    document.removeEventListener('focus', checkFocus, true);\n    document.removeEventListener('click', checkClick, true);\n    document.removeEventListener('mousedown', checkPointerDown, true);\n    document.removeEventListener('touchstart', checkPointerDown, true);\n    document.removeEventListener('keydown', checkKey, true);\n\n    listeningFocusTrap = null;\n\n    return trap;\n  }\n\n  function getNodeForOption(optionName) {\n    var optionValue = config[optionName];\n    var node = optionValue;\n    if (!optionValue) {\n      return null;\n    }\n    if (typeof optionValue === 'string') {\n      node = document.querySelector(optionValue);\n      if (!node) {\n        throw new Error('`' + optionName + '` refers to no known node');\n      }\n    }\n    if (typeof optionValue === 'function') {\n      node = optionValue();\n      if (!node) {\n        throw new Error('`' + optionName + '` did not return a node');\n      }\n    }\n    return node;\n  }\n\n  function firstFocusNode() {\n    var node;\n    if (getNodeForOption('initialFocus') !== null) {\n      node = getNodeForOption('initialFocus');\n    } else if (container.contains(document.activeElement)) {\n      node = document.activeElement;\n    } else {\n      node = tabbableNodes[0] || getNodeForOption('fallbackFocus');\n    }\n\n    if (!node) {\n      throw new Error('You can\\'t have a focus-trap without at least one focusable element');\n    }\n\n    return node;\n  }\n\n  // This needs to be done on mousedown and touchstart instead of click\n  // so that it precedes the focus event\n  function checkPointerDown(e) {\n    if (config.clickOutsideDeactivates && !container.contains(e.target)) {\n      deactivate({ returnFocus: false });\n    }\n  }\n\n  function checkClick(e) {\n    if (config.clickOutsideDeactivates) return;\n    if (container.contains(e.target)) return;\n    e.preventDefault();\n    e.stopImmediatePropagation();\n  }\n\n  function checkFocus(e) {\n    if (container.contains(e.target)) return;\n    e.preventDefault();\n    e.stopImmediatePropagation();\n    // Checking for a blur method here resolves a Firefox issue (#15)\n    if (typeof e.target.blur === 'function') e.target.blur();\n\n    if (tabEvent) {\n      readjustFocus(tabEvent);\n    }\n  }\n\n  function checkKey(e) {\n    if (e.key === 'Tab' || e.keyCode === 9) {\n      handleTab(e);\n    }\n\n    if (config.escapeDeactivates !== false && isEscapeEvent(e)) {\n      deactivate();\n    }\n  }\n\n  function handleTab(e) {\n    updateTabbableNodes();\n\n    if (e.target.hasAttribute('tabindex') && Number(e.target.getAttribute('tabindex')) < 0) {\n      return tabEvent = e;\n    }\n\n    e.preventDefault();\n    var currentFocusIndex = tabbableNodes.indexOf(e.target);\n\n    if (e.shiftKey) {\n      if (e.target === firstTabbableNode || tabbableNodes.indexOf(e.target) === -1) {\n        return tryFocus(lastTabbableNode);\n      }\n      return tryFocus(tabbableNodes[currentFocusIndex - 1]);\n    }\n\n    if (e.target === lastTabbableNode) return tryFocus(firstTabbableNode);\n\n    tryFocus(tabbableNodes[currentFocusIndex + 1]);\n  }\n\n  function updateTabbableNodes() {\n    tabbableNodes = tabbable(container);\n    firstTabbableNode = tabbableNodes[0];\n    lastTabbableNode = tabbableNodes[tabbableNodes.length - 1];\n  }\n\n  function readjustFocus(e) {\n    if (e.shiftKey) return tryFocus(lastTabbableNode);\n\n    tryFocus(firstTabbableNode);\n  }\n}\n\nfunction isEscapeEvent(e) {\n  return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;\n}\n\nfunction tryFocus(node) {\n  if (!node || !node.focus) return;\n  if (node === document.activeElement)  return;\n\n  node.focus();\n  if (node.tagName.toLowerCase() === 'input') {\n    node.select();\n  }\n}\n\nmodule.exports = focusTrap;\n","import { getElements } from 'js-utils/src/selector';\nimport { addEventListener } from 'js-utils/src/event';\nimport { toggleClass } from 'js-utils/src/attribute';\nimport { showSmartOutline } from 'js-utils/src/smart-outline';\nimport initFocusTrap from 'focus-trap';\n\nimport init from '../../common/base/init';\n\n// Toggling on mobile\n// Can be toggled on by any button that has `.js--sidebar-trigger` class\n\ninit(() => {\n  const triggers = getElements('.js--sidebar-user-trigger');\n  const sidebar = document.querySelector('.sidebar-user');\n  if(!triggers.length || !sidebar) return;\n\n  const closeBtn = document.querySelector('.sidebar-user__close');\n  const activeTriggerClass = '--active';\n  const activeSidebarClass = '--active';\n  const focusTrap = initFocusTrap(sidebar);\n\n  addEventListener(triggers, 'click', (e) => {\n    e.preventDefault();\n    const isActive = sidebar.classList.contains(activeSidebarClass);\n    toggleClass(triggers, activeTriggerClass, !isActive);\n    sidebar.classList.toggle(activeSidebarClass, !isActive);\n    document.documentElement.classList.toggle('--disable-scroll', !isActive);\n\n    if(!isActive) {\n      focusTrap.activate();\n      closeBtn.focus();\n      showSmartOutline();\n    }\n  });\n\n  addEventListener(closeBtn, 'click', function(e) {\n    e.preventDefault();\n    focusTrap.deactivate();\n    triggers[0].click();\n  });\n\n  // deactivate on link click because of Turbolinks\n  // addEventListener(getElements('a', sidebar), 'click', (e) => {\n  //   if(!e.defaultPrevented) {\n  //     focusTrap.deactivate();\n  //   }\n  // });\n});\n","import StickySidebar from \"sticky-sidebar\";\n// import Player from '@vimeo/player';\n// import zenscroll from 'zenscroll';\nimport { debounce } from \"js-utils/src/function\";\n// import { getElements } from 'js-utils/src/selector';\n\nimport init from \"../../common/base/init\";\n\n// sticky share buttons\n\ninit(() => {\n  let postShare = document.querySelector(\".the-article__share\");\n  if (!postShare) return;\n\n  let fixedHeader = document.querySelector(\".header--fixed\");\n  let topSpacing = fixedHeader ? 100 : 73;\n\n  let sticky = null;\n  const stickyMQ = \"(min-width: 48.0625em)\"; // 'medium' in SASS\n  const stickyConfig = {\n    topSpacing: topSpacing,\n    bottomSpacing: 20,\n    minWidth: 640\n  };\n\n  const toggleSticky = () => {\n    if (window.matchMedia(stickyMQ).matches) {\n      if (!sticky) {\n        sticky = new StickySidebar(\".the-article__share\", stickyConfig);\n      }\n    } else {\n      if (sticky) {\n        sticky.destroy();\n        sticky = null;\n      }\n    }\n  };\n\n  toggleSticky();\n  window.addEventListener(\"resize\", debounce(300, toggleSticky));\n});\n\n// video sections\n\ninit(() => {\n  const container = document.querySelector(\".the-article__video-sections\");\n  if (!container) return;\n\n  const toggler = document.querySelector(\n    \".the-article__video .-video-sections-toggler\"\n  );\n  const video = document.querySelector(\".the-article__video iframe\");\n  const player = new Player(video);\n  const buttons = getElements(\"button\", container);\n\n  toggler.addEventListener(\"click\", e => {\n    e.preventDefault();\n    toggler.classList.toggle(\"--active\");\n    container.classList.toggle(\"--visible\");\n  });\n\n  buttons.forEach(button => {\n    button.addEventListener(\"click\", e => {\n      e.preventDefault();\n      player.setCurrentTime(button.getAttribute(\"data-time\"));\n      zenscroll.center(video);\n      video.focus();\n    });\n  });\n});\n","import init from \"../../common/base/init\"\n\ninit(() => {\n  const articlePdfLinks = document.querySelectorAll(\"a.js-document-pdf\")\n  if (articlePdfLinks.length === 0) return\n\n  setInterval(() => {\n    Array.prototype.forEach.call(articlePdfLinks, function(linkEl) {\n      const fileName = linkEl.dataset.name;\n      const slug = linkEl.dataset.slug;\n      const type = linkEl.dataset.type;\n\n      fetch(`/api/v1/document_url?slug=${slug}&filename=${fileName}&type=${type}`).then((response) => {\n        return response.json()\n      }).then((data) => {\n        if (data.url) {\n          linkEl.href = data.url;\n        }\n      }).catch((error) => {\n        console.error('Error:', error);\n      });\n    })\n  }, 1000 * 60 * 5);\n})\n","import { getElements } from 'js-utils/src/selector';\nimport { addClass, removeClass } from 'js-utils/src/attribute';\n\nimport init from '../../common/base/init';\n\ninit(() => {\n  const quiz = document.querySelector('.quiz');\n  if(!quiz) return;\n\n  const questions = getElements('.-question', quiz);\n  const questionsContainer = getElements('.-question--container', quiz);\n  if(!questions.length) return;\n\n  const container = document.querySelector('.quiz__questions__container');\n  const nextQuestionTrigger = quiz.querySelector('.-next');\n  const prevQuestionTrigger = quiz.querySelector('.-prev');\n  const seeAnswersTrigger = quiz.querySelector('.-see-answers');\n  const startOverQuizTrigger = quiz.querySelector('.-start-over');\n  const questionRadios = getElements('input[type=\"radio\"]', quiz);\n  const submit = quiz.querySelector('.-submit');\n  const quizID = submit.getAttribute('data-quiz-id');\n  const videoID = submit.getAttribute('data-video-id');\n\n  let currentQuestion = 0;\n  let answersArray = [];\n\n  const toggleNavigation = () => {\n    if(currentQuestion === questions.length-1)\n      addClass(nextQuestionTrigger, '--disabled');\n    else\n      removeClass(nextQuestionTrigger, '--disabled');\n\n    if(currentQuestion === 0)\n      addClass(prevQuestionTrigger, '--disabled');\n    else\n      removeClass(prevQuestionTrigger, '--disabled');\n  };\n\n  const nextQuestion = () => {\n    if(currentQuestion >= questions.length - 1) return;\n    const questionOffset = 100 / questions.length;\n    removeClass(nextQuestionTrigger, '--disabled');\n    currentQuestion++;\n    container.style.transform = `translateX(-${questionOffset*currentQuestion}%)`;\n    toggleNavigation();\n  };\n\n  const prevQuestion = () => {\n    if(currentQuestion < 1) return;\n    const questionOffset = 100 / questions.length;\n    removeClass(prevQuestionTrigger, '--disabled');\n    currentQuestion--;\n    container.style.transform = `translateX(-${questionOffset*currentQuestion}%)`;\n    toggleNavigation();\n  };\n\n  const seeAnswers = () => {\n    currentQuestion = 0;\n    container.style.transform = 'translateX(0%)';\n    removeClass(quiz, '--disabled');\n    toggleNavigation();\n  };\n\n  const startOverQuiz = () => {\n    questionsContainer.forEach((question) => {\n      removeClass(question, '-question--correct');\n      removeClass(question, '-question--incorrect');\n    });\n\n    questionRadios.forEach((radio) => {\n      radio.checked = false;\n    });\n\n    currentQuestion = 0;\n    answersArray = [];\n    container.style.transform = 'translateX(0%)';\n    removeClass(quiz, '--disabled');\n    toggleNavigation();\n  };\n\n  nextQuestionTrigger.addEventListener('click', (e) => {\n    e.preventDefault();\n    nextQuestion();\n  });\n\n  prevQuestionTrigger.addEventListener('click', (e) => {\n    e.preventDefault();\n    prevQuestion();\n  });\n\n  seeAnswersTrigger.addEventListener('click', (e) => {\n    e.preventDefault();\n    seeAnswers();\n  });\n\n  startOverQuizTrigger.addEventListener('click', (e) => {\n    e.preventDefault();\n    startOverQuiz();\n  });\n\n  questionRadios.forEach((radio) => {\n    radio.addEventListener('change', function() {\n      addClass(nextQuestionTrigger, '--flash');\n      setTimeout(function() {\n        removeClass(nextQuestionTrigger, '--flash');\n      }, 1500);\n\n      answersArray[(currentQuestion)] = {\n        question_id: this.getAttribute('data-question-id'),\n        option_id: this.getAttribute('data-option-id'),\n      };\n    });\n  });\n\n  submit.addEventListener('click', (e) => {\n    e.preventDefault();\n\n    questionsContainer.forEach((question) => {\n      removeClass(question, '-question--correct');\n      removeClass(question, '-question--incorrect');\n    });\n\n    fetch('/api/v1/quiz_attempts', {\n      method: 'POST',\n      credentials: 'same-origin',\n      headers: {\n        'Content-Type': 'application/json; charset=utf-8',\n      },\n      body: JSON.stringify({\n        quiz_id: quizID,\n        video_id: videoID,\n        answers: answersArray,\n      }),\n    })\n    .then((r) => r.json())\n    .then((response) => {\n      addClass(quiz, '--disabled');\n      questionsContainer.forEach((question) => {\n        addClass(question, '-question--incorrect');\n      });\n      let questionsCorrectArr = response.data.attributes.correct_answers.data;\n      quiz.querySelector('.js-correct-answers').innerHTML = questionsCorrectArr.length;\n      for (let key in questionsCorrectArr) {\n        let questionElem = quiz.querySelector('[data-question=\"'+ questionsCorrectArr[key].attributes.question.data.id +'\"]');\n        removeClass(questionElem, '-question--incorrect');\n        addClass(questionElem, '-question--correct');\n      }\n    });\n  });\n\n  toggleNavigation();\n});\n","import accessibleNav from 'accessiblenav.js';\nimport { getElements } from 'js-utils/src/selector';\n\nimport init from '../../common/base/init';\n\ninit(() => {\n  const items = getElements('.post-share');\n  if(!items.length) return;\n\n  items.forEach((item) => {\n    accessibleNav(item, {\n      selSub: 'ul',\n      selItem: 'li',\n      selButton: 'a',\n      classItemActive: 'do-show-opts',\n      classEnabled: false,\n      click: true,\n      mouseover: true,\n      keypress: true,\n      outsideClick: true,\n      escPress: true,\n    });\n  });\n});\n","import { addEventListener, removeEventListener } from \"./event.js\"\nimport { getElements } from \"./selector.js\"\n\n// local variables\n\nconst animationEventNames = {\n  animation: `animationend`,\n  OAnimation: `oAnimationEnd`,\n  MozAnimation: `animationend`,\n  WebkitAnimation: `webkitAnimationEnd`,\n}\nconst transitionEventNames = {\n  transition: `transitionend`,\n  OTransition: `oTransitionEnd`,\n  MozTransition: `transitionend`,\n  WebkitTransition: `webkitTransitionEnd`,\n}\n\nlet animationEventName = ``\nlet transitionEventName = ``\n\nconst el = document.createElement(`fakeelement`)\nfor (const e in animationEventNames) {\n  if (el.style[e] !== undefined) {\n    animationEventName = `${animationEventNames[e]}.onCssAnimationEnd`\n    break\n  }\n}\nfor (const e in transitionEventNames) {\n  if (el.style[e] !== undefined) {\n    transitionEventName = `${transitionEventNames[e]}.onCssTransitionEnd`\n    break\n  }\n}\n\n// local functions\n\nconst onEnd = (\n  type,\n  elements,\n  callback,\n  { continuous = false, oncePerElems = true, oncePerAnims = true } = {}\n) => {\n  if (!oncePerAnims) {\n    oncePerElems = false\n  }\n\n  elements = getElements(elements)\n  const eventName =\n    type == `animation` ? animationEventName : transitionEventName\n  let animationsCountTotal = 0\n  let animationsPassedTotal = 0\n\n  elements.forEach((element) => {\n    const animationsCount =\n      (\n        window\n          .getComputedStyle(element)\n          [\n            type == `animation` ? `animation-name` : `transition-property`\n          ].match(/,/g) || []\n      ).length + 1\n\n    let animationsPassed = 0\n    animationsCountTotal += animationsCount\n\n    addEventListener(element, eventName, (e) => {\n      if (e.target !== element) {\n        return\n      }\n\n      animationsPassedTotal++\n      animationsPassed++\n\n      if (!continuous && animationsCountTotal == animationsPassedTotal) {\n        removeEventListener(element, eventName)\n      }\n\n      if (\n        continuous ||\n        (!continuous &&\n          ((oncePerElems && animationsCountTotal == animationsPassedTotal) ||\n            (!oncePerElems &&\n              (!oncePerAnims ||\n                (oncePerAnims && animationsCount == animationsPassed)))))\n      ) {\n        callback(element)\n      }\n    })\n  })\n}\n\n/*\n  ------------------------------------------------------------------------------\n  Fires a callback function when CSS animation ends\n\n  @param {String|Element|NodeList|Array} elements\n      Selector, single or multiple elements to work with\n  @param {Function} callback\n      The function to call the animation ends\n  @param {Object} options [optional] Optional comments\n    @param {Bool} continuous (false)\n        If `false` the event listener is removed once all of the desired\n        callback functions are called. Otherwise it will keep listening\n        for future animations\n    @param {Bool} oncePerElems (true)\n        If `true`, the callback function is called only once when all of the\n        animations for all the given elements are completed. Otherwise the\n        callback function is called per element basis, depending on the\n        `oncePerAnims` option\n    @param {Bool} oncePerAnims (true)\n        If `true`, the callback function is called only once when all of the\n        animations have been completed. Otherwise the function is called for\n        each animation completed\n*/\n\nconst onCssAnimationEnd = (...args) => {\n  onEnd(`animation`, ...args)\n}\n\n/*\n  ------------------------------------------------------------------------------\n  Fires a callback function when CSS transition ends\n\n  @param {String|Element|NodeList|Array} elements\n      Selector, single or multiple elements to work with\n  @param {Function} callback\n      The function to call the animation ends\n  @param {Object} options [optional] Optional comments\n    @param {Bool} continuous (false)\n        If `false` the event listener is removed once all of the desired\n        callback functions are called. Otherwise it will keep listening\n        for future transitions\n    @param {Bool} oncePerElems (true)\n        If `true`, the callback function is called only once when all of the\n        transitions for all the given elements are completed. Otherwise the\n        callback function is called per element basis, depending on the\n        `oncePerAnims` option\n    @param {Bool} oncePerAnims (true)\n        If `true`, the callback function is called only once when all of the\n        transitions have been completed. Otherwise the function is called for\n        each transition completed\n*/\n\nconst onCssTransitionEnd = (...args) => {\n  onEnd(`transition`, ...args)\n}\n\n/*\n  ------------------------------------------------------------------------------\n  Cleans all CSS animation end event listeners\n\n  @param {String|Element|NodeList|Array} elements Selector, single or multiple elements\n*/\n\nconst clearCssAnimationEnd = (elements) => {\n  removeEventListener(elements, animationEventName)\n}\n\n/*\n  ------------------------------------------------------------------------------\n  Cleans all CSS transition end event listeners\n\n  @param {String|Element|NodeList|Array} elements Selector, single or multiple elements\n*/\n\nconst clearCssTransitionEnd = (elements) => {\n  removeEventListener(elements, transitionEventName)\n}\n\n// -----------------------------------------------------------------------------\n\nexport {\n  onCssAnimationEnd,\n  onCssTransitionEnd,\n  clearCssAnimationEnd,\n  clearCssTransitionEnd,\n}\n","import Cookies from 'js-cookie';\nimport { getElements } from 'js-utils/src/selector';\nimport { onCssAnimationEnd } from 'js-utils/src/animation';\n\nimport init from '../../common/base/init';\n\ninit(() => {\n  const closeBtns = getElements('.welcomebar__ctas__close');\n  if(!closeBtns.length) return;\n\n  closeBtns.forEach((closeBtn) => {\n    closeBtn.addEventListener('click', (e) => {\n      e.preventDefault();\n      const container = closeBtn.closest('.welcomebar');\n      Cookies.set('welcomebar_closed', container.getAttribute('data-welcomebar-id'), { expires: 365 });\n\n      onCssAnimationEnd(container, () => container.parentNode.removeChild(container));\n      container.classList.add('--hide');\n    });\n  });\n});\n","import init from '../../common/base/init';\n\n// Paywall interaction\n\ninit(() => {\n  const paywall = document.querySelector('.paywall');\n  if(!paywall) return;\n\n  const closeButton = document.querySelector('.paywall .-close');\n\n  closeButton.addEventListener('click', (e) => {\n    e.preventDefault();\n    paywall.style.transform = \"translate(0px,0px)\";\n    paywall.classList.remove('paywall--fixed');\n  });\n\n  const footerElement = document.querySelector('.footer');\n  let pageHeight,\n      footerHeight,\n      currentScroll,\n      footerScrollHeight = 0;\n\n  const setPaywallSizes = () => {\n    pageHeight = document.documentElement.scrollHeight;\n    footerHeight = footerElement.clientHeight;\n    currentScroll = window.pageYOffset;\n    footerScrollHeight = pageHeight - footerHeight;\n\n    repositionPaywall();\n  }\n\n  const repositionPaywall = () => {\n    currentScroll = window.pageYOffset + window.innerHeight;\n    footerScrollHeight = pageHeight - footerHeight;\n\n    const fixedPaywall = document.querySelector('.paywall--fixed');\n    if(!fixedPaywall) return;\n\n    if(currentScroll > footerScrollHeight) {\n      fixedPaywall.style.transform = \"translate(0px,-\" + (currentScroll - footerScrollHeight) + \"px)\";\n    } else {\n      fixedPaywall.style.transform = \"translate(0px,0px)\";\n    }\n  }\n\n  setPaywallSizes();\n\n  window.addEventListener('scroll', () => {\n    repositionPaywall();\n  });\n\n  window.addEventListener('resize', () => {\n    setPaywallSizes();\n  });\n});\n","import { addEventListener } from \"js-utils/src/event\";\n\nimport init from \"../../common/base/init\";\n\n// Toggling on mobile\n// Can be toggled on by any button that has `.js--sidebar-trigger` class\n\ninit(() => {\n  const openFormBtn = document.querySelector(\".button--open-form\");\n  const saveSearchForm = document.querySelector(\".-save-form\");\n\n  if (openFormBtn) {\n    addEventListener(openFormBtn, \"click\", function(e) {\n      saveSearchForm.classList.add(\"--visible\");\n      openFormBtn.classList.remove(\"--visible\");\n    });\n  }\n});\n","export class FetchResponse {\n  constructor (response) {\n    this.response = response\n  }\n\n  get statusCode () {\n    return this.response.status\n  }\n\n  get redirected () {\n    return this.response.redirected\n  }\n\n  get ok () {\n    return this.response.ok\n  }\n\n  get unauthenticated () {\n    return this.statusCode === 401\n  }\n\n  get unprocessableEntity () {\n    return this.statusCode === 422\n  }\n\n  get authenticationURL () {\n    return this.response.headers.get('WWW-Authenticate')\n  }\n\n  get contentType () {\n    const contentType = this.response.headers.get('Content-Type') || ''\n\n    return contentType.replace(/;.*$/, '')\n  }\n\n  get headers () {\n    return this.response.headers\n  }\n\n  get html () {\n    if (this.contentType.match(/^(application|text)\\/(html|xhtml\\+xml)$/)) {\n      return this.text\n    }\n\n    return Promise.reject(new Error(`Expected an HTML response but got \"${this.contentType}\" instead`))\n  }\n\n  get json () {\n    if (this.contentType.match(/^application\\/.*json$/)) {\n      return this.responseJson || (this.responseJson = this.response.json())\n    }\n\n    return Promise.reject(new Error(`Expected a JSON response but got \"${this.contentType}\" instead`))\n  }\n\n  get text () {\n    return this.responseText || (this.responseText = this.response.text())\n  }\n\n  get isTurboStream () {\n    return this.contentType.match(/^text\\/vnd\\.turbo-stream\\.html/)\n  }\n\n  get isScript () {\n    return this.contentType.match(/\\b(?:java|ecma)script\\b/)\n  }\n\n  async renderTurboStream () {\n    if (this.isTurboStream) {\n      if (window.Turbo) {\n        await window.Turbo.renderStreamMessage(await this.text)\n      } else {\n        console.warn('You must set `window.Turbo = Turbo` to automatically process Turbo Stream events with request.js')\n      }\n    } else {\n      return Promise.reject(new Error(`Expected a Turbo Stream response but got \"${this.contentType}\" instead`))\n    }\n  }\n\n  async activeScript () {\n    if (this.isScript) {\n      const script = document.createElement('script')\n      const metaTag = document.querySelector('meta[name=csp-nonce]')\n      const nonce = metaTag && metaTag.content\n      if (nonce) { script.setAttribute('nonce', nonce) }\n      script.innerHTML = await this.text\n      document.body.appendChild(script)\n    } else {\n      return Promise.reject(new Error(`Expected a Script response but got \"${this.contentType}\" instead`))\n    }\n  }\n}\n","export class RequestInterceptor {\n  static register (interceptor) {\n    this.interceptor = interceptor\n  }\n\n  static get () {\n    return this.interceptor\n  }\n\n  static reset () {\n    this.interceptor = undefined\n  }\n}\n","export function getCookie (name) {\n  const cookies = document.cookie ? document.cookie.split('; ') : []\n  const prefix = `${encodeURIComponent(name)}=`\n  const cookie = cookies.find(cookie => cookie.startsWith(prefix))\n\n  if (cookie) {\n    const value = cookie.split('=').slice(1).join('=')\n\n    if (value) {\n      return decodeURIComponent(value)\n    }\n  }\n}\n\nexport function compact (object) {\n  const result = {}\n\n  for (const key in object) {\n    const value = object[key]\n    if (value !== undefined) {\n      result[key] = value\n    }\n  }\n\n  return result\n}\n\nexport function metaContent (name) {\n  const element = document.head.querySelector(`meta[name=\"${name}\"]`)\n  return element && element.content\n}\n\nexport function stringEntriesFromFormData (formData) {\n  return [...formData].reduce((entries, [name, value]) => {\n    return entries.concat(typeof value === 'string' ? [[name, value]] : [])\n  }, [])\n}\n\nexport function mergeEntries (searchParams, entries) {\n  for (const [name, value] of entries) {\n    if (value instanceof window.File) continue\n\n    if (searchParams.has(name) && !name.includes('[]')) {\n      searchParams.delete(name)\n      searchParams.set(name, value)\n    } else {\n      searchParams.append(name, value)\n    }\n  }\n}\n","import { FetchResponse } from './fetch_response'\nimport { RequestInterceptor } from './request_interceptor'\nimport { getCookie, compact, metaContent, stringEntriesFromFormData, mergeEntries } from './lib/utils'\n\nexport class FetchRequest {\n  constructor (method, url, options = {}) {\n    this.method = method\n    this.options = options\n    this.originalUrl = url.toString()\n  }\n\n  async perform () {\n    try {\n      const requestInterceptor = RequestInterceptor.get()\n      if (requestInterceptor) {\n        await requestInterceptor(this)\n      }\n    } catch (error) {\n      console.error(error)\n    }\n\n    const fetch = (this.responseKind === 'turbo-stream' && window.Turbo)\n      ? window.Turbo.fetch\n      : window.fetch\n\n    const response = new FetchResponse(await fetch(this.url, this.fetchOptions))\n\n    if (response.unauthenticated && response.authenticationURL) {\n      return Promise.reject(window.location.href = response.authenticationURL)\n    }\n\n    if (response.isScript) {\n      await response.activeScript()\n    }\n\n    const responseStatusIsTurboStreamable = response.ok || response.unprocessableEntity\n\n    if (responseStatusIsTurboStreamable && response.isTurboStream) {\n      await response.renderTurboStream()\n    }\n\n    return response\n  }\n\n  addHeader (key, value) {\n    const headers = this.additionalHeaders\n    headers[key] = value\n    this.options.headers = headers\n  }\n\n  sameHostname () {\n    if (!this.originalUrl.startsWith('http:')) {\n      return true\n    }\n\n    try {\n      return new URL(this.originalUrl).hostname === window.location.hostname\n    } catch (_) {\n      return true\n    }\n  }\n\n  get fetchOptions () {\n    return {\n      method: this.method.toUpperCase(),\n      headers: this.headers,\n      body: this.formattedBody,\n      signal: this.signal,\n      credentials: this.credentials,\n      redirect: this.redirect\n    }\n  }\n\n  get headers () {\n    const baseHeaders = {\n      'X-Requested-With': 'XMLHttpRequest',\n      'Content-Type': this.contentType,\n      Accept: this.accept\n    }\n\n    if (this.sameHostname()) {\n      baseHeaders['X-CSRF-Token'] = this.csrfToken\n    }\n\n    return compact(\n      Object.assign(baseHeaders, this.additionalHeaders)\n    )\n  }\n\n  get csrfToken () {\n    return getCookie(metaContent('csrf-param')) || metaContent('csrf-token')\n  }\n\n  get contentType () {\n    if (this.options.contentType) {\n      return this.options.contentType\n    } else if (this.body == null || this.body instanceof window.FormData) {\n      return undefined\n    } else if (this.body instanceof window.File) {\n      return this.body.type\n    }\n\n    return 'application/json'\n  }\n\n  get accept () {\n    switch (this.responseKind) {\n      case 'html':\n        return 'text/html, application/xhtml+xml'\n      case 'turbo-stream':\n        return 'text/vnd.turbo-stream.html, text/html, application/xhtml+xml'\n      case 'json':\n        return 'application/json, application/vnd.api+json'\n      case 'script':\n        return 'text/javascript, application/javascript'\n      default:\n        return '*/*'\n    }\n  }\n\n  get body () {\n    return this.options.body\n  }\n\n  get query () {\n    const originalQuery = (this.originalUrl.split('?')[1] || '').split('#')[0]\n    const params = new URLSearchParams(originalQuery)\n\n    let requestQuery = this.options.query\n    if (requestQuery instanceof window.FormData) {\n      requestQuery = stringEntriesFromFormData(requestQuery)\n    } else if (requestQuery instanceof window.URLSearchParams) {\n      requestQuery = requestQuery.entries()\n    } else {\n      requestQuery = Object.entries(requestQuery || {})\n    }\n\n    mergeEntries(params, requestQuery)\n\n    const query = params.toString()\n    return (query.length > 0 ? `?${query}` : '')\n  }\n\n  get url () {\n    return (this.originalUrl.split('?')[0]).split('#')[0] + this.query\n  }\n\n  get responseKind () {\n    return this.options.responseKind || 'html'\n  }\n\n  get signal () {\n    return this.options.signal\n  }\n\n  get redirect () {\n    return this.options.redirect || 'follow'\n  }\n\n  get credentials () {\n    return this.options.credentials || 'same-origin'\n  }\n\n  get additionalHeaders () {\n    return this.options.headers || {}\n  }\n\n  get formattedBody () {\n    const bodyIsAString = Object.prototype.toString.call(this.body) === '[object String]'\n    const contentTypeIsJson = this.headers['Content-Type'] === 'application/json'\n\n    if (contentTypeIsJson && !bodyIsAString) {\n      return JSON.stringify(this.body)\n    }\n\n    return this.body\n  }\n}\n","import { FetchRequest } from '@rails/request.js';\nimport init from '../../common/base/init';\n\ninit(() => {\n  const sendRequestButton = document.querySelector('.-certificate-request .button');\n  if (!sendRequestButton) return;\n\n  sendRequestButton.addEventListener('click', async (e) => {\n    e.preventDefault();\n    sendRequestButton.disabled = true;\n\n    try {\n      const request = new FetchRequest(\"POST\", \"/play/skicka-ansokan\", {\n        responseKind: \"turbo-stream\",\n      });\n\n      const response = await request.perform();\n\n      if (response.ok) {\n        const message = document.querySelector(\n          '.-certificate-request #certificate-message'\n        );\n\n        const confirmation = document.querySelector(\n          '.-certificate-request #certificate-confirmation'\n        );\n\n        if (message) message.classList.add('-hide-message');\n        if (message) message.classList.remove('-message');\n        if (confirmation) confirmation.classList.remove('-confirmation');\n        if (confirmation) confirmation.classList.add('-confirmation-margin');\n      }\n    } catch (error) {\n      sendRequestButton.disabled = false;\n      console.error(\"Request failed\", error);\n    }\n  });\n});\n","/**!\n * Sortable 1.15.6\n * @author\tRubaXa   <trash@rubaxa.org>\n * @author\towenm    <owen23355@gmail.com>\n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) {\n      symbols = symbols.filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n  return target;\n}\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function (obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function (obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n  return _typeof(obj);\n}\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n  var key, i;\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n  return target;\n}\nfunction _toConsumableArray(arr) {\n  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n  return arr2;\n}\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.6\";\n\nfunction userAgent(pattern) {\n  if (typeof window !== 'undefined' && window.navigator) {\n    return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n  }\n}\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n  capture: false,\n  passive: false\n};\nfunction on(el, event, fn) {\n  el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction off(el, event, fn) {\n  el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction matches( /**HTMLElement*/el, /**String*/selector) {\n  if (!selector) return;\n  selector[0] === '>' && (selector = selector.substring(1));\n  if (el) {\n    try {\n      if (el.matches) {\n        return el.matches(selector);\n      } else if (el.msMatchesSelector) {\n        return el.msMatchesSelector(selector);\n      } else if (el.webkitMatchesSelector) {\n        return el.webkitMatchesSelector(selector);\n      }\n    } catch (_) {\n      return false;\n    }\n  }\n  return false;\n}\nfunction getParentOrHost(el) {\n  return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\nfunction closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {\n  if (el) {\n    ctx = ctx || document;\n    do {\n      if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n        return el;\n      }\n      if (el === ctx) break;\n      /* jshint boss:true */\n    } while (el = getParentOrHost(el));\n  }\n  return null;\n}\nvar R_SPACE = /\\s+/g;\nfunction toggleClass(el, name, state) {\n  if (el && name) {\n    if (el.classList) {\n      el.classList[state ? 'add' : 'remove'](name);\n    } else {\n      var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n      el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n    }\n  }\n}\nfunction css(el, prop, val) {\n  var style = el && el.style;\n  if (style) {\n    if (val === void 0) {\n      if (document.defaultView && document.defaultView.getComputedStyle) {\n        val = document.defaultView.getComputedStyle(el, '');\n      } else if (el.currentStyle) {\n        val = el.currentStyle;\n      }\n      return prop === void 0 ? val : val[prop];\n    } else {\n      if (!(prop in style) && prop.indexOf('webkit') === -1) {\n        prop = '-webkit-' + prop;\n      }\n      style[prop] = val + (typeof val === 'string' ? '' : 'px');\n    }\n  }\n}\nfunction matrix(el, selfOnly) {\n  var appliedTransforms = '';\n  if (typeof el === 'string') {\n    appliedTransforms = el;\n  } else {\n    do {\n      var transform = css(el, 'transform');\n      if (transform && transform !== 'none') {\n        appliedTransforms = transform + ' ' + appliedTransforms;\n      }\n      /* jshint boss:true */\n    } while (!selfOnly && (el = el.parentNode));\n  }\n  var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n  /*jshint -W056 */\n  return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction find(ctx, tagName, iterator) {\n  if (ctx) {\n    var list = ctx.getElementsByTagName(tagName),\n      i = 0,\n      n = list.length;\n    if (iterator) {\n      for (; i < n; i++) {\n        iterator(list[i], i);\n      }\n    }\n    return list;\n  }\n  return [];\n}\nfunction getWindowScrollingElement() {\n  var scrollingElement = document.scrollingElement;\n  if (scrollingElement) {\n    return scrollingElement;\n  } else {\n    return document.documentElement;\n  }\n}\n\n/**\r\n * Returns the \"bounding client rect\" of given element\r\n * @param  {HTMLElement} el                       The element whose boundingClientRect is wanted\r\n * @param  {[Boolean]} relativeToContainingBlock  Whether the rect should be relative to the containing block of (including) the container\r\n * @param  {[Boolean]} relativeToNonStaticParent  Whether the rect should be relative to the relative parent of (including) the contaienr\r\n * @param  {[Boolean]} undoScale                  Whether the container's scale() should be undone\r\n * @param  {[HTMLElement]} container              The parent the element will be placed in\r\n * @return {Object}                               The boundingClientRect of el, with specified adjustments\r\n */\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n  if (!el.getBoundingClientRect && el !== window) return;\n  var elRect, top, left, bottom, right, height, width;\n  if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n    elRect = el.getBoundingClientRect();\n    top = elRect.top;\n    left = elRect.left;\n    bottom = elRect.bottom;\n    right = elRect.right;\n    height = elRect.height;\n    width = elRect.width;\n  } else {\n    top = 0;\n    left = 0;\n    bottom = window.innerHeight;\n    right = window.innerWidth;\n    height = window.innerHeight;\n    width = window.innerWidth;\n  }\n  if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n    // Adjust for translate()\n    container = container || el.parentNode;\n\n    // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n    // Not needed on <= IE11\n    if (!IE11OrLess) {\n      do {\n        if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n          var containerRect = container.getBoundingClientRect();\n\n          // Set relative to edges of padding box of container\n          top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n          left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n          bottom = top + elRect.height;\n          right = left + elRect.width;\n          break;\n        }\n        /* jshint boss:true */\n      } while (container = container.parentNode);\n    }\n  }\n  if (undoScale && el !== window) {\n    // Adjust for scale()\n    var elMatrix = matrix(container || el),\n      scaleX = elMatrix && elMatrix.a,\n      scaleY = elMatrix && elMatrix.d;\n    if (elMatrix) {\n      top /= scaleY;\n      left /= scaleX;\n      width /= scaleX;\n      height /= scaleY;\n      bottom = top + height;\n      right = left + width;\n    }\n  }\n  return {\n    top: top,\n    left: left,\n    bottom: bottom,\n    right: right,\n    width: width,\n    height: height\n  };\n}\n\n/**\r\n * Checks if a side of an element is scrolled past a side of its parents\r\n * @param  {HTMLElement}  el           The element who's side being scrolled out of view is in question\r\n * @param  {String}       elSide       Side of the element in question ('top', 'left', 'right', 'bottom')\r\n * @param  {String}       parentSide   Side of the parent in question ('top', 'left', 'right', 'bottom')\r\n * @return {HTMLElement}               The parent scroll element that the el's side is scrolled past, or null if there is no such element\r\n */\nfunction isScrolledPast(el, elSide, parentSide) {\n  var parent = getParentAutoScrollElement(el, true),\n    elSideVal = getRect(el)[elSide];\n\n  /* jshint boss:true */\n  while (parent) {\n    var parentSideVal = getRect(parent)[parentSide],\n      visible = void 0;\n    if (parentSide === 'top' || parentSide === 'left') {\n      visible = elSideVal >= parentSideVal;\n    } else {\n      visible = elSideVal <= parentSideVal;\n    }\n    if (!visible) return parent;\n    if (parent === getWindowScrollingElement()) break;\n    parent = getParentAutoScrollElement(parent, false);\n  }\n  return false;\n}\n\n/**\r\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\r\n * and non-draggable elements\r\n * @param  {HTMLElement} el       The parent element\r\n * @param  {Number} childNum      The index of the child\r\n * @param  {Object} options       Parent Sortable's options\r\n * @return {HTMLElement}          The child at index childNum, or null if not found\r\n */\nfunction getChild(el, childNum, options, includeDragEl) {\n  var currentChild = 0,\n    i = 0,\n    children = el.children;\n  while (i < children.length) {\n    if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n      if (currentChild === childNum) {\n        return children[i];\n      }\n      currentChild++;\n    }\n    i++;\n  }\n  return null;\n}\n\n/**\r\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\r\n * @param  {HTMLElement} el       Parent element\r\n * @param  {selector} selector    Any other elements that should be ignored\r\n * @return {HTMLElement}          The last child, ignoring ghostEl\r\n */\nfunction lastChild(el, selector) {\n  var last = el.lastElementChild;\n  while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n    last = last.previousElementSibling;\n  }\n  return last || null;\n}\n\n/**\r\n * Returns the index of an element within its parent for a selected set of\r\n * elements\r\n * @param  {HTMLElement} el\r\n * @param  {selector} selector\r\n * @return {number}\r\n */\nfunction index(el, selector) {\n  var index = 0;\n  if (!el || !el.parentNode) {\n    return -1;\n  }\n\n  /* jshint boss:true */\n  while (el = el.previousElementSibling) {\n    if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n      index++;\n    }\n  }\n  return index;\n}\n\n/**\r\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\r\n * The value is returned in real pixels.\r\n * @param  {HTMLElement} el\r\n * @return {Array}             Offsets in the format of [left, top]\r\n */\nfunction getRelativeScrollOffset(el) {\n  var offsetLeft = 0,\n    offsetTop = 0,\n    winScroller = getWindowScrollingElement();\n  if (el) {\n    do {\n      var elMatrix = matrix(el),\n        scaleX = elMatrix.a,\n        scaleY = elMatrix.d;\n      offsetLeft += el.scrollLeft * scaleX;\n      offsetTop += el.scrollTop * scaleY;\n    } while (el !== winScroller && (el = el.parentNode));\n  }\n  return [offsetLeft, offsetTop];\n}\n\n/**\r\n * Returns the index of the object within the given array\r\n * @param  {Array} arr   Array that may or may not hold the object\r\n * @param  {Object} obj  An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\r\n * @return {Number}      The index of the object in the array, or -1\r\n */\nfunction indexOfObject(arr, obj) {\n  for (var i in arr) {\n    if (!arr.hasOwnProperty(i)) continue;\n    for (var key in obj) {\n      if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n    }\n  }\n  return -1;\n}\nfunction getParentAutoScrollElement(el, includeSelf) {\n  // skip to window\n  if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n  var elem = el;\n  var gotSelf = false;\n  do {\n    // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n    if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n      var elemCSS = css(elem);\n      if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n        if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n        if (gotSelf || includeSelf) return elem;\n        gotSelf = true;\n      }\n    }\n    /* jshint boss:true */\n  } while (elem = elem.parentNode);\n  return getWindowScrollingElement();\n}\nfunction extend(dst, src) {\n  if (dst && src) {\n    for (var key in src) {\n      if (src.hasOwnProperty(key)) {\n        dst[key] = src[key];\n      }\n    }\n  }\n  return dst;\n}\nfunction isRectEqual(rect1, rect2) {\n  return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\nvar _throttleTimeout;\nfunction throttle(callback, ms) {\n  return function () {\n    if (!_throttleTimeout) {\n      var args = arguments,\n        _this = this;\n      if (args.length === 1) {\n        callback.call(_this, args[0]);\n      } else {\n        callback.apply(_this, args);\n      }\n      _throttleTimeout = setTimeout(function () {\n        _throttleTimeout = void 0;\n      }, ms);\n    }\n  };\n}\nfunction cancelThrottle() {\n  clearTimeout(_throttleTimeout);\n  _throttleTimeout = void 0;\n}\nfunction scrollBy(el, x, y) {\n  el.scrollLeft += x;\n  el.scrollTop += y;\n}\nfunction clone(el) {\n  var Polymer = window.Polymer;\n  var $ = window.jQuery || window.Zepto;\n  if (Polymer && Polymer.dom) {\n    return Polymer.dom(el).cloneNode(true);\n  } else if ($) {\n    return $(el).clone(true)[0];\n  } else {\n    return el.cloneNode(true);\n  }\n}\nfunction setRect(el, rect) {\n  css(el, 'position', 'absolute');\n  css(el, 'top', rect.top);\n  css(el, 'left', rect.left);\n  css(el, 'width', rect.width);\n  css(el, 'height', rect.height);\n}\nfunction unsetRect(el) {\n  css(el, 'position', '');\n  css(el, 'top', '');\n  css(el, 'left', '');\n  css(el, 'width', '');\n  css(el, 'height', '');\n}\nfunction getChildContainingRectFromElement(container, options, ghostEl) {\n  var rect = {};\n  Array.from(container.children).forEach(function (child) {\n    var _rect$left, _rect$top, _rect$right, _rect$bottom;\n    if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;\n    var childRect = getRect(child);\n    rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);\n    rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);\n    rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);\n    rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);\n  });\n  rect.width = rect.right - rect.left;\n  rect.height = rect.bottom - rect.top;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n  var animationStates = [],\n    animationCallbackId;\n  return {\n    captureAnimationState: function captureAnimationState() {\n      animationStates = [];\n      if (!this.options.animation) return;\n      var children = [].slice.call(this.el.children);\n      children.forEach(function (child) {\n        if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n        animationStates.push({\n          target: child,\n          rect: getRect(child)\n        });\n        var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);\n\n        // If animating: compensate for current animation\n        if (child.thisAnimationDuration) {\n          var childMatrix = matrix(child, true);\n          if (childMatrix) {\n            fromRect.top -= childMatrix.f;\n            fromRect.left -= childMatrix.e;\n          }\n        }\n        child.fromRect = fromRect;\n      });\n    },\n    addAnimationState: function addAnimationState(state) {\n      animationStates.push(state);\n    },\n    removeAnimationState: function removeAnimationState(target) {\n      animationStates.splice(indexOfObject(animationStates, {\n        target: target\n      }), 1);\n    },\n    animateAll: function animateAll(callback) {\n      var _this = this;\n      if (!this.options.animation) {\n        clearTimeout(animationCallbackId);\n        if (typeof callback === 'function') callback();\n        return;\n      }\n      var animating = false,\n        animationTime = 0;\n      animationStates.forEach(function (state) {\n        var time = 0,\n          target = state.target,\n          fromRect = target.fromRect,\n          toRect = getRect(target),\n          prevFromRect = target.prevFromRect,\n          prevToRect = target.prevToRect,\n          animatingRect = state.rect,\n          targetMatrix = matrix(target, true);\n        if (targetMatrix) {\n          // Compensate for current animation\n          toRect.top -= targetMatrix.f;\n          toRect.left -= targetMatrix.e;\n        }\n        target.toRect = toRect;\n        if (target.thisAnimationDuration) {\n          // Could also check if animatingRect is between fromRect and toRect\n          if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&\n          // Make sure animatingRect is on line between toRect & fromRect\n          (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n            // If returning to same place as started from animation and on same axis\n            time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n          }\n        }\n\n        // if fromRect != toRect: animate\n        if (!isRectEqual(toRect, fromRect)) {\n          target.prevFromRect = fromRect;\n          target.prevToRect = toRect;\n          if (!time) {\n            time = _this.options.animation;\n          }\n          _this.animate(target, animatingRect, toRect, time);\n        }\n        if (time) {\n          animating = true;\n          animationTime = Math.max(animationTime, time);\n          clearTimeout(target.animationResetTimer);\n          target.animationResetTimer = setTimeout(function () {\n            target.animationTime = 0;\n            target.prevFromRect = null;\n            target.fromRect = null;\n            target.prevToRect = null;\n            target.thisAnimationDuration = null;\n          }, time);\n          target.thisAnimationDuration = time;\n        }\n      });\n      clearTimeout(animationCallbackId);\n      if (!animating) {\n        if (typeof callback === 'function') callback();\n      } else {\n        animationCallbackId = setTimeout(function () {\n          if (typeof callback === 'function') callback();\n        }, animationTime);\n      }\n      animationStates = [];\n    },\n    animate: function animate(target, currentRect, toRect, duration) {\n      if (duration) {\n        css(target, 'transition', '');\n        css(target, 'transform', '');\n        var elMatrix = matrix(this.el),\n          scaleX = elMatrix && elMatrix.a,\n          scaleY = elMatrix && elMatrix.d,\n          translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n          translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n        target.animatingX = !!translateX;\n        target.animatingY = !!translateY;\n        css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n        this.forRepaintDummy = repaint(target); // repaint\n\n        css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n        css(target, 'transform', 'translate3d(0,0,0)');\n        typeof target.animated === 'number' && clearTimeout(target.animated);\n        target.animated = setTimeout(function () {\n          css(target, 'transition', '');\n          css(target, 'transform', '');\n          target.animated = false;\n          target.animatingX = false;\n          target.animatingY = false;\n        }, duration);\n      }\n    }\n  };\n}\nfunction repaint(target) {\n  return target.offsetWidth;\n}\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n  return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n  initializeByDefault: true\n};\nvar PluginManager = {\n  mount: function mount(plugin) {\n    // Set default static properties\n    for (var option in defaults) {\n      if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n        plugin[option] = defaults[option];\n      }\n    }\n    plugins.forEach(function (p) {\n      if (p.pluginName === plugin.pluginName) {\n        throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n      }\n    });\n    plugins.push(plugin);\n  },\n  pluginEvent: function pluginEvent(eventName, sortable, evt) {\n    var _this = this;\n    this.eventCanceled = false;\n    evt.cancel = function () {\n      _this.eventCanceled = true;\n    };\n    var eventNameGlobal = eventName + 'Global';\n    plugins.forEach(function (plugin) {\n      if (!sortable[plugin.pluginName]) return;\n      // Fire global events if it exists in this sortable\n      if (sortable[plugin.pluginName][eventNameGlobal]) {\n        sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n          sortable: sortable\n        }, evt));\n      }\n\n      // Only fire plugin event if plugin is enabled in this sortable,\n      // and plugin has event defined\n      if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n        sortable[plugin.pluginName][eventName](_objectSpread2({\n          sortable: sortable\n        }, evt));\n      }\n    });\n  },\n  initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n    plugins.forEach(function (plugin) {\n      var pluginName = plugin.pluginName;\n      if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n      var initialized = new plugin(sortable, el, sortable.options);\n      initialized.sortable = sortable;\n      initialized.options = sortable.options;\n      sortable[pluginName] = initialized;\n\n      // Add default options from plugin\n      _extends(defaults, initialized.defaults);\n    });\n    for (var option in sortable.options) {\n      if (!sortable.options.hasOwnProperty(option)) continue;\n      var modified = this.modifyOption(sortable, option, sortable.options[option]);\n      if (typeof modified !== 'undefined') {\n        sortable.options[option] = modified;\n      }\n    }\n  },\n  getEventProperties: function getEventProperties(name, sortable) {\n    var eventProperties = {};\n    plugins.forEach(function (plugin) {\n      if (typeof plugin.eventProperties !== 'function') return;\n      _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n    });\n    return eventProperties;\n  },\n  modifyOption: function modifyOption(sortable, name, value) {\n    var modifiedValue;\n    plugins.forEach(function (plugin) {\n      // Plugin must exist on the Sortable\n      if (!sortable[plugin.pluginName]) return;\n\n      // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n      if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n        modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n      }\n    });\n    return modifiedValue;\n  }\n};\n\nfunction dispatchEvent(_ref) {\n  var sortable = _ref.sortable,\n    rootEl = _ref.rootEl,\n    name = _ref.name,\n    targetEl = _ref.targetEl,\n    cloneEl = _ref.cloneEl,\n    toEl = _ref.toEl,\n    fromEl = _ref.fromEl,\n    oldIndex = _ref.oldIndex,\n    newIndex = _ref.newIndex,\n    oldDraggableIndex = _ref.oldDraggableIndex,\n    newDraggableIndex = _ref.newDraggableIndex,\n    originalEvent = _ref.originalEvent,\n    putSortable = _ref.putSortable,\n    extraEventProperties = _ref.extraEventProperties;\n  sortable = sortable || rootEl && rootEl[expando];\n  if (!sortable) return;\n  var evt,\n    options = sortable.options,\n    onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n  // Support for new CustomEvent feature\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent(name, {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent(name, true, true);\n  }\n  evt.to = toEl || rootEl;\n  evt.from = fromEl || rootEl;\n  evt.item = targetEl || rootEl;\n  evt.clone = cloneEl;\n  evt.oldIndex = oldIndex;\n  evt.newIndex = newIndex;\n  evt.oldDraggableIndex = oldDraggableIndex;\n  evt.newDraggableIndex = newDraggableIndex;\n  evt.originalEvent = originalEvent;\n  evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n  var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n  for (var option in allEventProperties) {\n    evt[option] = allEventProperties[option];\n  }\n  if (rootEl) {\n    rootEl.dispatchEvent(evt);\n  }\n  if (options[onName]) {\n    options[onName].call(sortable, evt);\n  }\n}\n\nvar _excluded = [\"evt\"];\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    originalEvent = _ref.evt,\n    data = _objectWithoutProperties(_ref, _excluded);\n  PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n    dragEl: dragEl,\n    parentEl: parentEl,\n    ghostEl: ghostEl,\n    rootEl: rootEl,\n    nextEl: nextEl,\n    lastDownEl: lastDownEl,\n    cloneEl: cloneEl,\n    cloneHidden: cloneHidden,\n    dragStarted: moved,\n    putSortable: putSortable,\n    activeSortable: Sortable.active,\n    originalEvent: originalEvent,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex,\n    hideGhostForTarget: _hideGhostForTarget,\n    unhideGhostForTarget: _unhideGhostForTarget,\n    cloneNowHidden: function cloneNowHidden() {\n      cloneHidden = true;\n    },\n    cloneNowShown: function cloneNowShown() {\n      cloneHidden = false;\n    },\n    dispatchSortableEvent: function dispatchSortableEvent(name) {\n      _dispatchEvent({\n        sortable: sortable,\n        name: name,\n        originalEvent: originalEvent\n      });\n    }\n  }, data));\n};\nfunction _dispatchEvent(info) {\n  dispatchEvent(_objectSpread2({\n    putSortable: putSortable,\n    cloneEl: cloneEl,\n    targetEl: dragEl,\n    rootEl: rootEl,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex\n  }, info));\n}\nvar dragEl,\n  parentEl,\n  ghostEl,\n  rootEl,\n  nextEl,\n  lastDownEl,\n  cloneEl,\n  cloneHidden,\n  oldIndex,\n  newIndex,\n  oldDraggableIndex,\n  newDraggableIndex,\n  activeGroup,\n  putSortable,\n  awaitingDragStarted = false,\n  ignoreNextClick = false,\n  sortables = [],\n  tapEvt,\n  touchEvt,\n  lastDx,\n  lastDy,\n  tapDistanceLeft,\n  tapDistanceTop,\n  moved,\n  lastTarget,\n  lastDirection,\n  pastFirstInvertThresh = false,\n  isCircumstantialInvert = false,\n  targetMoveDistance,\n  // For positioning ghost absolutely\n  ghostRelativeParent,\n  ghostRelativeParentInitialScroll = [],\n  // (left, top)\n\n  _silent = false,\n  savedInputChecked = [];\n\n/** @const */\nvar documentExists = typeof document !== 'undefined',\n  PositionGhostAbsolutely = IOS,\n  CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n  // This will not pass for IE9, because IE9 DnD only works on anchors\n  supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n  supportCssPointerEvents = function () {\n    if (!documentExists) return;\n    // false when <= IE11\n    if (IE11OrLess) {\n      return false;\n    }\n    var el = document.createElement('x');\n    el.style.cssText = 'pointer-events:auto';\n    return el.style.pointerEvents === 'auto';\n  }(),\n  _detectDirection = function _detectDirection(el, options) {\n    var elCSS = css(el),\n      elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n      child1 = getChild(el, 0, options),\n      child2 = getChild(el, 1, options),\n      firstChildCSS = child1 && css(child1),\n      secondChildCSS = child2 && css(child2),\n      firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n      secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n    if (elCSS.display === 'flex') {\n      return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n    }\n    if (elCSS.display === 'grid') {\n      return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n    }\n    if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n      var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n      return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n    }\n    return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n  },\n  _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n    var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n      dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n      dragElOppLength = vertical ? dragRect.width : dragRect.height,\n      targetS1Opp = vertical ? targetRect.left : targetRect.top,\n      targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n      targetOppLength = vertical ? targetRect.width : targetRect.height;\n    return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n  },\n  /**\r\n   * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n   * @param  {Number} x      X position\r\n   * @param  {Number} y      Y position\r\n   * @return {HTMLElement}   Element of the first found nearest Sortable\r\n   */\n  _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n    var ret;\n    sortables.some(function (sortable) {\n      var threshold = sortable[expando].options.emptyInsertThreshold;\n      if (!threshold || lastChild(sortable)) return;\n      var rect = getRect(sortable),\n        insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n        insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n      if (insideHorizontally && insideVertically) {\n        return ret = sortable;\n      }\n    });\n    return ret;\n  },\n  _prepareGroup = function _prepareGroup(options) {\n    function toFn(value, pull) {\n      return function (to, from, dragEl, evt) {\n        var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n        if (value == null && (pull || sameGroup)) {\n          // Default pull value\n          // Default pull and put value if same group\n          return true;\n        } else if (value == null || value === false) {\n          return false;\n        } else if (pull && value === 'clone') {\n          return value;\n        } else if (typeof value === 'function') {\n          return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n        } else {\n          var otherGroup = (pull ? to : from).options.group.name;\n          return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n        }\n      };\n    }\n    var group = {};\n    var originalGroup = options.group;\n    if (!originalGroup || _typeof(originalGroup) != 'object') {\n      originalGroup = {\n        name: originalGroup\n      };\n    }\n    group.name = originalGroup.name;\n    group.checkPull = toFn(originalGroup.pull, true);\n    group.checkPut = toFn(originalGroup.put);\n    group.revertClone = originalGroup.revertClone;\n    options.group = group;\n  },\n  _hideGhostForTarget = function _hideGhostForTarget() {\n    if (!supportCssPointerEvents && ghostEl) {\n      css(ghostEl, 'display', 'none');\n    }\n  },\n  _unhideGhostForTarget = function _unhideGhostForTarget() {\n    if (!supportCssPointerEvents && ghostEl) {\n      css(ghostEl, 'display', '');\n    }\n  };\n\n// #1184 fix - Prevent click event on fallback if dragged but item not changed position\nif (documentExists && !ChromeForAndroid) {\n  document.addEventListener('click', function (evt) {\n    if (ignoreNextClick) {\n      evt.preventDefault();\n      evt.stopPropagation && evt.stopPropagation();\n      evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n      ignoreNextClick = false;\n      return false;\n    }\n  }, true);\n}\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n  if (dragEl) {\n    evt = evt.touches ? evt.touches[0] : evt;\n    var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n    if (nearest) {\n      // Create imitation event\n      var event = {};\n      for (var i in evt) {\n        if (evt.hasOwnProperty(i)) {\n          event[i] = evt[i];\n        }\n      }\n      event.target = event.rootEl = nearest;\n      event.preventDefault = void 0;\n      event.stopPropagation = void 0;\n      nearest[expando]._onDragOver(event);\n    }\n  }\n};\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n  if (dragEl) {\n    dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n  }\n};\n\n/**\r\n * @class  Sortable\r\n * @param  {HTMLElement}  el\r\n * @param  {Object}       [options]\r\n */\nfunction Sortable(el, options) {\n  if (!(el && el.nodeType && el.nodeType === 1)) {\n    throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n  }\n  this.el = el; // root element\n  this.options = options = _extends({}, options);\n\n  // Export instance\n  el[expando] = this;\n  var defaults = {\n    group: null,\n    sort: true,\n    disabled: false,\n    store: null,\n    handle: null,\n    draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n    swapThreshold: 1,\n    // percentage; 0 <= x <= 1\n    invertSwap: false,\n    // invert always\n    invertedSwapThreshold: null,\n    // will be set to same as swapThreshold if default\n    removeCloneOnHide: true,\n    direction: function direction() {\n      return _detectDirection(el, this.options);\n    },\n    ghostClass: 'sortable-ghost',\n    chosenClass: 'sortable-chosen',\n    dragClass: 'sortable-drag',\n    ignore: 'a, img',\n    filter: null,\n    preventOnFilter: true,\n    animation: 0,\n    easing: null,\n    setData: function setData(dataTransfer, dragEl) {\n      dataTransfer.setData('Text', dragEl.textContent);\n    },\n    dropBubble: false,\n    dragoverBubble: false,\n    dataIdAttr: 'data-id',\n    delay: 0,\n    delayOnTouchOnly: false,\n    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n    forceFallback: false,\n    fallbackClass: 'sortable-fallback',\n    fallbackOnBody: false,\n    fallbackTolerance: 0,\n    fallbackOffset: {\n      x: 0,\n      y: 0\n    },\n    // Disabled on Safari: #1571; Enabled on Safari IOS: #2244\n    supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && (!Safari || IOS),\n    emptyInsertThreshold: 5\n  };\n  PluginManager.initializePlugins(this, el, defaults);\n\n  // Set default options\n  for (var name in defaults) {\n    !(name in options) && (options[name] = defaults[name]);\n  }\n  _prepareGroup(options);\n\n  // Bind all private methods\n  for (var fn in this) {\n    if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n      this[fn] = this[fn].bind(this);\n    }\n  }\n\n  // Setup drag mode\n  this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n  if (this.nativeDraggable) {\n    // Touch start threshold cannot be greater than the native dragstart threshold\n    this.options.touchStartThreshold = 1;\n  }\n\n  // Bind events\n  if (options.supportPointer) {\n    on(el, 'pointerdown', this._onTapStart);\n  } else {\n    on(el, 'mousedown', this._onTapStart);\n    on(el, 'touchstart', this._onTapStart);\n  }\n  if (this.nativeDraggable) {\n    on(el, 'dragover', this);\n    on(el, 'dragenter', this);\n  }\n  sortables.push(this.el);\n\n  // Restore sorting\n  options.store && options.store.get && this.sort(options.store.get(this) || []);\n\n  // Add animation state manager\n  _extends(this, AnimationStateManager());\n}\nSortable.prototype = /** @lends Sortable.prototype */{\n  constructor: Sortable,\n  _isOutsideThisEl: function _isOutsideThisEl(target) {\n    if (!this.el.contains(target) && target !== this.el) {\n      lastTarget = null;\n    }\n  },\n  _getDirection: function _getDirection(evt, target) {\n    return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n  },\n  _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {\n    if (!evt.cancelable) return;\n    var _this = this,\n      el = this.el,\n      options = this.options,\n      preventOnFilter = options.preventOnFilter,\n      type = evt.type,\n      touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n      target = (touch || evt).target,\n      originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n      filter = options.filter;\n    _saveInputCheckedState(el);\n\n    // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n    if (dragEl) {\n      return;\n    }\n    if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n      return; // only left button and enabled\n    }\n\n    // cancel dnd if original target is content editable\n    if (originalTarget.isContentEditable) {\n      return;\n    }\n\n    // Safari ignores further event handling after mousedown\n    if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n      return;\n    }\n    target = closest(target, options.draggable, el, false);\n    if (target && target.animated) {\n      return;\n    }\n    if (lastDownEl === target) {\n      // Ignoring duplicate `down`\n      return;\n    }\n\n    // Get the index of the dragged element within its parent\n    oldIndex = index(target);\n    oldDraggableIndex = index(target, options.draggable);\n\n    // Check filter\n    if (typeof filter === 'function') {\n      if (filter.call(this, evt, target, this)) {\n        _dispatchEvent({\n          sortable: _this,\n          rootEl: originalTarget,\n          name: 'filter',\n          targetEl: target,\n          toEl: el,\n          fromEl: el\n        });\n        pluginEvent('filter', _this, {\n          evt: evt\n        });\n        preventOnFilter && evt.preventDefault();\n        return; // cancel dnd\n      }\n    } else if (filter) {\n      filter = filter.split(',').some(function (criteria) {\n        criteria = closest(originalTarget, criteria.trim(), el, false);\n        if (criteria) {\n          _dispatchEvent({\n            sortable: _this,\n            rootEl: criteria,\n            name: 'filter',\n            targetEl: target,\n            fromEl: el,\n            toEl: el\n          });\n          pluginEvent('filter', _this, {\n            evt: evt\n          });\n          return true;\n        }\n      });\n      if (filter) {\n        preventOnFilter && evt.preventDefault();\n        return; // cancel dnd\n      }\n    }\n    if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n      return;\n    }\n\n    // Prepare `dragstart`\n    this._prepareDragStart(evt, touch, target);\n  },\n  _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {\n    var _this = this,\n      el = _this.el,\n      options = _this.options,\n      ownerDocument = el.ownerDocument,\n      dragStartFn;\n    if (target && !dragEl && target.parentNode === el) {\n      var dragRect = getRect(target);\n      rootEl = el;\n      dragEl = target;\n      parentEl = dragEl.parentNode;\n      nextEl = dragEl.nextSibling;\n      lastDownEl = target;\n      activeGroup = options.group;\n      Sortable.dragged = dragEl;\n      tapEvt = {\n        target: dragEl,\n        clientX: (touch || evt).clientX,\n        clientY: (touch || evt).clientY\n      };\n      tapDistanceLeft = tapEvt.clientX - dragRect.left;\n      tapDistanceTop = tapEvt.clientY - dragRect.top;\n      this._lastX = (touch || evt).clientX;\n      this._lastY = (touch || evt).clientY;\n      dragEl.style['will-change'] = 'all';\n      dragStartFn = function dragStartFn() {\n        pluginEvent('delayEnded', _this, {\n          evt: evt\n        });\n        if (Sortable.eventCanceled) {\n          _this._onDrop();\n          return;\n        }\n        // Delayed drag has been triggered\n        // we can re-enable the events: touchmove/mousemove\n        _this._disableDelayedDragEvents();\n        if (!FireFox && _this.nativeDraggable) {\n          dragEl.draggable = true;\n        }\n\n        // Bind the events: dragstart/dragend\n        _this._triggerDragStart(evt, touch);\n\n        // Drag start event\n        _dispatchEvent({\n          sortable: _this,\n          name: 'choose',\n          originalEvent: evt\n        });\n\n        // Chosen item\n        toggleClass(dragEl, options.chosenClass, true);\n      };\n\n      // Disable \"draggable\"\n      options.ignore.split(',').forEach(function (criteria) {\n        find(dragEl, criteria.trim(), _disableDraggable);\n      });\n      on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n      if (options.supportPointer) {\n        on(ownerDocument, 'pointerup', _this._onDrop);\n        // Native D&D triggers pointercancel\n        !this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);\n      } else {\n        on(ownerDocument, 'mouseup', _this._onDrop);\n        on(ownerDocument, 'touchend', _this._onDrop);\n        on(ownerDocument, 'touchcancel', _this._onDrop);\n      }\n\n      // Make dragEl draggable (must be before delay for FireFox)\n      if (FireFox && this.nativeDraggable) {\n        this.options.touchStartThreshold = 4;\n        dragEl.draggable = true;\n      }\n      pluginEvent('delayStart', this, {\n        evt: evt\n      });\n\n      // Delay is impossible for native DnD in Edge or IE\n      if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n        if (Sortable.eventCanceled) {\n          this._onDrop();\n          return;\n        }\n        // If the user moves the pointer or let go the click or touch\n        // before the delay has been reached:\n        // disable the delayed drag\n        if (options.supportPointer) {\n          on(ownerDocument, 'pointerup', _this._disableDelayedDrag);\n          on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);\n        } else {\n          on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n          on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n          on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n        }\n        on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n        on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n        options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n        _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n      } else {\n        dragStartFn();\n      }\n    }\n  },\n  _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {\n    var touch = e.touches ? e.touches[0] : e;\n    if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n      this._disableDelayedDrag();\n    }\n  },\n  _disableDelayedDrag: function _disableDelayedDrag() {\n    dragEl && _disableDraggable(dragEl);\n    clearTimeout(this._dragStartTimer);\n    this._disableDelayedDragEvents();\n  },\n  _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n    off(ownerDocument, 'touchend', this._disableDelayedDrag);\n    off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n    off(ownerDocument, 'pointerup', this._disableDelayedDrag);\n    off(ownerDocument, 'pointercancel', this._disableDelayedDrag);\n    off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n  },\n  _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {\n    touch = touch || evt.pointerType == 'touch' && evt;\n    if (!this.nativeDraggable || touch) {\n      if (this.options.supportPointer) {\n        on(document, 'pointermove', this._onTouchMove);\n      } else if (touch) {\n        on(document, 'touchmove', this._onTouchMove);\n      } else {\n        on(document, 'mousemove', this._onTouchMove);\n      }\n    } else {\n      on(dragEl, 'dragend', this);\n      on(rootEl, 'dragstart', this._onDragStart);\n    }\n    try {\n      if (document.selection) {\n        _nextTick(function () {\n          document.selection.empty();\n        });\n      } else {\n        window.getSelection().removeAllRanges();\n      }\n    } catch (err) {}\n  },\n  _dragStarted: function _dragStarted(fallback, evt) {\n    awaitingDragStarted = false;\n    if (rootEl && dragEl) {\n      pluginEvent('dragStarted', this, {\n        evt: evt\n      });\n      if (this.nativeDraggable) {\n        on(document, 'dragover', _checkOutsideTargetEl);\n      }\n      var options = this.options;\n\n      // Apply effect\n      !fallback && toggleClass(dragEl, options.dragClass, false);\n      toggleClass(dragEl, options.ghostClass, true);\n      Sortable.active = this;\n      fallback && this._appendGhost();\n\n      // Drag start event\n      _dispatchEvent({\n        sortable: this,\n        name: 'start',\n        originalEvent: evt\n      });\n    } else {\n      this._nulling();\n    }\n  },\n  _emulateDragOver: function _emulateDragOver() {\n    if (touchEvt) {\n      this._lastX = touchEvt.clientX;\n      this._lastY = touchEvt.clientY;\n      _hideGhostForTarget();\n      var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n      var parent = target;\n      while (target && target.shadowRoot) {\n        target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n        if (target === parent) break;\n        parent = target;\n      }\n      dragEl.parentNode[expando]._isOutsideThisEl(target);\n      if (parent) {\n        do {\n          if (parent[expando]) {\n            var inserted = void 0;\n            inserted = parent[expando]._onDragOver({\n              clientX: touchEvt.clientX,\n              clientY: touchEvt.clientY,\n              target: target,\n              rootEl: parent\n            });\n            if (inserted && !this.options.dragoverBubble) {\n              break;\n            }\n          }\n          target = parent; // store last element\n        }\n        /* jshint boss:true */ while (parent = getParentOrHost(parent));\n      }\n      _unhideGhostForTarget();\n    }\n  },\n  _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {\n    if (tapEvt) {\n      var options = this.options,\n        fallbackTolerance = options.fallbackTolerance,\n        fallbackOffset = options.fallbackOffset,\n        touch = evt.touches ? evt.touches[0] : evt,\n        ghostMatrix = ghostEl && matrix(ghostEl, true),\n        scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n        scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n        relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n        dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n        dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n\n      // only set the status to dragging, when we are actually dragging\n      if (!Sortable.active && !awaitingDragStarted) {\n        if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n          return;\n        }\n        this._onDragStart(evt, true);\n      }\n      if (ghostEl) {\n        if (ghostMatrix) {\n          ghostMatrix.e += dx - (lastDx || 0);\n          ghostMatrix.f += dy - (lastDy || 0);\n        } else {\n          ghostMatrix = {\n            a: 1,\n            b: 0,\n            c: 0,\n            d: 1,\n            e: dx,\n            f: dy\n          };\n        }\n        var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n        css(ghostEl, 'webkitTransform', cssMatrix);\n        css(ghostEl, 'mozTransform', cssMatrix);\n        css(ghostEl, 'msTransform', cssMatrix);\n        css(ghostEl, 'transform', cssMatrix);\n        lastDx = dx;\n        lastDy = dy;\n        touchEvt = touch;\n      }\n      evt.cancelable && evt.preventDefault();\n    }\n  },\n  _appendGhost: function _appendGhost() {\n    // Bug if using scale(): https://stackoverflow.com/questions/2637058\n    // Not being adjusted for\n    if (!ghostEl) {\n      var container = this.options.fallbackOnBody ? document.body : rootEl,\n        rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n        options = this.options;\n\n      // Position absolutely\n      if (PositionGhostAbsolutely) {\n        // Get relatively positioned parent\n        ghostRelativeParent = container;\n        while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n          ghostRelativeParent = ghostRelativeParent.parentNode;\n        }\n        if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n          if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n          rect.top += ghostRelativeParent.scrollTop;\n          rect.left += ghostRelativeParent.scrollLeft;\n        } else {\n          ghostRelativeParent = getWindowScrollingElement();\n        }\n        ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n      }\n      ghostEl = dragEl.cloneNode(true);\n      toggleClass(ghostEl, options.ghostClass, false);\n      toggleClass(ghostEl, options.fallbackClass, true);\n      toggleClass(ghostEl, options.dragClass, true);\n      css(ghostEl, 'transition', '');\n      css(ghostEl, 'transform', '');\n      css(ghostEl, 'box-sizing', 'border-box');\n      css(ghostEl, 'margin', 0);\n      css(ghostEl, 'top', rect.top);\n      css(ghostEl, 'left', rect.left);\n      css(ghostEl, 'width', rect.width);\n      css(ghostEl, 'height', rect.height);\n      css(ghostEl, 'opacity', '0.8');\n      css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n      css(ghostEl, 'zIndex', '100000');\n      css(ghostEl, 'pointerEvents', 'none');\n      Sortable.ghost = ghostEl;\n      container.appendChild(ghostEl);\n\n      // Set transform-origin\n      css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n    }\n  },\n  _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {\n    var _this = this;\n    var dataTransfer = evt.dataTransfer;\n    var options = _this.options;\n    pluginEvent('dragStart', this, {\n      evt: evt\n    });\n    if (Sortable.eventCanceled) {\n      this._onDrop();\n      return;\n    }\n    pluginEvent('setupClone', this);\n    if (!Sortable.eventCanceled) {\n      cloneEl = clone(dragEl);\n      cloneEl.removeAttribute(\"id\");\n      cloneEl.draggable = false;\n      cloneEl.style['will-change'] = '';\n      this._hideClone();\n      toggleClass(cloneEl, this.options.chosenClass, false);\n      Sortable.clone = cloneEl;\n    }\n\n    // #1143: IFrame support workaround\n    _this.cloneId = _nextTick(function () {\n      pluginEvent('clone', _this);\n      if (Sortable.eventCanceled) return;\n      if (!_this.options.removeCloneOnHide) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      }\n      _this._hideClone();\n      _dispatchEvent({\n        sortable: _this,\n        name: 'clone'\n      });\n    });\n    !fallback && toggleClass(dragEl, options.dragClass, true);\n\n    // Set proper drop events\n    if (fallback) {\n      ignoreNextClick = true;\n      _this._loopId = setInterval(_this._emulateDragOver, 50);\n    } else {\n      // Undo what was set in _prepareDragStart before drag started\n      off(document, 'mouseup', _this._onDrop);\n      off(document, 'touchend', _this._onDrop);\n      off(document, 'touchcancel', _this._onDrop);\n      if (dataTransfer) {\n        dataTransfer.effectAllowed = 'move';\n        options.setData && options.setData.call(_this, dataTransfer, dragEl);\n      }\n      on(document, 'drop', _this);\n\n      // #1276 fix:\n      css(dragEl, 'transform', 'translateZ(0)');\n    }\n    awaitingDragStarted = true;\n    _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n    on(document, 'selectstart', _this);\n    moved = true;\n    window.getSelection().removeAllRanges();\n    if (Safari) {\n      css(document.body, 'user-select', 'none');\n    }\n  },\n  // Returns true - if no further action is needed (either inserted or another condition)\n  _onDragOver: function _onDragOver( /**Event*/evt) {\n    var el = this.el,\n      target = evt.target,\n      dragRect,\n      targetRect,\n      revert,\n      options = this.options,\n      group = options.group,\n      activeSortable = Sortable.active,\n      isOwner = activeGroup === group,\n      canSort = options.sort,\n      fromSortable = putSortable || activeSortable,\n      vertical,\n      _this = this,\n      completedFired = false;\n    if (_silent) return;\n    function dragOverEvent(name, extra) {\n      pluginEvent(name, _this, _objectSpread2({\n        evt: evt,\n        isOwner: isOwner,\n        axis: vertical ? 'vertical' : 'horizontal',\n        revert: revert,\n        dragRect: dragRect,\n        targetRect: targetRect,\n        canSort: canSort,\n        fromSortable: fromSortable,\n        target: target,\n        completed: completed,\n        onMove: function onMove(target, after) {\n          return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n        },\n        changed: changed\n      }, extra));\n    }\n\n    // Capture animation state\n    function capture() {\n      dragOverEvent('dragOverAnimationCapture');\n      _this.captureAnimationState();\n      if (_this !== fromSortable) {\n        fromSortable.captureAnimationState();\n      }\n    }\n\n    // Return invocation when dragEl is inserted (or completed)\n    function completed(insertion) {\n      dragOverEvent('dragOverCompleted', {\n        insertion: insertion\n      });\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        } else {\n          activeSortable._showClone(_this);\n        }\n        if (_this !== fromSortable) {\n          // Set ghost class to new sortable's ghost class\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n          toggleClass(dragEl, options.ghostClass, true);\n        }\n        if (putSortable !== _this && _this !== Sortable.active) {\n          putSortable = _this;\n        } else if (_this === Sortable.active && putSortable) {\n          putSortable = null;\n        }\n\n        // Animation\n        if (fromSortable === _this) {\n          _this._ignoreWhileAnimating = target;\n        }\n        _this.animateAll(function () {\n          dragOverEvent('dragOverAnimationComplete');\n          _this._ignoreWhileAnimating = null;\n        });\n        if (_this !== fromSortable) {\n          fromSortable.animateAll();\n          fromSortable._ignoreWhileAnimating = null;\n        }\n      }\n\n      // Null lastTarget if it is not inside a previously swapped element\n      if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n        lastTarget = null;\n      }\n\n      // no bubbling and not fallback\n      if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n        dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n\n        // Do not detect for empty insert if already inserted\n        !insertion && nearestEmptyInsertDetectEvent(evt);\n      }\n      !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n      return completedFired = true;\n    }\n\n    // Call when dragEl has been inserted\n    function changed() {\n      newIndex = index(dragEl);\n      newDraggableIndex = index(dragEl, options.draggable);\n      _dispatchEvent({\n        sortable: _this,\n        name: 'change',\n        toEl: el,\n        newIndex: newIndex,\n        newDraggableIndex: newDraggableIndex,\n        originalEvent: evt\n      });\n    }\n    if (evt.preventDefault !== void 0) {\n      evt.cancelable && evt.preventDefault();\n    }\n    target = closest(target, options.draggable, el, true);\n    dragOverEvent('dragOver');\n    if (Sortable.eventCanceled) return completedFired;\n    if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n      return completed(false);\n    }\n    ignoreNextClick = false;\n    if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n    : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n      vertical = this._getDirection(evt, target) === 'vertical';\n      dragRect = getRect(dragEl);\n      dragOverEvent('dragOverValid');\n      if (Sortable.eventCanceled) return completedFired;\n      if (revert) {\n        parentEl = rootEl; // actualization\n        capture();\n        this._hideClone();\n        dragOverEvent('revert');\n        if (!Sortable.eventCanceled) {\n          if (nextEl) {\n            rootEl.insertBefore(dragEl, nextEl);\n          } else {\n            rootEl.appendChild(dragEl);\n          }\n        }\n        return completed(true);\n      }\n      var elLastChild = lastChild(el, options.draggable);\n      if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n        // Insert to end of list\n\n        // If already at end of list: Do not insert\n        if (elLastChild === dragEl) {\n          return completed(false);\n        }\n\n        // if there is a last element, it is the target\n        if (elLastChild && el === evt.target) {\n          target = elLastChild;\n        }\n        if (target) {\n          targetRect = getRect(target);\n        }\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n          capture();\n          if (elLastChild && elLastChild.nextSibling) {\n            // the last draggable element is not the last node\n            el.insertBefore(dragEl, elLastChild.nextSibling);\n          } else {\n            el.appendChild(dragEl);\n          }\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n        // Insert to start of list\n        var firstChild = getChild(el, 0, options, true);\n        if (firstChild === dragEl) {\n          return completed(false);\n        }\n        target = firstChild;\n        targetRect = getRect(target);\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n          capture();\n          el.insertBefore(dragEl, firstChild);\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (target.parentNode === el) {\n        targetRect = getRect(target);\n        var direction = 0,\n          targetBeforeFirstSwap,\n          differentLevel = dragEl.parentNode !== el,\n          differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n          side1 = vertical ? 'top' : 'left',\n          scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n          scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n        if (lastTarget !== target) {\n          targetBeforeFirstSwap = targetRect[side1];\n          pastFirstInvertThresh = false;\n          isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n        }\n        direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n        var sibling;\n        if (direction !== 0) {\n          // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n          var dragIndex = index(dragEl);\n          do {\n            dragIndex -= direction;\n            sibling = parentEl.children[dragIndex];\n          } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n        }\n        // If dragEl is already beside target: Do not insert\n        if (direction === 0 || sibling === target) {\n          return completed(false);\n        }\n        lastTarget = target;\n        lastDirection = direction;\n        var nextSibling = target.nextElementSibling,\n          after = false;\n        after = direction === 1;\n        var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n        if (moveVector !== false) {\n          if (moveVector === 1 || moveVector === -1) {\n            after = moveVector === 1;\n          }\n          _silent = true;\n          setTimeout(_unsilent, 30);\n          capture();\n          if (after && !nextSibling) {\n            el.appendChild(dragEl);\n          } else {\n            target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n          }\n\n          // Undo chrome's scroll adjustment (has no effect on other browsers)\n          if (scrolledPastTop) {\n            scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n          }\n          parentEl = dragEl.parentNode; // actualization\n\n          // must be done before animation\n          if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n            targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n          }\n          changed();\n          return completed(true);\n        }\n      }\n      if (el.contains(dragEl)) {\n        return completed(false);\n      }\n    }\n    return false;\n  },\n  _ignoreWhileAnimating: null,\n  _offMoveEvents: function _offMoveEvents() {\n    off(document, 'mousemove', this._onTouchMove);\n    off(document, 'touchmove', this._onTouchMove);\n    off(document, 'pointermove', this._onTouchMove);\n    off(document, 'dragover', nearestEmptyInsertDetectEvent);\n    off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n    off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n  },\n  _offUpEvents: function _offUpEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._onDrop);\n    off(ownerDocument, 'touchend', this._onDrop);\n    off(ownerDocument, 'pointerup', this._onDrop);\n    off(ownerDocument, 'pointercancel', this._onDrop);\n    off(ownerDocument, 'touchcancel', this._onDrop);\n    off(document, 'selectstart', this);\n  },\n  _onDrop: function _onDrop( /**Event*/evt) {\n    var el = this.el,\n      options = this.options;\n\n    // Get the index of the dragged element within its parent\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    pluginEvent('drop', this, {\n      evt: evt\n    });\n    parentEl = dragEl && dragEl.parentNode;\n\n    // Get again after plugin event\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    if (Sortable.eventCanceled) {\n      this._nulling();\n      return;\n    }\n    awaitingDragStarted = false;\n    isCircumstantialInvert = false;\n    pastFirstInvertThresh = false;\n    clearInterval(this._loopId);\n    clearTimeout(this._dragStartTimer);\n    _cancelNextTick(this.cloneId);\n    _cancelNextTick(this._dragStartId);\n\n    // Unbind events\n    if (this.nativeDraggable) {\n      off(document, 'drop', this);\n      off(el, 'dragstart', this._onDragStart);\n    }\n    this._offMoveEvents();\n    this._offUpEvents();\n    if (Safari) {\n      css(document.body, 'user-select', '');\n    }\n    css(dragEl, 'transform', '');\n    if (evt) {\n      if (moved) {\n        evt.cancelable && evt.preventDefault();\n        !options.dropBubble && evt.stopPropagation();\n      }\n      ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        // Remove clone(s)\n        cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n      }\n      if (dragEl) {\n        if (this.nativeDraggable) {\n          off(dragEl, 'dragend', this);\n        }\n        _disableDraggable(dragEl);\n        dragEl.style['will-change'] = '';\n\n        // Remove classes\n        // ghostClass is added in dragStarted\n        if (moved && !awaitingDragStarted) {\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n        }\n        toggleClass(dragEl, this.options.chosenClass, false);\n\n        // Drag stop event\n        _dispatchEvent({\n          sortable: this,\n          name: 'unchoose',\n          toEl: parentEl,\n          newIndex: null,\n          newDraggableIndex: null,\n          originalEvent: evt\n        });\n        if (rootEl !== parentEl) {\n          if (newIndex >= 0) {\n            // Add event\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'add',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n\n            // Remove event\n            _dispatchEvent({\n              sortable: this,\n              name: 'remove',\n              toEl: parentEl,\n              originalEvent: evt\n            });\n\n            // drag from one list and drop into another\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'sort',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n            _dispatchEvent({\n              sortable: this,\n              name: 'sort',\n              toEl: parentEl,\n              originalEvent: evt\n            });\n          }\n          putSortable && putSortable.save();\n        } else {\n          if (newIndex !== oldIndex) {\n            if (newIndex >= 0) {\n              // drag & drop within the same list\n              _dispatchEvent({\n                sortable: this,\n                name: 'update',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n              _dispatchEvent({\n                sortable: this,\n                name: 'sort',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n            }\n          }\n        }\n        if (Sortable.active) {\n          /* jshint eqnull:true */\n          if (newIndex == null || newIndex === -1) {\n            newIndex = oldIndex;\n            newDraggableIndex = oldDraggableIndex;\n          }\n          _dispatchEvent({\n            sortable: this,\n            name: 'end',\n            toEl: parentEl,\n            originalEvent: evt\n          });\n\n          // Save sorting\n          this.save();\n        }\n      }\n    }\n    this._nulling();\n  },\n  _nulling: function _nulling() {\n    pluginEvent('nulling', this);\n    rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n    savedInputChecked.forEach(function (el) {\n      el.checked = true;\n    });\n    savedInputChecked.length = lastDx = lastDy = 0;\n  },\n  handleEvent: function handleEvent( /**Event*/evt) {\n    switch (evt.type) {\n      case 'drop':\n      case 'dragend':\n        this._onDrop(evt);\n        break;\n      case 'dragenter':\n      case 'dragover':\n        if (dragEl) {\n          this._onDragOver(evt);\n          _globalDragOver(evt);\n        }\n        break;\n      case 'selectstart':\n        evt.preventDefault();\n        break;\n    }\n  },\n  /**\r\n   * Serializes the item into an array of string.\r\n   * @returns {String[]}\r\n   */\n  toArray: function toArray() {\n    var order = [],\n      el,\n      children = this.el.children,\n      i = 0,\n      n = children.length,\n      options = this.options;\n    for (; i < n; i++) {\n      el = children[i];\n      if (closest(el, options.draggable, this.el, false)) {\n        order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n      }\n    }\n    return order;\n  },\n  /**\r\n   * Sorts the elements according to the array.\r\n   * @param  {String[]}  order  order of the items\r\n   */\n  sort: function sort(order, useAnimation) {\n    var items = {},\n      rootEl = this.el;\n    this.toArray().forEach(function (id, i) {\n      var el = rootEl.children[i];\n      if (closest(el, this.options.draggable, rootEl, false)) {\n        items[id] = el;\n      }\n    }, this);\n    useAnimation && this.captureAnimationState();\n    order.forEach(function (id) {\n      if (items[id]) {\n        rootEl.removeChild(items[id]);\n        rootEl.appendChild(items[id]);\n      }\n    });\n    useAnimation && this.animateAll();\n  },\n  /**\r\n   * Save the current sorting\r\n   */\n  save: function save() {\n    var store = this.options.store;\n    store && store.set && store.set(this);\n  },\n  /**\r\n   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n   * @param   {HTMLElement}  el\r\n   * @param   {String}       [selector]  default: `options.draggable`\r\n   * @returns {HTMLElement|null}\r\n   */\n  closest: function closest$1(el, selector) {\n    return closest(el, selector || this.options.draggable, this.el, false);\n  },\n  /**\r\n   * Set/get option\r\n   * @param   {string} name\r\n   * @param   {*}      [value]\r\n   * @returns {*}\r\n   */\n  option: function option(name, value) {\n    var options = this.options;\n    if (value === void 0) {\n      return options[name];\n    } else {\n      var modifiedValue = PluginManager.modifyOption(this, name, value);\n      if (typeof modifiedValue !== 'undefined') {\n        options[name] = modifiedValue;\n      } else {\n        options[name] = value;\n      }\n      if (name === 'group') {\n        _prepareGroup(options);\n      }\n    }\n  },\n  /**\r\n   * Destroy\r\n   */\n  destroy: function destroy() {\n    pluginEvent('destroy', this);\n    var el = this.el;\n    el[expando] = null;\n    off(el, 'mousedown', this._onTapStart);\n    off(el, 'touchstart', this._onTapStart);\n    off(el, 'pointerdown', this._onTapStart);\n    if (this.nativeDraggable) {\n      off(el, 'dragover', this);\n      off(el, 'dragenter', this);\n    }\n    // Remove draggable attributes\n    Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n      el.removeAttribute('draggable');\n    });\n    this._onDrop();\n    this._disableDelayedDragEvents();\n    sortables.splice(sortables.indexOf(this.el), 1);\n    this.el = el = null;\n  },\n  _hideClone: function _hideClone() {\n    if (!cloneHidden) {\n      pluginEvent('hideClone', this);\n      if (Sortable.eventCanceled) return;\n      css(cloneEl, 'display', 'none');\n      if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n        cloneEl.parentNode.removeChild(cloneEl);\n      }\n      cloneHidden = true;\n    }\n  },\n  _showClone: function _showClone(putSortable) {\n    if (putSortable.lastPutMode !== 'clone') {\n      this._hideClone();\n      return;\n    }\n    if (cloneHidden) {\n      pluginEvent('showClone', this);\n      if (Sortable.eventCanceled) return;\n\n      // show clone at dragEl or original position\n      if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      } else if (nextEl) {\n        rootEl.insertBefore(cloneEl, nextEl);\n      } else {\n        rootEl.appendChild(cloneEl);\n      }\n      if (this.options.group.revertClone) {\n        this.animate(dragEl, cloneEl);\n      }\n      css(cloneEl, 'display', '');\n      cloneHidden = false;\n    }\n  }\n};\nfunction _globalDragOver( /**Event*/evt) {\n  if (evt.dataTransfer) {\n    evt.dataTransfer.dropEffect = 'move';\n  }\n  evt.cancelable && evt.preventDefault();\n}\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n  var evt,\n    sortable = fromEl[expando],\n    onMoveFn = sortable.options.onMove,\n    retVal;\n  // Support for new CustomEvent feature\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent('move', {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent('move', true, true);\n  }\n  evt.to = toEl;\n  evt.from = fromEl;\n  evt.dragged = dragEl;\n  evt.draggedRect = dragRect;\n  evt.related = targetEl || toEl;\n  evt.relatedRect = targetRect || getRect(toEl);\n  evt.willInsertAfter = willInsertAfter;\n  evt.originalEvent = originalEvent;\n  fromEl.dispatchEvent(evt);\n  if (onMoveFn) {\n    retVal = onMoveFn.call(sortable, evt, originalEvent);\n  }\n  return retVal;\n}\nfunction _disableDraggable(el) {\n  el.draggable = false;\n}\nfunction _unsilent() {\n  _silent = false;\n}\nfunction _ghostIsFirst(evt, vertical, sortable) {\n  var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));\n  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n  var spacer = 10;\n  return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction _ghostIsLast(evt, vertical, sortable) {\n  var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));\n  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n  var spacer = 10;\n  return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n  var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n    targetLength = vertical ? targetRect.height : targetRect.width,\n    targetS1 = vertical ? targetRect.top : targetRect.left,\n    targetS2 = vertical ? targetRect.bottom : targetRect.right,\n    invert = false;\n  if (!invertSwap) {\n    // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n    if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n      // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n      // check if past first invert threshold on side opposite of lastDirection\n      if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n        // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n        pastFirstInvertThresh = true;\n      }\n      if (!pastFirstInvertThresh) {\n        // dragEl shadow (target move distance shadow)\n        if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n        : mouseOnAxis > targetS2 - targetMoveDistance) {\n          return -lastDirection;\n        }\n      } else {\n        invert = true;\n      }\n    } else {\n      // Regular\n      if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n        return _getInsertDirection(target);\n      }\n    }\n  }\n  invert = invert || invertSwap;\n  if (invert) {\n    // Invert of regular\n    if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n      return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n    }\n  }\n  return 0;\n}\n\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param  {HTMLElement} target       The target whose position dragEl is being inserted at\r\n * @return {Number}                   Direction dragEl must be swapped\r\n */\nfunction _getInsertDirection(target) {\n  if (index(dragEl) < index(target)) {\n    return 1;\n  } else {\n    return -1;\n  }\n}\n\n/**\r\n * Generate id\r\n * @param   {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\nfunction _generateId(el) {\n  var str = el.tagName + el.className + el.src + el.href + el.textContent,\n    i = str.length,\n    sum = 0;\n  while (i--) {\n    sum += str.charCodeAt(i);\n  }\n  return sum.toString(36);\n}\nfunction _saveInputCheckedState(root) {\n  savedInputChecked.length = 0;\n  var inputs = root.getElementsByTagName('input');\n  var idx = inputs.length;\n  while (idx--) {\n    var el = inputs[idx];\n    el.checked && savedInputChecked.push(el);\n  }\n}\nfunction _nextTick(fn) {\n  return setTimeout(fn, 0);\n}\nfunction _cancelNextTick(id) {\n  return clearTimeout(id);\n}\n\n// Fixed #973:\nif (documentExists) {\n  on(document, 'touchmove', function (evt) {\n    if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n      evt.preventDefault();\n    }\n  });\n}\n\n// Export utils\nSortable.utils = {\n  on: on,\n  off: off,\n  css: css,\n  find: find,\n  is: function is(el, selector) {\n    return !!closest(el, selector, el, false);\n  },\n  extend: extend,\n  throttle: throttle,\n  closest: closest,\n  toggleClass: toggleClass,\n  clone: clone,\n  index: index,\n  nextTick: _nextTick,\n  cancelNextTick: _cancelNextTick,\n  detectDirection: _detectDirection,\n  getChild: getChild,\n  expando: expando\n};\n\n/**\r\n * Get the Sortable instance of an element\r\n * @param  {HTMLElement} element The element\r\n * @return {Sortable|undefined}         The instance of Sortable\r\n */\nSortable.get = function (element) {\n  return element[expando];\n};\n\n/**\r\n * Mount a plugin to Sortable\r\n * @param  {...SortablePlugin|SortablePlugin[]} plugins       Plugins being mounted\r\n */\nSortable.mount = function () {\n  for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n    plugins[_key] = arguments[_key];\n  }\n  if (plugins[0].constructor === Array) plugins = plugins[0];\n  plugins.forEach(function (plugin) {\n    if (!plugin.prototype || !plugin.prototype.constructor) {\n      throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n    }\n    if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n    PluginManager.mount(plugin);\n  });\n};\n\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement}  el\r\n * @param {Object}      [options]\r\n */\nSortable.create = function (el, options) {\n  return new Sortable(el, options);\n};\n\n// Export\nSortable.version = version;\n\nvar autoScrolls = [],\n  scrollEl,\n  scrollRootEl,\n  scrolling = false,\n  lastAutoScrollX,\n  lastAutoScrollY,\n  touchEvt$1,\n  pointerElemChangedInterval;\nfunction AutoScrollPlugin() {\n  function AutoScroll() {\n    this.defaults = {\n      scroll: true,\n      forceAutoScrollFallback: false,\n      scrollSensitivity: 30,\n      scrollSpeed: 10,\n      bubbleScroll: true\n    };\n\n    // Bind all private methods\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n  }\n  AutoScroll.prototype = {\n    dragStarted: function dragStarted(_ref) {\n      var originalEvent = _ref.originalEvent;\n      if (this.sortable.nativeDraggable) {\n        on(document, 'dragover', this._handleAutoScroll);\n      } else {\n        if (this.options.supportPointer) {\n          on(document, 'pointermove', this._handleFallbackAutoScroll);\n        } else if (originalEvent.touches) {\n          on(document, 'touchmove', this._handleFallbackAutoScroll);\n        } else {\n          on(document, 'mousemove', this._handleFallbackAutoScroll);\n        }\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref2) {\n      var originalEvent = _ref2.originalEvent;\n      // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n      if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n        this._handleAutoScroll(originalEvent);\n      }\n    },\n    drop: function drop() {\n      if (this.sortable.nativeDraggable) {\n        off(document, 'dragover', this._handleAutoScroll);\n      } else {\n        off(document, 'pointermove', this._handleFallbackAutoScroll);\n        off(document, 'touchmove', this._handleFallbackAutoScroll);\n        off(document, 'mousemove', this._handleFallbackAutoScroll);\n      }\n      clearPointerElemChangedInterval();\n      clearAutoScrolls();\n      cancelThrottle();\n    },\n    nulling: function nulling() {\n      touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n      autoScrolls.length = 0;\n    },\n    _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n      this._handleAutoScroll(evt, true);\n    },\n    _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n      var _this = this;\n      var x = (evt.touches ? evt.touches[0] : evt).clientX,\n        y = (evt.touches ? evt.touches[0] : evt).clientY,\n        elem = document.elementFromPoint(x, y);\n      touchEvt$1 = evt;\n\n      // IE does not seem to have native autoscroll,\n      // Edge's autoscroll seems too conditional,\n      // MACOS Safari does not have autoscroll,\n      // Firefox and Chrome are good\n      if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n        autoScroll(evt, this.options, elem, fallback);\n\n        // Listener for pointer element change\n        var ogElemScroller = getParentAutoScrollElement(elem, true);\n        if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n          pointerElemChangedInterval && clearPointerElemChangedInterval();\n          // Detect for pointer elem change, emulating native DnD behaviour\n          pointerElemChangedInterval = setInterval(function () {\n            var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n            if (newElem !== ogElemScroller) {\n              ogElemScroller = newElem;\n              clearAutoScrolls();\n            }\n            autoScroll(evt, _this.options, newElem, fallback);\n          }, 10);\n          lastAutoScrollX = x;\n          lastAutoScrollY = y;\n        }\n      } else {\n        // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n        if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n          clearAutoScrolls();\n          return;\n        }\n        autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n      }\n    }\n  };\n  return _extends(AutoScroll, {\n    pluginName: 'scroll',\n    initializeByDefault: true\n  });\n}\nfunction clearAutoScrolls() {\n  autoScrolls.forEach(function (autoScroll) {\n    clearInterval(autoScroll.pid);\n  });\n  autoScrolls = [];\n}\nfunction clearPointerElemChangedInterval() {\n  clearInterval(pointerElemChangedInterval);\n}\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n  // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n  if (!options.scroll) return;\n  var x = (evt.touches ? evt.touches[0] : evt).clientX,\n    y = (evt.touches ? evt.touches[0] : evt).clientY,\n    sens = options.scrollSensitivity,\n    speed = options.scrollSpeed,\n    winScroller = getWindowScrollingElement();\n  var scrollThisInstance = false,\n    scrollCustomFn;\n\n  // New scroll root, set scrollEl\n  if (scrollRootEl !== rootEl) {\n    scrollRootEl = rootEl;\n    clearAutoScrolls();\n    scrollEl = options.scroll;\n    scrollCustomFn = options.scrollFn;\n    if (scrollEl === true) {\n      scrollEl = getParentAutoScrollElement(rootEl, true);\n    }\n  }\n  var layersOut = 0;\n  var currentParent = scrollEl;\n  do {\n    var el = currentParent,\n      rect = getRect(el),\n      top = rect.top,\n      bottom = rect.bottom,\n      left = rect.left,\n      right = rect.right,\n      width = rect.width,\n      height = rect.height,\n      canScrollX = void 0,\n      canScrollY = void 0,\n      scrollWidth = el.scrollWidth,\n      scrollHeight = el.scrollHeight,\n      elCSS = css(el),\n      scrollPosX = el.scrollLeft,\n      scrollPosY = el.scrollTop;\n    if (el === winScroller) {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n    } else {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n    }\n    var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n    var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n    if (!autoScrolls[layersOut]) {\n      for (var i = 0; i <= layersOut; i++) {\n        if (!autoScrolls[i]) {\n          autoScrolls[i] = {};\n        }\n      }\n    }\n    if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n      autoScrolls[layersOut].el = el;\n      autoScrolls[layersOut].vx = vx;\n      autoScrolls[layersOut].vy = vy;\n      clearInterval(autoScrolls[layersOut].pid);\n      if (vx != 0 || vy != 0) {\n        scrollThisInstance = true;\n        /* jshint loopfunc:true */\n        autoScrolls[layersOut].pid = setInterval(function () {\n          // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n          if (isFallback && this.layer === 0) {\n            Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n          }\n          var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n          var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n          if (typeof scrollCustomFn === 'function') {\n            if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n              return;\n            }\n          }\n          scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n        }.bind({\n          layer: layersOut\n        }), 24);\n      }\n    }\n    layersOut++;\n  } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n  scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n  var originalEvent = _ref.originalEvent,\n    putSortable = _ref.putSortable,\n    dragEl = _ref.dragEl,\n    activeSortable = _ref.activeSortable,\n    dispatchSortableEvent = _ref.dispatchSortableEvent,\n    hideGhostForTarget = _ref.hideGhostForTarget,\n    unhideGhostForTarget = _ref.unhideGhostForTarget;\n  if (!originalEvent) return;\n  var toSortable = putSortable || activeSortable;\n  hideGhostForTarget();\n  var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n  var target = document.elementFromPoint(touch.clientX, touch.clientY);\n  unhideGhostForTarget();\n  if (toSortable && !toSortable.el.contains(target)) {\n    dispatchSortableEvent('spill');\n    this.onSpill({\n      dragEl: dragEl,\n      putSortable: putSortable\n    });\n  }\n};\nfunction Revert() {}\nRevert.prototype = {\n  startIndex: null,\n  dragStart: function dragStart(_ref2) {\n    var oldDraggableIndex = _ref2.oldDraggableIndex;\n    this.startIndex = oldDraggableIndex;\n  },\n  onSpill: function onSpill(_ref3) {\n    var dragEl = _ref3.dragEl,\n      putSortable = _ref3.putSortable;\n    this.sortable.captureAnimationState();\n    if (putSortable) {\n      putSortable.captureAnimationState();\n    }\n    var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n    if (nextSibling) {\n      this.sortable.el.insertBefore(dragEl, nextSibling);\n    } else {\n      this.sortable.el.appendChild(dragEl);\n    }\n    this.sortable.animateAll();\n    if (putSortable) {\n      putSortable.animateAll();\n    }\n  },\n  drop: drop\n};\n_extends(Revert, {\n  pluginName: 'revertOnSpill'\n});\nfunction Remove() {}\nRemove.prototype = {\n  onSpill: function onSpill(_ref4) {\n    var dragEl = _ref4.dragEl,\n      putSortable = _ref4.putSortable;\n    var parentSortable = putSortable || this.sortable;\n    parentSortable.captureAnimationState();\n    dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n    parentSortable.animateAll();\n  },\n  drop: drop\n};\n_extends(Remove, {\n  pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\nfunction SwapPlugin() {\n  function Swap() {\n    this.defaults = {\n      swapClass: 'sortable-swap-highlight'\n    };\n  }\n  Swap.prototype = {\n    dragStart: function dragStart(_ref) {\n      var dragEl = _ref.dragEl;\n      lastSwapEl = dragEl;\n    },\n    dragOverValid: function dragOverValid(_ref2) {\n      var completed = _ref2.completed,\n        target = _ref2.target,\n        onMove = _ref2.onMove,\n        activeSortable = _ref2.activeSortable,\n        changed = _ref2.changed,\n        cancel = _ref2.cancel;\n      if (!activeSortable.options.swap) return;\n      var el = this.sortable.el,\n        options = this.options;\n      if (target && target !== el) {\n        var prevSwapEl = lastSwapEl;\n        if (onMove(target) !== false) {\n          toggleClass(target, options.swapClass, true);\n          lastSwapEl = target;\n        } else {\n          lastSwapEl = null;\n        }\n        if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n          toggleClass(prevSwapEl, options.swapClass, false);\n        }\n      }\n      changed();\n      completed(true);\n      cancel();\n    },\n    drop: function drop(_ref3) {\n      var activeSortable = _ref3.activeSortable,\n        putSortable = _ref3.putSortable,\n        dragEl = _ref3.dragEl;\n      var toSortable = putSortable || this.sortable;\n      var options = this.options;\n      lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n      if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n        if (dragEl !== lastSwapEl) {\n          toSortable.captureAnimationState();\n          if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n          swapNodes(dragEl, lastSwapEl);\n          toSortable.animateAll();\n          if (toSortable !== activeSortable) activeSortable.animateAll();\n        }\n      }\n    },\n    nulling: function nulling() {\n      lastSwapEl = null;\n    }\n  };\n  return _extends(Swap, {\n    pluginName: 'swap',\n    eventProperties: function eventProperties() {\n      return {\n        swapItem: lastSwapEl\n      };\n    }\n  });\n}\nfunction swapNodes(n1, n2) {\n  var p1 = n1.parentNode,\n    p2 = n2.parentNode,\n    i1,\n    i2;\n  if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n  i1 = index(n1);\n  i2 = index(n2);\n  if (p1.isEqualNode(p2) && i1 < i2) {\n    i2++;\n  }\n  p1.insertBefore(n2, p1.children[i1]);\n  p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n  multiDragClones = [],\n  lastMultiDragSelect,\n  // for selection with modifier key down (SHIFT)\n  multiDragSortable,\n  initialFolding = false,\n  // Initial multi-drag fold when drag started\n  folding = false,\n  // Folding any other time\n  dragStarted = false,\n  dragEl$1,\n  clonesFromRect,\n  clonesHidden;\nfunction MultiDragPlugin() {\n  function MultiDrag(sortable) {\n    // Bind all private methods\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n    if (!sortable.options.avoidImplicitDeselect) {\n      if (sortable.options.supportPointer) {\n        on(document, 'pointerup', this._deselectMultiDrag);\n      } else {\n        on(document, 'mouseup', this._deselectMultiDrag);\n        on(document, 'touchend', this._deselectMultiDrag);\n      }\n    }\n    on(document, 'keydown', this._checkKeyDown);\n    on(document, 'keyup', this._checkKeyUp);\n    this.defaults = {\n      selectedClass: 'sortable-selected',\n      multiDragKey: null,\n      avoidImplicitDeselect: false,\n      setData: function setData(dataTransfer, dragEl) {\n        var data = '';\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          multiDragElements.forEach(function (multiDragElement, i) {\n            data += (!i ? '' : ', ') + multiDragElement.textContent;\n          });\n        } else {\n          data = dragEl.textContent;\n        }\n        dataTransfer.setData('Text', data);\n      }\n    };\n  }\n  MultiDrag.prototype = {\n    multiDragKeyDown: false,\n    isMultiDrag: false,\n    delayStartGlobal: function delayStartGlobal(_ref) {\n      var dragged = _ref.dragEl;\n      dragEl$1 = dragged;\n    },\n    delayEnded: function delayEnded() {\n      this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n    },\n    setupClone: function setupClone(_ref2) {\n      var sortable = _ref2.sortable,\n        cancel = _ref2.cancel;\n      if (!this.isMultiDrag) return;\n      for (var i = 0; i < multiDragElements.length; i++) {\n        multiDragClones.push(clone(multiDragElements[i]));\n        multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n        multiDragClones[i].draggable = false;\n        multiDragClones[i].style['will-change'] = '';\n        toggleClass(multiDragClones[i], this.options.selectedClass, false);\n        multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n      }\n      sortable._hideClone();\n      cancel();\n    },\n    clone: function clone(_ref3) {\n      var sortable = _ref3.sortable,\n        rootEl = _ref3.rootEl,\n        dispatchSortableEvent = _ref3.dispatchSortableEvent,\n        cancel = _ref3.cancel;\n      if (!this.isMultiDrag) return;\n      if (!this.options.removeCloneOnHide) {\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          insertMultiDragClones(true, rootEl);\n          dispatchSortableEvent('clone');\n          cancel();\n        }\n      }\n    },\n    showClone: function showClone(_ref4) {\n      var cloneNowShown = _ref4.cloneNowShown,\n        rootEl = _ref4.rootEl,\n        cancel = _ref4.cancel;\n      if (!this.isMultiDrag) return;\n      insertMultiDragClones(false, rootEl);\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', '');\n      });\n      cloneNowShown();\n      clonesHidden = false;\n      cancel();\n    },\n    hideClone: function hideClone(_ref5) {\n      var _this = this;\n      var sortable = _ref5.sortable,\n        cloneNowHidden = _ref5.cloneNowHidden,\n        cancel = _ref5.cancel;\n      if (!this.isMultiDrag) return;\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', 'none');\n        if (_this.options.removeCloneOnHide && clone.parentNode) {\n          clone.parentNode.removeChild(clone);\n        }\n      });\n      cloneNowHidden();\n      clonesHidden = true;\n      cancel();\n    },\n    dragStartGlobal: function dragStartGlobal(_ref6) {\n      var sortable = _ref6.sortable;\n      if (!this.isMultiDrag && multiDragSortable) {\n        multiDragSortable.multiDrag._deselectMultiDrag();\n      }\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.sortableIndex = index(multiDragElement);\n      });\n\n      // Sort multi-drag elements\n      multiDragElements = multiDragElements.sort(function (a, b) {\n        return a.sortableIndex - b.sortableIndex;\n      });\n      dragStarted = true;\n    },\n    dragStarted: function dragStarted(_ref7) {\n      var _this2 = this;\n      var sortable = _ref7.sortable;\n      if (!this.isMultiDrag) return;\n      if (this.options.sort) {\n        // Capture rects,\n        // hide multi drag elements (by positioning them absolute),\n        // set multi drag elements rects to dragRect,\n        // show multi drag elements,\n        // animate to rects,\n        // unset rects & remove from DOM\n\n        sortable.captureAnimationState();\n        if (this.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            css(multiDragElement, 'position', 'absolute');\n          });\n          var dragRect = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRect);\n          });\n          folding = true;\n          initialFolding = true;\n        }\n      }\n      sortable.animateAll(function () {\n        folding = false;\n        initialFolding = false;\n        if (_this2.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n        }\n\n        // Remove all auxiliary multidrag items from el, if sorting enabled\n        if (_this2.options.sort) {\n          removeMultiDragElements();\n        }\n      });\n    },\n    dragOver: function dragOver(_ref8) {\n      var target = _ref8.target,\n        completed = _ref8.completed,\n        cancel = _ref8.cancel;\n      if (folding && ~multiDragElements.indexOf(target)) {\n        completed(false);\n        cancel();\n      }\n    },\n    revert: function revert(_ref9) {\n      var fromSortable = _ref9.fromSortable,\n        rootEl = _ref9.rootEl,\n        sortable = _ref9.sortable,\n        dragRect = _ref9.dragRect;\n      if (multiDragElements.length > 1) {\n        // Setup unfold animation\n        multiDragElements.forEach(function (multiDragElement) {\n          sortable.addAnimationState({\n            target: multiDragElement,\n            rect: folding ? getRect(multiDragElement) : dragRect\n          });\n          unsetRect(multiDragElement);\n          multiDragElement.fromRect = dragRect;\n          fromSortable.removeAnimationState(multiDragElement);\n        });\n        folding = false;\n        insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref10) {\n      var sortable = _ref10.sortable,\n        isOwner = _ref10.isOwner,\n        insertion = _ref10.insertion,\n        activeSortable = _ref10.activeSortable,\n        parentEl = _ref10.parentEl,\n        putSortable = _ref10.putSortable;\n      var options = this.options;\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        }\n        initialFolding = false;\n        // If leaving sort:false root, or already folding - Fold to new location\n        if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n          // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n          var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRectAbsolute);\n\n            // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n            // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n            parentEl.appendChild(multiDragElement);\n          });\n          folding = true;\n        }\n\n        // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n        if (!isOwner) {\n          // Only remove if not folding (folding will remove them anyways)\n          if (!folding) {\n            removeMultiDragElements();\n          }\n          if (multiDragElements.length > 1) {\n            var clonesHiddenBefore = clonesHidden;\n            activeSortable._showClone(sortable);\n\n            // Unfold animation for clones if showing from hidden\n            if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n              multiDragClones.forEach(function (clone) {\n                activeSortable.addAnimationState({\n                  target: clone,\n                  rect: clonesFromRect\n                });\n                clone.fromRect = clonesFromRect;\n                clone.thisAnimationDuration = null;\n              });\n            }\n          } else {\n            activeSortable._showClone(sortable);\n          }\n        }\n      }\n    },\n    dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n      var dragRect = _ref11.dragRect,\n        isOwner = _ref11.isOwner,\n        activeSortable = _ref11.activeSortable;\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.thisAnimationDuration = null;\n      });\n      if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n        clonesFromRect = _extends({}, dragRect);\n        var dragMatrix = matrix(dragEl$1, true);\n        clonesFromRect.top -= dragMatrix.f;\n        clonesFromRect.left -= dragMatrix.e;\n      }\n    },\n    dragOverAnimationComplete: function dragOverAnimationComplete() {\n      if (folding) {\n        folding = false;\n        removeMultiDragElements();\n      }\n    },\n    drop: function drop(_ref12) {\n      var evt = _ref12.originalEvent,\n        rootEl = _ref12.rootEl,\n        parentEl = _ref12.parentEl,\n        sortable = _ref12.sortable,\n        dispatchSortableEvent = _ref12.dispatchSortableEvent,\n        oldIndex = _ref12.oldIndex,\n        putSortable = _ref12.putSortable;\n      var toSortable = putSortable || this.sortable;\n      if (!evt) return;\n      var options = this.options,\n        children = parentEl.children;\n\n      // Multi-drag selection\n      if (!dragStarted) {\n        if (options.multiDragKey && !this.multiDragKeyDown) {\n          this._deselectMultiDrag();\n        }\n        toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n        if (!~multiDragElements.indexOf(dragEl$1)) {\n          multiDragElements.push(dragEl$1);\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'select',\n            targetEl: dragEl$1,\n            originalEvent: evt\n          });\n\n          // Modifier activated, select from last to dragEl\n          if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n            var lastIndex = index(lastMultiDragSelect),\n              currentIndex = index(dragEl$1);\n            if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n              (function () {\n                // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n                // (but previous selection existed)\n                var n, i;\n                if (currentIndex > lastIndex) {\n                  i = lastIndex;\n                  n = currentIndex;\n                } else {\n                  i = currentIndex;\n                  n = lastIndex + 1;\n                }\n                var filter = options.filter;\n                for (; i < n; i++) {\n                  if (~multiDragElements.indexOf(children[i])) continue;\n                  // Check if element is draggable\n                  if (!closest(children[i], options.draggable, parentEl, false)) continue;\n                  // Check if element is filtered\n                  var filtered = filter && (typeof filter === 'function' ? filter.call(sortable, evt, children[i], sortable) : filter.split(',').some(function (criteria) {\n                    return closest(children[i], criteria.trim(), parentEl, false);\n                  }));\n                  if (filtered) continue;\n                  toggleClass(children[i], options.selectedClass, true);\n                  multiDragElements.push(children[i]);\n                  dispatchEvent({\n                    sortable: sortable,\n                    rootEl: rootEl,\n                    name: 'select',\n                    targetEl: children[i],\n                    originalEvent: evt\n                  });\n                }\n              })();\n            }\n          } else {\n            lastMultiDragSelect = dragEl$1;\n          }\n          multiDragSortable = toSortable;\n        } else {\n          multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n          lastMultiDragSelect = null;\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'deselect',\n            targetEl: dragEl$1,\n            originalEvent: evt\n          });\n        }\n      }\n\n      // Multi-drag drop\n      if (dragStarted && this.isMultiDrag) {\n        folding = false;\n        // Do not \"unfold\" after around dragEl if reverted\n        if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n          var dragRect = getRect(dragEl$1),\n            multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n          if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n          toSortable.captureAnimationState();\n          if (!initialFolding) {\n            if (options.animation) {\n              dragEl$1.fromRect = dragRect;\n              multiDragElements.forEach(function (multiDragElement) {\n                multiDragElement.thisAnimationDuration = null;\n                if (multiDragElement !== dragEl$1) {\n                  var rect = folding ? getRect(multiDragElement) : dragRect;\n                  multiDragElement.fromRect = rect;\n\n                  // Prepare unfold animation\n                  toSortable.addAnimationState({\n                    target: multiDragElement,\n                    rect: rect\n                  });\n                }\n              });\n            }\n\n            // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n            // properly they must all be removed\n            removeMultiDragElements();\n            multiDragElements.forEach(function (multiDragElement) {\n              if (children[multiDragIndex]) {\n                parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n              } else {\n                parentEl.appendChild(multiDragElement);\n              }\n              multiDragIndex++;\n            });\n\n            // If initial folding is done, the elements may have changed position because they are now\n            // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n            // must be fired here as Sortable will not.\n            if (oldIndex === index(dragEl$1)) {\n              var update = false;\n              multiDragElements.forEach(function (multiDragElement) {\n                if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n                  update = true;\n                  return;\n                }\n              });\n              if (update) {\n                dispatchSortableEvent('update');\n                dispatchSortableEvent('sort');\n              }\n            }\n          }\n\n          // Must be done after capturing individual rects (scroll bar)\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n          toSortable.animateAll();\n        }\n        multiDragSortable = toSortable;\n      }\n\n      // Remove clones if necessary\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        multiDragClones.forEach(function (clone) {\n          clone.parentNode && clone.parentNode.removeChild(clone);\n        });\n      }\n    },\n    nullingGlobal: function nullingGlobal() {\n      this.isMultiDrag = dragStarted = false;\n      multiDragClones.length = 0;\n    },\n    destroyGlobal: function destroyGlobal() {\n      this._deselectMultiDrag();\n      off(document, 'pointerup', this._deselectMultiDrag);\n      off(document, 'mouseup', this._deselectMultiDrag);\n      off(document, 'touchend', this._deselectMultiDrag);\n      off(document, 'keydown', this._checkKeyDown);\n      off(document, 'keyup', this._checkKeyUp);\n    },\n    _deselectMultiDrag: function _deselectMultiDrag(evt) {\n      if (typeof dragStarted !== \"undefined\" && dragStarted) return;\n\n      // Only deselect if selection is in this sortable\n      if (multiDragSortable !== this.sortable) return;\n\n      // Only deselect if target is not item in this sortable\n      if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;\n\n      // Only deselect if left click\n      if (evt && evt.button !== 0) return;\n      while (multiDragElements.length) {\n        var el = multiDragElements[0];\n        toggleClass(el, this.options.selectedClass, false);\n        multiDragElements.shift();\n        dispatchEvent({\n          sortable: this.sortable,\n          rootEl: this.sortable.el,\n          name: 'deselect',\n          targetEl: el,\n          originalEvent: evt\n        });\n      }\n    },\n    _checkKeyDown: function _checkKeyDown(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = true;\n      }\n    },\n    _checkKeyUp: function _checkKeyUp(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = false;\n      }\n    }\n  };\n  return _extends(MultiDrag, {\n    // Static methods & properties\n    pluginName: 'multiDrag',\n    utils: {\n      /**\r\n       * Selects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be selected\r\n       */\n      select: function select(el) {\n        var sortable = el.parentNode[expando];\n        if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n        if (multiDragSortable && multiDragSortable !== sortable) {\n          multiDragSortable.multiDrag._deselectMultiDrag();\n          multiDragSortable = sortable;\n        }\n        toggleClass(el, sortable.options.selectedClass, true);\n        multiDragElements.push(el);\n      },\n      /**\r\n       * Deselects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be deselected\r\n       */\n      deselect: function deselect(el) {\n        var sortable = el.parentNode[expando],\n          index = multiDragElements.indexOf(el);\n        if (!sortable || !sortable.options.multiDrag || !~index) return;\n        toggleClass(el, sortable.options.selectedClass, false);\n        multiDragElements.splice(index, 1);\n      }\n    },\n    eventProperties: function eventProperties() {\n      var _this3 = this;\n      var oldIndicies = [],\n        newIndicies = [];\n      multiDragElements.forEach(function (multiDragElement) {\n        oldIndicies.push({\n          multiDragElement: multiDragElement,\n          index: multiDragElement.sortableIndex\n        });\n\n        // multiDragElements will already be sorted if folding\n        var newIndex;\n        if (folding && multiDragElement !== dragEl$1) {\n          newIndex = -1;\n        } else if (folding) {\n          newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n        } else {\n          newIndex = index(multiDragElement);\n        }\n        newIndicies.push({\n          multiDragElement: multiDragElement,\n          index: newIndex\n        });\n      });\n      return {\n        items: _toConsumableArray(multiDragElements),\n        clones: [].concat(multiDragClones),\n        oldIndicies: oldIndicies,\n        newIndicies: newIndicies\n      };\n    },\n    optionListeners: {\n      multiDragKey: function multiDragKey(key) {\n        key = key.toLowerCase();\n        if (key === 'ctrl') {\n          key = 'Control';\n        } else if (key.length > 1) {\n          key = key.charAt(0).toUpperCase() + key.substr(1);\n        }\n        return key;\n      }\n    }\n  });\n}\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n  multiDragElements.forEach(function (multiDragElement, i) {\n    var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n    if (target) {\n      rootEl.insertBefore(multiDragElement, target);\n    } else {\n      rootEl.appendChild(multiDragElement);\n    }\n  });\n}\n\n/**\r\n * Insert multi-drag clones\r\n * @param  {[Boolean]} elementsInserted  Whether the multi-drag elements are inserted\r\n * @param  {HTMLElement} rootEl\r\n */\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n  multiDragClones.forEach(function (clone, i) {\n    var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n    if (target) {\n      rootEl.insertBefore(clone, target);\n    } else {\n      rootEl.appendChild(clone);\n    }\n  });\n}\nfunction removeMultiDragElements() {\n  multiDragElements.forEach(function (multiDragElement) {\n    if (multiDragElement === dragEl$1) return;\n    multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n  });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n","import Sortable from 'sortablejs';\nimport { getElements } from 'js-utils/src/selector';\n\nimport init from '../../common/base/init';\n\ninit(() => {\n  const lists = getElements('.js--sortable');\n  if(!lists.length) return;\n\n  lists.forEach((list) => {\n    Sortable.create(list, {\n      handle: '.sortable-handle',\n      dataIdAttr: 'data-attribute-name',\n      group: 'saved-searches',\n      store: {\n        get: function (sortable) {\n          var order = localStorage.getItem(sortable.options.group.name);\n          return order ? order.split('|') : [];\n        },\n        set: function (sortable) {\n          var order = sortable.toArray();\n          localStorage.setItem(sortable.options.group.name, order.join('|'));\n        },\n      },\n    });\n  });\n});\n","import init from \"../../common/base/init\";\nimport { addEventListener } from \"js-utils/src/event\";\n\ninit(() => {\n  const form = document.querySelector(\".seminars-booking__form\");\n  if (!form) return;\n\n  const message = form.querySelector(\".-response\");\n  const modal = form.closest(\".a11ydialog\");\n\n  form.addEventListener(\"ajax:success\", (e) => {\n    const response = e.detail[0];\n\n    message.innerHTML = response.content;\n    message.classList.add(\"-response--show\");\n\n    if (response.success) {\n      const link = document.querySelector(\n        `a[data-association=\"seminar_participants\"]`\n      );\n      const container = document.querySelector(\n        link.getAttribute(`data-association-insertion-node`)\n      );\n      container.innerHTML = \"\";\n      form.reset();\n    } else {\n      // TODO: scroll to the `message` element\n    }\n  });\n\n  form.addEventListener(\"submit\", (e) => {\n    // Enable disabled fields on submit so data won't get ignored\n    const firstNestedFields = document.querySelector(\n      \".seminar-booking__participants .nested-field__content\"\n    );\n    const inputFields = firstNestedFields.querySelectorAll(\".input\");\n    inputFields.forEach((input) => (input.disabled = false));\n    return true;\n  });\n\n  modal.A11yDialogInstance.on(\"hide\", () => {\n    message.classList.remove(\"-response--show\");\n  });\n\n  addEventListener(\n    `#js--add-participant`,\n    `change`,\n    handleParticipantsOnChange\n  );\n\n  function handleParticipantsOnChange(e) {\n    const numberOfParticipants = e.currentTarget.value;\n    const link = document.querySelector(\n      `a[data-association=\"seminar_participants\"]`\n    );\n    if (!link) return;\n    const container = document.querySelector(\n      link.getAttribute(`data-association-insertion-node`)\n    );\n    const templateId = link.getAttribute(`data-template`);\n    const template = document.querySelector(`[data-name=\"${templateId}\"]`).innerHTML;\n    const currentNumberOfParticipants = container.children.length;\n\n    if (currentNumberOfParticipants < numberOfParticipants) {\n      let i = currentNumberOfParticipants;\n\n      for (i; i < numberOfParticipants; i++) {\n        const tmp = document.createElement(`template`);\n        tmp.innerHTML = template.replace(/new_seminar_participants/g, i);\n        container.append(tmp.content.firstChild);\n      }\n\n      addAutocompleteCheckbox();\n      return;\n    }\n\n    if (currentNumberOfParticipants >= numberOfParticipants) {\n      let i = 0;\n      for (i; i < currentNumberOfParticipants - numberOfParticipants; i++) {\n        container.removeChild(container.lastChild);\n      }\n\n      addAutocompleteCheckbox();\n      return;\n    }\n  }\n\n  // Call the handler once to add the initial participant form\n  handleParticipantsOnChange({ currentTarget: { value: \"1\" } });\n\n  function createAutocompleteCheckbox() {\n    const checkboxContainer = document.createElement(\"div\");\n    checkboxContainer.className = \"checkbox checkbox-autocomplete form-row\";\n\n    const checkboxLabel = document.createElement(\"label\");\n    const checkboxLabelText = document.createTextNode(\n      \"Jag som beställer deltar\"\n    );\n\n    const checkboxInput = document.createElement(\"input\");\n    checkboxInput.addEventListener(\"change\", handleCheckboxOnChange);\n    checkboxInput.type = \"checkbox\";\n    checkboxInput.value = true;\n    checkboxInput.id = \"checkbox-autocomplete\";\n\n    checkboxLabel.appendChild(checkboxLabelText);\n    checkboxLabel.appendChild(checkboxInput);\n    checkboxContainer.appendChild(checkboxLabel);\n\n    return checkboxContainer;\n  }\n\n  function handleCheckboxOnChange({ target: { checked } }) {\n    const firstNestedFields = document.querySelector(\n      \".seminar-booking__participants .nested-field__content\"\n    );\n    const inputFields = firstNestedFields.querySelectorAll(\".input\");\n\n    if (checked) {\n      const bookingName = document.querySelector(\"#seminar_booking_name\");\n      const bookingEmail = document.querySelector(\"#seminar_booking_email\");\n\n      const [participantEmail, participantName] = inputFields;\n      // Set current booking values on first participant on autocomplete checked\n      participantEmail.value = bookingEmail.value;\n      participantName.value = bookingName.value;\n\n      // Listen to changes on main booking fields\n      bookingName.addEventListener(\"input\", ({ target: { value } }) => {\n        const { checked } = document.querySelector(\"#checkbox-autocomplete\");\n        if (checked) participantName.value = value;\n      });\n\n      bookingEmail.addEventListener(\"input\", ({ target: { value } }) => {\n        const { checked } = document.querySelector(\"#checkbox-autocomplete\");\n        if (checked) participantEmail.value = value;\n      });\n\n      // Disable fields when autocomplete is checked\n      inputFields.forEach((input) => (input.disabled = true));\n    } else {\n      // Clean fields on autocomplete uncheck\n      inputFields.forEach((input) => {\n        input.value = \"\";\n        input.disabled = false;\n      });\n    }\n  }\n\n  function addAutocompleteCheckbox() {\n    const firstNestedFields = document.querySelector(\n      \".seminar-booking__participants .nested-field__content\"\n    );\n\n    const checkboxElement = document.querySelector(\".checkbox-autocomplete\");\n    if (checkboxElement) {\n      checkboxElement.parentNode.removeChild(checkboxElement);\n      firstNestedFields.prepend(checkboxElement);\n      return;\n    }\n\n    const newCheckboxElement = createAutocompleteCheckbox();\n    firstNestedFields.prepend(newCheckboxElement);\n  }\n});\n","import init from '../../common/base/init';\n\ninit(() => {\n  const form = document.querySelector('.seminars-suggest-modal form');\n  if(!form) return;\n\n  const message = form.querySelector('.-response');\n  const modal = form.closest('.a11ydialog');\n\n  form.addEventListener('ajax:success', (e) => {\n    const response = e.detail[0];\n\n    message.innerHTML = response.content;\n    message.classList.add('-response--show');\n\n    if(response.success) {\n      form.reset();\n    }\n    else {\n      // TODO: scroll to the `message` element\n    }\n  });\n\n  modal.A11yDialogInstance.on('hide', () => {\n    message.classList.remove('-response--show');\n  });\n});\n","import init from '../../common/base/init';\n\ninit(() => {\n  const form = document.querySelector('.purchase-modal__form');\n  if(!form) return;\n\n  const message = form.querySelector('.-response');\n  const modal = form.closest('.a11ydialog');\n\n  form.addEventListener('ajax:success', (e) => {\n    const response = e.detail[0];\n\n    message.innerHTML = response.content;\n    message.classList.add('-response--show');\n\n    if(response.success) {\n      form.reset();\n    }\n    else {\n      // TODO: scroll to the `message` element\n    }\n  });\n\n  modal.A11yDialogInstance.on('hide', () => {\n    message.classList.remove('-response--show');\n  });\n});\n","import init from '../../common/base/init';\nimport A11yDialog from 'a11y-dialog';\n\ninit(() => {\n  const el = document.getElementById('login-modal');\n  if(!el) return;\n\n  const dialog = new A11yDialog(el);\n  dialog.show();\n});\n","import { addEventListener } from 'js-utils/src/event';\n\nimport init from '../../common/base/init';\n\ninit(() => {\n  const toggles = document.querySelectorAll('.user-settings__section .-toggle');\n  if(!toggles.length) return;\n\n  addEventListener(toggles, 'click', (e) => {\n    e.preventDefault();\n    const toggle = e.currentTarget;\n    const section = toggle.closest('.user-settings__section');\n    section.classList.toggle('--expanded');\n  });\n});\n","import init from '../../common/base/init';\nimport { hasClosest } from 'js-utils/src/selector';\nimport { onCssAnimationEnd } from 'js-utils/src/animation';\n\n\ninit(() => {\n  const purchaseNotice = document.querySelector('.purchase-notice');\n  if(!purchaseNotice) return;\n\n  // Share menu\n  const purchaseNoticeShareButton = purchaseNotice.querySelector('.purchase-notice__box__share__button');\n  if(purchaseNoticeShareButton) {\n    const shareButton = document.querySelector('.post-share__inner');\n    purchaseNoticeShareButton.addEventListener('click', (e) => {\n      e.preventDefault();\n\n      purchaseNotice.classList.add('--hide');\n      onCssAnimationEnd(purchaseNotice, () => purchaseNotice.parentNode.removeChild(purchaseNotice));\n\n      shareButton.classList.add('do-show-opts');\n      shareButton.scrollIntoView();\n    });\n  }\n\n\n  // close on outside click\n  if(purchaseNotice.classList.contains('js--purchase-notice-close-outside-click')) {\n    const contentEl = purchaseNotice.querySelector('.js--purchase-notice-content');\n    if(contentEl) {\n      purchaseNotice.addEventListener('click', (e) => {\n        if(!hasClosest(e.target, contentEl)) {\n          purchaseNotice.classList.add('--hide');\n          onCssAnimationEnd(purchaseNotice, () => purchaseNotice.parentNode.removeChild(purchaseNotice));\n        }\n      });\n    }\n  }\n\n  // close on button click\n  const closeNotice = purchaseNotice.querySelector('.purchase-notice__box__close');\n\n  closeNotice.addEventListener('click', (e) => {\n    e.preventDefault();\n\n    purchaseNotice.classList.add('--hide');\n    onCssAnimationEnd(purchaseNotice, () => purchaseNotice.parentNode.removeChild(purchaseNotice));\n  });\n});\n","import init from '../../common/base/init';\n\ninit(() => {\n  if (!document.querySelector('.inner-tabs__item')) return;\n\n  const tabButtons = document.querySelectorAll('.inner-tabs__item');\n  const allTabsContent = document.querySelectorAll('.service-tab-content');\n\n  tabButtons.forEach((tabEl) => {\n    tabEl.onclick = () => {\n      tabButtons.forEach(_tabEl => _tabEl.classList.remove('tab-item-selected'));\n      tabEl.classList.add('tab-item-selected');\n\n      allTabsContent.forEach((tabContent) => {\n        tabContent.style.display = 'none';\n      })\n\n      const selectedTabContent = document.querySelector(`.seminar-${tabEl.id}`);\n      if (!selectedTabContent) {\n        allTabsContent[allTabsContent.length - 1].style.display = 'block';\n      } else {\n        selectedTabContent.style.display = 'block';\n      }\n    }\n  });\n});\n","import init from '../../common/base/init';\nimport $ from 'jquery';\n\ninit(() => {\n  if (!document.querySelectorAll('.seminar-questions')) return;\n\n  const submitBtn = document.querySelector('.seminar-questions__btn');\n  const closeSubmitMsgBtn = document.querySelector('.seminar-questions__submitted-msg button');\n  const submitMsg = document.querySelector('.seminar-questions__submitted-msg');\n  const questionInput = document.querySelector('.seminar-questions__form textarea');\n\n  if (closeSubmitMsgBtn) {\n    closeSubmitMsgBtn.onclick = () => {\n      submitMsg.style.display = 'none';\n    }\n  }\n\n  if (submitBtn && !submitBtn.disabled) {\n    submitBtn.onclick = (e) => {\n      e.preventDefault();\n\n      const seminarId = submitBtn.id.split('-')[1];\n\n      $.ajax({\n        type: \"POST\",\n        url:  `/api/v1/seminars/${seminarId}/questions.json`,\n        data: { seminar_question: { body: questionInput.value } },\n        success: (data) => {\n          submitMsg.style.display = 'flex';\n          questionInput.value = '';\n          const questionsContainer = document.querySelector('.seminar-questions__placeholder');\n\n          const newQuestionContainer = document.createElement('div');\n          const newQuestionText = document.createElement('p');\n          const newQuestionTimeStamp = document.createElement('span');\n          \n          const timeStamp = new Date(data.created_at);\n\n          newQuestionContainer.classList.add('seminar-questions__question-container')\n          newQuestionText.innerHTML = data.body;\n          newQuestionTimeStamp.innerHTML = \n            `${String(timeStamp.getHours()).padStart(2, '0')}:${String(timeStamp.getMinutes()).padStart(2, '0')}`\n          \n          newQuestionContainer.append(newQuestionTimeStamp);\n          newQuestionContainer.append(newQuestionText);\n\n          questionsContainer.append(newQuestionContainer);\n        },\n        dataType: 'JSON'\n      });\n    } \n  }\n \n});\n","import init from \"../../common/base/init\"\n\nconst NON_BUSINESS_EMAILS = [\n  \"@mac.com\",\n  \"@gmail.com\",\n  \"@yahoo.com\",\n  \"@hotmail.com\",\n  \"@outlook.com\",\n  \"@live.com\",\n  \"@aol.com\",\n  \"@msn.com\",\n]\n\ninit(() => {\n  Array.prototype.forEach.call(document.querySelectorAll(\".js-company-email\"), (el) => {\n    el.addEventListener(\"input\", (e) => {\n      let privateEmail = false\n\n      NON_BUSINESS_EMAILS.map((text) => {\n        if (e.target.value.indexOf(text) !== -1) {\n          privateEmail = text\n          createInputError(el);\n        } else {\n          if (privateEmail) return;\n          removeInputError(el);\n        }\n      })\n    })\n  })\n})\n\nconst createInputError = (el) => {\n  const errorWrapperEl = document.createElement(\"div\")\n  errorWrapperEl.innerHTML = \"Är du säker på att detta är din företags e-post?\";\n  errorWrapperEl.classList.add('lx-input-error');\n\n  el.parentNode.appendChild(errorWrapperEl);\n}\n\nconst removeInputError = (el) => {\n  if (el.parentNode.querySelector('.lx-input-error')) {\n    el.parentNode.querySelector('.lx-input-error').remove();\n  }\n}\n","import \"core-js/stable\";\nimport \"regenerator-runtime/runtime\";\n\n// 3rd party\nimport Cocooned from \"@notus.sh/cocooned\";\nCocooned.start()\n\n// common\nimport \"../javascripts/common/base/polyfills\";\nimport \"../javascripts/common/base/rails\";\nimport \"../javascripts/common/base/smart-outline\";\nimport \"../javascripts/common/base/togglable\";\nimport \"../javascripts/common/base/togglable-cookie\";\nimport \"../javascripts/common/base/omasks\";\nimport \"../javascripts/common/components/analytics\";\nimport \"../javascripts/common/components/analytics-events\";\nimport \"../javascripts/common/components/grille\";\nimport \"../javascripts/common/components/header\";\nimport \"../javascripts/common/components/flatpickr\";\nimport \"../javascripts/common/components/choices\";\nimport \"../javascripts/common/components/a11ydialog\";\nimport \"../javascripts/common/components/search-aside\";\nimport \"../javascripts/common/components/categories-search-filter\";\nimport \"../javascripts/common/components/date-search-filter\";\nimport \"../javascripts/common/components/bundle-folders\";\nimport \"../javascripts/common/components/bundle-search\";\nimport \"../javascripts/common/components/bundle-search-api\";\nimport \"../javascripts/common/components/video-player\";\nimport \"../javascripts/common/components/live-seminar-video-player\";\nimport \"../javascripts/common/components/shepherd\";\nimport \"../javascripts/common/components/package-folders\";\nimport \"../javascripts/common/components/newsletter-banner\";\nimport \"../javascripts/common/components/news-box\";\nimport \"../javascripts/common/components/side-menu\";\nimport \"../javascripts/common/components/course-analysis-video-player\";\n\n// application\nimport \"../javascripts/application/base/print\";\nimport \"../javascripts/application/components/hnav\";\nimport \"../javascripts/application/components/nav-bar\";\nimport \"../javascripts/application/components/layout-main\";\nimport \"../javascripts/application/components/library\";\nimport \"../javascripts/application/components/highlights\";\nimport \"../javascripts/application/components/sidebar-user\";\nimport \"../javascripts/application/components/the-article\";\nimport \"../javascripts/application/components/the-article-documents\";\nimport \"../javascripts/application/components/quiz\";\nimport \"../javascripts/application/components/post-share\";\nimport \"../javascripts/application/components/welcomebar\";\nimport \"../javascripts/application/components/paywall\";\nimport \"../javascripts/application/components/save-search-form\";\nimport \"../javascripts/application/components/education-certificate\";\nimport \"../javascripts/application/components/sortable\";\nimport \"../javascripts/application/components/seminar-booking\";\nimport \"../javascripts/application/components/seminar-suggest\";\nimport \"../javascripts/application/components/single-item-purchase\";\nimport \"../javascripts/application/components/login-modal\";\nimport \"../javascripts/application/components/user-settings\";\nimport \"../javascripts/application/components/purchase-notice\";\nimport \"../javascripts/application/components/inner-tabs\";\nimport \"../javascripts/application/components/seminar-questions\";\nimport \"../javascripts/site/components/register-email\";\n"],"names":["init","toggleCookie","getElements","trigger","e","container","Cookies","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread2","target","i","source","key","_defineProperty","_regeneratorRuntime","exports","Op","hasOwn","defineProperty","obj","desc","$Symbol","iteratorSymbol","asyncIteratorSymbol","toStringTagSymbol","define","value","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","context","Context","makeInvokeMethod","tryCatch","fn","arg","err","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","values","Gp","defineIteratorMethods","prototype","method","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","doneResult","delegate","delegateResult","maybeInvokeDelegate","methodName","info","pushTryEntry","locs","entry","resetTryEntry","iterable","iteratorMethod","next","genFun","ctor","iter","val","skipTempReset","name","rootRecord","exception","handle","loc","caught","hasCatch","hasFinally","type","finallyEntry","afterLoc","finallyLoc","tryLoc","thrown","resultName","nextLoc","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_toPropertyKey","_createClass","protoProps","staticProps","_inherits","subClass","superClass","_setPrototypeOf","_getPrototypeOf","o","p","_isNativeReflectConstruct","_construct","Parent","Class","a","_isNativeFunction","_wrapNativeSuper","_cache","Wrapper","_assertThisInitialized","_possibleConstructorReturn","call","_createSuper","Derived","hasNativeReflectConstruct","Super","NewTarget","_toPrimitive","input","hint","prim","res","isNode","getMethodName","prop","isDomElement","element","isInteger","isVimeoUrl","url","isVimeoEmbed","expr","getOembedDomain","match","domain","customDomains","_i","_customDomains","customDomain","getVimeoUrl","oEmbedParameters","id","idOrUrl","subscribe","eventName","callback","onName","offName","eventNames","evName","arrayIndexOfSupport","postMessageSupport","commonjsGlobal","createCommonjsModule","module","hasOwnProperty","hasDefine","WeakMap","genId","checkInstance","isObject","x","prefix","rand","npo_src","definition","builtInProp","cycle","scheduling_queue","ToString","timer","config","first","last","item","Item","f","schedule","isThenable","_then","o_type","notify","notifyIsolated","cb","chain","ret","msg","def_wrapper","MakeDefWrapper","iteratePromises","arr","resolver","rejecter","idx","MakeDef","Promise","executor","def","success","failure","PromisePrototype","len","msgs","count","callbackMap","storeCallback","player","playerCallbacks","getCallbacks","removeCallback","index","shiftCallbacks","swapCallbacks","oldElement","newElement","parseMessageData","data","postMessage","params","message","ieVersion","processData","callbacks","param","promises","promise","getOEmbedParameters","defaults","createEmbed","_ref","html","div","getOEmbedData","videoUrl","xhr","json","status","initializeEmbeds","parent","elements","handleError","resizeEmbeds","onMessage","event","iframes","space","initAppendVideoMetadata","iframe","isValidMessageSource","Player","checkUrlTimeParam","_loop","videoId","matches","sec","initializeScreenfull","fnMap","l","eventNameMap","screenfull","onFullScreenEntered","returnPromise","onFullScreenExit","defaultOptions","TimingSrcConnector","_EventTarget","_super","_player","timingObject","_this","options","logger","_callee","newAdjustment","newPlaybackRate","_context","_x","_x2","_init","_callee2","_this2","playerUpdater","positionSync","timingObjectUpdater","_context2","_x3","_x4","_x5","_updateTimingObject","_callee3","_context3","updateTimingObject","_x6","_x7","_updatePlayer","_callee5","_timingObject$query","position","velocity","_context5","_ref2","_callee4","_context4","err2","_x11","updatePlayer","_x8","_x9","_x10","_this3","allowedDrift","maxAllowedDrift","minCheckInterval","maxRateAdjustment","maxTimeToCatchUp","syncInterval","check","_ref3","_callee6","diff","diffAbs","min","max","adjustment","_context6","interval","_this$logger","playerMap","readyMap","readyPromise","isError","isReadyError","isReadyEvent","isPingResponse","exitFullscreen","_this4","lastCallback","time","language","kind","_this5","autopause","camera","color","colors","nullPromise","colorPromises","currentTime","loop","muted","playbackRate","quality","volume","_setTimingSrc","_this6","connector","setTimingSrc","video","activeSection","sectionTimes","playVideoButtons","vimeoPlayer","VimeoPlayer","videoSections","mobileToggler","sectionsOpen","video_type","videoDuration","button","videoEvent","showQuiz","fireVideoEvent","dataObject","_","sectionProgress","progress","adjustActiveSection","timesArray","videoSectionsContainer","toggleSections","frame","available_to_user","_typeof","_extends","_objectSpread","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","_arr","_n","_d","_e","_s","isObjectLike","lodash_isobjectlike","isFunction","isNumber","isString","isUndefined","objectProto","assignValue","objValue","eq","baseZipObject","assignFunc","length","valsLength","zipObject","other","lodash_zipobject","isBrowser","longerTimeoutBrowsers","timeoutDuration","microtaskDebounce","called","taskDebounce","scheduled","supportsMicroTasks","debounce","isFunction$1","functionToCheck","getType","getStyleComputedProperty","property","window","css","getParentNode","getScrollParent","_getStyleComputedProp","overflow","overflowX","overflowY","isIE11","isIE10","isIE","version","getOffsetParent","noOffsetParent","offsetParent","nodeName","isOffsetContainer","getRoot","node","findCommonOffsetParent","element1","element2","order","start","end","range","commonAncestorContainer","element1root","getScroll","side","upperSide","scrollingElement","includeScroll","rect","subtract","scrollTop","scrollLeft","modifier","getBordersSize","styles","axis","sideA","sideB","getSize","body","computedStyle","getWindowSizes","document","classCallCheck","createClass","defineProperties","_extends$1","getClientRect","offsets","getBoundingClientRect","sizes","width","height","horizScrollbar","vertScrollbar","getOffsetRectRelativeToArbitraryNode","children","fixedPosition","isHTML","childrenRect","parentRect","scrollParent","borderTopWidth","borderLeftWidth","marginTop","marginLeft","getViewportOffsetRectRelativeToArtbitraryNode","excludeScroll","relativeOffset","offset","isFixed","parentNode","getFixedPositionOffsetParent","el","getBoundaries","popper","reference","padding","boundariesElement","boundaries","boundariesNode","_getWindowSizes","isPaddingNumber","getArea","computeAutoPlacement","placement","refRect","rects","sortedAreas","b","filteredAreas","computedPlacement","variation","getReferenceOffsets","commonOffsetParent","getOuterSizes","y","getOppositePlacement","hash","matched","getPopperOffsets","referenceOffsets","popperRect","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","find","findIndex","cur","runModifiers","modifiers","ends","modifiersToRun","update","isModifierEnabled","modifierName","enabled","getSupportedPropertyName","prefixes","upperProp","toCheck","destroy","getWindow","ownerDocument","attachToScrollParents","scrollParents","isBody","setupEventListeners","updateBound","scrollElement","enableEventListeners","removeEventListeners","disableEventListeners","isNumeric","n","setStyles","unit","setAttributes","attributes","applyStyle","applyStyleOnLoad","modifierOptions","getRoundedOffsets","shouldRound","_data$offsets","round","floor","noRound","v","referenceWidth","popperWidth","isVertical","isVariation","sameWidthParity","bothOddWidth","horizontalToInteger","verticalToInteger","isFirefox","computeStyle","legacyGpuAccelerationOption","gpuAcceleration","offsetParentRect","prefixedProperty","left","top","invertTop","invertLeft","isModifierRequired","requestingName","requestedName","requesting","isRequired","_requesting","requested","arrow","_data$offsets$arrow","arrowElement","sideCapitalized","altSide","opSide","arrowElementSize","center","popperMarginSide","popperBorderSide","sideValue","getOppositeVariation","placements","validPlacements","clockwise","counter","BEHAVIORS","flip","placementOpposite","flipOrder","step","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariationByRef","flippedVariationByContent","flippedVariation","keepTogether","toValue","str","split","size","parseOffset","basePlacement","useHeight","fragments","frag","divider","splitRegex","ops","op","mergeWithPrevious","index2","preventOverflow","transformProp","popperStyles","transform","shift","shiftvariation","shiftOffsets","hide","bound","inner","subtractLength","Defaults","Popper","eventsEnabled","_extends$2","isBrowser$1","ua","isIE$1","isUCBrowser","isIOS","defaultProps","POPPER_INSTANCE_DEPENDENCIES","elementProto","arrayFrom","closest","selector","closestCallback","PASSIVE","PADDING","PLACEMENT_ATTRIBUTE","OUT_OF_BOUNDARIES_ATTRIBUTE","IOS_CLASS","ACTIVE_CLASS","POPPER_CLASS","TOOLTIP_CLASS","CONTENT_CLASS","BACKDROP_CLASS","ARROW_CLASS","ROUND_ARROW_CLASS","POPPER_SELECTOR","TOOLTIP_SELECTOR","CONTENT_SELECTOR","BACKDROP_SELECTOR","ARROW_SELECTOR","ROUND_ARROW_SELECTOR","isUsingTouch","onDocumentTouch","onDocumentMouseMove","lastMouseMoveTime","now","onWindowBlur","_document","activeElement","bindGlobalEventListeners","getDataAttributeOptions","acc","valueAsString","polyfillElementPrototypeProperties","virtualReference","polyfills","isBareVirtualElement","isReferenceElement","hasOwnProperty$1","getArrayOfElements","isSingular","getValue","defaultValue","debounce$1","ms","timeout","getModifier","includes","isRealElement","innerHTML","invokeWithArgsOrReturn","setFlipModifierEnabled","m","canReceiveFocus","setTransitionDuration","els","setVisibilityState","evaluateProps","out","validateOptions","option","setInnerHTML","setContent","contentEl","getChildren","addInertia","tooltip","removeInertia","createArrowElement","arrowType","createBackdropElement","backdrop","addInteractive","removeInteractive","updateTransitionEndListener","action","listener","getBasicPlacement","fullPlacement","reflow","updateTheme","theme","themeName","createPopperElement","content","updatePopperElement","prevProps","nextProps","_getChildren","hideAll","excludedReferenceOrInstance","duration","isExcluded","isCursorOutsideInteractiveBorder","popperPlacement","interactiveBorder","distance","exceedsTop","exceedsBottom","exceedsLeft","exceedsRight","getOffsetDistanceInPx","idCounter","mouseMoveListeners","createTippy","collectionProps","lastTriggerEventType","lastMouseMoveEvent","showTimeoutId","hideTimeoutId","scheduleHideAnimationFrameId","isScheduledToShow","isBeingDestroyed","previousPlacement","wasVisibleDuringPreviousUpdate","hasMountCallbackRun","currentMountCallback","currentTransitionEndListener","listeners","currentComputedPadding","debouncedOnMouseMove","onMouseMove","popperChildren","popperInstance","clearDelayTimeouts","set","show","enable","disable","addTriggersToReference","createPopperInstance","scheduleShow","getEventListenersTarget","removeFollowCursorListener","positionVirtualReferenceNearCursor","cleanupInteractiveMouseListeners","scheduleHide","addDocumentClickListener","onDocumentClick","removeDocumentClickListener","getTransitionableElements","getIsInLooseFollowCursorMode","followCursor","makeSticky","updatePosition","onTransitionedOut","onTransitionEnd","onTransitionedIn","on","eventType","handler","onTrigger","onMouseLeave","onDelegateShow","onDelegateHide","onBlur","removeTriggersFromReference","_lastMouseMoveEvent","isCursorOverReference","isHorizontal","isVerticalPlacement","halfSize","verticalIncrease","horizontalIncrease","createDelegateChildTippy","targetEl","isEventListenerStopped","isCursorOverPopper","supportsTouch","isTouchEvent","touchHold","runMountCallback","popperOptions","_instance$popperChild","preventOverflowModifier","applyMutations","basicPlacement","computedPadding","mount","isInLooseFollowCursorMode","appendTo","shouldAvoidCallingOnTrigger","delay","transitionableElements","destroyTargetInstances","child","group","instances","_ref$delay","_ref$duration","isAnyTippyOpen","setIsAnyTippyOpen","updateInstances","onShow","onHide","onShown","globalEventListenersBound","tippy","targets","partialDefaults","autoInit","injectCSS","style","head","firstChild","missingTippy","addShepherdClass","centeredStylePopperModifier","defaultPopperOptions","createFromHTML","debounce$2","func","wait","immediate","later","drop","_parseAttachToOpts","opts","positionRe","parseShorthand","setupTooltip","attachToOpts","_makeTippyInstance","parseAttachTo","returnOpts","attachToOptions","_makeCenteredTippy","tippyOptions","_makeAttachedTippyOptions","resultingTippyOptions","existingTheme","finalPopperOptions","Evented","ctx","once","binding","objectTag","isHostObject","overArg","funcProto","objectProto$1","funcToString","hasOwnProperty$2","objectCtorString","objectToString","getPrototype","isElement","isObjectLike$1","isPlainObject","proto","Ctor","lodash_iselement","_setupAdvanceOnHandler","targetIsEl","targetIsSelector","bindAdvance","_parseShorthand","bindButtonEvents","cfg","page","bindCancelLink","link","bindMethods","methods","smoothscroll","polyfill","w","d","Element","SCROLL_TIME","original","isMicrosoftBrowser","userAgent","userAgentPatterns","ROUNDING_TOLERANCE","ease","k","shouldBailOut","firstArg","hasScrollableSpace","canOverflow","overflowValue","isScrollable","isScrollableY","isScrollableX","findScrollableParent","currentX","currentY","elapsed","smoothScroll","scrollable","startX","startY","startTime","scrollableParent","parentRects","clientRects","uniqueId","Step","_Evented","tour","footer","buttons","header","text","paragraphs","paragraph","classes","title","scrollToOptions","_this$parseAttachTo","when","beforeShowPromise","svgNS","elementIds","classNames","_createModalContainer","_createMaskContainer","_setAttributes","_createMaskRect","_createMaskOpening","_createMaskConsumer","createModalOverlay","containerElement","defsElement","maskContainer","maskRect","maskOpening","maskConsumer","positionModalOpening","targetElement","openingElement","modalOverlayOpeningPadding","_targetElement$getBou","closeModalOpening","getModalMaskOpening","modalElement","preventModalBodyTouch","preventModalOverlayTouch","toggleShepherdModalClass","currentElement","shepherdModal","attrs","getElementFromObject","attachTo","getElementForStep","getElementFromString","_element$split","_element$split2","addStepEventListeners","overlay","FUNC_ERROR_TEXT","apply","thisArg","nativeMax","baseDelay","baseRest","array","otherArgs","defer","lodash_defer","Modal","modalOverlayOpening","cleanupSteps","steps","stepElement","cleanupStepEventListeners","uniqueId$1","Shepherd","Tour","events","arg1","arg2","cancelMessage","stopTour","currentStep","current","stepOptions","forward","shouldSkipStep","nextIndex","tourName","uuid","stepData","newsBoxEls","bookedMarkedItems","bookedMarked","currentBookmark","bookmark","bookmarkContent","bookmarkEl","bookmarkLink","btnEl","selectVideo","newVimeoId","vimeoIframeEl","initVideoPlayer","videoItemEl","eventListeners","addEventListener","setLoading","loading","videoItemEls","cleanUpCb","beforePrint","afterPrint","mql","getOffset","navs","centerOnActiveItem","nav","pos","bar","toggle","toggleVisibility","StickySidebar","EVENT_KEY","DEFAULTS","sidebar","wrapper","containers","dims","furthest","affixType","sidebarBottom","colliderTop","colliderBottom","translate","force","affixEvent","_unit","affixedEvent","support","z","styleReset","transform3d","upper","results","offsetTop","offsetLeft","className","sidebarSelector","topSpacing","Sticky","stickyMQ","stickyConfig","toggleSticky","overflowTriggers","opened","removeClass","toggles","formAction","modal","modalTitle","form","idInput","row","bookmarkId","bookmarkTitle","nameInput","folderDropdown","sectionDropdown","mainSectionChoice","newSectionChoice","newFolderName","sectionContainer","newSectionName","addClass","resp","sections","newInputs","submitButton","reenableBtn","newFolderInput","newSectionInput","library_content","library_sections","library_bookmarks","searchData","fuse","Fuse","searchTerm","matchingItems","section","highlightsActivator","windowSelection","contentInput","highlightsHelper1","highlightsHelper2","highlightedText","r","rb1","rb2","tabbable","elementDocument","basicTabbables","orderedTabbables","isUnavailable","createIsUnavailable","candidateSelectors","candidates","candidateSelector","candidate","candidateIndexAttr","candidateIndex","tabbableNodes","isOffCache","isOff","nodeComputedStyle","require$$0","listeningFocusTrap","focusTrap","userOptions","firstTabbableNode","lastTabbableNode","nodeFocusedBeforeActivation","active","paused","tabEvent","trap","activate","deactivate","pause","unpause","activateOptions","defaultedActivateOptions","addListeners","deactivateOptions","defaultedDeactivateOptions","removeListeners","tryFocus","updateTabbableNodes","firstFocusNode","checkFocus","checkClick","checkPointerDown","checkKey","getNodeForOption","optionName","optionValue","readjustFocus","handleTab","isEscapeEvent","currentFocusIndex","focusTrap_1","triggers","closeBtn","activeTriggerClass","activeSidebarClass","initFocusTrap","isActive","toggleClass","showSmartOutline","sticky","toggler","articlePdfLinks","linkEl","fileName","slug","response","quiz","questions","questionsContainer","nextQuestionTrigger","prevQuestionTrigger","seeAnswersTrigger","startOverQuizTrigger","questionRadios","submit","quizID","videoID","currentQuestion","answersArray","toggleNavigation","nextQuestion","questionOffset","prevQuestion","seeAnswers","startOverQuiz","question","radio","questionsCorrectArr","questionElem","items","accessibleNav","animationEventNames","transitionEventNames","animationEventName","onEnd","continuous","oncePerElems","oncePerAnims","animationsCountTotal","animationsPassedTotal","animationsCount","animationsPassed","removeEventListener","onCssAnimationEnd","closeBtns","paywall","footerElement","pageHeight","footerHeight","currentScroll","footerScrollHeight","setPaywallSizes","repositionPaywall","fixedPaywall","openFormBtn","saveSearchForm","FetchResponse","script","metaTag","nonce","RequestInterceptor","interceptor","getCookie","cookies","cookie","compact","metaContent","stringEntriesFromFormData","formData","entries","mergeEntries","searchParams","FetchRequest","requestInterceptor","fetch","headers","baseHeaders","originalQuery","requestQuery","query","bodyIsAString","sendRequestButton","confirmation","_objectWithoutPropertiesLoose","excluded","sourceKeys","_objectWithoutProperties","sourceSymbolKeys","pattern","IE11OrLess","Edge","FireFox","Safari","IOS","ChromeForAndroid","captureMode","off","getParentOrHost","includeCTX","R_SPACE","matrix","selfOnly","appliedTransforms","matrixFn","tagName","iterator","list","getWindowScrollingElement","getRect","relativeToContainingBlock","relativeToNonStaticParent","undoScale","elRect","bottom","right","containerRect","elMatrix","scaleX","scaleY","isScrolledPast","elSide","parentSide","getParentAutoScrollElement","elSideVal","parentSideVal","visible","getChild","childNum","includeDragEl","currentChild","Sortable","lastChild","getRelativeScrollOffset","winScroller","indexOfObject","includeSelf","elem","gotSelf","elemCSS","extend","dst","src","isRectEqual","rect1","rect2","_throttleTimeout","throttle","cancelThrottle","scrollBy","clone","Polymer","$","getChildContainingRectFromElement","ghostEl","_rect$left","_rect$top","_rect$right","_rect$bottom","childRect","expando","AnimationStateManager","animationStates","animationCallbackId","fromRect","childMatrix","animating","animationTime","toRect","prevFromRect","prevToRect","animatingRect","targetMatrix","calculateRealTime","currentRect","translateX","translateY","repaint","plugins","PluginManager","plugin","sortable","evt","eventNameGlobal","pluginName","initialized","modified","eventProperties","modifiedValue","dispatchEvent","rootEl","cloneEl","toEl","fromEl","oldIndex","newIndex","oldDraggableIndex","newDraggableIndex","originalEvent","putSortable","extraEventProperties","allEventProperties","_excluded","pluginEvent","dragEl","parentEl","nextEl","lastDownEl","cloneHidden","moved","_hideGhostForTarget","_unhideGhostForTarget","_dispatchEvent","activeGroup","awaitingDragStarted","ignoreNextClick","sortables","tapEvt","touchEvt","lastDx","lastDy","tapDistanceLeft","tapDistanceTop","lastTarget","lastDirection","pastFirstInvertThresh","isCircumstantialInvert","targetMoveDistance","ghostRelativeParent","ghostRelativeParentInitialScroll","_silent","savedInputChecked","documentExists","PositionGhostAbsolutely","CSSFloatProperty","supportDraggable","supportCssPointerEvents","_detectDirection","elCSS","elWidth","child1","child2","firstChildCSS","secondChildCSS","firstChildWidth","secondChildWidth","touchingSideChild2","_dragElInRowColumn","dragRect","targetRect","vertical","dragElS1Opp","dragElS2Opp","dragElOppLength","targetS1Opp","targetS2Opp","targetOppLength","_detectNearestEmptySortable","threshold","insideHorizontally","insideVertically","_prepareGroup","toFn","pull","to","from","sameGroup","otherGroup","originalGroup","nearestEmptyInsertDetectEvent","nearest","_checkOutsideTargetEl","dataTransfer","preventOnFilter","touch","originalTarget","filter","_saveInputCheckedState","criteria","dragStartFn","_disableDraggable","_nextTick","fallback","inserted","fallbackTolerance","fallbackOffset","ghostMatrix","relativeScrollOffset","dx","dy","cssMatrix","revert","activeSortable","isOwner","canSort","fromSortable","completedFired","dragOverEvent","extra","completed","after","_onMove","changed","capture","insertion","elLastChild","_ghostIsLast","_ghostIsFirst","direction","targetBeforeFirstSwap","differentLevel","differentRowCol","side1","scrolledPastTop","scrollBefore","_getSwapDirection","sibling","dragIndex","nextSibling","moveVector","_unsilent","_cancelNextTick","_globalDragOver","_generateId","useAnimation","store","willInsertAfter","onMoveFn","retVal","firstElRect","childContainingRect","spacer","lastElRect","swapThreshold","invertedSwapThreshold","invertSwap","isLastTarget","mouseOnAxis","targetLength","targetS1","targetS2","invert","_getInsertDirection","sum","root","inputs","_len","_key","autoScrolls","scrollEl","scrollRootEl","scrolling","lastAutoScrollX","lastAutoScrollY","touchEvt$1","pointerElemChangedInterval","AutoScrollPlugin","AutoScroll","clearPointerElemChangedInterval","clearAutoScrolls","autoScroll","ogElemScroller","newElem","isFallback","sens","speed","scrollThisInstance","scrollCustomFn","layersOut","currentParent","canScrollX","canScrollY","scrollWidth","scrollHeight","scrollPosX","scrollPosY","vx","vy","scrollOffsetY","scrollOffsetX","dispatchSortableEvent","hideGhostForTarget","unhideGhostForTarget","toSortable","Revert","Remove","_ref4","parentSortable","lists","handleParticipantsOnChange","numberOfParticipants","templateId","template","currentNumberOfParticipants","tmp","addAutocompleteCheckbox","createAutocompleteCheckbox","checkboxContainer","checkboxLabel","checkboxLabelText","checkboxInput","handleCheckboxOnChange","checked","inputFields","bookingName","bookingEmail","participantEmail","participantName","firstNestedFields","checkboxElement","newCheckboxElement","A11yDialog","purchaseNotice","purchaseNoticeShareButton","shareButton","hasClosest","tabButtons","allTabsContent","tabEl","_tabEl","tabContent","selectedTabContent","submitBtn","closeSubmitMsgBtn","submitMsg","questionInput","seminarId","newQuestionContainer","newQuestionText","newQuestionTimeStamp","timeStamp","NON_BUSINESS_EMAILS","privateEmail","createInputError","removeInputError","errorWrapperEl","Cocooned"],"mappings":"6SAKAA,EAAK,IAAM,CACT,MAAMC,EAAeC,EAAY,iBAAiB,EAC9CD,EAAa,QAEjBA,EAAa,QAASE,GAAY,CAChCA,EAAQ,iBAAiB,QAAUC,GAAM,CACvCA,EAAE,eAAgB,EAElB,MAAMC,EAAYF,EAAQ,QAAQ,YAAY,EAC5BG,GAAQ,IAAID,EAAU,aAAa,oBAAoB,CAAC,GAE1D,OACdC,GAAQ,OAAOD,EAAU,aAAa,oBAAoB,CAAC,EAG3DC,GAAQ,IAAID,EAAU,aAAa,oBAAoB,EAAG,OAAQ,CAAE,QAAS,IAAK,CAE1F,CAAK,CACL,CAAG,CACH,CAAC,ECxBD,gGACA,SAASE,GAAQC,EAAQC,EAAgB,CACvC,IAAIC,EAAO,OAAO,KAAKF,CAAM,EAC7B,GAAI,OAAO,sBAAuB,CAChC,IAAIG,EAAU,OAAO,sBAAsBH,CAAM,EACjDC,IAAmBE,EAAUA,EAAQ,OAAO,SAAUC,EAAK,CACzD,OAAO,OAAO,yBAAyBJ,EAAQI,CAAG,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