diff --git a/README.md b/README.md index 73e742b..9fe101e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ The benefit of using converse.js as opposed to relying on a SaaS (software-as-a- -**Shipped version:** 7.0.6~ynh2 +**Shipped version:** 9.0.0~ynh1 **Demo:** https://inverse.chat/ diff --git a/README_fr.md b/README_fr.md index 4e4d914..f56a883 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ The benefit of using converse.js as opposed to relying on a SaaS (software-as-a- -**Version incluse :** 7.0.6~ynh2 +**Version incluse :** 9.0.0~ynh1 **Démo :** https://inverse.chat/ diff --git a/conf/nginx.conf b/conf/nginx.conf index 4ff7bc7..26fac60 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,11 +6,6 @@ location __PATH__/ { index index.html; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - # BOSH location = __PATH__/http-bind { proxy_pass "http://localhost:5290/http-bind"; diff --git a/manifest.json b/manifest.json index 8df0172..e7c33ad 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web-based XMPP/Jabber chat client", "fr": "Client de chat XMPP/Jabber basé sur le Web" }, - "version": "7.0.6~ynh2", + "version": "9.0.0~ynh1", "url": "http://conversejs.org/", "upstream": { "license": "MPL-2.0", @@ -21,7 +21,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -31,8 +31,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "domain.org" + "type": "domain" }, { "name": "path", diff --git a/scripts/restore b/scripts/restore index e1d772a..258843e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -30,8 +30,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS diff --git a/sources/dist/converse.js b/sources/dist/converse.js deleted file mode 100644 index aa27b88..0000000 --- a/sources/dist/converse.js +++ /dev/null @@ -1,83469 +0,0 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 7706: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -const atob = __webpack_require__(171); - -const btoa = __webpack_require__(8713); - -module.exports = { - atob, - btoa -}; - -/***/ }), - -/***/ 171: -/***/ ((module) => { - -"use strict"; - -/** - * Implementation of atob() according to the HTML and Infra specs, except that - * instead of throwing INVALID_CHARACTER_ERR we return null. - */ - -function atob(data) { - // Web IDL requires DOMStrings to just be converted using ECMAScript - // ToString, which in our case amounts to using a template literal. - data = `${data}`; // "Remove all ASCII whitespace from data." - - data = data.replace(/[ \t\n\f\r]/g, ""); // "If data's length divides by 4 leaving no remainder, then: if data ends - // with one or two U+003D (=) code points, then remove them from data." - - if (data.length % 4 === 0) { - data = data.replace(/==?$/, ""); - } // "If data's length divides by 4 leaving a remainder of 1, then return - // failure." - // - // "If data contains a code point that is not one of - // - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // - // then return failure." - - - if (data.length % 4 === 1 || /[^+/0-9A-Za-z]/.test(data)) { - return null; - } // "Let output be an empty byte sequence." - - - let output = ""; // "Let buffer be an empty buffer that can have bits appended to it." - // - // We append bits via left-shift and or. accumulatedBits is used to track - // when we've gotten to 24 bits. - - let buffer = 0; - let accumulatedBits = 0; // "Let position be a position variable for data, initially pointing at the - // start of data." - // - // "While position does not point past the end of data:" - - for (let i = 0; i < data.length; i++) { - // "Find the code point pointed to by position in the second column of - // Table 1: The Base 64 Alphabet of RFC 4648. Let n be the number given in - // the first cell of the same row. - // - // "Append to buffer the six bits corresponding to n, most significant bit - // first." - // - // atobLookup() implements the table from RFC 4648. - buffer <<= 6; - buffer |= atobLookup(data[i]); - accumulatedBits += 6; // "If buffer has accumulated 24 bits, interpret them as three 8-bit - // big-endian numbers. Append three bytes with values equal to those - // numbers to output, in the same order, and then empty buffer." - - if (accumulatedBits === 24) { - output += String.fromCharCode((buffer & 0xff0000) >> 16); - output += String.fromCharCode((buffer & 0xff00) >> 8); - output += String.fromCharCode(buffer & 0xff); - buffer = accumulatedBits = 0; - } // "Advance position by 1." - - } // "If buffer is not empty, it contains either 12 or 18 bits. If it contains - // 12 bits, then discard the last four and interpret the remaining eight as - // an 8-bit big-endian number. If it contains 18 bits, then discard the last - // two and interpret the remaining 16 as two 8-bit big-endian numbers. Append - // the one or two bytes with values equal to those one or two numbers to - // output, in the same order." - - - if (accumulatedBits === 12) { - buffer >>= 4; - output += String.fromCharCode(buffer); - } else if (accumulatedBits === 18) { - buffer >>= 2; - output += String.fromCharCode((buffer & 0xff00) >> 8); - output += String.fromCharCode(buffer & 0xff); - } // "Return output." - - - return output; -} -/** - * A lookup table for atob(), which converts an ASCII character to the - * corresponding six-bit number. - */ - - -const keystr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - -function atobLookup(chr) { - const index = keystr.indexOf(chr); // Throw exception if character is not in the lookup string; should not be hit in tests - - return index < 0 ? undefined : index; -} - -module.exports = atob; - -/***/ }), - -/***/ 8713: -/***/ ((module) => { - -"use strict"; - -/** - * btoa() as defined by the HTML and Infra specs, which mostly just references - * RFC 4648. - */ - -function btoa(s) { - let i; // String conversion as required by Web IDL. - - s = `${s}`; // "The btoa() method must throw an "InvalidCharacterError" DOMException if - // data contains any character whose code point is greater than U+00FF." - - for (i = 0; i < s.length; i++) { - if (s.charCodeAt(i) > 255) { - return null; - } - } - - let out = ""; - - for (i = 0; i < s.length; i += 3) { - const groupsOfSix = [undefined, undefined, undefined, undefined]; - groupsOfSix[0] = s.charCodeAt(i) >> 2; - groupsOfSix[1] = (s.charCodeAt(i) & 0x03) << 4; - - if (s.length > i + 1) { - groupsOfSix[1] |= s.charCodeAt(i + 1) >> 4; - groupsOfSix[2] = (s.charCodeAt(i + 1) & 0x0f) << 2; - } - - if (s.length > i + 2) { - groupsOfSix[2] |= s.charCodeAt(i + 2) >> 6; - groupsOfSix[3] = s.charCodeAt(i + 2) & 0x3f; - } - - for (let j = 0; j < groupsOfSix.length; j++) { - if (typeof groupsOfSix[j] === "undefined") { - out += "="; - } else { - out += btoaLookup(groupsOfSix[j]); - } - } - } - - return out; -} -/** - * Lookup table for btoa(), which converts a six-bit number into the - * corresponding ASCII character. - */ - - -const keystr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - -function btoaLookup(index) { - if (index >= 0 && index < 64) { - return keystr[index]; - } // Throw INVALID_CHARACTER_ERR exception here -- won't be hit in the tests. - - - return undefined; -} - -module.exports = btoa; - -/***/ }), - -/***/ 8826: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -module.exports = { - "default": __webpack_require__(5820), - __esModule: true -}; - -/***/ }), - -/***/ 1060: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -module.exports = { - "default": __webpack_require__(3248), - __esModule: true -}; - -/***/ }), - -/***/ 3415: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -module.exports = { - "default": __webpack_require__(9830), - __esModule: true -}; - -/***/ }), - -/***/ 8681: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -exports.__esModule = true; - -var _promise = __webpack_require__(3415); - -var _promise2 = _interopRequireDefault(_promise); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; -} - -exports.default = function (fn) { - return function () { - var gen = fn.apply(this, arguments); - return new _promise2.default(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - return _promise2.default.resolve(value).then(function (value) { - step("next", value); - }, function (err) { - step("throw", err); - }); - } - } - - return step("next"); - }); - }; -}; - -/***/ }), - -/***/ 8584: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; - - -exports.__esModule = true; - -var _defineProperty = __webpack_require__(8826); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; -} - -exports.default = function (obj, key, value) { - if (key in obj) { - (0, _defineProperty2.default)(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -}; - -/***/ }), - -/***/ 7034: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// This method of obtaining a reference to the global object needs to be -// kept identical to the way it is obtained in runtime.js -var g = function () { - return this; -}() || Function("return this")(); // Use `getOwnPropertyNames` because not all browsers support calling -// `hasOwnProperty` on the global `self` object in a worker. See #183. - - -var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; // Save the old regeneratorRuntime in case it needs to be restored later. - -var oldRuntime = hadRuntime && g.regeneratorRuntime; // Force reevalutation of runtime.js. - -g.regeneratorRuntime = undefined; -module.exports = __webpack_require__(4267); - -if (hadRuntime) { - // Restore the original runtime. - g.regeneratorRuntime = oldRuntime; -} else { - // Remove the global property added by runtime.js. - try { - delete g.regeneratorRuntime; - } catch (e) { - g.regeneratorRuntime = undefined; - } -} - -/***/ }), - -/***/ 4267: -/***/ ((module) => { - -/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -!function (global) { - "use strict"; - - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; // More compressible than void 0. - - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - var inModule = "object" === "object"; - var runtime = global.regeneratorRuntime; - - if (runtime) { - if (inModule) { - // If regeneratorRuntime is defined globally and we're in a module, - // make the exports object identical to regeneratorRuntime. - module.exports = runtime; - } // Don't bother evaluating the rest of this file if the runtime was - // already defined globally. - - - return; - } // Define the runtime globally (as expected by generated code) as either - // module.exports (if we're in a module) or a new, empty object. - - - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - - generator._invoke = makeInvokeMethod(innerFn, self, context); - return generator; - } - - runtime.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - - function tryCatch(fn, obj, arg) { - try { - return { - type: "normal", - arg: fn.call(obj, arg) - }; - } catch (err) { - return { - type: "throw", - arg: err - }; - } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - - var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - - function Generator() {} - - function GeneratorFunction() {} - - function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - - - var IteratorPrototype = {}; - - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; - - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - - if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } - - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function (method) { - prototype[method] = function (arg) { - return this._invoke(method, arg); - }; - }); - } - - runtime.isGeneratorFunction = function (genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" : false; - }; - - runtime.mark = function (genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = "GeneratorFunction"; - } - } - - genFun.prototype = Object.create(Gp); - return genFun; - }; // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - - - runtime.awrap = function (arg) { - return { - __await: arg - }; - }; - - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - - if (value && typeof value === "object" && hasOwn.call(value, "__await")) { - return Promise.resolve(value.__await).then(function (value) { - invoke("next", value, resolve, reject); - }, function (err) { - invoke("throw", err, resolve, reject); - }); - } - - return Promise.resolve(value).then(function (unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. If the Promise is rejected, however, the - // result for this iteration will be rejected with the same - // reason. Note that rejections of yielded Promises are not - // thrown back into the generator function, as is the case - // when an awaited Promise is rejected. This difference in - // behavior between yield and await is important, because it - // allows the consumer to decide what to do with the yielded - // rejection (swallow it and continue, manually .throw it back - // into the generator, abandon iteration, whatever). With - // await, by contrast, there is no opportunity to examine the - // rejection reason outside the generator function, so the - // only option is to throw it from the await expression, and - // let the generator function handle the exception. - result.value = unwrapped; - resolve(result); - }, reject); - } - } - - var previousPromise; - - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise(function (resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - - return previousPromise = // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); - } // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - - - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - - runtime.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - - runtime.async = function (innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); - return runtime.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function (result) { - return result.done ? result.value : iter.next(); - }); - }; - - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - - - return doneResult(); - } - - context.method = method; - context.arg = arg; - - while (true) { - var delegate = context.delegate; - - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - - context.dispatchException(context.arg); - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } - - state = GenStateExecuting; - var record = tryCatch(innerFn, self, context); - - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done ? GenStateCompleted : GenStateSuspendedYield; - - if (record.arg === ContinueSentinel) { - continue; - } - - return { - value: record.arg, - done: context.done - }; - } else if (record.type === "throw") { - state = GenStateCompleted; // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - - context.method = "throw"; - context.arg = record.arg; - } - } - }; - } // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - - - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - - if (method === undefined) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; - - if (context.method === "throw") { - if (delegate.iterator.return) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } - - context.method = "throw"; - context.arg = new TypeError("The iterator does not provide a 'throw' method"); - } - - return ContinueSentinel; - } - - var record = tryCatch(method, delegate.iterator, context.arg); - - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - - var info = record.arg; - - if (!info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } - - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield). - - context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } - } else { - // Re-yield the result returned by the delegate method. - return info; - } // The delegate iterator is finished, so forget it and continue with - // the outer generator. - - - context.delegate = null; - return ContinueSentinel; - } // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - - - defineIteratorMethods(Gp); - Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - - Gp[iteratorSymbol] = function () { - return this; - }; - - Gp.toString = function () { - return "[object Generator]"; - }; - - function pushTryEntry(locs) { - var entry = { - tryLoc: locs[0] - }; - - if (1 in locs) { - entry.catchLoc = locs[1]; - } - - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - - this.tryEntries.push(entry); - } - - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ - tryLoc: "root" - }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - - runtime.keys = function (object) { - var keys = []; - - for (var key in object) { - keys.push(key); - } - - keys.reverse(); // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - - return function next() { - while (keys.length) { - var key = keys.pop(); - - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - - - next.done = true; - return next; - }; - }; - - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - - if (typeof iterable.next === "function") { - return iterable; - } - - if (!isNaN(iterable.length)) { - var i = -1, - next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - - next.value = undefined; - next.done = true; - return next; - }; - - return next.next = next; - } - } // Return an iterator with no values. - - - return { - next: doneResult - }; - } - - runtime.values = values; - - function doneResult() { - return { - value: undefined, - done: true - }; - } - - Context.prototype = { - constructor: Context, - reset: function (skipTempReset) { - this.prev = 0; - this.next = 0; // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - this.method = "next"; - this.arg = undefined; - this.tryEntries.forEach(resetTryEntry); - - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - stop: function () { - this.done = true; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - - return this.rval; - }, - dispatchException: function (exception) { - if (this.done) { - throw exception; - } - - var context = this; - - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } - - return !!caught; - } - - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } - - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - abrupt: function (type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - - if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - - if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - - return this.complete(record); - }, - complete: function (record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - - if (record.type === "break" || record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - - return ContinueSentinel; - }, - finish: function (finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - "catch": function (tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - - return thrown; - } - } // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - - - throw new Error("illegal catch attempt"); - }, - delegateYield: function (iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; - } - - return ContinueSentinel; - } - }; -}( // In sloppy mode, unbound `this` refers to the global object, fallback to -// Function constructor if we're in global strict mode. That is sadly a form -// of indirect eval which violates Content Security Policy. -function () { - return this; -}() || Function("return this")()); - -/***/ }), - -/***/ 1161: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -module.exports = __webpack_require__(7034); - -/***/ }), - -/***/ 6434: -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Native Javascript for Bootstrap 4 v2.0.27 | © dnp_theme | MIT-License -(function (root, factory) { - if (true) { - // AMD support: - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else { var bsn; } -})(this, function () { - /* Native Javascript for Bootstrap 4 | Internal Utility Functions - ----------------------------------------------------------------*/ - "use strict"; // globals - - var globalObject = typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : this || window, - DOC = document, - HTML = DOC.documentElement, - body = 'body', - // allow the library to be used in
- // Native Javascript for Bootstrap Global Object - BSN = globalObject.BSN = {}, - supports = BSN.supports = [], - // function toggle attributes - dataToggle = 'data-toggle', - dataDismiss = 'data-dismiss', - dataSpy = 'data-spy', - dataRide = 'data-ride', - // components - stringAlert = 'Alert', - stringButton = 'Button', - stringCarousel = 'Carousel', - stringCollapse = 'Collapse', - stringDropdown = 'Dropdown', - stringModal = 'Modal', - stringPopover = 'Popover', - stringScrollSpy = 'ScrollSpy', - stringTab = 'Tab', - stringTooltip = 'Tooltip', - stringToast = 'Toast', - // options DATA API - dataAutohide = 'data-autohide', - databackdrop = 'data-backdrop', - dataKeyboard = 'data-keyboard', - dataTarget = 'data-target', - dataInterval = 'data-interval', - dataHeight = 'data-height', - dataPause = 'data-pause', - dataTitle = 'data-title', - dataOriginalTitle = 'data-original-title', - dataDismissible = 'data-dismissible', - dataTrigger = 'data-trigger', - dataAnimation = 'data-animation', - dataContainer = 'data-container', - dataPlacement = 'data-placement', - dataDelay = 'data-delay', - // option keys - backdrop = 'backdrop', - keyboard = 'keyboard', - delay = 'delay', - content = 'content', - target = 'target', - currentTarget = 'currentTarget', - interval = 'interval', - pause = 'pause', - animation = 'animation', - placement = 'placement', - container = 'container', - // box model - offsetTop = 'offsetTop', - offsetBottom = 'offsetBottom', - offsetLeft = 'offsetLeft', - scrollTop = 'scrollTop', - scrollLeft = 'scrollLeft', - clientWidth = 'clientWidth', - clientHeight = 'clientHeight', - offsetWidth = 'offsetWidth', - offsetHeight = 'offsetHeight', - innerWidth = 'innerWidth', - innerHeight = 'innerHeight', - scrollHeight = 'scrollHeight', - scrollWidth = 'scrollWidth', - height = 'height', - // aria - ariaExpanded = 'aria-expanded', - ariaHidden = 'aria-hidden', - ariaSelected = 'aria-selected', - // event names - clickEvent = 'click', - focusEvent = 'focus', - hoverEvent = 'hover', - keydownEvent = 'keydown', - keyupEvent = 'keyup', - resizeEvent = 'resize', - // passive - scrollEvent = 'scroll', - // passive - mouseHover = 'onmouseleave' in DOC ? ['mouseenter', 'mouseleave'] : ['mouseover', 'mouseout'], - // touch since 2.0.26 - touchEvents = { - start: 'touchstart', - end: 'touchend', - move: 'touchmove' - }, - // passive - // originalEvents - showEvent = 'show', - shownEvent = 'shown', - hideEvent = 'hide', - hiddenEvent = 'hidden', - closeEvent = 'close', - closedEvent = 'closed', - slidEvent = 'slid', - slideEvent = 'slide', - changeEvent = 'change', - // other - getAttribute = 'getAttribute', - setAttribute = 'setAttribute', - hasAttribute = 'hasAttribute', - createElement = 'createElement', - appendChild = 'appendChild', - innerHTML = 'innerHTML', - getElementsByTagName = 'getElementsByTagName', - preventDefault = 'preventDefault', - getBoundingClientRect = 'getBoundingClientRect', - querySelectorAll = 'querySelectorAll', - getElementsByCLASSNAME = 'getElementsByClassName', - getComputedStyle = 'getComputedStyle', - indexOf = 'indexOf', - parentNode = 'parentNode', - length = 'length', - toLowerCase = 'toLowerCase', - Transition = 'Transition', - Duration = 'Duration', - Webkit = 'Webkit', - style = 'style', - push = 'push', - tabindex = 'tabindex', - contains = 'contains', - active = 'active', - showClass = 'show', - collapsing = 'collapsing', - disabled = 'disabled', - loading = 'loading', - left = 'left', - right = 'right', - top = 'top', - bottom = 'bottom', - // tooltip / popover - tipPositions = /\b(top|bottom|left|right)+/, - // modal - modalOverlay = 0, - fixedTop = 'fixed-top', - fixedBottom = 'fixed-bottom', - // transitionEnd since 2.0.4 - supportTransitions = Webkit + Transition in HTML[style] || Transition[toLowerCase]() in HTML[style], - transitionEndEvent = Webkit + Transition in HTML[style] ? Webkit[toLowerCase]() + Transition + 'End' : Transition[toLowerCase]() + 'end', - transitionDuration = Webkit + Duration in HTML[style] ? Webkit[toLowerCase]() + Transition + Duration : Transition[toLowerCase]() + Duration, - // set new focus element since 2.0.3 - setFocus = function (element) { - element.focus ? element.focus() : element.setActive(); - }, - // class manipulation, since 2.0.0 requires polyfill.js - addClass = function (element, classNAME) { - element.classList.add(classNAME); - }, - removeClass = function (element, classNAME) { - element.classList.remove(classNAME); - }, - hasClass = function (element, classNAME) { - // since 2.0.0 - return element.classList[contains](classNAME); - }, - // selection methods - getElementsByClassName = function (element, classNAME) { - // returns Array - return [].slice.call(element[getElementsByCLASSNAME](classNAME)); - }, - queryElement = function (selector, parent) { - var lookUp = parent ? parent : DOC; - return typeof selector === 'object' ? selector : lookUp.querySelector(selector); - }, - getClosest = function (element, selector) { - //element is the element and selector is for the closest parent element to find - // source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/ - var firstChar = selector.charAt(0), - selectorSubstring = selector.substr(1); - - if (firstChar === '.') { - // If selector is a class - for (; element && element !== DOC; element = element[parentNode]) { - // Get closest match - if (queryElement(selector, element[parentNode]) !== null && hasClass(element, selectorSubstring)) { - return element; - } - } - } else if (firstChar === '#') { - // If selector is an ID - for (; element && element !== DOC; element = element[parentNode]) { - // Get closest match - if (element.id === selectorSubstring) { - return element; - } - } - } - - return false; - }, - // event attach jQuery style / trigger since 1.2.0 - on = function (element, event, handler, options) { - options = options || false; - element.addEventListener(event, handler, options); - }, - off = function (element, event, handler, options) { - options = options || false; - element.removeEventListener(event, handler, options); - }, - one = function (element, event, handler, options) { - // one since 2.0.4 - on(element, event, function handlerWrapper(e) { - handler(e); - off(element, event, handlerWrapper, options); - }, options); - }, - // determine support for passive events - supportPassive = function () { - // Test via a getter in the options object to see if the passive property is accessed - var result = false; - - try { - var opts = Object.defineProperty({}, 'passive', { - get: function () { - result = true; - } - }); - one(globalObject, 'testPassive', null, opts); - } catch (e) {} - - return result; - }(), - // event options - // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection - passiveHandler = supportPassive ? { - passive: true - } : false, - // transitions - getTransitionDurationFromElement = function (element) { - var duration = supportTransitions ? globalObject[getComputedStyle](element)[transitionDuration] : 0; - duration = parseFloat(duration); - duration = typeof duration === 'number' && !isNaN(duration) ? duration * 1000 : 0; - return duration; // we take a short offset to make sure we fire on the next frame after animation - }, - emulateTransitionEnd = function (element, handler) { - // emulateTransitionEnd since 2.0.4 - var called = 0, - duration = getTransitionDurationFromElement(element); - duration ? one(element, transitionEndEvent, function (e) { - !called && handler(e), called = 1; - }) : setTimeout(function () { - !called && handler(), called = 1; - }, 17); - }, - bootstrapCustomEvent = function (eventName, componentName, related) { - var OriginalCustomEvent = new CustomEvent(eventName + '.bs.' + componentName); - OriginalCustomEvent.relatedTarget = related; - this.dispatchEvent(OriginalCustomEvent); - }, - // tooltip / popover stuff - getScroll = function () { - // also Affix and ScrollSpy uses it - return { - y: globalObject.pageYOffset || HTML[scrollTop], - x: globalObject.pageXOffset || HTML[scrollLeft] - }; - }, - styleTip = function (link, element, position, parent) { - // both popovers and tooltips (target,tooltip,placement,elementToAppendTo) - var elementDimensions = { - w: element[offsetWidth], - h: element[offsetHeight] - }, - windowWidth = HTML[clientWidth] || DOC[body][clientWidth], - windowHeight = HTML[clientHeight] || DOC[body][clientHeight], - rect = link[getBoundingClientRect](), - scroll = parent === DOC[body] ? getScroll() : { - x: parent[offsetLeft] + parent[scrollLeft], - y: parent[offsetTop] + parent[scrollTop] - }, - linkDimensions = { - w: rect[right] - rect[left], - h: rect[bottom] - rect[top] - }, - isPopover = hasClass(element, 'popover'), - topPosition, - leftPosition, - arrow = queryElement('.arrow', element), - arrowTop, - arrowLeft, - arrowWidth, - arrowHeight, - halfTopExceed = rect[top] + linkDimensions.h / 2 - elementDimensions.h / 2 < 0, - halfLeftExceed = rect[left] + linkDimensions.w / 2 - elementDimensions.w / 2 < 0, - halfRightExceed = rect[left] + elementDimensions.w / 2 + linkDimensions.w / 2 >= windowWidth, - halfBottomExceed = rect[top] + elementDimensions.h / 2 + linkDimensions.h / 2 >= windowHeight, - topExceed = rect[top] - elementDimensions.h < 0, - leftExceed = rect[left] - elementDimensions.w < 0, - bottomExceed = rect[top] + elementDimensions.h + linkDimensions.h >= windowHeight, - rightExceed = rect[left] + elementDimensions.w + linkDimensions.w >= windowWidth; // recompute position - - position = (position === left || position === right) && leftExceed && rightExceed ? top : position; // first, when both left and right limits are exceeded, we fall back to top|bottom - - position = position === top && topExceed ? bottom : position; - position = position === bottom && bottomExceed ? top : position; - position = position === left && leftExceed ? right : position; - position = position === right && rightExceed ? left : position; // update tooltip/popover class - - element.className[indexOf](position) === -1 && (element.className = element.className.replace(tipPositions, position)); // we check the computed width & height and update here - - arrowWidth = arrow[offsetWidth]; - arrowHeight = arrow[offsetHeight]; // apply styling to tooltip or popover - - if (position === left || position === right) { - // secondary|side positions - if (position === left) { - // LEFT - leftPosition = rect[left] + scroll.x - elementDimensions.w - (isPopover ? arrowWidth : 0); - } else { - // RIGHT - leftPosition = rect[left] + scroll.x + linkDimensions.w; - } // adjust top and arrow - - - if (halfTopExceed) { - topPosition = rect[top] + scroll.y; - arrowTop = linkDimensions.h / 2 - arrowWidth; - } else if (halfBottomExceed) { - topPosition = rect[top] + scroll.y - elementDimensions.h + linkDimensions.h; - arrowTop = elementDimensions.h - linkDimensions.h / 2 - arrowWidth; - } else { - topPosition = rect[top] + scroll.y - elementDimensions.h / 2 + linkDimensions.h / 2; - arrowTop = elementDimensions.h / 2 - (isPopover ? arrowHeight * 0.9 : arrowHeight / 2); - } - } else if (position === top || position === bottom) { - // primary|vertical positions - if (position === top) { - // TOP - topPosition = rect[top] + scroll.y - elementDimensions.h - (isPopover ? arrowHeight : 0); - } else { - // BOTTOM - topPosition = rect[top] + scroll.y + linkDimensions.h; - } // adjust left | right and also the arrow - - - if (halfLeftExceed) { - leftPosition = 0; - arrowLeft = rect[left] + linkDimensions.w / 2 - arrowWidth; - } else if (halfRightExceed) { - leftPosition = windowWidth - elementDimensions.w * 1.01; - arrowLeft = elementDimensions.w - (windowWidth - rect[left]) + linkDimensions.w / 2 - arrowWidth / 2; - } else { - leftPosition = rect[left] + scroll.x - elementDimensions.w / 2 + linkDimensions.w / 2; - arrowLeft = elementDimensions.w / 2 - (isPopover ? arrowWidth : arrowWidth / 2); - } - } // apply style to tooltip/popover and its arrow - - - element[style][top] = topPosition + 'px'; - element[style][left] = leftPosition + 'px'; - arrowTop && (arrow[style][top] = arrowTop + 'px'); - arrowLeft && (arrow[style][left] = arrowLeft + 'px'); - }; - - BSN.version = '2.0.27'; - /* Native Javascript for Bootstrap 4 | Alert - -------------------------------------------*/ - // ALERT DEFINITION - // ================ - - var Alert = function (element) { - // initialization element - element = queryElement(element); // bind, target alert, duration and stuff - - var self = this, - component = 'alert', - alert = getClosest(element, '.' + component), - triggerHandler = function () { - hasClass(alert, 'fade') ? emulateTransitionEnd(alert, transitionEndHandler) : transitionEndHandler(); - }, - // handlers - clickHandler = function (e) { - alert = getClosest(e[target], '.' + component); - element = queryElement('[' + dataDismiss + '="' + component + '"]', alert); - element && alert && (element === e[target] || element[contains](e[target])) && self.close(); - }, - transitionEndHandler = function () { - bootstrapCustomEvent.call(alert, closedEvent, component); - off(element, clickEvent, clickHandler); // detach it's listener - - alert[parentNode].removeChild(alert); - }; // public method - - - this.close = function () { - if (alert && element && hasClass(alert, showClass)) { - bootstrapCustomEvent.call(alert, closeEvent, component); - removeClass(alert, showClass); - alert && triggerHandler(); - } - }; // init - - - if (!(stringAlert in element)) { - // prevent adding event handlers twice - on(element, clickEvent, clickHandler); - } - - element[stringAlert] = self; - }; // ALERT DATA API - // ============== - - - supports[push]([stringAlert, Alert, '[' + dataDismiss + '="alert"]']); - /* Native Javascript for Bootstrap 4 | Button - ---------------------------------------------*/ - // BUTTON DEFINITION - // =================== - - var Button = function (element) { - // initialization element - element = queryElement(element); // constant - - var toggled = false, - // toggled makes sure to prevent triggering twice the change.bs.button events - // strings - component = 'button', - checked = 'checked', - LABEL = 'LABEL', - INPUT = 'INPUT', - // private methods - keyHandler = function (e) { - var key = e.which || e.keyCode; - key === 32 && e[target] === DOC.activeElement && toggle(e); - }, - preventScroll = function (e) { - var key = e.which || e.keyCode; - key === 32 && e[preventDefault](); - }, - toggle = function (e) { - var label = e[target].tagName === LABEL ? e[target] : e[target][parentNode].tagName === LABEL ? e[target][parentNode] : null; // the .btn label - - if (!label) return; //react if a label or its immediate child is clicked - - var labels = getElementsByClassName(label[parentNode], 'btn'), - // all the button group buttons - input = label[getElementsByTagName](INPUT)[0]; - if (!input) return; // return if no input found - // manage the dom manipulation - - if (input.type === 'checkbox') { - //checkboxes - if (!input[checked]) { - addClass(label, active); - input[getAttribute](checked); - input[setAttribute](checked, checked); - input[checked] = true; - } else { - removeClass(label, active); - input[getAttribute](checked); - input.removeAttribute(checked); - input[checked] = false; - } - - if (!toggled) { - // prevent triggering the event twice - toggled = true; - bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input - - bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group - } - } - - if (input.type === 'radio' && !toggled) { - // radio buttons - // don't trigger if already active (the OR condition is a hack to check if the buttons were selected with key press and NOT mouse click) - if (!input[checked] || e.screenX === 0 && e.screenY == 0) { - addClass(label, active); - addClass(label, focusEvent); - input[setAttribute](checked, checked); - input[checked] = true; - bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input - - bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group - - toggled = true; - - for (var i = 0, ll = labels[length]; i < ll; i++) { - var otherLabel = labels[i], - otherInput = otherLabel[getElementsByTagName](INPUT)[0]; - - if (otherLabel !== label && hasClass(otherLabel, active)) { - removeClass(otherLabel, active); - otherInput.removeAttribute(checked); - otherInput[checked] = false; - bootstrapCustomEvent.call(otherInput, changeEvent, component); // trigger the change - } - } - } - } - - setTimeout(function () { - toggled = false; - }, 50); - }, - focusHandler = function (e) { - addClass(e[target][parentNode], focusEvent); - }, - blurHandler = function (e) { - removeClass(e[target][parentNode], focusEvent); - }; // init - - - if (!(stringButton in element)) { - // prevent adding event handlers twice - on(element, clickEvent, toggle); - on(element, keyupEvent, keyHandler), on(element, keydownEvent, preventScroll); - var allBtns = getElementsByClassName(element, 'btn'); - - for (var i = 0; i < allBtns.length; i++) { - var input = allBtns[i][getElementsByTagName](INPUT)[0]; - on(input, focusEvent, focusHandler), on(input, 'blur', blurHandler); - } - } // activate items on load - - - var labelsToACtivate = getElementsByClassName(element, 'btn'), - lbll = labelsToACtivate[length]; - - for (var i = 0; i < lbll; i++) { - !hasClass(labelsToACtivate[i], active) && queryElement('input:checked', labelsToACtivate[i]) && addClass(labelsToACtivate[i], active); - } - - element[stringButton] = this; - }; // BUTTON DATA API - // ================= - - - supports[push]([stringButton, Button, '[' + dataToggle + '="buttons"]']); - /* Native Javascript for Bootstrap 4 | Collapse - -----------------------------------------------*/ - // COLLAPSE DEFINITION - // =================== - - var Collapse = function (element, options) { - // initialization element - element = queryElement(element); // set options - - options = options || {}; // event targets and constants - - var accordion = null, - collapse = null, - self = this, - accordionData = element[getAttribute]('data-parent'), - activeCollapse, - activeElement, - // component strings - component = 'collapse', - collapsed = 'collapsed', - isAnimating = 'isAnimating', - // private methods - openAction = function (collapseElement, toggle) { - bootstrapCustomEvent.call(collapseElement, showEvent, component); - collapseElement[isAnimating] = true; - addClass(collapseElement, collapsing); - removeClass(collapseElement, component); - collapseElement[style][height] = collapseElement[scrollHeight] + 'px'; - emulateTransitionEnd(collapseElement, function () { - collapseElement[isAnimating] = false; - collapseElement[setAttribute](ariaExpanded, 'true'); - toggle[setAttribute](ariaExpanded, 'true'); - removeClass(collapseElement, collapsing); - addClass(collapseElement, component); - addClass(collapseElement, showClass); - collapseElement[style][height] = ''; - bootstrapCustomEvent.call(collapseElement, shownEvent, component); - }); - }, - closeAction = function (collapseElement, toggle) { - bootstrapCustomEvent.call(collapseElement, hideEvent, component); - collapseElement[isAnimating] = true; - collapseElement[style][height] = collapseElement[scrollHeight] + 'px'; // set height first - - removeClass(collapseElement, component); - removeClass(collapseElement, showClass); - addClass(collapseElement, collapsing); - collapseElement[offsetWidth]; // force reflow to enable transition - - collapseElement[style][height] = '0px'; - emulateTransitionEnd(collapseElement, function () { - collapseElement[isAnimating] = false; - collapseElement[setAttribute](ariaExpanded, 'false'); - toggle[setAttribute](ariaExpanded, 'false'); - removeClass(collapseElement, collapsing); - addClass(collapseElement, component); - collapseElement[style][height] = ''; - bootstrapCustomEvent.call(collapseElement, hiddenEvent, component); - }); - }, - getTarget = function () { - var href = element.href && element[getAttribute]('href'), - parent = element[getAttribute](dataTarget), - id = href || parent && parent.charAt(0) === '#' && parent; - return id && queryElement(id); - }; // public methods - - - this.toggle = function (e) { - e[preventDefault](); - - if (!hasClass(collapse, showClass)) { - self.show(); - } else { - self.hide(); - } - }; - - this.hide = function () { - if (collapse[isAnimating]) return; - closeAction(collapse, element); - addClass(element, collapsed); - }; - - this.show = function () { - if (accordion) { - activeCollapse = queryElement('.' + component + '.' + showClass, accordion); - activeElement = activeCollapse && (queryElement('[' + dataTarget + '="#' + activeCollapse.id + '"]', accordion) || queryElement('[href="#' + activeCollapse.id + '"]', accordion)); - } - - if (!collapse[isAnimating] || activeCollapse && !activeCollapse[isAnimating]) { - if (activeElement && activeCollapse !== collapse) { - closeAction(activeCollapse, activeElement); - addClass(activeElement, collapsed); - } - - openAction(collapse, element); - removeClass(element, collapsed); - } - }; // init - - - if (!(stringCollapse in element)) { - // prevent adding event handlers twice - on(element, clickEvent, self.toggle); - } - - collapse = getTarget(); - collapse[isAnimating] = false; // when true it will prevent click handlers - - accordion = queryElement(options.parent) || accordionData && getClosest(element, accordionData); - element[stringCollapse] = self; - }; // COLLAPSE DATA API - // ================= - - - supports[push]([stringCollapse, Collapse, '[' + dataToggle + '="collapse"]']); - /* Native Javascript for Bootstrap 4 | Dropdown - ----------------------------------------------*/ - // DROPDOWN DEFINITION - // =================== - - var Dropdown = function (element, option) { - // initialization element - element = queryElement(element); // set option - - this.persist = option === true || element[getAttribute]('data-persist') === 'true' || false; // constants, event targets, strings - - var self = this, - children = 'children', - parent = element[parentNode], - component = 'dropdown', - open = 'open', - relatedTarget = null, - menu = queryElement('.dropdown-menu', parent), - menuItems = function () { - var set = menu[children], - newSet = []; - - for (var i = 0; i < set[length]; i++) { - set[i][children][length] && set[i][children][0].tagName === 'A' && newSet[push](set[i][children][0]); - set[i].tagName === 'A' && newSet[push](set[i]); - } - - return newSet; - }(), - // preventDefault on empty anchor links - preventEmptyAnchor = function (anchor) { - (anchor.href && anchor.href.slice(-1) === '#' || anchor[parentNode] && anchor[parentNode].href && anchor[parentNode].href.slice(-1) === '#') && this[preventDefault](); - }, - // toggle dismissible events - toggleDismiss = function () { - var type = element[open] ? on : off; - type(DOC, clickEvent, dismissHandler); - type(DOC, keydownEvent, preventScroll); - type(DOC, keyupEvent, keyHandler); - type(DOC, focusEvent, dismissHandler, true); - }, - // handlers - dismissHandler = function (e) { - var eventTarget = e[target], - hasData = eventTarget && (eventTarget[getAttribute](dataToggle) || eventTarget[parentNode] && getAttribute in eventTarget[parentNode] && eventTarget[parentNode][getAttribute](dataToggle)); - - if (e.type === focusEvent && (eventTarget === element || eventTarget === menu || menu[contains](eventTarget))) { - return; - } - - if ((eventTarget === menu || menu[contains](eventTarget)) && (self.persist || hasData)) { - return; - } else { - relatedTarget = eventTarget === element || element[contains](eventTarget) ? element : null; - hide(); - } - - preventEmptyAnchor.call(e, eventTarget); - }, - clickHandler = function (e) { - relatedTarget = element; - show(); - preventEmptyAnchor.call(e, e[target]); - }, - preventScroll = function (e) { - var key = e.which || e.keyCode; - - if (key === 38 || key === 40) { - e[preventDefault](); - } - }, - keyHandler = function (e) { - var key = e.which || e.keyCode, - activeItem = DOC.activeElement, - idx = menuItems[indexOf](activeItem), - isSameElement = activeItem === element, - isInsideMenu = menu[contains](activeItem), - isMenuItem = activeItem[parentNode] === menu || activeItem[parentNode][parentNode] === menu; - - if (isMenuItem) { - // navigate up | down - idx = isSameElement ? 0 : key === 38 ? idx > 1 ? idx - 1 : 0 : key === 40 ? idx < menuItems[length] - 1 ? idx + 1 : idx : idx; - menuItems[idx] && setFocus(menuItems[idx]); - } - - if ((menuItems[length] && isMenuItem // menu has items - || !menuItems[length] && (isInsideMenu || isSameElement) // menu might be a form - || !isInsideMenu) && // or the focused element is not in the menu at all - element[open] && key === 27 // menu must be open - ) { - self.toggle(); - relatedTarget = null; - } - }, - // private methods - show = function () { - bootstrapCustomEvent.call(parent, showEvent, component, relatedTarget); - addClass(menu, showClass); - addClass(parent, showClass); - element[setAttribute](ariaExpanded, true); - bootstrapCustomEvent.call(parent, shownEvent, component, relatedTarget); - element[open] = true; - off(element, clickEvent, clickHandler); - setTimeout(function () { - setFocus(menu[getElementsByTagName]('INPUT')[0] || element); // focus the first input item | element - - toggleDismiss(); - }, 1); - }, - hide = function () { - bootstrapCustomEvent.call(parent, hideEvent, component, relatedTarget); - removeClass(menu, showClass); - removeClass(parent, showClass); - element[setAttribute](ariaExpanded, false); - bootstrapCustomEvent.call(parent, hiddenEvent, component, relatedTarget); - element[open] = false; - toggleDismiss(); - setFocus(element); - setTimeout(function () { - on(element, clickEvent, clickHandler); - }, 1); - }; // set initial state to closed - - - element[open] = false; // public methods - - this.toggle = function () { - if (hasClass(parent, showClass) && element[open]) { - hide(); - } else { - show(); - } - }; // init - - - if (!(stringDropdown in element)) { - // prevent adding event handlers twice - !tabindex in menu && menu[setAttribute](tabindex, '0'); // Fix onblur on Chrome | Safari - - on(element, clickEvent, clickHandler); - } - - element[stringDropdown] = self; - }; // DROPDOWN DATA API - // ================= - - - supports[push]([stringDropdown, Dropdown, '[' + dataToggle + '="dropdown"]']); - /* Native Javascript for Bootstrap 4 | Modal - -------------------------------------------*/ - // MODAL DEFINITION - // =============== - - var Modal = function (element, options) { - // element can be the modal/triggering button - // the modal (both JavaScript / DATA API init) / triggering button element (DATA API) - element = queryElement(element); // strings - - var component = 'modal', - staticString = 'static', - modalTrigger = 'modalTrigger', - paddingRight = 'paddingRight', - modalBackdropString = 'modal-backdrop', - isAnimating = 'isAnimating', - // determine modal, triggering element - btnCheck = element[getAttribute](dataTarget) || element[getAttribute]('href'), - checkModal = queryElement(btnCheck), - modal = hasClass(element, component) ? element : checkModal; - - if (hasClass(element, component)) { - element = null; - } // modal is now independent of it's triggering element - - - if (!modal) { - return; - } // invalidate - // set options - - - options = options || {}; - this[keyboard] = options[keyboard] === false || modal[getAttribute](dataKeyboard) === 'false' ? false : true; - this[backdrop] = options[backdrop] === staticString || modal[getAttribute](databackdrop) === staticString ? staticString : true; - this[backdrop] = options[backdrop] === false || modal[getAttribute](databackdrop) === 'false' ? false : this[backdrop]; - this[animation] = hasClass(modal, 'fade') ? true : false; - this[content] = options[content]; // JavaScript only - // set an initial state of the modal - - modal[isAnimating] = false; // bind, constants, event targets and other vars - - var self = this, - relatedTarget = null, - bodyIsOverflowing, - scrollBarWidth, - overlay, - overlayDelay, - modalTimer, - // also find fixed-top / fixed-bottom items - fixedItems = getElementsByClassName(HTML, fixedTop).concat(getElementsByClassName(HTML, fixedBottom)), - // private methods - getWindowWidth = function () { - var htmlRect = HTML[getBoundingClientRect](); - return globalObject[innerWidth] || htmlRect[right] - Math.abs(htmlRect[left]); - }, - setScrollbar = function () { - var bodyStyle = globalObject[getComputedStyle](DOC[body]), - bodyPad = parseInt(bodyStyle[paddingRight], 10), - itemPad; - - if (bodyIsOverflowing) { - DOC[body][style][paddingRight] = bodyPad + scrollBarWidth + 'px'; - modal[style][paddingRight] = scrollBarWidth + 'px'; - - if (fixedItems[length]) { - for (var i = 0; i < fixedItems[length]; i++) { - itemPad = globalObject[getComputedStyle](fixedItems[i])[paddingRight]; - fixedItems[i][style][paddingRight] = parseInt(itemPad) + scrollBarWidth + 'px'; - } - } - } - }, - resetScrollbar = function () { - DOC[body][style][paddingRight] = ''; - modal[style][paddingRight] = ''; - - if (fixedItems[length]) { - for (var i = 0; i < fixedItems[length]; i++) { - fixedItems[i][style][paddingRight] = ''; - } - } - }, - measureScrollbar = function () { - // thx walsh - var scrollDiv = DOC[createElement]('div'), - widthValue; - scrollDiv.className = component + '-scrollbar-measure'; // this is here to stay - - DOC[body][appendChild](scrollDiv); - widthValue = scrollDiv[offsetWidth] - scrollDiv[clientWidth]; - DOC[body].removeChild(scrollDiv); - return widthValue; - }, - checkScrollbar = function () { - bodyIsOverflowing = DOC[body][clientWidth] < getWindowWidth(); - scrollBarWidth = measureScrollbar(); - }, - createOverlay = function () { - var newOverlay = DOC[createElement]('div'); - overlay = queryElement('.' + modalBackdropString); - - if (overlay === null) { - newOverlay[setAttribute]('class', modalBackdropString + (self[animation] ? ' fade' : '')); - overlay = newOverlay; - DOC[body][appendChild](overlay); - } - - modalOverlay = 1; - }, - removeOverlay = function () { - overlay = queryElement('.' + modalBackdropString); - - if (overlay && overlay !== null && typeof overlay === 'object') { - modalOverlay = 0; - DOC[body].removeChild(overlay); - overlay = null; - } - }, - // triggers - triggerShow = function () { - setFocus(modal); - modal[isAnimating] = false; - bootstrapCustomEvent.call(modal, shownEvent, component, relatedTarget); - on(globalObject, resizeEvent, self.update, passiveHandler); - on(modal, clickEvent, dismissHandler); - on(DOC, keydownEvent, keyHandler); - }, - triggerHide = function () { - modal[style].display = ''; - element && setFocus(element); - bootstrapCustomEvent.call(modal, hiddenEvent, component); - - (function () { - if (!getElementsByClassName(DOC, component + ' ' + showClass)[0]) { - resetScrollbar(); - removeClass(DOC[body], component + '-open'); - overlay && hasClass(overlay, 'fade') ? (removeClass(overlay, showClass), emulateTransitionEnd(overlay, removeOverlay)) : removeOverlay(); - off(globalObject, resizeEvent, self.update, passiveHandler); - off(modal, clickEvent, dismissHandler); - off(DOC, keydownEvent, keyHandler); - } - })(); - - modal[isAnimating] = false; - }, - // handlers - clickHandler = function (e) { - if (modal[isAnimating]) return; - var clickTarget = e[target]; - clickTarget = clickTarget[hasAttribute](dataTarget) || clickTarget[hasAttribute]('href') ? clickTarget : clickTarget[parentNode]; - - if (clickTarget === element && !hasClass(modal, showClass)) { - modal[modalTrigger] = element; - relatedTarget = element; - self.show(); - e[preventDefault](); - } - }, - keyHandler = function (e) { - if (modal[isAnimating]) return; - - if (self[keyboard] && e.which == 27 && hasClass(modal, showClass)) { - self.hide(); - } - }, - dismissHandler = function (e) { - if (modal[isAnimating]) return; - var clickTarget = e[target]; - - if (hasClass(modal, showClass) && (clickTarget[parentNode][getAttribute](dataDismiss) === component || clickTarget[getAttribute](dataDismiss) === component || clickTarget === modal && self[backdrop] !== staticString)) { - self.hide(); - relatedTarget = null; - e[preventDefault](); - } - }; // public methods - - - this.toggle = function () { - if (hasClass(modal, showClass)) { - this.hide(); - } else { - this.show(); - } - }; - - this.show = function () { - if (hasClass(modal, showClass) || modal[isAnimating]) { - return; - } - - clearTimeout(modalTimer); - modalTimer = setTimeout(function () { - modal[isAnimating] = true; - bootstrapCustomEvent.call(modal, showEvent, component, relatedTarget); // we elegantly hide any opened modal - - var currentOpen = getElementsByClassName(DOC, component + ' ' + showClass)[0]; - - if (currentOpen && currentOpen !== modal) { - modalTrigger in currentOpen && currentOpen[modalTrigger][stringModal].hide(); - stringModal in currentOpen && currentOpen[stringModal].hide(); - } - - if (self[backdrop]) { - !modalOverlay && !overlay && createOverlay(); - } - - if (overlay && !hasClass(overlay, showClass)) { - overlay[offsetWidth]; // force reflow to enable trasition - - overlayDelay = getTransitionDurationFromElement(overlay); - addClass(overlay, showClass); - } - - setTimeout(function () { - modal[style].display = 'block'; - checkScrollbar(); - setScrollbar(); - addClass(DOC[body], component + '-open'); - addClass(modal, showClass); - modal[setAttribute](ariaHidden, false); - hasClass(modal, 'fade') ? emulateTransitionEnd(modal, triggerShow) : triggerShow(); - }, supportTransitions && overlay && overlayDelay ? overlayDelay : 1); - }, 1); - }; - - this.hide = function () { - if (modal[isAnimating] || !hasClass(modal, showClass)) { - return; - } - - clearTimeout(modalTimer); - modalTimer = setTimeout(function () { - modal[isAnimating] = true; - bootstrapCustomEvent.call(modal, hideEvent, component); - overlay = queryElement('.' + modalBackdropString); - overlayDelay = overlay && getTransitionDurationFromElement(overlay); - removeClass(modal, showClass); - modal[setAttribute](ariaHidden, true); - setTimeout(function () { - hasClass(modal, 'fade') ? emulateTransitionEnd(modal, triggerHide) : triggerHide(); - }, supportTransitions && overlay && overlayDelay ? overlayDelay : 2); - }, 2); - }; - - this.setContent = function (content) { - queryElement('.' + component + '-content', modal)[innerHTML] = content; - }; - - this.update = function () { - if (hasClass(modal, showClass)) { - checkScrollbar(); - setScrollbar(); - } - }; // init - // prevent adding event handlers over and over - // modal is independent of a triggering element - - - if (!!element && !(stringModal in element)) { - on(element, clickEvent, clickHandler); - } - - if (!!self[content]) { - self.setContent(self[content]); - } - - if (element) { - element[stringModal] = self; - modal[modalTrigger] = element; - } else { - modal[stringModal] = self; - } - }; // DATA API - - - supports[push]([stringModal, Modal, '[' + dataToggle + '="modal"]']); - /* Native Javascript for Bootstrap 4 | Popover - ----------------------------------------------*/ - // POPOVER DEFINITION - // ================== - - var Popover = function (element, options) { - // initialization element - element = queryElement(element); // set options - - options = options || {}; // DATA API - - var triggerData = element[getAttribute](dataTrigger), - // click / hover / focus - animationData = element[getAttribute](dataAnimation), - // true / false - placementData = element[getAttribute](dataPlacement), - dismissibleData = element[getAttribute](dataDismissible), - delayData = element[getAttribute](dataDelay), - containerData = element[getAttribute](dataContainer), - // internal strings - component = 'popover', - template = 'template', - trigger = 'trigger', - classString = 'class', - div = 'div', - fade = 'fade', - dataContent = 'data-content', - dismissible = 'dismissible', - closeBtn = '', - // check container - containerElement = queryElement(options[container]), - containerDataElement = queryElement(containerData), - // maybe the element is inside a modal - modal = getClosest(element, '.modal'), - // maybe the element is inside a fixed navbar - navbarFixedTop = getClosest(element, '.' + fixedTop), - navbarFixedBottom = getClosest(element, '.' + fixedBottom); // set instance options - - this[template] = options[template] ? options[template] : null; // JavaScript only - - this[trigger] = options[trigger] ? options[trigger] : triggerData || hoverEvent; - this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade; - this[placement] = options[placement] ? options[placement] : placementData || top; - this[delay] = parseInt(options[delay] || delayData) || 200; - this[dismissible] = options[dismissible] || dismissibleData === 'true' ? true : false; - this[container] = containerElement ? containerElement : containerDataElement ? containerDataElement : navbarFixedTop ? navbarFixedTop : navbarFixedBottom ? navbarFixedBottom : modal ? modal : DOC[body]; // bind, content - - var self = this, - titleString = options.title || element[getAttribute](dataTitle) || null, - contentString = options.content || element[getAttribute](dataContent) || null; - if (!contentString && !this[template]) return; // invalidate - // constants, vars - - var popover = null, - timer = 0, - placementSetting = this[placement], - // handlers - dismissibleHandler = function (e) { - if (popover !== null && e[target] === queryElement('.close', popover)) { - self.hide(); - } - }, - // private methods - removePopover = function () { - self[container].removeChild(popover); - timer = null; - popover = null; - }, - createPopover = function () { - titleString = options.title || element[getAttribute](dataTitle); - contentString = options.content || element[getAttribute](dataContent); // fixing https://github.com/thednp/bootstrap.native/issues/233 - - contentString = !!contentString ? contentString.trim() : null; - popover = DOC[createElement](div); // popover arrow - - var popoverArrow = DOC[createElement](div); - popoverArrow[setAttribute](classString, 'arrow'); - popover[appendChild](popoverArrow); - - if (contentString !== null && self[template] === null) { - //create the popover from data attributes - popover[setAttribute]('role', 'tooltip'); - - if (titleString !== null) { - var popoverTitle = DOC[createElement]('h3'); - popoverTitle[setAttribute](classString, component + '-header'); - popoverTitle[innerHTML] = self[dismissible] ? titleString + closeBtn : titleString; - popover[appendChild](popoverTitle); - } //set popover content - - - var popoverContent = DOC[createElement](div); - popoverContent[setAttribute](classString, component + '-body'); - popoverContent[innerHTML] = self[dismissible] && titleString === null ? contentString + closeBtn : contentString; - popover[appendChild](popoverContent); - } else { - // or create the popover from template - var popoverTemplate = DOC[createElement](div); - self[template] = self[template].trim(); - popoverTemplate[innerHTML] = self[template]; - popover[innerHTML] = popoverTemplate.firstChild[innerHTML]; - } //append to the container - - - self[container][appendChild](popover); - popover[style].display = 'block'; - popover[setAttribute](classString, component + ' bs-' + component + '-' + placementSetting + ' ' + self[animation]); - }, - showPopover = function () { - !hasClass(popover, showClass) && addClass(popover, showClass); - }, - updatePopover = function () { - styleTip(element, popover, placementSetting, self[container]); - }, - // event toggle - dismissHandlerToggle = function (type) { - if (clickEvent == self[trigger] || 'focus' == self[trigger]) { - !self[dismissible] && type(element, 'blur', self.hide); - } - - self[dismissible] && type(DOC, clickEvent, dismissibleHandler); - type(globalObject, resizeEvent, self.hide, passiveHandler); - }, - // triggers - showTrigger = function () { - dismissHandlerToggle(on); - bootstrapCustomEvent.call(element, shownEvent, component); - }, - hideTrigger = function () { - dismissHandlerToggle(off); - removePopover(); - bootstrapCustomEvent.call(element, hiddenEvent, component); - }; // public methods / handlers - - - this.toggle = function () { - if (popover === null) { - self.show(); - } else { - self.hide(); - } - }; - - this.show = function () { - clearTimeout(timer); - timer = setTimeout(function () { - if (popover === null) { - placementSetting = self[placement]; // we reset placement in all cases - - createPopover(); - updatePopover(); - showPopover(); - bootstrapCustomEvent.call(element, showEvent, component); - !!self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger(); - } - }, 20); - }; - - this.hide = function () { - clearTimeout(timer); - timer = setTimeout(function () { - if (popover && popover !== null && hasClass(popover, showClass)) { - bootstrapCustomEvent.call(element, hideEvent, component); - removeClass(popover, showClass); - !!self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger(); - } - }, self[delay]); - }; // init - - - if (!(stringPopover in element)) { - // prevent adding event handlers twice - if (self[trigger] === hoverEvent) { - on(element, mouseHover[0], self.show); - - if (!self[dismissible]) { - on(element, mouseHover[1], self.hide); - } - } else if (clickEvent == self[trigger] || 'focus' == self[trigger]) { - on(element, self[trigger], self.toggle); - } - } - - element[stringPopover] = self; - }; // POPOVER DATA API - // ================ - - - supports[push]([stringPopover, Popover, '[' + dataToggle + '="popover"]']); - /* Native Javascript for Bootstrap 4 | Tab - -----------------------------------------*/ - // TAB DEFINITION - // ============== - - var Tab = function (element, options) { - // initialization element - element = queryElement(element); // DATA API - - var heightData = element[getAttribute](dataHeight), - // strings - component = 'tab', - height = 'height', - float = 'float', - isAnimating = 'isAnimating'; // set options - - options = options || {}; - this[height] = supportTransitions ? options[height] || heightData === 'true' : false; // bind, event targets - - var self = this, - next, - tabs = getClosest(element, '.nav'), - tabsContentContainer = false, - dropdown = tabs && queryElement('.dropdown-toggle', tabs), - activeTab, - activeContent, - nextContent, - containerHeight, - equalContents, - nextHeight, - // trigger - triggerEnd = function () { - tabsContentContainer[style][height] = ''; - removeClass(tabsContentContainer, collapsing); - tabs[isAnimating] = false; - }, - triggerShow = function () { - if (tabsContentContainer) { - // height animation - if (equalContents) { - triggerEnd(); - } else { - setTimeout(function () { - // enables height animation - tabsContentContainer[style][height] = nextHeight + 'px'; // height animation - - tabsContentContainer[offsetWidth]; - emulateTransitionEnd(tabsContentContainer, triggerEnd); - }, 50); - } - } else { - tabs[isAnimating] = false; - } - - bootstrapCustomEvent.call(next, shownEvent, component, activeTab); - }, - triggerHide = function () { - if (tabsContentContainer) { - activeContent[style][float] = left; - nextContent[style][float] = left; - containerHeight = activeContent[scrollHeight]; - } - - addClass(nextContent, active); - bootstrapCustomEvent.call(next, showEvent, component, activeTab); - removeClass(activeContent, active); - bootstrapCustomEvent.call(activeTab, hiddenEvent, component, next); - - if (tabsContentContainer) { - nextHeight = nextContent[scrollHeight]; - equalContents = nextHeight === containerHeight; - addClass(tabsContentContainer, collapsing); - tabsContentContainer[style][height] = containerHeight + 'px'; // height animation - - tabsContentContainer[offsetHeight]; - activeContent[style][float] = ''; - nextContent[style][float] = ''; - } - - if (hasClass(nextContent, 'fade')) { - setTimeout(function () { - addClass(nextContent, showClass); - emulateTransitionEnd(nextContent, triggerShow); - }, 20); - } else { - triggerShow(); - } - }; - - if (!tabs) return; // invalidate - // set default animation state - - tabs[isAnimating] = false; // private methods - - var getActiveTab = function () { - var activeTabs = getElementsByClassName(tabs, active), - activeTab; - - if (activeTabs[length] === 1 && !hasClass(activeTabs[0][parentNode], 'dropdown')) { - activeTab = activeTabs[0]; - } else if (activeTabs[length] > 1) { - activeTab = activeTabs[activeTabs[length] - 1]; - } - - return activeTab; - }, - getActiveContent = function () { - return queryElement(getActiveTab()[getAttribute]('href')); - }, - // handler - clickHandler = function (e) { - e[preventDefault](); - next = e[currentTarget]; - !tabs[isAnimating] && !hasClass(next, active) && self.show(); - }; // public method - - - this.show = function () { - // the tab we clicked is now the next tab - next = next || element; - nextContent = queryElement(next[getAttribute]('href')); //this is the actual object, the next tab content to activate - - activeTab = getActiveTab(); - activeContent = getActiveContent(); - tabs[isAnimating] = true; - removeClass(activeTab, active); - activeTab[setAttribute](ariaSelected, 'false'); - addClass(next, active); - next[setAttribute](ariaSelected, 'true'); - - if (dropdown) { - if (!hasClass(element[parentNode], 'dropdown-menu')) { - if (hasClass(dropdown, active)) removeClass(dropdown, active); - } else { - if (!hasClass(dropdown, active)) addClass(dropdown, active); - } - } - - bootstrapCustomEvent.call(activeTab, hideEvent, component, next); - - if (hasClass(activeContent, 'fade')) { - removeClass(activeContent, showClass); - emulateTransitionEnd(activeContent, triggerHide); - } else { - triggerHide(); - } - }; // init - - - if (!(stringTab in element)) { - // prevent adding event handlers twice - on(element, clickEvent, clickHandler); - } - - if (self[height]) { - tabsContentContainer = getActiveContent()[parentNode]; - } - - element[stringTab] = self; - }; // TAB DATA API - // ============ - - - supports[push]([stringTab, Tab, '[' + dataToggle + '="tab"]']); - /* Native Javascript for Bootstrap | Initialize Data API - --------------------------------------------------------*/ - - var initializeDataAPI = function (constructor, collection) { - for (var i = 0, l = collection[length]; i < l; i++) { - new constructor(collection[i]); - } - }, - initCallback = BSN.initCallback = function (lookUp) { - lookUp = lookUp || DOC; - - for (var i = 0, l = supports[length]; i < l; i++) { - initializeDataAPI(supports[i][1], lookUp[querySelectorAll](supports[i][2])); - } - }; // bulk initialize all components - - - DOC[body] ? initCallback() : on(DOC, 'DOMContentLoaded', function () { - initCallback(); - }); - return { - Alert: Alert, - Button: Button, - Collapse: Collapse, - Dropdown: Dropdown, - Modal: Modal, - Popover: Popover, - Tab: Tab - }; -}); - -/***/ }), - -/***/ 5820: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -__webpack_require__(964); - -var $Object = __webpack_require__(7913).Object; - -module.exports = function defineProperty(it, key, desc) { - return $Object.defineProperty(it, key, desc); -}; - -/***/ }), - -/***/ 3248: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -__webpack_require__(4180); - -module.exports = __webpack_require__(7913).Object.keys; - -/***/ }), - -/***/ 9830: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -__webpack_require__(6542); - -__webpack_require__(4815); - -__webpack_require__(8160); - -__webpack_require__(8314); - -__webpack_require__(8245); - -__webpack_require__(5953); - -module.exports = __webpack_require__(7913).Promise; - -/***/ }), - -/***/ 472: -/***/ ((module) => { - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - -/***/ }), - -/***/ 5057: -/***/ ((module) => { - -module.exports = function () { - /* empty */ -}; - -/***/ }), - -/***/ 9945: -/***/ ((module) => { - -module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || forbiddenField !== undefined && forbiddenField in it) { - throw TypeError(name + ': incorrect invocation!'); - } - - return it; -}; - -/***/ }), - -/***/ 7237: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var isObject = __webpack_require__(9900); - -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - -/***/ }), - -/***/ 7097: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// false -> Array#indexOf -// true -> Array#includes -var toIObject = __webpack_require__(6591); - -var toLength = __webpack_require__(1872); - -var toAbsoluteIndex = __webpack_require__(8367); - -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; // eslint-disable-next-line no-self-compare - - if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not - } else for (; length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } - return !IS_INCLUDES && -1; - }; -}; - -/***/ }), - -/***/ 8874: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(4606); - -var TAG = __webpack_require__(9506)('toStringTag'); // ES3 wrong here - - -var ARG = cof(function () { - return arguments; -}()) == 'Arguments'; // fallback for IE11 Script Access Denied error - -var tryGet = function (it, key) { - try { - return it[key]; - } catch (e) { - /* empty */ - } -}; - -module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case - : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case - : ARG ? cof(O) // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; - -/***/ }), - -/***/ 4606: -/***/ ((module) => { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - -/***/ }), - -/***/ 7913: -/***/ ((module) => { - -var core = module.exports = { - version: '2.6.12' -}; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - -/***/ }), - -/***/ 8773: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// optional / simple context binding -var aFunction = __webpack_require__(472); - -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - - switch (length) { - case 1: - return function (a) { - return fn.call(that, a); - }; - - case 2: - return function (a, b) { - return fn.call(that, a, b); - }; - - case 3: - return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - - return function () - /* ...args */ - { - return fn.apply(that, arguments); - }; -}; - -/***/ }), - -/***/ 1011: -/***/ ((module) => { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - -/***/ }), - -/***/ 6580: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(7287)(function () { - return Object.defineProperty({}, 'a', { - get: function () { - return 7; - } - }).a != 7; -}); - -/***/ }), - -/***/ 6590: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var isObject = __webpack_require__(9900); - -var document = __webpack_require__(5677).document; // typeof document.createElement is 'object' in old IE - - -var is = isObject(document) && isObject(document.createElement); - -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - -/***/ }), - -/***/ 4330: -/***/ ((module) => { - -// IE 8- don't enum bug keys -module.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(','); - -/***/ }), - -/***/ 9749: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var global = __webpack_require__(5677); - -var core = __webpack_require__(7913); - -var ctx = __webpack_require__(8773); - -var hide = __webpack_require__(51); - -var has = __webpack_require__(3945); - -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var IS_WRAP = type & $export.W; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE]; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; - var key, own, out; - if (IS_GLOBAL) source = name; - - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if (own && has(exports, key)) continue; // export native or passed - - out = own ? target[key] : source[key]; // prevent global pollution for namespaces - - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? function (C) { - var F = function (a, b, c) { - if (this instanceof C) { - switch (arguments.length) { - case 0: - return new C(); - - case 1: - return new C(a); - - case 2: - return new C(a, b); - } - - return new C(a, b, c); - } - - return C.apply(this, arguments); - }; - - F[PROTOTYPE] = C[PROTOTYPE]; - return F; // make static versions for prototype methods - }(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - - if (IS_PROTO) { - (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - - if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); - } - } -}; // type bitmap - - -$export.F = 1; // forced - -$export.G = 2; // global - -$export.S = 4; // static - -$export.P = 8; // proto - -$export.B = 16; // bind - -$export.W = 32; // wrap - -$export.U = 64; // safe - -$export.R = 128; // real proto method for `library` - -module.exports = $export; - -/***/ }), - -/***/ 7287: -/***/ ((module) => { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - -/***/ }), - -/***/ 5614: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var ctx = __webpack_require__(8773); - -var call = __webpack_require__(352); - -var isArrayIter = __webpack_require__(2887); - -var anObject = __webpack_require__(7237); - -var toLength = __webpack_require__(1872); - -var getIterFn = __webpack_require__(7670); - -var BREAK = {}; -var RETURN = {}; - -var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { - return iterable; - } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator - - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } -}; - -exports.BREAK = BREAK; -exports.RETURN = RETURN; - -/***/ }), - -/***/ 5677: -/***/ ((module) => { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func -: Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - -/***/ }), - -/***/ 3945: -/***/ ((module) => { - -var hasOwnProperty = {}.hasOwnProperty; - -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - -/***/ }), - -/***/ 51: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var dP = __webpack_require__(8301); - -var createDesc = __webpack_require__(7269); - -module.exports = __webpack_require__(6580) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - -/***/ }), - -/***/ 8387: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var document = __webpack_require__(5677).document; - -module.exports = document && document.documentElement; - -/***/ }), - -/***/ 1430: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -module.exports = !__webpack_require__(6580) && !__webpack_require__(7287)(function () { - return Object.defineProperty(__webpack_require__(6590)('div'), 'a', { - get: function () { - return 7; - } - }).a != 7; -}); - -/***/ }), - -/***/ 2229: -/***/ ((module) => { - -// fast apply, http://jsperf.lnkit.com/fast-apply/5 -module.exports = function (fn, args, that) { - var un = that === undefined; - - switch (args.length) { - case 0: - return un ? fn() : fn.call(that); - - case 1: - return un ? fn(args[0]) : fn.call(that, args[0]); - - case 2: - return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); - - case 3: - return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); - - case 4: - return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); - } - - return fn.apply(that, args); -}; - -/***/ }), - -/***/ 9734: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(4606); // eslint-disable-next-line no-prototype-builtins - - -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; - -/***/ }), - -/***/ 2887: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// check on default Array iterator -var Iterators = __webpack_require__(3829); - -var ITERATOR = __webpack_require__(9506)('iterator'); - -var ArrayProto = Array.prototype; - -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); -}; - -/***/ }), - -/***/ 9900: -/***/ ((module) => { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - -/***/ }), - -/***/ 352: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// call something on iterator step with safe closing on error -var anObject = __webpack_require__(7237); - -module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } -}; - -/***/ }), - -/***/ 4419: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var create = __webpack_require__(8933); - -var descriptor = __webpack_require__(7269); - -var setToStringTag = __webpack_require__(8536); - -var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() - -__webpack_require__(51)(IteratorPrototype, __webpack_require__(9506)('iterator'), function () { - return this; -}); - -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { - next: descriptor(1, next) - }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; - -/***/ }), - -/***/ 2361: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var LIBRARY = __webpack_require__(7560); - -var $export = __webpack_require__(9749); - -var redefine = __webpack_require__(836); - -var hide = __webpack_require__(51); - -var Iterators = __webpack_require__(3829); - -var $iterCreate = __webpack_require__(4419); - -var setToStringTag = __webpack_require__(8536); - -var getPrototypeOf = __webpack_require__(2008); - -var ITERATOR = __webpack_require__(9506)('iterator'); - -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` - -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; - -var returnThis = function () { - return this; -}; - -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - - switch (kind) { - case KEYS: - return function keys() { - return new Constructor(this, kind); - }; - - case VALUES: - return function values() { - return new Constructor(this, kind); - }; - } - - return function entries() { - return new Constructor(this, kind); - }; - }; - - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; // Fix native - - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines - - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); - } - } // fix Array#{values, @@iterator}.name in V8 / FF - - - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - - $default = function values() { - return $native.call(this); - }; - } // Define iterator - - - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } // Plug for library - - - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - - return methods; -}; - -/***/ }), - -/***/ 3540: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var ITERATOR = __webpack_require__(9506)('iterator'); - -var SAFE_CLOSING = false; - -try { - var riter = [7][ITERATOR](); - - riter['return'] = function () { - SAFE_CLOSING = true; - }; // eslint-disable-next-line no-throw-literal - - - Array.from(riter, function () { - throw 2; - }); -} catch (e) { - /* empty */ -} - -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - - try { - var arr = [7]; - var iter = arr[ITERATOR](); - - iter.next = function () { - return { - done: safe = true - }; - }; - - arr[ITERATOR] = function () { - return iter; - }; - - exec(arr); - } catch (e) { - /* empty */ - } - - return safe; -}; - -/***/ }), - -/***/ 4362: -/***/ ((module) => { - -module.exports = function (done, value) { - return { - value: value, - done: !!done - }; -}; - -/***/ }), - -/***/ 3829: -/***/ ((module) => { - -module.exports = {}; - -/***/ }), - -/***/ 7560: -/***/ ((module) => { - -module.exports = true; - -/***/ }), - -/***/ 7231: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var global = __webpack_require__(5677); - -var macrotask = __webpack_require__(8226).set; - -var Observer = global.MutationObserver || global.WebKitMutationObserver; -var process = global.process; -var Promise = global.Promise; -var isNode = __webpack_require__(4606)(process) == 'process'; - -module.exports = function () { - var head, last, notify; - - var flush = function () { - var parent, fn; - if (isNode && (parent = process.domain)) parent.exit(); - - while (head) { - fn = head.fn; - head = head.next; - - try { - fn(); - } catch (e) { - if (head) notify();else last = undefined; - throw e; - } - } - - last = undefined; - if (parent) parent.enter(); - }; // Node.js - - - if (isNode) { - notify = function () { - process.nextTick(flush); - }; // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 - - } else if (Observer && !(global.navigator && global.navigator.standalone)) { - var toggle = true; - var node = document.createTextNode(''); - new Observer(flush).observe(node, { - characterData: true - }); // eslint-disable-line no-new - - notify = function () { - node.data = toggle = !toggle; - }; // environments with maybe non-completely correct, but existent Promise - - } else if (Promise && Promise.resolve) { - // Promise.resolve without an argument throws an error in LG WebOS 2 - var promise = Promise.resolve(undefined); - - notify = function () { - promise.then(flush); - }; // for other environments - macrotask based on: - // - setImmediate - // - MessageChannel - // - window.postMessag - // - onreadystatechange - // - setTimeout - - } else { - notify = function () { - // strange IE + webpack dev server bug - use .call(global) - macrotask.call(global, flush); - }; - } - - return function (fn) { - var task = { - fn: fn, - next: undefined - }; - if (last) last.next = task; - - if (!head) { - head = task; - notify(); - } - - last = task; - }; -}; - -/***/ }), - -/***/ 7789: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - // 25.4.1.5 NewPromiseCapability(C) - -var aFunction = __webpack_require__(472); - -function PromiseCapability(C) { - var resolve, reject; - this.promise = new C(function ($$resolve, $$reject) { - if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); - resolve = $$resolve; - reject = $$reject; - }); - this.resolve = aFunction(resolve); - this.reject = aFunction(reject); -} - -module.exports.f = function (C) { - return new PromiseCapability(C); -}; - -/***/ }), - -/***/ 8933: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(7237); - -var dPs = __webpack_require__(8138); - -var enumBugKeys = __webpack_require__(4330); - -var IE_PROTO = __webpack_require__(4261)('IE_PROTO'); - -var Empty = function () { - /* empty */ -}; - -var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype - -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(6590)('iframe'); - - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - - __webpack_require__(8387).appendChild(iframe); - - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - - return createDict(); -}; - -module.exports = Object.create || function create(O, Properties) { - var result; - - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill - - result[IE_PROTO] = O; - } else result = createDict(); - - return Properties === undefined ? result : dPs(result, Properties); -}; - -/***/ }), - -/***/ 8301: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -var anObject = __webpack_require__(7237); - -var IE8_DOM_DEFINE = __webpack_require__(1430); - -var toPrimitive = __webpack_require__(3216); - -var dP = Object.defineProperty; -exports.f = __webpack_require__(6580) ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { - /* empty */ - } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - -/***/ }), - -/***/ 8138: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var dP = __webpack_require__(8301); - -var anObject = __webpack_require__(7237); - -var getKeys = __webpack_require__(1302); - -module.exports = __webpack_require__(6580) ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - - return O; -}; - -/***/ }), - -/***/ 2008: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(3945); - -var toObject = __webpack_require__(6581); - -var IE_PROTO = __webpack_require__(4261)('IE_PROTO'); - -var ObjectProto = Object.prototype; - -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } - - return O instanceof Object ? ObjectProto : null; -}; - -/***/ }), - -/***/ 9483: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var has = __webpack_require__(3945); - -var toIObject = __webpack_require__(6591); - -var arrayIndexOf = __webpack_require__(7097)(false); - -var IE_PROTO = __webpack_require__(4261)('IE_PROTO'); - -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys - - - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - - return result; -}; - -/***/ }), - -/***/ 1302: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(9483); - -var enumBugKeys = __webpack_require__(4330); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - -/***/ }), - -/***/ 8438: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// most Object methods by ES6 should accept primitives -var $export = __webpack_require__(9749); - -var core = __webpack_require__(7913); - -var fails = __webpack_require__(7287); - -module.exports = function (KEY, exec) { - var fn = (core.Object || {})[KEY] || Object[KEY]; - var exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function () { - fn(1); - }), 'Object', exp); -}; - -/***/ }), - -/***/ 5472: -/***/ ((module) => { - -module.exports = function (exec) { - try { - return { - e: false, - v: exec() - }; - } catch (e) { - return { - e: true, - v: e - }; - } -}; - -/***/ }), - -/***/ 3243: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var anObject = __webpack_require__(7237); - -var isObject = __webpack_require__(9900); - -var newPromiseCapability = __webpack_require__(7789); - -module.exports = function (C, x) { - anObject(C); - if (isObject(x) && x.constructor === C) return x; - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; -}; - -/***/ }), - -/***/ 7269: -/***/ ((module) => { - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - -/***/ }), - -/***/ 2853: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var hide = __webpack_require__(51); - -module.exports = function (target, src, safe) { - for (var key in src) { - if (safe && target[key]) target[key] = src[key];else hide(target, key, src[key]); - } - - return target; -}; - -/***/ }), - -/***/ 836: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -module.exports = __webpack_require__(51); - -/***/ }), - -/***/ 5003: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var global = __webpack_require__(5677); - -var core = __webpack_require__(7913); - -var dP = __webpack_require__(8301); - -var DESCRIPTORS = __webpack_require__(6580); - -var SPECIES = __webpack_require__(9506)('species'); - -module.exports = function (KEY) { - var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function () { - return this; - } - }); -}; - -/***/ }), - -/***/ 8536: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var def = __webpack_require__(8301).f; - -var has = __webpack_require__(3945); - -var TAG = __webpack_require__(9506)('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { - configurable: true, - value: tag - }); -}; - -/***/ }), - -/***/ 4261: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var shared = __webpack_require__(7626)('keys'); - -var uid = __webpack_require__(1497); - -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); -}; - -/***/ }), - -/***/ 7626: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var core = __webpack_require__(7913); - -var global = __webpack_require__(5677); - -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: core.version, - mode: __webpack_require__(7560) ? 'pure' : 'global', - copyright: '© 2020 Denis Pushkarev (zloirock.ru)' -}); - -/***/ }), - -/***/ 6647: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// 7.3.20 SpeciesConstructor(O, defaultConstructor) -var anObject = __webpack_require__(7237); - -var aFunction = __webpack_require__(472); - -var SPECIES = __webpack_require__(9506)('species'); - -module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); -}; - -/***/ }), - -/***/ 4757: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var toInteger = __webpack_require__(1517); - -var defined = __webpack_require__(1011); // true -> String#at -// false -> String#codePointAt - - -module.exports = function (TO_STRING) { - return function (that, pos) { - var s = String(defined(that)); - var i = toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; - -/***/ }), - -/***/ 8226: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var ctx = __webpack_require__(8773); - -var invoke = __webpack_require__(2229); - -var html = __webpack_require__(8387); - -var cel = __webpack_require__(6590); - -var global = __webpack_require__(5677); - -var process = global.process; -var setTask = global.setImmediate; -var clearTask = global.clearImmediate; -var MessageChannel = global.MessageChannel; -var Dispatch = global.Dispatch; -var counter = 0; -var queue = {}; -var ONREADYSTATECHANGE = 'onreadystatechange'; -var defer, channel, port; - -var run = function () { - var id = +this; // eslint-disable-next-line no-prototype-builtins - - if (queue.hasOwnProperty(id)) { - var fn = queue[id]; - delete queue[id]; - fn(); - } -}; - -var listener = function (event) { - run.call(event.data); -}; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: - - -if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - - while (arguments.length > i) args.push(arguments[i++]); - - queue[++counter] = function () { - // eslint-disable-next-line no-new-func - invoke(typeof fn == 'function' ? fn : Function(fn), args); - }; - - defer(counter); - return counter; - }; - - clearTask = function clearImmediate(id) { - delete queue[id]; - }; // Node.js 0.8- - - - if (__webpack_require__(4606)(process) == 'process') { - defer = function (id) { - process.nextTick(ctx(run, id, 1)); - }; // Sphere (JS game engine) Dispatch API - - } else if (Dispatch && Dispatch.now) { - defer = function (id) { - Dispatch.now(ctx(run, id, 1)); - }; // Browsers with MessageChannel, includes WebWorkers - - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; - channel.port1.onmessage = listener; - defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function (id) { - global.postMessage(id + '', '*'); - }; - - global.addEventListener('message', listener, false); // IE8- - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function (id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { - html.removeChild(this); - run.call(id); - }; - }; // Rest old browsers - - } else { - defer = function (id) { - setTimeout(ctx(run, id, 1), 0); - }; - } -} - -module.exports = { - set: setTask, - clear: clearTask -}; - -/***/ }), - -/***/ 8367: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var toInteger = __webpack_require__(1517); - -var max = Math.max; -var min = Math.min; - -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; - -/***/ }), - -/***/ 1517: -/***/ ((module) => { - -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; - -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - -/***/ }), - -/***/ 6591: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(9734); - -var defined = __webpack_require__(1011); - -module.exports = function (it) { - return IObject(defined(it)); -}; - -/***/ }), - -/***/ 1872: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// 7.1.15 ToLength -var toInteger = __webpack_require__(1517); - -var min = Math.min; - -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - -/***/ }), - -/***/ 6581: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(1011); - -module.exports = function (it) { - return Object(defined(it)); -}; - -/***/ }), - -/***/ 3216: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(9900); // instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string - - -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - -/***/ }), - -/***/ 1497: -/***/ ((module) => { - -var id = 0; -var px = Math.random(); - -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - -/***/ }), - -/***/ 8877: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var global = __webpack_require__(5677); - -var navigator = global.navigator; -module.exports = navigator && navigator.userAgent || ''; - -/***/ }), - -/***/ 9506: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var store = __webpack_require__(7626)('wks'); - -var uid = __webpack_require__(1497); - -var Symbol = __webpack_require__(5677).Symbol; - -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - -/***/ }), - -/***/ 7670: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -var classof = __webpack_require__(8874); - -var ITERATOR = __webpack_require__(9506)('iterator'); - -var Iterators = __webpack_require__(3829); - -module.exports = __webpack_require__(7913).getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; -}; - -/***/ }), - -/***/ 66: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var addToUnscopables = __webpack_require__(5057); - -var step = __webpack_require__(4362); - -var Iterators = __webpack_require__(3829); - -var toIObject = __webpack_require__(6591); // 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() - - -module.exports = __webpack_require__(2361)(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); // target - - this._i = 0; // next index - - this._k = kind; // kind - // 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - - if (!O || index >= O.length) { - this._t = undefined; - return step(1); - } - - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) - -Iterators.Arguments = Iterators.Array; -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); - -/***/ }), - -/***/ 964: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -var $export = __webpack_require__(9749); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) - - -$export($export.S + $export.F * !__webpack_require__(6580), 'Object', { - defineProperty: __webpack_require__(8301).f -}); - -/***/ }), - -/***/ 4180: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -// 19.1.2.14 Object.keys(O) -var toObject = __webpack_require__(6581); - -var $keys = __webpack_require__(1302); - -__webpack_require__(8438)('keys', function () { - return function keys(it) { - return $keys(toObject(it)); - }; -}); - -/***/ }), - -/***/ 6542: -/***/ (() => { - - - -/***/ }), - -/***/ 8314: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var LIBRARY = __webpack_require__(7560); - -var global = __webpack_require__(5677); - -var ctx = __webpack_require__(8773); - -var classof = __webpack_require__(8874); - -var $export = __webpack_require__(9749); - -var isObject = __webpack_require__(9900); - -var aFunction = __webpack_require__(472); - -var anInstance = __webpack_require__(9945); - -var forOf = __webpack_require__(5614); - -var speciesConstructor = __webpack_require__(6647); - -var task = __webpack_require__(8226).set; - -var microtask = __webpack_require__(7231)(); - -var newPromiseCapabilityModule = __webpack_require__(7789); - -var perform = __webpack_require__(5472); - -var userAgent = __webpack_require__(8877); - -var promiseResolve = __webpack_require__(3243); - -var PROMISE = 'Promise'; -var TypeError = global.TypeError; -var process = global.process; -var versions = process && process.versions; -var v8 = versions && versions.v8 || ''; -var $Promise = global[PROMISE]; -var isNode = classof(process) == 'process'; - -var empty = function () { - /* empty */ -}; - -var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; -var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; -var USE_NATIVE = !!function () { - try { - // correct subclassing with @@species support - var promise = $Promise.resolve(1); - - var FakePromise = (promise.constructor = {})[__webpack_require__(9506)('species')] = function (exec) { - exec(empty, empty); - }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test - - - return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables - // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 - // we can't detect it synchronously, so just check versions - && v8.indexOf('6.6') !== 0 && userAgent.indexOf('Chrome/66') === -1; - } catch (e) { - /* empty */ - } -}(); // helpers - -var isThenable = function (it) { - var then; - return isObject(it) && typeof (then = it.then) == 'function' ? then : false; -}; - -var notify = function (promise, isReject) { - if (promise._n) return; - promise._n = true; - var chain = promise._c; - microtask(function () { - var value = promise._v; - var ok = promise._s == 1; - var i = 0; - - var run = function (reaction) { - var handler = ok ? reaction.ok : reaction.fail; - var resolve = reaction.resolve; - var reject = reaction.reject; - var domain = reaction.domain; - var result, then, exited; - - try { - if (handler) { - if (!ok) { - if (promise._h == 2) onHandleUnhandled(promise); - promise._h = 1; - } - - if (handler === true) result = value;else { - if (domain) domain.enter(); - result = handler(value); // may throw - - if (domain) { - domain.exit(); - exited = true; - } - } - - if (result === reaction.promise) { - reject(TypeError('Promise-chain cycle')); - } else if (then = isThenable(result)) { - then.call(result, resolve, reject); - } else resolve(result); - } else reject(value); - } catch (e) { - if (domain && !exited) domain.exit(); - reject(e); - } - }; - - while (chain.length > i) run(chain[i++]); // variable length - can't use forEach - - - promise._c = []; - promise._n = false; - if (isReject && !promise._h) onUnhandled(promise); - }); -}; - -var onUnhandled = function (promise) { - task.call(global, function () { - var value = promise._v; - var unhandled = isUnhandled(promise); - var result, handler, console; - - if (unhandled) { - result = perform(function () { - if (isNode) { - process.emit('unhandledRejection', value, promise); - } else if (handler = global.onunhandledrejection) { - handler({ - promise: promise, - reason: value - }); - } else if ((console = global.console) && console.error) { - console.error('Unhandled promise rejection', value); - } - }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should - - promise._h = isNode || isUnhandled(promise) ? 2 : 1; - } - - promise._a = undefined; - if (unhandled && result.e) throw result.v; - }); -}; - -var isUnhandled = function (promise) { - return promise._h !== 1 && (promise._a || promise._c).length === 0; -}; - -var onHandleUnhandled = function (promise) { - task.call(global, function () { - var handler; - - if (isNode) { - process.emit('rejectionHandled', promise); - } else if (handler = global.onrejectionhandled) { - handler({ - promise: promise, - reason: promise._v - }); - } - }); -}; - -var $reject = function (value) { - var promise = this; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - - promise._v = value; - promise._s = 2; - if (!promise._a) promise._a = promise._c.slice(); - notify(promise, true); -}; - -var $resolve = function (value) { - var promise = this; - var then; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - - try { - if (promise === value) throw TypeError("Promise can't be resolved itself"); - - if (then = isThenable(value)) { - microtask(function () { - var wrapper = { - _w: promise, - _d: false - }; // wrap - - try { - then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); - } catch (e) { - $reject.call(wrapper, e); - } - }); - } else { - promise._v = value; - promise._s = 1; - notify(promise, false); - } - } catch (e) { - $reject.call({ - _w: promise, - _d: false - }, e); // wrap - } -}; // constructor polyfill - - -if (!USE_NATIVE) { - // 25.4.3.1 Promise(executor) - $Promise = function Promise(executor) { - anInstance(this, $Promise, PROMISE, '_h'); - aFunction(executor); - Internal.call(this); - - try { - executor(ctx($resolve, this, 1), ctx($reject, this, 1)); - } catch (err) { - $reject.call(this, err); - } - }; // eslint-disable-next-line no-unused-vars - - - Internal = function Promise(executor) { - this._c = []; // <- awaiting reactions - - this._a = undefined; // <- checked in isUnhandled reactions - - this._s = 0; // <- state - - this._d = false; // <- done - - this._v = undefined; // <- value - - this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled - - this._n = false; // <- notify - }; - - Internal.prototype = __webpack_require__(2853)($Promise.prototype, { - // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) - then: function then(onFulfilled, onRejected) { - var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); - reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; - reaction.fail = typeof onRejected == 'function' && onRejected; - reaction.domain = isNode ? process.domain : undefined; - - this._c.push(reaction); - - if (this._a) this._a.push(reaction); - if (this._s) notify(this, false); - return reaction.promise; - }, - // 25.4.5.1 Promise.prototype.catch(onRejected) - 'catch': function (onRejected) { - return this.then(undefined, onRejected); - } - }); - - OwnPromiseCapability = function () { - var promise = new Internal(); - this.promise = promise; - this.resolve = ctx($resolve, promise, 1); - this.reject = ctx($reject, promise, 1); - }; - - newPromiseCapabilityModule.f = newPromiseCapability = function (C) { - return C === $Promise || C === Wrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); - }; -} - -$export($export.G + $export.W + $export.F * !USE_NATIVE, { - Promise: $Promise -}); - -__webpack_require__(8536)($Promise, PROMISE); - -__webpack_require__(5003)(PROMISE); - -Wrapper = __webpack_require__(7913)[PROMISE]; // statics - -$export($export.S + $export.F * !USE_NATIVE, PROMISE, { - // 25.4.4.5 Promise.reject(r) - reject: function reject(r) { - var capability = newPromiseCapability(this); - var $$reject = capability.reject; - $$reject(r); - return capability.promise; - } -}); -$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { - // 25.4.4.6 Promise.resolve(x) - resolve: function resolve(x) { - return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); - } -}); -$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(3540)(function (iter) { - $Promise.all(iter)['catch'](empty); -})), PROMISE, { - // 25.4.4.1 Promise.all(iterable) - all: function all(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var resolve = capability.resolve; - var reject = capability.reject; - var result = perform(function () { - var values = []; - var index = 0; - var remaining = 1; - forOf(iterable, false, function (promise) { - var $index = index++; - var alreadyCalled = false; - values.push(undefined); - remaining++; - C.resolve(promise).then(function (value) { - if (alreadyCalled) return; - alreadyCalled = true; - values[$index] = value; - --remaining || resolve(values); - }, reject); - }); - --remaining || resolve(values); - }); - if (result.e) reject(result.v); - return capability.promise; - }, - // 25.4.4.4 Promise.race(iterable) - race: function race(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var reject = capability.reject; - var result = perform(function () { - forOf(iterable, false, function (promise) { - C.resolve(promise).then(capability.resolve, reject); - }); - }); - if (result.e) reject(result.v); - return capability.promise; - } -}); - -/***/ }), - -/***/ 4815: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var $at = __webpack_require__(4757)(true); // 21.1.3.27 String.prototype[@@iterator]() - - -__webpack_require__(2361)(String, 'String', function (iterated) { - this._t = String(iterated); // target - - this._i = 0; // next index - // 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { - value: undefined, - done: true - }; - point = $at(O, index); - this._i += point.length; - return { - value: point, - done: false - }; -}); - -/***/ }), - -/***/ 8245: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -// https://github.com/tc39/proposal-promise-finally - - -var $export = __webpack_require__(9749); - -var core = __webpack_require__(7913); - -var global = __webpack_require__(5677); - -var speciesConstructor = __webpack_require__(6647); - -var promiseResolve = __webpack_require__(3243); - -$export($export.P + $export.R, 'Promise', { - 'finally': function (onFinally) { - var C = speciesConstructor(this, core.Promise || global.Promise); - var isFunction = typeof onFinally == 'function'; - return this.then(isFunction ? function (x) { - return promiseResolve(C, onFinally()).then(function () { - return x; - }); - } : onFinally, isFunction ? function (e) { - return promiseResolve(C, onFinally()).then(function () { - throw e; - }); - } : onFinally); - } -}); - -/***/ }), - -/***/ 5953: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - // https://github.com/tc39/proposal-promise-try - -var $export = __webpack_require__(9749); - -var newPromiseCapability = __webpack_require__(7789); - -var perform = __webpack_require__(5472); - -$export($export.S, 'Promise', { - 'try': function (callbackfn) { - var promiseCapability = newPromiseCapability.f(this); - var result = perform(callbackfn); - (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); - return promiseCapability.promise; - } -}); - -/***/ }), - -/***/ 8160: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -__webpack_require__(66); - -var global = __webpack_require__(5677); - -var hide = __webpack_require__(51); - -var Iterators = __webpack_require__(3829); - -var TO_STRING_TAG = __webpack_require__(9506)('toStringTag'); - -var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + 'TextTrackList,TouchList').split(','); - -for (var i = 0; i < DOMIterables.length; i++) { - var NAME = DOMIterables[i]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = Iterators.Array; -} - -/***/ }), - -/***/ 1246: -/***/ ((module) => { - -"use strict"; - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -// eslint-disable-next-line func-names - -module.exports = function (cssWithMappingToString) { - var list = []; // return the list of modules as css string - - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item); - - if (item[2]) { - return "@media ".concat(item[2], " {").concat(content, "}"); - } - - return content; - }).join(""); - }; // import a list of modules into the list - // eslint-disable-next-line func-names - - - list.i = function (modules, mediaQuery, dedupe) { - if (typeof modules === "string") { - // eslint-disable-next-line no-param-reassign - modules = [[null, modules, ""]]; - } - - var alreadyImportedModules = {}; - - if (dedupe) { - for (var i = 0; i < this.length; i++) { - // eslint-disable-next-line prefer-destructuring - var id = this[i][0]; - - if (id != null) { - alreadyImportedModules[id] = true; - } - } - } - - for (var _i = 0; _i < modules.length; _i++) { - var item = [].concat(modules[_i]); - - if (dedupe && alreadyImportedModules[item[0]]) { - // eslint-disable-next-line no-continue - continue; - } - - if (mediaQuery) { - if (!item[2]) { - item[2] = mediaQuery; - } else { - item[2] = "".concat(mediaQuery, " and ").concat(item[2]); - } - } - - list.push(item); - } - }; - - return list; -}; - -/***/ }), - -/***/ 7620: -/***/ ((module) => { - -"use strict"; - - -function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); -} - -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} - -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); -} - -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; - } - - return arr2; -} - -function _iterableToArrayLimit(arr, i) { - var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); - - if (_i == null) return; - var _arr = []; - var _n = true; - var _d = false; - - var _s, _e; - - try { - for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -module.exports = function cssWithMappingToString(item) { - var _item = _slicedToArray(item, 4), - content = _item[1], - cssMapping = _item[3]; - - if (!cssMapping) { - return content; - } - - if (typeof btoa === "function") { - // eslint-disable-next-line no-undef - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping)))); - var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); - var sourceMapping = "/*# ".concat(data, " */"); - var sourceURLs = cssMapping.sources.map(function (source) { - return "/*# sourceURL=".concat(cssMapping.sourceRoot || "").concat(source, " */"); - }); - return [content].concat(sourceURLs).concat([sourceMapping]).join("\n"); - } - - return [content].join("\n"); -}; - -/***/ }), - -/***/ 8169: -/***/ (function(module) { - -!function (t, e) { - true ? module.exports = e() : 0; -}(this, function () { - "use strict"; - - var t = 1e3, - e = 6e4, - n = 36e5, - r = "millisecond", - i = "second", - s = "minute", - u = "hour", - a = "day", - o = "week", - f = "month", - h = "quarter", - c = "year", - d = "date", - $ = "Invalid Date", - l = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, - y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, - M = { - name: "en", - weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), - months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_") - }, - m = function (t, e, n) { - var r = String(t); - return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t; - }, - g = { - s: m, - z: function (t) { - var e = -t.utcOffset(), - n = Math.abs(e), - r = Math.floor(n / 60), - i = n % 60; - return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0"); - }, - m: function t(e, n) { - if (e.date() < n.date()) return -t(n, e); - var r = 12 * (n.year() - e.year()) + (n.month() - e.month()), - i = e.clone().add(r, f), - s = n - i < 0, - u = e.clone().add(r + (s ? -1 : 1), f); - return +(-(r + (n - i) / (s ? i - u : u - i)) || 0); - }, - a: function (t) { - return t < 0 ? Math.ceil(t) || 0 : Math.floor(t); - }, - p: function (t) { - return { - M: f, - y: c, - w: o, - d: a, - D: d, - h: u, - m: s, - s: i, - ms: r, - Q: h - }[t] || String(t || "").toLowerCase().replace(/s$/, ""); - }, - u: function (t) { - return void 0 === t; - } - }, - D = "en", - v = {}; - - v[D] = M; - - var p = function (t) { - return t instanceof _; - }, - S = function (t, e, n) { - var r; - if (!t) return D; - if ("string" == typeof t) v[t] && (r = t), e && (v[t] = e, r = t);else { - var i = t.name; - v[i] = t, r = i; - } - return !n && r && (D = r), r || !n && D; - }, - w = function (t, e) { - if (p(t)) return t.clone(); - var n = "object" == typeof e ? e : {}; - return n.date = t, n.args = arguments, new _(n); - }, - O = g; - - O.l = S, O.i = p, O.w = function (t, e) { - return w(t, { - locale: e.$L, - utc: e.$u, - x: e.$x, - $offset: e.$offset - }); - }; - - var _ = function () { - function M(t) { - this.$L = S(t.locale, null, !0), this.parse(t); - } - - var m = M.prototype; - return m.parse = function (t) { - this.$d = function (t) { - var e = t.date, - n = t.utc; - if (null === e) return new Date(NaN); - if (O.u(e)) return new Date(); - if (e instanceof Date) return new Date(e); - - if ("string" == typeof e && !/Z$/i.test(e)) { - var r = e.match(l); - - if (r) { - var i = r[2] - 1 || 0, - s = (r[7] || "0").substring(0, 3); - return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s); - } - } - - return new Date(e); - }(t), this.$x = t.x || {}, this.init(); - }, m.init = function () { - var t = this.$d; - this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds(); - }, m.$utils = function () { - return O; - }, m.isValid = function () { - return !(this.$d.toString() === $); - }, m.isSame = function (t, e) { - var n = w(t); - return this.startOf(e) <= n && n <= this.endOf(e); - }, m.isAfter = function (t, e) { - return w(t) < this.startOf(e); - }, m.isBefore = function (t, e) { - return this.endOf(e) < w(t); - }, m.$g = function (t, e, n) { - return O.u(t) ? this[e] : this.set(n, t); - }, m.unix = function () { - return Math.floor(this.valueOf() / 1e3); - }, m.valueOf = function () { - return this.$d.getTime(); - }, m.startOf = function (t, e) { - var n = this, - r = !!O.u(e) || e, - h = O.p(t), - $ = function (t, e) { - var i = O.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n); - return r ? i : i.endOf(a); - }, - l = function (t, e) { - return O.w(n.toDate()[t].apply(n.toDate("s"), (r ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), n); - }, - y = this.$W, - M = this.$M, - m = this.$D, - g = "set" + (this.$u ? "UTC" : ""); - - switch (h) { - case c: - return r ? $(1, 0) : $(31, 11); - - case f: - return r ? $(1, M) : $(0, M + 1); - - case o: - var D = this.$locale().weekStart || 0, - v = (y < D ? y + 7 : y) - D; - return $(r ? m - v : m + (6 - v), M); - - case a: - case d: - return l(g + "Hours", 0); - - case u: - return l(g + "Minutes", 1); - - case s: - return l(g + "Seconds", 2); - - case i: - return l(g + "Milliseconds", 3); - - default: - return this.clone(); - } - }, m.endOf = function (t) { - return this.startOf(t, !1); - }, m.$set = function (t, e) { - var n, - o = O.p(t), - h = "set" + (this.$u ? "UTC" : ""), - $ = (n = {}, n[a] = h + "Date", n[d] = h + "Date", n[f] = h + "Month", n[c] = h + "FullYear", n[u] = h + "Hours", n[s] = h + "Minutes", n[i] = h + "Seconds", n[r] = h + "Milliseconds", n)[o], - l = o === a ? this.$D + (e - this.$W) : e; - - if (o === f || o === c) { - var y = this.clone().set(d, 1); - y.$d[$](l), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d; - } else $ && this.$d[$](l); - - return this.init(), this; - }, m.set = function (t, e) { - return this.clone().$set(t, e); - }, m.get = function (t) { - return this[O.p(t)](); - }, m.add = function (r, h) { - var d, - $ = this; - r = Number(r); - - var l = O.p(h), - y = function (t) { - var e = w($); - return O.w(e.date(e.date() + Math.round(t * r)), $); - }; - - if (l === f) return this.set(f, this.$M + r); - if (l === c) return this.set(c, this.$y + r); - if (l === a) return y(1); - if (l === o) return y(7); - var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[l] || 1, - m = this.$d.getTime() + r * M; - return O.w(m, this); - }, m.subtract = function (t, e) { - return this.add(-1 * t, e); - }, m.format = function (t) { - var e = this, - n = this.$locale(); - if (!this.isValid()) return n.invalidDate || $; - - var r = t || "YYYY-MM-DDTHH:mm:ssZ", - i = O.z(this), - s = this.$H, - u = this.$m, - a = this.$M, - o = n.weekdays, - f = n.months, - h = function (t, n, i, s) { - return t && (t[n] || t(e, r)) || i[n].substr(0, s); - }, - c = function (t) { - return O.s(s % 12 || 12, t, "0"); - }, - d = n.meridiem || function (t, e, n) { - var r = t < 12 ? "AM" : "PM"; - return n ? r.toLowerCase() : r; - }, - l = { - YY: String(this.$y).slice(-2), - YYYY: this.$y, - M: a + 1, - MM: O.s(a + 1, 2, "0"), - MMM: h(n.monthsShort, a, f, 3), - MMMM: h(f, a), - D: this.$D, - DD: O.s(this.$D, 2, "0"), - d: String(this.$W), - dd: h(n.weekdaysMin, this.$W, o, 2), - ddd: h(n.weekdaysShort, this.$W, o, 3), - dddd: o[this.$W], - H: String(s), - HH: O.s(s, 2, "0"), - h: c(1), - hh: c(2), - a: d(s, u, !0), - A: d(s, u, !1), - m: String(u), - mm: O.s(u, 2, "0"), - s: String(this.$s), - ss: O.s(this.$s, 2, "0"), - SSS: O.s(this.$ms, 3, "0"), - Z: i - }; - - return r.replace(y, function (t, e) { - return e || l[t] || i.replace(":", ""); - }); - }, m.utcOffset = function () { - return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); - }, m.diff = function (r, d, $) { - var l, - y = O.p(d), - M = w(r), - m = (M.utcOffset() - this.utcOffset()) * e, - g = this - M, - D = O.m(this, M); - return D = (l = {}, l[c] = D / 12, l[f] = D, l[h] = D / 3, l[o] = (g - m) / 6048e5, l[a] = (g - m) / 864e5, l[u] = g / n, l[s] = g / e, l[i] = g / t, l)[y] || g, $ ? D : O.a(D); - }, m.daysInMonth = function () { - return this.endOf(f).$D; - }, m.$locale = function () { - return v[this.$L]; - }, m.locale = function (t, e) { - if (!t) return this.$L; - var n = this.clone(), - r = S(t, e, !0); - return r && (n.$L = r), n; - }, m.clone = function () { - return O.w(this.$d, this); - }, m.toDate = function () { - return new Date(this.valueOf()); - }, m.toJSON = function () { - return this.isValid() ? this.toISOString() : null; - }, m.toISOString = function () { - return this.$d.toISOString(); - }, m.toString = function () { - return this.$d.toUTCString(); - }, M; - }(), - b = _.prototype; - - return w.prototype = b, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function (t) { - b[t[1]] = function (e) { - return this.$g(e, t[0], t[1]); - }; - }), w.extend = function (t, e) { - return t.$i || (t(e, _, w), t.$i = !0), w; - }, w.locale = S, w.isDayjs = p, w.unix = function (t) { - return w(1e3 * t); - }, w.en = v[D], w.Ls = v, w.p = {}, w; -}); - -/***/ }), - -/***/ 8674: -/***/ (function(module) { - -!function (e, t) { - true ? module.exports = t() : 0; -}(this, function () { - "use strict"; - - return function (e, t, r) { - var n = t.prototype, - s = n.format; - r.en.ordinal = function (e) { - var t = ["th", "st", "nd", "rd"], - r = e % 100; - return "[" + e + (t[(r - 20) % 10] || t[r] || t[0]) + "]"; - }, n.format = function (e) { - var t = this, - r = this.$locale(), - n = this.$utils(), - a = (e || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function (e) { - switch (e) { - case "Q": - return Math.ceil((t.$M + 1) / 3); - - case "Do": - return r.ordinal(t.$D); - - case "gggg": - return t.weekYear(); - - case "GGGG": - return t.isoWeekYear(); - - case "wo": - return r.ordinal(t.week(), "W"); - - case "w": - case "ww": - return n.s(t.week(), "w" === e ? 1 : 2, "0"); - - case "W": - case "WW": - return n.s(t.isoWeek(), "W" === e ? 1 : 2, "0"); - - case "k": - case "kk": - return n.s(String(0 === t.$H ? 24 : t.$H), "k" === e ? 1 : 2, "0"); - - case "X": - return Math.floor(t.$d.getTime() / 1e3); - - case "x": - return t.$d.getTime(); - - case "z": - return "[" + t.offsetName() + "]"; - - case "zzz": - return "[" + t.offsetName("long") + "]"; - - default: - return e; - } - }); - return s.bind(this)(a); - }; - }; -}); - -/***/ }), - -/***/ 1041: -/***/ (function(module) { - -/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */ -(function (global, factory) { - true ? module.exports = factory() : 0; -})(this, function () { - 'use strict'; - - function _toConsumableArray(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } - - return arr2; - } else { - return Array.from(arr); - } - } - - var hasOwnProperty = Object.hasOwnProperty, - setPrototypeOf = Object.setPrototypeOf, - isFrozen = Object.isFrozen, - getPrototypeOf = Object.getPrototypeOf, - getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - var freeze = Object.freeze, - seal = Object.seal, - create = Object.create; // eslint-disable-line import/no-mutable-exports - - var _ref = typeof Reflect !== 'undefined' && Reflect, - apply = _ref.apply, - construct = _ref.construct; - - if (!apply) { - apply = function apply(fun, thisValue, args) { - return fun.apply(thisValue, args); - }; - } - - if (!freeze) { - freeze = function freeze(x) { - return x; - }; - } - - if (!seal) { - seal = function seal(x) { - return x; - }; - } - - if (!construct) { - construct = function construct(Func, args) { - return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))(); - }; - } - - var arrayForEach = unapply(Array.prototype.forEach); - var arrayPop = unapply(Array.prototype.pop); - var arrayPush = unapply(Array.prototype.push); - var stringToLowerCase = unapply(String.prototype.toLowerCase); - var stringMatch = unapply(String.prototype.match); - var stringReplace = unapply(String.prototype.replace); - var stringIndexOf = unapply(String.prototype.indexOf); - var stringTrim = unapply(String.prototype.trim); - var regExpTest = unapply(RegExp.prototype.test); - var typeErrorCreate = unconstruct(TypeError); - - function unapply(func) { - return function (thisArg) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - return apply(func, thisArg, args); - }; - } - - function unconstruct(func) { - return function () { - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - return construct(func, args); - }; - } - /* Add properties to a lookup table */ - - - function addToSet(set, array) { - if (setPrototypeOf) { - // Make 'in' and truthy checks like Boolean(set.constructor) - // independent of any properties defined on Object.prototype. - // Prevent prototype setters from intercepting set as a this value. - setPrototypeOf(set, null); - } - - var l = array.length; - - while (l--) { - var element = array[l]; - - if (typeof element === 'string') { - var lcElement = stringToLowerCase(element); - - if (lcElement !== element) { - // Config presets (e.g. tags.js, attrs.js) are immutable. - if (!isFrozen(array)) { - array[l] = lcElement; - } - - element = lcElement; - } - } - - set[element] = true; - } - - return set; - } - /* Shallow clone an object */ - - - function clone(object) { - var newObject = create(null); - var property = void 0; - - for (property in object) { - if (apply(hasOwnProperty, object, [property])) { - newObject[property] = object[property]; - } - } - - return newObject; - } - /* IE10 doesn't support __lookupGetter__ so lets' - * simulate it. It also automatically checks - * if the prop is function or getter and behaves - * accordingly. */ - - - function lookupGetter(object, prop) { - while (object !== null) { - var desc = getOwnPropertyDescriptor(object, prop); - - if (desc) { - if (desc.get) { - return unapply(desc.get); - } - - if (typeof desc.value === 'function') { - return unapply(desc.value); - } - } - - object = getPrototypeOf(object); - } - - function fallbackValue(element) { - console.warn('fallback value for', element); - return null; - } - - return fallbackValue; - } - - var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG - - var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']); - var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default. - // We still need to know them so that we can do namespace - // checks properly in case one wants to add them to - // allow-list. - - var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'feimage', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']); - var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); // Similarly to SVG, we want to know all MathML elements, - // even those that we disallow by default. - - var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']); - var text = freeze(['#text']); - var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']); - var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']); - var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']); - var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']); // eslint-disable-next-line unicorn/better-regex - - var MUSTACHE_EXPR = seal(/\{\{[\s\S]*|[\s\S]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode - - var ERB_EXPR = seal(/<%[\s\S]*|[\s\S]*%>/gm); - var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape - - var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape - - var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape - ); - var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); - var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex - ); - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - - function _toConsumableArray$1(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } - - return arr2; - } else { - return Array.from(arr); - } - } - - var getGlobal = function getGlobal() { - return typeof window === 'undefined' ? null : window; - }; - /** - * Creates a no-op policy for internal use only. - * Don't export this function outside this module! - * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory. - * @param {Document} document The document object (to determine policy name suffix) - * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types - * are not supported). - */ - - - var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) { - if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') { - return null; - } // Allow the callers to control the unique policy name - // by adding a data-tt-policy-suffix to the script element with the DOMPurify. - // Policy creation with duplicate names throws in Trusted Types. - - - var suffix = null; - var ATTR_NAME = 'data-tt-policy-suffix'; - - if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) { - suffix = document.currentScript.getAttribute(ATTR_NAME); - } - - var policyName = 'dompurify' + (suffix ? '#' + suffix : ''); - - try { - return trustedTypes.createPolicy(policyName, { - createHTML: function createHTML(html$$1) { - return html$$1; - } - }); - } catch (_) { - // Policy creation failed (most likely another DOMPurify script has - // already run). Skip creating the policy, as this will only cause errors - // if TT are enforced. - console.warn('TrustedTypes policy ' + policyName + ' could not be created.'); - return null; - } - }; - - function createDOMPurify() { - var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal(); - - var DOMPurify = function DOMPurify(root) { - return createDOMPurify(root); - }; - /** - * Version label, exposed for easier checks - * if DOMPurify is up to date or not - */ - - - DOMPurify.version = '2.3.1'; - /** - * Array of elements that DOMPurify removed during sanitation. - * Empty if nothing was removed. - */ - - DOMPurify.removed = []; - - if (!window || !window.document || window.document.nodeType !== 9) { - // Not running in a browser, provide a factory function - // so that you can pass your own Window - DOMPurify.isSupported = false; - return DOMPurify; - } - - var originalDocument = window.document; - var document = window.document; - var DocumentFragment = window.DocumentFragment, - HTMLTemplateElement = window.HTMLTemplateElement, - Node = window.Node, - Element = window.Element, - NodeFilter = window.NodeFilter, - _window$NamedNodeMap = window.NamedNodeMap, - NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap, - Text = window.Text, - Comment = window.Comment, - DOMParser = window.DOMParser, - trustedTypes = window.trustedTypes; - var ElementPrototype = Element.prototype; - var cloneNode = lookupGetter(ElementPrototype, 'cloneNode'); - var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling'); - var getChildNodes = lookupGetter(ElementPrototype, 'childNodes'); - var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a - // new document created via createHTMLDocument. As per the spec - // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries) - // a new empty registry is used when creating a template contents owner - // document, so we use that as our parent document to ensure nothing - // is inherited. - - if (typeof HTMLTemplateElement === 'function') { - var template = document.createElement('template'); - - if (template.content && template.content.ownerDocument) { - document = template.content.ownerDocument; - } - } - - var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument); - - var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : ''; - var _document = document, - implementation = _document.implementation, - createNodeIterator = _document.createNodeIterator, - createDocumentFragment = _document.createDocumentFragment, - getElementsByTagName = _document.getElementsByTagName; - var importNode = originalDocument.importNode; - var documentMode = {}; - - try { - documentMode = clone(document).documentMode ? document.documentMode : {}; - } catch (_) {} - - var hooks = {}; - /** - * Expose whether this browser supports running the full DOMPurify. - */ - - DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9; - var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR, - ERB_EXPR$$1 = ERB_EXPR, - DATA_ATTR$$1 = DATA_ATTR, - ARIA_ATTR$$1 = ARIA_ATTR, - IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA, - ATTR_WHITESPACE$$1 = ATTR_WHITESPACE; - var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI; - /** - * We consider the elements and attributes below to be safe. Ideally - * don't add any new ones but feel free to remove unwanted ones. - */ - - /* allowed element names */ - - var ALLOWED_TAGS = null; - var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text))); - /* Allowed attribute names */ - - var ALLOWED_ATTR = null; - var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml))); - /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */ - - var FORBID_TAGS = null; - /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */ - - var FORBID_ATTR = null; - /* Decide if ARIA attributes are okay */ - - var ALLOW_ARIA_ATTR = true; - /* Decide if custom data attributes are okay */ - - var ALLOW_DATA_ATTR = true; - /* Decide if unknown protocols are okay */ - - var ALLOW_UNKNOWN_PROTOCOLS = false; - /* Output should be safe for common template engines. - * This means, DOMPurify removes data attributes, mustaches and ERB - */ - - var SAFE_FOR_TEMPLATES = false; - /* Decide if document with ... should be returned */ - - var WHOLE_DOCUMENT = false; - /* Track whether config is already set on this instance of DOMPurify. */ - - var SET_CONFIG = false; - /* Decide if all elements (e.g. style, script) must be children of - * document.body. By default, browsers might move them to document.head */ - - var FORCE_BODY = false; - /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html - * string (or a TrustedHTML object if Trusted Types are supported). - * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead - */ - - var RETURN_DOM = false; - /* Decide if a DOM `DocumentFragment` should be returned, instead of a html - * string (or a TrustedHTML object if Trusted Types are supported) */ - - var RETURN_DOM_FRAGMENT = false; - /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM - * `Node` is imported into the current `Document`. If this flag is not enabled the - * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by - * DOMPurify. - * - * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false` - * might cause XSS from attacks hidden in closed shadowroots in case the browser - * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/ - */ - - var RETURN_DOM_IMPORT = true; - /* Try to return a Trusted Type object instead of a string, return a string in - * case Trusted Types are not supported */ - - var RETURN_TRUSTED_TYPE = false; - /* Output should be free from DOM clobbering attacks? */ - - var SANITIZE_DOM = true; - /* Keep element content when removing element? */ - - var KEEP_CONTENT = true; - /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead - * of importing it into a new Document and returning a sanitized copy */ - - var IN_PLACE = false; - /* Allow usage of profiles like html, svg and mathMl */ - - var USE_PROFILES = {}; - /* Tags to ignore content of when KEEP_CONTENT is true */ - - var FORBID_CONTENTS = null; - var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']); - /* Tags that are safe for data: URIs */ - - var DATA_URI_TAGS = null; - var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']); - /* Attributes safe for values like "javascript:" */ - - var URI_SAFE_ATTRIBUTES = null; - var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']); - var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; - var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; - var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; - /* Document namespace */ - - var NAMESPACE = HTML_NAMESPACE; - var IS_EMPTY_INPUT = false; - /* Keep a reference to config to pass to hooks */ - - var CONFIG = null; - /* Ideally, do not touch anything below this line */ - - /* ______________________________________________ */ - - var formElement = document.createElement('form'); - /** - * _parseConfig - * - * @param {Object} cfg optional config literal - */ - // eslint-disable-next-line complexity - - var _parseConfig = function _parseConfig(cfg) { - if (CONFIG && CONFIG === cfg) { - return; - } - /* Shield configuration object from tampering */ - - - if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') { - cfg = {}; - } - /* Shield configuration object from prototype pollution */ - - - cfg = clone(cfg); - /* Set configuration parameters */ - - ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS; - ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR; - URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES; - DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS; - FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS) : DEFAULT_FORBID_CONTENTS; - FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {}; - FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {}; - USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false; - ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true - - ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true - - ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false - - SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false - - WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false - - RETURN_DOM = cfg.RETURN_DOM || false; // Default false - - RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false - - RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true - - RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false - - FORCE_BODY = cfg.FORCE_BODY || false; // Default false - - SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true - - KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true - - IN_PLACE = cfg.IN_PLACE || false; // Default false - - IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1; - NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE; - - if (SAFE_FOR_TEMPLATES) { - ALLOW_DATA_ATTR = false; - } - - if (RETURN_DOM_FRAGMENT) { - RETURN_DOM = true; - } - /* Parse profile info */ - - - if (USE_PROFILES) { - ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text))); - ALLOWED_ATTR = []; - - if (USE_PROFILES.html === true) { - addToSet(ALLOWED_TAGS, html); - addToSet(ALLOWED_ATTR, html$1); - } - - if (USE_PROFILES.svg === true) { - addToSet(ALLOWED_TAGS, svg); - addToSet(ALLOWED_ATTR, svg$1); - addToSet(ALLOWED_ATTR, xml); - } - - if (USE_PROFILES.svgFilters === true) { - addToSet(ALLOWED_TAGS, svgFilters); - addToSet(ALLOWED_ATTR, svg$1); - addToSet(ALLOWED_ATTR, xml); - } - - if (USE_PROFILES.mathMl === true) { - addToSet(ALLOWED_TAGS, mathMl); - addToSet(ALLOWED_ATTR, mathMl$1); - addToSet(ALLOWED_ATTR, xml); - } - } - /* Merge configuration parameters */ - - - if (cfg.ADD_TAGS) { - if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { - ALLOWED_TAGS = clone(ALLOWED_TAGS); - } - - addToSet(ALLOWED_TAGS, cfg.ADD_TAGS); - } - - if (cfg.ADD_ATTR) { - if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { - ALLOWED_ATTR = clone(ALLOWED_ATTR); - } - - addToSet(ALLOWED_ATTR, cfg.ADD_ATTR); - } - - if (cfg.ADD_URI_SAFE_ATTR) { - addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR); - } - - if (cfg.FORBID_CONTENTS) { - if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) { - FORBID_CONTENTS = clone(FORBID_CONTENTS); - } - - addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS); - } - /* Add #text in case KEEP_CONTENT is set to true */ - - - if (KEEP_CONTENT) { - ALLOWED_TAGS['#text'] = true; - } - /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */ - - - if (WHOLE_DOCUMENT) { - addToSet(ALLOWED_TAGS, ['html', 'head', 'body']); - } - /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */ - - - if (ALLOWED_TAGS.table) { - addToSet(ALLOWED_TAGS, ['tbody']); - delete FORBID_TAGS.tbody; - } // Prevent further manipulation of configuration. - // Not available in IE8, Safari 5, etc. - - - if (freeze) { - freeze(cfg); - } - - CONFIG = cfg; - }; - - var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']); - var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); - /* Keep track of all possible SVG and MathML tags - * so that we can perform the namespace checks - * correctly. */ - - var ALL_SVG_TAGS = addToSet({}, svg); - addToSet(ALL_SVG_TAGS, svgFilters); - addToSet(ALL_SVG_TAGS, svgDisallowed); - var ALL_MATHML_TAGS = addToSet({}, mathMl); - addToSet(ALL_MATHML_TAGS, mathMlDisallowed); - /** - * - * - * @param {Element} element a DOM element whose namespace is being checked - * @returns {boolean} Return false if the element has a - * namespace that a spec-compliant parser would never - * return. Return true otherwise. - */ - - var _checkValidNamespace = function _checkValidNamespace(element) { - var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode - // can be null. We just simulate parent in this case. - - if (!parent || !parent.tagName) { - parent = { - namespaceURI: HTML_NAMESPACE, - tagName: 'template' - }; - } - - var tagName = stringToLowerCase(element.tagName); - var parentTagName = stringToLowerCase(parent.tagName); - - if (element.namespaceURI === SVG_NAMESPACE) { - // The only way to switch from HTML namespace to SVG - // is via