view release on metacpan or search on metacpan
share/js/core/jquery-3.2.1.js view on Meta::CPAN
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof windo...
a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var...
null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d...
share/js/core/jquery.js view on Meta::CPAN
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof windo...
a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var...
null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d...
share/js/core/qunit-2.4.0.js view on Meta::CPAN
string: quote,
date: quote,
regexp: literal,
number: literal,
"boolean": literal,
symbol: function symbol(sym) {
return sym.toString();
}
},
// If true, entities are escaped ( <, >, \t, space and \n )
HTML: false,
// Indentation unit
indentChar: " ",
// If true, items in a collection, are separated by a \n, else just a space.
multiline: true
};
return dump;
share/js/core/qunit-2.4.0.js view on Meta::CPAN
})();
var stats = {
passedTests: 0,
failedTests: 0,
skippedTests: 0,
todoTests: 0
};
// Escape text for attribute or text content.
function escapeText(s) {
if (!s) {
return "";
}
s = s + "";
// Both single quotes and double quotes (for attributes)
return s.replace(/['"<>&]/g, function (s) {
switch (s) {
case "'":
return "'";
share/js/core/qunit-2.4.0.js view on Meta::CPAN
ev.preventDefault();
}
return false;
}
function getUrlConfigHtml() {
var i,
j,
val,
escaped,
escapedTooltip,
selection = false,
urlConfig = config.urlConfig,
urlConfigHtml = "";
for (i = 0; i < urlConfig.length; i++) {
// Options can be either strings or objects with nonempty "id" properties
val = config.urlConfig[i];
if (typeof val === "string") {
val = {
id: val,
label: val
};
}
escaped = escapeText(val.id);
escapedTooltip = escapeText(val.tooltip);
if (!val.value || typeof val.value === "string") {
urlConfigHtml += "<label for='qunit-urlconfig-" + escaped + "' title='" + escapedTooltip + "'><input id='qunit-urlconfig-" + escaped + "' name='" + escaped + "' type='checkbox'" + (val.value ? " value='" + escapeText(val.value) + "'" : "") + (c...
} else {
urlConfigHtml += "<label for='qunit-urlconfig-" + escaped + "' title='" + escapedTooltip + "'>" + val.label + ": </label><select id='qunit-urlconfig-" + escaped + "' name='" + escaped + "' title='" + escapedTooltip + "'><option></option>";
if (QUnit.is("array", val.value)) {
for (j = 0; j < val.value.length; j++) {
escaped = escapeText(val.value[j]);
urlConfigHtml += "<option value='" + escaped + "'" + (config[val.id] === val.value[j] ? (selection = true) && " selected='selected'" : "") + ">" + escaped + "</option>";
}
} else {
for (j in val.value) {
if (hasOwn.call(val.value, j)) {
urlConfigHtml += "<option value='" + escapeText(j) + "'" + (config[val.id] === j ? (selection = true) && " selected='selected'" : "") + ">" + escapeText(val.value[j]) + "</option>";
}
}
}
if (config[val.id] && !selection) {
escaped = escapeText(config[val.id]);
urlConfigHtml += "<option value='" + escaped + "' selected='selected' disabled='disabled'>" + escaped + "</option>";
}
urlConfigHtml += "</select>";
}
}
return urlConfigHtml;
}
// Handle "click" events on toolbar checkboxes and "change" for select menus.
// Updates the URL with the new state of `config.urlConfig` values.
share/js/core/qunit-2.4.0.js view on Meta::CPAN
}
function moduleListHtml() {
var i,
checked,
html = "";
for (i = 0; i < config.modules.length; i++) {
if (config.modules[i].name !== "") {
checked = config.moduleId.indexOf(config.modules[i].moduleId) > -1;
html += "<li><label class='clickable" + (checked ? " checked" : "") + "'><input type='checkbox' " + "value='" + config.modules[i].moduleId + "'" + (checked ? " checked='checked'" : "") + " />" + escapeText(config.modules[i].name) + "</label></l...
}
}
return html;
}
function toolbarModuleFilter() {
var allCheckbox,
commit,
reset,
share/js/core/qunit-2.4.0.js view on Meta::CPAN
toolbar.appendChild(toolbarModuleFilter());
toolbar.appendChild(toolbarLooseFilter());
toolbar.appendChild(document$$1.createElement("div")).className = "clearfix";
}
}
function appendHeader() {
var header = id("qunit-header");
if (header) {
header.innerHTML = "<a href='" + escapeText(unfilteredUrl) + "'>" + header.innerHTML + "</a> ";
}
}
function appendBanner() {
var banner = id("qunit-banner");
if (banner) {
banner.className = "";
}
}
share/js/core/qunit-2.4.0.js view on Meta::CPAN
if (controls) {
controls.appendChild(abortTestsButton());
}
}
function appendFilteredTest() {
var testId = QUnit.config.testId;
if (!testId || testId.length <= 0) {
return "";
}
return "<div id='qunit-filteredTest'>Rerunning selected tests: " + escapeText(testId.join(", ")) + " <a id='qunit-clearFilter' href='" + escapeText(unfilteredUrl) + "'>Run all tests</a></div>";
}
function appendUserAgent() {
var userAgent = id("qunit-userAgent");
if (userAgent) {
userAgent.innerHTML = "";
userAgent.appendChild(document$$1.createTextNode("QUnit " + QUnit.version + "; " + navigator.userAgent));
}
}
function appendInterface() {
var qunit = id("qunit");
if (qunit) {
qunit.innerHTML = "<h1 id='qunit-header'>" + escapeText(document$$1.title) + "</h1>" + "<h2 id='qunit-banner'></h2>" + "<div id='qunit-testrunner-toolbar'></div>" + appendFilteredTest() + "<h2 id='qunit-userAgent'></h2>" + "<ol id='qunit-tests'>...
}
appendHeader();
appendBanner();
appendTestResults();
appendUserAgent();
appendToolbar();
}
function appendTestsList(modules) {
share/js/core/qunit-2.4.0.js view on Meta::CPAN
abortButton.parentNode.removeChild(abortButton);
}
if (tests) {
id("qunit-testresult-display").innerHTML = html;
}
if (config.altertitle && document$$1.title) {
// Show â for good, â for bad suite result in title
// use escape sequences in case file gets loaded with non-utf-8-charset
document$$1.title = [stats.failedTests ? "\u2716" : "\u2714", document$$1.title.replace(/^[\u2714\u2716] /i, "")].join(" ");
}
// Scroll back to top to show results
if (config.scrolltop && window.scrollTo) {
window.scrollTo(0, 0);
}
});
function getNameHtml(name, module) {
var nameHtml = "";
if (module) {
nameHtml = "<span class='module-name'>" + escapeText(module) + "</span>: ";
}
nameHtml += "<span class='test-name'>" + escapeText(name) + "</span>";
return nameHtml;
}
QUnit.testStart(function (details) {
var running, testBlock, bad;
testBlock = id("qunit-test-output-" + details.testId);
if (testBlock) {
testBlock.className = "running";
share/js/core/qunit-2.4.0.js view on Meta::CPAN
expected,
actual,
diff,
showDiff = false,
testItem = id("qunit-test-output-" + details.testId);
if (!testItem) {
return;
}
message = escapeText(details.message) || (details.result ? "okay" : "failed");
message = "<span class='test-message'>" + message + "</span>";
message += "<span class='runtime'>@ " + details.runtime + " ms</span>";
// The pushFailure doesn't provide details.expected
// when it calls, it's implicit to also not show expected and diff stuff
// Also, we need to check details.expected existence, as it can exist and be undefined
if (!details.result && hasOwn.call(details, "expected")) {
if (details.negative) {
expected = "NOT " + QUnit.dump.parse(details.expected);
} else {
expected = QUnit.dump.parse(details.expected);
}
actual = QUnit.dump.parse(details.actual);
message += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" + escapeText(expected) + "</pre></td></tr>";
if (actual !== expected) {
message += "<tr class='test-actual'><th>Result: </th><td><pre>" + escapeText(actual) + "</pre></td></tr>";
if (typeof details.actual === "number" && typeof details.expected === "number") {
if (!isNaN(details.actual) && !isNaN(details.expected)) {
showDiff = true;
diff = details.actual - details.expected;
diff = (diff > 0 ? "+" : "") + diff;
}
} else if (typeof details.actual !== "boolean" && typeof details.expected !== "boolean") {
diff = QUnit.diff(expected, actual);
// don't show diff if there is zero overlap
showDiff = stripHtml(diff).length !== stripHtml(expected).length + stripHtml(actual).length;
}
if (showDiff) {
message += "<tr class='test-diff'><th>Diff: </th><td><pre>" + diff + "</pre></td></tr>";
}
} else if (expected.indexOf("[object Array]") !== -1 || expected.indexOf("[object Object]") !== -1) {
message += "<tr class='test-message'><th>Message: </th><td>" + "Diff suppressed as the depth of object is more than current max depth (" + QUnit.config.maxDepth + ").<p>Hint: Use <code>QUnit.dump.maxDepth</code> to " + " run with a higher max d...
} else {
message += "<tr class='test-message'><th>Message: </th><td>" + "Diff suppressed as the expected and actual results have an equivalent" + " serialization</td></tr>";
}
if (details.source) {
message += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText(details.source) + "</pre></td></tr>";
}
message += "</table>";
// This occurs when pushFailure is set and we have an extracted stack trace
} else if (!details.result && details.source) {
message += "<table>" + "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText(details.source) + "</pre></td></tr>" + "</table>";
}
assertList = testItem.getElementsByTagName("ol")[0];
assertLi = document$$1.createElement("li");
assertLi.className = details.result ? "pass" : "fail";
assertLi.innerHTML = message;
assertList.appendChild(assertLi);
});
share/js/core/qunit-2.4.0.js view on Meta::CPAN
DiffMatchPatch.prototype.diffPrettyHtml = function (diffs) {
var op,
data,
x,
html = [];
for (x = 0; x < diffs.length; x++) {
op = diffs[x][0]; // Operation (insert, delete, equal)
data = diffs[x][1]; // Text of change.
switch (op) {
case DIFF_INSERT:
html[x] = "<ins>" + escapeText(data) + "</ins>";
break;
case DIFF_DELETE:
html[x] = "<del>" + escapeText(data) + "</del>";
break;
case DIFF_EQUAL:
html[x] = "<span>" + escapeText(data) + "</span>";
break;
}
}
return html.join("");
};
/**
* Determine the common prefix of two strings.
* @param {string} text1 First string.
* @param {string} text2 Second string.
share/js/core/qunit.js view on Meta::CPAN
string: quote,
date: quote,
regexp: literal,
number: literal,
"boolean": literal,
symbol: function symbol(sym) {
return sym.toString();
}
},
// If true, entities are escaped ( <, >, \t, space and \n )
HTML: false,
// Indentation unit
indentChar: " ",
// If true, items in a collection, are separated by a \n, else just a space.
multiline: true
};
return dump;
share/js/core/qunit.js view on Meta::CPAN
})();
var stats = {
passedTests: 0,
failedTests: 0,
skippedTests: 0,
todoTests: 0
};
// Escape text for attribute or text content.
function escapeText(s) {
if (!s) {
return "";
}
s = s + "";
// Both single quotes and double quotes (for attributes)
return s.replace(/['"<>&]/g, function (s) {
switch (s) {
case "'":
return "'";
share/js/core/qunit.js view on Meta::CPAN
ev.preventDefault();
}
return false;
}
function getUrlConfigHtml() {
var i,
j,
val,
escaped,
escapedTooltip,
selection = false,
urlConfig = config.urlConfig,
urlConfigHtml = "";
for (i = 0; i < urlConfig.length; i++) {
// Options can be either strings or objects with nonempty "id" properties
val = config.urlConfig[i];
if (typeof val === "string") {
val = {
id: val,
label: val
};
}
escaped = escapeText(val.id);
escapedTooltip = escapeText(val.tooltip);
if (!val.value || typeof val.value === "string") {
urlConfigHtml += "<label for='qunit-urlconfig-" + escaped + "' title='" + escapedTooltip + "'><input id='qunit-urlconfig-" + escaped + "' name='" + escaped + "' type='checkbox'" + (val.value ? " value='" + escapeText(val.value) + "'" : "") + (c...
} else {
urlConfigHtml += "<label for='qunit-urlconfig-" + escaped + "' title='" + escapedTooltip + "'>" + val.label + ": </label><select id='qunit-urlconfig-" + escaped + "' name='" + escaped + "' title='" + escapedTooltip + "'><option></option>";
if (QUnit.is("array", val.value)) {
for (j = 0; j < val.value.length; j++) {
escaped = escapeText(val.value[j]);
urlConfigHtml += "<option value='" + escaped + "'" + (config[val.id] === val.value[j] ? (selection = true) && " selected='selected'" : "") + ">" + escaped + "</option>";
}
} else {
for (j in val.value) {
if (hasOwn.call(val.value, j)) {
urlConfigHtml += "<option value='" + escapeText(j) + "'" + (config[val.id] === j ? (selection = true) && " selected='selected'" : "") + ">" + escapeText(val.value[j]) + "</option>";
}
}
}
if (config[val.id] && !selection) {
escaped = escapeText(config[val.id]);
urlConfigHtml += "<option value='" + escaped + "' selected='selected' disabled='disabled'>" + escaped + "</option>";
}
urlConfigHtml += "</select>";
}
}
return urlConfigHtml;
}
// Handle "click" events on toolbar checkboxes and "change" for select menus.
// Updates the URL with the new state of `config.urlConfig` values.
share/js/core/qunit.js view on Meta::CPAN
}
function moduleListHtml() {
var i,
checked,
html = "";
for (i = 0; i < config.modules.length; i++) {
if (config.modules[i].name !== "") {
checked = config.moduleId.indexOf(config.modules[i].moduleId) > -1;
html += "<li><label class='clickable" + (checked ? " checked" : "") + "'><input type='checkbox' " + "value='" + config.modules[i].moduleId + "'" + (checked ? " checked='checked'" : "") + " />" + escapeText(config.modules[i].name) + "</label></l...
}
}
return html;
}
function toolbarModuleFilter() {
var allCheckbox,
commit,
reset,
share/js/core/qunit.js view on Meta::CPAN
toolbar.appendChild(toolbarModuleFilter());
toolbar.appendChild(toolbarLooseFilter());
toolbar.appendChild(document$$1.createElement("div")).className = "clearfix";
}
}
function appendHeader() {
var header = id("qunit-header");
if (header) {
header.innerHTML = "<a href='" + escapeText(unfilteredUrl) + "'>" + header.innerHTML + "</a> ";
}
}
function appendBanner() {
var banner = id("qunit-banner");
if (banner) {
banner.className = "";
}
}
share/js/core/qunit.js view on Meta::CPAN
if (controls) {
controls.appendChild(abortTestsButton());
}
}
function appendFilteredTest() {
var testId = QUnit.config.testId;
if (!testId || testId.length <= 0) {
return "";
}
return "<div id='qunit-filteredTest'>Rerunning selected tests: " + escapeText(testId.join(", ")) + " <a id='qunit-clearFilter' href='" + escapeText(unfilteredUrl) + "'>Run all tests</a></div>";
}
function appendUserAgent() {
var userAgent = id("qunit-userAgent");
if (userAgent) {
userAgent.innerHTML = "";
userAgent.appendChild(document$$1.createTextNode("QUnit " + QUnit.version + "; " + navigator.userAgent));
}
}
function appendInterface() {
var qunit = id("qunit");
if (qunit) {
qunit.innerHTML = "<h1 id='qunit-header'>" + escapeText(document$$1.title) + "</h1>" + "<h2 id='qunit-banner'></h2>" + "<div id='qunit-testrunner-toolbar'></div>" + appendFilteredTest() + "<h2 id='qunit-userAgent'></h2>" + "<ol id='qunit-tests'>...
}
appendHeader();
appendBanner();
appendTestResults();
appendUserAgent();
appendToolbar();
}
function appendTestsList(modules) {
share/js/core/qunit.js view on Meta::CPAN
abortButton.parentNode.removeChild(abortButton);
}
if (tests) {
id("qunit-testresult-display").innerHTML = html;
}
if (config.altertitle && document$$1.title) {
// Show â for good, â for bad suite result in title
// use escape sequences in case file gets loaded with non-utf-8-charset
document$$1.title = [stats.failedTests ? "\u2716" : "\u2714", document$$1.title.replace(/^[\u2714\u2716] /i, "")].join(" ");
}
// Scroll back to top to show results
if (config.scrolltop && window.scrollTo) {
window.scrollTo(0, 0);
}
});
function getNameHtml(name, module) {
var nameHtml = "";
if (module) {
nameHtml = "<span class='module-name'>" + escapeText(module) + "</span>: ";
}
nameHtml += "<span class='test-name'>" + escapeText(name) + "</span>";
return nameHtml;
}
QUnit.testStart(function (details) {
var running, testBlock, bad;
testBlock = id("qunit-test-output-" + details.testId);
if (testBlock) {
testBlock.className = "running";
share/js/core/qunit.js view on Meta::CPAN
expected,
actual,
diff,
showDiff = false,
testItem = id("qunit-test-output-" + details.testId);
if (!testItem) {
return;
}
message = escapeText(details.message) || (details.result ? "okay" : "failed");
message = "<span class='test-message'>" + message + "</span>";
message += "<span class='runtime'>@ " + details.runtime + " ms</span>";
// The pushFailure doesn't provide details.expected
// when it calls, it's implicit to also not show expected and diff stuff
// Also, we need to check details.expected existence, as it can exist and be undefined
if (!details.result && hasOwn.call(details, "expected")) {
if (details.negative) {
expected = "NOT " + QUnit.dump.parse(details.expected);
} else {
expected = QUnit.dump.parse(details.expected);
}
actual = QUnit.dump.parse(details.actual);
message += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" + escapeText(expected) + "</pre></td></tr>";
if (actual !== expected) {
message += "<tr class='test-actual'><th>Result: </th><td><pre>" + escapeText(actual) + "</pre></td></tr>";
if (typeof details.actual === "number" && typeof details.expected === "number") {
if (!isNaN(details.actual) && !isNaN(details.expected)) {
showDiff = true;
diff = details.actual - details.expected;
diff = (diff > 0 ? "+" : "") + diff;
}
} else if (typeof details.actual !== "boolean" && typeof details.expected !== "boolean") {
diff = QUnit.diff(expected, actual);
// don't show diff if there is zero overlap
showDiff = stripHtml(diff).length !== stripHtml(expected).length + stripHtml(actual).length;
}
if (showDiff) {
message += "<tr class='test-diff'><th>Diff: </th><td><pre>" + diff + "</pre></td></tr>";
}
} else if (expected.indexOf("[object Array]") !== -1 || expected.indexOf("[object Object]") !== -1) {
message += "<tr class='test-message'><th>Message: </th><td>" + "Diff suppressed as the depth of object is more than current max depth (" + QUnit.config.maxDepth + ").<p>Hint: Use <code>QUnit.dump.maxDepth</code> to " + " run with a higher max d...
} else {
message += "<tr class='test-message'><th>Message: </th><td>" + "Diff suppressed as the expected and actual results have an equivalent" + " serialization</td></tr>";
}
if (details.source) {
message += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText(details.source) + "</pre></td></tr>";
}
message += "</table>";
// This occurs when pushFailure is set and we have an extracted stack trace
} else if (!details.result && details.source) {
message += "<table>" + "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText(details.source) + "</pre></td></tr>" + "</table>";
}
assertList = testItem.getElementsByTagName("ol")[0];
assertLi = document$$1.createElement("li");
assertLi.className = details.result ? "pass" : "fail";
assertLi.innerHTML = message;
assertList.appendChild(assertLi);
});
share/js/core/qunit.js view on Meta::CPAN
DiffMatchPatch.prototype.diffPrettyHtml = function (diffs) {
var op,
data,
x,
html = [];
for (x = 0; x < diffs.length; x++) {
op = diffs[x][0]; // Operation (insert, delete, equal)
data = diffs[x][1]; // Text of change.
switch (op) {
case DIFF_INSERT:
html[x] = "<ins>" + escapeText(data) + "</ins>";
break;
case DIFF_DELETE:
html[x] = "<del>" + escapeText(data) + "</del>";
break;
case DIFF_EQUAL:
html[x] = "<span>" + escapeText(data) + "</span>";
break;
}
}
return html.join("");
};
/**
* Determine the common prefix of two strings.
* @param {string} text1 First string.
* @param {string} text2 Second string.