// ==UserScript==
// @name Rain Classroom PDF Direct Download
// @name:zh-CN 雨课堂课件PDF下载工具
// @namespace https://www.pizyds.com/
// @version 1.3.1
// @description Automatic generation of direct download PDF on Rain Classroom
// @description:zh-CN 在雨课堂页面自动生成PDF版本课件提供下载
// @author PillarsZhang
// @homepage https://www.pizyds.com/rain-classroom-pdf-direct-download
// @supportURL https://www.pizyds.com/rain-classroom-pdf-direct-download
// @license MIT
// @match https://*.yuketang.cn/*
// @icon https://www.yuketang.cn/static/images/favicon.ico
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jspdf.umd.min.js
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js
// @require https://cdn.jsdelivr.net/npm/[email protected]/web/hybrid-crypto.min.js
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
/* eslint-disable */
/* spell-checker: disable */
// @[ The code below is generated by webpack ]
// @[ 下面的代码由 webpack 生成 ]
// @[ You can find all source codes in GitHub repo ]
// @[ 你可以在 GitHub 仓库中找到所有源代码 ]
// @[ https://github.com/PillarsZhang/Rain-Classroom-PDF-Direct-Download ]
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 518:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"afterMain": () => (/* reexport */ afterMain),
"afterRead": () => (/* reexport */ afterRead),
"afterWrite": () => (/* reexport */ afterWrite),
"applyStyles": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_modifiers_applyStyles),
"arrow": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_modifiers_arrow),
"auto": () => (/* reexport */ auto),
"basePlacements": () => (/* reexport */ basePlacements),
"beforeMain": () => (/* reexport */ beforeMain),
"beforeRead": () => (/* reexport */ beforeRead),
"beforeWrite": () => (/* reexport */ beforeWrite),
"bottom": () => (/* reexport */ bottom),
"clippingParents": () => (/* reexport */ clippingParents),
"computeStyles": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_modifiers_computeStyles),
"createPopper": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_popper_createPopper),
"createPopperBase": () => (/* reexport */ createPopper),
"createPopperLite": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_popper_lite_createPopper),
"detectOverflow": () => (/* reexport */ detectOverflow),
"end": () => (/* reexport */ end),
"eventListeners": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_modifiers_eventListeners),
"flip": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_modifiers_flip),
"hide": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_modifiers_hide),
"left": () => (/* reexport */ left),
"main": () => (/* reexport */ main),
"modifierPhases": () => (/* reexport */ modifierPhases),
"offset": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_modifiers_offset),
"placements": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_enums_placements),
"popper": () => (/* reexport */ popper),
"popperGenerator": () => (/* reexport */ popperGenerator),
"popperOffsets": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_modifiers_popperOffsets),
"preventOverflow": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_modifiers_preventOverflow),
"read": () => (/* reexport */ read),
"reference": () => (/* reexport */ reference),
"right": () => (/* reexport */ right),
"start": () => (/* reexport */ start),
"top": () => (/* reexport */ PRPU_node_modules_popperjs_core_lib_enums_top),
"variationPlacements": () => (/* reexport */ variationPlacements),
"viewport": () => (/* reexport */ viewport),
"write": () => (/* reexport */ write)
});
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\enums.js
var PRPU_node_modules_popperjs_core_lib_enums_top = 'top';
var bottom = 'bottom';
var right = 'right';
var left = 'left';
var auto = 'auto';
var basePlacements = [PRPU_node_modules_popperjs_core_lib_enums_top, bottom, right, left];
var start = 'start';
var end = 'end';
var clippingParents = 'clippingParents';
var viewport = 'viewport';
var popper = 'popper';
var reference = 'reference';
var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
return acc.concat([placement + "-" + start, placement + "-" + end]);
}, []);
var PRPU_node_modules_popperjs_core_lib_enums_placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
}, []); // modifiers that need to read the DOM
var beforeRead = 'beforeRead';
var read = 'read';
var afterRead = 'afterRead'; // pure-logic modifiers
var beforeMain = 'beforeMain';
var main = 'main';
var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
var beforeWrite = 'beforeWrite';
var write = 'write';
var afterWrite = 'afterWrite';
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getNodeName.js
function getNodeName(element) {
return element ? (element.nodeName || '').toLowerCase() : null;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getWindow.js
function getWindow(node) {
if (node == null) {
return window;
}
if (node.toString() !== '[object Window]') {
var ownerDocument = node.ownerDocument;
return ownerDocument ? ownerDocument.defaultView || window : window;
}
return node;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\instanceOf.js
function isElement(node) {
var OwnElement = getWindow(node).Element;
return node instanceof OwnElement || node instanceof Element;
}
function isHTMLElement(node) {
var OwnElement = getWindow(node).HTMLElement;
return node instanceof OwnElement || node instanceof HTMLElement;
}
function isShadowRoot(node) {
// IE 11 has no ShadowRoot
if (typeof ShadowRoot === 'undefined') {
return false;
}
var OwnElement = getWindow(node).ShadowRoot;
return node instanceof OwnElement || node instanceof ShadowRoot;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\modifiers\applyStyles.js
// This modifier takes the styles prepared by the `computeStyles` modifier
// and applies them to the HTMLElements such as popper and arrow
function applyStyles(_ref) {
var state = _ref.state;
Object.keys(state.elements).forEach(function (name) {
var style = state.styles[name] || {};
var attributes = state.attributes[name] || {};
var element = state.elements[name]; // arrow is optional + virtual elements
if (!isHTMLElement(element) || !getNodeName(element)) {
return;
} // Flow doesn't support to extend this property, but it's the most
// effective way to apply styles to an HTMLElement
// $FlowFixMe[cannot-write]
Object.assign(element.style, style);
Object.keys(attributes).forEach(function (name) {
var value = attributes[name];
if (value === false) {
element.removeAttribute(name);
} else {
element.setAttribute(name, value === true ? '' : value);
}
});
});
}
function effect(_ref2) {
var state = _ref2.state;
var initialStyles = {
popper: {
position: state.options.strategy,
left: '0',
top: '0',
margin: '0'
},
arrow: {
position: 'absolute'
},
reference: {}
};
Object.assign(state.elements.popper.style, initialStyles.popper);
state.styles = initialStyles;
if (state.elements.arrow) {
Object.assign(state.elements.arrow.style, initialStyles.arrow);
}
return function () {
Object.keys(state.elements).forEach(function (name) {
var element = state.elements[name];
var attributes = state.attributes[name] || {};
var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
var style = styleProperties.reduce(function (style, property) {
style[property] = '';
return style;
}, {}); // arrow is optional + virtual elements
if (!isHTMLElement(element) || !getNodeName(element)) {
return;
}
Object.assign(element.style, style);
Object.keys(attributes).forEach(function (attribute) {
element.removeAttribute(attribute);
});
});
};
} // eslint-disable-next-line import/no-unused-modules
/* harmony default export */ const PRPU_node_modules_popperjs_core_lib_modifiers_applyStyles = ({
name: 'applyStyles',
enabled: true,
phase: 'write',
fn: applyStyles,
effect: effect,
requires: ['computeStyles']
});
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\getBasePlacement.js
function getBasePlacement(placement) {
return placement.split('-')[0];
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getBoundingClientRect.js
function getBoundingClientRect(element) {
var rect = element.getBoundingClientRect();
return {
width: rect.width,
height: rect.height,
top: rect.top,
right: rect.right,
bottom: rect.bottom,
left: rect.left,
x: rect.left,
y: rect.top
};
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getLayoutRect.js
// Returns the layout rect of an element relative to its offsetParent. Layout
// means it doesn't take into account transforms.
function getLayoutRect(element) {
var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
// Fixes https://github.com/popperjs/popper-core/issues/1223
var width = element.offsetWidth;
var height = element.offsetHeight;
if (Math.abs(clientRect.width - width) <= 1) {
width = clientRect.width;
}
if (Math.abs(clientRect.height - height) <= 1) {
height = clientRect.height;
}
return {
x: element.offsetLeft,
y: element.offsetTop,
width: width,
height: height
};
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\contains.js
function contains(parent, child) {
var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
if (parent.contains(child)) {
return true;
} // then fallback to custom implementation with Shadow DOM support
else if (rootNode && isShadowRoot(rootNode)) {
var next = child;
do {
if (next && parent.isSameNode(next)) {
return true;
} // $FlowFixMe[prop-missing]: need a better way to handle this...
next = next.parentNode || next.host;
} while (next);
} // Give up, the result is false
return false;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getComputedStyle.js
function getComputedStyle(element) {
return getWindow(element).getComputedStyle(element);
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\isTableElement.js
function isTableElement(element) {
return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getDocumentElement.js
function getDocumentElement(element) {
// $FlowFixMe[incompatible-return]: assume body is always available
return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
element.document) || window.document).documentElement;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getParentNode.js
function getParentNode(element) {
if (getNodeName(element) === 'html') {
return element;
}
return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
// $FlowFixMe[incompatible-return]
// $FlowFixMe[prop-missing]
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
element.parentNode || ( // DOM Element detected
isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
getDocumentElement(element) // fallback
);
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getOffsetParent.js
function getTrueOffsetParent(element) {
if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
getComputedStyle(element).position === 'fixed') {
return null;
}
return element.offsetParent;
} // `.offsetParent` reports `null` for fixed elements, while absolute elements
// return the containing block
function getContainingBlock(element) {
var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
var isIE = navigator.userAgent.indexOf('Trident') !== -1;
if (isIE && isHTMLElement(element)) {
// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
var elementCss = getComputedStyle(element);
if (elementCss.position === 'fixed') {
return null;
}
}
var currentNode = getParentNode(element);
while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
// create a containing block.
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
return currentNode;
} else {
currentNode = currentNode.parentNode;
}
}
return null;
} // Gets the closest ancestor positioned element. Handles some edge cases,
// such as table ancestors and cross browser bugs.
function getOffsetParent(element) {
var window = getWindow(element);
var offsetParent = getTrueOffsetParent(element);
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
offsetParent = getTrueOffsetParent(offsetParent);
}
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {
return window;
}
return offsetParent || getContainingBlock(element) || window;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\getMainAxisFromPlacement.js
function getMainAxisFromPlacement(placement) {
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\math.js
var PRPU_node_modules_popperjs_core_lib_utils_math_max = Math.max;
var PRPU_node_modules_popperjs_core_lib_utils_math_min = Math.min;
var round = Math.round;
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\within.js
function within(min, value, max) {
return PRPU_node_modules_popperjs_core_lib_utils_math_max(min, PRPU_node_modules_popperjs_core_lib_utils_math_min(value, max));
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\getFreshSideObject.js
function getFreshSideObject() {
return {
top: 0,
right: 0,
bottom: 0,
left: 0
};
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\mergePaddingObject.js
function mergePaddingObject(paddingObject) {
return Object.assign({}, getFreshSideObject(), paddingObject);
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\expandToHashMap.js
function expandToHashMap(value, keys) {
return keys.reduce(function (hashMap, key) {
hashMap[key] = value;
return hashMap;
}, {});
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\modifiers\arrow.js
// eslint-disable-next-line import/no-unused-modules
var toPaddingObject = function toPaddingObject(padding, state) {
padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
placement: state.placement
})) : padding;
return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
};
function arrow(_ref) {
var _state$modifiersData$;
var state = _ref.state,
name = _ref.name,
options = _ref.options;
var arrowElement = state.elements.arrow;
var popperOffsets = state.modifiersData.popperOffsets;
var basePlacement = getBasePlacement(state.placement);
var axis = getMainAxisFromPlacement(basePlacement);
var isVertical = [left, right].indexOf(basePlacement) >= 0;
var len = isVertical ? 'height' : 'width';
if (!arrowElement || !popperOffsets) {
return;
}
var paddingObject = toPaddingObject(options.padding, state);
var arrowRect = getLayoutRect(arrowElement);
var minProp = axis === 'y' ? PRPU_node_modules_popperjs_core_lib_enums_top : left;
var maxProp = axis === 'y' ? bottom : right;
var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
var startDiff = popperOffsets[axis] - state.rects.reference[axis];
var arrowOffsetParent = getOffsetParent(arrowElement);
var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
// outside of the popper bounds
var min = paddingObject[minProp];
var max = clientSize - arrowRect[len] - paddingObject[maxProp];
var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
var offset = within(min, center, max); // Prevents breaking syntax highlighting...
var axisProp = axis;
state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
}
function PRPU_node_modules_popperjs_core_lib_modifiers_arrow_effect(_ref2) {
var state = _ref2.state,
options = _ref2.options;
var _options$element = options.element,
arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
if (arrowElement == null) {
return;
} // CSS selector
if (typeof arrowElement === 'string') {
arrowElement = state.elements.popper.querySelector(arrowElement);
if (!arrowElement) {
return;
}
}
if (false) {}
if (!contains(state.elements.popper, arrowElement)) {
if (false) {}
return;
}
state.elements.arrow = arrowElement;
} // eslint-disable-next-line import/no-unused-modules
/* harmony default export */ const PRPU_node_modules_popperjs_core_lib_modifiers_arrow = ({
name: 'arrow',
enabled: true,
phase: 'main',
fn: arrow,
effect: PRPU_node_modules_popperjs_core_lib_modifiers_arrow_effect,
requires: ['popperOffsets'],
requiresIfExists: ['preventOverflow']
});
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\modifiers\computeStyles.js
// eslint-disable-next-line import/no-unused-modules
var unsetSides = {
top: 'auto',
right: 'auto',
bottom: 'auto',
left: 'auto'
}; // Round the offsets to the nearest suitable subpixel based on the DPR.
// Zooming can change the DPR, but it seems to report a value that will
// cleanly divide the values into the appropriate subpixels.
function roundOffsetsByDPR(_ref) {
var x = _ref.x,
y = _ref.y;
var win = window;
var dpr = win.devicePixelRatio || 1;
return {
x: round(round(x * dpr) / dpr) || 0,
y: round(round(y * dpr) / dpr) || 0
};
}
function mapToStyles(_ref2) {
var _Object$assign2;
var popper = _ref2.popper,
popperRect = _ref2.popperRect,
placement = _ref2.placement,
offsets = _ref2.offsets,
position = _ref2.position,
gpuAcceleration = _ref2.gpuAcceleration,
adaptive = _ref2.adaptive,
roundOffsets = _ref2.roundOffsets;
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
_ref3$x = _ref3.x,
x = _ref3$x === void 0 ? 0 : _ref3$x,
_ref3$y = _ref3.y,
y = _ref3$y === void 0 ? 0 : _ref3$y;
var hasX = offsets.hasOwnProperty('x');
var hasY = offsets.hasOwnProperty('y');
var sideX = left;
var sideY = PRPU_node_modules_popperjs_core_lib_enums_top;
var win = window;
if (adaptive) {
var offsetParent = getOffsetParent(popper);
var heightProp = 'clientHeight';
var widthProp = 'clientWidth';
if (offsetParent === getWindow(popper)) {
offsetParent = getDocumentElement(popper);
if (getComputedStyle(offsetParent).position !== 'static') {
heightProp = 'scrollHeight';
widthProp = 'scrollWidth';
}
} // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
offsetParent = offsetParent;
if (placement === PRPU_node_modules_popperjs_core_lib_enums_top) {
sideY = bottom; // $FlowFixMe[prop-missing]
y -= offsetParent[heightProp] - popperRect.height;
y *= gpuAcceleration ? 1 : -1;
}
if (placement === left) {
sideX = right; // $FlowFixMe[prop-missing]
x -= offsetParent[widthProp] - popperRect.width;
x *= gpuAcceleration ? 1 : -1;
}
}
var commonStyles = Object.assign({
position: position
}, adaptive && unsetSides);
if (gpuAcceleration) {
var _Object$assign;
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
}
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
}
function computeStyles(_ref4) {
var state = _ref4.state,
options = _ref4.options;
var _options$gpuAccelerat = options.gpuAcceleration,
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
_options$adaptive = options.adaptive,
adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
_options$roundOffsets = options.roundOffsets,
roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
if (false) { var transitionProperty; }
var commonStyles = {
placement: getBasePlacement(state.placement),
popper: state.elements.popper,
popperRect: state.rects.popper,
gpuAcceleration: gpuAcceleration
};
if (state.modifiersData.popperOffsets != null) {
state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
offsets: state.modifiersData.popperOffsets,
position: state.options.strategy,
adaptive: adaptive,
roundOffsets: roundOffsets
})));
}
if (state.modifiersData.arrow != null) {
state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
offsets: state.modifiersData.arrow,
position: 'absolute',
adaptive: false,
roundOffsets: roundOffsets
})));
}
state.attributes.popper = Object.assign({}, state.attributes.popper, {
'data-popper-placement': state.placement
});
} // eslint-disable-next-line import/no-unused-modules
/* harmony default export */ const PRPU_node_modules_popperjs_core_lib_modifiers_computeStyles = ({
name: 'computeStyles',
enabled: true,
phase: 'beforeWrite',
fn: computeStyles,
data: {}
});
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\modifiers\eventListeners.js
// eslint-disable-next-line import/no-unused-modules
var passive = {
passive: true
};
function PRPU_node_modules_popperjs_core_lib_modifiers_eventListeners_effect(_ref) {
var state = _ref.state,
instance = _ref.instance,
options = _ref.options;
var _options$scroll = options.scroll,
scroll = _options$scroll === void 0 ? true : _options$scroll,
_options$resize = options.resize,
resize = _options$resize === void 0 ? true : _options$resize;
var window = getWindow(state.elements.popper);
var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
if (scroll) {
scrollParents.forEach(function (scrollParent) {
scrollParent.addEventListener('scroll', instance.update, passive);
});
}
if (resize) {
window.addEventListener('resize', instance.update, passive);
}
return function () {
if (scroll) {
scrollParents.forEach(function (scrollParent) {
scrollParent.removeEventListener('scroll', instance.update, passive);
});
}
if (resize) {
window.removeEventListener('resize', instance.update, passive);
}
};
} // eslint-disable-next-line import/no-unused-modules
/* harmony default export */ const PRPU_node_modules_popperjs_core_lib_modifiers_eventListeners = ({
name: 'eventListeners',
enabled: true,
phase: 'write',
fn: function fn() {},
effect: PRPU_node_modules_popperjs_core_lib_modifiers_eventListeners_effect,
data: {}
});
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\getOppositePlacement.js
var hash = {
left: 'right',
right: 'left',
bottom: 'top',
top: 'bottom'
};
function getOppositePlacement(placement) {
return placement.replace(/left|right|bottom|top/g, function (matched) {
return hash[matched];
});
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\getOppositeVariationPlacement.js
var PRPU_node_modules_popperjs_core_lib_utils_getOppositeVariationPlacement_hash = {
start: 'end',
end: 'start'
};
function getOppositeVariationPlacement(placement) {
return placement.replace(/start|end/g, function (matched) {
return PRPU_node_modules_popperjs_core_lib_utils_getOppositeVariationPlacement_hash[matched];
});
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getWindowScroll.js
function getWindowScroll(node) {
var win = getWindow(node);
var scrollLeft = win.pageXOffset;
var scrollTop = win.pageYOffset;
return {
scrollLeft: scrollLeft,
scrollTop: scrollTop
};
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getWindowScrollBarX.js
function getWindowScrollBarX(element) {
// If <html> has a CSS width greater than the viewport, then this will be
// incorrect for RTL.
// Popper 1 is broken in this case and never had a bug report so let's assume
// it's not an issue. I don't think anyone ever specifies width on <html>
// anyway.
// Browsers where the left scrollbar doesn't cause an issue report `0` for
// this (e.g. Edge 2019, IE11, Safari)
return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getViewportRect.js
function getViewportRect(element) {
var win = getWindow(element);
var html = getDocumentElement(element);
var visualViewport = win.visualViewport;
var width = html.clientWidth;
var height = html.clientHeight;
var x = 0;
var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
// can be obscured underneath it.
// Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
// if it isn't open, so if this isn't available, the popper will be detected
// to overflow the bottom of the screen too early.
if (visualViewport) {
width = visualViewport.width;
height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
// In Chrome, it returns a value very close to 0 (+/-) but contains rounding
// errors due to floating point numbers, so we need to check precision.
// Safari returns a number <= 0, usually < -1 when pinch-zoomed
// Feature detection fails in mobile emulation mode in Chrome.
// Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
// 0.001
// Fallback here: "Not Safari" userAgent
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
x = visualViewport.offsetLeft;
y = visualViewport.offsetTop;
}
}
return {
width: width,
height: height,
x: x + getWindowScrollBarX(element),
y: y
};
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getDocumentRect.js
// Gets the entire size of the scrollable document area, even extending outside
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
function getDocumentRect(element) {
var _element$ownerDocumen;
var html = getDocumentElement(element);
var winScroll = getWindowScroll(element);
var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
var width = PRPU_node_modules_popperjs_core_lib_utils_math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
var height = PRPU_node_modules_popperjs_core_lib_utils_math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
var y = -winScroll.scrollTop;
if (getComputedStyle(body || html).direction === 'rtl') {
x += PRPU_node_modules_popperjs_core_lib_utils_math_max(html.clientWidth, body ? body.clientWidth : 0) - width;
}
return {
width: width,
height: height,
x: x,
y: y
};
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\isScrollParent.js
function isScrollParent(element) {
// Firefox wants us to check `-x` and `-y` variations as well
var _getComputedStyle = getComputedStyle(element),
overflow = _getComputedStyle.overflow,
overflowX = _getComputedStyle.overflowX,
overflowY = _getComputedStyle.overflowY;
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getScrollParent.js
function getScrollParent(node) {
if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
// $FlowFixMe[incompatible-return]: assume body is always available
return node.ownerDocument.body;
}
if (isHTMLElement(node) && isScrollParent(node)) {
return node;
}
return getScrollParent(getParentNode(node));
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\listScrollParents.js
/*
given a DOM element, return the list of all scroll parents, up the list of ancesors
until we get to the top window object. This list is what we attach scroll listeners
to, because if any of these parent elements scroll, we'll need to re-calculate the
reference element's position.
*/
function listScrollParents(element, list) {
var _element$ownerDocumen;
if (list === void 0) {
list = [];
}
var scrollParent = getScrollParent(element);
var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
var win = getWindow(scrollParent);
var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
var updatedList = list.concat(target);
return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
updatedList.concat(listScrollParents(getParentNode(target)));
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\rectToClientRect.js
function rectToClientRect(rect) {
return Object.assign({}, rect, {
left: rect.x,
top: rect.y,
right: rect.x + rect.width,
bottom: rect.y + rect.height
});
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getClippingRect.js
function getInnerBoundingClientRect(element) {
var rect = getBoundingClientRect(element);
rect.top = rect.top + element.clientTop;
rect.left = rect.left + element.clientLeft;
rect.bottom = rect.top + element.clientHeight;
rect.right = rect.left + element.clientWidth;
rect.width = element.clientWidth;
rect.height = element.clientHeight;
rect.x = rect.left;
rect.y = rect.top;
return rect;
}
function getClientRectFromMixedType(element, clippingParent) {
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
} // A "clipping parent" is an overflowable container with the characteristic of
// clipping (or hiding) overflowing elements with a position different from
// `initial`
function getClippingParents(element) {
var clippingParents = listScrollParents(getParentNode(element));
var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
if (!isElement(clipperElement)) {
return [];
} // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
return clippingParents.filter(function (clippingParent) {
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
});
} // Gets the maximum area that the element is visible in due to any number of
// clipping parents
function getClippingRect(element, boundary, rootBoundary) {
var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
var firstClippingParent = clippingParents[0];
var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
var rect = getClientRectFromMixedType(element, clippingParent);
accRect.top = PRPU_node_modules_popperjs_core_lib_utils_math_max(rect.top, accRect.top);
accRect.right = PRPU_node_modules_popperjs_core_lib_utils_math_min(rect.right, accRect.right);
accRect.bottom = PRPU_node_modules_popperjs_core_lib_utils_math_min(rect.bottom, accRect.bottom);
accRect.left = PRPU_node_modules_popperjs_core_lib_utils_math_max(rect.left, accRect.left);
return accRect;
}, getClientRectFromMixedType(element, firstClippingParent));
clippingRect.width = clippingRect.right - clippingRect.left;
clippingRect.height = clippingRect.bottom - clippingRect.top;
clippingRect.x = clippingRect.left;
clippingRect.y = clippingRect.top;
return clippingRect;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\getVariation.js
function getVariation(placement) {
return placement.split('-')[1];
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\computeOffsets.js
function computeOffsets(_ref) {
var reference = _ref.reference,
element = _ref.element,
placement = _ref.placement;
var basePlacement = placement ? getBasePlacement(placement) : null;
var variation = placement ? getVariation(placement) : null;
var commonX = reference.x + reference.width / 2 - element.width / 2;
var commonY = reference.y + reference.height / 2 - element.height / 2;
var offsets;
switch (basePlacement) {
case PRPU_node_modules_popperjs_core_lib_enums_top:
offsets = {
x: commonX,
y: reference.y - element.height
};
break;
case bottom:
offsets = {
x: commonX,
y: reference.y + reference.height
};
break;
case right:
offsets = {
x: reference.x + reference.width,
y: commonY
};
break;
case left:
offsets = {
x: reference.x - element.width,
y: commonY
};
break;
default:
offsets = {
x: reference.x,
y: reference.y
};
}
var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
if (mainAxis != null) {
var len = mainAxis === 'y' ? 'height' : 'width';
switch (variation) {
case start:
offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
break;
case end:
offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
break;
default:
}
}
return offsets;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\detectOverflow.js
// eslint-disable-next-line import/no-unused-modules
function detectOverflow(state, options) {
if (options === void 0) {
options = {};
}
var _options = options,
_options$placement = _options.placement,
placement = _options$placement === void 0 ? state.placement : _options$placement,
_options$boundary = _options.boundary,
boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
_options$rootBoundary = _options.rootBoundary,
rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
_options$elementConte = _options.elementContext,
elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
_options$altBoundary = _options.altBoundary,
altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
_options$padding = _options.padding,
padding = _options$padding === void 0 ? 0 : _options$padding;
var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
var altContext = elementContext === popper ? reference : popper;
var referenceElement = state.elements.reference;
var popperRect = state.rects.popper;
var element = state.elements[altBoundary ? altContext : elementContext];
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
var referenceClientRect = getBoundingClientRect(referenceElement);
var popperOffsets = computeOffsets({
reference: referenceClientRect,
element: popperRect,
strategy: 'absolute',
placement: placement
});
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
// 0 or negative = within the clipping rect
var overflowOffsets = {
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
};
var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
if (elementContext === popper && offsetData) {
var offset = offsetData[placement];
Object.keys(overflowOffsets).forEach(function (key) {
var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
var axis = [PRPU_node_modules_popperjs_core_lib_enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
overflowOffsets[key] += offset[axis] * multiply;
});
}
return overflowOffsets;
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\computeAutoPlacement.js
function computeAutoPlacement(state, options) {
if (options === void 0) {
options = {};
}
var _options = options,
placement = _options.placement,
boundary = _options.boundary,
rootBoundary = _options.rootBoundary,
padding = _options.padding,
flipVariations = _options.flipVariations,
_options$allowedAutoP = _options.allowedAutoPlacements,
allowedAutoPlacements = _options$allowedAutoP === void 0 ? PRPU_node_modules_popperjs_core_lib_enums_placements : _options$allowedAutoP;
var variation = getVariation(placement);
var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
return getVariation(placement) === variation;
}) : basePlacements;
var allowedPlacements = placements.filter(function (placement) {
return allowedAutoPlacements.indexOf(placement) >= 0;
});
if (allowedPlacements.length === 0) {
allowedPlacements = placements;
if (false) {}
} // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
var overflows = allowedPlacements.reduce(function (acc, placement) {
acc[placement] = detectOverflow(state, {
placement: placement,
boundary: boundary,
rootBoundary: rootBoundary,
padding: padding
})[getBasePlacement(placement)];
return acc;
}, {});
return Object.keys(overflows).sort(function (a, b) {
return overflows[a] - overflows[b];
});
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\modifiers\flip.js
// eslint-disable-next-line import/no-unused-modules
function getExpandedFallbackPlacements(placement) {
if (getBasePlacement(placement) === auto) {
return [];
}
var oppositePlacement = getOppositePlacement(placement);
return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
}
function flip(_ref) {
var state = _ref.state,
options = _ref.options,
name = _ref.name;
if (state.modifiersData[name]._skip) {
return;
}
var _options$mainAxis = options.mainAxis,
checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
_options$altAxis = options.altAxis,
checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
specifiedFallbackPlacements = options.fallbackPlacements,
padding = options.padding,
boundary = options.boundary,
rootBoundary = options.rootBoundary,
altBoundary = options.altBoundary,
_options$flipVariatio = options.flipVariations,
flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
allowedAutoPlacements = options.allowedAutoPlacements;
var preferredPlacement = state.options.placement;
var basePlacement = getBasePlacement(preferredPlacement);
var isBasePlacement = basePlacement === preferredPlacement;
var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
placement: placement,
boundary: boundary,
rootBoundary: rootBoundary,
padding: padding,
flipVariations: flipVariations,
allowedAutoPlacements: allowedAutoPlacements
}) : placement);
}, []);
var referenceRect = state.rects.reference;
var popperRect = state.rects.popper;
var checksMap = new Map();
var makeFallbackChecks = true;
var firstFittingPlacement = placements[0];
for (var i = 0; i < placements.length; i++) {
var placement = placements[i];
var _basePlacement = getBasePlacement(placement);
var isStartVariation = getVariation(placement) === start;
var isVertical = [PRPU_node_modules_popperjs_core_lib_enums_top, bottom].indexOf(_basePlacement) >= 0;
var len = isVertical ? 'width' : 'height';
var overflow = detectOverflow(state, {
placement: placement,
boundary: boundary,
rootBoundary: rootBoundary,
altBoundary: altBoundary,
padding: padding
});
var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : PRPU_node_modules_popperjs_core_lib_enums_top;
if (referenceRect[len] > popperRect[len]) {
mainVariationSide = getOppositePlacement(mainVariationSide);
}
var altVariationSide = getOppositePlacement(mainVariationSide);
var checks = [];
if (checkMainAxis) {
checks.push(overflow[_basePlacement] <= 0);
}
if (checkAltAxis) {
checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
}
if (checks.every(function (check) {
return check;
})) {
firstFittingPlacement = placement;
makeFallbackChecks = false;
break;
}
checksMap.set(placement, checks);
}
if (makeFallbackChecks) {
// `2` may be desired in some cases – research later
var numberOfChecks = flipVariations ? 3 : 1;
var _loop = function _loop(_i) {
var fittingPlacement = placements.find(function (placement) {
var checks = checksMap.get(placement);
if (checks) {
return checks.slice(0, _i).every(function (check) {
return check;
});
}
});
if (fittingPlacement) {
firstFittingPlacement = fittingPlacement;
return "break";
}
};
for (var _i = numberOfChecks; _i > 0; _i--) {
var _ret = _loop(_i);
if (_ret === "break") break;
}
}
if (state.placement !== firstFittingPlacement) {
state.modifiersData[name]._skip = true;
state.placement = firstFittingPlacement;
state.reset = true;
}
} // eslint-disable-next-line import/no-unused-modules
/* harmony default export */ const PRPU_node_modules_popperjs_core_lib_modifiers_flip = ({
name: 'flip',
enabled: true,
phase: 'main',
fn: flip,
requiresIfExists: ['offset'],
data: {
_skip: false
}
});
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\modifiers\hide.js
function getSideOffsets(overflow, rect, preventedOffsets) {
if (preventedOffsets === void 0) {
preventedOffsets = {
x: 0,
y: 0
};
}
return {
top: overflow.top - rect.height - preventedOffsets.y,
right: overflow.right - rect.width + preventedOffsets.x,
bottom: overflow.bottom - rect.height + preventedOffsets.y,
left: overflow.left - rect.width - preventedOffsets.x
};
}
function isAnySideFullyClipped(overflow) {
return [PRPU_node_modules_popperjs_core_lib_enums_top, right, bottom, left].some(function (side) {
return overflow[side] >= 0;
});
}
function hide(_ref) {
var state = _ref.state,
name = _ref.name;
var referenceRect = state.rects.reference;
var popperRect = state.rects.popper;
var preventedOffsets = state.modifiersData.preventOverflow;
var referenceOverflow = detectOverflow(state, {
elementContext: 'reference'
});
var popperAltOverflow = detectOverflow(state, {
altBoundary: true
});
var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
state.modifiersData[name] = {
referenceClippingOffsets: referenceClippingOffsets,
popperEscapeOffsets: popperEscapeOffsets,
isReferenceHidden: isReferenceHidden,
hasPopperEscaped: hasPopperEscaped
};
state.attributes.popper = Object.assign({}, state.attributes.popper, {
'data-popper-reference-hidden': isReferenceHidden,
'data-popper-escaped': hasPopperEscaped
});
} // eslint-disable-next-line import/no-unused-modules
/* harmony default export */ const PRPU_node_modules_popperjs_core_lib_modifiers_hide = ({
name: 'hide',
enabled: true,
phase: 'main',
requiresIfExists: ['preventOverflow'],
fn: hide
});
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\modifiers\offset.js
function distanceAndSkiddingToXY(placement, rects, offset) {
var basePlacement = getBasePlacement(placement);
var invertDistance = [left, PRPU_node_modules_popperjs_core_lib_enums_top].indexOf(basePlacement) >= 0 ? -1 : 1;
var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
placement: placement
})) : offset,
skidding = _ref[0],
distance = _ref[1];
skidding = skidding || 0;
distance = (distance || 0) * invertDistance;
return [left, right].indexOf(basePlacement) >= 0 ? {
x: distance,
y: skidding
} : {
x: skidding,
y: distance
};
}
function offset(_ref2) {
var state = _ref2.state,
options = _ref2.options,
name = _ref2.name;
var _options$offset = options.offset,
offset = _options$offset === void 0 ? [0, 0] : _options$offset;
var data = PRPU_node_modules_popperjs_core_lib_enums_placements.reduce(function (acc, placement) {
acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
return acc;
}, {});
var _data$state$placement = data[state.placement],
x = _data$state$placement.x,
y = _data$state$placement.y;
if (state.modifiersData.popperOffsets != null) {
state.modifiersData.popperOffsets.x += x;
state.modifiersData.popperOffsets.y += y;
}
state.modifiersData[name] = data;
} // eslint-disable-next-line import/no-unused-modules
/* harmony default export */ const PRPU_node_modules_popperjs_core_lib_modifiers_offset = ({
name: 'offset',
enabled: true,
phase: 'main',
requires: ['popperOffsets'],
fn: offset
});
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\modifiers\popperOffsets.js
function popperOffsets(_ref) {
var state = _ref.state,
name = _ref.name;
// Offsets are the actual position the popper needs to have to be
// properly positioned near its reference element
// This is the most basic placement, and will be adjusted by
// the modifiers in the next step
state.modifiersData[name] = computeOffsets({
reference: state.rects.reference,
element: state.rects.popper,
strategy: 'absolute',
placement: state.placement
});
} // eslint-disable-next-line import/no-unused-modules
/* harmony default export */ const PRPU_node_modules_popperjs_core_lib_modifiers_popperOffsets = ({
name: 'popperOffsets',
enabled: true,
phase: 'read',
fn: popperOffsets,
data: {}
});
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\getAltAxis.js
function getAltAxis(axis) {
return axis === 'x' ? 'y' : 'x';
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\modifiers\preventOverflow.js
function preventOverflow(_ref) {
var state = _ref.state,
options = _ref.options,
name = _ref.name;
var _options$mainAxis = options.mainAxis,
checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
_options$altAxis = options.altAxis,
checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
boundary = options.boundary,
rootBoundary = options.rootBoundary,
altBoundary = options.altBoundary,
padding = options.padding,
_options$tether = options.tether,
tether = _options$tether === void 0 ? true : _options$tether,
_options$tetherOffset = options.tetherOffset,
tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
var overflow = detectOverflow(state, {
boundary: boundary,
rootBoundary: rootBoundary,
padding: padding,
altBoundary: altBoundary
});
var basePlacement = getBasePlacement(state.placement);
var variation = getVariation(state.placement);
var isBasePlacement = !variation;
var mainAxis = getMainAxisFromPlacement(basePlacement);
var altAxis = getAltAxis(mainAxis);
var popperOffsets = state.modifiersData.popperOffsets;
var referenceRect = state.rects.reference;
var popperRect = state.rects.popper;
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
placement: state.placement
})) : tetherOffset;
var data = {
x: 0,
y: 0
};
if (!popperOffsets) {
return;
}
if (checkMainAxis || checkAltAxis) {
var mainSide = mainAxis === 'y' ? PRPU_node_modules_popperjs_core_lib_enums_top : left;
var altSide = mainAxis === 'y' ? bottom : right;
var len = mainAxis === 'y' ? 'height' : 'width';
var offset = popperOffsets[mainAxis];
var min = popperOffsets[mainAxis] + overflow[mainSide];
var max = popperOffsets[mainAxis] - overflow[altSide];
var additive = tether ? -popperRect[len] / 2 : 0;
var minLen = variation === start ? referenceRect[len] : popperRect[len];
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
// outside the reference bounds
var arrowElement = state.elements.arrow;
var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
width: 0,
height: 0
};
var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
var arrowPaddingMin = arrowPaddingObject[mainSide];
var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
// to include its full size in the calculation. If the reference is small
// and near the edge of a boundary, the popper can overflow even if the
// reference is not overflowing as well (e.g. virtual elements with no
// width or height)
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
if (checkMainAxis) {
var preventedOffset = within(tether ? PRPU_node_modules_popperjs_core_lib_utils_math_min(min, tetherMin) : min, offset, tether ? PRPU_node_modules_popperjs_core_lib_utils_math_max(max, tetherMax) : max);
popperOffsets[mainAxis] = preventedOffset;
data[mainAxis] = preventedOffset - offset;
}
if (checkAltAxis) {
var _mainSide = mainAxis === 'x' ? PRPU_node_modules_popperjs_core_lib_enums_top : left;
var _altSide = mainAxis === 'x' ? bottom : right;
var _offset = popperOffsets[altAxis];
var _min = _offset + overflow[_mainSide];
var _max = _offset - overflow[_altSide];
var _preventedOffset = within(tether ? PRPU_node_modules_popperjs_core_lib_utils_math_min(_min, tetherMin) : _min, _offset, tether ? PRPU_node_modules_popperjs_core_lib_utils_math_max(_max, tetherMax) : _max);
popperOffsets[altAxis] = _preventedOffset;
data[altAxis] = _preventedOffset - _offset;
}
}
state.modifiersData[name] = data;
} // eslint-disable-next-line import/no-unused-modules
/* harmony default export */ const PRPU_node_modules_popperjs_core_lib_modifiers_preventOverflow = ({
name: 'preventOverflow',
enabled: true,
phase: 'main',
fn: preventOverflow,
requiresIfExists: ['offset']
});
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\modifiers\index.js
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getHTMLElementScroll.js
function getHTMLElementScroll(element) {
return {
scrollLeft: element.scrollLeft,
scrollTop: element.scrollTop
};
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getNodeScroll.js
function getNodeScroll(node) {
if (node === getWindow(node) || !isHTMLElement(node)) {
return getWindowScroll(node);
} else {
return getHTMLElementScroll(node);
}
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\dom-utils\getCompositeRect.js
// Returns the composite rect of an element relative to its offsetParent.
// Composite means it takes into account transforms as well as layout.
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
if (isFixed === void 0) {
isFixed = false;
}
var documentElement = getDocumentElement(offsetParent);
var rect = getBoundingClientRect(elementOrVirtualElement);
var isOffsetParentAnElement = isHTMLElement(offsetParent);
var scroll = {
scrollLeft: 0,
scrollTop: 0
};
var offsets = {
x: 0,
y: 0
};
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
isScrollParent(documentElement)) {
scroll = getNodeScroll(offsetParent);
}
if (isHTMLElement(offsetParent)) {
offsets = getBoundingClientRect(offsetParent);
offsets.x += offsetParent.clientLeft;
offsets.y += offsetParent.clientTop;
} else if (documentElement) {
offsets.x = getWindowScrollBarX(documentElement);
}
}
return {
x: rect.left + scroll.scrollLeft - offsets.x,
y: rect.top + scroll.scrollTop - offsets.y,
width: rect.width,
height: rect.height
};
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\orderModifiers.js
// source: https://stackoverflow.com/questions/49875255
function order(modifiers) {
var map = new Map();
var visited = new Set();
var result = [];
modifiers.forEach(function (modifier) {
map.set(modifier.name, modifier);
}); // On visiting object, check for its dependencies and visit them recursively
function sort(modifier) {
visited.add(modifier.name);
var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
requires.forEach(function (dep) {
if (!visited.has(dep)) {
var depModifier = map.get(dep);
if (depModifier) {
sort(depModifier);
}
}
});
result.push(modifier);
}
modifiers.forEach(function (modifier) {
if (!visited.has(modifier.name)) {
// check for visited object
sort(modifier);
}
});
return result;
}
function orderModifiers(modifiers) {
// order based on dependencies
var orderedModifiers = order(modifiers); // order based on phase
return modifierPhases.reduce(function (acc, phase) {
return acc.concat(orderedModifiers.filter(function (modifier) {
return modifier.phase === phase;
}));
}, []);
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\debounce.js
function debounce(fn) {
var pending;
return function () {
if (!pending) {
pending = new Promise(function (resolve) {
Promise.resolve().then(function () {
pending = undefined;
resolve(fn());
});
});
}
return pending;
};
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\utils\mergeByName.js
function mergeByName(modifiers) {
var merged = modifiers.reduce(function (merged, current) {
var existing = merged[current.name];
merged[current.name] = existing ? Object.assign({}, existing, current, {
options: Object.assign({}, existing.options, current.options),
data: Object.assign({}, existing.data, current.data)
}) : current;
return merged;
}, {}); // IE11 does not support Object.values
return Object.keys(merged).map(function (key) {
return merged[key];
});
}
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\createPopper.js
var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
var DEFAULT_OPTIONS = {
placement: 'bottom',
modifiers: [],
strategy: 'absolute'
};
function areValidElements() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return !args.some(function (element) {
return !(element && typeof element.getBoundingClientRect === 'function');
});
}
function popperGenerator(generatorOptions) {
if (generatorOptions === void 0) {
generatorOptions = {};
}
var _generatorOptions = generatorOptions,
_generatorOptions$def = _generatorOptions.defaultModifiers,
defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
_generatorOptions$def2 = _generatorOptions.defaultOptions,
defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
return function createPopper(reference, popper, options) {
if (options === void 0) {
options = defaultOptions;
}
var state = {
placement: 'bottom',
orderedModifiers: [],
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
modifiersData: {},
elements: {
reference: reference,
popper: popper
},
attributes: {},
styles: {}
};
var effectCleanupFns = [];
var isDestroyed = false;
var instance = {
state: state,
setOptions: function setOptions(options) {
cleanupModifierEffects();
state.options = Object.assign({}, defaultOptions, state.options, options);
state.scrollParents = {
reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
popper: listScrollParents(popper)
}; // Orders the modifiers based on their dependencies and `phase`
// properties
var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
state.orderedModifiers = orderedModifiers.filter(function (m) {
return m.enabled;
}); // Validate the provided modifiers so that the consumer will get warned
// if one of the modifiers is invalid for any reason
if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; }
runModifierEffects();
return instance.update();
},
// Sync update – it will always be executed, even if not necessary. This
// is useful for low frequency updates where sync behavior simplifies the
// logic.
// For high frequency updates (e.g. `resize` and `scroll` events), always
// prefer the async Popper#update method
forceUpdate: function forceUpdate() {
if (isDestroyed) {
return;
}
var _state$elements = state.elements,
reference = _state$elements.reference,
popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
// anymore
if (!areValidElements(reference, popper)) {
if (false) {}
return;
} // Store the reference and popper rects to be read by modifiers
state.rects = {
reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
popper: getLayoutRect(popper)
}; // Modifiers have the ability to reset the current update cycle. The
// most common use case for this is the `flip` modifier changing the
// placement, which then needs to re-run all the modifiers, because the
// logic was previously ran for the previous placement and is therefore
// stale/incorrect
state.reset = false;
state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
// is filled with the initial data specified by the modifier. This means
// it doesn't persist and is fresh on each update.
// To ensure persistent data, use `${name}#persistent`
state.orderedModifiers.forEach(function (modifier) {
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
});
var __debug_loops__ = 0;
for (var index = 0; index < state.orderedModifiers.length; index++) {
if (false) {}
if (state.reset === true) {
state.reset = false;
index = -1;
continue;
}
var _state$orderedModifie = state.orderedModifiers[index],
fn = _state$orderedModifie.fn,
_state$orderedModifie2 = _state$orderedModifie.options,
_options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
name = _state$orderedModifie.name;
if (typeof fn === 'function') {
state = fn({
state: state,
options: _options,
name: name,
instance: instance
}) || state;
}
}
},
// Async and optimistically optimized update – it will not be executed if
// not necessary (debounced to run at most once-per-tick)
update: debounce(function () {
return new Promise(function (resolve) {
instance.forceUpdate();
resolve(state);
});
}),
destroy: function destroy() {
cleanupModifierEffects();
isDestroyed = true;
}
};
if (!areValidElements(reference, popper)) {
if (false) {}
return instance;
}
instance.setOptions(options).then(function (state) {
if (!isDestroyed && options.onFirstUpdate) {
options.onFirstUpdate(state);
}
}); // Modifiers have the ability to execute arbitrary code before the first
// update cycle runs. They will be executed in the same order as the update
// cycle. This is useful when a modifier adds some persistent data that
// other modifiers need to use, but the modifier is run after the dependent
// one.
function runModifierEffects() {
state.orderedModifiers.forEach(function (_ref3) {
var name = _ref3.name,
_ref3$options = _ref3.options,
options = _ref3$options === void 0 ? {} : _ref3$options,
effect = _ref3.effect;
if (typeof effect === 'function') {
var cleanupFn = effect({
state: state,
name: name,
instance: instance,
options: options
});
var noopFn = function noopFn() {};
effectCleanupFns.push(cleanupFn || noopFn);
}
});
}
function cleanupModifierEffects() {
effectCleanupFns.forEach(function (fn) {
return fn();
});
effectCleanupFns = [];
}
return instance;
};
}
var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\popper.js
var defaultModifiers = [PRPU_node_modules_popperjs_core_lib_modifiers_eventListeners, PRPU_node_modules_popperjs_core_lib_modifiers_popperOffsets, PRPU_node_modules_popperjs_core_lib_modifiers_computeStyles, PRPU_node_modules_popperjs_core_lib_modifiers_applyStyles, PRPU_node_modules_popperjs_core_lib_modifiers_offset, PRPU_node_modules_popperjs_core_lib_modifiers_flip, PRPU_node_modules_popperjs_core_lib_modifiers_preventOverflow, PRPU_node_modules_popperjs_core_lib_modifiers_arrow, PRPU_node_modules_popperjs_core_lib_modifiers_hide];
var PRPU_node_modules_popperjs_core_lib_popper_createPopper = /*#__PURE__*/popperGenerator({
defaultModifiers: defaultModifiers
}); // eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\popper-lite.js
var PRPU_node_modules_popperjs_core_lib_popper_lite_defaultModifiers = [PRPU_node_modules_popperjs_core_lib_modifiers_eventListeners, PRPU_node_modules_popperjs_core_lib_modifiers_popperOffsets, PRPU_node_modules_popperjs_core_lib_modifiers_computeStyles, PRPU_node_modules_popperjs_core_lib_modifiers_applyStyles];
var PRPU_node_modules_popperjs_core_lib_popper_lite_createPopper = /*#__PURE__*/popperGenerator({
defaultModifiers: PRPU_node_modules_popperjs_core_lib_popper_lite_defaultModifiers
}); // eslint-disable-next-line import/no-unused-modules
;// CONCATENATED MODULE: PRPS\node_modules\@popperjs\core\lib\index.js
// eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules
/***/ }),
/***/ 856:
/***/ ((module) => {
"use strict";
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-arrow-return-left\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M14.5 1.5a.5.5 0 0 1 .5.5v4.8a2.5 2.5 0 0 1-2.5 2.5H2.707l3.347 3.346a.5.5 0 0 1-.708.708l-4.2-4.2a.5.5 0 0 1 0-.708l4-4a.5.5 0 1 1 .708.708L2.707 8.3H12.5A1.5 1.5 0 0 0 14 6.8V2a.5.5 0 0 1 .5-.5z\"/>\n</svg>";
/***/ }),
/***/ 376:
/***/ ((module) => {
"use strict";
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-code-slash\" viewBox=\"0 0 16 16\">\n <path d=\"M10.478 1.647a.5.5 0 1 0-.956-.294l-4 13a.5.5 0 0 0 .956.294l4-13zM4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0zm6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0z\"/>\n</svg>";
/***/ }),
/***/ 154:
/***/ ((module) => {
"use strict";
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-file-earmark-pdf\" viewBox=\"0 0 16 16\">\n <path d=\"M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z\"/>\n <path d=\"M4.603 14.087a.81.81 0 0 1-.438-.42c-.195-.388-.13-.776.08-1.102.198-.307.526-.568.897-.787a7.68 7.68 0 0 1 1.482-.645 19.697 19.697 0 0 0 1.062-2.227 7.269 7.269 0 0 1-.43-1.295c-.086-.4-.119-.796-.046-1.136.075-.354.274-.672.65-.823.192-.077.4-.12.602-.077a.7.7 0 0 1 .477.365c.088.164.12.356.127.538.007.188-.012.396-.047.614-.084.51-.27 1.134-.52 1.794a10.954 10.954 0 0 0 .98 1.686 5.753 5.753 0 0 1 1.334.05c.364.066.734.195.96.465.12.144.193.32.2.518.007.192-.047.382-.138.563a1.04 1.04 0 0 1-.354.416.856.856 0 0 1-.51.138c-.331-.014-.654-.196-.933-.417a5.712 5.712 0 0 1-.911-.95 11.651 11.651 0 0 0-1.997.406 11.307 11.307 0 0 1-1.02 1.51c-.292.35-.609.656-.927.787a.793.793 0 0 1-.58.029zm1.379-1.901c-.166.076-.32.156-.459.238-.328.194-.541.383-.647.547-.094.145-.096.25-.04.361.01.022.02.036.026.044a.266.266 0 0 0 .035-.012c.137-.056.355-.235.635-.572a8.18 8.18 0 0 0 .45-.606zm1.64-1.33a12.71 12.71 0 0 1 1.01-.193 11.744 11.744 0 0 1-.51-.858 20.801 20.801 0 0 1-.5 1.05zm2.446.45c.15.163.296.3.435.41.24.19.407.253.498.256a.107.107 0 0 0 .07-.015.307.307 0 0 0 .094-.125.436.436 0 0 0 .059-.2.095.095 0 0 0-.026-.063c-.052-.062-.2-.152-.518-.209a3.876 3.876 0 0 0-.612-.053zM8.078 7.8a6.7 6.7 0 0 0 .2-.828c.031-.188.043-.343.038-.465a.613.613 0 0 0-.032-.198.517.517 0 0 0-.145.04c-.087.035-.158.106-.196.283-.04.192-.03.469.046.822.024.111.054.227.09.346z\"/>\n</svg>";
/***/ }),
/***/ 984:
/***/ ((module) => {
"use strict";
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-gear-fill\" viewBox=\"0 0 16 16\">\n <path d=\"M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872l-.1-.34zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z\"/>\n</svg>";
/***/ }),
/***/ 739:
/***/ ((module) => {
"use strict";
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-github\" viewBox=\"0 0 16 16\">\n <path d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z\"/>\n</svg>";
/***/ }),
/***/ 185:
/***/ ((module) => {
"use strict";
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-house\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M2 13.5V7h1v6.5a.5.5 0 0 0 .5.5h9a.5.5 0 0 0 .5-.5V7h1v6.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 13.5zm11-11V6l-2-2V2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5z\"/>\n <path fill-rule=\"evenodd\" d=\"M7.293 1.5a1 1 0 0 1 1.414 0l6.647 6.646a.5.5 0 0 1-.708.708L8 2.207 1.354 8.854a.5.5 0 1 1-.708-.708L7.293 1.5z\"/>\n</svg>";
/***/ }),
/***/ 762:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
/*!
* Bootstrap base-component.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
true ? module.exports = factory(__webpack_require__(252), __webpack_require__(983), __webpack_require__(955)) :
0;
}(this, (function (Data, SelectorEngine, EventHandler) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const getTransitionDurationFromElement = element => {
if (!element) {
return 0;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj);
}
return null;
};
const execute = callback => {
if (typeof callback === 'function') {
callback();
}
};
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
if (!waitForTransition) {
execute(callback);
return;
}
const durationPadding = 5;
const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
let called = false;
const handler = ({
target
}) => {
if (target !== transitionElement) {
return;
}
called = true;
transitionElement.removeEventListener(TRANSITION_END, handler);
execute(callback);
};
transitionElement.addEventListener(TRANSITION_END, handler);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(transitionElement);
}
}, emulatedDuration);
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const VERSION = '5.0.2';
class BaseComponent {
constructor(element) {
element = getElement(element);
if (!element) {
return;
}
this._element = element;
Data__default['default'].set(this._element, this.constructor.DATA_KEY, this);
}
dispose() {
Data__default['default'].remove(this._element, this.constructor.DATA_KEY);
EventHandler__default['default'].off(this._element, this.constructor.EVENT_KEY);
Object.getOwnPropertyNames(this).forEach(propertyName => {
this[propertyName] = null;
});
}
_queueCallback(callback, element, isAnimated = true) {
executeAfterTransition(callback, element, isAnimated);
}
/** Static */
static getInstance(element) {
return Data__default['default'].get(element, this.DATA_KEY);
}
static getOrCreateInstance(element, config = {}) {
return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
}
static get VERSION() {
return VERSION;
}
static get NAME() {
throw new Error('You have to implement the static method "NAME", for each component!');
}
static get DATA_KEY() {
return `bs.${this.NAME}`;
}
static get EVENT_KEY() {
return `.${this.DATA_KEY}`;
}
}
return BaseComponent;
})));
//# sourceMappingURL=base-component.js.map
/***/ }),
/***/ 252:
/***/ (function(module) {
/*!
* Bootstrap data.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
true ? module.exports = factory() :
0;
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const elementMap = new Map();
var data = {
set(element, key, instance) {
if (!elementMap.has(element)) {
elementMap.set(element, new Map());
}
const instanceMap = elementMap.get(element); // make it clear we only want one instance per element
// can be removed later when multiple key/instances are fine to be used
if (!instanceMap.has(key) && instanceMap.size !== 0) {
// eslint-disable-next-line no-console
console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
return;
}
instanceMap.set(key, instance);
},
get(element, key) {
if (elementMap.has(element)) {
return elementMap.get(element).get(key) || null;
}
return null;
},
remove(element, key) {
if (!elementMap.has(element)) {
return;
}
const instanceMap = elementMap.get(element);
instanceMap.delete(key); // free up element references if there are no instances left for an element
if (instanceMap.size === 0) {
elementMap.delete(element);
}
}
};
return data;
})));
//# sourceMappingURL=data.js.map
/***/ }),
/***/ 955:
/***/ (function(module) {
/*!
* Bootstrap event-handler.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
true ? module.exports = factory() :
0;
}(this, (function () { 'use strict';
const getjQuery = () => {
const {
jQuery
} = window;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const namespaceRegex = /[^.]*(?=\..*)\.|.*/;
const stripNameRegex = /\..*/;
const stripUidRegex = /::\d+$/;
const eventRegistry = {}; // Events storage
let uidEvent = 1;
const customEvents = {
mouseenter: 'mouseover',
mouseleave: 'mouseout'
};
const customEventsRegex = /^(mouseenter|mouseleave)/i;
const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
/**
* ------------------------------------------------------------------------
* Private methods
* ------------------------------------------------------------------------
*/
function getUidEvent(element, uid) {
return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
}
function getEvent(element) {
const uid = getUidEvent(element);
element.uidEvent = uid;
eventRegistry[uid] = eventRegistry[uid] || {};
return eventRegistry[uid];
}
function bootstrapHandler(element, fn) {
return function handler(event) {
event.delegateTarget = element;
if (handler.oneOff) {
EventHandler.off(element, event.type, fn);
}
return fn.apply(element, [event]);
};
}
function bootstrapDelegationHandler(element, selector, fn) {
return function handler(event) {
const domElements = element.querySelectorAll(selector);
for (let {
target
} = event; target && target !== this; target = target.parentNode) {
for (let i = domElements.length; i--;) {
if (domElements[i] === target) {
event.delegateTarget = target;
if (handler.oneOff) {
// eslint-disable-next-line unicorn/consistent-destructuring
EventHandler.off(element, event.type, selector, fn);
}
return fn.apply(target, [event]);
}
}
} // To please ESLint
return null;
};
}
function findHandler(events, handler, delegationSelector = null) {
const uidEventList = Object.keys(events);
for (let i = 0, len = uidEventList.length; i < len; i++) {
const event = events[uidEventList[i]];
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
return event;
}
}
return null;
}
function normalizeParams(originalTypeEvent, handler, delegationFn) {
const delegation = typeof handler === 'string';
const originalHandler = delegation ? delegationFn : handler;
let typeEvent = getTypeEvent(originalTypeEvent);
const isNative = nativeEvents.has(typeEvent);
if (!isNative) {
typeEvent = originalTypeEvent;
}
return [delegation, originalHandler, typeEvent];
}
function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
if (typeof originalTypeEvent !== 'string' || !element) {
return;
}
if (!handler) {
handler = delegationFn;
delegationFn = null;
} // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
// this prevents the handler from being dispatched the same way as mouseover or mouseout does
if (customEventsRegex.test(originalTypeEvent)) {
const wrapFn = fn => {
return function (event) {
if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {
return fn.call(this, event);
}
};
};
if (delegationFn) {
delegationFn = wrapFn(delegationFn);
} else {
handler = wrapFn(handler);
}
}
const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
const events = getEvent(element);
const handlers = events[typeEvent] || (events[typeEvent] = {});
const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
if (previousFn) {
previousFn.oneOff = previousFn.oneOff && oneOff;
return;
}
const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
fn.delegationSelector = delegation ? handler : null;
fn.originalHandler = originalHandler;
fn.oneOff = oneOff;
fn.uidEvent = uid;
handlers[uid] = fn;
element.addEventListener(typeEvent, fn, delegation);
}
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
const fn = findHandler(events[typeEvent], handler, delegationSelector);
if (!fn) {
return;
}
element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
delete events[typeEvent][fn.uidEvent];
}
function removeNamespacedHandlers(element, events, typeEvent, namespace) {
const storeElementEvent = events[typeEvent] || {};
Object.keys(storeElementEvent).forEach(handlerKey => {
if (handlerKey.includes(namespace)) {
const event = storeElementEvent[handlerKey];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}
});
}
function getTypeEvent(event) {
// allow to get the native events from namespaced events ('click.bs.button' --> 'click')
event = event.replace(stripNameRegex, '');
return customEvents[event] || event;
}
const EventHandler = {
on(element, event, handler, delegationFn) {
addHandler(element, event, handler, delegationFn, false);
},
one(element, event, handler, delegationFn) {
addHandler(element, event, handler, delegationFn, true);
},
off(element, originalTypeEvent, handler, delegationFn) {
if (typeof originalTypeEvent !== 'string' || !element) {
return;
}
const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
const inNamespace = typeEvent !== originalTypeEvent;
const events = getEvent(element);
const isNamespace = originalTypeEvent.startsWith('.');
if (typeof originalHandler !== 'undefined') {
// Simplest case: handler is passed, remove that listener ONLY.
if (!events || !events[typeEvent]) {
return;
}
removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
return;
}
if (isNamespace) {
Object.keys(events).forEach(elementEvent => {
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
});
}
const storeElementEvent = events[typeEvent] || {};
Object.keys(storeElementEvent).forEach(keyHandlers => {
const handlerKey = keyHandlers.replace(stripUidRegex, '');
if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
const event = storeElementEvent[keyHandlers];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}
});
},
trigger(element, event, args) {
if (typeof event !== 'string' || !element) {
return null;
}
const $ = getjQuery();
const typeEvent = getTypeEvent(event);
const inNamespace = event !== typeEvent;
const isNative = nativeEvents.has(typeEvent);
let jQueryEvent;
let bubbles = true;
let nativeDispatch = true;
let defaultPrevented = false;
let evt = null;
if (inNamespace && $) {
jQueryEvent = $.Event(event, args);
$(element).trigger(jQueryEvent);
bubbles = !jQueryEvent.isPropagationStopped();
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
defaultPrevented = jQueryEvent.isDefaultPrevented();
}
if (isNative) {
evt = document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true);
} else {
evt = new CustomEvent(event, {
bubbles,
cancelable: true
});
} // merge custom information in our event
if (typeof args !== 'undefined') {
Object.keys(args).forEach(key => {
Object.defineProperty(evt, key, {
get() {
return args[key];
}
});
});
}
if (defaultPrevented) {
evt.preventDefault();
}
if (nativeDispatch) {
element.dispatchEvent(evt);
}
if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
jQueryEvent.preventDefault();
}
return evt;
}
};
return EventHandler;
})));
//# sourceMappingURL=event-handler.js.map
/***/ }),
/***/ 301:
/***/ (function(module) {
/*!
* Bootstrap manipulator.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
true ? module.exports = factory() :
0;
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
function normalizeData(val) {
if (val === 'true') {
return true;
}
if (val === 'false') {
return false;
}
if (val === Number(val).toString()) {
return Number(val);
}
if (val === '' || val === 'null') {
return null;
}
return val;
}
function normalizeDataKey(key) {
return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);
}
const Manipulator = {
setDataAttribute(element, key, value) {
element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
},
removeDataAttribute(element, key) {
element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
},
getDataAttributes(element) {
if (!element) {
return {};
}
const attributes = {};
Object.keys(element.dataset).filter(key => key.startsWith('bs')).forEach(key => {
let pureKey = key.replace(/^bs/, '');
pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
attributes[pureKey] = normalizeData(element.dataset[key]);
});
return attributes;
},
getDataAttribute(element, key) {
return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
},
offset(element) {
const rect = element.getBoundingClientRect();
return {
top: rect.top + document.body.scrollTop,
left: rect.left + document.body.scrollLeft
};
},
position(element) {
return {
top: element.offsetTop,
left: element.offsetLeft
};
}
};
return Manipulator;
})));
//# sourceMappingURL=manipulator.js.map
/***/ }),
/***/ 983:
/***/ (function(module) {
/*!
* Bootstrap selector-engine.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
true ? module.exports = factory() :
0;
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
return SelectorEngine;
})));
//# sourceMappingURL=selector-engine.js.map
/***/ }),
/***/ 960:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
/*!
* Bootstrap popover.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
true ? module.exports = factory(__webpack_require__(983), __webpack_require__(632)) :
0;
}(this, (function (SelectorEngine, Tooltip) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
const getjQuery = () => {
const {
jQuery
} = window;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
};
const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => {
const $ = getjQuery();
/* istanbul ignore if */
if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin;
$.fn[name].noConflict = () => {
$.fn[name] = JQUERY_NO_CONFLICT;
return plugin.jQueryInterface;
};
}
});
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'popover';
const DATA_KEY = 'bs.popover';
const EVENT_KEY = `.${DATA_KEY}`;
const CLASS_PREFIX = 'bs-popover';
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
const Default = { ...Tooltip__default['default'].Default,
placement: 'right',
offset: [0, 8],
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
};
const DefaultType = { ...Tooltip__default['default'].DefaultType,
content: '(string|element|function)'
};
const Event = {
HIDE: `hide${EVENT_KEY}`,
HIDDEN: `hidden${EVENT_KEY}`,
SHOW: `show${EVENT_KEY}`,
SHOWN: `shown${EVENT_KEY}`,
INSERTED: `inserted${EVENT_KEY}`,
CLICK: `click${EVENT_KEY}`,
FOCUSIN: `focusin${EVENT_KEY}`,
FOCUSOUT: `focusout${EVENT_KEY}`,
MOUSEENTER: `mouseenter${EVENT_KEY}`,
MOUSELEAVE: `mouseleave${EVENT_KEY}`
};
const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_SHOW = 'show';
const SELECTOR_TITLE = '.popover-header';
const SELECTOR_CONTENT = '.popover-body';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
class Popover extends Tooltip__default['default'] {
// Getters
static get Default() {
return Default;
}
static get NAME() {
return NAME;
}
static get Event() {
return Event;
}
static get DefaultType() {
return DefaultType;
} // Overrides
isWithContent() {
return this.getTitle() || this._getContent();
}
getTipElement() {
if (this.tip) {
return this.tip;
}
this.tip = super.getTipElement();
if (!this.getTitle()) {
SelectorEngine__default['default'].findOne(SELECTOR_TITLE, this.tip).remove();
}
if (!this._getContent()) {
SelectorEngine__default['default'].findOne(SELECTOR_CONTENT, this.tip).remove();
}
return this.tip;
}
setContent() {
const tip = this.getTipElement(); // we use append for html objects to maintain js events
this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TITLE, tip), this.getTitle());
let content = this._getContent();
if (typeof content === 'function') {
content = content.call(this._element);
}
this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_CONTENT, tip), content);
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
} // Private
_addAttachmentClass(attachment) {
this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
}
_getContent() {
return this._element.getAttribute('data-bs-content') || this._config.content;
}
_cleanTipClass() {
const tip = this.getTipElement();
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
}
} // Static
static jQueryInterface(config) {
return this.each(function () {
const data = Popover.getOrCreateInstance(this, config);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`);
}
data[config]();
}
});
}
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .Popover to jQuery only if jQuery is present
*/
defineJQueryPlugin(Popover);
return Popover;
})));
//# sourceMappingURL=popover.js.map
/***/ }),
/***/ 632:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
/*!
* Bootstrap tooltip.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
true ? module.exports = factory(__webpack_require__(518), __webpack_require__(983), __webpack_require__(252), __webpack_require__(955), __webpack_require__(301), __webpack_require__(762)) :
0;
}(this, (function (Popper, SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () {
return e[k];
}
});
}
});
}
n['default'] = e;
return Object.freeze(n);
}
var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MAX_UID = 1000000;
const toType = obj => {
if (obj === null || obj === undefined) {
return `${obj}`;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
const getUID = prefix => {
do {
prefix += Math.floor(Math.random() * MAX_UID);
} while (document.getElementById(prefix));
return prefix;
};
const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj);
}
return null;
};
const typeCheckConfig = (componentName, config, configTypes) => {
Object.keys(configTypes).forEach(property => {
const expectedTypes = configTypes[property];
const value = config[property];
const valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
}
});
};
const findShadowRoot = element => {
if (!document.documentElement.attachShadow) {
return null;
} // Can find the shadow root otherwise it'll return the document
if (typeof element.getRootNode === 'function') {
const root = element.getRootNode();
return root instanceof ShadowRoot ? root : null;
}
if (element instanceof ShadowRoot) {
return element;
} // when we don't find a shadow root
if (!element.parentNode) {
return null;
}
return findShadowRoot(element.parentNode);
};
const noop = () => {};
const getjQuery = () => {
const {
jQuery
} = window;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
};
const isRTL = () => document.documentElement.dir === 'rtl';
const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => {
const $ = getjQuery();
/* istanbul ignore if */
if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin;
$.fn[name].noConflict = () => {
$.fn[name] = JQUERY_NO_CONFLICT;
return plugin.jQueryInterface;
};
}
});
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
const allowedAttribute = (attr, allowedAttributeList) => {
const attrName = attr.nodeName.toLowerCase();
if (allowedAttributeList.includes(attrName)) {
if (uriAttrs.has(attrName)) {
return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
}
return true;
}
const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp); // Check if a regular expression validates the attribute.
for (let i = 0, len = regExp.length; i < len; i++) {
if (regExp[i].test(attrName)) {
return true;
}
}
return false;
};
const DefaultAllowlist = {
// Global attributes allowed on any supplied element below.
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
a: ['target', 'href', 'title', 'rel'],
area: [],
b: [],
br: [],
col: [],
code: [],
div: [],
em: [],
hr: [],
h1: [],
h2: [],
h3: [],
h4: [],
h5: [],
h6: [],
i: [],
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
li: [],
ol: [],
p: [],
pre: [],
s: [],
small: [],
span: [],
sub: [],
sup: [],
strong: [],
u: [],
ul: []
};
function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
if (!unsafeHtml.length) {
return unsafeHtml;
}
if (sanitizeFn && typeof sanitizeFn === 'function') {
return sanitizeFn(unsafeHtml);
}
const domParser = new window.DOMParser();
const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
const allowlistKeys = Object.keys(allowList);
const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
for (let i = 0, len = elements.length; i < len; i++) {
const el = elements[i];
const elName = el.nodeName.toLowerCase();
if (!allowlistKeys.includes(elName)) {
el.remove();
continue;
}
const attributeList = [].concat(...el.attributes);
const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
attributeList.forEach(attr => {
if (!allowedAttribute(attr, allowedAttributes)) {
el.removeAttribute(attr.nodeName);
}
});
}
return createdDocument.body.innerHTML;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'tooltip';
const DATA_KEY = 'bs.tooltip';
const EVENT_KEY = `.${DATA_KEY}`;
const CLASS_PREFIX = 'bs-tooltip';
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
const DefaultType = {
animation: 'boolean',
template: 'string',
title: '(string|element|function)',
trigger: 'string',
delay: '(number|object)',
html: 'boolean',
selector: '(string|boolean)',
placement: '(string|function)',
offset: '(array|string|function)',
container: '(string|element|boolean)',
fallbackPlacements: 'array',
boundary: '(string|element)',
customClass: '(string|function)',
sanitize: 'boolean',
sanitizeFn: '(null|function)',
allowList: 'object',
popperConfig: '(null|object|function)'
};
const AttachmentMap = {
AUTO: 'auto',
TOP: 'top',
RIGHT: isRTL() ? 'left' : 'right',
BOTTOM: 'bottom',
LEFT: isRTL() ? 'right' : 'left'
};
const Default = {
animation: true,
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
trigger: 'hover focus',
title: '',
delay: 0,
html: false,
selector: false,
placement: 'top',
offset: [0, 0],
container: false,
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
boundary: 'clippingParents',
customClass: '',
sanitize: true,
sanitizeFn: null,
allowList: DefaultAllowlist,
popperConfig: null
};
const Event = {
HIDE: `hide${EVENT_KEY}`,
HIDDEN: `hidden${EVENT_KEY}`,
SHOW: `show${EVENT_KEY}`,
SHOWN: `shown${EVENT_KEY}`,
INSERTED: `inserted${EVENT_KEY}`,
CLICK: `click${EVENT_KEY}`,
FOCUSIN: `focusin${EVENT_KEY}`,
FOCUSOUT: `focusout${EVENT_KEY}`,
MOUSEENTER: `mouseenter${EVENT_KEY}`,
MOUSELEAVE: `mouseleave${EVENT_KEY}`
};
const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_MODAL = 'modal';
const CLASS_NAME_SHOW = 'show';
const HOVER_STATE_SHOW = 'show';
const HOVER_STATE_OUT = 'out';
const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
const TRIGGER_HOVER = 'hover';
const TRIGGER_FOCUS = 'focus';
const TRIGGER_CLICK = 'click';
const TRIGGER_MANUAL = 'manual';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
class Tooltip extends BaseComponent__default['default'] {
constructor(element, config) {
if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
}
super(element); // private
this._isEnabled = true;
this._timeout = 0;
this._hoverState = '';
this._activeTrigger = {};
this._popper = null; // Protected
this._config = this._getConfig(config);
this.tip = null;
this._setListeners();
} // Getters
static get Default() {
return Default;
}
static get NAME() {
return NAME;
}
static get Event() {
return Event;
}
static get DefaultType() {
return DefaultType;
} // Public
enable() {
this._isEnabled = true;
}
disable() {
this._isEnabled = false;
}
toggleEnabled() {
this._isEnabled = !this._isEnabled;
}
toggle(event) {
if (!this._isEnabled) {
return;
}
if (event) {
const context = this._initializeOnDelegatedTarget(event);
context._activeTrigger.click = !context._activeTrigger.click;
if (context._isWithActiveTrigger()) {
context._enter(null, context);
} else {
context._leave(null, context);
}
} else {
if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {
this._leave(null, this);
return;
}
this._enter(null, this);
}
}
dispose() {
clearTimeout(this._timeout);
EventHandler__default['default'].off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
if (this.tip) {
this.tip.remove();
}
if (this._popper) {
this._popper.destroy();
}
super.dispose();
}
show() {
if (this._element.style.display === 'none') {
throw new Error('Please use show on visible elements');
}
if (!(this.isWithContent() && this._isEnabled)) {
return;
}
const showEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOW);
const shadowRoot = findShadowRoot(this._element);
const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
if (showEvent.defaultPrevented || !isInTheDom) {
return;
}
const tip = this.getTipElement();
const tipId = getUID(this.constructor.NAME);
tip.setAttribute('id', tipId);
this._element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this._config.animation) {
tip.classList.add(CLASS_NAME_FADE);
}
const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
const attachment = this._getAttachment(placement);
this._addAttachmentClass(attachment);
const {
container
} = this._config;
Data__default['default'].set(tip, this.constructor.DATA_KEY, this);
if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
container.appendChild(tip);
EventHandler__default['default'].trigger(this._element, this.constructor.Event.INSERTED);
}
if (this._popper) {
this._popper.update();
} else {
this._popper = Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
}
tip.classList.add(CLASS_NAME_SHOW);
const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
if (customClass) {
tip.classList.add(...customClass.split(' '));
} // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement) {
[].concat(...document.body.children).forEach(element => {
EventHandler__default['default'].on(element, 'mouseover', noop);
});
}
const complete = () => {
const prevHoverState = this._hoverState;
this._hoverState = null;
EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOWN);
if (prevHoverState === HOVER_STATE_OUT) {
this._leave(null, this);
}
};
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE);
this._queueCallback(complete, this.tip, isAnimated);
}
hide() {
if (!this._popper) {
return;
}
const tip = this.getTipElement();
const complete = () => {
if (this._isWithActiveTrigger()) {
return;
}
if (this._hoverState !== HOVER_STATE_SHOW) {
tip.remove();
}
this._cleanTipClass();
this._element.removeAttribute('aria-describedby');
EventHandler__default['default'].trigger(this._element, this.constructor.Event.HIDDEN);
if (this._popper) {
this._popper.destroy();
this._popper = null;
}
};
const hideEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.HIDE);
if (hideEvent.defaultPrevented) {
return;
}
tip.classList.remove(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
[].concat(...document.body.children).forEach(element => EventHandler__default['default'].off(element, 'mouseover', noop));
}
this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false;
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE);
this._queueCallback(complete, this.tip, isAnimated);
this._hoverState = '';
}
update() {
if (this._popper !== null) {
this._popper.update();
}
} // Protected
isWithContent() {
return Boolean(this.getTitle());
}
getTipElement() {
if (this.tip) {
return this.tip;
}
const element = document.createElement('div');
element.innerHTML = this._config.template;
this.tip = element.children[0];
return this.tip;
}
setContent() {
const tip = this.getTipElement();
this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
}
setElementContent(element, content) {
if (element === null) {
return;
}
if (isElement(content)) {
content = getElement(content); // content is a DOM node or a jQuery
if (this._config.html) {
if (content.parentNode !== element) {
element.innerHTML = '';
element.appendChild(content);
}
} else {
element.textContent = content.textContent;
}
return;
}
if (this._config.html) {
if (this._config.sanitize) {
content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
}
element.innerHTML = content;
} else {
element.textContent = content;
}
}
getTitle() {
let title = this._element.getAttribute('data-bs-original-title');
if (!title) {
title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
}
return title;
}
updateAttachment(attachment) {
if (attachment === 'right') {
return 'end';
}
if (attachment === 'left') {
return 'start';
}
return attachment;
} // Private
_initializeOnDelegatedTarget(event, context) {
const dataKey = this.constructor.DATA_KEY;
context = context || Data__default['default'].get(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data__default['default'].set(event.delegateTarget, dataKey, context);
}
return context;
}
_getOffset() {
const {
offset
} = this._config;
if (typeof offset === 'string') {
return offset.split(',').map(val => Number.parseInt(val, 10));
}
if (typeof offset === 'function') {
return popperData => offset(popperData, this._element);
}
return offset;
}
_getPopperConfig(attachment) {
const defaultBsPopperConfig = {
placement: attachment,
modifiers: [{
name: 'flip',
options: {
fallbackPlacements: this._config.fallbackPlacements
}
}, {
name: 'offset',
options: {
offset: this._getOffset()
}
}, {
name: 'preventOverflow',
options: {
boundary: this._config.boundary
}
}, {
name: 'arrow',
options: {
element: `.${this.constructor.NAME}-arrow`
}
}, {
name: 'onChange',
enabled: true,
phase: 'afterWrite',
fn: data => this._handlePopperPlacementChange(data)
}],
onFirstUpdate: data => {
if (data.options.placement !== data.placement) {
this._handlePopperPlacementChange(data);
}
}
};
return { ...defaultBsPopperConfig,
...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
};
}
_addAttachmentClass(attachment) {
this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
}
_getAttachment(placement) {
return AttachmentMap[placement.toUpperCase()];
}
_setListeners() {
const triggers = this._config.trigger.split(' ');
triggers.forEach(trigger => {
if (trigger === 'click') {
EventHandler__default['default'].on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
} else if (trigger !== TRIGGER_MANUAL) {
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
EventHandler__default['default'].on(this._element, eventIn, this._config.selector, event => this._enter(event));
EventHandler__default['default'].on(this._element, eventOut, this._config.selector, event => this._leave(event));
}
});
this._hideModalHandler = () => {
if (this._element) {
this.hide();
}
};
EventHandler__default['default'].on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
if (this._config.selector) {
this._config = { ...this._config,
trigger: 'manual',
selector: ''
};
} else {
this._fixTitle();
}
}
_fixTitle() {
const title = this._element.getAttribute('title');
const originalTitleType = typeof this._element.getAttribute('data-bs-original-title');
if (title || originalTitleType !== 'string') {
this._element.setAttribute('data-bs-original-title', title || '');
if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {
this._element.setAttribute('aria-label', title);
}
this._element.setAttribute('title', '');
}
}
_enter(event, context) {
context = this._initializeOnDelegatedTarget(event, context);
if (event) {
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
}
if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HOVER_STATE_SHOW;
return;
}
clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_SHOW;
if (!context._config.delay || !context._config.delay.show) {
context.show();
return;
}
context._timeout = setTimeout(() => {
if (context._hoverState === HOVER_STATE_SHOW) {
context.show();
}
}, context._config.delay.show);
}
_leave(event, context) {
context = this._initializeOnDelegatedTarget(event, context);
if (event) {
context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
}
if (context._isWithActiveTrigger()) {
return;
}
clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_OUT;
if (!context._config.delay || !context._config.delay.hide) {
context.hide();
return;
}
context._timeout = setTimeout(() => {
if (context._hoverState === HOVER_STATE_OUT) {
context.hide();
}
}, context._config.delay.hide);
}
_isWithActiveTrigger() {
for (const trigger in this._activeTrigger) {
if (this._activeTrigger[trigger]) {
return true;
}
}
return false;
}
_getConfig(config) {
const dataAttributes = Manipulator__default['default'].getDataAttributes(this._element);
Object.keys(dataAttributes).forEach(dataAttr => {
if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
delete dataAttributes[dataAttr];
}
});
config = { ...this.constructor.Default,
...dataAttributes,
...(typeof config === 'object' && config ? config : {})
};
config.container = config.container === false ? document.body : getElement(config.container);
if (typeof config.delay === 'number') {
config.delay = {
show: config.delay,
hide: config.delay
};
}
if (typeof config.title === 'number') {
config.title = config.title.toString();
}
if (typeof config.content === 'number') {
config.content = config.content.toString();
}
typeCheckConfig(NAME, config, this.constructor.DefaultType);
if (config.sanitize) {
config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);
}
return config;
}
_getDelegateConfig() {
const config = {};
if (this._config) {
for (const key in this._config) {
if (this.constructor.Default[key] !== this._config[key]) {
config[key] = this._config[key];
}
}
}
return config;
}
_cleanTipClass() {
const tip = this.getTipElement();
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
}
}
_handlePopperPlacementChange(popperData) {
const {
state
} = popperData;
if (!state) {
return;
}
this.tip = state.elements.popper;
this._cleanTipClass();
this._addAttachmentClass(this._getAttachment(state.placement));
} // Static
static jQueryInterface(config) {
return this.each(function () {
const data = Tooltip.getOrCreateInstance(this, config);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`);
}
data[config]();
}
});
}
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .Tooltip to jQuery only if jQuery is present
*/
defineJQueryPlugin(Tooltip);
return Tooltip;
})));
//# sourceMappingURL=tooltip.js.map
/***/ }),
/***/ 324:
/***/ ((module, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(718);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
// Imports
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
// Module
___CSS_LOADER_EXPORT___.push([module.id, ".pizyds_rain .disabledField{pointer-events:none;opacity:.8}.pizyds_rain .pizyds_rain_button_field_type_1{right:110px !important}.pizyds_rain .rotating{-webkit-animation:rotation 2s infinite linear;animation:rotation 2s infinite linear}@-webkit-keyframes rotation{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes rotation{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}.pizyds_rain .noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pizyds_rain #pizyds_rain_answer_font_size_default{cursor:pointer}.pizyds_rain #pizyds_rain_answer_font_size_show{display:inline-block;width:20px}.pizyds_rain .no-text-decoration{text-decoration:none !important}.pizyds_rain .inherit-color{color:inherit !important}.pizyds_rain .footer-span{text-align:center;display:block;opacity:.5}.pizyds_rain .footer-span a{text-decoration:none !important;color:inherit !important}.pizyds_rain #pizyds_rain_footer_field{padding-top:10px}.pizyds_rain #pizyds_rain_header_message{color:red}.pizyds_rain :root{--bs-blue: #0d6efd;--bs-indigo: #6610f2;--bs-purple: #6f42c1;--bs-pink: #d63384;--bs-red: #dc3545;--bs-orange: #fd7e14;--bs-yellow: #ffc107;--bs-green: #198754;--bs-teal: #20c997;--bs-cyan: #0dcaf0;--bs-white: #fff;--bs-gray: #6c757d;--bs-gray-dark: #343a40;--bs-primary: #0d6efd;--bs-secondary: #6c757d;--bs-success: #198754;--bs-info: #0dcaf0;--bs-warning: #ffc107;--bs-danger: #dc3545;--bs-light: #f8f9fa;--bs-dark: #212529;--bs-font-sans-serif: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", \"Liberation Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0))}.pizyds_rain *,.pizyds_rain *::before,.pizyds_rain *::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){.pizyds_rain :root{scroll-behavior:smooth}}.pizyds_rain body{margin:0;font-family:var(--bs-font-sans-serif);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}.pizyds_rain hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}.pizyds_rain hr:not([size]){height:1px}.pizyds_rain h6,.pizyds_rain .h6,.pizyds_rain h5,.pizyds_rain .h5,.pizyds_rain h4,.pizyds_rain .h4,.pizyds_rain h3,.pizyds_rain .h3,.pizyds_rain h2,.pizyds_rain .h2,.pizyds_rain h1,.pizyds_rain .h1{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.pizyds_rain h1,.pizyds_rain .h1{font-size:calc(1.375rem + 1.5vw)}@media(min-width: 1200px){.pizyds_rain h1,.pizyds_rain .h1{font-size:2.5rem}}.pizyds_rain h2,.pizyds_rain .h2{font-size:calc(1.325rem + 0.9vw)}@media(min-width: 1200px){.pizyds_rain h2,.pizyds_rain .h2{font-size:2rem}}.pizyds_rain h3,.pizyds_rain .h3{font-size:calc(1.3rem + 0.6vw)}@media(min-width: 1200px){.pizyds_rain h3,.pizyds_rain .h3{font-size:1.75rem}}.pizyds_rain h4,.pizyds_rain .h4{font-size:calc(1.275rem + 0.3vw)}@media(min-width: 1200px){.pizyds_rain h4,.pizyds_rain .h4{font-size:1.5rem}}.pizyds_rain h5,.pizyds_rain .h5{font-size:1.25rem}.pizyds_rain h6,.pizyds_rain .h6{font-size:1rem}.pizyds_rain p{margin-top:0;margin-bottom:1rem}.pizyds_rain abbr[title],.pizyds_rain abbr[data-bs-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}.pizyds_rain address{margin-bottom:1rem;font-style:normal;line-height:inherit}.pizyds_rain ol,.pizyds_rain ul{padding-left:2rem}.pizyds_rain ol,.pizyds_rain ul,.pizyds_rain dl{margin-top:0;margin-bottom:1rem}.pizyds_rain ol ol,.pizyds_rain ul ul,.pizyds_rain ol ul,.pizyds_rain ul ol{margin-bottom:0}.pizyds_rain dt{font-weight:700}.pizyds_rain dd{margin-bottom:.5rem;margin-left:0}.pizyds_rain blockquote{margin:0 0 1rem}.pizyds_rain b,.pizyds_rain strong{font-weight:bolder}.pizyds_rain small,.pizyds_rain .small{font-size:0.875em}.pizyds_rain mark,.pizyds_rain .mark{padding:.2em;background-color:#fcf8e3}.pizyds_rain sub,.pizyds_rain sup{position:relative;font-size:0.75em;line-height:0;vertical-align:baseline}.pizyds_rain sub{bottom:-0.25em}.pizyds_rain sup{top:-0.5em}.pizyds_rain a{color:#0d6efd;text-decoration:underline}.pizyds_rain a:hover{color:#0a58ca}.pizyds_rain a:not([href]):not([class]),.pizyds_rain a:not([href]):not([class]):hover{color:inherit;text-decoration:none}.pizyds_rain pre,.pizyds_rain code,.pizyds_rain kbd,.pizyds_rain samp{font-family:var(--bs-font-monospace);font-size:1em;direction:ltr /* rtl:ignore */;unicode-bidi:bidi-override}.pizyds_rain pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:0.875em}.pizyds_rain pre code{font-size:inherit;color:inherit;word-break:normal}.pizyds_rain code{font-size:0.875em;color:#d63384;word-wrap:break-word}a>.pizyds_rain code{color:inherit}.pizyds_rain kbd{padding:.2rem .4rem;font-size:0.875em;color:#fff;background-color:#212529;border-radius:.2rem}.pizyds_rain kbd kbd{padding:0;font-size:1em;font-weight:700}.pizyds_rain figure{margin:0 0 1rem}.pizyds_rain img,.pizyds_rain svg{vertical-align:middle}.pizyds_rain table{caption-side:bottom;border-collapse:collapse}.pizyds_rain caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}.pizyds_rain th{text-align:inherit;text-align:-webkit-match-parent}.pizyds_rain thead,.pizyds_rain tbody,.pizyds_rain tfoot,.pizyds_rain tr,.pizyds_rain td,.pizyds_rain th{border-color:inherit;border-style:solid;border-width:0}.pizyds_rain label{display:inline-block}.pizyds_rain button{border-radius:0}.pizyds_rain button:focus:not(:focus-visible){outline:0}.pizyds_rain input,.pizyds_rain button,.pizyds_rain select,.pizyds_rain optgroup,.pizyds_rain textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}.pizyds_rain button,.pizyds_rain select{text-transform:none}.pizyds_rain [role=button]{cursor:pointer}.pizyds_rain select{word-wrap:normal}.pizyds_rain select:disabled{opacity:1}.pizyds_rain [list]::-webkit-calendar-picker-indicator{display:none}.pizyds_rain button,.pizyds_rain [type=button],.pizyds_rain [type=reset],.pizyds_rain [type=submit]{-webkit-appearance:button}.pizyds_rain button:not(:disabled),.pizyds_rain [type=button]:not(:disabled),.pizyds_rain [type=reset]:not(:disabled),.pizyds_rain [type=submit]:not(:disabled){cursor:pointer}.pizyds_rain ::-moz-focus-inner{padding:0;border-style:none}.pizyds_rain textarea{resize:vertical}.pizyds_rain fieldset{min-width:0;padding:0;margin:0;border:0}.pizyds_rain legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + 0.3vw);line-height:inherit}@media(min-width: 1200px){.pizyds_rain legend{font-size:1.5rem}}.pizyds_rain legend+*{clear:left}.pizyds_rain ::-webkit-datetime-edit-fields-wrapper,.pizyds_rain ::-webkit-datetime-edit-text,.pizyds_rain ::-webkit-datetime-edit-minute,.pizyds_rain ::-webkit-datetime-edit-hour-field,.pizyds_rain ::-webkit-datetime-edit-day-field,.pizyds_rain ::-webkit-datetime-edit-month-field,.pizyds_rain ::-webkit-datetime-edit-year-field{padding:0}.pizyds_rain ::-webkit-inner-spin-button{height:auto}.pizyds_rain [type=search]{outline-offset:-2px;-webkit-appearance:textfield}.pizyds_rain ::-webkit-search-decoration{-webkit-appearance:none}.pizyds_rain ::-webkit-color-swatch-wrapper{padding:0}.pizyds_rain ::file-selector-button{font:inherit}.pizyds_rain ::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}.pizyds_rain output{display:inline-block}.pizyds_rain iframe{border:0}.pizyds_rain summary{display:list-item;cursor:pointer}.pizyds_rain progress{vertical-align:baseline}.pizyds_rain [hidden]{display:none !important}.pizyds_rain .lead{font-size:1.25rem;font-weight:300}.pizyds_rain .display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media(min-width: 1200px){.pizyds_rain .display-1{font-size:5rem}}.pizyds_rain .display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media(min-width: 1200px){.pizyds_rain .display-2{font-size:4.5rem}}.pizyds_rain .display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media(min-width: 1200px){.pizyds_rain .display-3{font-size:4rem}}.pizyds_rain .display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media(min-width: 1200px){.pizyds_rain .display-4{font-size:3.5rem}}.pizyds_rain .display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media(min-width: 1200px){.pizyds_rain .display-5{font-size:3rem}}.pizyds_rain .display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media(min-width: 1200px){.pizyds_rain .display-6{font-size:2.5rem}}.pizyds_rain .list-unstyled{padding-left:0;list-style:none}.pizyds_rain .list-inline{padding-left:0;list-style:none}.pizyds_rain .list-inline-item{display:inline-block}.pizyds_rain .list-inline-item:not(:last-child){margin-right:.5rem}.pizyds_rain .initialism{font-size:0.875em;text-transform:uppercase}.pizyds_rain .blockquote{margin-bottom:1rem;font-size:1.25rem}.pizyds_rain .blockquote>:last-child{margin-bottom:0}.pizyds_rain .blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:0.875em;color:#6c757d}.pizyds_rain .blockquote-footer::before{content:\"— \"}.pizyds_rain .popover{position:absolute;top:0;left:0 /* rtl:ignore */;z-index:1070;display:block;max-width:276px;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:0.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.pizyds_rain .popover .popover-arrow{position:absolute;display:block;width:1rem;height:.5rem}.pizyds_rain .popover .popover-arrow::before,.pizyds_rain .popover .popover-arrow::after{position:absolute;display:block;content:\"\";border-color:transparent;border-style:solid}.pizyds_rain .bs-popover-top>.popover-arrow,.pizyds_rain .bs-popover-auto[data-popper-placement^=top]>.popover-arrow{bottom:calc(-0.5rem - 1px)}.pizyds_rain .bs-popover-top>.popover-arrow::before,.pizyds_rain .bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.pizyds_rain .bs-popover-top>.popover-arrow::after,.pizyds_rain .bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.pizyds_rain .bs-popover-end>.popover-arrow,.pizyds_rain .bs-popover-auto[data-popper-placement^=right]>.popover-arrow{left:calc(-0.5rem - 1px);width:.5rem;height:1rem}.pizyds_rain .bs-popover-end>.popover-arrow::before,.pizyds_rain .bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.pizyds_rain .bs-popover-end>.popover-arrow::after,.pizyds_rain .bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.pizyds_rain .bs-popover-bottom>.popover-arrow,.pizyds_rain .bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow{top:calc(-0.5rem - 1px)}.pizyds_rain .bs-popover-bottom>.popover-arrow::before,.pizyds_rain .bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.pizyds_rain .bs-popover-bottom>.popover-arrow::after,.pizyds_rain .bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.pizyds_rain .bs-popover-bottom .popover-header::before,.pizyds_rain .bs-popover-auto[data-popper-placement^=bottom] .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-0.5rem;content:\"\";border-bottom:1px solid #f0f0f0}.pizyds_rain .bs-popover-start>.popover-arrow,.pizyds_rain .bs-popover-auto[data-popper-placement^=left]>.popover-arrow{right:calc(-0.5rem - 1px);width:.5rem;height:1rem}.pizyds_rain .bs-popover-start>.popover-arrow::before,.pizyds_rain .bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.pizyds_rain .bs-popover-start>.popover-arrow::after,.pizyds_rain .bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.pizyds_rain .popover-header{padding:.5rem 1rem;margin-bottom:0;font-size:1rem;background-color:#f0f0f0;border-bottom:1px solid rgba(0,0,0,.2);border-top-left-radius:calc(0.3rem - 1px);border-top-right-radius:calc(0.3rem - 1px)}.pizyds_rain .popover-header:empty{display:none}.pizyds_rain .popover-body{padding:1rem 1rem;color:#212529}.pizyds_rain .form-label{margin-bottom:.5rem}.pizyds_rain .col-form-label{padding-top:calc(0.375rem + 1px);padding-bottom:calc(0.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.pizyds_rain .col-form-label-lg{padding-top:calc(0.5rem + 1px);padding-bottom:calc(0.5rem + 1px);font-size:1.25rem}.pizyds_rain .col-form-label-sm{padding-top:calc(0.25rem + 1px);padding-bottom:calc(0.25rem + 1px);font-size:0.875rem}.pizyds_rain .form-text{margin-top:.25rem;font-size:0.875em;color:#6c757d}.pizyds_rain .form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.pizyds_rain .form-control{transition:none}}.pizyds_rain .form-control[type=file]{overflow:hidden}.pizyds_rain .form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.pizyds_rain .form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.pizyds_rain .form-control::-webkit-date-and-time-value{height:1.5em}.pizyds_rain .form-control::-moz-placeholder{color:#6c757d;opacity:1}.pizyds_rain .form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.pizyds_rain .form-control::placeholder{color:#6c757d;opacity:1}.pizyds_rain .form-control:disabled,.pizyds_rain .form-control[readonly]{background-color:#e9ecef;opacity:1}.pizyds_rain .form-control::file-selector-button{padding:.375rem .75rem;margin:-0.375rem -0.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.pizyds_rain .form-control::file-selector-button{transition:none}}.pizyds_rain .form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.pizyds_rain .form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-0.375rem -0.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.pizyds_rain .form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}}.pizyds_rain .form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.pizyds_rain .form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.pizyds_rain .form-control-plaintext.form-control-sm,.pizyds_rain .form-control-plaintext.form-control-lg{padding-right:0;padding-left:0}.pizyds_rain .form-control-sm{min-height:calc(1.5em + (0.5rem + 2px));padding:.25rem .5rem;font-size:0.875rem;border-radius:.2rem}.pizyds_rain .form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-0.25rem -0.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.pizyds_rain .form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-0.25rem -0.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.pizyds_rain .form-control-lg{min-height:calc(1.5em + (1rem + 2px));padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.pizyds_rain .form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-0.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.pizyds_rain .form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-0.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.pizyds_rain textarea.form-control{min-height:calc(1.5em + (0.75rem + 2px))}.pizyds_rain textarea.form-control-sm{min-height:calc(1.5em + (0.5rem + 2px))}.pizyds_rain textarea.form-control-lg{min-height:calc(1.5em + (1rem + 2px))}.pizyds_rain .form-control-color{max-width:3rem;height:auto;padding:.375rem}.pizyds_rain .form-control-color:not(:disabled):not([readonly]){cursor:pointer}.pizyds_rain .form-control-color::-moz-color-swatch{height:1.5em;border-radius:.25rem}.pizyds_rain .form-control-color::-webkit-color-swatch{height:1.5em;border-radius:.25rem}.pizyds_rain .form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media(prefers-reduced-motion: reduce){.pizyds_rain .form-select{transition:none}}.pizyds_rain .form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.pizyds_rain .form-select[multiple],.pizyds_rain .form-select[size]:not([size=\"1\"]){padding-right:.75rem;background-image:none}.pizyds_rain .form-select:disabled{background-color:#e9ecef}.pizyds_rain .form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.pizyds_rain .form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:0.875rem}.pizyds_rain .form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.pizyds_rain .form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.pizyds_rain .form-check .form-check-input{float:left;margin-left:-1.5em}.pizyds_rain .form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact}.pizyds_rain .form-check-input[type=checkbox]{border-radius:.25em}.pizyds_rain .form-check-input[type=radio]{border-radius:50%}.pizyds_rain .form-check-input:active{filter:brightness(90%)}.pizyds_rain .form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.pizyds_rain .form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.pizyds_rain .form-check-input:checked[type=checkbox]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e\")}.pizyds_rain .form-check-input:checked[type=radio]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e\")}.pizyds_rain .form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e\")}.pizyds_rain .form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.pizyds_rain .form-check-input[disabled]~.form-check-label,.pizyds_rain .form-check-input:disabled~.form-check-label{opacity:.5}.pizyds_rain .form-switch{padding-left:2.5em}.pizyds_rain .form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e\");background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media(prefers-reduced-motion: reduce){.pizyds_rain .form-switch .form-check-input{transition:none}}.pizyds_rain .form-switch .form-check-input:focus{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e\")}.pizyds_rain .form-switch .form-check-input:checked{background-position:right center;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e\")}.pizyds_rain .form-check-inline{display:inline-block;margin-right:1rem}.pizyds_rain .btn-check{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.pizyds_rain .btn-check[disabled]+.btn,.pizyds_rain .btn-check:disabled+.btn{pointer-events:none;filter:none;opacity:.65}.pizyds_rain .form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pizyds_rain .form-range:focus{outline:0}.pizyds_rain .form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.pizyds_rain .form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.pizyds_rain .form-range::-moz-focus-outer{border:0}.pizyds_rain .form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-0.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media(prefers-reduced-motion: reduce){.pizyds_rain .form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.pizyds_rain .form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.pizyds_rain .form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.pizyds_rain .form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media(prefers-reduced-motion: reduce){.pizyds_rain .form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.pizyds_rain .form-range::-moz-range-thumb:active{background-color:#b6d4fe}.pizyds_rain .form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.pizyds_rain .form-range:disabled{pointer-events:none}.pizyds_rain .form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.pizyds_rain .form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.pizyds_rain .form-floating{position:relative}.pizyds_rain .form-floating>.form-control,.pizyds_rain .form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.pizyds_rain .form-floating>label{position:absolute;top:0;left:0;height:100%;padding:1rem .75rem;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media(prefers-reduced-motion: reduce){.pizyds_rain .form-floating>label{transition:none}}.pizyds_rain .form-floating>.form-control{padding:1rem .75rem}.pizyds_rain .form-floating>.form-control::-moz-placeholder{color:transparent}.pizyds_rain .form-floating>.form-control:-ms-input-placeholder{color:transparent}.pizyds_rain .form-floating>.form-control::placeholder{color:transparent}.pizyds_rain .form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.pizyds_rain .form-floating>.form-control:not(:-ms-input-placeholder){padding-top:1.625rem;padding-bottom:.625rem}.pizyds_rain .form-floating>.form-control:focus,.pizyds_rain .form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.pizyds_rain .form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.pizyds_rain .form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.pizyds_rain .form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem)}.pizyds_rain .form-floating>.form-control:not(:-ms-input-placeholder)~label{opacity:.65;transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem)}.pizyds_rain .form-floating>.form-control:focus~label,.pizyds_rain .form-floating>.form-control:not(:placeholder-shown)~label,.pizyds_rain .form-floating>.form-select~label{opacity:.65;transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem)}.pizyds_rain .form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(0.85) translateY(-0.5rem) translateX(0.15rem)}.pizyds_rain .input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.pizyds_rain .input-group>.form-control,.pizyds_rain .input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.pizyds_rain .input-group>.form-control:focus,.pizyds_rain .input-group>.form-select:focus{z-index:3}.pizyds_rain .input-group .btn{position:relative;z-index:2}.pizyds_rain .input-group .btn:focus{z-index:3}.pizyds_rain .input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.pizyds_rain .input-group-lg>.form-control,.pizyds_rain .input-group-lg>.form-select,.pizyds_rain .input-group-lg>.input-group-text,.pizyds_rain .input-group-lg>.btn{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.pizyds_rain .input-group-sm>.form-control,.pizyds_rain .input-group-sm>.form-select,.pizyds_rain .input-group-sm>.input-group-text,.pizyds_rain .input-group-sm>.btn{padding:.25rem .5rem;font-size:0.875rem;border-radius:.2rem}.pizyds_rain .input-group-lg>.form-select,.pizyds_rain .input-group-sm>.form-select{padding-right:3rem}.pizyds_rain .input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),.pizyds_rain .input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3){border-top-right-radius:0;border-bottom-right-radius:0}.pizyds_rain .input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu),.pizyds_rain .input-group.has-validation>.dropdown-toggle:nth-last-child(n+4){border-top-right-radius:0;border-bottom-right-radius:0}.pizyds_rain .input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.pizyds_rain .valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:0.875em;color:#198754}.pizyds_rain .valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:0.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.25rem}.was-validated .pizyds_rain:valid~.valid-feedback,.was-validated .pizyds_rain:valid~.valid-tooltip,.pizyds_rain.is-valid~.valid-feedback,.pizyds_rain.is-valid~.valid-tooltip{display:block}.was-validated .pizyds_rain .form-control:valid,.pizyds_rain .form-control.is-valid{border-color:#198754;padding-right:calc(1.5em + 0.75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .pizyds_rain .form-control:valid:focus,.pizyds_rain .form-control.is-valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated .pizyds_rain textarea.form-control:valid,.pizyds_rain textarea.form-control.is-valid{padding-right:calc(1.5em + 0.75rem);background-position:top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem)}.was-validated .pizyds_rain .form-select:valid,.pizyds_rain .form-select.is-valid{border-color:#198754}.was-validated .pizyds_rain .form-select:valid:not([multiple]):not([size]),.was-validated .pizyds_rain .form-select:valid:not([multiple])[size=\"1\"],.pizyds_rain .form-select.is-valid:not([multiple]):not([size]),.pizyds_rain .form-select.is-valid:not([multiple])[size=\"1\"]{padding-right:4.125rem;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e\"),url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .pizyds_rain .form-select:valid:focus,.pizyds_rain .form-select.is-valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated .pizyds_rain .form-check-input:valid,.pizyds_rain .form-check-input.is-valid{border-color:#198754}.was-validated .pizyds_rain .form-check-input:valid:checked,.pizyds_rain .form-check-input.is-valid:checked{background-color:#198754}.was-validated .pizyds_rain .form-check-input:valid:focus,.pizyds_rain .form-check-input.is-valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated .pizyds_rain .form-check-input:valid~.form-check-label,.pizyds_rain .form-check-input.is-valid~.form-check-label{color:#198754}.pizyds_rain .form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.was-validated .pizyds_rain .input-group .form-control:valid,.pizyds_rain .input-group .form-control.is-valid,.was-validated .pizyds_rain .input-group .form-select:valid,.pizyds_rain .input-group .form-select.is-valid{z-index:1}.was-validated .pizyds_rain .input-group .form-control:valid:focus,.pizyds_rain .input-group .form-control.is-valid:focus,.was-validated .pizyds_rain .input-group .form-select:valid:focus,.pizyds_rain .input-group .form-select.is-valid:focus{z-index:3}.pizyds_rain .invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:0.875em;color:#dc3545}.pizyds_rain .invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:0.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.was-validated .pizyds_rain:invalid~.invalid-feedback,.was-validated .pizyds_rain:invalid~.invalid-tooltip,.pizyds_rain.is-invalid~.invalid-feedback,.pizyds_rain.is-invalid~.invalid-tooltip{display:block}.was-validated .pizyds_rain .form-control:invalid,.pizyds_rain .form-control.is-invalid{border-color:#dc3545;padding-right:calc(1.5em + 0.75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .pizyds_rain .form-control:invalid:focus,.pizyds_rain .form-control.is-invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated .pizyds_rain textarea.form-control:invalid,.pizyds_rain textarea.form-control.is-invalid{padding-right:calc(1.5em + 0.75rem);background-position:top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem)}.was-validated .pizyds_rain .form-select:invalid,.pizyds_rain .form-select.is-invalid{border-color:#dc3545}.was-validated .pizyds_rain .form-select:invalid:not([multiple]):not([size]),.was-validated .pizyds_rain .form-select:invalid:not([multiple])[size=\"1\"],.pizyds_rain .form-select.is-invalid:not([multiple]):not([size]),.pizyds_rain .form-select.is-invalid:not([multiple])[size=\"1\"]{padding-right:4.125rem;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e\"),url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\");background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .pizyds_rain .form-select:invalid:focus,.pizyds_rain .form-select.is-invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated .pizyds_rain .form-check-input:invalid,.pizyds_rain .form-check-input.is-invalid{border-color:#dc3545}.was-validated .pizyds_rain .form-check-input:invalid:checked,.pizyds_rain .form-check-input.is-invalid:checked{background-color:#dc3545}.was-validated .pizyds_rain .form-check-input:invalid:focus,.pizyds_rain .form-check-input.is-invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated .pizyds_rain .form-check-input:invalid~.form-check-label,.pizyds_rain .form-check-input.is-invalid~.form-check-label{color:#dc3545}.pizyds_rain .form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.was-validated .pizyds_rain .input-group .form-control:invalid,.pizyds_rain .input-group .form-control.is-invalid,.was-validated .pizyds_rain .input-group .form-select:invalid,.pizyds_rain .input-group .form-select.is-invalid{z-index:2}.was-validated .pizyds_rain .input-group .form-control:invalid:focus,.pizyds_rain .input-group .form-control.is-invalid:focus,.was-validated .pizyds_rain .input-group .form-select:invalid:focus,.pizyds_rain .input-group .form-select.is-invalid:focus{z-index:3}", ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
/***/ }),
/***/ 718:
/***/ ((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;
};
/***/ }),
/***/ 56:
/***/ ((module) => {
(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=undefined;if(!f&&c)return require(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=undefined,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
/*
* EJS Embedded JavaScript templates
* Copyright 2112 Matthew Eernisse ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
'use strict';
/**
* @file Embedded JavaScript templating engine. {@link http://ejs.co}
* @author Matthew Eernisse <[email protected]>
* @author Tiancheng "Timothy" Gu <[email protected]>
* @project EJS
* @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
*/
/**
* EJS internal functions.
*
* Technically this "module" lies in the same file as {@link module:ejs}, for
* the sake of organization all the private functions re grouped into this
* module.
*
* @module ejs-internal
* @private
*/
/**
* Embedded JavaScript templating engine.
*
* @module ejs
* @public
*/
var fs = require('fs');
var path = require('path');
var utils = require('./utils');
var scopeOptionWarned = false;
/** @type {string} */
var _VERSION_STRING = require('../package.json').version;
var _DEFAULT_OPEN_DELIMITER = '<';
var _DEFAULT_CLOSE_DELIMITER = '>';
var _DEFAULT_DELIMITER = '%';
var _DEFAULT_LOCALS_NAME = 'locals';
var _NAME = 'ejs';
var _REGEX_STRING = '(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)';
var _OPTS_PASSABLE_WITH_DATA = ['delimiter', 'scope', 'context', 'debug', 'compileDebug',
'client', '_with', 'rmWhitespace', 'strict', 'filename', 'async'];
// We don't allow 'cache' option to be passed in the data obj for
// the normal `render` call, but this is where Express 2 & 3 put it
// so we make an exception for `renderFile`
var _OPTS_PASSABLE_WITH_DATA_EXPRESS = _OPTS_PASSABLE_WITH_DATA.concat('cache');
var _BOM = /^\uFEFF/;
/**
* EJS template function cache. This can be a LRU object from lru-cache NPM
* module. By default, it is {@link module:utils.cache}, a simple in-process
* cache that grows continuously.
*
* @type {Cache}
*/
exports.cache = utils.cache;
/**
* Custom file loader. Useful for template preprocessing or restricting access
* to a certain part of the filesystem.
*
* @type {fileLoader}
*/
exports.fileLoader = fs.readFileSync;
/**
* Name of the object containing the locals.
*
* This variable is overridden by {@link Options}`.localsName` if it is not
* `undefined`.
*
* @type {String}
* @public
*/
exports.localsName = _DEFAULT_LOCALS_NAME;
/**
* Promise implementation -- defaults to the native implementation if available
* This is mostly just for testability
*
* @type {PromiseConstructorLike}
* @public
*/
exports.promiseImpl = (new Function('return this;'))().Promise;
/**
* Get the path to the included file from the parent file path and the
* specified path.
*
* @param {String} name specified path
* @param {String} filename parent file path
* @param {Boolean} [isDir=false] whether the parent file path is a directory
* @return {String}
*/
exports.resolveInclude = function(name, filename, isDir) {
var dirname = path.dirname;
var extname = path.extname;
var resolve = path.resolve;
var includePath = resolve(isDir ? filename : dirname(filename), name);
var ext = extname(name);
if (!ext) {
includePath += '.ejs';
}
return includePath;
};
/**
* Try to resolve file path on multiple directories
*
* @param {String} name specified path
* @param {Array<String>} paths list of possible parent directory paths
* @return {String}
*/
function resolvePaths(name, paths) {
var filePath;
if (paths.some(function (v) {
filePath = exports.resolveInclude(name, v, true);
return fs.existsSync(filePath);
})) {
return filePath;
}
}
/**
* Get the path to the included file by Options
*
* @param {String} path specified path
* @param {Options} options compilation options
* @return {String}
*/
function getIncludePath(path, options) {
var includePath;
var filePath;
var views = options.views;
var match = /^[A-Za-z]+:\\|^\//.exec(path);
// Abs path
if (match && match.length) {
path = path.replace(/^\/*/, '');
if (Array.isArray(options.root)) {
includePath = resolvePaths(path, options.root);
} else {
includePath = exports.resolveInclude(path, options.root || '/', true);
}
}
// Relative paths
else {
// Look relative to a passed filename first
if (options.filename) {
filePath = exports.resolveInclude(path, options.filename);
if (fs.existsSync(filePath)) {
includePath = filePath;
}
}
// Then look in any views directories
if (!includePath && Array.isArray(views)) {
includePath = resolvePaths(path, views);
}
if (!includePath && typeof options.includer !== 'function') {
throw new Error('Could not find the include file "' +
options.escapeFunction(path) + '"');
}
}
return includePath;
}
/**
* Get the template from a string or a file, either compiled on-the-fly or
* read from cache (if enabled), and cache the template if needed.
*
* If `template` is not set, the file specified in `options.filename` will be
* read.
*
* If `options.cache` is true, this function reads the file from
* `options.filename` so it must be set prior to calling this function.
*
* @memberof module:ejs-internal
* @param {Options} options compilation options
* @param {String} [template] template source
* @return {(TemplateFunction|ClientFunction)}
* Depending on the value of `options.client`, either type might be returned.
* @static
*/
function handleCache(options, template) {
var func;
var filename = options.filename;
var hasTemplate = arguments.length > 1;
if (options.cache) {
if (!filename) {
throw new Error('cache option requires a filename');
}
func = exports.cache.get(filename);
if (func) {
return func;
}
if (!hasTemplate) {
template = fileLoader(filename).toString().replace(_BOM, '');
}
}
else if (!hasTemplate) {
// istanbul ignore if: should not happen at all
if (!filename) {
throw new Error('Internal EJS error: no file name or template '
+ 'provided');
}
template = fileLoader(filename).toString().replace(_BOM, '');
}
func = exports.compile(template, options);
if (options.cache) {
exports.cache.set(filename, func);
}
return func;
}
/**
* Try calling handleCache with the given options and data and call the
* callback with the result. If an error occurs, call the callback with
* the error. Used by renderFile().
*
* @memberof module:ejs-internal
* @param {Options} options compilation options
* @param {Object} data template data
* @param {RenderFileCallback} cb callback
* @static
*/
function tryHandleCache(options, data, cb) {
var result;
if (!cb) {
if (typeof exports.promiseImpl == 'function') {
return new exports.promiseImpl(function (resolve, reject) {
try {
result = handleCache(options)(data);
resolve(result);
}
catch (err) {
reject(err);
}
});
}
else {
throw new Error('Please provide a callback function');
}
}
else {
try {
result = handleCache(options)(data);
}
catch (err) {
return cb(err);
}
cb(null, result);
}
}
/**
* fileLoader is independent
*
* @param {String} filePath ejs file path.
* @return {String} The contents of the specified file.
* @static
*/
function fileLoader(filePath){
return exports.fileLoader(filePath);
}
/**
* Get the template function.
*
* If `options.cache` is `true`, then the template is cached.
*
* @memberof module:ejs-internal
* @param {String} path path for the specified file
* @param {Options} options compilation options
* @return {(TemplateFunction|ClientFunction)}
* Depending on the value of `options.client`, either type might be returned
* @static
*/
function includeFile(path, options) {
var opts = utils.shallowCopy({}, options);
opts.filename = getIncludePath(path, opts);
if (typeof options.includer === 'function') {
var includerResult = options.includer(path, opts.filename);
if (includerResult) {
if (includerResult.filename) {
opts.filename = includerResult.filename;
}
if (includerResult.template) {
return handleCache(opts, includerResult.template);
}
}
}
return handleCache(opts);
}
/**
* Re-throw the given `err` in context to the `str` of ejs, `filename`, and
* `lineno`.
*
* @implements {RethrowCallback}
* @memberof module:ejs-internal
* @param {Error} err Error object
* @param {String} str EJS source
* @param {String} flnm file name of the EJS file
* @param {Number} lineno line number of the error
* @param {EscapeCallback} esc
* @static
*/
function rethrow(err, str, flnm, lineno, esc) {
var lines = str.split('\n');
var start = Math.max(lineno - 3, 0);
var end = Math.min(lines.length, lineno + 3);
var filename = esc(flnm);
// Error context
var context = lines.slice(start, end).map(function (line, i){
var curr = i + start + 1;
return (curr == lineno ? ' >> ' : ' ')
+ curr
+ '| '
+ line;
}).join('\n');
// Alter exception message
err.path = filename;
err.message = (filename || 'ejs') + ':'
+ lineno + '\n'
+ context + '\n\n'
+ err.message;
throw err;
}
function stripSemi(str){
return str.replace(/;(\s*$)/, '$1');
}
/**
* Compile the given `str` of ejs into a template function.
*
* @param {String} template EJS template
*
* @param {Options} [opts] compilation options
*
* @return {(TemplateFunction|ClientFunction)}
* Depending on the value of `opts.client`, either type might be returned.
* Note that the return type of the function also depends on the value of `opts.async`.
* @public
*/
exports.compile = function compile(template, opts) {
var templ;
// v1 compat
// 'scope' is 'context'
// FIXME: Remove this in a future version
if (opts && opts.scope) {
if (!scopeOptionWarned){
console.warn('`scope` option is deprecated and will be removed in EJS 3');
scopeOptionWarned = true;
}
if (!opts.context) {
opts.context = opts.scope;
}
delete opts.scope;
}
templ = new Template(template, opts);
return templ.compile();
};
/**
* Render the given `template` of ejs.
*
* If you would like to include options but not data, you need to explicitly
* call this function with `data` being an empty object or `null`.
*
* @param {String} template EJS template
* @param {Object} [data={}] template data
* @param {Options} [opts={}] compilation and rendering options
* @return {(String|Promise<String>)}
* Return value type depends on `opts.async`.
* @public
*/
exports.render = function (template, d, o) {
var data = d || {};
var opts = o || {};
// No options object -- if there are optiony names
// in the data, copy them to options
if (arguments.length == 2) {
utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA);
}
return handleCache(opts, template)(data);
};
/**
* Render an EJS file at the given `path` and callback `cb(err, str)`.
*
* If you would like to include options but not data, you need to explicitly
* call this function with `data` being an empty object or `null`.
*
* @param {String} path path to the EJS file
* @param {Object} [data={}] template data
* @param {Options} [opts={}] compilation and rendering options
* @param {RenderFileCallback} cb callback
* @public
*/
exports.renderFile = function () {
var args = Array.prototype.slice.call(arguments);
var filename = args.shift();
var cb;
var opts = {filename: filename};
var data;
var viewOpts;
// Do we have a callback?
if (typeof arguments[arguments.length - 1] == 'function') {
cb = args.pop();
}
// Do we have data/opts?
if (args.length) {
// Should always have data obj
data = args.shift();
// Normal passed opts (data obj + opts obj)
if (args.length) {
// Use shallowCopy so we don't pollute passed in opts obj with new vals
utils.shallowCopy(opts, args.pop());
}
// Special casing for Express (settings + opts-in-data)
else {
// Express 3 and 4
if (data.settings) {
// Pull a few things from known locations
if (data.settings.views) {
opts.views = data.settings.views;
}
if (data.settings['view cache']) {
opts.cache = true;
}
// Undocumented after Express 2, but still usable, esp. for
// items that are unsafe to be passed along with data, like `root`
viewOpts = data.settings['view options'];
if (viewOpts) {
utils.shallowCopy(opts, viewOpts);
}
}
// Express 2 and lower, values set in app.locals, or people who just
// want to pass options in their data. NOTE: These values will override
// anything previously set in settings or settings['view options']
utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS);
}
opts.filename = filename;
}
else {
data = {};
}
return tryHandleCache(opts, data, cb);
};
/**
* Clear intermediate JavaScript cache. Calls {@link Cache#reset}.
* @public
*/
/**
* EJS template class
* @public
*/
exports.Template = Template;
exports.clearCache = function () {
exports.cache.reset();
};
function Template(text, opts) {
opts = opts || {};
var options = {};
this.templateText = text;
/** @type {string | null} */
this.mode = null;
this.truncate = false;
this.currentLine = 1;
this.source = '';
options.client = opts.client || false;
options.escapeFunction = opts.escape || opts.escapeFunction || utils.escapeXML;
options.compileDebug = opts.compileDebug !== false;
options.debug = !!opts.debug;
options.filename = opts.filename;
options.openDelimiter = opts.openDelimiter || exports.openDelimiter || _DEFAULT_OPEN_DELIMITER;
options.closeDelimiter = opts.closeDelimiter || exports.closeDelimiter || _DEFAULT_CLOSE_DELIMITER;
options.delimiter = opts.delimiter || exports.delimiter || _DEFAULT_DELIMITER;
options.strict = opts.strict || false;
options.context = opts.context;
options.cache = opts.cache || false;
options.rmWhitespace = opts.rmWhitespace;
options.root = opts.root;
options.includer = opts.includer;
options.outputFunctionName = opts.outputFunctionName;
options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME;
options.views = opts.views;
options.async = opts.async;
options.destructuredLocals = opts.destructuredLocals;
options.legacyInclude = typeof opts.legacyInclude != 'undefined' ? !!opts.legacyInclude : true;
if (options.strict) {
options._with = false;
}
else {
options._with = typeof opts._with != 'undefined' ? opts._with : true;
}
this.opts = options;
this.regex = this.createRegex();
}
Template.modes = {
EVAL: 'eval',
ESCAPED: 'escaped',
RAW: 'raw',
COMMENT: 'comment',
LITERAL: 'literal'
};
Template.prototype = {
createRegex: function () {
var str = _REGEX_STRING;
var delim = utils.escapeRegExpChars(this.opts.delimiter);
var open = utils.escapeRegExpChars(this.opts.openDelimiter);
var close = utils.escapeRegExpChars(this.opts.closeDelimiter);
str = str.replace(/%/g, delim)
.replace(/</g, open)
.replace(/>/g, close);
return new RegExp(str);
},
compile: function () {
/** @type {string} */
var src;
/** @type {ClientFunction} */
var fn;
var opts = this.opts;
var prepended = '';
var appended = '';
/** @type {EscapeCallback} */
var escapeFn = opts.escapeFunction;
/** @type {FunctionConstructor} */
var ctor;
/** @type {string} */
var sanitizedFilename = opts.filename ? JSON.stringify(opts.filename) : 'undefined';
if (!this.source) {
this.generateSource();
prepended +=
' var __output = "";\n' +
' function __append(s) { if (s !== undefined && s !== null) __output += s }\n';
if (opts.outputFunctionName) {
prepended += ' var ' + opts.outputFunctionName + ' = __append;' + '\n';
}
if (opts.destructuredLocals && opts.destructuredLocals.length) {
var destructuring = ' var __locals = (' + opts.localsName + ' || {}),\n';
for (var i = 0; i < opts.destructuredLocals.length; i++) {
var name = opts.destructuredLocals[i];
if (i > 0) {
destructuring += ',\n ';
}
destructuring += name + ' = __locals.' + name;
}
prepended += destructuring + ';\n';
}
if (opts._with !== false) {
prepended += ' with (' + opts.localsName + ' || {}) {' + '\n';
appended += ' }' + '\n';
}
appended += ' return __output;' + '\n';
this.source = prepended + this.source + appended;
}
if (opts.compileDebug) {
src = 'var __line = 1' + '\n'
+ ' , __lines = ' + JSON.stringify(this.templateText) + '\n'
+ ' , __filename = ' + sanitizedFilename + ';' + '\n'
+ 'try {' + '\n'
+ this.source
+ '} catch (e) {' + '\n'
+ ' rethrow(e, __lines, __filename, __line, escapeFn);' + '\n'
+ '}' + '\n';
}
else {
src = this.source;
}
if (opts.client) {
src = 'escapeFn = escapeFn || ' + escapeFn.toString() + ';' + '\n' + src;
if (opts.compileDebug) {
src = 'rethrow = rethrow || ' + rethrow.toString() + ';' + '\n' + src;
}
}
if (opts.strict) {
src = '"use strict";\n' + src;
}
if (opts.debug) {
console.log(src);
}
if (opts.compileDebug && opts.filename) {
src = src + '\n'
+ '//# sourceURL=' + sanitizedFilename + '\n';
}
try {
if (opts.async) {
// Have to use generated function for this, since in envs without support,
// it breaks in parsing
try {
ctor = (new Function('return (async function(){}).constructor;'))();
}
catch(e) {
if (e instanceof SyntaxError) {
throw new Error('This environment does not support async/await');
}
else {
throw e;
}
}
}
else {
ctor = Function;
}
fn = new ctor(opts.localsName + ', escapeFn, include, rethrow', src);
}
catch(e) {
// istanbul ignore else
if (e instanceof SyntaxError) {
if (opts.filename) {
e.message += ' in ' + opts.filename;
}
e.message += ' while compiling ejs\n\n';
e.message += 'If the above error is not helpful, you may want to try EJS-Lint:\n';
e.message += 'https://github.com/RyanZim/EJS-Lint';
if (!opts.async) {
e.message += '\n';
e.message += 'Or, if you meant to create an async function, pass `async: true` as an option.';
}
}
throw e;
}
// Return a callable function which will execute the function
// created by the source-code, with the passed data as locals
// Adds a local `include` function which allows full recursive include
var returnedFn = opts.client ? fn : function anonymous(data) {
var include = function (path, includeData) {
var d = utils.shallowCopy({}, data);
if (includeData) {
d = utils.shallowCopy(d, includeData);
}
return includeFile(path, opts)(d);
};
return fn.apply(opts.context, [data || {}, escapeFn, include, rethrow]);
};
if (opts.filename && typeof Object.defineProperty === 'function') {
var filename = opts.filename;
var basename = path.basename(filename, path.extname(filename));
try {
Object.defineProperty(returnedFn, 'name', {
value: basename,
writable: false,
enumerable: false,
configurable: true
});
} catch (e) {/* ignore */}
}
return returnedFn;
},
generateSource: function () {
var opts = this.opts;
if (opts.rmWhitespace) {
// Have to use two separate replace here as `^` and `$` operators don't
// work well with `\r` and empty lines don't work well with the `m` flag.
this.templateText =
this.templateText.replace(/[\r\n]+/g, '\n').replace(/^\s+|\s+$/gm, '');
}
// Slurp spaces and tabs before <%_ and after _%>
this.templateText =
this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
var self = this;
var matches = this.parseTemplateText();
var d = this.opts.delimiter;
var o = this.opts.openDelimiter;
var c = this.opts.closeDelimiter;
if (matches && matches.length) {
matches.forEach(function (line, index) {
var closing;
// If this is an opening tag, check for closing tags
// FIXME: May end up with some false positives here
// Better to store modes as k/v with openDelimiter + delimiter as key
// Then this can simply check against the map
if ( line.indexOf(o + d) === 0 // If it is a tag
&& line.indexOf(o + d + d) !== 0) { // and is not escaped
closing = matches[index + 2];
if (!(closing == d + c || closing == '-' + d + c || closing == '_' + d + c)) {
throw new Error('Could not find matching close tag for "' + line + '".');
}
}
self.scanLine(line);
});
}
},
parseTemplateText: function () {
var str = this.templateText;
var pat = this.regex;
var result = pat.exec(str);
var arr = [];
var firstPos;
while (result) {
firstPos = result.index;
if (firstPos !== 0) {
arr.push(str.substring(0, firstPos));
str = str.slice(firstPos);
}
arr.push(result[0]);
str = str.slice(result[0].length);
result = pat.exec(str);
}
if (str) {
arr.push(str);
}
return arr;
},
_addOutput: function (line) {
if (this.truncate) {
// Only replace single leading linebreak in the line after
// -%> tag -- this is the single, trailing linebreak
// after the tag that the truncation mode replaces
// Handle Win / Unix / old Mac linebreaks -- do the \r\n
// combo first in the regex-or
line = line.replace(/^(?:\r\n|\r|\n)/, '');
this.truncate = false;
}
if (!line) {
return line;
}
// Preserve literal slashes
line = line.replace(/\\/g, '\\\\');
// Convert linebreaks
line = line.replace(/\n/g, '\\n');
line = line.replace(/\r/g, '\\r');
// Escape double-quotes
// - this will be the delimiter during execution
line = line.replace(/"/g, '\\"');
this.source += ' ; __append("' + line + '")' + '\n';
},
scanLine: function (line) {
var self = this;
var d = this.opts.delimiter;
var o = this.opts.openDelimiter;
var c = this.opts.closeDelimiter;
var newLineCount = 0;
newLineCount = (line.split('\n').length - 1);
switch (line) {
case o + d:
case o + d + '_':
this.mode = Template.modes.EVAL;
break;
case o + d + '=':
this.mode = Template.modes.ESCAPED;
break;
case o + d + '-':
this.mode = Template.modes.RAW;
break;
case o + d + '#':
this.mode = Template.modes.COMMENT;
break;
case o + d + d:
this.mode = Template.modes.LITERAL;
this.source += ' ; __append("' + line.replace(o + d + d, o + d) + '")' + '\n';
break;
case d + d + c:
this.mode = Template.modes.LITERAL;
this.source += ' ; __append("' + line.replace(d + d + c, d + c) + '")' + '\n';
break;
case d + c:
case '-' + d + c:
case '_' + d + c:
if (this.mode == Template.modes.LITERAL) {
this._addOutput(line);
}
this.mode = null;
this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0;
break;
default:
// In script mode, depends on type of tag
if (this.mode) {
// If '//' is found without a line break, add a line break.
switch (this.mode) {
case Template.modes.EVAL:
case Template.modes.ESCAPED:
case Template.modes.RAW:
if (line.lastIndexOf('//') > line.lastIndexOf('\n')) {
line += '\n';
}
}
switch (this.mode) {
// Just executing code
case Template.modes.EVAL:
this.source += ' ; ' + line + '\n';
break;
// Exec, esc, and output
case Template.modes.ESCAPED:
this.source += ' ; __append(escapeFn(' + stripSemi(line) + '))' + '\n';
break;
// Exec and output
case Template.modes.RAW:
this.source += ' ; __append(' + stripSemi(line) + ')' + '\n';
break;
case Template.modes.COMMENT:
// Do nothing
break;
// Literal <%% mode, append as raw output
case Template.modes.LITERAL:
this._addOutput(line);
break;
}
}
// In string mode, just add the output
else {
this._addOutput(line);
}
}
if (self.opts.compileDebug && newLineCount) {
this.currentLine += newLineCount;
this.source += ' ; __line = ' + this.currentLine + '\n';
}
}
};
/**
* Escape characters reserved in XML.
*
* This is simply an export of {@link module:utils.escapeXML}.
*
* If `markup` is `undefined` or `null`, the empty string is returned.
*
* @param {String} markup Input string
* @return {String} Escaped string
* @public
* @func
* */
exports.escapeXML = utils.escapeXML;
/**
* Express.js support.
*
* This is an alias for {@link module:ejs.renderFile}, in order to support
* Express.js out-of-the-box.
*
* @func
*/
exports.__express = exports.renderFile;
/**
* Version of EJS.
*
* @readonly
* @type {String}
* @public
*/
exports.VERSION = _VERSION_STRING;
/**
* Name for detection of EJS.
*
* @readonly
* @type {String}
* @public
*/
exports.name = _NAME;
/* istanbul ignore if */
if (typeof window != 'undefined') {
window.ejs = exports;
}
},{"../package.json":6,"./utils":2,"fs":3,"path":4}],2:[function(require,module,exports){
/*
* EJS Embedded JavaScript templates
* Copyright 2112 Matthew Eernisse ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/**
* Private utility functions
* @module utils
* @private
*/
'use strict';
var regExpChars = /[|\\{}()[\]^$+*?.]/g;
/**
* Escape characters reserved in regular expressions.
*
* If `string` is `undefined` or `null`, the empty string is returned.
*
* @param {String} string Input string
* @return {String} Escaped string
* @static
* @private
*/
exports.escapeRegExpChars = function (string) {
// istanbul ignore if
if (!string) {
return '';
}
return String(string).replace(regExpChars, '\\$&');
};
var _ENCODE_HTML_RULES = {
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": '''
};
var _MATCH_HTML = /[&<>'"]/g;
function encode_char(c) {
return _ENCODE_HTML_RULES[c] || c;
}
/**
* Stringified version of constants used by {@link module:utils.escapeXML}.
*
* It is used in the process of generating {@link ClientFunction}s.
*
* @readonly
* @type {String}
*/
var escapeFuncStr =
'var _ENCODE_HTML_RULES = {\n'
+ ' "&": "&"\n'
+ ' , "<": "<"\n'
+ ' , ">": ">"\n'
+ ' , \'"\': """\n'
+ ' , "\'": "'"\n'
+ ' }\n'
+ ' , _MATCH_HTML = /[&<>\'"]/g;\n'
+ 'function encode_char(c) {\n'
+ ' return _ENCODE_HTML_RULES[c] || c;\n'
+ '};\n';
/**
* Escape characters reserved in XML.
*
* If `markup` is `undefined` or `null`, the empty string is returned.
*
* @implements {EscapeCallback}
* @param {String} markup Input string
* @return {String} Escaped string
* @static
* @private
*/
exports.escapeXML = function (markup) {
return markup == undefined
? ''
: String(markup)
.replace(_MATCH_HTML, encode_char);
};
exports.escapeXML.toString = function () {
return Function.prototype.toString.call(this) + ';\n' + escapeFuncStr;
};
/**
* Naive copy of properties from one object to another.
* Does not recurse into non-scalar properties
* Does not check to see if the property has a value before copying
*
* @param {Object} to Destination object
* @param {Object} from Source object
* @return {Object} Destination object
* @static
* @private
*/
exports.shallowCopy = function (to, from) {
from = from || {};
for (var p in from) {
to[p] = from[p];
}
return to;
};
/**
* Naive copy of a list of key names, from one object to another.
* Only copies property if it is actually defined
* Does not recurse into non-scalar properties
*
* @param {Object} to Destination object
* @param {Object} from Source object
* @param {Array} list List of properties to copy
* @return {Object} Destination object
* @static
* @private
*/
exports.shallowCopyFromList = function (to, from, list) {
for (var i = 0; i < list.length; i++) {
var p = list[i];
if (typeof from[p] != 'undefined') {
to[p] = from[p];
}
}
return to;
};
/**
* Simple in-process cache implementation. Does not implement limits of any
* sort.
*
* @implements {Cache}
* @static
* @private
*/
exports.cache = {
_data: {},
set: function (key, val) {
this._data[key] = val;
},
get: function (key) {
return this._data[key];
},
remove: function (key) {
delete this._data[key];
},
reset: function () {
this._data = {};
}
};
/**
* Transforms hyphen case variable into camel case.
*
* @param {String} string Hyphen case string
* @return {String} Camel case string
* @static
* @private
*/
exports.hyphenToCamel = function (str) {
return str.replace(/-[a-z]/g, function (match) { return match[1].toUpperCase(); });
};
},{}],3:[function(require,module,exports){
},{}],4:[function(require,module,exports){
(function (process){
// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
// backported and transplited with Babel, with backwards-compat fixes
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// resolves . and .. elements in a path array with directory names there
// must be no slashes, empty elements, or device names (c:\) in the array
// (so also no leading and trailing slashes - it does not distinguish
// relative and absolute paths)
function normalizeArray(parts, allowAboveRoot) {
// if the path tries to go above the root, `up` ends up > 0
var up = 0;
for (var i = parts.length - 1; i >= 0; i--) {
var last = parts[i];
if (last === '.') {
parts.splice(i, 1);
} else if (last === '..') {
parts.splice(i, 1);
up++;
} else if (up) {
parts.splice(i, 1);
up--;
}
}
// if the path is allowed to go above the root, restore leading ..s
if (allowAboveRoot) {
for (; up--; up) {
parts.unshift('..');
}
}
return parts;
}
// path.resolve([from ...], to)
// posix version
exports.resolve = function() {
var resolvedPath = '',
resolvedAbsolute = false;
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
var path = (i >= 0) ? arguments[i] : process.cwd();
// Skip empty and invalid entries
if (typeof path !== 'string') {
throw new TypeError('Arguments to path.resolve must be strings');
} else if (!path) {
continue;
}
resolvedPath = path + '/' + resolvedPath;
resolvedAbsolute = path.charAt(0) === '/';
}
// At this point the path should be resolved to a full absolute path, but
// handle relative paths to be safe (might happen when process.cwd() fails)
// Normalize the path
resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
return !!p;
}), !resolvedAbsolute).join('/');
return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
};
// path.normalize(path)
// posix version
exports.normalize = function(path) {
var isAbsolute = exports.isAbsolute(path),
trailingSlash = substr(path, -1) === '/';
// Normalize the path
path = normalizeArray(filter(path.split('/'), function(p) {
return !!p;
}), !isAbsolute).join('/');
if (!path && !isAbsolute) {
path = '.';
}
if (path && trailingSlash) {
path += '/';
}
return (isAbsolute ? '/' : '') + path;
};
// posix version
exports.isAbsolute = function(path) {
return path.charAt(0) === '/';
};
// posix version
exports.join = function() {
var paths = Array.prototype.slice.call(arguments, 0);
return exports.normalize(filter(paths, function(p, index) {
if (typeof p !== 'string') {
throw new TypeError('Arguments to path.join must be strings');
}
return p;
}).join('/'));
};
// path.relative(from, to)
// posix version
exports.relative = function(from, to) {
from = exports.resolve(from).substr(1);
to = exports.resolve(to).substr(1);
function trim(arr) {
var start = 0;
for (; start < arr.length; start++) {
if (arr[start] !== '') break;
}
var end = arr.length - 1;
for (; end >= 0; end--) {
if (arr[end] !== '') break;
}
if (start > end) return [];
return arr.slice(start, end - start + 1);
}
var fromParts = trim(from.split('/'));
var toParts = trim(to.split('/'));
var length = Math.min(fromParts.length, toParts.length);
var samePartsLength = length;
for (var i = 0; i < length; i++) {
if (fromParts[i] !== toParts[i]) {
samePartsLength = i;
break;
}
}
var outputParts = [];
for (var i = samePartsLength; i < fromParts.length; i++) {
outputParts.push('..');
}
outputParts = outputParts.concat(toParts.slice(samePartsLength));
return outputParts.join('/');
};
exports.sep = '/';
exports.delimiter = ':';
exports.dirname = function (path) {
if (typeof path !== 'string') path = path + '';
if (path.length === 0) return '.';
var code = path.charCodeAt(0);
var hasRoot = code === 47 /*/*/;
var end = -1;
var matchedSlash = true;
for (var i = path.length - 1; i >= 1; --i) {
code = path.charCodeAt(i);
if (code === 47 /*/*/) {
if (!matchedSlash) {
end = i;
break;
}
} else {
// We saw the first non-path separator
matchedSlash = false;
}
}
if (end === -1) return hasRoot ? '/' : '.';
if (hasRoot && end === 1) {
// return '//';
// Backwards-compat fix:
return '/';
}
return path.slice(0, end);
};
function basename(path) {
if (typeof path !== 'string') path = path + '';
var start = 0;
var end = -1;
var matchedSlash = true;
var i;
for (i = path.length - 1; i >= 0; --i) {
if (path.charCodeAt(i) === 47 /*/*/) {
// If we reached a path separator that was not part of a set of path
// separators at the end of the string, stop now
if (!matchedSlash) {
start = i + 1;
break;
}
} else if (end === -1) {
// We saw the first non-path separator, mark this as the end of our
// path component
matchedSlash = false;
end = i + 1;
}
}
if (end === -1) return '';
return path.slice(start, end);
}
// Uses a mixed approach for backwards-compatibility, as ext behavior changed
// in new Node.js versions, so only basename() above is backported here
exports.basename = function (path, ext) {
var f = basename(path);
if (ext && f.substr(-1 * ext.length) === ext) {
f = f.substr(0, f.length - ext.length);
}
return f;
};
exports.extname = function (path) {
if (typeof path !== 'string') path = path + '';
var startDot = -1;
var startPart = 0;
var end = -1;
var matchedSlash = true;
// Track the state of characters (if any) we see before our first dot and
// after any path separator we find
var preDotState = 0;
for (var i = path.length - 1; i >= 0; --i) {
var code = path.charCodeAt(i);
if (code === 47 /*/*/) {
// If we reached a path separator that was not part of a set of path
// separators at the end of the string, stop now
if (!matchedSlash) {
startPart = i + 1;
break;
}
continue;
}
if (end === -1) {
// We saw the first non-path separator, mark this as the end of our
// extension
matchedSlash = false;
end = i + 1;
}
if (code === 46 /*.*/) {
// If this is our first dot, mark it as the start of our extension
if (startDot === -1)
startDot = i;
else if (preDotState !== 1)
preDotState = 1;
} else if (startDot !== -1) {
// We saw a non-dot and non-path separator before our dot, so we should
// have a good chance at having a non-empty extension
preDotState = -1;
}
}
if (startDot === -1 || end === -1 ||
// We saw a non-dot character immediately before the dot
preDotState === 0 ||
// The (right-most) trimmed path component is exactly '..'
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
return '';
}
return path.slice(startDot, end);
};
function filter (xs, f) {
if (xs.filter) return xs.filter(f);
var res = [];
for (var i = 0; i < xs.length; i++) {
if (f(xs[i], i, xs)) res.push(xs[i]);
}
return res;
}
// String.prototype.substr - negative index don't work in IE8
var substr = true
? function (str, start, len) { return str.substr(start, len) }
: 0
;
}).call(this,require('_process'))
},{"_process":5}],5:[function(require,module,exports){
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
} ())
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch(e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch(e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) { return [] }
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
},{}],6:[function(require,module,exports){
module.exports={
"name": "ejs",
"description": "Embedded JavaScript templates",
"keywords": [
"template",
"engine",
"ejs"
],
"version": "3.1.6",
"author": "Matthew Eernisse <[email protected]> (http://fleegix.org)",
"license": "Apache-2.0",
"bin": {
"ejs": "./bin/cli.js"
},
"main": "./lib/ejs.js",
"jsdelivr": "ejs.min.js",
"unpkg": "ejs.min.js",
"repository": {
"type": "git",
"url": "git://github.com/mde/ejs.git"
},
"bugs": "https://github.com/mde/ejs/issues",
"homepage": "https://github.com/mde/ejs",
"dependencies": {
"jake": "^10.6.1"
},
"devDependencies": {
"browserify": "^16.5.1",
"eslint": "^6.8.0",
"git-directory-deploy": "^1.5.1",
"jsdoc": "^3.6.4",
"lru-cache": "^4.0.1",
"mocha": "^7.1.1",
"uglify-js": "^3.3.16"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
}
}
},{}]},{},[1])(1)
});
/***/ }),
/***/ 776:
/***/ ((module, exports) => {
exports = module.exports = SemVer
var debug
/* istanbul ignore next */
if (typeof process === 'object' &&
process.env &&
process.env.NODE_DEBUG &&
/\bsemver\b/i.test(process.env.NODE_DEBUG)) {
debug = function () {
var args = Array.prototype.slice.call(arguments, 0)
args.unshift('SEMVER')
console.log.apply(console, args)
}
} else {
debug = function () {}
}
// Note: this is the semver.org version of the spec that it implements
// Not necessarily the package version of this code.
exports.SEMVER_SPEC_VERSION = '2.0.0'
var MAX_LENGTH = 256
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
/* istanbul ignore next */ 9007199254740991
// Max safe segment length for coercion.
var MAX_SAFE_COMPONENT_LENGTH = 16
// The actual regexps go on exports.re
var re = exports.re = []
var src = exports.src = []
var t = exports.tokens = {}
var R = 0
function tok (n) {
t[n] = R++
}
// The following Regular Expressions can be used for tokenizing,
// validating, and parsing SemVer version strings.
// ## Numeric Identifier
// A single `0`, or a non-zero digit followed by zero or more digits.
tok('NUMERICIDENTIFIER')
src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*'
tok('NUMERICIDENTIFIERLOOSE')
src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+'
// ## Non-numeric Identifier
// Zero or more digits, followed by a letter or hyphen, and then zero or
// more letters, digits, or hyphens.
tok('NONNUMERICIDENTIFIER')
src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
// ## Main Version
// Three dot-separated numeric identifiers.
tok('MAINVERSION')
src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' +
'(' + src[t.NUMERICIDENTIFIER] + ')\\.' +
'(' + src[t.NUMERICIDENTIFIER] + ')'
tok('MAINVERSIONLOOSE')
src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' +
'(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' +
'(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'
// ## Pre-release Version Identifier
// A numeric identifier, or a non-numeric identifier.
tok('PRERELEASEIDENTIFIER')
src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +
'|' + src[t.NONNUMERICIDENTIFIER] + ')'
tok('PRERELEASEIDENTIFIERLOOSE')
src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +
'|' + src[t.NONNUMERICIDENTIFIER] + ')'
// ## Pre-release Version
// Hyphen, followed by one or more dot-separated pre-release version
// identifiers.
tok('PRERELEASE')
src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +
'(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'
tok('PRERELEASELOOSE')
src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +
'(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'
// ## Build Metadata Identifier
// Any combination of digits, letters, or hyphens.
tok('BUILDIDENTIFIER')
src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
// ## Build Metadata
// Plus sign, followed by one or more period-separated build metadata
// identifiers.
tok('BUILD')
src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] +
'(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))'
// ## Full Version String
// A main version, followed optionally by a pre-release version and
// build metadata.
// Note that the only major, minor, patch, and pre-release sections of
// the version string are capturing groups. The build metadata is not a
// capturing group, because it should not ever be used in version
// comparison.
tok('FULL')
tok('FULLPLAIN')
src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +
src[t.PRERELEASE] + '?' +
src[t.BUILD] + '?'
src[t.FULL] = '^' + src[t.FULLPLAIN] + '$'
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
// common in the npm registry.
tok('LOOSEPLAIN')
src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] +
src[t.PRERELEASELOOSE] + '?' +
src[t.BUILD] + '?'
tok('LOOSE')
src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'
tok('GTLT')
src[t.GTLT] = '((?:<|>)?=?)'
// Something like "2.*" or "1.2.x".
// Note that "x.x" is a valid xRange identifer, meaning "any version"
// Only the first item is strictly required.
tok('XRANGEIDENTIFIERLOOSE')
src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
tok('XRANGEIDENTIFIER')
src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*'
tok('XRANGEPLAIN')
src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +
'(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' +
'(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' +
'(?:' + src[t.PRERELEASE] + ')?' +
src[t.BUILD] + '?' +
')?)?'
tok('XRANGEPLAINLOOSE')
src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
'(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
'(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
'(?:' + src[t.PRERELEASELOOSE] + ')?' +
src[t.BUILD] + '?' +
')?)?'
tok('XRANGE')
src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$'
tok('XRANGELOOSE')
src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$'
// Coercion.
// Extract anything that could conceivably be a part of a valid semver
tok('COERCE')
src[t.COERCE] = '(^|[^\\d])' +
'(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
'(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
'(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
'(?:$|[^\\d])'
tok('COERCERTL')
re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')
// Tilde ranges.
// Meaning is "reasonably at or greater than"
tok('LONETILDE')
src[t.LONETILDE] = '(?:~>?)'
tok('TILDETRIM')
src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+'
re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')
var tildeTrimReplace = '$1~'
tok('TILDE')
src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'
tok('TILDELOOSE')
src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'
// Caret ranges.
// Meaning is "at least and backwards compatible with"
tok('LONECARET')
src[t.LONECARET] = '(?:\\^)'
tok('CARETTRIM')
src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+'
re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')
var caretTrimReplace = '$1^'
tok('CARET')
src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'
tok('CARETLOOSE')
src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'
// A simple gt/lt/eq thing, or just "" to indicate "any version"
tok('COMPARATORLOOSE')
src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'
tok('COMPARATOR')
src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$'
// An expression to strip any whitespace between the gtlt and the thing
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
tok('COMPARATORTRIM')
src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] +
'\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'
// this one has to use the /g flag
re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')
var comparatorTrimReplace = '$1$2$3'
// Something like `1.2.3 - 1.2.4`
// Note that these all use the loose form, because they'll be
// checked against either the strict or loose comparator form
// later.
tok('HYPHENRANGE')
src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' +
'\\s+-\\s+' +
'(' + src[t.XRANGEPLAIN] + ')' +
'\\s*$'
tok('HYPHENRANGELOOSE')
src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +
'\\s+-\\s+' +
'(' + src[t.XRANGEPLAINLOOSE] + ')' +
'\\s*$'
// Star ranges basically just allow anything at all.
tok('STAR')
src[t.STAR] = '(<|>)?=?\\s*\\*'
// Compile to actual regexp objects.
// All are flag-free, unless they were created above with a flag.
for (var i = 0; i < R; i++) {
debug(i, src[i])
if (!re[i]) {
re[i] = new RegExp(src[i])
}
}
exports.parse = parse
function parse (version, options) {
if (!options || typeof options !== 'object') {
options = {
loose: !!options,
includePrerelease: false
}
}
if (version instanceof SemVer) {
return version
}
if (typeof version !== 'string') {
return null
}
if (version.length > MAX_LENGTH) {
return null
}
var r = options.loose ? re[t.LOOSE] : re[t.FULL]
if (!r.test(version)) {
return null
}
try {
return new SemVer(version, options)
} catch (er) {
return null
}
}
exports.valid = valid
function valid (version, options) {
var v = parse(version, options)
return v ? v.version : null
}
exports.clean = clean
function clean (version, options) {
var s = parse(version.trim().replace(/^[=v]+/, ''), options)
return s ? s.version : null
}
exports.SemVer = SemVer
function SemVer (version, options) {
if (!options || typeof options !== 'object') {
options = {
loose: !!options,
includePrerelease: false
}
}
if (version instanceof SemVer) {
if (version.loose === options.loose) {
return version
} else {
version = version.version
}
} else if (typeof version !== 'string') {
throw new TypeError('Invalid Version: ' + version)
}
if (version.length > MAX_LENGTH) {
throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
}
if (!(this instanceof SemVer)) {
return new SemVer(version, options)
}
debug('SemVer', version, options)
this.options = options
this.loose = !!options.loose
var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
if (!m) {
throw new TypeError('Invalid Version: ' + version)
}
this.raw = version
// these are actually numbers
this.major = +m[1]
this.minor = +m[2]
this.patch = +m[3]
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
throw new TypeError('Invalid major version')
}
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
throw new TypeError('Invalid minor version')
}
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
throw new TypeError('Invalid patch version')
}
// numberify any prerelease numeric ids
if (!m[4]) {
this.prerelease = []
} else {
this.prerelease = m[4].split('.').map(function (id) {
if (/^[0-9]+$/.test(id)) {
var num = +id
if (num >= 0 && num < MAX_SAFE_INTEGER) {
return num
}
}
return id
})
}
this.build = m[5] ? m[5].split('.') : []
this.format()
}
SemVer.prototype.format = function () {
this.version = this.major + '.' + this.minor + '.' + this.patch
if (this.prerelease.length) {
this.version += '-' + this.prerelease.join('.')
}
return this.version
}
SemVer.prototype.toString = function () {
return this.version
}
SemVer.prototype.compare = function (other) {
debug('SemVer.compare', this.version, this.options, other)
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options)
}
return this.compareMain(other) || this.comparePre(other)
}
SemVer.prototype.compareMain = function (other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options)
}
return compareIdentifiers(this.major, other.major) ||
compareIdentifiers(this.minor, other.minor) ||
compareIdentifiers(this.patch, other.patch)
}
SemVer.prototype.comparePre = function (other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options)
}
// NOT having a prerelease is > having one
if (this.prerelease.length && !other.prerelease.length) {
return -1
} else if (!this.prerelease.length && other.prerelease.length) {
return 1
} else if (!this.prerelease.length && !other.prerelease.length) {
return 0
}
var i = 0
do {
var a = this.prerelease[i]
var b = other.prerelease[i]
debug('prerelease compare', i, a, b)
if (a === undefined && b === undefined) {
return 0
} else if (b === undefined) {
return 1
} else if (a === undefined) {
return -1
} else if (a === b) {
continue
} else {
return compareIdentifiers(a, b)
}
} while (++i)
}
SemVer.prototype.compareBuild = function (other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options)
}
var i = 0
do {
var a = this.build[i]
var b = other.build[i]
debug('prerelease compare', i, a, b)
if (a === undefined && b === undefined) {
return 0
} else if (b === undefined) {
return 1
} else if (a === undefined) {
return -1
} else if (a === b) {
continue
} else {
return compareIdentifiers(a, b)
}
} while (++i)
}
// preminor will bump the version up to the next minor release, and immediately
// down to pre-release. premajor and prepatch work the same way.
SemVer.prototype.inc = function (release, identifier) {
switch (release) {
case 'premajor':
this.prerelease.length = 0
this.patch = 0
this.minor = 0
this.major++
this.inc('pre', identifier)
break
case 'preminor':
this.prerelease.length = 0
this.patch = 0
this.minor++
this.inc('pre', identifier)
break
case 'prepatch':
// If this is already a prerelease, it will bump to the next version
// drop any prereleases that might already exist, since they are not
// relevant at this point.
this.prerelease.length = 0
this.inc('patch', identifier)
this.inc('pre', identifier)
break
// If the input is a non-prerelease version, this acts the same as
// prepatch.
case 'prerelease':
if (this.prerelease.length === 0) {
this.inc('patch', identifier)
}
this.inc('pre', identifier)
break
case 'major':
// If this is a pre-major version, bump up to the same major version.
// Otherwise increment major.
// 1.0.0-5 bumps to 1.0.0
// 1.1.0 bumps to 2.0.0
if (this.minor !== 0 ||
this.patch !== 0 ||
this.prerelease.length === 0) {
this.major++
}
this.minor = 0
this.patch = 0
this.prerelease = []
break
case 'minor':
// If this is a pre-minor version, bump up to the same minor version.
// Otherwise increment minor.
// 1.2.0-5 bumps to 1.2.0
// 1.2.1 bumps to 1.3.0
if (this.patch !== 0 || this.prerelease.length === 0) {
this.minor++
}
this.patch = 0
this.prerelease = []
break
case 'patch':
// If this is not a pre-release version, it will increment the patch.
// If it is a pre-release it will bump up to the same patch version.
// 1.2.0-5 patches to 1.2.0
// 1.2.0 patches to 1.2.1
if (this.prerelease.length === 0) {
this.patch++
}
this.prerelease = []
break
// This probably shouldn't be used publicly.
// 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
case 'pre':
if (this.prerelease.length === 0) {
this.prerelease = [0]
} else {
var i = this.prerelease.length
while (--i >= 0) {
if (typeof this.prerelease[i] === 'number') {
this.prerelease[i]++
i = -2
}
}
if (i === -1) {
// didn't increment anything
this.prerelease.push(0)
}
}
if (identifier) {
// 1.2.0-beta.1 bumps to 1.2.0-beta.2,
// 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
if (this.prerelease[0] === identifier) {
if (isNaN(this.prerelease[1])) {
this.prerelease = [identifier, 0]
}
} else {
this.prerelease = [identifier, 0]
}
}
break
default:
throw new Error('invalid increment argument: ' + release)
}
this.format()
this.raw = this.version
return this
}
exports.inc = inc
function inc (version, release, loose, identifier) {
if (typeof (loose) === 'string') {
identifier = loose
loose = undefined
}
try {
return new SemVer(version, loose).inc(release, identifier).version
} catch (er) {
return null
}
}
exports.diff = diff
function diff (version1, version2) {
if (eq(version1, version2)) {
return null
} else {
var v1 = parse(version1)
var v2 = parse(version2)
var prefix = ''
if (v1.prerelease.length || v2.prerelease.length) {
prefix = 'pre'
var defaultResult = 'prerelease'
}
for (var key in v1) {
if (key === 'major' || key === 'minor' || key === 'patch') {
if (v1[key] !== v2[key]) {
return prefix + key
}
}
}
return defaultResult // may be undefined
}
}
exports.compareIdentifiers = compareIdentifiers
var numeric = /^[0-9]+$/
function compareIdentifiers (a, b) {
var anum = numeric.test(a)
var bnum = numeric.test(b)
if (anum && bnum) {
a = +a
b = +b
}
return a === b ? 0
: (anum && !bnum) ? -1
: (bnum && !anum) ? 1
: a < b ? -1
: 1
}
exports.rcompareIdentifiers = rcompareIdentifiers
function rcompareIdentifiers (a, b) {
return compareIdentifiers(b, a)
}
exports.major = major
function major (a, loose) {
return new SemVer(a, loose).major
}
exports.minor = minor
function minor (a, loose) {
return new SemVer(a, loose).minor
}
exports.patch = patch
function patch (a, loose) {
return new SemVer(a, loose).patch
}
exports.compare = compare
function compare (a, b, loose) {
return new SemVer(a, loose).compare(new SemVer(b, loose))
}
exports.compareLoose = compareLoose
function compareLoose (a, b) {
return compare(a, b, true)
}
exports.compareBuild = compareBuild
function compareBuild (a, b, loose) {
var versionA = new SemVer(a, loose)
var versionB = new SemVer(b, loose)
return versionA.compare(versionB) || versionA.compareBuild(versionB)
}
exports.rcompare = rcompare
function rcompare (a, b, loose) {
return compare(b, a, loose)
}
exports.sort = sort
function sort (list, loose) {
return list.sort(function (a, b) {
return exports.compareBuild(a, b, loose)
})
}
exports.rsort = rsort
function rsort (list, loose) {
return list.sort(function (a, b) {
return exports.compareBuild(b, a, loose)
})
}
exports.gt = gt
function gt (a, b, loose) {
return compare(a, b, loose) > 0
}
exports.lt = lt
function lt (a, b, loose) {
return compare(a, b, loose) < 0
}
exports.eq = eq
function eq (a, b, loose) {
return compare(a, b, loose) === 0
}
exports.neq = neq
function neq (a, b, loose) {
return compare(a, b, loose) !== 0
}
exports.gte = gte
function gte (a, b, loose) {
return compare(a, b, loose) >= 0
}
exports.lte = lte
function lte (a, b, loose) {
return compare(a, b, loose) <= 0
}
exports.cmp = cmp
function cmp (a, op, b, loose) {
switch (op) {
case '===':
if (typeof a === 'object')
a = a.version
if (typeof b === 'object')
b = b.version
return a === b
case '!==':
if (typeof a === 'object')
a = a.version
if (typeof b === 'object')
b = b.version
return a !== b
case '':
case '=':
case '==':
return eq(a, b, loose)
case '!=':
return neq(a, b, loose)
case '>':
return gt(a, b, loose)
case '>=':
return gte(a, b, loose)
case '<':
return lt(a, b, loose)
case '<=':
return lte(a, b, loose)
default:
throw new TypeError('Invalid operator: ' + op)
}
}
exports.Comparator = Comparator
function Comparator (comp, options) {
if (!options || typeof options !== 'object') {
options = {
loose: !!options,
includePrerelease: false
}
}
if (comp instanceof Comparator) {
if (comp.loose === !!options.loose) {
return comp
} else {
comp = comp.value
}
}
if (!(this instanceof Comparator)) {
return new Comparator(comp, options)
}
debug('comparator', comp, options)
this.options = options
this.loose = !!options.loose
this.parse(comp)
if (this.semver === ANY) {
this.value = ''
} else {
this.value = this.operator + this.semver.version
}
debug('comp', this)
}
var ANY = {}
Comparator.prototype.parse = function (comp) {
var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
var m = comp.match(r)
if (!m) {
throw new TypeError('Invalid comparator: ' + comp)
}
this.operator = m[1] !== undefined ? m[1] : ''
if (this.operator === '=') {
this.operator = ''
}
// if it literally is just '>' or '' then allow anything.
if (!m[2]) {
this.semver = ANY
} else {
this.semver = new SemVer(m[2], this.options.loose)
}
}
Comparator.prototype.toString = function () {
return this.value
}
Comparator.prototype.test = function (version) {
debug('Comparator.test', version, this.options.loose)
if (this.semver === ANY || version === ANY) {
return true
}
if (typeof version === 'string') {
try {
version = new SemVer(version, this.options)
} catch (er) {
return false
}
}
return cmp(version, this.operator, this.semver, this.options)
}
Comparator.prototype.intersects = function (comp, options) {
if (!(comp instanceof Comparator)) {
throw new TypeError('a Comparator is required')
}
if (!options || typeof options !== 'object') {
options = {
loose: !!options,
includePrerelease: false
}
}
var rangeTmp
if (this.operator === '') {
if (this.value === '') {
return true
}
rangeTmp = new Range(comp.value, options)
return satisfies(this.value, rangeTmp, options)
} else if (comp.operator === '') {
if (comp.value === '') {
return true
}
rangeTmp = new Range(this.value, options)
return satisfies(comp.semver, rangeTmp, options)
}
var sameDirectionIncreasing =
(this.operator === '>=' || this.operator === '>') &&
(comp.operator === '>=' || comp.operator === '>')
var sameDirectionDecreasing =
(this.operator === '<=' || this.operator === '<') &&
(comp.operator === '<=' || comp.operator === '<')
var sameSemVer = this.semver.version === comp.semver.version
var differentDirectionsInclusive =
(this.operator === '>=' || this.operator === '<=') &&
(comp.operator === '>=' || comp.operator === '<=')
var oppositeDirectionsLessThan =
cmp(this.semver, '<', comp.semver, options) &&
((this.operator === '>=' || this.operator === '>') &&
(comp.operator === '<=' || comp.operator === '<'))
var oppositeDirectionsGreaterThan =
cmp(this.semver, '>', comp.semver, options) &&
((this.operator === '<=' || this.operator === '<') &&
(comp.operator === '>=' || comp.operator === '>'))
return sameDirectionIncreasing || sameDirectionDecreasing ||
(sameSemVer && differentDirectionsInclusive) ||
oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
}
exports.Range = Range
function Range (range, options) {
if (!options || typeof options !== 'object') {
options = {
loose: !!options,
includePrerelease: false
}
}
if (range instanceof Range) {
if (range.loose === !!options.loose &&
range.includePrerelease === !!options.includePrerelease) {
return range
} else {
return new Range(range.raw, options)
}
}
if (range instanceof Comparator) {
return new Range(range.value, options)
}
if (!(this instanceof Range)) {
return new Range(range, options)
}
this.options = options
this.loose = !!options.loose
this.includePrerelease = !!options.includePrerelease
// First, split based on boolean or ||
this.raw = range
this.set = range.split(/\s*\|\|\s*/).map(function (range) {
return this.parseRange(range.trim())
}, this).filter(function (c) {
// throw out any that are not relevant for whatever reason
return c.length
})
if (!this.set.length) {
throw new TypeError('Invalid SemVer Range: ' + range)
}
this.format()
}
Range.prototype.format = function () {
this.range = this.set.map(function (comps) {
return comps.join(' ').trim()
}).join('||').trim()
return this.range
}
Range.prototype.toString = function () {
return this.range
}
Range.prototype.parseRange = function (range) {
var loose = this.options.loose
range = range.trim()
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
range = range.replace(hr, hyphenReplace)
debug('hyphen replace', range)
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
debug('comparator trim', range, re[t.COMPARATORTRIM])
// `~ 1.2.3` => `~1.2.3`
range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
// `^ 1.2.3` => `^1.2.3`
range = range.replace(re[t.CARETTRIM], caretTrimReplace)
// normalize spaces
range = range.split(/\s+/).join(' ')
// At this point, the range is completely trimmed and
// ready to be split into comparators.
var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
var set = range.split(' ').map(function (comp) {
return parseComparator(comp, this.options)
}, this).join(' ').split(/\s+/)
if (this.options.loose) {
// in loose mode, throw out any that are not valid comparators
set = set.filter(function (comp) {
return !!comp.match(compRe)
})
}
set = set.map(function (comp) {
return new Comparator(comp, this.options)
}, this)
return set
}
Range.prototype.intersects = function (range, options) {
if (!(range instanceof Range)) {
throw new TypeError('a Range is required')
}
return this.set.some(function (thisComparators) {
return (
isSatisfiable(thisComparators, options) &&
range.set.some(function (rangeComparators) {
return (
isSatisfiable(rangeComparators, options) &&
thisComparators.every(function (thisComparator) {
return rangeComparators.every(function (rangeComparator) {
return thisComparator.intersects(rangeComparator, options)
})
})
)
})
)
})
}
// take a set of comparators and determine whether there
// exists a version which can satisfy it
function isSatisfiable (comparators, options) {
var result = true
var remainingComparators = comparators.slice()
var testComparator = remainingComparators.pop()
while (result && remainingComparators.length) {
result = remainingComparators.every(function (otherComparator) {
return testComparator.intersects(otherComparator, options)
})
testComparator = remainingComparators.pop()
}
return result
}
// Mostly just for testing and legacy API reasons
exports.toComparators = toComparators
function toComparators (range, options) {
return new Range(range, options).set.map(function (comp) {
return comp.map(function (c) {
return c.value
}).join(' ').trim().split(' ')
})
}
// comprised of xranges, tildes, stars, and gtlt's at this point.
// already replaced the hyphen ranges
// turn into a set of JUST comparators.
function parseComparator (comp, options) {
debug('comp', comp, options)
comp = replaceCarets(comp, options)
debug('caret', comp)
comp = replaceTildes(comp, options)
debug('tildes', comp)
comp = replaceXRanges(comp, options)
debug('xrange', comp)
comp = replaceStars(comp, options)
debug('stars', comp)
return comp
}
function isX (id) {
return !id || id.toLowerCase() === 'x' || id === '*'
}
// ~, ~> --> * (any, kinda silly)
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
function replaceTildes (comp, options) {
return comp.trim().split(/\s+/).map(function (comp) {
return replaceTilde(comp, options)
}).join(' ')
}
function replaceTilde (comp, options) {
var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
return comp.replace(r, function (_, M, m, p, pr) {
debug('tilde', comp, _, M, m, p, pr)
var ret
if (isX(M)) {
ret = ''
} else if (isX(m)) {
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
} else if (isX(p)) {
// ~1.2 == >=1.2.0 <1.3.0
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
} else if (pr) {
debug('replaceTilde pr', pr)
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
' <' + M + '.' + (+m + 1) + '.0'
} else {
// ~1.2.3 == >=1.2.3 <1.3.0
ret = '>=' + M + '.' + m + '.' + p +
' <' + M + '.' + (+m + 1) + '.0'
}
debug('tilde return', ret)
return ret
})
}
// ^ --> * (any, kinda silly)
// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
// ^1.2.3 --> >=1.2.3 <2.0.0
// ^1.2.0 --> >=1.2.0 <2.0.0
function replaceCarets (comp, options) {
return comp.trim().split(/\s+/).map(function (comp) {
return replaceCaret(comp, options)
}).join(' ')
}
function replaceCaret (comp, options) {
debug('caret', comp, options)
var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
return comp.replace(r, function (_, M, m, p, pr) {
debug('caret', comp, _, M, m, p, pr)
var ret
if (isX(M)) {
ret = ''
} else if (isX(m)) {
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
} else if (isX(p)) {
if (M === '0') {
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
} else {
ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
}
} else if (pr) {
debug('replaceCaret pr', pr)
if (M === '0') {
if (m === '0') {
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
' <' + M + '.' + m + '.' + (+p + 1)
} else {
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
' <' + M + '.' + (+m + 1) + '.0'
}
} else {
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
' <' + (+M + 1) + '.0.0'
}
} else {
debug('no pr')
if (M === '0') {
if (m === '0') {
ret = '>=' + M + '.' + m + '.' + p +
' <' + M + '.' + m + '.' + (+p + 1)
} else {
ret = '>=' + M + '.' + m + '.' + p +
' <' + M + '.' + (+m + 1) + '.0'
}
} else {
ret = '>=' + M + '.' + m + '.' + p +
' <' + (+M + 1) + '.0.0'
}
}
debug('caret return', ret)
return ret
})
}
function replaceXRanges (comp, options) {
debug('replaceXRanges', comp, options)
return comp.split(/\s+/).map(function (comp) {
return replaceXRange(comp, options)
}).join(' ')
}
function replaceXRange (comp, options) {
comp = comp.trim()
var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
debug('xRange', comp, ret, gtlt, M, m, p, pr)
var xM = isX(M)
var xm = xM || isX(m)
var xp = xm || isX(p)
var anyX = xp
if (gtlt === '=' && anyX) {
gtlt = ''
}
// if we're including prereleases in the match, then we need
// to fix this to -0, the lowest possible prerelease value
pr = options.includePrerelease ? '-0' : ''
if (xM) {
if (gtlt === '>' || gtlt === '<') {
// nothing is allowed
ret = '<0.0.0-0'
} else {
// nothing is forbidden
ret = '*'
}
} else if (gtlt && anyX) {
// we know patch is an x, because we have any x at all.
// replace X with 0
if (xm) {
m = 0
}
p = 0
if (gtlt === '>') {
// >1 => >=2.0.0
// >1.2 => >=1.3.0
// >1.2.3 => >= 1.2.4
gtlt = '>='
if (xm) {
M = +M + 1
m = 0
p = 0
} else {
m = +m + 1
p = 0
}
} else if (gtlt === '<=') {
// <=0.7.x is actually <0.8.0, since any 0.7.x should
// pass. Similarly, <=7.x is actually <8.0.0, etc.
gtlt = '<'
if (xm) {
M = +M + 1
} else {
m = +m + 1
}
}
ret = gtlt + M + '.' + m + '.' + p + pr
} else if (xm) {
ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr
} else if (xp) {
ret = '>=' + M + '.' + m + '.0' + pr +
' <' + M + '.' + (+m + 1) + '.0' + pr
}
debug('xRange return', ret)
return ret
})
}
// Because * is AND-ed with everything else in the comparator,
// and '' means "any version", just remove the *s entirely.
function replaceStars (comp, options) {
debug('replaceStars', comp, options)
// Looseness is ignored here. star is always as loose as it gets!
return comp.trim().replace(re[t.STAR], '')
}
// This function is passed to string.replace(re[t.HYPHENRANGE])
// M, m, patch, prerelease, build
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
// 1.2 - 3.4 => >=1.2.0 <3.5.0
function hyphenReplace ($0,
from, fM, fm, fp, fpr, fb,
to, tM, tm, tp, tpr, tb) {
if (isX(fM)) {
from = ''
} else if (isX(fm)) {
from = '>=' + fM + '.0.0'
} else if (isX(fp)) {
from = '>=' + fM + '.' + fm + '.0'
} else {
from = '>=' + from
}
if (isX(tM)) {
to = ''
} else if (isX(tm)) {
to = '<' + (+tM + 1) + '.0.0'
} else if (isX(tp)) {
to = '<' + tM + '.' + (+tm + 1) + '.0'
} else if (tpr) {
to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
} else {
to = '<=' + to
}
return (from + ' ' + to).trim()
}
// if ANY of the sets match ALL of its comparators, then pass
Range.prototype.test = function (version) {
if (!version) {
return false
}
if (typeof version === 'string') {
try {
version = new SemVer(version, this.options)
} catch (er) {
return false
}
}
for (var i = 0; i < this.set.length; i++) {
if (testSet(this.set[i], version, this.options)) {
return true
}
}
return false
}
function testSet (set, version, options) {
for (var i = 0; i < set.length; i++) {
if (!set[i].test(version)) {
return false
}
}
if (version.prerelease.length && !options.includePrerelease) {
// Find the set of versions that are allowed to have prereleases
// For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
// That should allow `1.2.3-pr.2` to pass.
// However, `1.2.4-alpha.notready` should NOT be allowed,
// even though it's within the range set by the comparators.
for (i = 0; i < set.length; i++) {
debug(set[i].semver)
if (set[i].semver === ANY) {
continue
}
if (set[i].semver.prerelease.length > 0) {
var allowed = set[i].semver
if (allowed.major === version.major &&
allowed.minor === version.minor &&
allowed.patch === version.patch) {
return true
}
}
}
// Version has a -pre, but it's not one of the ones we like.
return false
}
return true
}
exports.satisfies = satisfies
function satisfies (version, range, options) {
try {
range = new Range(range, options)
} catch (er) {
return false
}
return range.test(version)
}
exports.maxSatisfying = maxSatisfying
function maxSatisfying (versions, range, options) {
var max = null
var maxSV = null
try {
var rangeObj = new Range(range, options)
} catch (er) {
return null
}
versions.forEach(function (v) {
if (rangeObj.test(v)) {
// satisfies(v, range, options)
if (!max || maxSV.compare(v) === -1) {
// compare(max, v, true)
max = v
maxSV = new SemVer(max, options)
}
}
})
return max
}
exports.minSatisfying = minSatisfying
function minSatisfying (versions, range, options) {
var min = null
var minSV = null
try {
var rangeObj = new Range(range, options)
} catch (er) {
return null
}
versions.forEach(function (v) {
if (rangeObj.test(v)) {
// satisfies(v, range, options)
if (!min || minSV.compare(v) === 1) {
// compare(min, v, true)
min = v
minSV = new SemVer(min, options)
}
}
})
return min
}
exports.minVersion = minVersion
function minVersion (range, loose) {
range = new Range(range, loose)
var minver = new SemVer('0.0.0')
if (range.test(minver)) {
return minver
}
minver = new SemVer('0.0.0-0')
if (range.test(minver)) {
return minver
}
minver = null
for (var i = 0; i < range.set.length; ++i) {
var comparators = range.set[i]
comparators.forEach(function (comparator) {
// Clone to avoid manipulating the comparator's semver object.
var compver = new SemVer(comparator.semver.version)
switch (comparator.operator) {
case '>':
if (compver.prerelease.length === 0) {
compver.patch++
} else {
compver.prerelease.push(0)
}
compver.raw = compver.format()
/* fallthrough */
case '':
case '>=':
if (!minver || gt(minver, compver)) {
minver = compver
}
break
case '<':
case '<=':
/* Ignore maximum versions */
break
/* istanbul ignore next */
default:
throw new Error('Unexpected operation: ' + comparator.operator)
}
})
}
if (minver && range.test(minver)) {
return minver
}
return null
}
exports.validRange = validRange
function validRange (range, options) {
try {
// Return '*' instead of '' so that truthiness works.
// This will throw if it's invalid anyway
return new Range(range, options).range || '*'
} catch (er) {
return null
}
}
// Determine if version is less than all the versions possible in the range
exports.ltr = ltr
function ltr (version, range, options) {
return outside(version, range, '<', options)
}
// Determine if version is greater than all the versions possible in the range.
exports.gtr = gtr
function gtr (version, range, options) {
return outside(version, range, '>', options)
}
exports.outside = outside
function outside (version, range, hilo, options) {
version = new SemVer(version, options)
range = new Range(range, options)
var gtfn, ltefn, ltfn, comp, ecomp
switch (hilo) {
case '>':
gtfn = gt
ltefn = lte
ltfn = lt
comp = '>'
ecomp = '>='
break
case '<':
gtfn = lt
ltefn = gte
ltfn = gt
comp = '<'
ecomp = '<='
break
default:
throw new TypeError('Must provide a hilo val of "<" or ">"')
}
// If it satisifes the range it is not outside
if (satisfies(version, range, options)) {
return false
}
// From now on, variable terms are as if we're in "gtr" mode.
// but note that everything is flipped for the "ltr" function.
for (var i = 0; i < range.set.length; ++i) {
var comparators = range.set[i]
var high = null
var low = null
comparators.forEach(function (comparator) {
if (comparator.semver === ANY) {
comparator = new Comparator('>=0.0.0')
}
high = high || comparator
low = low || comparator
if (gtfn(comparator.semver, high.semver, options)) {
high = comparator
} else if (ltfn(comparator.semver, low.semver, options)) {
low = comparator
}
})
// If the edge version comparator has a operator then our version
// isn't outside it
if (high.operator === comp || high.operator === ecomp) {
return false
}
// If the lowest version comparator has an operator and our version
// is less than it then it isn't higher than the range
if ((!low.operator || low.operator === comp) &&
ltefn(version, low.semver)) {
return false
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
return false
}
}
return true
}
exports.prerelease = prerelease
function prerelease (version, options) {
var parsed = parse(version, options)
return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
}
exports.intersects = intersects
function intersects (r1, r2, options) {
r1 = new Range(r1, options)
r2 = new Range(r2, options)
return r1.intersects(r2)
}
exports.coerce = coerce
function coerce (version, options) {
if (version instanceof SemVer) {
return version
}
if (typeof version === 'number') {
version = String(version)
}
if (typeof version !== 'string') {
return null
}
options = options || {}
var match = null
if (!options.rtl) {
match = version.match(re[t.COERCE])
} else {
// Find the right-most coercible string that does not share
// a terminus with a more left-ward coercible string.
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
//
// Walk through the string checking with a /g regexp
// Manually set the index so as to pick up overlapping matches.
// Stop when we get a match that ends at the string end, since no
// coercible string can be more right-ward without the same terminus.
var next
while ((next = re[t.COERCERTL].exec(version)) &&
(!match || match.index + match[0].length !== version.length)
) {
if (!match ||
next.index + next[0].length !== match.index + match[0].length) {
match = next
}
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
}
// leave it in a clean state
re[t.COERCERTL].lastIndex = -1
}
if (match === null) {
return null
}
return parse(match[2] +
'.' + (match[3] || '0') +
'.' + (match[4] || '0'), options)
}
/***/ }),
/***/ 316:
/***/ ((module) => {
"use strict";
var memo = {};
/* istanbul ignore next */
function getTarget(target) {
if (typeof memo[target] === "undefined") {
var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
try {
// This will throw an exception if access to iframe is blocked
// due to cross-origin restrictions
styleTarget = styleTarget.contentDocument.head;
} catch (e) {
// istanbul ignore next
styleTarget = null;
}
}
memo[target] = styleTarget;
}
return memo[target];
}
module.exports = getTarget;
/***/ }),
/***/ 597:
/***/ ((module) => {
"use strict";
var stylesInDom = [];
function getIndexByIdentifier(identifier) {
var result = -1;
for (var i = 0; i < stylesInDom.length; i++) {
if (stylesInDom[i].identifier === identifier) {
result = i;
break;
}
}
return result;
}
function modulesToDom(list, options) {
var idCountMap = {};
var identifiers = [];
for (var i = 0; i < list.length; i++) {
var item = list[i];
var id = options.base ? item[0] + options.base : item[0];
var count = idCountMap[id] || 0;
var identifier = "".concat(id, " ").concat(count);
idCountMap[id] = count + 1;
var index = getIndexByIdentifier(identifier);
var obj = {
css: item[1],
media: item[2],
sourceMap: item[3]
};
if (index !== -1) {
stylesInDom[index].references++;
stylesInDom[index].updater(obj);
} else {
stylesInDom.push({
identifier: identifier,
updater: addStyle(obj, options),
references: 1
});
}
identifiers.push(identifier);
}
return identifiers;
}
function addStyle(obj, options) {
var api = options.domAPI(options);
api.update(obj);
return function updateStyle(newObj) {
if (newObj) {
if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {
return;
}
api.update(obj = newObj);
} else {
api.remove();
}
};
}
module.exports = function (list, options) {
options = options || {};
list = list || [];
var lastIdentifiers = modulesToDom(list, options);
return function update(newList) {
newList = newList || [];
for (var i = 0; i < lastIdentifiers.length; i++) {
var identifier = lastIdentifiers[i];
var index = getIndexByIdentifier(identifier);
stylesInDom[index].references--;
}
var newLastIdentifiers = modulesToDom(newList, options);
for (var _i = 0; _i < lastIdentifiers.length; _i++) {
var _identifier = lastIdentifiers[_i];
var _index = getIndexByIdentifier(_identifier);
if (stylesInDom[_index].references === 0) {
stylesInDom[_index].updater();
stylesInDom.splice(_index, 1);
}
}
lastIdentifiers = newLastIdentifiers;
};
};
/***/ }),
/***/ 667:
/***/ ((module) => {
"use strict";
/* istanbul ignore next */
function insertStyleElement(options) {
var style = document.createElement("style");
options.setAttributes(style, options.attributes);
options.insert(style);
return style;
}
module.exports = insertStyleElement;
/***/ }),
/***/ 774:
/***/ ((module) => {
"use strict";
/* istanbul ignore next */
function apply(style, options, obj) {
var css = obj.css;
var media = obj.media;
var sourceMap = obj.sourceMap;
if (media) {
style.setAttribute("media", media);
} else {
style.removeAttribute("media");
}
if (sourceMap && typeof btoa !== "undefined") {
css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
} // For old IE
/* istanbul ignore if */
options.styleTagTransform(css, style);
}
function removeStyleElement(style) {
// istanbul ignore if
if (style.parentNode === null) {
return false;
}
style.parentNode.removeChild(style);
}
/* istanbul ignore next */
function domAPI(options) {
var style = options.insertStyleElement(options);
return {
update: function update(obj) {
apply(style, options, obj);
},
remove: function remove() {
removeStyleElement(style);
}
};
}
module.exports = domAPI;
/***/ }),
/***/ 766:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var v1 = __webpack_require__(616);
var v4 = __webpack_require__(358);
var uuid = v4;
uuid.v1 = v1;
uuid.v4 = v4;
module.exports = uuid;
/***/ }),
/***/ 594:
/***/ ((module) => {
/**
* Convert array of 16 byte values to UUID string format of the form:
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
*/
var byteToHex = [];
for (var i = 0; i < 256; ++i) {
byteToHex[i] = (i + 0x100).toString(16).substr(1);
}
function bytesToUuid(buf, offset) {
var i = offset || 0;
var bth = byteToHex;
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
return ([
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]]
]).join('');
}
module.exports = bytesToUuid;
/***/ }),
/***/ 880:
/***/ ((module) => {
// Unique ID creation requires a high quality random # generator. In the
// browser this is a little complicated due to unknown quality of Math.random()
// and inconsistent support for the `crypto` API. We do the best we can via
// feature-detection
// getRandomValues needs to be invoked in a context where "this" is a Crypto
// implementation. Also, find the complete implementation of crypto on IE11.
var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
(typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
if (getRandomValues) {
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
module.exports = function whatwgRNG() {
getRandomValues(rnds8);
return rnds8;
};
} else {
// Math.random()-based (RNG)
//
// If all else fails, use Math.random(). It's fast, but is of unspecified
// quality.
var rnds = new Array(16);
module.exports = function mathRNG() {
for (var i = 0, r; i < 16; i++) {
if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
}
return rnds;
};
}
/***/ }),
/***/ 616:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var rng = __webpack_require__(880);
var bytesToUuid = __webpack_require__(594);
// **`v1()` - Generate time-based UUID**
//
// Inspired by https://github.com/LiosK/UUID.js
// and http://docs.python.org/library/uuid.html
var _nodeId;
var _clockseq;
// Previous uuid creation time
var _lastMSecs = 0;
var _lastNSecs = 0;
// See https://github.com/uuidjs/uuid for API details
function v1(options, buf, offset) {
var i = buf && offset || 0;
var b = buf || [];
options = options || {};
var node = options.node || _nodeId;
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
// node and clockseq need to be initialized to random values if they're not
// specified. We do this lazily to minimize issues related to insufficient
// system entropy. See #189
if (node == null || clockseq == null) {
var seedBytes = rng();
if (node == null) {
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
node = _nodeId = [
seedBytes[0] | 0x01,
seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
];
}
if (clockseq == null) {
// Per 4.2.2, randomize (14 bit) clockseq
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
}
}
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
// Per 4.2.1.2, use count of uuid's generated during the current clock
// cycle to simulate higher resolution clock
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
// Time since last uuid creation (in msecs)
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
// Per 4.2.1.2, Bump clockseq on clock regression
if (dt < 0 && options.clockseq === undefined) {
clockseq = clockseq + 1 & 0x3fff;
}
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
// time interval
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
nsecs = 0;
}
// Per 4.2.1.2 Throw error if too many uuids are requested
if (nsecs >= 10000) {
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
}
_lastMSecs = msecs;
_lastNSecs = nsecs;
_clockseq = clockseq;
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
msecs += 12219292800000;
// `time_low`
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
b[i++] = tl >>> 24 & 0xff;
b[i++] = tl >>> 16 & 0xff;
b[i++] = tl >>> 8 & 0xff;
b[i++] = tl & 0xff;
// `time_mid`
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
b[i++] = tmh >>> 8 & 0xff;
b[i++] = tmh & 0xff;
// `time_high_and_version`
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
b[i++] = tmh >>> 16 & 0xff;
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
b[i++] = clockseq >>> 8 | 0x80;
// `clock_seq_low`
b[i++] = clockseq & 0xff;
// `node`
for (var n = 0; n < 6; ++n) {
b[i + n] = node[n];
}
return buf ? buf : bytesToUuid(b);
}
module.exports = v1;
/***/ }),
/***/ 358:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var rng = __webpack_require__(880);
var bytesToUuid = __webpack_require__(594);
function v4(options, buf, offset) {
var i = buf && offset || 0;
if (typeof(options) == 'string') {
buf = options === 'binary' ? new Array(16) : null;
options = null;
}
options = options || {};
var rnds = options.random || (options.rng || rng)();
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
// Copy bytes to buffer, if provided
if (buf) {
for (var ii = 0; ii < 16; ++ii) {
buf[i + ii] = rnds[ii];
}
}
return buf || bytesToUuid(rnds);
}
module.exports = v4;
/***/ }),
/***/ 391:
/***/ ((module) => {
"use strict";
module.exports = "<div id=\"pizyds_rain_header_field\">\r\n <p>\r\n 版本:<%= BUILD_VERSION %> | 编译时间:<%= BUILD_TIME %><br/>\r\n 脚本开源维护中,欢迎 <a href=\"https://www.pizyds.com/rain-classroom-pdf-direct-download/\" target=\"_blank\" class=\"no-text-decoration\">反馈问题</a><br/>\r\n </p>\r\n <p id=\"pizyds_rain_header_message\" class=\"text-emphasis\">\r\n <%- HEADER_MESSAGE %>\r\n </p>\r\n</div>\r\n\r\n<hr/>\r\n\r\n<div id=\"pizyds_rain_switch_field\">\r\n <div class=\"form-check form-switch form-check-inline\">\r\n <input class=\"form-check-input\" type=\"checkbox\" id=\"pizyds_rain_answer_switch\" <%= ANS_ENABLED ? \"checked\" : \"\" %>>\r\n <label class=\"form-check-label\" for=\"pizyds_rain_answer_switch\" title=\"仅支持“课堂”类型的课件\">选择题答案</label>\r\n </div>\r\n\r\n <div class=\"form-check form-switch form-check-inline\">\r\n <input class=\"form-check-input\" type=\"checkbox\" id=\"pizyds_rain_drm_switch\" <%= DRM_ENABLED ? \"checked\" : \"\" %> disabled>\r\n <label class=\"form-check-label\" for=\"pizyds_rain_drm_switch\" title=\"默认不可更改,请查看帮助\">\r\n DRM <a href=\"https://www.pizyds.com/rain-classroom-pdf-direct-download-pizyds-rain-drm/\" target=\"_blank\" class=\"no-text-decoration\">( ? )</a>\r\n </label>\r\n </div>\r\n</div>\r\n\r\n<hr/>\r\n\r\n<div id=\"pizyds_rain_answer_font_size_field\" class=\"<%= ANS_ENABLED ? \"\" : \"disabledField\" %>\">\r\n <label for=\"pizyds_rain_answer_font_size_range\" class=\"form-label\">\r\n 答案字号 \r\n <span id=\"pizyds_rain_answer_font_size_show\"><%= FONT_SIZE %></span>\r\n </label>\r\n <span id=\"pizyds_rain_answer_font_size_default\" title=\"复位\">\r\n <%- DEFAULT_SVG %>\r\n </span>\r\n <input id=\"pizyds_rain_answer_font_size_range\" type=\"range\" class=\"form-range\" min=\"0\" max=\"80\" step=\"1\" value=\"<%= FONT_SIZE %>\" <%= ANS_ENABLED ? \"\" : \"disabled\" %>>\r\n</div>\r\n\r\n<div id=\"pizyds_rain_footer_field\">\r\n <span class=\"footer-span\">\r\n - \r\n <a href=\"https://www.pizyds.com/rain-classroom-pdf-direct-download/\" target=\"_blank\" title=\"主页\">\r\n <%- HOUSE_SVG %>\r\n </a>\r\n | \r\n <a href=\"https://github.com/PillarsZhang/Rain-Classroom-PDF-Direct-Download\" target=\"_blank\" title=\"Github\">\r\n <%- GITHUB_SVG %>\r\n </a>\r\n | \r\n <a href=\"https://greasyfork.org/scripts/424050\" target=\"_blank\" title=\"Greasy Fork\">\r\n <%- CODE_SVG %>\r\n </a>\r\n -\r\n </span>\r\n</div>";
/***/ }),
/***/ 666:
/***/ ((module) => {
"use strict";
module.exports = "雨课堂课件PDF下载工具";
/***/ }),
/***/ 351:
/***/ ((module) => {
"use strict";
module.exports = "<span id=\"pizyds_rain_button_field\" class=\"<%= FIELD_CLASS %> <%= CLASS %> noselect\">\r\n <span id=\"pizyds_rain_waiting\">\r\n <span id=\"pizyds_rain_download_button\" title=\"点击下载PPT\">\r\n <%- DOWNLOAD_BUTTON_ICON %> 下载课件\r\n </span>\r\n <span id=\"pizyds_rain_config_button\">\r\n [ <%- CONFIG_BUTTON_ICON %> ]\r\n </span>\r\n </span>\r\n <span id=\"pizyds_rain_running\" hidden>\r\n <span title=\"运行中\">\r\n <%- DOWNLOAD_BUTTON_ICON %> <span id=\"pizyds_rain_running_text\">运行中</span>\r\n </span>\r\n <span>\r\n [ <%- RUNNING_BUTTON_ICON %> ]\r\n </span>\r\n </span>\r\n</span>";
/***/ }),
/***/ 507:
/***/ ((module) => {
"use strict";
module.exports = "-----BEGIN PUBLIC KEY-----\r\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2N75k3SL4PqTifrjSHj\r\n0CdMMoKwPgzb64Z6UuuTvn3vSn6l9tJ/9gRNZTrQ8B0aphtK3sAPUBuadcOplAap\r\nbJsuEizydGgvdNvKNlNL1OzSvrvjkHe5OxYzW+0A00U4l1zyzZJ0TW06cHpi8Pcq\r\nIRv3hNJ5nHXHnLudsxxQ4XiiSpvIs8fUuO6PAJkCPYFnH2fWUVo22xqwbQBSowot\r\njzLOwNugoq85aSPNBJZR9pQcerr3X7kowK+Ul6Hk9k+ZKL1pZ0NS1o/N/qFgD9Ow\r\nvr2vW8ylIAAb4B6vhPxOXkFKcIYiA+Kj+Ich7d3TNpeY5/nOCovp2xPQqCiplmGB\r\nKQIDAQAB\r\n-----END PUBLIC KEY-----\r\n";
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ id: moduleId,
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
;// CONCATENATED MODULE: PRPS\src\libs\common.js
//运行环境配置
var env_config = {
_version: "0.0.0",
log: {
config: false
}
}
autoGMValue(env_config, "env_config");
//编译信息
var build_info = {
name: "rain-classroom-pdf-direct-download",
version: "1.3.1",
timestamp: 1636822729351,
}
//对自动添加客观题答案到PPT页面的配置
var ans_config = {
_enabled: true,
_fontSize: 40,
right: 30,
up: 20,
fontColor: "#000000",
text: {
enabled: "课件附答案",
fontSize: "答案字号"
}
};
autoGMValue(ans_config, "ans_config");
var drm_config = {
_enabled: true,
text: {
enabled: "DRM"
}
};
autoGMValue(drm_config, "drm_config");
//网址分类规则
var url_match = [{
reg: /https:\/\/.*\.yuketang\.cn\/v2\/web\/student\/.*/,
type: 1
},{
reg: /https:\/\/.*\.yuketang\.cn\/v2\/web\/student-v3\/.*/,
type: 1
},{
reg: /https:\/\/.*\.yuketang\.cn\/v2\/web\/studentCards\/.*/,
type: 2
}];
env_config.log.config = true;
function autoGMValue(obj, objName){
for (let keyTemp in obj){
if (keyTemp.startsWith('_')){
let _key = keyTemp; //内置值
let key = _key.substring(1); //操作值
let $key = '$' + key; //默认值
let GMValueName = `${objName}.${key}`;
obj[$key] = obj[_key];
Object.defineProperty(obj, key, {
set: function(val) {
this[_key] = val;
GM_setValue(GMValueName, this[_key]);
env_config.log.config && console.log(`雨课堂课件PDF下载工具:${this.text&&this.text[key]||GMValueName} - ${this[_key]}`);
},
get: function() {
this[_key] = GM_getValue(GMValueName, this[_key]);
return this[_key];
},
});
refreshGMValue(obj, key);
}
}
}
function refreshGMValue(obj, key){
obj[key] = obj[key].valueOf();
}
var time_object = {
popover_can_hide: Date.now()
}
var update_info_list = {
'1.3.1': `优化了生成速度、报错信息,修复了图片格式兼容、面板不刷新的Bug`
}
var update_info = update_info_list[build_info.version] ?
update_info_list[build_info.version] :
'好像没有更新信息';
// EXTERNAL MODULE: PRPS\node_modules\bootstrap-icons\icons\file-earmark-pdf.svg
var PRPU_node_modules_bootstrap_icons_icons_file_earmark_pdf = __webpack_require__(154);
// EXTERNAL MODULE: PRPS\node_modules\bootstrap-icons\icons\gear-fill.svg
var PRPU_node_modules_bootstrap_icons_icons_gear_fill = __webpack_require__(984);
;// CONCATENATED MODULE: external "jQuery"
const external_jQuery_namespaceObject = jQuery;
var external_jQuery_default = /*#__PURE__*/__webpack_require__.n(external_jQuery_namespaceObject);
// EXTERNAL MODULE: PRPS\node_modules\semver\semver.js
var PRPU_node_modules_semver_semver = __webpack_require__(776);
;// CONCATENATED MODULE: PRPS\src\libs\public.js
//按钮文本刷新
function refreshProcessStatus(processStatus){
if (!processStatus){
external_jQuery_default()("#pizyds_rain_running").attr("hidden", "");
external_jQuery_default()("#pizyds_rain_waiting").removeAttr("hidden");
} else{
external_jQuery_default()("#pizyds_rain_running_text").html(processStatus);
external_jQuery_default()("#pizyds_rain_waiting").attr("hidden", "");
external_jQuery_default()("#pizyds_rain_running").removeAttr("hidden");
}
}
//修改自:http://www.jsfun.cn/#textBecomeImg
//js使用canvas将文字转换成ImageData对象
function text2img(text, fontsize, fontcolor){
var canvas = document.createElement('canvas');
canvas.height = parseInt(fontsize * 1.2);
var ctx = canvas.getContext('2d');
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = fontcolor;
ctx.font = fontsize + "px Arial";
ctx.textBaseline = 'middle';
ctx.fillText(text, 0, fontsize/2);
canvas.width = ctx.measureText(text).width;
ctx.fillStyle = fontcolor;
ctx.font = fontsize + "px Arial";
ctx.textBaseline = 'middle';
ctx.fillText(text, 0, fontsize/2);
var dta = ctx.getImageData(0, 0, canvas.width, canvas.height);
dta.url = canvas.toDataURL();
return dta;
}
//来自:https://www.cnblogs.com/ranyonsue/p/7596347.html
//HTML删除节点
function removeElement(_element){
var _parentElement = _element.parentNode;
if(_parentElement){
_parentElement.removeChild(_element);
}
}
//休眠
var sleep = (time) => new Promise(reslove => setTimeout(reslove, time));
/**
* 调整 SVG 尺寸
* @param {string} svg SVG 字符串
* @param {number} width 宽度
* @param {number} height 高度
* @return {void}
*/
function adjustSVGSize(svg, width, height = null){
var node = external_jQuery_default().parseHTML(svg)[0];
var newHeight = height ? height : width / parseInt(external_jQuery_default()(node).attr("width")) * parseInt(external_jQuery_default()(node).attr("height"));
var newWidth = width ? width : height / parseInt(external_jQuery_default()(node).attr("height")) * parseInt(external_jQuery_default()(node).attr("width"));
external_jQuery_default()(node).attr("height", newHeight);
external_jQuery_default()(node).attr("width", newWidth);
return node.outerHTML;
}
/**
* 给 SVG 添加 css
* @param {string} svg SVG 字符串
* @param {string} css css
* @return {void}
*/
function addSVGClass(svg, css){
var node = external_jQuery_default().parseHTML(svg)[0];
external_jQuery_default()(node).addClass(css);
return node.outerHTML;
}
function judgeVersionUpdate() {
if (PRPU_node_modules_semver_semver.SemVer.neq(env_config.version, build_info.version)){
if (PRPU_node_modules_semver_semver.SemVer.eq(env_config.version, "0.0.0")){
return "new";
} else if (PRPU_node_modules_semver_semver.SemVer.gt(env_config.version, build_info.version)){
return "down";
} else if (PRPU_node_modules_semver_semver.SemVer.lt(env_config.version, build_info.version)){
return "up";
}
} else {
return false;
}
}
var textVersionUpdate = {
"new": `感谢!新安装:${env_config.version} -> ${build_info.version},更新内容:${update_info}`,
"up": `感谢!已升级:${env_config.version} -> ${build_info.version},更新内容:${update_info}`,
"down": `啊?已降级:${env_config.version} -> ${build_info.version}`
}
function clearVersionUpdate () {
if (judgeVersionUpdate()){
env_config.version = build_info.version;
return true;
} else {
return false;
}
}
//https://stackoverflow.com/questions/52059596/loading-an-image-on-web-browser-using-promise/52060802
/**
* 将图片链接转化为HTMLImageElement对象
* @param {string} url 图片链接
* @return {HTMLImageElement} HTMLImageElement对象
*/
const url2HTMLImageElement = (url) => new Promise((resolve, reject) => {
const img = new Image();
img.addEventListener('load', () => resolve(img));
img.addEventListener('error', (err) => reject(err));
img.crossOrigin = "anonymous";
img.src = url;
});
/**
* 将图片链接转化为ImageData对象
* @param {string} url 图片链接
* @return {ImageData} ImageData对象
*/
async function url2ImgData(url){
var img = await url2HTMLImageElement(url);
var canvas = document.createElement('canvas');
canvas.height = img.height;
canvas.width = img.width;
var ctx = canvas.getContext('2d');
ctx.drawImage(img, 0, 0);
var dta = ctx.getImageData(0, 0, canvas.width, canvas.height);
dta.url = canvas.toDataURL();
return dta;
}
var headerMessage = [];
//控制面板信息刷新
function refreshHeaderMessage(message, type = 'Info', show = true){
var suffix = {
'Warn': '具体请参考控制台报错信息',
'Info': ''
}
if (!message){
headerMessage = []
} else{
time_object.popover_can_hide = Date.now() + 500;
headerMessage.push(`[${type}] ${message} ${suffix[type]}`);
show && external_jQuery_default()('#pizyds_rain_config_button').popover('show');
}
}
function getHeaderMessage(){
var temp = headerMessage.join('<br>');
headerMessage = [];
return temp
}
// EXTERNAL MODULE: PRPS\src\ejs\ejs_pizyds_rain_conf_panel.ejs
var PRPU_src_ejs_ejs_pizyds_rain_conf_panel = __webpack_require__(391);
// EXTERNAL MODULE: PRPS\src\ejs\ejs_pizyds_rain_conf_title.ejs
var PRPU_src_ejs_ejs_pizyds_rain_conf_title = __webpack_require__(666);
// EXTERNAL MODULE: PRPS\node_modules\ejs\ejs.js
var PRPU_node_modules_ejs_ejs = __webpack_require__(56);
var PRPU_node_modules_ejs_ejs_default = /*#__PURE__*/__webpack_require__.n(PRPU_node_modules_ejs_ejs);
// EXTERNAL MODULE: PRPS\node_modules\bootstrap\js\dist\popover.js
var PRPU_node_modules_bootstrap_js_dist_popover = __webpack_require__(960);
// EXTERNAL MODULE: PRPS\node_modules\style-loader\dist\runtime\injectStylesIntoStyleTag.js
var PRPU_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag = __webpack_require__(597);
var PRPU_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(PRPU_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag);
// EXTERNAL MODULE: PRPS\node_modules\style-loader\dist\runtime\styleDomAPI.js
var PRPU_node_modules_style_loader_dist_runtime_styleDomAPI = __webpack_require__(774);
var PRPU_node_modules_style_loader_dist_runtime_styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(PRPU_node_modules_style_loader_dist_runtime_styleDomAPI);
// EXTERNAL MODULE: PRPS\node_modules\style-loader\dist\runtime\getTarget.js
var PRPU_node_modules_style_loader_dist_runtime_getTarget = __webpack_require__(316);
var PRPU_node_modules_style_loader_dist_runtime_getTarget_default = /*#__PURE__*/__webpack_require__.n(PRPU_node_modules_style_loader_dist_runtime_getTarget);
// EXTERNAL MODULE: PRPS\node_modules\style-loader\dist\runtime\insertStyleElement.js
var PRPU_node_modules_style_loader_dist_runtime_insertStyleElement = __webpack_require__(667);
var PRPU_node_modules_style_loader_dist_runtime_insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(PRPU_node_modules_style_loader_dist_runtime_insertStyleElement);
// EXTERNAL MODULE: PRPS\node_modules\css-loader\dist\cjs.js!PRPS\node_modules\postcss-loader\dist\cjs.js!PRPS\node_modules\sass-loader\dist\cjs.js!PRPS\src\styles\css_pizyds_rain.scss
var PRPU_node_modules_css_loader_dist_cjs_js_PRPU_node_modules_postcss_loader_dist_cjs_js_PRPU_node_modules_sass_loader_dist_cjs_js_PRPU_src_styles_css_pizyds_rain = __webpack_require__(324);
;// CONCATENATED MODULE: PRPS\src\styles\css_pizyds_rain.scss
var options = {};
options.styleTagTransform = function(css, style){
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
while (style.firstChild) {
style.removeChild(style.firstChild);
}
style.appendChild(document.createTextNode(css));
}
};
options.setAttributes = function(style) {
var nonce =
true ? __webpack_require__.nc : 0;
if (nonce) {
style.setAttribute("nonce", nonce);
}
};
options.insert = function(style){
var target = PRPU_node_modules_style_loader_dist_runtime_getTarget_default()("head");
if (!target) {
throw new Error(
"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."
);
}
target.appendChild(style);
};
options.domAPI = (PRPU_node_modules_style_loader_dist_runtime_styleDomAPI_default());
options.insertStyleElement = (PRPU_node_modules_style_loader_dist_runtime_insertStyleElement_default());
var update = PRPU_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_default()(PRPU_node_modules_css_loader_dist_cjs_js_PRPU_node_modules_postcss_loader_dist_cjs_js_PRPU_node_modules_sass_loader_dist_cjs_js_PRPU_src_styles_css_pizyds_rain/* default */.Z, options);
/* harmony default export */ const PRPU_src_styles_css_pizyds_rain = (PRPU_node_modules_css_loader_dist_cjs_js_PRPU_node_modules_postcss_loader_dist_cjs_js_PRPU_node_modules_sass_loader_dist_cjs_js_PRPU_src_styles_css_pizyds_rain/* default */.Z && PRPU_node_modules_css_loader_dist_cjs_js_PRPU_node_modules_postcss_loader_dist_cjs_js_PRPU_node_modules_sass_loader_dist_cjs_js_PRPU_src_styles_css_pizyds_rain/* default.locals */.Z.locals ? PRPU_node_modules_css_loader_dist_cjs_js_PRPU_node_modules_postcss_loader_dist_cjs_js_PRPU_node_modules_sass_loader_dist_cjs_js_PRPU_src_styles_css_pizyds_rain/* default.locals */.Z.locals : undefined);
// EXTERNAL MODULE: PRPS\node_modules\bootstrap-icons\icons\arrow-return-left.svg
var PRPU_node_modules_bootstrap_icons_icons_arrow_return_left = __webpack_require__(856);
// EXTERNAL MODULE: PRPS\node_modules\bootstrap-icons\icons\github.svg
var PRPU_node_modules_bootstrap_icons_icons_github = __webpack_require__(739);
// EXTERNAL MODULE: PRPS\node_modules\bootstrap-icons\icons\house.svg
var PRPU_node_modules_bootstrap_icons_icons_house = __webpack_require__(185);
// EXTERNAL MODULE: PRPS\node_modules\bootstrap-icons\icons\code-slash.svg
var PRPU_node_modules_bootstrap_icons_icons_code_slash = __webpack_require__(376);
;// CONCATENATED MODULE: PRPS\src\libs\conf_panel.js
/**
* 悬浮窗注入
* @param {Element} buttonEle 需要注入悬浮窗的按钮
* @return {void}
*/
/* harmony default export */ function PRPU_src_libs_conf_panel(buttonEle){
var form_templ = PRPU_src_ejs_ejs_pizyds_rain_conf_panel;
var form_html = () => PRPU_node_modules_ejs_ejs_default().render(form_templ, {
BUILD_VERSION: build_info.version,
BUILD_TIME: formatDate(new Date(build_info.timestamp)),
ANS_ENABLED: ans_config.enabled,
DRM_ENABLED: drm_config.enabled,
FONT_SIZE: ans_config.fontSize,
HEADER_MESSAGE: getHeaderMessage(),
DEFAULT_SVG: adjustSVGSize(PRPU_node_modules_bootstrap_icons_icons_arrow_return_left, 12),
HOUSE_SVG: adjustSVGSize(PRPU_node_modules_bootstrap_icons_icons_house, 12),
GITHUB_SVG: adjustSVGSize(PRPU_node_modules_bootstrap_icons_icons_github, 12),
CODE_SVG: adjustSVGSize(PRPU_node_modules_bootstrap_icons_icons_code_slash, 12)
});
var container = external_jQuery_default()(".pizyds_rain")[0];
external_jQuery_default()(container).off();
// eslint-disable-next-line no-unused-vars
external_jQuery_default()(buttonEle).popover({
title: PRPU_node_modules_ejs_ejs_default().render(PRPU_src_ejs_ejs_pizyds_rain_conf_title),
container,
content: form_html,
html: true,
sanitize: false,
placement: "bottom",
customClass: "pizyds_rain_conf_popover",
trigger: "click",
offset: [-80, 8]
})
external_jQuery_default()("html").off();
external_jQuery_default()("html").on('click', function (e) {
var popoverEle = external_jQuery_default()('.pizyds_rain_conf_popover')[0];
if (
time_object.popover_can_hide < Date.now() &&
popoverEle &&
!external_jQuery_default()(buttonEle).is(e.target) &&
external_jQuery_default()(buttonEle).has(e.target).length == 0 &&
!external_jQuery_default()(popoverEle).is(e.target) &&
external_jQuery_default()(popoverEle).has(e.target).length == 0
) {
external_jQuery_default()(popoverEle).popover('hide');
}
});
external_jQuery_default()(container).on('input change', "#pizyds_rain_answer_font_size_range", function(){
external_jQuery_default()("#pizyds_rain_answer_font_size_show").html(this.value);
})
external_jQuery_default()(container).on('change', "#pizyds_rain_answer_font_size_range", function(){
ans_config.fontSize = this.value;
})
external_jQuery_default()(container).on('change', "#pizyds_rain_answer_switch", function(){
ans_config.enabled = this.checked;
if (!ans_config.enabled) {
external_jQuery_default()("#pizyds_rain_answer_font_size_field")
.addClass("disabledField")
.find('input')
.attr('disabled', '');
} else{
external_jQuery_default()("#pizyds_rain_answer_font_size_field")
.removeClass("disabledField")
.find('input')
.removeAttr('disabled');
}
})
external_jQuery_default()(container).on('click', "#pizyds_rain_answer_font_size_default", function(){
external_jQuery_default()("#pizyds_rain_answer_font_size_range")
.prop("value", ans_config.$fontSize)
.trigger("change");
})
external_jQuery_default()(container).on('change', "#pizyds_rain_drm_switch", function(){
drm_config.enabled = this.checked;
})
//更新提示
if (judgeVersionUpdate()){
refreshHeaderMessage(textVersionUpdate[judgeVersionUpdate()]);
clearVersionUpdate();
}
}
/**
* Date对象转yyyy-MM-dd
* @param {Date} date Date对象
* @return {string} yyyy-MM-dd
*/
function formatDate(date){
var yyyy = (date.getFullYear()).toString().padStart(4, "0");
var MM = (date.getMonth()+1).toString().padStart(2, "0");
var dd = (date.getDate()).toString().padStart(2, "0");
return [yyyy, MM, dd].join('-')
}
;// CONCATENATED MODULE: PRPS\src\libs\get_url_slides.js
/**
* PPT图片链接提取
* @param {HTMLElement} el_dialog 整体 dialog DOM 对象
* @return {Array} 链接列表
*/
function get_url_slides(el_dialog){
try{
var el_swiper = el_dialog.getElementsByClassName("pptSwiper")[0];
var el_slides = el_swiper.getElementsByClassName("swiper-slide");
var url_slides = new Array(el_slides.length);
for (let i = 0; i < el_slides.length; i++){
url_slides[i] = el_slides[i].getElementsByTagName("img")[0].src;
}
console.groupCollapsed(`雨课堂课件PDF下载工具:提取到 ${url_slides.length} 页 PPT`);
console.table(url_slides);
console.groupEnd();
return url_slides;
} catch(err){
return new Array();
}
}
;// CONCATENATED MODULE: PRPS\src\libs\image_process.js
/**
* 借助Canvas,进行图片下载与并转化为ImageData(RGBAData)
* @param url_slides 图片链接列表
* @return {Promise}
*/
/* harmony default export */ function PRPU_src_libs_image_process(url_slides){
var promiseList = new Array(url_slides.length);
var finished_num = 0;
var count_finished_num = (index) => {
var processStatus = `${++finished_num}/${url_slides.length}`;
refreshProcessStatus(`处理图片(${processStatus})`);
console.log(`雨课堂课件PDF下载工具:${processStatus} - 第${index+1}页 - ${url_slides[index]}`);
}
for (let i = 0; i < url_slides.length; i++){
promiseList[i] = url2ImgData(url_slides[i]).then(ImageData => {
count_finished_num(i);
return ImageData;
}).catch(err => {
console.error(err);
refreshProcessStatus(false);
refreshHeaderMessage(`图像处理出错(第${i+1}页:${url_slides[i]})`, 'Warn');
throw err;
});
}
return Promise.all(promiseList);
}
;// CONCATENATED MODULE: external "jspdf"
const external_jspdf_namespaceObject = jspdf;
// EXTERNAL MODULE: PRPS\src\key\rsa_2048_pub.pem
var PRPU_src_key_rsa_2048_pub = __webpack_require__(507);
// EXTERNAL MODULE: PRPS\node_modules\uuid\index.js
var PRPU_node_modules_uuid_index = __webpack_require__(766);
;// CONCATENATED MODULE: external "Crypt"
const external_Crypt_namespaceObject = Crypt;
var external_Crypt_default = /*#__PURE__*/__webpack_require__.n(external_Crypt_namespaceObject);
;// CONCATENATED MODULE: PRPS\src\libs\rsa_drm.js
//小众的库,CDN上对WEB的模块引出方式和NODE有一点不一样
var crypt = new (external_Crypt_default())({ aesKeySize: 128 });
/**
* 生成 DRM 信息
* @return {string}
*/
function generateUserID(){
var drm_json = {
build_info: build_info,
page_info: {url: window.location.href, timestamp: Date.now()},
user_profile: generateUserProfile(),
salt: (0,PRPU_node_modules_uuid_index.v4)()
};
var drm_text = JSON.stringify(drm_json);
var drm_rsa_json = crypt.encrypt(PRPU_src_key_rsa_2048_pub, drm_text);
var drm_rsa_obj = JSON.parse(drm_rsa_json);
var drm_rsa_obj_keys = {};
drm_rsa_obj_keys.fingerprint = Object.keys(drm_rsa_obj.keys)[0];
drm_rsa_obj_keys.key = drm_rsa_obj.keys[drm_rsa_obj_keys.fingerprint];
var drm_pizyds_rain_arr = [
drm_rsa_obj.iv,
hexFingerprint2Base64(drm_rsa_obj_keys.fingerprint),
drm_rsa_obj_keys.key,
drm_rsa_obj.cipher
];
return drm_pizyds_rain_arr.join(":");
}
/**
* 生成 DRM 中的用户信息
* @return {string}
*/
function generateUserProfile(){
var way_1 = JSON.parse(localStorage.getItem("user_profile"));
var way_2 = JSON.parse(localStorage.getItem("vuex")) && JSON.parse(localStorage.getItem("vuex")).userInfo;
var user_profile_raw = way_1 || way_2 || {};
var user_profile_name_raw = user_profile_raw.name || user_profile_raw.nickname || '?';
var user_profile_name = "";
var user_profile_name_choose = randomIntFromInterval(0, user_profile_name_raw.length - 1);
for (let i = 0; i < user_profile_name_raw.length; i++) {
user_profile_name += (i == user_profile_name_choose) ? user_profile_name_raw[i] : '*';
}
var user_profile = {
user_id: user_profile_raw.user_id || '?',
school_number: user_profile_raw.school_number || '?',
name: user_profile_name
}
return user_profile;
}
function hexFingerprint2Base64(hex){
var keyHexs = hex.split(':');
var uint8 = new Uint8Array(keyHexs.length);
keyHexs.forEach((value, index) => uint8[index] = parseInt(value, 16));
return window.btoa(String.fromCharCode.apply(null, uint8));
}
function randomIntFromInterval(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min)
}
;// CONCATENATED MODULE: PRPS\src\libs\pdf_process.js
/**
* 借助jsPDF,进行PDF的生成
* @param img_list 图片列表
* @param filename 保存的文件名
* @param answer_list 答案列表
* @return {Promise}
*/
/* harmony default export */ async function PRPU_src_libs_pdf_process(img_list, filename, answer_list){
console.groupCollapsed("雨课堂课件PDF下载工具:生成PDF...");
var doc = new external_jspdf_namespaceObject.jsPDF({
orientation: "landscape",
unit: "px",
format: [img_list[0].width, img_list[0].height],
hotfixes: ["px_scaling"]
});
injectXMP(doc, [img_list[0].width, img_list[0].height]);
for (let i = 0; i < img_list.length; i++){
i > 0 && doc.addPage([img_list[i].width, img_list[i].height], "landscape");
await addPPT(i, doc, img_list, answer_list);
refreshProcessStatus(`生成PDF(${i+1}/${img_list.length})`);
await sleep(10);
}
console.groupEnd();
doc.save(filename);
console.log(`雨课堂课件PDF下载工具:完成下载`);
console.log(`雨课堂课件PDF下载工具:https://www.pizyds.com/rain-classroom-pdf-direct-download/`);
}
/**
* 附加 PPT 页面
* @param {number} index
* @param {jsPDF} doc jsPDF 对象
* @param {Array} answer_list 答案列表
* @return {Promise}
*/
async function addPPT(index, doc, img_list, answer_list){
console.log(`雨课堂课件PDF下载工具:第 ${index+1} 页 - PPT`);
doc.addImage({
imageData: img_list[index].url,
format: 'PNG',
x: 0,
y: 0,
width: img_list[index].width,
height: img_list[index].height,
compression: 'FAST'
});
if (ans_config.enabled){
let answer_item = answer_list.find(obj => obj.index == index);
if (answer_item && answer_item.ans != "") {
let answer_img = text2img(answer_item.ans, ans_config.fontSize, ans_config.fontColor);
console.log(`雨课堂课件PDF下载工具:第 ${index+1} 页 - 答案 - ${answer_item.ans}`);
doc.addImage({
imageData: answer_img.url,
format: 'PNG',
x: img_list[index].width - answer_img.width - ans_config.right,
y: ans_config.up,
width: answer_img.width,
height: answer_img.height,
compression: 'FAST'
});
}
}
}
/**
* 注入 DRM 信息
* @param {jsPDF} doc jsPDF 对象
* @param {Array} size 当前 PPT 页面尺寸
* @return {void}
*/
function injectXMP(doc, size){
if (drm_config.enabled){
console.log(`雨课堂课件PDF下载工具:注入数字版权信息`);
var userID = generateUserID();
var drmURL = "https://www.pizyds.com/rain-classroom-pdf-direct-download-pizyds-rain-drm/"
doc.addMetadata(userID, drmURL);
var drm_explain = `This file is automatically generated by the tampermonkey script "Rain Classroom PDF Direct Download", ` +
`and injected with DRM information through RSA+AES hybrid encryption. Please respect the copyright of the PPT publisher.\n\n` +
`For detailed information, please refer to:\n${drmURL}\n\nDRM information:`;
doc.text(size[1]*0.1, size[1]*0.1, [drm_explain, userID], { baseline: "top", maxWidth: 1000});
}
}
;// CONCATENATED MODULE: PRPS\src\libs\get_html_slides.js
/**
* PPT HTML Class 标注(针对发布的“课件”类型)
* @param el_dialog 整体 dialog DOM 对象
* @return {Boolean}
*/
function get_html_slides(el_dialog){
try{
var el_swiper = el_dialog.getElementsByClassName("pptSwiper")[0];
var el_slides = el_swiper.getElementsByClassName("swiper-slide");
for (let i = 0; i < el_slides.length; i++){
el_slides[i].classList.add("pizyds_el_slide");
el_slides[i].getElementsByClassName("courseware heightPriority")[0].classList.add("pizyds_el_ppt");
}
console.log(`雨课堂课件PDF下载工具:提取到 ${el_slides.length} 页 PPT`);
return true;
} catch(err){
console.error(err);
return false;
}
}
;// CONCATENATED MODULE: external "html2canvas"
const external_html2canvas_namespaceObject = html2canvas;
var external_html2canvas_default = /*#__PURE__*/__webpack_require__.n(external_html2canvas_namespaceObject);
;// CONCATENATED MODULE: PRPS\src\libs\html2canvas_hd.js
var hd_sample_sacle = 4;
var hd_output_sacle = 2;
function oncloneFunction(clonedDocument, index, { c, pos }){
//画布准备,高采样
var el_ppts = clonedDocument.getElementsByClassName("pizyds_el_ppt");
var el_ppt = el_ppts[index];
el_ppt.style.transform = "translate3d(-50%, -50%, 0px)";
pos.w = el_ppt.getBoundingClientRect();
pos.o = { width: parseInt(el_ppt.style.width), height: parseInt(el_ppt.style.height) };
pos.e = { width: pos.o.width * hd_sample_sacle, height: pos.o.height * hd_sample_sacle };
console.log(pos);
c.width = pos.e.width;
c.height = pos.e.height;
var ctx = c.getContext("2d");
//ctx.imageSmoothingEnabled = false;
ctx.scale(pos.e.width / pos.w.width, pos.e.height / pos.w.height);
ctx.translate(- pos.w.left, - pos.w.top);
var el_slides = clonedDocument.getElementsByClassName("pizyds_el_slide");
el_slides = Array.from(el_slides);
for (let i = 0; i < index; i++) removeElement(el_slides[i]);
el_slides[index].style.opacity = 1;
el_slides[index].style.transform = "translate3d(0px, 0px, 0px)";
}
async function render(index, { el_ppts, processStatus }){
var c = document.createElement("canvas");
var pos = { w: null, o: null, e: null };
console.log(`雨课堂课件PDF下载工具:${processStatus} - 高采样`);
var el_ppt = el_ppts[index];
//html2canvas
console.groupCollapsed(`雨课堂课件PDF下载工具:${processStatus} - html2canvas 日志`);
return external_html2canvas_default()(el_ppt, {
logging: true,
useCORS: true,
canvas:c,
onclone: clonedDocument => oncloneFunction(clonedDocument, index, { c, pos })
}).then(() => {
console.groupEnd();
//压缩尺寸,低采样
console.log(`雨课堂课件PDF下载工具:${processStatus} - 低采样`);
var c2 = document.createElement('canvas');
c2.width = pos.o.width * hd_output_sacle;
c2.height = pos.o.height * hd_output_sacle;
var ctx2 = c2.getContext('2d');
ctx2.drawImage(c, 0, 0, c2.width, c2.height);
var dta = ctx2.getImageData(0, 0, c2.width, c2.height);
dta.url = c2.toDataURL();
return dta;
}).catch(err => {
console.error(err);
refreshProcessStatus(false);
refreshHeaderMessage(`HTML转高清Canvas出错(第${index+1}页)`, 'Warn');
throw err;
});
}
/**
* HTML转高清Canvas,一大堆神奇操作驯服原版html2canvas
* @return {Array} PPT 的 RAW 图片
*/
/* harmony default export */ async function PRPU_src_libs_html2canvas_hd() {
console.groupCollapsed("雨课堂课件PDF下载工具:HTML转高清Canvas...");
var RGBAData_ppts = [];
var el_ppts = document.getElementsByClassName("pizyds_el_ppt");
refreshProcessStatus("转换HTML...");
for (let i = 0; i < el_ppts.length; i++){
var processStatus = `${i+1}/${el_ppts.length}`;
refreshProcessStatus(`转换HTML(${processStatus})`);
RGBAData_ppts[i] = await render(i, { el_ppts, processStatus });
console.log(`雨课堂课件PDF下载工具:${processStatus} - 第${i+1}页 - size: ${RGBAData_ppts[i].data.length}, ${RGBAData_ppts[i].width}x${RGBAData_ppts[i].height}`);
}
console.groupEnd();
console.log(`雨课堂课件PDF下载工具:完成转换`);
return RGBAData_ppts;
}
;// CONCATENATED MODULE: PRPS\src\libs\get_answers.js
/**
* 获取客观题答案
* @param url_slides PPT URL 列表
* @return {Array} 答案列表
*/
function get_answers(url_slides){
var el_problem = document.getElementById("problem");
var answer_list = [];
if (el_problem){
var el_exercises_info = el_problem.getElementsByClassName("exercises_info");
for (let i = 0; i < el_exercises_info.length; i++){
let el_url = el_exercises_info[i].querySelector(".img_box>img");
let el_ans = el_exercises_info[i].querySelector(".answer_info>.correct_answer");
var answer_item = { url: el_url ? el_url.src : "", ans: el_ans ? el_ans.innerText : "", index: -1 };
answer_item.index = url_slides.indexOf(answer_item.url);
answer_list.push(answer_item);
}
}
console.groupCollapsed(`雨课堂课件PDF下载工具:提取到 ${answer_list.length} 项答案`);
console.table(answer_list);
console.groupEnd();
return answer_list;
}
;// CONCATENATED MODULE: PRPS\src\libs\download_process.js
/**
* 按钮触发PDF生成逻辑
* @param el_dialog 整体 dialog DOM 对象
* @param url_type URL 类型
* @return {void}
*/
/* harmony default export */ function PRPU_src_libs_download_process(el_dialog, url_type = 1){
var type_fun = [{
type: 0,
fun: () => {
console.log(`雨课堂课件PDF下载工具:PDF生成逻辑未知错误 - type ${url_type}`);
return false;
}
},{
type: 1,
fun: () => {
var url_slides = get_url_slides(el_dialog);
if (url_slides.length > 0){
refreshProcessStatus("处理图片...");
console.groupCollapsed("雨课堂课件PDF下载工具:处理图片...");
PRPU_src_libs_image_process(url_slides)
.then(async img_list => {
console.groupEnd();
refreshProcessStatus("生成PDF...");
await sleep(200);
var ppt_name = document.getElementsByClassName("ppt_name")[0].innerText;
var filename = ppt_name + ".pdf";
var answer_list = ans_config.enabled ? get_answers(url_slides): [];
await PRPU_src_libs_pdf_process(img_list, filename, answer_list).catch(err => {
console.error(err);
refreshProcessStatus(false);
refreshHeaderMessage("PDF生成出错", 'Warn');
throw err;
});
refreshProcessStatus(false);
})
} else{
refreshProcessStatus(false);
refreshHeaderMessage("没有提取到图片", 'Warn');
}
}
},{
type: 2,
fun: () => {
var html_slides = get_html_slides(el_dialog);
if (html_slides){
refreshProcessStatus("处理HTML...");
//HTML转图片
PRPU_src_libs_html2canvas_hd().then(async img_list => {
refreshProcessStatus("生成PDF...");
await sleep(200);
var ppt_name = document.getElementsByClassName("ppt_name")[0].innerText;
var filename = ppt_name + ".pdf";
var answer_list = [];
await PRPU_src_libs_pdf_process(img_list, filename, answer_list).catch(err => {
console.error(err);
refreshProcessStatus(false);
refreshHeaderMessage("PDF生成出错", 'Warn');
throw err;
});
refreshProcessStatus(false);
})
} else{
refreshProcessStatus(false);
refreshHeaderMessage("没有提取到图片", 'Warn');
}
}
}];
return type_fun.find(value => value.type == url_type).fun();
}
// EXTERNAL MODULE: PRPS\src\ejs\ejs_pizyds_rain_download_button.ejs
var PRPU_src_ejs_ejs_pizyds_rain_download_button = __webpack_require__(351);
;// CONCATENATED MODULE: PRPS\src\libs\button_download.js
/**
* 按钮注入
* @param el_dialog 整体 dialog DOM 对象
* @param url_type URL 类型
* @return {void}
*/
function button_download(el_dialog, url_type = 1){
if (!data_on_type[url_type]){
console.log(`雨课堂课件PDF下载工具:按钮注入未知错误 - type ${url_type}`);
return false;
}
var el_header = header_on_type[url_type](el_dialog);
if (!el_header){
console.log(`雨课堂课件PDF下载工具:layout header 查找失败`);
return false;
}
if (external_jQuery_default()(el_header).find("#pizyds_rain_button_field").length == 0){
try {
external_jQuery_default()(el_dialog).addClass("pizyds_rain"); //自定义CSS启用的条件
var template = PRPU_node_modules_ejs_ejs_default().compile(PRPU_src_ejs_ejs_pizyds_rain_download_button);
var data = Object.assign(data_on_type["base"], data_on_type[url_type]);
var html = template(data);
external_jQuery_default()(el_header).find(`.${data.CLASS}`).first().before(html);
external_jQuery_default()("#pizyds_rain_download_button").off();
external_jQuery_default()("#pizyds_rain_download_button").on("click", () => PRPU_src_libs_download_process(el_dialog, url_type));
PRPU_src_libs_conf_panel(external_jQuery_default()("#pizyds_rain_config_button"));
if (url_type == 2) refreshHeaderMessage('“课件”类型不支持添加选择题答案', 'Info', false);
console.log(`雨课堂课件PDF下载工具:按钮注入成功 - type ${url_type}`);
} catch (err) {
return false;
}
}
return true;
}
var data_on_type = {
base: {
CLASS: "",
FIELD_CLASS: "",
DOWNLOAD_BUTTON_ICON: adjustSVGSize(PRPU_node_modules_bootstrap_icons_icons_file_earmark_pdf, 14),
CONFIG_BUTTON_ICON: adjustSVGSize(PRPU_node_modules_bootstrap_icons_icons_gear_fill, 14),
RUNNING_BUTTON_ICON: addSVGClass(adjustSVGSize(PRPU_node_modules_bootstrap_icons_icons_gear_fill, 14), 'rotating')
},
1: {
CLASS: "print",
FIELD_CLASS: "pizyds_rain_button_field_type_1",
},
2: {
CLASS: "button"
}
}
var header_on_type = {
1: (el_dialog) => external_jQuery_default()(el_dialog).find(".layout_header").first(),
2: (el_dialog) => external_jQuery_default()(el_dialog).find(".layout-header").first()
}
;// CONCATENATED MODULE: PRPS\src\index.js
var realTimeSearchError = {
count: () => {
realTimeSearchError.num++;
if (realTimeSearchError.num > realTimeSearchError.maxNum){
clearInterval(realTimeSearchError.interval);
realTimeSearchError.num = 0;
console.log("雨课堂课件PDF下载工具:按钮注入超时,请重新刷新网页,或提交反馈");
alert("雨课堂课件PDF下载工具:按钮注入超时,请重新刷新网页,或提交反馈");
}
},
num: 0,
maxNum: 25,
interval: null
}
if (!checkFlagMeta()){
addFlagMeta();
console.log("雨课堂课件PDF下载工具:已载入");
//实时查找PPT窗口
realTimeSearchError.interval = setInterval(()=>{
var url_type, el_dialog;
(url_type = check_url()) && (el_dialog = find_basePPTDialog()) && !button_download(el_dialog, url_type) && realTimeSearchError.count();
}, 200);
}
function addFlagMeta(){
var flagMeta = document.createElement('meta');
flagMeta.name = 'pizyds_rain';
flagMeta.content = 'https://www.pizyds.com/rain-classroom-pdf-direct-download';
document.head.appendChild(flagMeta);
}
function checkFlagMeta(){
return document.head.querySelector("[name~=pizyds_rain]");
}
//更改为内部校验链接,因为大量ajax页面跳转的存在
function check_url(){
var url_found = url_match.find(value => value.reg.test(window.location.href));
if (url_found){
return url_found.type;
} else{
return false;
}
}
//查找PPT窗口
function find_basePPTDialog(){
var el_dialogs = document.getElementsByClassName("basePPTDialog");
if (el_dialogs.length == 1){
return el_dialogs[0];
} else{
return false;
}
}
})();
/******/ })()
;