/* Template Name: Docuto - Documentation HTML Template
Author: Acavo
Version: 1.0.0
Created: Oct 2020
File Description: Plugins js file of the template
*/
/*============================================*/
//
// 01 -- Wow
// 02 -- Prism JS
// 03 -- Smooth scroll js
//
/*===========================================*/
/*===========================================
01 -- Wow
=============================================*/
/*! WOW - v1.1.3 - 2016-05-06
* Copyright (c) 2016 Matthieu Aussaguel;*/
(function () {
var a, b, c, d, e, f = function (a, b) {
return function () {
return a.apply(b, arguments)
}
},
g = [].indexOf || function (a) {
for (var b = 0, c = this.length; c > b; b++)
if (b in this && this[b] === a) return b;
return -1
};
b = function () {
function a() {}
return a.prototype.extend = function (a, b) {
var c, d;
for (c in b) d = b[c], null == a[c] && (a[c] = d);
return a
}, a.prototype.isMobile = function (a) {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)
}, a.prototype.createEvent = function (a, b, c, d) {
var e;
return null == b && (b = !1), null == c && (c = !1), null == d && (d = null), null != document.createEvent ? (e = document.createEvent("CustomEvent"), e.initCustomEvent(a, b, c, d)) : null != document.createEventObject ? (e = document.createEventObject(), e.eventType = a) : e.eventName = a, e
}, a.prototype.emitEvent = function (a, b) {
return null != a.dispatchEvent ? a.dispatchEvent(b) : b in (null != a) ? a[b]() : "on" + b in (null != a) ? a["on" + b]() : void 0
}, a.prototype.addEvent = function (a, b, c) {
return null != a.addEventListener ? a.addEventListener(b, c, !1) : null != a.attachEvent ? a.attachEvent("on" + b, c) : a[b] = c
}, a.prototype.removeEvent = function (a, b, c) {
return null != a.removeEventListener ? a.removeEventListener(b, c, !1) : null != a.detachEvent ? a.detachEvent("on" + b, c) : delete a[b]
}, a.prototype.innerHeight = function () {
return "innerHeight" in window ? window.innerHeight : document.documentElement.clientHeight
}, a
}(), c = this.WeakMap || this.MozWeakMap || (c = function () {
function a() {
this.keys = [], this.values = []
}
return a.prototype.get = function (a) {
var b, c, d, e, f;
for (f = this.keys, b = d = 0, e = f.length; e > d; b = ++d)
if (c = f[b], c === a) return this.values[b]
}, a.prototype.set = function (a, b) {
var c, d, e, f, g;
for (g = this.keys, c = e = 0, f = g.length; f > e; c = ++e)
if (d = g[c], d === a) return void(this.values[c] = b);
return this.keys.push(a), this.values.push(b)
}, a
}()), a = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver || (a = function () {
function a() {
"undefined" != typeof console && null !== console && console.warn("MutationObserver is not supported by your browser."), "undefined" != typeof console && null !== console && console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")
}
return a.notSupported = !0, a.prototype.observe = function () {}, a
}()), d = this.getComputedStyle || function (a, b) {
return this.getPropertyValue = function (b) {
var c;
return "float" === b && (b = "styleFloat"), e.test(b) && b.replace(e, function (a, b) {
return b.toUpperCase()
}), (null != (c = a.currentStyle) ? c[b] : void 0) || null
}, this
}, e = /(\-([a-z]){1})/g, this.WOW = function () {
function e(a) {
null == a && (a = {}), this.scrollCallback = f(this.scrollCallback, this), this.scrollHandler = f(this.scrollHandler, this), this.resetAnimation = f(this.resetAnimation, this), this.start = f(this.start, this), this.scrolled = !0, this.config = this.util().extend(a, this.defaults), null != a.scrollContainer && (this.config.scrollContainer = document.querySelector(a.scrollContainer)), this.animationNameCache = new c, this.wowEvent = this.util().createEvent(this.config.boxClass)
}
return e.prototype.defaults = {
boxClass: "wow",
animateClass: "animated",
offset: 0,
mobile: !0,
live: !0,
callback: null,
scrollContainer: null
}, e.prototype.init = function () {
var a;
return this.element = window.document.documentElement, "interactive" === (a = document.readyState) || "complete" === a ? this.start() : this.util().addEvent(document, "DOMContentLoaded", this.start), this.finished = []
}, e.prototype.start = function () {
var b, c, d, e;
if (this.stopped = !1, this.boxes = function () {
var a, c, d, e;
for (d = this.element.querySelectorAll("." + this.config.boxClass), e = [], a = 0, c = d.length; c > a; a++) b = d[a], e.push(b);
return e
}.call(this), this.all = function () {
var a, c, d, e;
for (d = this.boxes, e = [], a = 0, c = d.length; c > a; a++) b = d[a], e.push(b);
return e
}.call(this), this.boxes.length)
if (this.disabled()) this.resetStyle();
else
for (e = this.boxes, c = 0, d = e.length; d > c; c++) b = e[c], this.applyStyle(b, !0);
return this.disabled() || (this.util().addEvent(this.config.scrollContainer || window, "scroll", this.scrollHandler), this.util().addEvent(window, "resize", this.scrollHandler), this.interval = setInterval(this.scrollCallback, 50)), this.config.live ? new a(function (a) {
return function (b) {
var c, d, e, f, g;
for (g = [], c = 0, d = b.length; d > c; c++) f = b[c], g.push(function () {
var a, b, c, d;
for (c = f.addedNodes || [], d = [], a = 0, b = c.length; b > a; a++) e = c[a], d.push(this.doSync(e));
return d
}.call(a));
return g
}
}(this)).observe(document.body, {
childList: !0,
subtree: !0
}) : void 0
}, e.prototype.stop = function () {
return this.stopped = !0, this.util().removeEvent(this.config.scrollContainer || window, "scroll", this.scrollHandler), this.util().removeEvent(window, "resize", this.scrollHandler), null != this.interval ? clearInterval(this.interval) : void 0
}, e.prototype.sync = function (b) {
return a.notSupported ? this.doSync(this.element) : void 0
}, e.prototype.doSync = function (a) {
var b, c, d, e, f;
if (null == a && (a = this.element), 1 === a.nodeType) {
for (a = a.parentNode || a, e = a.querySelectorAll("." + this.config.boxClass), f = [], c = 0, d = e.length; d > c; c++) b = e[c], g.call(this.all, b) < 0 ? (this.boxes.push(b), this.all.push(b), this.stopped || this.disabled() ? this.resetStyle() : this.applyStyle(b, !0), f.push(this.scrolled = !0)) : f.push(void 0);
return f
}
}, e.prototype.show = function (a) {
return this.applyStyle(a), a.className = a.className + " " + this.config.animateClass, null != this.config.callback && this.config.callback(a), this.util().emitEvent(a, this.wowEvent), this.util().addEvent(a, "animationend", this.resetAnimation), this.util().addEvent(a, "oanimationend", this.resetAnimation), this.util().addEvent(a, "webkitAnimationEnd", this.resetAnimation), this.util().addEvent(a, "MSAnimationEnd", this.resetAnimation), a
}, e.prototype.applyStyle = function (a, b) {
var c, d, e;
return d = a.getAttribute("data-wow-duration"), c = a.getAttribute("data-wow-delay"), e = a.getAttribute("data-wow-iteration"), this.animate(function (f) {
return function () {
return f.customStyle(a, b, d, c, e)
}
}(this))
}, e.prototype.animate = function () {
return "requestAnimationFrame" in window ? function (a) {
return window.requestAnimationFrame(a)
} : function (a) {
return a()
}
}(), e.prototype.resetStyle = function () {
var a, b, c, d, e;
for (d = this.boxes, e = [], b = 0, c = d.length; c > b; b++) a = d[b], e.push(a.style.visibility = "visible");
return e
}, e.prototype.resetAnimation = function (a) {
var b;
return a.type.toLowerCase().indexOf("animationend") >= 0 ? (b = a.target || a.srcElement, b.className = b.className.replace(this.config.animateClass, "").trim()) : void 0
}, e.prototype.customStyle = function (a, b, c, d, e) {
return b && this.cacheAnimationName(a), a.style.visibility = b ? "hidden" : "visible", c && this.vendorSet(a.style, {
animationDuration: c
}), d && this.vendorSet(a.style, {
animationDelay: d
}), e && this.vendorSet(a.style, {
animationIterationCount: e
}), this.vendorSet(a.style, {
animationName: b ? "none" : this.cachedAnimationName(a)
}), a
}, e.prototype.vendors = ["moz", "webkit"], e.prototype.vendorSet = function (a, b) {
var c, d, e, f;
d = [];
for (c in b) e = b[c], a["" + c] = e, d.push(function () {
var b, d, g, h;
for (g = this.vendors, h = [], b = 0, d = g.length; d > b; b++) f = g[b], h.push(a["" + f + c.charAt(0).toUpperCase() + c.substr(1)] = e);
return h
}.call(this));
return d
}, e.prototype.vendorCSS = function (a, b) {
var c, e, f, g, h, i;
for (h = d(a), g = h.getPropertyCSSValue(b), f = this.vendors, c = 0, e = f.length; e > c; c++) i = f[c], g = g || h.getPropertyCSSValue("-" + i + "-" + b);
return g
}, e.prototype.animationName = function (a) {
var b;
try {
b = this.vendorCSS(a, "animation-name").cssText
} catch (c) {
b = d(a).getPropertyValue("animation-name")
}
return "none" === b ? "" : b
}, e.prototype.cacheAnimationName = function (a) {
return this.animationNameCache.set(a, this.animationName(a))
}, e.prototype.cachedAnimationName = function (a) {
return this.animationNameCache.get(a)
}, e.prototype.scrollHandler = function () {
return this.scrolled = !0
}, e.prototype.scrollCallback = function () {
var a;
return !this.scrolled || (this.scrolled = !1, this.boxes = function () {
var b, c, d, e;
for (d = this.boxes, e = [], b = 0, c = d.length; c > b; b++) a = d[b], a && (this.isVisible(a) ? this.show(a) : e.push(a));
return e
}.call(this), this.boxes.length || this.config.live) ? void 0 : this.stop()
}, e.prototype.offsetTop = function (a) {
for (var b; void 0 === a.offsetTop;) a = a.parentNode;
for (b = a.offsetTop; a = a.offsetParent;) b += a.offsetTop;
return b
}, e.prototype.isVisible = function (a) {
var b, c, d, e, f;
return c = a.getAttribute("data-wow-offset") || this.config.offset, f = this.config.scrollContainer && this.config.scrollContainer.scrollTop || window.pageYOffset, e = f + Math.min(this.element.clientHeight, this.util().innerHeight()) - c, d = this.offsetTop(a), b = d + a.clientHeight, e >= d && b >= f
}, e.prototype.util = function () {
return null != this._util ? this._util : this._util = new b
}, e.prototype.disabled = function () {
return !this.config.mobile && this.util().isMobile(navigator.userAgent)
}, e
}()
}).call(this);
/*===========================================
02 -- Prism JS
=============================================*/
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript&plugins=line-numbers */
var _self = "undefined" != typeof window ? window : "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : {},
Prism = function () {
var e = /\blang(?:uage)?-([\w-]+)\b/i,
t = 0,
n = _self.Prism = {
manual: _self.Prism && _self.Prism.manual,
disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler,
util: {
encode: function (e) {
return e instanceof r ? new r(e.type, n.util.encode(e.content), e.alias) : "Array" === n.util.type(e) ? e.map(n.util.encode) : e.replace(/&/g, "&").replace(/ e.length) return;
if (!(w instanceof s)) {
if (m && b != t.length - 1) {
h.lastIndex = k;
var _ = h.exec(e);
if (!_) break;
for (var j = _.index + (d ? _[1].length : 0), P = _.index + _[0].length, A = b, x = k, O = t.length; O > A && (P > x || !t[A].type && !t[A - 1].greedy); ++A) x += t[A].length, j >= x && (++b, k = x);
if (t[b] instanceof s) continue;
I = A - b, w = e.slice(k, x), _.index -= k
} else {
h.lastIndex = 0;
var _ = h.exec(w),
I = 1
}
if (_) {
d && (p = _[1] ? _[1].length : 0);
var j = _.index + p,
_ = _[0].slice(p),
P = j + _.length,
N = w.slice(0, j),
S = w.slice(P),
C = [b, I];
N && (++b, k += N.length, C.push(N));
var E = new s(u, f ? n.tokenize(_, f) : _, y, _, m);
if (C.push(E), S && C.push(S), Array.prototype.splice.apply(t, C), 1 != I && n.matchGrammar(e, t, r, b, k, !0, u), i) break
} else if (i) break
}
}
}
}
},
tokenize: function (e, t) {
var r = [e],
a = t.rest;
if (a) {
for (var l in a) t[l] = a[l];
delete t.rest
}
return n.matchGrammar(e, r, t, 0, 0, !1), r
},
hooks: {
all: {},
add: function (e, t) {
var r = n.hooks.all;
r[e] = r[e] || [], r[e].push(t)
},
run: function (e, t) {
var r = n.hooks.all[e];
if (r && r.length)
for (var a, l = 0; a = r[l++];) a(t)
}
}
},
r = n.Token = function (e, t, n, r, a) {
this.type = e, this.content = t, this.alias = n, this.length = 0 | (r || "").length, this.greedy = !!a
};
if (r.stringify = function (e, t, a) {
if ("string" == typeof e) return e;
if ("Array" === n.util.type(e)) return e.map(function (n) {
return r.stringify(n, t, e)
}).join("");
var l = {
type: e.type,
content: r.stringify(e.content, t, a),
tag: "span",
classes: ["token", e.type],
attributes: {},
language: t,
parent: a
};
if (e.alias) {
var i = "Array" === n.util.type(e.alias) ? e.alias : [e.alias];
Array.prototype.push.apply(l.classes, i)
}
n.hooks.run("wrap", l);
var o = Object.keys(l.attributes).map(function (e) {
return e + '="' + (l.attributes[e] || "").replace(/"/g, """) + '"'
}).join(" ");
return "<" + l.tag + ' class="' + l.classes.join(" ") + '"' + (o ? " " + o : "") + ">" + l.content + "" + l.tag + ">"
}, !_self.document) return _self.addEventListener ? (n.disableWorkerMessageHandler || _self.addEventListener("message", function (e) {
var t = JSON.parse(e.data),
r = t.language,
a = t.code,
l = t.immediateClose;
_self.postMessage(n.highlight(a, n.languages[r], r)), l && _self.close()
}, !1), _self.Prism) : _self.Prism;
var a = document.currentScript || [].slice.call(document.getElementsByTagName("script")).pop();
return a && (n.filename = a.src, n.manual || a.hasAttribute("data-manual") || ("loading" !== document.readyState ? window.requestAnimationFrame ? window.requestAnimationFrame(n.highlightAll) : window.setTimeout(n.highlightAll, 16) : document.addEventListener("DOMContentLoaded", n.highlightAll))), _self.Prism
}();
"undefined" != typeof module && module.exports && (module.exports = Prism), "undefined" != typeof global && (global.Prism = Prism);
Prism.languages.markup = {
comment: //,
prolog: /<\?[\s\S]+?\?>/,
doctype: //i,
cdata: //i,
tag: {
pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,
greedy: !0,
inside: {
tag: {
pattern: /^<\/?[^\s>\/]+/i,
inside: {
punctuation: /^<\/?/,
namespace: /^[^\s>\/:]+:/
}
},
"attr-value": {
pattern: /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,
inside: {
punctuation: [/^=/, {
pattern: /(^|[^\\])["']/,
lookbehind: !0
}]
}
},
punctuation: /\/?>/,
"attr-name": {
pattern: /[^\s>\/]+/,
inside: {
namespace: /^[^\s>\/:]+:/
}
}
}
},
entity: /?[\da-z]{1,8};/i
}, Prism.languages.markup.tag.inside["attr-value"].inside.entity = Prism.languages.markup.entity, Prism.hooks.add("wrap", function (a) {
"entity" === a.type && (a.attributes.title = a.content.replace(/&/, "&"))
}), Prism.languages.xml = Prism.languages.markup, Prism.languages.html = Prism.languages.markup, Prism.languages.mathml = Prism.languages.markup, Prism.languages.svg = Prism.languages.markup;
Prism.languages.css = {
comment: /\/\*[\s\S]*?\*\//,
atrule: {
pattern: /@[\w-]+?.*?(?:;|(?=\s*\{))/i,
inside: {
rule: /@[\w-]+/
}
},
url: /url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
selector: /[^{}\s][^{};]*?(?=\s*\{)/,
string: {
pattern: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
greedy: !0
},
property: /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,
important: /!important\b/i,
"function": /[-a-z0-9]+(?=\()/i,
punctuation: /[(){};:]/
}, Prism.languages.css.atrule.inside.rest = Prism.languages.css, Prism.languages.markup && (Prism.languages.insertBefore("markup", "tag", {
style: {
pattern: /(