- Make Mayan behave like a Single Page App by using partials.
- Add URI.js, Ajax form. - Split base.js into mayan_app.js, mayan_image.js, partial_navigation.js. - Add a HOME_VIEW setting. Use it for the default view to be loaded. - New template loading order root.html -> base.html -> any template. root.html is only loaded once. Other templates are loaded and merged with base.html via ajax load. - Fix bug in document page view. Was storing the URL and the querystring as a single url variable. Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
e4f61b3ad8
commit
f3f4dcd84a
@@ -1,261 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
var App = function (parameters) {
|
||||
var self = this;
|
||||
|
||||
parameters = parameters || {}
|
||||
|
||||
this.window = $(window);
|
||||
}
|
||||
|
||||
App.tagSelectionTemplate = function (tag, container) {
|
||||
var $tag = $(
|
||||
'<span class="label label-tag" style="background: ' + tag.element.style.color + ';"> ' + tag.text + '</span>'
|
||||
);
|
||||
container[0].style.background = tag.element.style.color;
|
||||
return $tag;
|
||||
}
|
||||
|
||||
App.tagResultTemplate = function (tag) {
|
||||
if (!tag.element) { return ''; }
|
||||
var $tag = $(
|
||||
'<span class="label label-tag" style="background: ' + tag.element.style.color + ';"> ' + tag.text + '</span>'
|
||||
);
|
||||
return $tag;
|
||||
}
|
||||
|
||||
App.prototype.setupAutoSubmit = function () {
|
||||
$('.select-auto-submit').change(function () {
|
||||
if ($(this).val()) {
|
||||
this.form.submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupScrollView = function () {
|
||||
$('.scrollable').scrollview();
|
||||
}
|
||||
|
||||
App.prototype.setupTableSelector = function () {
|
||||
$('th input:checkbox').click(function(e) {
|
||||
var table = $(e.target).closest('table');
|
||||
var checked = $(e.target).prop('checked');
|
||||
$('td input:checkbox', table).prop('checked', checked);
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupItemsSelector = function () {
|
||||
$('.check-all').click(function(e) {
|
||||
var parent = $(e.target).closest('.well');
|
||||
var checked = $(e.target).prop('checked');
|
||||
$('.panel-item input:checkbox', parent).prop('checked', checked);
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupWindowPopUp = function () {
|
||||
$('a.new_window').click(function(event) {
|
||||
event.preventDefault();
|
||||
var newWindow = window.open($(this).attr('href'), '_blank');
|
||||
newWindow.focus();
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupSelect2 = function () {
|
||||
$('.select2').select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%'
|
||||
});
|
||||
|
||||
$('.select2-tags').select2({
|
||||
templateSelection: App.tagSelectionTemplate,
|
||||
templateResult: App.tagResultTemplate,
|
||||
width: '100%'
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupFullHeightResizing = function () {
|
||||
var self = this;
|
||||
|
||||
this.resizeFullHeight();
|
||||
|
||||
this.window.resize(function() {
|
||||
self.resizeFullHeight();
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.resizeFullHeight = function () {
|
||||
$('.full-height').height(this.window.height() - $('.full-height').data('height-difference'));
|
||||
}
|
||||
|
||||
App.prototype.doToastrMessages = function () {
|
||||
toastr.options = {
|
||||
'closeButton': true,
|
||||
'debug': false,
|
||||
'newestOnTop': true,
|
||||
'positionClass': 'toast-top-right',
|
||||
'preventDuplicates': false,
|
||||
'onclick': null,
|
||||
'showDuration': '300',
|
||||
'hideDuration': '1000',
|
||||
'timeOut': '5000',
|
||||
'extendedTimeOut': '1000',
|
||||
'showEasing': 'swing',
|
||||
'hideEasing': 'linear',
|
||||
'showMethod': 'fadeIn',
|
||||
'hideMethod': 'fadeOut'
|
||||
}
|
||||
|
||||
// Add invisible bootstrap messages to copy the styles to toastr.js
|
||||
|
||||
$('body').append('\
|
||||
<div class="hidden alert alert-success">\
|
||||
<p>text</p>\
|
||||
</div>\
|
||||
<div class="hidden alert alert-info">\
|
||||
<p>text</p>\
|
||||
</div>\
|
||||
<div class="hidden alert alert-danger">\
|
||||
<p>text</p>\
|
||||
</div>\
|
||||
<div class="hidden alert alert-warning">\
|
||||
<p>text</p>\
|
||||
</div>\
|
||||
');
|
||||
|
||||
// Copy the bootstrap style from the sample alerts to toaster.js via
|
||||
// dynamic document style tag
|
||||
|
||||
$('head').append('\
|
||||
<style>\
|
||||
.toast-success {\
|
||||
background-color: ' + $('.alert-success').css('background-color') +'\
|
||||
}\
|
||||
.toast-info {\
|
||||
background-color: ' + $('.alert-info').css('background-color') +'\
|
||||
}\
|
||||
.toast-error {\
|
||||
background-color: ' + $('.alert-danger').css('background-color') +'\
|
||||
}\
|
||||
.toast-warning {\
|
||||
background-color: ' + $('.alert-warning').css('background-color') +'\
|
||||
}\
|
||||
</style>\
|
||||
');
|
||||
|
||||
$.each(DjangoMessages, function (index, value) {
|
||||
var options = {};
|
||||
|
||||
if (value.tags === 'error') {
|
||||
// Error messages persist
|
||||
options['timeOut'] = 10000;
|
||||
}
|
||||
toastr[value.tags](value.message, '', options);
|
||||
});
|
||||
}
|
||||
|
||||
/* MayanImage class */
|
||||
|
||||
var MayanImage = function (options) {
|
||||
this.element = options.element;
|
||||
this.load();
|
||||
}
|
||||
|
||||
MayanImage.intialize = function () {
|
||||
$('a.fancybox').fancybox({
|
||||
beforeShow : function(){
|
||||
this.title = $(this.element).data('caption');
|
||||
},
|
||||
openEffect : 'elastic',
|
||||
closeEffect : 'elastic',
|
||||
prevEffect : 'none',
|
||||
nextEffect : 'none',
|
||||
titleShow : true,
|
||||
type : 'image',
|
||||
autoResize : true,
|
||||
});
|
||||
|
||||
$('img.lazy-load').lazyload({
|
||||
appear: function(elements_left, settings) {
|
||||
new MayanImage({element: $(this)});
|
||||
},
|
||||
threshold: 400,
|
||||
});
|
||||
|
||||
$('img.lazy-load-carousel').lazyload({
|
||||
appear: function(elements_left, settings) {
|
||||
new MayanImage({element: $(this)});
|
||||
},
|
||||
container: $('#carousel-container'),
|
||||
threshold: 2000
|
||||
});
|
||||
|
||||
$('.lazy-load').on('load', function() {
|
||||
$(this).hide();
|
||||
$(this).fadeIn();
|
||||
$(this).siblings('.spinner-container').remove();
|
||||
$(this).removeClass('lazy-load pull-left');
|
||||
});
|
||||
|
||||
$('.lazy-load-carousel').on('load', function() {
|
||||
$(this).hide();
|
||||
$(this).fadeIn();
|
||||
$(this).siblings('.spinner-container').remove();
|
||||
$(this).removeClass('lazy-load-carousel pull-left');
|
||||
});
|
||||
}
|
||||
|
||||
MayanImage.prototype.onImageError = function () {
|
||||
this.element.parent().parent().html('\
|
||||
<div class="fa-3x">\
|
||||
<span class="fa-layers fa-fw">\
|
||||
<i class="far fa-file"></i>\
|
||||
<i class="fa-inverse fas fa-times text-danger" data-fa-transform="shrink-6"></i>\
|
||||
</span>\
|
||||
</div>\
|
||||
')
|
||||
|
||||
// Remove border to indicate non interactive image
|
||||
this.element.removeClass('thin_border');
|
||||
|
||||
var container = this.element.parent().parent();
|
||||
// Save img HTML
|
||||
var html = this.element.parent().html();
|
||||
// Remove anchor
|
||||
this.element.parent().remove();
|
||||
// Place again img
|
||||
container.html(html);
|
||||
};
|
||||
|
||||
MayanImage.prototype.load = function () {
|
||||
var self = this;
|
||||
|
||||
this.element.error(function(event) {
|
||||
self.onImageError();
|
||||
});
|
||||
|
||||
this.element.attr('src', this.element.attr('data-url'));
|
||||
$.fn.matchHeight._update();
|
||||
$.fn.matchHeight._maintainScroll = true;
|
||||
};
|
||||
var app = new App();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
var app = new App();
|
||||
|
||||
app.setupFullHeightResizing();
|
||||
|
||||
var partialNavigation = new PartialNavigation({
|
||||
initialURL: initialURL,
|
||||
excludeAnchorClasses: ['fancybox', 'new_window'],
|
||||
});
|
||||
});
|
||||
|
||||
var afterBaseLoad = function () {
|
||||
MayanImage.intialize();
|
||||
|
||||
app.doToastrMessages();
|
||||
|
||||
app.setupSelect2();
|
||||
|
||||
app.setupScrollView();
|
||||
|
||||
app.setupItemsSelector();
|
||||
|
||||
app.setupTableSelector();
|
||||
|
||||
app.setupWindowPopUp();
|
||||
|
||||
app.setupAutoSubmit();
|
||||
});
|
||||
app.setupItemsSelector();
|
||||
app.setupNewWindowAnchor();
|
||||
app.setupTableSelector();
|
||||
app.setupSelect2();
|
||||
app.setupScrollView();
|
||||
}
|
||||
|
||||
157
mayan/apps/appearance/static/appearance/js/mayan_app.js
Normal file
157
mayan/apps/appearance/static/appearance/js/mayan_app.js
Normal file
@@ -0,0 +1,157 @@
|
||||
'use strict';
|
||||
|
||||
var App = function (parameters) {
|
||||
var self = this;
|
||||
|
||||
parameters = parameters || {}
|
||||
|
||||
this.window = $(window);
|
||||
}
|
||||
|
||||
// Class methods and variables
|
||||
|
||||
App.tagSelectionTemplate = function (tag, container) {
|
||||
var $tag = $(
|
||||
'<span class="label label-tag" style="background: ' + tag.element.style.color + ';"> ' + tag.text + '</span>'
|
||||
);
|
||||
container[0].style.background = tag.element.style.color;
|
||||
return $tag;
|
||||
}
|
||||
|
||||
App.tagResultTemplate = function (tag) {
|
||||
if (!tag.element) { return ''; }
|
||||
var $tag = $(
|
||||
'<span class="label label-tag" style="background: ' + tag.element.style.color + ';"> ' + tag.text + '</span>'
|
||||
);
|
||||
return $tag;
|
||||
}
|
||||
|
||||
// Instance methods
|
||||
|
||||
App.prototype.doToastrMessages = function () {
|
||||
toastr.options = {
|
||||
'closeButton': true,
|
||||
'debug': false,
|
||||
'newestOnTop': true,
|
||||
'positionClass': 'toast-top-right',
|
||||
'preventDuplicates': false,
|
||||
'onclick': null,
|
||||
'showDuration': '300',
|
||||
'hideDuration': '1000',
|
||||
'timeOut': '5000',
|
||||
'extendedTimeOut': '1000',
|
||||
'showEasing': 'swing',
|
||||
'hideEasing': 'linear',
|
||||
'showMethod': 'fadeIn',
|
||||
'hideMethod': 'fadeOut'
|
||||
}
|
||||
|
||||
// Add invisible bootstrap messages to copy the styles to toastr.js
|
||||
|
||||
$('body').append('\
|
||||
<div class="hidden alert alert-success">\
|
||||
<p>text</p>\
|
||||
</div>\
|
||||
<div class="hidden alert alert-info">\
|
||||
<p>text</p>\
|
||||
</div>\
|
||||
<div class="hidden alert alert-danger">\
|
||||
<p>text</p>\
|
||||
</div>\
|
||||
<div class="hidden alert alert-warning">\
|
||||
<p>text</p>\
|
||||
</div>\
|
||||
');
|
||||
|
||||
// Copy the bootstrap style from the sample alerts to toaster.js via
|
||||
// dynamic document style tag
|
||||
|
||||
$('head').append('\
|
||||
<style>\
|
||||
.toast-success {\
|
||||
background-color: ' + $('.alert-success').css('background-color') +'\
|
||||
}\
|
||||
.toast-info {\
|
||||
background-color: ' + $('.alert-info').css('background-color') +'\
|
||||
}\
|
||||
.toast-error {\
|
||||
background-color: ' + $('.alert-danger').css('background-color') +'\
|
||||
}\
|
||||
.toast-warning {\
|
||||
background-color: ' + $('.alert-warning').css('background-color') +'\
|
||||
}\
|
||||
</style>\
|
||||
');
|
||||
|
||||
$.each(DjangoMessages, function (index, value) {
|
||||
var options = {};
|
||||
|
||||
if (value.tags === 'error') {
|
||||
// Error messages persist
|
||||
options['timeOut'] = 10000;
|
||||
}
|
||||
toastr[value.tags](value.message, '', options);
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupAutoSubmit = function () {
|
||||
$('.select-auto-submit').change(function () {
|
||||
if ($(this).val()) {
|
||||
this.form.submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupNewWindowAnchor = function () {
|
||||
$('a.new_window').click(function (event) {
|
||||
var newWindow = window.open($(this).attr('href'), '_blank');
|
||||
newWindow.focus();
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupScrollView = function () {
|
||||
$('.scrollable').scrollview();
|
||||
}
|
||||
|
||||
App.prototype.setupTableSelector = function () {
|
||||
$('th input:checkbox').click(function(e) {
|
||||
var table = $(e.target).closest('table');
|
||||
var checked = $(e.target).prop('checked');
|
||||
$('td input:checkbox', table).prop('checked', checked);
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupItemsSelector = function () {
|
||||
$('.check-all').click(function(e) {
|
||||
var parent = $(e.target).closest('.well');
|
||||
var checked = $(e.target).prop('checked');
|
||||
$('.panel-item input:checkbox', parent).prop('checked', checked);
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupSelect2 = function () {
|
||||
$('.select2').select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%'
|
||||
});
|
||||
|
||||
$('.select2-tags').select2({
|
||||
templateSelection: App.tagSelectionTemplate,
|
||||
templateResult: App.tagResultTemplate,
|
||||
width: '100%'
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.setupFullHeightResizing = function () {
|
||||
var self = this;
|
||||
|
||||
this.resizeFullHeight();
|
||||
|
||||
this.window.resize(function() {
|
||||
self.resizeFullHeight();
|
||||
});
|
||||
}
|
||||
|
||||
App.prototype.resizeFullHeight = function () {
|
||||
$('.full-height').height(this.window.height() - $('.full-height').data('height-difference'));
|
||||
}
|
||||
84
mayan/apps/appearance/static/appearance/js/mayan_image.js
Normal file
84
mayan/apps/appearance/static/appearance/js/mayan_image.js
Normal file
@@ -0,0 +1,84 @@
|
||||
'use strict';
|
||||
|
||||
var MayanImage = function (options) {
|
||||
this.element = options.element;
|
||||
this.load();
|
||||
}
|
||||
|
||||
MayanImage.intialize = function () {
|
||||
$('a.fancybox').fancybox({
|
||||
beforeShow : function(){
|
||||
this.title = $(this.element).data('caption');
|
||||
},
|
||||
openEffect : 'elastic',
|
||||
closeEffect : 'elastic',
|
||||
prevEffect : 'none',
|
||||
nextEffect : 'none',
|
||||
titleShow : true,
|
||||
type : 'image',
|
||||
autoResize : true,
|
||||
});
|
||||
|
||||
$('img.lazy-load').lazyload({
|
||||
appear: function(elements_left, settings) {
|
||||
new MayanImage({element: $(this)});
|
||||
},
|
||||
threshold: 400,
|
||||
});
|
||||
|
||||
$('img.lazy-load-carousel').lazyload({
|
||||
appear: function(elements_left, settings) {
|
||||
new MayanImage({element: $(this)});
|
||||
},
|
||||
container: $('#carousel-container'),
|
||||
threshold: 2000
|
||||
});
|
||||
|
||||
$('.lazy-load').on('load', function() {
|
||||
$(this).hide();
|
||||
$(this).fadeIn();
|
||||
$(this).siblings('.spinner-container').remove();
|
||||
$(this).removeClass('lazy-load pull-left');
|
||||
});
|
||||
|
||||
$('.lazy-load-carousel').on('load', function() {
|
||||
$(this).hide();
|
||||
$(this).fadeIn();
|
||||
$(this).siblings('.spinner-container').remove();
|
||||
$(this).removeClass('lazy-load-carousel pull-left');
|
||||
});
|
||||
}
|
||||
|
||||
MayanImage.prototype.onImageError = function () {
|
||||
this.element.parent().parent().html('\
|
||||
<div class="fa-3x">\
|
||||
<span class="fa-layers fa-fw">\
|
||||
<i class="far fa-file"></i>\
|
||||
<i class="fa-inverse fas fa-times text-danger" data-fa-transform="shrink-6"></i>\
|
||||
</span>\
|
||||
</div>\
|
||||
')
|
||||
|
||||
// Remove border to indicate non interactive image
|
||||
this.element.removeClass('thin_border');
|
||||
|
||||
var container = this.element.parent().parent();
|
||||
// Save img HTML
|
||||
var html = this.element.parent().html();
|
||||
// Remove anchor
|
||||
this.element.parent().remove();
|
||||
// Place again img
|
||||
container.html(html);
|
||||
};
|
||||
|
||||
MayanImage.prototype.load = function () {
|
||||
var self = this;
|
||||
|
||||
this.element.error(function(event) {
|
||||
self.onImageError();
|
||||
});
|
||||
|
||||
this.element.attr('src', this.element.attr('data-url'));
|
||||
$.fn.matchHeight._update();
|
||||
$.fn.matchHeight._maintainScroll = true;
|
||||
};
|
||||
203
mayan/apps/appearance/static/appearance/js/partial_navigation.js
Normal file
203
mayan/apps/appearance/static/appearance/js/partial_navigation.js
Normal file
@@ -0,0 +1,203 @@
|
||||
'use strict';
|
||||
|
||||
$.fn.hasAnyClass = function() {
|
||||
for (var i = 0; i < arguments[0].length; i++) {
|
||||
if (this.hasClass(arguments[0][i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var PartialNavigation = function (parameters) {
|
||||
parameters = parameters || {};
|
||||
|
||||
this.initialURL = parameters.initialURL || null;
|
||||
this.excludeAnchorClasses = parameters.excludeAnchorClasses || [];
|
||||
|
||||
if (!this.initialURL) {
|
||||
alert('Need to setup initialURL');
|
||||
}
|
||||
|
||||
this.setupAjaxAnchors();
|
||||
this.setupHashLocation();
|
||||
this.setupAjaxForm();
|
||||
}
|
||||
|
||||
PartialNavigation.prototype.filterLocation = function (location) {
|
||||
var uri = new URI(location);
|
||||
|
||||
console.log('>> filterLocation.location: ' + location);
|
||||
console.log('>> filterLocation.uri.path(): ' + uri.path());
|
||||
if (uri.path() === '/') {
|
||||
// Root URL is not allowed
|
||||
return this.initialURL;
|
||||
}
|
||||
|
||||
return location;
|
||||
}
|
||||
|
||||
PartialNavigation.prototype.loadAjaxContent = function (url) {
|
||||
var app = this;
|
||||
|
||||
console.log('>> loadAjaxContent.url: ' + url);
|
||||
url = this.filterLocation(url);
|
||||
console.log('>> loadAjaxContent.filterLocation.url: ' + url);
|
||||
$.ajax({
|
||||
async: true,
|
||||
mimeType: 'text/html; charset=utf-8', // ! Need set mimeType only when run from local file
|
||||
url: url,
|
||||
type: 'GET',
|
||||
success: function(data, textStatus, response){
|
||||
if (response.status == 278) {
|
||||
console.log('>> loadAjaxContent.ajax: got HTTP278');
|
||||
var newLocation = response.getResponseHeader('Location');
|
||||
|
||||
console.log('>> loadAjaxContent.ajax.newLocation: ' + newLocation);
|
||||
|
||||
app.setLocation(newLocation);
|
||||
} else {
|
||||
if (response.getResponseHeader('Content-Disposition')) {
|
||||
window.location = this.url;
|
||||
} else {
|
||||
$('#ajax-content').html(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown){
|
||||
app.processAjaxRequestError(jqXHR);
|
||||
},
|
||||
dataType: 'html',
|
||||
});
|
||||
}
|
||||
|
||||
PartialNavigation.prototype.onAnchorClick = function ($this, event) {
|
||||
console.log('>> onAnchorClick');
|
||||
var url;
|
||||
|
||||
if ($this.hasAnyClass(this.excludeAnchorClasses)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
url = $this.attr('href');
|
||||
if (url === undefined) {
|
||||
return true;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
console.log('>> onAnchorClick.url: ' + url);
|
||||
|
||||
if ((url !== '#') && !($this.hasClass('disabled') || $this.parent().hasClass('disabled'))) {
|
||||
this.setLocation(url);
|
||||
}
|
||||
}
|
||||
|
||||
PartialNavigation.prototype.processAjaxRequestError = function (jqXHR) {
|
||||
window.history.back();
|
||||
|
||||
if (jqXHR.status == 0) {
|
||||
$('#modal-server-error .modal-body').html($('#template-error').html());
|
||||
} else {
|
||||
$('#modal-server-error .modal-body').html(jqXHR.responseText.replace(/\n/g, "<br />"));
|
||||
}
|
||||
|
||||
$('#modal-server-error').modal('show')
|
||||
}
|
||||
|
||||
PartialNavigation.prototype.setLocation = function (newLocation) {
|
||||
console.log('>> setLocation.newLocation: ' + newLocation);
|
||||
console.log('>> setLocation.location: ' + location);
|
||||
newLocation = this.filterLocation(newLocation);
|
||||
|
||||
var currentLocationPath = new URI(location).fragment();
|
||||
var newLocationPath = new URI(newLocation).path();
|
||||
|
||||
console.log(currentLocationPath);
|
||||
console.log(newLocationPath);
|
||||
if (currentLocationPath === newLocationPath) {
|
||||
// New location same as old, force a reload
|
||||
this.loadAjaxContent(newLocation);
|
||||
}
|
||||
window.location.hash = newLocation;
|
||||
}
|
||||
|
||||
PartialNavigation.prototype.setupAjaxAnchors = function () {
|
||||
var app = this;
|
||||
$('body').on('click', 'a', function (event) {
|
||||
app.onAnchorClick($(this), event);
|
||||
});
|
||||
}
|
||||
|
||||
PartialNavigation.prototype.setupAjaxForm = function () {
|
||||
var app = this;
|
||||
|
||||
$('form').ajaxForm({
|
||||
async: true,
|
||||
beforeSubmit: function(arr, $form, options) {
|
||||
console.log('>> ajaxForm.beforeSubmit.$form.target: ' + $form.attr('action'));
|
||||
|
||||
var uri = new URI(location);
|
||||
var uriFragment = uri.fragment();
|
||||
console.log('>>ajaxForm.$form.target.uriFragment:' + uriFragment);
|
||||
|
||||
var url = $form.attr('action') || uriFragment;
|
||||
|
||||
options.url = url;
|
||||
console.log('>>ajaxForm.url:' + url);
|
||||
},
|
||||
dataType: 'html',
|
||||
delegation: true,
|
||||
error: function(jqXHR, textStatus, errorThrown){
|
||||
app.processAjaxRequestError(jqXHR);
|
||||
},
|
||||
mimeType: 'text/html; charset=utf-8', // ! Need set mimeType only when run from local file
|
||||
success: function(data, textStatus, request){
|
||||
if (request.status == 278) {
|
||||
console.log('>> ajaxForm: Got HTTP 278');
|
||||
var newLocation = request.getResponseHeader('Location');
|
||||
|
||||
var uri = new URI(newLocation);
|
||||
var uriFragment = uri.fragment();
|
||||
|
||||
console.log('>>ajaxForm.newLocation:' + newLocation);
|
||||
console.log('>>ajaxForm.newLocation.uriFragment:' + uriFragment);
|
||||
console.log('>>ajaxForm.window.location.hash:' + window.location.hash);
|
||||
|
||||
var currentUri = new URI(window.location.hash);
|
||||
var currentUriFragment = currentUri.fragment();
|
||||
|
||||
var url = uriFragment || currentUriFragment;
|
||||
|
||||
app.setLocation(newLocation);
|
||||
|
||||
} else {
|
||||
console.log('>>ajaxForm.success');
|
||||
$('#ajax-content').html(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
PartialNavigation.prototype.setupHashLocation = function () {
|
||||
var app = this;
|
||||
|
||||
// Load ajax content when the hash changes
|
||||
if (window.history && window.history.pushState) {
|
||||
$(window).on('popstate', function() {
|
||||
console.log('>> setupHashLocation.location: ' + location);
|
||||
var uri = new URI(location);
|
||||
var uriFragment = uri.fragment();
|
||||
app.loadAjaxContent(uriFragment);
|
||||
});
|
||||
}
|
||||
|
||||
// Load any initial address in the URL of the browser
|
||||
if (window.location.hash) {
|
||||
var uri = new URI(window.location.hash);
|
||||
var uriFragment = uri.fragment();
|
||||
this.setLocation(uriFragment);
|
||||
} else {
|
||||
this.setLocation('/');
|
||||
}
|
||||
}
|
||||
9
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/.editorconfig
vendored
Normal file
9
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/.editorconfig
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[**]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/.gitignore
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/.jshintrc
vendored
Normal file
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/.jshintrc
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"node": true,
|
||||
"browser": false,
|
||||
"esnext": false,
|
||||
"bitwise": false,
|
||||
"camelcase": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"immed": true,
|
||||
"indent": 2,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"quotmark": "single",
|
||||
"regexp": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"strict": true,
|
||||
"trailing": true,
|
||||
"smarttabs": true,
|
||||
"expr": true,
|
||||
"globals": {
|
||||
"describe": false,
|
||||
"it": false,
|
||||
"before": false,
|
||||
"beforeEach": false,
|
||||
"after": false,
|
||||
"afterEach": false,
|
||||
"define": false
|
||||
}
|
||||
}
|
||||
383
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/CHANGELOG.md
vendored
Normal file
383
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/CHANGELOG.md
vendored
Normal file
@@ -0,0 +1,383 @@
|
||||
# URI.js - Changelog #
|
||||
|
||||
The release notes tracked in this document are also made available on the [releases page](https://github.com/medialize/URI.js/releases)
|
||||
|
||||
### 1.19.1 (February 10th 2018) ###
|
||||
|
||||
* fixing [`.href()`](http://medialize.github.io/URI.js/docs.html#href) to parse `query` property - [Issue #366](https://github.com/medialize/URI.js/issues/366), [PR #367](https://github.com/medialize/URI.js/issues/367)
|
||||
|
||||
### 1.19.0 (October 1st 2017) ###
|
||||
|
||||
* adding `.setFragment()` to [query fragment plugin](http://medialize.github.io/URI.js/docs.html#fragment-abuse-query) - [Issue #338](https://github.com/medialize/URI.js/issues/338), [PR #356](https://github.com/medialize/URI.js/issues/356)
|
||||
* adding setting [`URI.preventInvalidHostname`](http://medialize.github.io/URI.js/docs.html#setting-preventInvalidHostname) to control if an error should be thrown on invalid input - [Issue #352](https://github.com/medialize/URI.js/issues/352), [Issue #354](https://github.com/medialize/URI.js/issues/354), [Issue #355](https://github.com/medialize/URI.js/issues/355) - effectively making the changes of version 1.18.11 opt-in rather than default.
|
||||
|
||||
### 1.18.12 (August 9th 2017) ###
|
||||
|
||||
* making [`URI.parse()`](http://medialize.github.io/URI.js/docs.html#static-parse) allow `_` in hostname - [Issue #347](https://github.com/medialize/URI.js/issues/347), [PR #348](https://github.com/medialize/URI.js/issues/348)
|
||||
* fixing [`URI.parse()`](http://medialize.github.io/URI.js/docs.html#static-parse) to not use `Number.isNumber()` for IE compatibility - [Issue #350](https://github.com/medialize/URI.js/issues/350), [PR #351](https://github.com/medialize/URI.js/issues/351)
|
||||
|
||||
### 1.18.11 (August 8th 2017) ###
|
||||
|
||||
* making [`URI.parse()`](http://medialize.github.io/URI.js/docs.html#static-parse) throw on invalid port and hostname - [Issue #344](https://github.com/medialize/URI.js/issues/344), [PR #345](https://github.com/medialize/URI.js/issues/345)
|
||||
|
||||
### 1.18.10 (March 30th 2017) ###
|
||||
|
||||
* adding support for [CentralNic](https://en.wikipedia.org/wiki/CentralNic#Second-level_domains) Second Level Domains - [Issue #333](https://github.com/medialize/URI.js/issues/333)
|
||||
|
||||
### 1.18.9 (March 6th 2017) ###
|
||||
|
||||
* adding option `strict` to [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) in order to throw an exception in case a placeholder could not be replaced - [PR #330](https://github.com/medialize/URI.js/issues/330)
|
||||
|
||||
### 1.18.8 (February 27th 2017) ###
|
||||
|
||||
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to not resolve URIs containing a scheme - [Issue #328](https://github.com/medialize/URI.js/issues/328)
|
||||
|
||||
### 1.18.7 (February 13th 2017) ###
|
||||
|
||||
* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to ignore `www.` and `http://.` - [Issue #327](https://github.com/medialize/URI.js/issues/327)
|
||||
|
||||
### 1.18.6 (February 10th 2017) ###
|
||||
|
||||
* fixing [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) to allow `'` (single quotes) in literals - [PR #326](https://github.com/medialize/URI.js/pull/326)
|
||||
|
||||
### 1.18.5 (January 30th 2017) ###
|
||||
|
||||
* prevent `new URI(null)` from blowing up - [PR #321](https://github.com/medialize/URI.js/issues/321)
|
||||
* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to properly handle fully contained parentheses - [Issue #325](https://github.com/medialize/URI.js/issues/325)
|
||||
|
||||
### 1.18.4 (December 4th 2016) ###
|
||||
|
||||
* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to capture balanced parentheses - [Issue #247](https://github.com/medialize/URI.js/issues/247)
|
||||
|
||||
### 1.18.3 (November 17th 2016) ###
|
||||
|
||||
* fixing UMD wrappers to properly detect CommonJS - [Issue #318](https://github.com/medialize/URI.js/issues/318), [PR #319](https://github.com/medialize/URI.js/pull/319)
|
||||
|
||||
### 1.18.2 (September 25th 2016) ###
|
||||
|
||||
* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to allow callback to return `undefined` or `string` - [Issue #303](https://github.com/medialize/URI.js/issues/303)
|
||||
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to properly resolve relative paths for fragment-only URLs
|
||||
|
||||
### 1.18.1 (May 29th 2016) ###
|
||||
|
||||
* fixing UMD wrapper of `jquery.URI.js` - [Issue #295](https://github.com/medialize/URI.js/issues/295)
|
||||
|
||||
### 1.18.0 (April 30th 2016) ###
|
||||
|
||||
* adding [`URI.joinPaths()`](http://medialize.github.io/URI.js/docs.html#static-joinPaths) to compose paths from directory tokens - [Issue #285](https://github.com/medialize/URI.js/issues/285)
|
||||
* fixing [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) to allow `.` in variable names - [PR #287](https://github.com/medialize/URI.js/pull/287)
|
||||
* fixing [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) to reject invalid literals - [PR #289](https://github.com/medialize/URI.js/pull/289)
|
||||
* fixing [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) to reject prefix modifier on composite values - [PR #290](https://github.com/medialize/URI.js/pull/290)
|
||||
* fixing [`URI.buildUserinfo()`](http://medialize.github.io/URI.js/docs.html#static-buildUserinfo) to properly serialize password-only values - [PR #293](https://github.com/medialize/URI.js/pull/293)
|
||||
|
||||
### 1.17.1 (February 25th 2016) ###
|
||||
|
||||
* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly handle percent-encoded dot segments and leading dots in basename - [Issue #264](https://github.com/medialize/URI.js/issues/264), by [JordanMilne](https://github.com/JordanMilne)
|
||||
* fixing [`.hasQuery()`](http://medialize.github.io/URI.js/docs.html#search-has) to accept `RegExp` for name argument - [Issue #274](https://github.com/medialize/URI.js/issues/274), [Issue #277](https://github.com/medialize/URI.js/issues/277) by [mbrodala](https://github.com/mbrodala)
|
||||
|
||||
### 1.17.0 (November 13th 2015) ###
|
||||
|
||||
* fixing [`URI.removeQuery()`](http://medialize.github.io/URI.js/docs.html#search-remove) to cast values to string before matching - [Issue #250](https://github.com/medialize/URI.js/pull/250), [Issue #252](https://github.com/medialize/URI.js/pull/252), by [ryanelian](https://github.com/ryanelian) and [Siltaar](https://github.com/Siltaar)
|
||||
* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) to allow appending an empty element - [Issue #236](https://github.com/medialize/URI.js/issues/236), [Issue #253](https://github.com/medialize/URI.js/pull/253), by [orlando](https://github.com/orlando)
|
||||
* adding [`.origin()`](http://medialize.github.io/URI.js/docs.html#accessors-origin) to get protocol and authority, counter-part to `.resource()` - [Issue #210](https://github.com/medialize/URI.js/issues/210), [Issue #263](https://github.com/medialize/URI.js/pull/263), by [justinmchase](https://github.com/justinmchase)
|
||||
|
||||
### 1.16.1 (September 19th 2015) ###
|
||||
|
||||
Package Management Cleanup - no changes to source code!
|
||||
|
||||
* renaming package to "urijs", was "URIjs" (because npm decided to go lower-case at some point and maintaining capitals in your package name poses all sorts of stupid issues)
|
||||
* removing [jam](http://jamjs.org/), [spm](http://spmjs.org/), `component.json` and `URI.jquery.json` as nobody cared that URI.js was stuck on 1.14 for a year
|
||||
|
||||
### 1.16.0 (July 24th 2015) ###
|
||||
|
||||
* **SECURITY** fixing [`URI.parseHost()`](http://medialize.github.io/URI.js/docs.html#static-parseHost) to rewrite `\` to `/` as Node and Browsers do - [Issue #233](https://github.com/medialize/URI.js/pull/233)
|
||||
* fixing [`.host()`](http://medialize.github.io/URI.js/docs.html#accessors-host) and [`.authority()`](http://medialize.github.io/URI.js/docs.html#accessors-authority) to raise an error if they contain a path segment (extending [Issue #233](https://github.com/medialize/URI.js/pull/233))
|
||||
|
||||
### 1.15.2 (July 2nd 2015) ###
|
||||
|
||||
* fixing [`URI.parseQuery()`](http://medialize.github.io/URI.js/docs.html#static-parseQuery) to accept `?foo&foo=bar` - [Issue #220](https://github.com/medialize/URI.js/issues/220)
|
||||
* fixing [`.segmentCoded()`](http://medialize.github.io/URI.js/docs.html#accessors-segmentCoded) to encode (instead of decode) array input - [Issue #223](https://github.com/medialize/URI.js/issues/223)
|
||||
* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly resolve `/foo/..` to `/` - [Issue #224](https://github.com/medialize/URI.js/issues/224)
|
||||
* fixing [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) to resolve `/foo/` and `/foo/bar` to `./` instead of empty string - [Issue #226](https://github.com/medialize/URI.js/issues/226)
|
||||
* fixing `bower.json`'s `"main": "src/URI.js"` - [Issue #227](https://github.com/medialize/URI.js/issues/227)
|
||||
|
||||
### 1.15.1 (April 5th 2015) ###
|
||||
|
||||
* fixing `URI()` to match behavior of `new URI()` (caused by [#196](https://github.com/medialize/URI.js/issues/196)) - [Issue #205](https://github.com/medialize/URI.js/issues/205)
|
||||
* fixing [`URI.removeQuery()`](http://medialize.github.io/URI.js/docs.html#search-remove) to accept RegExp for name and value arguments - ([Issue #204](https://github.com/medialize/URI.js/issues/204), [peterwillis](https://github.com/peterwillis))
|
||||
|
||||
### 1.15.0 (April 1st 2015 - no joke, promise!) ###
|
||||
|
||||
* fixing `URI(undefined)` to throw TypeError - ([Issue #189](https://github.com/medialize/URI.js/issues/189), [Issue #196](https://github.com/medialize/URI.js/issues/196), [eakron](https://github.com/eakron)) - *tiny backward-compatibility-break*
|
||||
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) - ([Issue #200](https://github.com/medialize/URI.js/issues/200), [giltayar](https://github.com/giltayar))
|
||||
* fixing [`.pathname()`](http://medialize.github.io/URI.js/docs.html#accessors-pathname) to properly en/decode URN paths - ([Issue #201](https://github.com/medialize/URI.js/pull/201), [mlefoster](https://github.com/mlefoster))
|
||||
* fixing URI normalization to properly handle URN paths based on [RFC 2141](https://www.ietf.org/rfc/rfc2141.txt) syntax - ([Issue #201](https://github.com/medialize/URI.js/pull/201), [mlefoster](https://github.com/mlefoster))
|
||||
* fixing [`.normalize()`](http://medialize.github.io/URI.js/docs.html#normalize) and [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly normalize URN paths
|
||||
* adding `URI.encodeUrnPathSegment()`
|
||||
* adding `URI.decodeUrnPathSegment()`
|
||||
* adding `URI.decodeUrnPath()`
|
||||
* adding `URI.recodeUrnPath()`
|
||||
|
||||
### 1.14.2 (February 25th 2015) ###
|
||||
|
||||
* fixing inclusion of LICENSE in packages - ([Issue #174](https://github.com/medialize/URI.js/issues/174))
|
||||
* fixing [`URI.parseHost()`](http://medialize.github.io/URI.js/docs.html#static-parseHost) to not interpret colon in path as IPv6 hostname - ([Issue #190](https://github.com/medialize/URI.js/issues/190))
|
||||
* adding meta data for [SPM](http://www.spmjs.io/) package manager - ([Issue #176](https://github.com/medialize/URI.js/issues/176))
|
||||
* adding license meta to `bower.json`
|
||||
|
||||
### 1.14.1 (October 1st 2014) ###
|
||||
|
||||
* fixing handling of String instances (not string primitives) - ([Issue #146](https://github.com/medialize/URI.js/issues/146))
|
||||
* fixing Firefox [`.watch()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch) interfering with `.parseQuery()` - ([Issue #169](https://github.com/medialize/URI.js/issues/169))
|
||||
* fixing [`addQuery()`](http://medialize.github.io/URI.js/docs.html#search-add) to not throw error on null value - ([Issue #171](https://github.com/medialize/URI.js/issues/171))
|
||||
|
||||
### 1.14.0 (September 8th 2014) ###
|
||||
|
||||
* adding Hungarian second level domains - ([Issue #159](https://github.com/medialize/URI.js/issues/159))
|
||||
* adding `<audio src="…">` and `<video src="…">` to supported DOM attributes - ([Issue #160](https://github.com/medialize/URI.js/issues/160)), ([Issue #161](https://github.com/medialize/URI.js/issues/161))
|
||||
* fixing `file://hostname/path` parsing - ([Issue #158](https://github.com/medialize/URI.js/issues/158))
|
||||
* fixing `.decodePathSegment()` to not throw malformed URI error - ([Issue #163](https://github.com/medialize/URI.js/issues/163))
|
||||
|
||||
### 1.13.2 (May 29th 2014) ###
|
||||
|
||||
* changes to package management manifests only
|
||||
|
||||
### 1.13.1 (April 16th 2014) ###
|
||||
|
||||
* fixing IPv6 normalization (bad variable name) - ([Issue #145](https://github.com/medialize/URI.js/issues/145))
|
||||
* adding grunt and jshint
|
||||
* changing code style to 2 spaces indentation, single quote strings
|
||||
* applying `'use strict';` everywhere
|
||||
* fixing jshint warnings
|
||||
|
||||
### 1.13.0 (April 15th 2014) ###
|
||||
|
||||
* fixing [`URI.parseHost()`](http://medialize.github.io/URI.js/docs.html#static-parseHost) and [`URI.buildHost()`](http://medialize.github.io/URI.js/docs.html#static-buildHost) to properly parse and build the IPv6 examples given in [RFC2732 Format for Literal IPv6 Addresses in URL's](http://tools.ietf.org/html/rfc2732#section-2) - ([Issue #144](https://github.com/medialize/URI.js/issues/144))
|
||||
* adding performance improvements to SecondLevelDomain - ([PR #122](https://github.com/medialize/URI.js/pull/122), [gorhill](https://github.com/gorhill))
|
||||
|
||||
### 1.12.1 (March 8th 2014) ###
|
||||
|
||||
* fixing [`.encodeQuery()`](http://medialize.github.io/URI.js/docs.html#static-encodeQuery) and [`.decodeQuery()`](http://medialize.github.io/URI.js/docs.html#static-decodeQuery) to respect [`URI.escapeQuerySpace`](http://medialize.github.io/URI.js/docs.html#setting-escapeQuerySpace) - ([Issue #137](https://github.com/medialize/URI.js/issues/137))
|
||||
* fixing fragment plugins to return URI for simpler loading - ([Issue #139](https://github.com/medialize/URI.js/issues/139))
|
||||
|
||||
### 1.12.0 (January 23rd 2014) ###
|
||||
|
||||
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to comply with [RFC3986 Reference Resolution Examples](http://tools.ietf.org/html/rfc3986#section-5.4) - ([Issue #113](https://github.com/medialize/URI.js/issues/113))
|
||||
* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to maintain leading parent references (`../`) for relative paths, while removing them for absolute paths - ([Issue #133](https://github.com/medialize/URI.js/issues/133))
|
||||
* fixing `URI.protocol_expression` to properly accept `.` in compliance with [RFC 3986 - Scheme](http://tools.ietf.org/html/rfc3986#section-3.1) - ([Issue #132](https://github.com/medialize/URI.js/issues/132))
|
||||
* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to not use backtracking prone regular expression `URI.find_uri_expression` anymore - ([Issue #131](https://github.com/medialize/URI.js/issues/131))
|
||||
* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to accept options `ignore` and `ignoreHtml` to allow better control over which detected URLs get handled - ([Issue #117](https://github.com/medialize/URI.js/issues/117))
|
||||
* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to accept option `start` to specify the RegExp used for finding the beginning of an URL (defaults to `/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi`) - ([Issue #115](https://github.com/medialize/URI.js/issues/115))
|
||||
|
||||
### 1.11.2 (August 14th 2013) ###
|
||||
|
||||
* fixing regression for Node.js introduced by `fixing unsafe eval by using UMD's root` - ([Issue #107](https://github.com/medialize/URI.js/issues/107))
|
||||
* fixing parser to accept malformed userinfo (non-encoded email address) - ([Issue #108](https://github.com/medialize/URI.js/issues/108))
|
||||
|
||||
### 1.11.1 (August 13th 2013) ###
|
||||
|
||||
* fixing inconsistent [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) results caused by inconsistent URI component handling - ([Issue #103](https://github.com/medialize/URI.js/issues/103))
|
||||
* fixing unsafe eval by using UMD's root - ([Issue #105](https://github.com/medialize/URI.js/issues/105))
|
||||
* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) to allow appending an empty element - ([Issue #106](https://github.com/medialize/URI.js/issues/106))
|
||||
* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) to collapse empty elements in array notation
|
||||
|
||||
### 1.11.0 (August 6th 2013) ###
|
||||
|
||||
* adding [`.segmentCoded()`](http://medialize.github.io/URI.js/docs.html#accessors-segmentCoded) to provide en/decoding interface to `.segment()` - ([Issue #79](https://github.com/medialize/URI.js/issues/79))
|
||||
* optimize [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) results - ([Issue #78](https://github.com/medialize/URI.js/issues/78), [Issue #95](https://github.com/medialize/URI.js/issues/95))
|
||||
* removing obsolete code fragments from `URI.parse()` and `relativeTo()` - ([Issue #100](https://github.com/medialize/URI.js/issues/100))
|
||||
* adding setting [`URI.escapeQuerySpace`](http://medialize.github.io/URI.js/docs.html#setting-escapeQuerySpace) to control if query string should escape spaces using `+` or `%20` - ([Issue #74](https://github.com/medialize/URI.js/issues/74))
|
||||
* updating [Punycode.js](https://github.com/bestiejs/punycode.js/) to version 1.2.3
|
||||
* fixing internal `strictEncodeURIComponent()` to work in Firefox 3.6 - ([Issue #91](https://github.com/medialize/URI.js/issues/91))
|
||||
* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly resolve `/.` and `/.//` to `/` - ([Issue #97](https://github.com/medialize/URI.js/issues/97))
|
||||
* fixing [`.path()`](http://medialize.github.io/URI.js/docs.html#accessors-pathname) to return empty string if there is no path - ([Issue #82](https://github.com/medialize/URI.js/issues/82))
|
||||
* fixing crashing of `URI.decodeQuery()` on malformed input - now returns original undecoded data - ([Issue #87](https://github.com/medialize/URI.js/issues/87), [Issue #92](https://github.com/medialize/URI.js/issues/92))
|
||||
* fixing build tool - ([Issue #83](https://github.com/medialize/URI.js/issues/83))
|
||||
* fixing for-loop to make closure compiler happy - ([Issue #93](https://github.com/medialize/URI.js/issues/93))
|
||||
* adding [`URI.noConflict()`](http://medialize.github.io/URI.js/docs.html#static-noConflict) - ([Issue #84](https://github.com/medialize/URI.js/issue/84))
|
||||
* fixing whitespace in code - ([Issue #84](https://github.com/medialize/URI.js/issue/84))
|
||||
* fixing [`.readable()`](http://medialize.github.io/URI.js/docs.html#readable) to decode the hash value as well - ([Issue #90](https://github.com/medialize/URI.js/issue/90))
|
||||
* prevent `jquery.URI.js` from temporarily using `window.location` as the `href` of an empty attribute of a DOM element - ([Issue #94](https://github.com/medialize/URI.js/issues/94))
|
||||
* fixing internal `getType()` for IE8 with undefined value - ([Issue #96](https://github.com/medialize/URI.js/issues/96))
|
||||
* adding DOM elements to [URI constructor](http://medialize.github.io/URI.js/docs.html#constructor) - ([Issue #77](https://github.com/medialize/URI.js/issues/77)):
|
||||
* [`<a href="...">`](http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#the-a-element)
|
||||
* [`<blockquote cite="...">`](http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-blockquote-element)
|
||||
* [`<link href="...">`](http://www.w3.org/html/wg/drafts/html/master/document-metadata.html#the-link-element)
|
||||
* [`<base href="...">`](http://www.w3.org/html/wg/drafts/html/master/document-metadata.html#the-base-element)
|
||||
* [`<script src="...">`](http://www.w3.org/html/wg/drafts/html/master/scripting-1.html#script)
|
||||
* [`<form action="...">`](http://www.w3.org/html/wg/drafts/html/master/forms.html#the-form-element)
|
||||
* [`<input type="image" src="...">`](http://www.w3.org/html/wg/drafts/html/master/forms.html#the-input-element)
|
||||
* [`<img src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-img-element)
|
||||
* [`<area href="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-area-element)
|
||||
* [`<iframe src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-iframe-element)
|
||||
* [`<embed src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-embed-element)
|
||||
* [`<source src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-source-element)
|
||||
* [`<track src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-track-element)
|
||||
* optimize `jquery.URI.js` to use new DOM element infrastructure
|
||||
|
||||
### 1.10.2 (April 15th 2013) ###
|
||||
|
||||
* fixing [`relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) - ([Issue #75](https://github.com/medialize/URI.js/issues/75))
|
||||
* fixing [`normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to not prepend `./` to relative paths - ([Issue #76](https://github.com/medialize/URI.js/issues/76))
|
||||
|
||||
### 1.10.1 (April 2nd 2013) ###
|
||||
|
||||
* adding [`absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to properly resolve relative scheme - ([Issue #71](https://github.com/medialize/URI.js/issues/73))
|
||||
|
||||
### 1.10.0 (March 16th 2013) ###
|
||||
|
||||
* adding [`hasQuery()`](http://medialize.github.io/URI.js/docs.html#search-has) - ([Issue #71](https://github.com/medialize/URI.js/issues/71))
|
||||
* fixing URI property detection to return 'src' if none was detected (`jquery.URI.js`) - ([Issue #69](https://github.com/medialize/URI.js/issues/69))
|
||||
|
||||
### 1.9.1 (February 12th 2013) ###
|
||||
|
||||
* fixing IE9 compatibility with location import: `URI(location)`
|
||||
* fixing string character access for IE7 - ([Issue #67](https://github.com/medialize/URI.js/issues/67)), ([Issue #68](https://github.com/medialize/URI.js/issues/68))
|
||||
|
||||
### 1.9.0 (February 11th 2013) ###
|
||||
|
||||
* adding [`.setQuery()`](http://medialize.github.io/URI.js/docs.html#search-set) - ([Issue #64](https://github.com/medialize/URI.js/issues/64))
|
||||
* adding callback argument to [`.query()`](http://medialize.github.io/URI.js/docs.html#accessors-search)
|
||||
* adding jQuery 1.9.1 to the test suite
|
||||
|
||||
### 1.8.3 (January 9th 2013) ###
|
||||
|
||||
* fixing [UglifyJS2](https://github.com/mishoo/UglifyJS2) compression - ([Issue #60](https://github.com/medialize/URI.js/issues/60), [fidian](https://github.com/fidian))
|
||||
|
||||
### 1.8.2 (December 27th 2012) ###
|
||||
|
||||
* adding `.fragmentPrefix()` to configure prefix of fragmentURI and fragmentQuery extensions - ([Issue #55](https://github.com/medialize/URI.js/issues/55))
|
||||
* adding docs for [`.toString()`, `.valueOf()`](http://medialize.github.io/URI.js/docs.html#toString) and [`.href()`](http://medialize.github.io/URI.js/docs.html#href) - ([Issue #56](https://github.com/medialize/URI.js/issues/56))
|
||||
* fixing [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) for descendants - ([Issue #57](https://github.com/medialize/URI.js/issues/57))
|
||||
|
||||
### 1.8.1 (November 15th 2012) ###
|
||||
|
||||
* fixing build() to properly omit empty query and fragment ([Issue #53](https://github.com/medialize/URI.js/issues/53))
|
||||
|
||||
### 1.8.0 (November 13th 2012) ###
|
||||
|
||||
* adding [`.resource()`](http://medialize.github.io/URI.js/docs.html#accessors-resource) as compound of [path, query, fragment]
|
||||
* adding jQuery 1.8.x compatibility for jQuery.URI.js (remaining backwards compatibility!)
|
||||
* adding default ports for gopher, ws, wss
|
||||
* adding [`.duplicateQueryParameters()`](http://medialize.github.io/URI.js/docs.html#setting-duplicateQueryParameters) to control if `key=value` duplicates have to be preserved or reduced ([Issue #51](https://github.com/medialize/URI.js/issues/51))
|
||||
* updating [Punycode.js](https://github.com/bestiejs/punycode.js/) to version 1.1.1
|
||||
* improving AMD/Node using [UMD returnExports](https://github.com/umdjs/umd/blob/master/returnExports.js) - ([Issue #44](https://github.com/medialize/URI.js/issues/44), [Issue #47](https://github.com/medialize/URI.js/issues/47))
|
||||
* fixing `.addQuery("empty")` to properly add `?empty` - ([Issue #46](https://github.com/medialize/URI.js/issues/46))
|
||||
* fixing parsing of badly formatted userinfo `http://username:pass:word@hostname`
|
||||
* fixing parsing of Windows-Drive-Letter paths `file://C:/WINDOWS/foo.txt`
|
||||
* fixing `URI(location)` to properly parse the URL - ([Issue #52](https://github.com/medialize/URI.js/issues/52))
|
||||
* fixing type error for fragment abuse demos - ([Issue #50](https://github.com/medialize/URI.js/issues/50))
|
||||
* adding documentation for various [encode/decode functions](http://medialize.github.io/URI.js/docs.html#encoding-decoding)
|
||||
* adding some pointers on possible problems with URLs to [About URIs](http://medialize.github.io/URI.js/about-uris.html)
|
||||
* adding tests for fragment abuse and splitting tests into separate scopes
|
||||
* adding meta-data for [Jam](http://jamjs.org/) and [Bower](http://twitter.github.com/bower/)
|
||||
|
||||
Note: QUnit seems to be having some difficulties on IE8. While the jQuery-plugin tests fail, the plugin itself works. We're still trying to figure out what's making QUnit "lose its config state".
|
||||
|
||||
### 1.7.4 (October 21st 2012) ###
|
||||
|
||||
* fixing parsing of `/wiki/Help:IPA` - ([Issue #49](https://github.com/medialize/URI.js/issues/49))
|
||||
|
||||
### 1.7.3 (October 11th 2012) ###
|
||||
|
||||
* fixing `strictEncodeURIComponent()` to properly encode `*` to `%2A`
|
||||
* fixing IE9's incorrect report of `img.href` being available - ([Issue #48](https://github.com/medialize/URI.js/issues/48))
|
||||
|
||||
### 1.7.2 (August 28th 2012) ###
|
||||
|
||||
* fixing SLD detection in [`.tld()`](http://medialize.github.io/URI.js/docs.html#accessors-tld) - `foot.se` would detect `t.se` - ([Issue #42](https://github.com/medialize/URI.js/issues/42))
|
||||
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to comply with [RFC 3986 Section 5.2.2](http://tools.ietf.org/html/rfc3986#section-5.2.2) - ([Issue #41](https://github.com/medialize/URI.js/issues/41))
|
||||
* fixing `location` not being available in non-browser environments like node.js ([Issue #45](https://github.com/medialize/URI.js/issues/45) [grimen](https://github.com/grimen))
|
||||
|
||||
### 1.7.1 (August 14th 2012) ###
|
||||
|
||||
* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment)'s append operation - ([Issue #39](https://github.com/medialize/URI.js/issues/39))
|
||||
|
||||
### 1.7.0 (August 11th 2012) ###
|
||||
|
||||
* fixing URI() constructor passing of `base` - ([Issue #33](https://github.com/medialize/URI.js/issues/33) [LarryBattle](https://github.com/LarryBattle))
|
||||
* adding [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) accessor - ([Issue #34](https://github.com/medialize/URI.js/issues/34))
|
||||
* upgrading `URI.encode()` to strict URI encoding according to RFC3986
|
||||
* adding `URI.encodeReserved()` to exclude reserved characters (according to RFC3986) from being encoded
|
||||
* adding [URI Template (RFC 6570)](http://tools.ietf.org/html/rfc6570) support with [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html)
|
||||
|
||||
### 1.6.3 (June 24th 2012) ###
|
||||
|
||||
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to join two relative paths properly - ([Issue #29](https://github.com/medialize/URI.js/issues/29))
|
||||
* adding [`.clone()`](http://medialize.github.io/URI.js/docs.html#clone) to copy an URI instance
|
||||
|
||||
### 1.6.2 (June 23rd 2012) ###
|
||||
|
||||
* [`.directory()`](http://medialize.github.io/URI.js/docs.html#accessors-directory) now returns empty string if there is no directory
|
||||
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to join two relative paths properly - ([Issue #29](https://github.com/medialize/URI.js/issues/29))
|
||||
|
||||
### 1.6.1 (May 19th 2012) ###
|
||||
|
||||
* fixing TypeError on [`.domain()`](http://medialize.github.io/URI.js/docs.html#accessors-domain) with dot-less hostnames - ([Issue #27](https://github.com/medialize/URI.js/issues/27))
|
||||
|
||||
### 1.6.0 (March 19th 2012) ###
|
||||
|
||||
* adding [URN](http://tools.ietf.org/html/rfc3986#section-3) (`javascript:`, `mailto:`, ...) support
|
||||
* adding [`.scheme()`](http://medialize.github.io/URI.js/docs.html#accessors-protocol) as alias of [`.protocol()`](http://medialize.github.io/URI.js/docs.html#accessors-protocol)
|
||||
* adding [`.userinfo()`](http://medialize.github.io/URI.js/docs.html#accessors-userinfo) to comply with terminology of [RFC 3986](http://tools.ietf.org/html/rfc3986#section-3.2.1)
|
||||
* adding [jQuery Plugin](http://medialize.github.io/URI.js/jquery-uri-plugin.html) `src/jquery.URI.js`
|
||||
* fixing relative scheme URLs - ([Issue #19](https://github.com/medialize/URI.js/issues/19) [byroot](https://github.com/byroot))
|
||||
|
||||
### 1.5.0 (February 19th 2012) ###
|
||||
|
||||
* adding Second Level Domain (SLD) Support - ([Issue #17](https://github.com/medialize/URI.js/issues/17))
|
||||
|
||||
### 1.4.3 (January 28th 2012) ###
|
||||
|
||||
* fixing global scope leakage - ([Issue #15](https://github.com/medialize/URI.js/issues/15) [mark-rushakoff](https://github.com/mark-rushakoff))
|
||||
|
||||
### 1.4.2 (January 25th 2012) ###
|
||||
|
||||
* improving CommonJS compatibility - ([Issue #14](https://github.com/medialize/URI.js/issues/14) [FGRibreau](https://github.com/FGRibreau))
|
||||
|
||||
### 1.4.1 (January 21st 2012) ###
|
||||
|
||||
* adding CommonJS compatibility - ([Issue #11](https://github.com/medialize/URI.js/issues/11), [Evangenieur](https://github.com/Evangenieur))
|
||||
|
||||
### 1.4.0 (January 12th 2012) ###
|
||||
|
||||
* adding [`URI.iso8859()`](http://medialize.github.io/URI.js/docs.html#static-iso8859) and [`URI.unicode()`](http://medialize.github.io/URI.js/docs.html#static-unicode) to switch base charsets - ([Issue #10](https://github.com/medialize/URI.js/issues/10), [mortenn](https://github.com/))
|
||||
* adding [`.iso8859()`](http://medialize.github.io/URI.js/docs.html#iso8859) and [`.unicode()`](http://medialize.github.io/URI.js/docs.html#unicode) to convert an URI's escape encoding
|
||||
|
||||
### 1.3.1 (January 3rd 2011) ###
|
||||
|
||||
* updating Punycode.js to version 0.3.0
|
||||
* adding edge-case tests ("jim")
|
||||
* fixing edge-cases in .protocol(), .port(), .subdomain(), .domain(), .tld(), .filename()
|
||||
* fixing parsing of hostname in [`.hostname()`](http://medialize.github.io/URI.js/docs.html#accessors-hostname)
|
||||
|
||||
### 1.3.0 (December 30th 2011) ###
|
||||
|
||||
* adding [`.subdomain()`](http://medialize.github.io/URI.js/docs.html#accessors-subdomain) convenience accessor
|
||||
* improving internal deferred build handling
|
||||
* fixing thrown Error for `URI("http://example.org").query(true)` - ([Issue #6](https://github.com/medialize/URI.js/issues/6))
|
||||
* adding examples for extending URI.js for [fragment abuse](http://medialize.github.io/URI.js/docs.html#fragment-abuse), see src/URI.fragmentQuery.js and src/URI.fragmentURI.js - ([Issue #2](https://github.com/medialize/URI.js/issues/2))
|
||||
|
||||
### 1.2.0 (December 29th 2011) ###
|
||||
|
||||
* adding [`.equals()`](http://medialize.github.io/URI.js/docs.html#equals) for URL comparison
|
||||
* fixing encoding/decoding for [`.pathname()`](http://medialize.github.io/URI.js/docs.html#accessors-pathname), [`.directory()`](http://medialize.github.io/URI.js/docs.html#accessors-directory), [`.filename()`](http://medialize.github.io/URI.js/docs.html#accessors-filename) and [`.suffix()`](http://medialize.github.io/URI.js/docs.html#accessors-suffix) according to [RFC 3986 3.3](http://tools.ietf.org/html/rfc3986#section-3.3)
|
||||
* fixing escape spaces in query strings with `+` according to [application/x-www-form-urlencoded](http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type)
|
||||
* fixing to allow [`URI.buildQuery()`](http://medialize.github.io/URI.js/docs.html#static-buildQuery) to build duplicate key=value combinations
|
||||
* fixing [`URI(string, string)`](http://medialize.github.io/URI.js/docs.html#constructor) constructor to conform with the [specification](http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor)
|
||||
* adding [`.readable()`](http://medialize.github.io/URI.js/docs.html#readable) for humanly readable representation of encoded URIs
|
||||
* fixing bug where @ in pathname would be parsed as part of the authority
|
||||
|
||||
### 1.1.0 (December 28th 2011) ###
|
||||
|
||||
* adding [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString)
|
||||
* adding [`.normalizeProtocol()`](http://medialize.github.io/URI.js/docs.html#normalize-protocol) to lowercase protocols
|
||||
* fixing [`.normalizeHostname()`](http://medialize.github.io/URI.js/docs.html#normalize-host) to lowercase hostnames
|
||||
* fixing String.substr() to be replaced by String.substring() - ([Issue #1](https://github.com/medialize/URI.js/issues/1))
|
||||
* fixing parsing "?foo" to `{foo: null}` [Algorithm for collecting URL parameters](http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#collect-url-parameters)
|
||||
* fixing building `{foo: null, bar: ""}` to "?foo&bar=" [Algorithm for serializing URL parameters](http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization)
|
||||
* fixing RegExp escaping
|
||||
|
||||
### 1.0.0 (December 27th 2011) ###
|
||||
|
||||
* Initial URI.js
|
||||
22
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/Gruntfile.js
vendored
Normal file
22
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/Gruntfile.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
module.exports = function(grunt) {
|
||||
'use strict';
|
||||
|
||||
var jshintOptions = grunt.file.readJSON('.jshintrc');
|
||||
jshintOptions.reporter = require('jshint-stylish');
|
||||
|
||||
grunt.initConfig({
|
||||
jshint: {
|
||||
options: jshintOptions,
|
||||
target: [
|
||||
'Gruntfile.js',
|
||||
'src/*.js',
|
||||
'test/*.js',
|
||||
'!src/*.min.js',
|
||||
'!src/punycode.js'
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.registerTask('lint', 'jshint');
|
||||
};
|
||||
21
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/LICENSE.txt
vendored
Normal file
21
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011 Rodney Rehm
|
||||
|
||||
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.
|
||||
245
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/README.md
vendored
Normal file
245
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/README.md
vendored
Normal file
@@ -0,0 +1,245 @@
|
||||
# URI.js #
|
||||
|
||||
[](https://cdnjs.com/libraries/URI.js)
|
||||
* [About](http://medialize.github.io/URI.js/)
|
||||
* [Understanding URIs](http://medialize.github.io/URI.js/about-uris.html)
|
||||
* [Documentation](http://medialize.github.io/URI.js/docs.html)
|
||||
* [jQuery URI Plugin](http://medialize.github.io/URI.js/jquery-uri-plugin.html)
|
||||
* [Author](http://rodneyrehm.de/en/)
|
||||
* [Changelog](./CHANGELOG.md)
|
||||
|
||||
---
|
||||
|
||||
> **NOTE:** The npm package name changed to `urijs`
|
||||
|
||||
---
|
||||
|
||||
I always want to shoot myself in the head when looking at code like the following:
|
||||
|
||||
```javascript
|
||||
var url = "http://example.org/foo?bar=baz";
|
||||
var separator = url.indexOf('?') > -1 ? '&' : '?';
|
||||
|
||||
url += separator + encodeURIComponent("foo") + "=" + encodeURIComponent("bar");
|
||||
```
|
||||
|
||||
Things are looking up with [URL](https://developer.mozilla.org/en/docs/Web/API/URL) and the [URL spec](http://url.spec.whatwg.org/) but until we can safely rely on that API, have a look at URI.js for a clean and simple API for mutating URIs:
|
||||
|
||||
```javascript
|
||||
var url = new URI("http://example.org/foo?bar=baz");
|
||||
url.addQuery("foo", "bar");
|
||||
```
|
||||
|
||||
URI.js is here to help with that.
|
||||
|
||||
|
||||
## API Example ##
|
||||
|
||||
```javascript
|
||||
// mutating URLs
|
||||
URI("http://example.org/foo.html?hello=world")
|
||||
.username("rodneyrehm")
|
||||
// -> http://rodneyrehm@example.org/foo.html?hello=world
|
||||
.username("")
|
||||
// -> http://example.org/foo.html?hello=world
|
||||
.directory("bar")
|
||||
// -> http://example.org/bar/foo.html?hello=world
|
||||
.suffix("xml")
|
||||
// -> http://example.org/bar/foo.xml?hello=world
|
||||
.query("")
|
||||
// -> http://example.org/bar/foo.xml
|
||||
.tld("com")
|
||||
// -> http://example.com/bar/foo.xml
|
||||
.query({ foo: "bar", hello: ["world", "mars"] });
|
||||
// -> http://example.com/bar/foo.xml?foo=bar&hello=world&hello=mars
|
||||
|
||||
// cleaning things up
|
||||
URI("?&foo=bar&&foo=bar&foo=baz&")
|
||||
.normalizeQuery();
|
||||
// -> ?foo=bar&foo=baz
|
||||
|
||||
// working with relative paths
|
||||
URI("/foo/bar/baz.html")
|
||||
.relativeTo("/foo/bar/world.html");
|
||||
// -> ./baz.html
|
||||
|
||||
URI("/foo/bar/baz.html")
|
||||
.relativeTo("/foo/bar/sub/world.html")
|
||||
// -> ../baz.html
|
||||
.absoluteTo("/foo/bar/sub/world.html");
|
||||
// -> /foo/bar/baz.html
|
||||
|
||||
// URI Templates
|
||||
URI.expand("/foo/{dir}/{file}", {
|
||||
dir: "bar",
|
||||
file: "world.html"
|
||||
});
|
||||
// -> /foo/bar/world.html
|
||||
```
|
||||
|
||||
See the [About Page](http://medialize.github.io/URI.js/) and [API Docs](http://medialize.github.io/URI.js/docs.html) for more stuff.
|
||||
|
||||
## Using URI.js ##
|
||||
|
||||
URI.js (without plugins) has a gzipped weight of about 7KB - if you include all extensions you end up at about 13KB. So unless you *need* second level domain support and use URI templates, we suggest you don't include them in your build. If you don't need a full featured URI mangler, it may be worth looking into the much smaller parser-only alternatives [listed below](#alternatives).
|
||||
|
||||
URI.js is available through [npm](https://www.npmjs.com/package/urijs), [bower](http://bower.io/search/?q=urijs), [bowercdn](http://bowercdn.net/package/urijs), [cdnjs](https://cdnjs.com/libraries/URI.js) and manually from the [build page](http://medialize.github.io/URI.js/build.html):
|
||||
|
||||
```bash
|
||||
# using bower
|
||||
bower install uri.js
|
||||
|
||||
# using npm
|
||||
npm install urijs
|
||||
```
|
||||
|
||||
### Browser ###
|
||||
|
||||
I guess you'll manage to use the [build tool](http://medialize.github.io/URI.js/build.html) or follow the [instructions below](#minify) to combine and minify the various files into URI.min.js - and I'm fairly certain you know how to `<script src=".../URI.min.js"></script>` that sucker, too.
|
||||
|
||||
### Node.js and NPM ###
|
||||
|
||||
Install with `npm install urijs` or add `"urijs"` to the dependencies in your `package.json`.
|
||||
|
||||
```javascript
|
||||
// load URI.js
|
||||
var URI = require('urijs');
|
||||
// load an optional module (e.g. URITemplate)
|
||||
var URITemplate = require('urijs/src/URITemplate');
|
||||
|
||||
URI("/foo/bar/baz.html")
|
||||
.relativeTo("/foo/bar/sub/world.html")
|
||||
// -> ../baz.html
|
||||
```
|
||||
|
||||
### RequireJS ###
|
||||
|
||||
Clone the URI.js repository or use a package manager to get URI.js into your project.
|
||||
|
||||
```javascript
|
||||
require.config({
|
||||
paths: {
|
||||
urijs: 'where-you-put-uri.js/src'
|
||||
}
|
||||
});
|
||||
|
||||
require(['urijs/URI'], function(URI) {
|
||||
console.log("URI.js and dependencies: ", URI("//amazon.co.uk").is('sld') ? 'loaded' : 'failed');
|
||||
});
|
||||
require(['urijs/URITemplate'], function(URITemplate) {
|
||||
console.log("URITemplate.js and dependencies: ", URITemplate._cache ? 'loaded' : 'failed');
|
||||
});
|
||||
```
|
||||
|
||||
## Minify ##
|
||||
|
||||
See the [build tool](http://medialize.github.io/URI.js/build.html) or use [Google Closure Compiler](http://closure-compiler.appspot.com/home):
|
||||
|
||||
```
|
||||
// ==ClosureCompiler==
|
||||
// @compilation_level SIMPLE_OPTIMIZATIONS
|
||||
// @output_file_name URI.min.js
|
||||
// @code_url http://medialize.github.io/URI.js/src/IPv6.js
|
||||
// @code_url http://medialize.github.io/URI.js/src/punycode.js
|
||||
// @code_url http://medialize.github.io/URI.js/src/SecondLevelDomains.js
|
||||
// @code_url http://medialize.github.io/URI.js/src/URI.js
|
||||
// @code_url http://medialize.github.io/URI.js/src/URITemplate.js
|
||||
// ==/ClosureCompiler==
|
||||
```
|
||||
|
||||
|
||||
## Resources ##
|
||||
|
||||
Documents specifying how URLs work:
|
||||
|
||||
* [URL - Living Standard](http://url.spec.whatwg.org/)
|
||||
* [RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax](http://tools.ietf.org/html/rfc3986)
|
||||
* [RFC 3987 - Internationalized Resource Identifiers (IRI)](http://tools.ietf.org/html/rfc3987)
|
||||
* [RFC 2732 - Format for Literal IPv6 Addresses in URL's](http://tools.ietf.org/html/rfc2732)
|
||||
* [RFC 2368 - The `mailto:` URL Scheme](https://www.ietf.org/rfc/rfc2368.txt)
|
||||
* [RFC 2141 - URN Syntax](https://www.ietf.org/rfc/rfc2141.txt)
|
||||
* [IANA URN Namespace Registry](http://www.iana.org/assignments/urn-namespaces/urn-namespaces.xhtml)
|
||||
* [Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)](http://tools.ietf.org/html/rfc3492)
|
||||
* [application/x-www-form-urlencoded](http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type) (Query String Parameters) and [application/x-www-form-urlencoded encoding algorithm](http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#application/x-www-form-urlencoded-encoding-algorithm)
|
||||
* [What every web developer must know about URL encoding](http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding)
|
||||
|
||||
Informal stuff
|
||||
|
||||
* [Parsing URLs for Fun and Profit](http://tools.ietf.org/html/draft-abarth-url-01)
|
||||
* [Naming URL components](http://tantek.com/2011/238/b1/many-ways-slice-url-name-pieces)
|
||||
|
||||
How other environments do things
|
||||
|
||||
* [Java URI Class](http://docs.oracle.com/javase/7/docs/api/java/net/URI.html)
|
||||
* [Java Inet6Address Class](http://docs.oracle.com/javase/1.5.0/docs/api/java/net/Inet6Address.html)
|
||||
* [Node.js URL API](http://nodejs.org/docs/latest/api/url.html)
|
||||
|
||||
[Discussion on Hacker News](https://news.ycombinator.com/item?id=3398837)
|
||||
|
||||
### Forks / Code-borrow ###
|
||||
|
||||
* [node-dom-urls](https://github.com/passy/node-dom-urls) passy's partial implementation of the W3C URL Spec Draft for Node
|
||||
* [urlutils](https://github.com/cofounders/urlutils) cofounders' `window.URL` constructor for Node
|
||||
|
||||
### Alternatives ###
|
||||
|
||||
If you don't like URI.js, you may like one of the following libraries. (If yours is not listed, drop me a line…)
|
||||
|
||||
#### Polyfill ####
|
||||
|
||||
* [DOM-URL-Polyfill](https://github.com/arv/DOM-URL-Polyfill/) arv's polyfill of the [DOM URL spec](https://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#interface-urlutils) for browsers
|
||||
* [inexorabletash](https://github.com/inexorabletash/polyfill/#whatwg-url-api) inexorabletash's [WHATWG URL API](http://url.spec.whatwg.org/)
|
||||
|
||||
#### URL Manipulation ####
|
||||
|
||||
* [The simple <a> URL Mutation "Hack"](http://jsfiddle.net/rodneyrehm/KkGUJ/) ([jsPerf comparison](http://jsperf.com/idl-attributes-vs-uri-js))
|
||||
* [URL.js](https://github.com/ericf/urljs)
|
||||
* [furl (Python)](https://github.com/gruns/furl)
|
||||
* [mediawiki Uri](https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/mediawiki/mediawiki.Uri.js?view=markup) (needs mw and jQuery)
|
||||
* [jurlp](https://github.com/tombonner/jurlp)
|
||||
* [jsUri](https://github.com/derek-watson/jsUri)
|
||||
|
||||
#### URL Parsers ####
|
||||
|
||||
* [The simple <a> URL Mutation "Hack"](http://jsfiddle.net/rodneyrehm/KkGUJ/) ([jsPerf comparison](http://jsperf.com/idl-attributes-vs-uri-js))
|
||||
* [URI Parser](http://blog.stevenlevithan.com/archives/parseuri)
|
||||
* [jQuery-URL-Parser](https://github.com/allmarkedup/jQuery-URL-Parser)
|
||||
* [Google Closure Uri](https://google.github.io/closure-library/api/class_goog_Uri.html)
|
||||
* [URI.js by Gary Court](https://github.com/garycourt/uri-js)
|
||||
|
||||
#### URI Template ####
|
||||
|
||||
* [uri-template](https://github.com/rezigned/uri-template.js) (supporting extraction as well) by Rezigne
|
||||
* [uri-templates](https://github.com/geraintluff/uri-templates) (supporting extraction as well) by Geraint Luff
|
||||
* [uri-templates](https://github.com/marc-portier/uri-templates) by Marc Portier
|
||||
* [uri-templates](https://github.com/geraintluff/uri-templates) by Geraint Luff (including reverse operation)
|
||||
* [URI Template JS](https://github.com/fxa/uritemplate-js) by Franz Antesberger
|
||||
* [Temple](https://github.com/brettstimmerman/temple) by Brett Stimmerman
|
||||
* ([jsperf comparison](http://jsperf.com/uri-templates/2))
|
||||
|
||||
#### Various ####
|
||||
|
||||
* [TLD.js](https://github.com/oncletom/tld.js) - second level domain names
|
||||
* [Public Suffix](http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1) - second level domain names
|
||||
* [uri-collection](https://github.com/scivey/uri-collection) - underscore based utility for working with many URIs
|
||||
|
||||
## Authors ##
|
||||
|
||||
* [Rodney Rehm](https://github.com/rodneyrehm)
|
||||
* [Various Contributors](https://github.com/medialize/URI.js/graphs/contributors)
|
||||
|
||||
|
||||
## Contains Code From ##
|
||||
|
||||
* [punycode.js](http://mths.be/punycode) - Mathias Bynens
|
||||
* [IPv6.js](http://intermapper.com/support/tools/IPV6-Validator.aspx) - Rich Brown - (rewrite of the original)
|
||||
|
||||
|
||||
## License ##
|
||||
|
||||
URI.js is published under the [MIT license](http://www.opensource.org/licenses/mit-license). Until version 1.13.2 URI.js was also published under the [GPL v3](http://opensource.org/licenses/GPL-3.0) license - but as this dual-licensing causes more questions than helps anyone, it was dropped with version 1.14.0.
|
||||
|
||||
|
||||
## Changelog ##
|
||||
|
||||
moved to [Changelog](./CHANGELOG.md)
|
||||
189
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/about-uris.html
vendored
Normal file
189
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/about-uris.html
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>URI.js - About URIs</title>
|
||||
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
|
||||
|
||||
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
|
||||
<script src="prettify/prettify.js" type="text/javascript"></script>
|
||||
<script src="screen.js" type="text/javascript"></script>
|
||||
<link href="screen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
|
||||
<script src="src/URI.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-8922143-3']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
|
||||
|
||||
<div id="container">
|
||||
<h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
|
||||
|
||||
<ul class="menu">
|
||||
<li><a href="/URI.js/">Intro</a></li>
|
||||
<li class="active"><a href="about-uris.html">Understanding URIs</a></li>
|
||||
<li><a href="docs.html">API-Documentation</a></li>
|
||||
<li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
|
||||
<li><a href="uri-template.html">URI Template</a></li>
|
||||
<li><a href="build.html">Build</a></li>
|
||||
<li><a href="http://rodneyrehm.de/en/">Author</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Understanding URIs</h2>
|
||||
|
||||
<p>
|
||||
Uniform Resource Identifiers (URI) can be one of two things, a Uniform Resource Locator (URL) or a Uniform Resource Name (URN).
|
||||
You likely deal with URLs most of the time. See RFC 3986 for a proper definition of the terms <a href="http://tools.ietf.org/html/rfc3986#section-1.1.3">URI, URL and URN</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
URNs <em>name</em> a resource.
|
||||
They are (supposed to) designate a globally unique, permanent identifier for that resource.
|
||||
For example, the URN <code>urn:isbn:0201896834</code> uniquely identifies Volume 1 of Donald Knuth's <em>The Art of Computer Porgramming</em>.
|
||||
Even if that book goes out of print, that URN will continue to identify that particular book in that particular printing.
|
||||
While the term "URN" <em>technically</em> refers to a specific URI scheme laid out by <a href="http://tools.ietf.org/html/rfc2141">RFC 2141</a>,
|
||||
the previously-mentioned RFC 3986 indicates that in common usage "URN" refers to any kind of URI that identifies a resource.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
URLs <em>locate</em> a resource.
|
||||
They designate a protocol to use when looking up the resource and provide an "address" for finding the resource within that scheme.
|
||||
For example, the URL <code><a href="http://tools.ietf.org/html/rfc3986">http://tools.ietf.org/html/rfc3986</a></code> tells the consumer (most likely a web browser)
|
||||
to use the HTTP protocol to access whatever site is found at the <code>/html/rfc3986</code> path of <code>tools.ietf.org</code>.
|
||||
URLs are not permanent; it is possible that in the future that the IETF will move to a different domain or even that some other organization will acquire the rights to <code>tools.ietf.org</code>.
|
||||
It is also possible that multiple URLs may locate the same resource;
|
||||
for example, an admin at the IETF might be able to access the document found at the example URL via the <code>ftp://</code> protocol.
|
||||
</p>
|
||||
|
||||
<h2>URLs and URNs in URI.js</h2>
|
||||
|
||||
<p>
|
||||
The distinction between URLs and URNs is one of <strong>semantics</strong>.
|
||||
In principle, it is impossible to tell, on a purely syntactical level, whether a given URI is a URN or a URL without knowing more about its scheme.
|
||||
Practically speaking, however, URIs that look like HTTP URLs (scheme is followed by a colon and two slashes, URI has an authority component, and paths are delimited by slashes) tend to be URLs,
|
||||
and URIs that look like RFC 2141 URNs (scheme is followed by a colon, no authority component, and paths are delimited by colons) tend to be URNs (in the broad sense of "URIs that name").
|
||||
</p>
|
||||
|
||||
<p>
|
||||
So, for the purposes of URI.js, the distinction between URLs and URNs is treated as one of <strong>syntax</strong>.
|
||||
The main functional differences between the two are that (1) URNs will not have an authority element and
|
||||
(2) when breaking the path of the URI into segments, the colon will be used as the delimiter rather than the slash.
|
||||
The most surprising result of this is that <code>mailto:</code> URLs will be considered by URI.js to be URNs rather than URLs.
|
||||
That said, the functional differences will not adversely impact the handling of those URLs.
|
||||
</p>
|
||||
|
||||
<h2 id="components">Components of an URI</h2>
|
||||
<p><a href="http://tools.ietf.org/html/rfc3986#section-3">RFC 3986 Section 3</a> visualizes the structure of <abbr title="Uniform Resource Indicator">URI</abbr>s as follows:</p>
|
||||
<pre class="ascii-art">
|
||||
URL: foo://example.com:8042/over/there?name=ferret#nose
|
||||
<span class="line"> \_/ \______________/\_________/ \_________/ \__/
|
||||
| | | | |
|
||||
</span><span class="label"> scheme authority path query fragment
|
||||
</span><span class="line"> | _____________________|__
|
||||
/ \ / \
|
||||
</span>URN: urn:example:animal:ferret:nose</pre>
|
||||
|
||||
<h3 id="components-url">Components of an <abbr title="Uniform Resource Locator">URL</abbr> in URI.js</h3>
|
||||
|
||||
<pre class="ascii-art">
|
||||
<a href="docs.html#accessors-origin">origin</a>
|
||||
<span class="line"> __________|__________
|
||||
/ \
|
||||
</span> <a href="docs.html#accessors-authority">authority</a>
|
||||
<span class="line"> | __________|_________
|
||||
| / \
|
||||
</span> <a href="docs.html#accessors-userinfo">userinfo</a> <a href="docs.html#accessors-host">host</a> <a href="docs.html#accessors-resource">resource</a>
|
||||
<span class="line"> | __|___ ___|___ __________|___________
|
||||
| / \ / \ / \
|
||||
</span> <a href="docs.html#accessors-username">username</a> <a href="docs.html#accessors-password">password</a> <a href="docs.html#accessors-hostname">hostname</a> <a href="docs.html#accessors-port">port</a> <a href="docs.html#accessors-pathname">path</a> & <a href="docs.html#accessors-segment">segment</a> <a href="docs.html#accessors-search">query</a> <a href="docs.html#accessors-hash">fragment</a>
|
||||
<span class="line"> | __|___ __|__ ______|______ | __________|_________ ____|____ |
|
||||
| / \ / \ / \ / \ / \ / \ / \
|
||||
</span> foo://username:password@www.example.com:123/hello/world/there.html?name=ferret#foo
|
||||
<span class="line"> \_/ \ / \ \ / \__________/ \ \__/
|
||||
| | \ | | \ |
|
||||
</span> <a href="docs.html#accessors-protocol">scheme</a> <a href="docs.html#accessors-subdomain">subdomain</a> <span class="line">\</span> <a href="docs.html#accessors-tld">tld</a> <a href="docs.html#accessors-directory">directory</a> <span class="line">\</span> <a href="docs.html#accessors-suffix">suffix</a>
|
||||
<span class="line"> \____/ \___/
|
||||
| |
|
||||
</span> <a href="docs.html#accessors-domain">domain</a> <a href="docs.html#accessors-filename">filename</a>
|
||||
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
In Javascript the <em>query</em> is often referred to as the <em>search</em>.
|
||||
URI.js provides both accessors with the subtle difference of <a href="docs.html#accessors-search">.search()</a> beginning with the <code>?</code>-character
|
||||
and <a href="docs.html#accessors-search">.query()</a> not.
|
||||
</p>
|
||||
<p>
|
||||
In Javascript the <em>fragment</em> is often referred to as the <em>hash</em>.
|
||||
URI.js provides both accessors with the subtle difference of <a href="docs.html#accessors-hash">.hash()</a> beginning with the <code>#</code>-character
|
||||
and <a href="docs.html#accessors-hash">.fragment()</a> not.
|
||||
</p>
|
||||
|
||||
<h3 id="components-urn">Components of an <abbr title="Uniform Resource Name">URN</abbr> in URI.js</h3>
|
||||
|
||||
<pre class="ascii-art">
|
||||
urn:example:animal:ferret:nose?name=ferret#foo
|
||||
<span class="line"> \ / \________________________/ \_________/ \ /
|
||||
| | | |
|
||||
</span> <a href="docs.html#accessors-protocol">scheme</a> <a href="docs.html#accessors-pathname">path</a> & <a href="docs.html#accessors-segment">segment</a> <a href="docs.html#accessors-search">query</a> <a href="docs.html#accessors-hash">fragment</a>
|
||||
</pre>
|
||||
|
||||
<p>While <a href="http://tools.ietf.org/html/rfc2141">RFC 2141</a> does not define URNs having a query or fragment component, URI.js enables these accessors for convenience.</p>
|
||||
|
||||
<h2 id="problems">URLs - Man Made Problems</h2>
|
||||
|
||||
<p>URLs (URIs, whatever) aren't easy. There are a couple of issues that make this simple text representation of a resource a real pain</p>
|
||||
<ul>
|
||||
<li>Look simple but have tricky encoding issues</li>
|
||||
<li>Domains aren't part of the specification</li>
|
||||
<li>Query String Format isn't part of the specification</li>
|
||||
<li>Environments (PHP, JS, Ruby, …) handle Query Strings quite differently</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="problems-encoding">Parsing (seemingly) invalid URLs</h3>
|
||||
<p>Because URLs look very simple, most people haven't read the formal specification. As a result, most people get URLs wrong on many different levels. The one thing most everybody screws up is proper encoding/escaping.</p>
|
||||
<p><code>http://username:pass:word@example.org/</code> is such a case. Often times homebrew URL handling misses escaping the less frequently used parts such as the userinfo.</p>
|
||||
<p><code>http://example.org/@foo</code> that "@" doesn't have to be escaped according to RFC3986. Homebrew URL handlers often just treat everything between "://" and "@" as the userinfo.</p>
|
||||
<p><code>some/path/:foo</code> is a valid relative path (as URIs don't have to contain scheme and authority). Since homebrew URL handlers usually just look for the first occurence of ":" to delimit the scheme, they'll screw this up as well.</p>
|
||||
<p><code>+</code> is the proper escape-sequence for a space-character within the query string component, while every other component prefers <code>%20</code>. This is due to the fact that the actual format used within the query string component is not defined in RFC 3986, but in the HTML spec.</p>
|
||||
<p>There is encoding and strict encoding - and Javascript won't get them right: <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent#Description">encodeURIComponent()</a></p>
|
||||
|
||||
<h3 id="problems-tld">Top Level Domains</h3>
|
||||
<p>The hostname component can be one of may things. An IPv4 or IPv6 address, an IDN or Punycode domain name, or a regular domain name. While the format (and meaning) of IPv4 and IPv6 addresses is defined in RFC 3986, the meaning of domain names is not.</p>
|
||||
<p>DNS is the base of translating domain names to IP addresses. DNS itself only specifies syntax, not semantics. The missing semantics is what's driving us crazy here.</p>
|
||||
<p>ICANN provides a <a href="http://www.iana.org/domains/root/db/">list of registered Top Level Domains</a> (TLD). There are country code TLDs (ccTLDs, assigned to each country, like ".uk" for United Kindom) and generic TLDs (gTLDs, like ".xxx" for you know what). Also note that a TLD may be non-ASCII <code>.香港</code> (IDN version of HK, Hong Kong).</p>
|
||||
<p>IDN TLDs such as <code>.香港</code> and the fact that any possible new TLD could pop up next month has lead to a lot of URL/Domain verification tools to fail.</p>
|
||||
|
||||
<h3 id="problems-sld">Second Level Domains</h3>
|
||||
<p>To make Things worse, people thought it to be a good idea to introduce Second Level Domains (SLD, ".co.uk" - the commercial namespace of United Kingdom). These SLDs are not up to ICANN to define, they're handled individually by each NIC (Network Information Center, the orgianisation responsible for a specific TLD).</p>
|
||||
<p>Since there is no central oversight, things got really messy in this particular space. Germany doesn't do SDLs, Australia does. Australia has different SLDs than the United Kingdom (".csiro.au" but no ".csiro.uk"). The individual NICs are not required to publish their arbitrarily chosen SLDs in a defined syntax anywhere.</p>
|
||||
<p>You can scour each NIC's website to find some hints at their SLDs. You can look them up on Wikipedia and hope they're right. Or you can use <a href="http://publicsuffix.org/">PublicSuffix</a>.</p>
|
||||
<p>Speaking of PublicSuffix, it's time mentioning that browser vendors actually keep a list of known Second Level Domains. They need to know those for security issues. Remember cookies? They can be read and set on a domain level. What do you think would happen if "co.uk" was treated as the domain? <code>amazon.co.uk</code> would be able to read the cookies of <code>google.co.uk</code>. PublicSuffix also contains custom SLDs, such as <code>.dyndns.org</code>. While this makes perfect sense for browser security, it's not what we need for basic URL handling.</p>
|
||||
<p>TL;DR: It's a mess.</p>
|
||||
|
||||
<h3 id="problems-querystring">The Query String</h3>
|
||||
<p>PHP (<a href="http://php.net/manual/en/function.parse-str.php">parse_str()</a>) will automatically parse the query string and populate the superglobal <code>$_GET</code> for you. <code>?foo=1&foo=2</code> becomes <code>$_GET = array('foo' => 2);</code>, while <code>?foo[]=1&foo[]=2</code> becomes <code>$_GET = array('foo' => array("1", "2"));</code>.</p>
|
||||
<p>Ruby's <code>CGI.parse()</code> turns <code>?a=1&a=2</code> into <code>{"a" : ["1", "2"]}</code>, while Ruby on Rails chose the PHP-way.</p>
|
||||
<p>Python's <a href="http://docs.python.org/2/library/urlparse.html#urlparse.parse_qs">parse_qs()</a> doesn't care for <code>[]</code> either.
|
||||
<p>Most other languages don't follow the <code>[]</code>-style array-notation and deal with this mess differently.</p>
|
||||
<p>TL;DR: You need to know the target-environment, to know how complex query string data has to be encoded</p>
|
||||
|
||||
<h3 id="problems-fragment">The Fragment</h3>
|
||||
<p>Given the URL <code>http://example.org/index.html#foobar</code>, browsers only request <code>http://example.org/index.html</code>, the fragment <code>#foobar</code> is a client-side thing.</p>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
16
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/bower.json
vendored
Normal file
16
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/bower.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "urijs",
|
||||
"version": "1.19.1",
|
||||
"main": "src/URI.js",
|
||||
"ignore": [
|
||||
".*",
|
||||
"*.css",
|
||||
"/*.js",
|
||||
"/*.html",
|
||||
"/*.json",
|
||||
"utils",
|
||||
"test",
|
||||
"prettify"
|
||||
],
|
||||
"license": "MIT"
|
||||
}
|
||||
71
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/build.html
vendored
Normal file
71
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/build.html
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>URI.js - Custom Build</title>
|
||||
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
|
||||
|
||||
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
|
||||
<script src="screen.js" type="text/javascript"></script>
|
||||
<script src="build.js" type="text/javascript"></script>
|
||||
<link href="screen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
|
||||
|
||||
<div id="container">
|
||||
<h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
|
||||
|
||||
<ul class="menu">
|
||||
<li><a href="/URI.js/">Intro</a></li>
|
||||
<li><a href="about-uris.html">Understanding URIs</a></li>
|
||||
<li><a href="docs.html">API-Documentation</a></li>
|
||||
<li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
|
||||
<li><a href="uri-template.html">URI Template</a></li>
|
||||
<li class="active"><a href="build.html">Build</a></li>
|
||||
<li><a href="http://rodneyrehm.de/en/">Author</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Building URI.js</h2>
|
||||
<p>
|
||||
<strong>Warning:</strong> The output of this "build tool" is not compatible
|
||||
with module loaders (like RequireJS), because it only concatenates and minifies files.
|
||||
Only use this if you plan on loading the file by way of <code><script></code> element.
|
||||
</p>
|
||||
<p>Choose the Modules you want to include in your custom build of URI.js:</p>
|
||||
<form id="builder">
|
||||
<ul>
|
||||
<li><label><input type="checkbox" value="IPv6.js" checked> IPv6.js - Support for IPv6 Addresses</label></li>
|
||||
<li><label><input type="checkbox" value="punycode.js" checked> punycode.js - Support for IDN Addresses</label></li>
|
||||
<li><label><input type="checkbox" value="SecondLevelDomains.js" checked> SecondLevelDomains.js - Support for resolving SLDs</label></li>
|
||||
<li><label><input type="checkbox" value="URI.js" checked readonly disabled> URI.js - Base URI.js</label></li>
|
||||
<li><label><input type="checkbox" value="URITemplate.js" checked> URITemplate.js - Support for <a href="uri-template.html">URI Templates</a></label></li>
|
||||
<li><label><input type="checkbox" value="jquery.URI.js" checked> jquery.URI.js - <a href="jquery-uri-plugin.html">jQuery Plugin</a></label></li>
|
||||
</ul>
|
||||
<p>Optional "Fragment Abuse" plugins:</p>
|
||||
<ul>
|
||||
<li><label><input type="radio" name="fragments" value="" checked> No Fragment abuse</label></li>
|
||||
<li><label><input type="radio" name="fragments" value="URI.fragmentQuery.js"> URI.fragmentQuery.js - support for <a href="docs.html#fragment-abuse-query">Query String Fragments</a></label></li>
|
||||
<li><label><input type="radio" name="fragments" value="URI.fragmentURI.js"> URI.fragmentURI.js - support for <a href="docs.html#fragment-abuse-uri">URI Fragments</a></label></li>
|
||||
</ul>
|
||||
<input type="submit" value="Build!">
|
||||
<progress id="prog" value="0" max="3" style="display:none"></progress>
|
||||
<div style="display:none;">
|
||||
<h2>Custom Built URI.js</h2>
|
||||
<p class="download"> your custom built <code>URI.js</code> or copy the following code:</p>
|
||||
<textarea id="output" cols="50" rows="5" style="width: 100%; height: 200px;"></textarea>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>
|
||||
This "build tool" does nothing but downloading the selected files, concatenating them and pushing them through <a href="http://closure-compiler.appspot.com/home">Closure Compiler</a>.
|
||||
Since Closure Compiler is running on a different domain, this trick will only work on modern browsers.
|
||||
I'm sorry for the ~2% of you IE users. You'll have to do this <a href="https://github.com/medialize/URI.js#minify">manually</a>.
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
78
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/build.js
vendored
Normal file
78
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/build.js
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
(function($, undefined){
|
||||
window.URL = window.webkitURL || window.URL;
|
||||
window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
|
||||
|
||||
function build(files) {
|
||||
var $out = $('#output'),
|
||||
$progress = $('#prog'),
|
||||
sources = [],
|
||||
connections = [],
|
||||
source;
|
||||
|
||||
$out.parent().hide();
|
||||
$progress.show().prop('value', 1).text('Loading Files');
|
||||
|
||||
for (var i = 0, length = files.length; i < length; i++) {
|
||||
sources.push("");
|
||||
(function(i, file){
|
||||
connections.push($.get("src/" + file, function(data) {
|
||||
sources[i] = data;
|
||||
}, "text"));
|
||||
})(i, files[i]);
|
||||
}
|
||||
|
||||
$.when.apply($, connections).done(function() {
|
||||
$progress.prop('value', 2).text('Compiling Scripts');
|
||||
$.post('https://closure-compiler.appspot.com/compile', {
|
||||
js_code: sources.join("\n\n"),
|
||||
compilation_level: "SIMPLE_OPTIMIZATIONS",
|
||||
output_format: "text",
|
||||
output_info: "compiled_code"
|
||||
}, function(data) {
|
||||
var code = "/*! URI.js v1.19.1 http://medialize.github.io/URI.js/ */\n/* build contains: " + files.join(', ') + " */\n" + data;
|
||||
$progress.hide();
|
||||
$out.val(code).parent().show();
|
||||
$out.prev().find('a').remove();
|
||||
$out.prev().prepend(download(code));
|
||||
}).error(function() {
|
||||
alert("Your browser is incapable of cross-domain communication.\nPlease see instructions for manual build below.");
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
function download(code) {
|
||||
var blob = new Blob([code], {type: 'text\/javascript'});
|
||||
|
||||
var a = document.createElement('a');
|
||||
a.download = 'URI.js';
|
||||
a.href = window.URL.createObjectURL(blob);
|
||||
a.textContent = 'Download';
|
||||
a.dataset.downloadurl = ['text/javascript', a.download, a.href].join(':');
|
||||
|
||||
return a;
|
||||
};
|
||||
|
||||
$(function(){
|
||||
$('#builder').on('submit', function(e) {
|
||||
var $this = $(this),
|
||||
$files = $this.find('input:checked'),
|
||||
files = [];
|
||||
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
if (!$files.length) {
|
||||
alert("please choose at least one file!");
|
||||
return;
|
||||
}
|
||||
|
||||
$files.each(function() {
|
||||
var val = $(this).val();
|
||||
val.length && files.push(val);
|
||||
});
|
||||
|
||||
build(files);
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
19
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/contributing.md
vendored
Normal file
19
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/contributing.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# Contributing to URI.js #
|
||||
|
||||
URI.js Project License: MIT License
|
||||
|
||||
* You will only Submit Contributions where You have authored 100% of the content.
|
||||
* You will only Submit Contributions to which You have the necessary rights. This means that if You are employed You have received the necessary permissions from Your employer to make the Contributions.
|
||||
* Whatever content You Contribute will be provided under the project License.
|
||||
|
||||
---
|
||||
|
||||
Thanks for your help!
|
||||
|
||||
Pull Requests go into the branch **master**. The *gh-pages* branch is a presentation of the *master* branch at the last given release.
|
||||
|
||||
Whenever you change code, make sure you run the test suite before sending a pull request. Please add tests for any features you add to the code base. We're using [QUnit](http://qunitjs.com/) for testing.
|
||||
|
||||
We're looking forward to splitting URI.js in several files, each dealing with a specific domain, to make the 1800 lines of code more bearable to work with. This will lead to using [Grunt](http://gruntjs.com/) to build a distributable version (and the removal of `build.html`). We're not sure when we'll get to this. If you want to pitch in, just holler!
|
||||
|
||||
|
||||
1410
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/docs.html
vendored
Normal file
1410
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/docs.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
173
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/index.html
vendored
Normal file
173
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/index.html
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>URI.js - URLs in Javascript</title>
|
||||
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
|
||||
|
||||
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
|
||||
<script src="prettify/prettify.js" type="text/javascript"></script>
|
||||
<script src="screen.js" type="text/javascript"></script>
|
||||
<link href="screen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
|
||||
<script src="src/URI.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-8922143-3']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
|
||||
<div id="github-watch"><a href="https://github.com/medialize/URI.js" class="gitwatch">URI.js Github Repository</a></div>
|
||||
|
||||
<div id="container">
|
||||
<h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
|
||||
|
||||
<ul class="menu">
|
||||
<li class="active"><a href="/URI.js/">Intro</a></li>
|
||||
<li><a href="about-uris.html">Understanding URIs</a></li>
|
||||
<li><a href="docs.html">API-Documentation</a></li>
|
||||
<li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
|
||||
<li><a href="uri-template.html">URI Template</a></li>
|
||||
<li><a href="build.html">Build</a></li>
|
||||
<li><a href="http://rodneyrehm.de/en/">Author</a></li>
|
||||
</ul>
|
||||
|
||||
<p>URI.js is a javascript library for working with URLs. It offers a "jQuery-style" API (<a href="http://en.wikipedia.org/wiki/Fluent_interface">Fluent Interface</a>, Method Chaining) to read and write all regular components and a number of convenience methods like
|
||||
.<a href="docs.html#accessors-directory">directory</a>() and .<a href="docs.html#accessors-authority">authority</a>().</p>
|
||||
<p>URI.js offers simple, yet powerful ways of working with query string, has a number of URI-normalization functions and converts relative/absolute paths.</p>
|
||||
<p>While URI.js provides a <a href="jquery-uri-plugin.html">jQuery plugin</a>. URI.js itself does not rely on jQuery. You <em>don't need jQuery</em> to use URI.js</p>
|
||||
|
||||
<h2>Examples</h2>
|
||||
<p>How do you like manipulating URLs the "jQuery-style"?</p>
|
||||
<pre class="prettyprint lang-js">// mutating URLs
|
||||
URI("http://example.org/foo.html?hello=world")
|
||||
.<a href="docs.html#accessors-username">username</a>("rodneyrehm")
|
||||
// -> http://rodneyrehm@example.org/foo.html?hello=world
|
||||
.<a href="docs.html#accessors-username">username</a>("")
|
||||
// -> http://example.org/foo.html?hello=world
|
||||
.<a href="docs.html#accessors-directory">directory</a>("bar")
|
||||
// -> http://example.org/bar/foo.html?hello=world
|
||||
.<a href="docs.html#accessors-suffix">suffix</a>("xml")
|
||||
// -> http://example.org/bar/foo.xml?hello=world
|
||||
.<a href="docs.html#accessors-hash">hash</a>("hackernews")
|
||||
// -> http://example.org/bar/foo.xml?hello=world#hackernews
|
||||
.<a href="docs.html#accessors-fragment">fragment</a>("")
|
||||
// -> http://example.org/bar/foo.xml?hello=world
|
||||
.<a href="docs.html#accessors-search">search</a>("") // alias of .query()
|
||||
// -> http://example.org/bar/foo.xml
|
||||
.<a href="docs.html#accessors-tld">tld</a>("com")
|
||||
// -> http://example.com/bar/foo.xml
|
||||
.<a href="docs.html#accessors-search">search</a>({ foo: "bar", hello: ["world", "mars"] });
|
||||
// -> http://example.com/bar/foo.xml?foo=bar&hello=world&hello=mars</pre>
|
||||
|
||||
<p>How do you like working query strings?</p>
|
||||
<pre class="prettyprint lang-js">URI("?hello=world")
|
||||
.<a href="docs.html#search-add">addSearch</a>("hello", "mars")
|
||||
// -> ?hello=world&hello=mars
|
||||
.<a href="docs.html#search-add">addSearch</a>({ foo: ["bar", "baz"] })
|
||||
// -> ?hello=world&hello=mars&foo=bar&foo=baz
|
||||
.<a href="docs.html#search-remove">removeSearch</a>("hello", "mars")
|
||||
// -> ?hello=world&foo=bar&foo=baz
|
||||
.<a href="docs.html#search-remove">removeSearch</a>("foo")
|
||||
// -> ?hello=world
|
||||
</pre>
|
||||
|
||||
<p>How do you like relative paths?</p>
|
||||
<pre class="prettyprint lang-js">URI("/relative/path")
|
||||
.<a href="docs.html#relativeto">relativeTo</a>("/relative/sub/foo/sub/file")
|
||||
// -> ../../../path
|
||||
.<a href="docs.html#absolute">absoluteTo</a>("/relative/sub/foo/sub/file");
|
||||
// -> /relative/path </pre>
|
||||
|
||||
<p>How do you like cleaning things up?</p>
|
||||
<pre class="prettyprint lang-js">URI("?&foo=bar&&foo=bar&foo=baz&")
|
||||
.<a href="docs.html#normalize-search">normalizeSearch</a>();
|
||||
// -> ?foo=bar&foo=baz
|
||||
|
||||
URI("/hello/foo/woo/.././../world.html")
|
||||
.<a href="docs.html#normalize-path">normalizePathname</a>();
|
||||
// -> /hello/world.html </pre>
|
||||
|
||||
<p>How do you like detecting URIs within random text?</p>
|
||||
<pre class="prettyprint lang-js">var source = "Hello www.example.com,\n"
|
||||
+ "http://google.com is a search engine, like http://www.bing.com\n"
|
||||
+ "http://exämple.org/foo.html?baz=la#bumm is an IDN URL,\n"
|
||||
+ "http://123.123.123.123/foo.html is IPv4 and "
|
||||
+ "http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/foobar.html is IPv6.\n"
|
||||
+ "links can also be in parens (http://example.org) "
|
||||
+ "or quotes »http://example.org«.";
|
||||
|
||||
var result = <a href="docs.html#static-withinString">URI.withinString</a>(source, function(url) {
|
||||
return "<a>" + url + "</a>";
|
||||
});
|
||||
|
||||
/* result is:
|
||||
Hello <strong><a>www.example.com</a></strong>,
|
||||
<strong><a>http://google.com</a></strong> is a search engine, like <strong><a>http://www.bing.com</a></strong>
|
||||
<strong><a>http://exämple.org/foo.html?baz=la#bumm</a></strong> is an IDN URL,
|
||||
<strong><a>http://123.123.123.123/foo.html</a></strong> is IPv4 and <strong><a>http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/foobar.html</a></strong> is IPv6.
|
||||
links can also be in parens (<strong><a>http://example.org</a></strong>) or quotes »<strong><a>http://example.org</a></strong>«.
|
||||
*/
|
||||
</pre>
|
||||
|
||||
<p>How do you like comparing URLs?</p>
|
||||
<pre class="prettyprint lang-js">var a = "http://example.org/foo/bar.html"
|
||||
+ "?foo=bar&hello=world&hello=mars#fragment",
|
||||
b = "http://exAMPle.org:80/foo/../foo/bar.html"
|
||||
+ "?hello=mars&foo=bar&hello=world&#fragment";
|
||||
|
||||
a !== b;
|
||||
URI(a).<a href="docs.html#equals">equals</a>(b) === true;</pre>
|
||||
|
||||
<p>How do you like fiddling with the fragment?</p>
|
||||
<pre class="prettyprint lang-js">// <strong>storing values in the fragment (hash):</strong>
|
||||
var uri = URI("#hello-world");
|
||||
uri.fragment({foo: "bar", bar: ["hello", "world"]});
|
||||
uri.fragment() === "foo=bar&bar=hello&bar=world";
|
||||
// required src/URI.fragmentQuery.js to be loaded
|
||||
|
||||
// <strong>storing URLs in the fragment (hash):</strong>
|
||||
var uri = URI("http://example.org/#!/foo/bar/baz.html"),
|
||||
furi = uri.fragment(true);
|
||||
furi.pathname() === "/foo/bar/baz.html";
|
||||
furi.pathname("/hello.html");
|
||||
uri.toString() === "http://example.org/#!/hello.html"
|
||||
// required src/URI.fragmentURI.js to be loaded</pre>
|
||||
|
||||
<p>How do you like parsing URNs?</p>
|
||||
<pre class="prettyprint lang-js">var uri = URI("urn:uuid:c5542ab6-3d96-403e-8e6b-b8bb52f48d9a?query=string");
|
||||
uri.protocol() == "urn";
|
||||
uri.path() == "uuid:c5542ab6-3d96-403e-8e6b-b8bb52f48d9a";
|
||||
uri.query() == "query=string";</pre>
|
||||
|
||||
<p>How do you like URI Templating?</p>
|
||||
<pre class="prettyprint lang-js">URI.expand("/foo/{dir}/{file}", {
|
||||
dir: "bar",
|
||||
file: "world.html"
|
||||
});
|
||||
// -> /foo/bar/world.html</pre>
|
||||
|
||||
<h2 id="authors">Authors</h2>
|
||||
<ul>
|
||||
<li><a href="http://rodneyrehm.de/en/">Rodney Rehm</a></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="license">License</h2>
|
||||
<p>URI.js is published under the <a href="http://www.opensource.org/licenses/mit-license">MIT license</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="https://raw.github.com/addyosmani/github-watchers-button/master/github-watchers.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
6
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/jquery-1.10.2.min.js
vendored
Normal file
6
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/jquery-1.10.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/jquery-1.7.2.min.js
vendored
Normal file
4
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/jquery-1.7.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/jquery-1.8.2.min.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/jquery-1.8.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/jquery-1.9.1.min.js
vendored
Normal file
5
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/jquery-1.9.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
203
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/jquery-uri-plugin.html
vendored
Normal file
203
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/jquery-uri-plugin.html
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>URI.js - jQuery URI Plugin</title>
|
||||
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
|
||||
|
||||
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
|
||||
<script src="prettify/prettify.js" type="text/javascript"></script>
|
||||
<script src="screen.js" type="text/javascript"></script>
|
||||
<link href="screen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
|
||||
<script src="src/URI.min.js" type="text/javascript"></script>
|
||||
<script src="src/jquery.URI.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-8922143-3']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
|
||||
|
||||
<div id="container">
|
||||
<h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
|
||||
|
||||
<ul class="menu">
|
||||
<li><a href="/URI.js/">Intro</a></li>
|
||||
<li><a href="about-uris.html">Understanding URIs</a></li>
|
||||
<li><a href="docs.html">API-Documentation</a></li>
|
||||
<li class="active"><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
|
||||
<li><a href="uri-template.html">URI Template</a></li>
|
||||
<li><a href="build.html">Build</a></li>
|
||||
<li><a href="http://rodneyrehm.de/en/">Author</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>URI.js jQuery Plugin</h2>
|
||||
<p>As of version 1.6.0 URI.js offers a simple jQuery integration. For the plugin to work, you need to regularly load <code>URI.js</code>, as well as <code>jquery.URI.js</code>.</p>
|
||||
<p>URI.js does not depend on jQuery unless you want to use the URI.js jQuery Plugin</p>
|
||||
|
||||
<h2>Accessing the URI Instance</h2>
|
||||
<pre class="prettyprint lang-js">
|
||||
var $a = $('<a href="http://google.com/hello.html">Demo</a>');
|
||||
var uri = $a.uri();
|
||||
|
||||
// URI instance and DOMElement are always in sync
|
||||
uri.domain() == 'google.com';
|
||||
uri.domain('example.org');
|
||||
$a.attr('href') == 'http://example.org/hello.html';
|
||||
|
||||
// access to <strong>href</strong>, <strong>src</strong> and <strong>action</strong>
|
||||
// transparently update the URI instance
|
||||
$a.attr('href', '/other.file');
|
||||
uri.href() == '/other.file';
|
||||
|
||||
// $.fn.uri() passes values to DOM and URI
|
||||
$a.uri('/hello/world.html');
|
||||
$a.attr('href') == '/hello/world.html';
|
||||
uri.href() == '/hello/world.html';</pre>
|
||||
|
||||
<h2>Accessing URI components</h2>
|
||||
<pre class="prettyprint lang-js">var $a = $('<a href="http://www.google.com/hello.html">Demo</a>');
|
||||
|
||||
// read
|
||||
$a.attr('uri:domain') == 'google.com';
|
||||
|
||||
// write
|
||||
$a.attr('uri:domain', 'example.org');
|
||||
$a.attr('href') == 'http://www.example.org/hello.html';</pre>
|
||||
|
||||
<p>All URI-component accessors (except <a href="docs.html#accessors-segment">segment</a>) can be used:
|
||||
<a href="docs.html#accessors-origin">origin</a>,
|
||||
<a href="docs.html#accessors-authority">authority</a>,
|
||||
<a href="docs.html#accessors-directory">directory</a>,
|
||||
<a href="docs.html#accessors-domain">domain</a>,
|
||||
<a href="docs.html#accessors-filename">filename</a>,
|
||||
<a href="docs.html#accessors-hash">fragment</a>,
|
||||
<a href="docs.html#accessors-hash">hash</a>,
|
||||
<a href="docs.html#accessors-host">host</a>,
|
||||
<a href="docs.html#accessors-hostname">hostname</a>,
|
||||
<a href="docs.html#accessors-href">href</a>,
|
||||
<a href="docs.html#accessors-password">password</a>,
|
||||
<a href="docs.html#accessors-path">path</a>,
|
||||
<a href="docs.html#accessors-pathname">pathname</a>,
|
||||
<a href="docs.html#accessors-port">port</a>,
|
||||
<a href="docs.html#accessors-protocol">protocol</a>,
|
||||
<a href="docs.html#accessors-search">query</a>,
|
||||
<a href="docs.html#accessors-protocol">scheme</a>,
|
||||
<a href="docs.html#accessors-resource">resource</a>,
|
||||
<a href="docs.html#accessors-search">search</a>,
|
||||
<a href="docs.html#accessors-subdomain">subdomain</a>,
|
||||
<a href="docs.html#accessors-suffix">suffix</a>,
|
||||
<a href="docs.html#accessors-tld">tld</a>,
|
||||
<a href="docs.html#accessors-username">username</a>.
|
||||
</p>
|
||||
|
||||
<h2>Selectors</h2>
|
||||
<p>You may find yourself wanting to select all links to a certain file-type or a specific domain. <code>:uri()</code> is a pseudo-class filter that will help you with that:</p>
|
||||
<pre class="prettyprint lang-html">
|
||||
<div class="first">
|
||||
<a href="/my.pdf?with=query">PDF</a>
|
||||
<a href="http://google.com/">Google1</a>
|
||||
</div>
|
||||
<div class="second">
|
||||
<a href="http://www.google.com/">Google2</a>
|
||||
<a href="https://github.com/some/directory/help.html">Github</a>
|
||||
</div>
|
||||
</pre>
|
||||
<pre class="prettyprint lang-js">// finding links to a given file-type
|
||||
$('a:uri(suffix = pdf)');
|
||||
// -> finds PDF
|
||||
|
||||
// selecting links to a directory (or child thereof)
|
||||
$('a:uri(directory *= /directory/)');
|
||||
// -> finds Github
|
||||
|
||||
// selecting links to google.com
|
||||
$('a:uri(domain = google.com)');
|
||||
// -> finds Google1, Google2
|
||||
|
||||
// selecting all relative links
|
||||
$('a:uri(is: relative)');
|
||||
// -> finds PDF
|
||||
|
||||
// selecting links regardless of their representation
|
||||
$('a:uri(equals: http://github.com/some/other/../directory/help.html)');
|
||||
// -> finds Github
|
||||
|
||||
// finding elements containing a link to github
|
||||
$('div').has('a:uri(domain = github)')
|
||||
// -> finds div.second
|
||||
|
||||
// testing if the protocol matches
|
||||
$('a').eq(1).is(':uri(protocol = http)');
|
||||
// -> is true
|
||||
|
||||
// event delegation
|
||||
$(document).on('click', 'a:uri(scheme=javscript)', function(e) {
|
||||
if (!confirm("do you really want to execute this script?\n\n" + this.href)) {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
});</pre>
|
||||
|
||||
<h3>The :uri() pseudo selector</h3>
|
||||
<p><code>:uri()</code> accepts the following three argument patterns:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>:uri(<em>accessor</em> operator <strong>string</strong>)</code> to compare a single URI-component</li>
|
||||
<li><code>:uri(is: <strong>string</strong>)</code> to compare against <a href="docs.html#is">.is()</a></li>
|
||||
<li><code>:uri(equals: <strong>string</strong>)</code> to compare URLs using <a href="docs.html#equals">.equals()</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Note: It is a good idea to prepend the element(s) you're looking for. <code>a:uri(is: relative)</code> is much faster than <code>:uri(is: relative)</code>.</p>
|
||||
<p>Note: <code>")"</code> may not be used in your comparison-<code>string</code>, as jQuery (Sizzle, actually) can't handle that properly.</p>
|
||||
|
||||
<h3>Comparison Accessors</h3>
|
||||
<p>All URI-component accessors (except <a href="docs.html#accessors-segment">segment</a>) can be used:
|
||||
<a href="docs.html#accessors-authority">authority</a>,
|
||||
<a href="docs.html#accessors-directory">directory</a>,
|
||||
<a href="docs.html#accessors-domain">domain</a>,
|
||||
<a href="docs.html#accessors-filename">filename</a>,
|
||||
<a href="docs.html#accessors-hash">fragment</a>,
|
||||
<a href="docs.html#accessors-hash">hash</a>,
|
||||
<a href="docs.html#accessors-host">host</a>,
|
||||
<a href="docs.html#accessors-hostname">hostname</a>,
|
||||
<a href="docs.html#accessors-href">href</a>,
|
||||
<a href="docs.html#accessors-password">password</a>,
|
||||
<a href="docs.html#accessors-path">path</a>,
|
||||
<a href="docs.html#accessors-pathname">pathname</a>,
|
||||
<a href="docs.html#accessors-port">port</a>,
|
||||
<a href="docs.html#accessors-protocol">protocol</a>,
|
||||
<a href="docs.html#accessors-search">query</a>,
|
||||
<a href="docs.html#accessors-protocol">scheme</a>,
|
||||
<a href="docs.html#accessors-resource">resource</a>,
|
||||
<a href="docs.html#accessors-search">search</a>,
|
||||
<a href="docs.html#accessors-subdomain">subdomain</a>,
|
||||
<a href="docs.html#accessors-suffix">suffix</a>,
|
||||
<a href="docs.html#accessors-tld">tld</a>,
|
||||
<a href="docs.html#accessors-username">username</a>.
|
||||
</p>
|
||||
|
||||
<h3>Comparison Operators</h3>
|
||||
<p>Comparison operators are derived from CSS attribute match operators:</p>
|
||||
<dl>
|
||||
<dt>=</dt><dd>Exact match of <code>accessor</code> and <code>string</code></dd>
|
||||
<dt>^=</dt><dd><code>accessor</code> begins with <code>string</code> (case-insensitive)</dd>
|
||||
<dt>$=</dt><dd><code>accessor</code> ends with <code>string</code> (case-insensitive)</dd>
|
||||
<dt>*=</dt><dd><code>accessor</code> contains <code>string</code> (case-insensitive)</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
78
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/package.json
vendored
Normal file
78
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/package.json
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"name": "urijs",
|
||||
"version": "1.19.1",
|
||||
"title": "URI.js - Mutating URLs",
|
||||
"author": {
|
||||
"name": "Rodney Rehm",
|
||||
"url": "http://rodneyrehm.de"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/medialize/URI.js.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"description": "URI.js is a Javascript library for working with URLs.",
|
||||
"keywords": [
|
||||
"uri",
|
||||
"url",
|
||||
"urn",
|
||||
"uri mutation",
|
||||
"url mutation",
|
||||
"uri manipulation",
|
||||
"url manipulation",
|
||||
"uri template",
|
||||
"url template",
|
||||
"unified resource locator",
|
||||
"unified resource identifier",
|
||||
"query string",
|
||||
"RFC 3986",
|
||||
"RFC3986",
|
||||
"RFC 6570",
|
||||
"RFC6570",
|
||||
"jquery-plugin",
|
||||
"ecosystem:jquery"
|
||||
],
|
||||
"categories": [
|
||||
"Parsers & Compilers",
|
||||
"Utilities"
|
||||
],
|
||||
"main": "./src/URI",
|
||||
"homepage": "http://medialize.github.io/URI.js/",
|
||||
"contributors": [
|
||||
"Francois-Guillaume Ribreau <npm@fgribreau.com> (http://fgribreau.com)",
|
||||
"Justin Chase <justin.m.chase@gmail.com> (http://justinmchase.com)"
|
||||
],
|
||||
"files": [
|
||||
"src/URI.js",
|
||||
"src/IPv6.js",
|
||||
"src/SecondLevelDomains.js",
|
||||
"src/punycode.js",
|
||||
"src/URITemplate.js",
|
||||
"src/jquery.URI.js",
|
||||
"src/URI.min.js",
|
||||
"src/jquery.URI.min.js",
|
||||
"src/URI.fragmentQuery.js",
|
||||
"src/URI.fragmentURI.js",
|
||||
"LICENSE.txt"
|
||||
],
|
||||
"npmName": "urijs",
|
||||
"npmFileMap": [
|
||||
{
|
||||
"basePath": "/src/",
|
||||
"files": [
|
||||
"*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"basePath": "/",
|
||||
"files": [
|
||||
"LICENSE.txt"
|
||||
]
|
||||
}
|
||||
],
|
||||
"devDependencies": {
|
||||
"jshint-stylish": "~0.1.5",
|
||||
"grunt": "~0.4.2",
|
||||
"grunt-contrib-jshint": "~0.8.0"
|
||||
}
|
||||
}
|
||||
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-apollo.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-apollo.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
|
||||
null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
|
||||
18
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-clj.js
vendored
Normal file
18
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-clj.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Copyright (C) 2011 Google Inc.
|
||||
|
||||
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.
|
||||
*/
|
||||
var a=null;
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
|
||||
["typ",/^:[\dA-Za-z-]+/]]),["clj"]);
|
||||
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-css.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-css.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
|
||||
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
|
||||
1
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-go.js
vendored
Normal file
1
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-go.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]);
|
||||
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-hs.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-hs.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/,
|
||||
null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]);
|
||||
3
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-lisp.js
vendored
Normal file
3
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-lisp.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
var a=null;
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
|
||||
["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]);
|
||||
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-lua.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-lua.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],
|
||||
["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]);
|
||||
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-ml.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-ml.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
|
||||
["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);
|
||||
4
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-n.js
vendored
Normal file
4
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-n.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
var a=null;
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
|
||||
a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
|
||||
a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);
|
||||
1
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-proto.js
vendored
Normal file
1
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-proto.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]);
|
||||
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-scala.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-scala.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
|
||||
["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]);
|
||||
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-sql.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-sql.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|merge|national|nocheck|nonclustered|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|percent|plan|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rule|save|schema|select|session_user|set|setuser|shutdown|some|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|union|unique|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|writetext)(?=[^\w-]|$)/i,
|
||||
null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);
|
||||
1
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-tex.js
vendored
Normal file
1
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-tex.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
|
||||
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-vb.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-vb.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r Â\xa0

"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"“â€<C3A2>'],["com",/^['\u2018\u2019].*/,null,"'‘’"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
|
||||
null],["com",/^rem.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);
|
||||
3
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-vhdl.js
vendored
Normal file
3
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-vhdl.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
|
||||
null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
|
||||
["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);
|
||||
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-wiki.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-wiki.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t Â\xa0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]);
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);
|
||||
3
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-xq.js
vendored
Normal file
3
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-xq.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-yaml.js
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/lang-yaml.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
var a=null;
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);
|
||||
1
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/prettify.css
vendored
Normal file
1
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/prettify.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
||||
28
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/prettify.js
vendored
Normal file
28
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/prettify.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
||||
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
|
||||
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
|
||||
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
|
||||
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
|
||||
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
|
||||
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
|
||||
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
|
||||
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
||||
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
|
||||
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
|
||||
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
|
||||
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
|
||||
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
|
||||
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
|
||||
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
|
||||
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
||||
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
|
||||
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
||||
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
|
||||
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
|
||||
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
|
||||
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
|
||||
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
|
||||
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
|
||||
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
|
||||
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
|
||||
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
|
||||
52
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/prettify.sunburst.css
vendored
Normal file
52
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/prettify/prettify.sunburst.css
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/* Pretty printing styles. Used with prettify.js. */
|
||||
/* Vim sunburst theme by David Leibovic */
|
||||
|
||||
pre .str, code .str { color: #65B042; } /* string - green */
|
||||
pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */
|
||||
pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */
|
||||
pre .typ, code .typ { color: #89bdff; } /* type - light blue */
|
||||
pre .lit, code .lit { color: #3387CC; } /* literal - blue */
|
||||
pre .pun, code .pun { color: #fff; } /* punctuation - white */
|
||||
pre .pln, code .pln { color: #fff; } /* plaintext - white */
|
||||
pre .tag, code .tag { color: #89bdff; } /* html/xml tag - light blue */
|
||||
pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name - khaki */
|
||||
pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */
|
||||
pre .dec, code .dec { color: #3387CC; } /* decimal - blue */
|
||||
|
||||
pre.prettyprint, code.prettyprint {
|
||||
background-color: #000;
|
||||
|
||||
-webkit-border-radius: 8px;
|
||||
-khtml-border-radius: 8px;
|
||||
-moz-border-radius: 8px;
|
||||
-ms-border-radius: 8px;
|
||||
-o-border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
pre.prettyprint {
|
||||
width: 95%;
|
||||
margin: 1em auto;
|
||||
padding: 1em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */
|
||||
li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
|
||||
/* Alternate shading for lines */
|
||||
li.L1,li.L3,li.L5,li.L7,li.L9 { }
|
||||
|
||||
@media print {
|
||||
pre .str, code .str { color: #060; }
|
||||
pre .kwd, code .kwd { color: #006; font-weight: bold; }
|
||||
pre .com, code .com { color: #600; font-style: italic; }
|
||||
pre .typ, code .typ { color: #404; font-weight: bold; }
|
||||
pre .lit, code .lit { color: #044; }
|
||||
pre .pun, code .pun { color: #440; }
|
||||
pre .pln, code .pln { color: #000; }
|
||||
pre .tag, code .tag { color: #006; font-weight: bold; }
|
||||
pre .atn, code .atn { color: #404; }
|
||||
pre .atv, code .atv { color: #060; }
|
||||
}
|
||||
181
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/screen.css
vendored
Normal file
181
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/screen.css
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
@charset "utf-8";
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background-color: #D0D0D0;
|
||||
font-family: "Helvetica,Arial,FreeSans";
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
img { border:0; }
|
||||
|
||||
#container {
|
||||
margin: 0 auto;
|
||||
width: 700px;
|
||||
padding: 20px;
|
||||
background-color: #FFFFFF;
|
||||
border-left: 1px solid #999999;
|
||||
border-right: 1px solid #999999;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.8em;
|
||||
color: #2c879b;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
h1 > .small {
|
||||
font-size: 0.4em;
|
||||
}
|
||||
|
||||
h1 a {
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
color: #2c879b;
|
||||
border-bottom: 1px dotted #2c879b;
|
||||
}
|
||||
|
||||
h3 {
|
||||
text-align: center;
|
||||
color: #2c879b;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #2c879b;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 30px;
|
||||
margin-top: 30px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/*
|
||||
pre {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
padding: 15px;
|
||||
}
|
||||
*/
|
||||
|
||||
hr {
|
||||
border: 0;
|
||||
width: 80%;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
ul.plain-list {
|
||||
list-style-type:none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
ul.plain-list > li {
|
||||
list-style-type:none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#download {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#github-forkme {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#github-watch {
|
||||
position: fixed;
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
#container .footer { text-align:center; padding-top:30px; font-style: italic; }
|
||||
|
||||
.menu { font-size: 0; }
|
||||
.menu > li {
|
||||
list-style-type: none;
|
||||
display: inline-block;
|
||||
font-size: 15px;
|
||||
}
|
||||
.menu > li + li {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.menu > li > a {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
background-color: #666;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
padding: 2px 4px 2px 4px;
|
||||
}
|
||||
|
||||
.menu > li.active > a {
|
||||
background-color: #2C879B;
|
||||
}
|
||||
|
||||
.menu > li > a:hover {
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
#demo-list > li.current {
|
||||
font-style: italic;
|
||||
}
|
||||
#demo-list > li.current:after {
|
||||
content: "« currently viewing";
|
||||
color: #AAA;
|
||||
display: inline-block;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* hide whitespace between inline-block elements */
|
||||
.inline-spaces { font-size: 0; }
|
||||
.inline-spaces > * { font-size: 11px; }
|
||||
|
||||
/* demo trigger boxes */
|
||||
.box {
|
||||
color: #EEE;
|
||||
background: #666;
|
||||
font-weight: bold;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
.box:hover {
|
||||
background: #777;
|
||||
}
|
||||
.box > * {
|
||||
display:block;
|
||||
}
|
||||
.menu-injected { background-color: #C87958; }
|
||||
.box.context-menu-disabled { background-color: red; }
|
||||
|
||||
.ascii-art .line {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.ascii-art .label {
|
||||
color: #2C879B;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.note {
|
||||
background-color: #EEE;
|
||||
padding: 10px;
|
||||
margin: -10px;
|
||||
}
|
||||
.note::before {
|
||||
content: "NOTE: ";
|
||||
font-weight: bold;
|
||||
}
|
||||
pre + .note,
|
||||
.note + .note {
|
||||
margin-top: 10px;
|
||||
}
|
||||
39
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/screen.js
vendored
Normal file
39
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/screen.js
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
(function($, undefined){
|
||||
|
||||
$(function() {
|
||||
if (!window.prettyPrint) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('.showcase').each(function(){
|
||||
|
||||
var $this = $(that || this),
|
||||
text, nodeName, lang, that;
|
||||
|
||||
if ($this.data('showcaseImport')) {
|
||||
$this = $($this.data('showcaseImport'));
|
||||
that = $this.get(0);
|
||||
}
|
||||
|
||||
nodeName = (that || this).nodeName.toLowerCase();
|
||||
lang = nodeName == 'script'
|
||||
? 'js'
|
||||
: (nodeName == 'style' ? 'css' : 'html');
|
||||
|
||||
if (lang == 'html') {
|
||||
text = $('<div></div>').append($this.clone()).html();
|
||||
} else {
|
||||
text = $this.text();
|
||||
}
|
||||
|
||||
$('<pre class="prettyprint lang-'+ lang +'"></pre>')
|
||||
.text(text)
|
||||
.insertBefore(this);
|
||||
|
||||
that && $(this).remove();
|
||||
});
|
||||
|
||||
prettyPrint();
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
185
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/IPv6.js
vendored
Normal file
185
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/IPv6.js
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
/*!
|
||||
* URI.js - Mutating URLs
|
||||
* IPv6 Support
|
||||
*
|
||||
* Version: 1.19.1
|
||||
*
|
||||
* Author: Rodney Rehm
|
||||
* Web: http://medialize.github.io/URI.js/
|
||||
*
|
||||
* Licensed under
|
||||
* MIT License http://www.opensource.org/licenses/mit-license
|
||||
*
|
||||
*/
|
||||
|
||||
(function (root, factory) {
|
||||
'use strict';
|
||||
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
// Node
|
||||
module.exports = factory();
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(factory);
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
root.IPv6 = factory(root);
|
||||
}
|
||||
}(this, function (root) {
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
var _in = "fe80:0000:0000:0000:0204:61ff:fe9d:f156";
|
||||
var _out = IPv6.best(_in);
|
||||
var _expected = "fe80::204:61ff:fe9d:f156";
|
||||
|
||||
console.log(_in, _out, _expected, _out === _expected);
|
||||
*/
|
||||
|
||||
// save current IPv6 variable, if any
|
||||
var _IPv6 = root && root.IPv6;
|
||||
|
||||
function bestPresentation(address) {
|
||||
// based on:
|
||||
// Javascript to test an IPv6 address for proper format, and to
|
||||
// present the "best text representation" according to IETF Draft RFC at
|
||||
// http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04
|
||||
// 8 Feb 2010 Rich Brown, Dartware, LLC
|
||||
// Please feel free to use this code as long as you provide a link to
|
||||
// http://www.intermapper.com
|
||||
// http://intermapper.com/support/tools/IPV6-Validator.aspx
|
||||
// http://download.dartware.com/thirdparty/ipv6validator.js
|
||||
|
||||
var _address = address.toLowerCase();
|
||||
var segments = _address.split(':');
|
||||
var length = segments.length;
|
||||
var total = 8;
|
||||
|
||||
// trim colons (:: or ::a:b:c… or …a:b:c::)
|
||||
if (segments[0] === '' && segments[1] === '' && segments[2] === '') {
|
||||
// must have been ::
|
||||
// remove first two items
|
||||
segments.shift();
|
||||
segments.shift();
|
||||
} else if (segments[0] === '' && segments[1] === '') {
|
||||
// must have been ::xxxx
|
||||
// remove the first item
|
||||
segments.shift();
|
||||
} else if (segments[length - 1] === '' && segments[length - 2] === '') {
|
||||
// must have been xxxx::
|
||||
segments.pop();
|
||||
}
|
||||
|
||||
length = segments.length;
|
||||
|
||||
// adjust total segments for IPv4 trailer
|
||||
if (segments[length - 1].indexOf('.') !== -1) {
|
||||
// found a "." which means IPv4
|
||||
total = 7;
|
||||
}
|
||||
|
||||
// fill empty segments them with "0000"
|
||||
var pos;
|
||||
for (pos = 0; pos < length; pos++) {
|
||||
if (segments[pos] === '') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (pos < total) {
|
||||
segments.splice(pos, 1, '0000');
|
||||
while (segments.length < total) {
|
||||
segments.splice(pos, 0, '0000');
|
||||
}
|
||||
}
|
||||
|
||||
// strip leading zeros
|
||||
var _segments;
|
||||
for (var i = 0; i < total; i++) {
|
||||
_segments = segments[i].split('');
|
||||
for (var j = 0; j < 3 ; j++) {
|
||||
if (_segments[0] === '0' && _segments.length > 1) {
|
||||
_segments.splice(0,1);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
segments[i] = _segments.join('');
|
||||
}
|
||||
|
||||
// find longest sequence of zeroes and coalesce them into one segment
|
||||
var best = -1;
|
||||
var _best = 0;
|
||||
var _current = 0;
|
||||
var current = -1;
|
||||
var inzeroes = false;
|
||||
// i; already declared
|
||||
|
||||
for (i = 0; i < total; i++) {
|
||||
if (inzeroes) {
|
||||
if (segments[i] === '0') {
|
||||
_current += 1;
|
||||
} else {
|
||||
inzeroes = false;
|
||||
if (_current > _best) {
|
||||
best = current;
|
||||
_best = _current;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (segments[i] === '0') {
|
||||
inzeroes = true;
|
||||
current = i;
|
||||
_current = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_current > _best) {
|
||||
best = current;
|
||||
_best = _current;
|
||||
}
|
||||
|
||||
if (_best > 1) {
|
||||
segments.splice(best, _best, '');
|
||||
}
|
||||
|
||||
length = segments.length;
|
||||
|
||||
// assemble remaining segments
|
||||
var result = '';
|
||||
if (segments[0] === '') {
|
||||
result = ':';
|
||||
}
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
result += segments[i];
|
||||
if (i === length - 1) {
|
||||
break;
|
||||
}
|
||||
|
||||
result += ':';
|
||||
}
|
||||
|
||||
if (segments[length - 1] === '') {
|
||||
result += ':';
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function noConflict() {
|
||||
/*jshint validthis: true */
|
||||
if (root.IPv6 === this) {
|
||||
root.IPv6 = _IPv6;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
return {
|
||||
best: bestPresentation,
|
||||
noConflict: noConflict
|
||||
};
|
||||
}));
|
||||
245
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/SecondLevelDomains.js
vendored
Normal file
245
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/SecondLevelDomains.js
vendored
Normal file
@@ -0,0 +1,245 @@
|
||||
/*!
|
||||
* URI.js - Mutating URLs
|
||||
* Second Level Domain (SLD) Support
|
||||
*
|
||||
* Version: 1.19.1
|
||||
*
|
||||
* Author: Rodney Rehm
|
||||
* Web: http://medialize.github.io/URI.js/
|
||||
*
|
||||
* Licensed under
|
||||
* MIT License http://www.opensource.org/licenses/mit-license
|
||||
*
|
||||
*/
|
||||
|
||||
(function (root, factory) {
|
||||
'use strict';
|
||||
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
// Node
|
||||
module.exports = factory();
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(factory);
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
root.SecondLevelDomains = factory(root);
|
||||
}
|
||||
}(this, function (root) {
|
||||
'use strict';
|
||||
|
||||
// save current SecondLevelDomains variable, if any
|
||||
var _SecondLevelDomains = root && root.SecondLevelDomains;
|
||||
|
||||
var SLD = {
|
||||
// list of known Second Level Domains
|
||||
// converted list of SLDs from https://github.com/gavingmiller/second-level-domains
|
||||
// ----
|
||||
// publicsuffix.org is more current and actually used by a couple of browsers internally.
|
||||
// downside is it also contains domains like "dyndns.org" - which is fine for the security
|
||||
// issues browser have to deal with (SOP for cookies, etc) - but is way overboard for URI.js
|
||||
// ----
|
||||
list: {
|
||||
'ac':' com gov mil net org ',
|
||||
'ae':' ac co gov mil name net org pro sch ',
|
||||
'af':' com edu gov net org ',
|
||||
'al':' com edu gov mil net org ',
|
||||
'ao':' co ed gv it og pb ',
|
||||
'ar':' com edu gob gov int mil net org tur ',
|
||||
'at':' ac co gv or ',
|
||||
'au':' asn com csiro edu gov id net org ',
|
||||
'ba':' co com edu gov mil net org rs unbi unmo unsa untz unze ',
|
||||
'bb':' biz co com edu gov info net org store tv ',
|
||||
'bh':' biz cc com edu gov info net org ',
|
||||
'bn':' com edu gov net org ',
|
||||
'bo':' com edu gob gov int mil net org tv ',
|
||||
'br':' adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ',
|
||||
'bs':' com edu gov net org ',
|
||||
'bz':' du et om ov rg ',
|
||||
'ca':' ab bc mb nb nf nl ns nt nu on pe qc sk yk ',
|
||||
'ck':' biz co edu gen gov info net org ',
|
||||
'cn':' ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ',
|
||||
'co':' com edu gov mil net nom org ',
|
||||
'cr':' ac c co ed fi go or sa ',
|
||||
'cy':' ac biz com ekloges gov ltd name net org parliament press pro tm ',
|
||||
'do':' art com edu gob gov mil net org sld web ',
|
||||
'dz':' art asso com edu gov net org pol ',
|
||||
'ec':' com edu fin gov info med mil net org pro ',
|
||||
'eg':' com edu eun gov mil name net org sci ',
|
||||
'er':' com edu gov ind mil net org rochest w ',
|
||||
'es':' com edu gob nom org ',
|
||||
'et':' biz com edu gov info name net org ',
|
||||
'fj':' ac biz com info mil name net org pro ',
|
||||
'fk':' ac co gov net nom org ',
|
||||
'fr':' asso com f gouv nom prd presse tm ',
|
||||
'gg':' co net org ',
|
||||
'gh':' com edu gov mil org ',
|
||||
'gn':' ac com gov net org ',
|
||||
'gr':' com edu gov mil net org ',
|
||||
'gt':' com edu gob ind mil net org ',
|
||||
'gu':' com edu gov net org ',
|
||||
'hk':' com edu gov idv net org ',
|
||||
'hu':' 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ',
|
||||
'id':' ac co go mil net or sch web ',
|
||||
'il':' ac co gov idf k12 muni net org ',
|
||||
'in':' ac co edu ernet firm gen gov i ind mil net nic org res ',
|
||||
'iq':' com edu gov i mil net org ',
|
||||
'ir':' ac co dnssec gov i id net org sch ',
|
||||
'it':' edu gov ',
|
||||
'je':' co net org ',
|
||||
'jo':' com edu gov mil name net org sch ',
|
||||
'jp':' ac ad co ed go gr lg ne or ',
|
||||
'ke':' ac co go info me mobi ne or sc ',
|
||||
'kh':' com edu gov mil net org per ',
|
||||
'ki':' biz com de edu gov info mob net org tel ',
|
||||
'km':' asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ',
|
||||
'kn':' edu gov net org ',
|
||||
'kr':' ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ',
|
||||
'kw':' com edu gov net org ',
|
||||
'ky':' com edu gov net org ',
|
||||
'kz':' com edu gov mil net org ',
|
||||
'lb':' com edu gov net org ',
|
||||
'lk':' assn com edu gov grp hotel int ltd net ngo org sch soc web ',
|
||||
'lr':' com edu gov net org ',
|
||||
'lv':' asn com conf edu gov id mil net org ',
|
||||
'ly':' com edu gov id med net org plc sch ',
|
||||
'ma':' ac co gov m net org press ',
|
||||
'mc':' asso tm ',
|
||||
'me':' ac co edu gov its net org priv ',
|
||||
'mg':' com edu gov mil nom org prd tm ',
|
||||
'mk':' com edu gov inf name net org pro ',
|
||||
'ml':' com edu gov net org presse ',
|
||||
'mn':' edu gov org ',
|
||||
'mo':' com edu gov net org ',
|
||||
'mt':' com edu gov net org ',
|
||||
'mv':' aero biz com coop edu gov info int mil museum name net org pro ',
|
||||
'mw':' ac co com coop edu gov int museum net org ',
|
||||
'mx':' com edu gob net org ',
|
||||
'my':' com edu gov mil name net org sch ',
|
||||
'nf':' arts com firm info net other per rec store web ',
|
||||
'ng':' biz com edu gov mil mobi name net org sch ',
|
||||
'ni':' ac co com edu gob mil net nom org ',
|
||||
'np':' com edu gov mil net org ',
|
||||
'nr':' biz com edu gov info net org ',
|
||||
'om':' ac biz co com edu gov med mil museum net org pro sch ',
|
||||
'pe':' com edu gob mil net nom org sld ',
|
||||
'ph':' com edu gov i mil net ngo org ',
|
||||
'pk':' biz com edu fam gob gok gon gop gos gov net org web ',
|
||||
'pl':' art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ',
|
||||
'pr':' ac biz com edu est gov info isla name net org pro prof ',
|
||||
'ps':' com edu gov net org plo sec ',
|
||||
'pw':' belau co ed go ne or ',
|
||||
'ro':' arts com firm info nom nt org rec store tm www ',
|
||||
'rs':' ac co edu gov in org ',
|
||||
'sb':' com edu gov net org ',
|
||||
'sc':' com edu gov net org ',
|
||||
'sh':' co com edu gov net nom org ',
|
||||
'sl':' com edu gov net org ',
|
||||
'st':' co com consulado edu embaixada gov mil net org principe saotome store ',
|
||||
'sv':' com edu gob org red ',
|
||||
'sz':' ac co org ',
|
||||
'tr':' av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ',
|
||||
'tt':' aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ',
|
||||
'tw':' club com ebiz edu game gov idv mil net org ',
|
||||
'mu':' ac co com gov net or org ',
|
||||
'mz':' ac co edu gov org ',
|
||||
'na':' co com ',
|
||||
'nz':' ac co cri geek gen govt health iwi maori mil net org parliament school ',
|
||||
'pa':' abo ac com edu gob ing med net nom org sld ',
|
||||
'pt':' com edu gov int net nome org publ ',
|
||||
'py':' com edu gov mil net org ',
|
||||
'qa':' com edu gov mil net org ',
|
||||
're':' asso com nom ',
|
||||
'ru':' ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ',
|
||||
'rw':' ac co com edu gouv gov int mil net ',
|
||||
'sa':' com edu gov med net org pub sch ',
|
||||
'sd':' com edu gov info med net org tv ',
|
||||
'se':' a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ',
|
||||
'sg':' com edu gov idn net org per ',
|
||||
'sn':' art com edu gouv org perso univ ',
|
||||
'sy':' com edu gov mil net news org ',
|
||||
'th':' ac co go in mi net or ',
|
||||
'tj':' ac biz co com edu go gov info int mil name net nic org test web ',
|
||||
'tn':' agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ',
|
||||
'tz':' ac co go ne or ',
|
||||
'ua':' biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ',
|
||||
'ug':' ac co go ne or org sc ',
|
||||
'uk':' ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ',
|
||||
'us':' dni fed isa kids nsn ',
|
||||
'uy':' com edu gub mil net org ',
|
||||
've':' co com edu gob info mil net org web ',
|
||||
'vi':' co com k12 net org ',
|
||||
'vn':' ac biz com edu gov health info int name net org pro ',
|
||||
'ye':' co com gov ltd me net org plc ',
|
||||
'yu':' ac co edu gov org ',
|
||||
'za':' ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ',
|
||||
'zm':' ac co com edu gov net org sch ',
|
||||
// https://en.wikipedia.org/wiki/CentralNic#Second-level_domains
|
||||
'com': 'ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ',
|
||||
'net': 'gb jp se uk ',
|
||||
'org': 'ae',
|
||||
'de': 'com '
|
||||
},
|
||||
// gorhill 2013-10-25: Using indexOf() instead Regexp(). Significant boost
|
||||
// in both performance and memory footprint. No initialization required.
|
||||
// http://jsperf.com/uri-js-sld-regex-vs-binary-search/4
|
||||
// Following methods use lastIndexOf() rather than array.split() in order
|
||||
// to avoid any memory allocations.
|
||||
has: function(domain) {
|
||||
var tldOffset = domain.lastIndexOf('.');
|
||||
if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
|
||||
return false;
|
||||
}
|
||||
var sldOffset = domain.lastIndexOf('.', tldOffset-1);
|
||||
if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {
|
||||
return false;
|
||||
}
|
||||
var sldList = SLD.list[domain.slice(tldOffset+1)];
|
||||
if (!sldList) {
|
||||
return false;
|
||||
}
|
||||
return sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') >= 0;
|
||||
},
|
||||
is: function(domain) {
|
||||
var tldOffset = domain.lastIndexOf('.');
|
||||
if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
|
||||
return false;
|
||||
}
|
||||
var sldOffset = domain.lastIndexOf('.', tldOffset-1);
|
||||
if (sldOffset >= 0) {
|
||||
return false;
|
||||
}
|
||||
var sldList = SLD.list[domain.slice(tldOffset+1)];
|
||||
if (!sldList) {
|
||||
return false;
|
||||
}
|
||||
return sldList.indexOf(' ' + domain.slice(0, tldOffset) + ' ') >= 0;
|
||||
},
|
||||
get: function(domain) {
|
||||
var tldOffset = domain.lastIndexOf('.');
|
||||
if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
|
||||
return null;
|
||||
}
|
||||
var sldOffset = domain.lastIndexOf('.', tldOffset-1);
|
||||
if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {
|
||||
return null;
|
||||
}
|
||||
var sldList = SLD.list[domain.slice(tldOffset+1)];
|
||||
if (!sldList) {
|
||||
return null;
|
||||
}
|
||||
if (sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') < 0) {
|
||||
return null;
|
||||
}
|
||||
return domain.slice(sldOffset+1);
|
||||
},
|
||||
noConflict: function(){
|
||||
if (root.SecondLevelDomains === this) {
|
||||
root.SecondLevelDomains = _SecondLevelDomains;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
return SLD;
|
||||
}));
|
||||
121
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/URI.fragmentQuery.js
vendored
Normal file
121
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/URI.fragmentQuery.js
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* Extending URI.js for fragment abuse
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// EXAMPLE: storing application/x-www-form-urlencoded data in the fragment
|
||||
// possibly helpful for Google's hashbangs
|
||||
// see http://code.google.com/web/ajaxcrawling/
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
// Note: make sure this is the last file loaded!
|
||||
|
||||
// USAGE:
|
||||
// var uri = URI("http://example.org/#?foo=bar");
|
||||
// uri.fragment(true) === {foo: "bar"};
|
||||
// uri.fragment({bar: "foo"});
|
||||
// uri.toString() === "http://example.org/#?bar=foo";
|
||||
// uri.addFragment("name", "value");
|
||||
// uri.toString() === "http://example.org/#?bar=foo&name=value";
|
||||
// uri.removeFragment("name");
|
||||
// uri.toString() === "http://example.org/#?bar=foo";
|
||||
// uri.setFragment("name", "value1");
|
||||
// uri.toString() === "http://example.org/#?bar=foo&name=value1";
|
||||
// uri.setFragment("name", "value2");
|
||||
// uri.toString() === "http://example.org/#?bar=foo&name=value2";
|
||||
|
||||
(function (root, factory) {
|
||||
'use strict';
|
||||
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
// Node
|
||||
module.exports = factory(require('./URI'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['./URI'], factory);
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.URI);
|
||||
}
|
||||
}(this, function (URI) {
|
||||
'use strict';
|
||||
|
||||
var p = URI.prototype;
|
||||
// old fragment handler we need to wrap
|
||||
var f = p.fragment;
|
||||
|
||||
// make fragmentPrefix configurable
|
||||
URI.fragmentPrefix = '?';
|
||||
var _parts = URI._parts;
|
||||
URI._parts = function() {
|
||||
var parts = _parts();
|
||||
parts.fragmentPrefix = URI.fragmentPrefix;
|
||||
return parts;
|
||||
};
|
||||
p.fragmentPrefix = function(v) {
|
||||
this._parts.fragmentPrefix = v;
|
||||
return this;
|
||||
};
|
||||
|
||||
// add fragment(true) and fragment({key: value}) signatures
|
||||
p.fragment = function(v, build) {
|
||||
var prefix = this._parts.fragmentPrefix;
|
||||
var fragment = this._parts.fragment || '';
|
||||
|
||||
if (v === true) {
|
||||
if (fragment.substring(0, prefix.length) !== prefix) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return URI.parseQuery(fragment.substring(prefix.length));
|
||||
} else if (v !== undefined && typeof v !== 'string') {
|
||||
this._parts.fragment = prefix + URI.buildQuery(v);
|
||||
this.build(!build);
|
||||
return this;
|
||||
} else {
|
||||
return f.call(this, v, build);
|
||||
}
|
||||
};
|
||||
p.addFragment = function(name, value, build) {
|
||||
var prefix = this._parts.fragmentPrefix;
|
||||
var data = URI.parseQuery((this._parts.fragment || '').substring(prefix.length));
|
||||
URI.addQuery(data, name, value);
|
||||
this._parts.fragment = prefix + URI.buildQuery(data);
|
||||
if (typeof name !== 'string') {
|
||||
build = value;
|
||||
}
|
||||
|
||||
this.build(!build);
|
||||
return this;
|
||||
};
|
||||
p.removeFragment = function(name, value, build) {
|
||||
var prefix = this._parts.fragmentPrefix;
|
||||
var data = URI.parseQuery((this._parts.fragment || '').substring(prefix.length));
|
||||
URI.removeQuery(data, name, value);
|
||||
this._parts.fragment = prefix + URI.buildQuery(data);
|
||||
if (typeof name !== 'string') {
|
||||
build = value;
|
||||
}
|
||||
|
||||
this.build(!build);
|
||||
return this;
|
||||
};
|
||||
p.setFragment = function(name, value, build) {
|
||||
var prefix = this._parts.fragmentPrefix;
|
||||
var data = URI.parseQuery((this._parts.fragment || '').substring(prefix.length));
|
||||
URI.setQuery(data, name, value);
|
||||
this._parts.fragment = prefix + URI.buildQuery(data);
|
||||
if (typeof name !== 'string') {
|
||||
build = value;
|
||||
}
|
||||
|
||||
this.build(!build);
|
||||
return this;
|
||||
};
|
||||
p.addHash = p.addFragment;
|
||||
p.removeHash = p.removeFragment;
|
||||
p.setHash = p.setFragment;
|
||||
|
||||
// extending existing object rather than defining something new
|
||||
return URI;
|
||||
}));
|
||||
97
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/URI.fragmentURI.js
vendored
Normal file
97
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/URI.fragmentURI.js
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Extending URI.js for fragment abuse
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// EXAMPLE: storing a relative URL in the fragment ("FragmentURI")
|
||||
// possibly helpful when working with backbone.js or sammy.js
|
||||
// inspired by https://github.com/medialize/URI.js/pull/2
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
// Note: make sure this is the last file loaded!
|
||||
|
||||
// USAGE:
|
||||
// var uri = URI("http://example.org/#!/foo/bar/baz.html");
|
||||
// var furi = uri.fragment(true);
|
||||
// furi.pathname() === '/foo/bar/baz.html';
|
||||
// furi.pathname('/hello.html');
|
||||
// uri.toString() === "http://example.org/#!/hello.html"
|
||||
|
||||
(function (root, factory) {
|
||||
'use strict';
|
||||
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
// Node
|
||||
module.exports = factory(require('./URI'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['./URI'], factory);
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.URI);
|
||||
}
|
||||
}(this, function (URI) {
|
||||
'use strict';
|
||||
|
||||
var p = URI.prototype;
|
||||
// old handlers we need to wrap
|
||||
var f = p.fragment;
|
||||
var b = p.build;
|
||||
|
||||
// make fragmentPrefix configurable
|
||||
URI.fragmentPrefix = '!';
|
||||
var _parts = URI._parts;
|
||||
URI._parts = function() {
|
||||
var parts = _parts();
|
||||
parts.fragmentPrefix = URI.fragmentPrefix;
|
||||
return parts;
|
||||
};
|
||||
p.fragmentPrefix = function(v) {
|
||||
this._parts.fragmentPrefix = v;
|
||||
return this;
|
||||
};
|
||||
|
||||
// add fragment(true) and fragment(URI) signatures
|
||||
p.fragment = function(v, build) {
|
||||
var prefix = this._parts.fragmentPrefix;
|
||||
var fragment = this._parts.fragment || '';
|
||||
var furi;
|
||||
|
||||
if (v === true) {
|
||||
if (fragment.substring(0, prefix.length) !== prefix) {
|
||||
furi = URI('');
|
||||
} else {
|
||||
furi = new URI(fragment.substring(prefix.length));
|
||||
}
|
||||
|
||||
this._fragmentURI = furi;
|
||||
furi._parentURI = this;
|
||||
return furi;
|
||||
} else if (v !== undefined && typeof v !== 'string') {
|
||||
this._fragmentURI = v;
|
||||
v._parentURI = v;
|
||||
this._parts.fragment = prefix + v.toString();
|
||||
this.build(!build);
|
||||
return this;
|
||||
} else if (typeof v === 'string') {
|
||||
this._fragmentURI = undefined;
|
||||
}
|
||||
|
||||
return f.call(this, v, build);
|
||||
};
|
||||
|
||||
// make .build() of the actual URI aware of the FragmentURI
|
||||
p.build = function(deferBuild) {
|
||||
var t = b.call(this, deferBuild);
|
||||
|
||||
if (deferBuild !== false && this._parentURI) {
|
||||
// update the parent
|
||||
this._parentURI.fragment(this);
|
||||
}
|
||||
|
||||
return t;
|
||||
};
|
||||
|
||||
// extending existing object rather than defining something new
|
||||
return URI;
|
||||
}));
|
||||
2338
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/URI.js
vendored
Normal file
2338
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/URI.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
93
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/URI.min.js
vendored
Normal file
93
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/URI.min.js
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
/*! URI.js v1.19.1 http://medialize.github.io/URI.js/ */
|
||||
/* build contains: IPv6.js, punycode.js, SecondLevelDomains.js, URI.js, URITemplate.js */
|
||||
(function(f,n){"object"===typeof module&&module.exports?module.exports=n():"function"===typeof define&&define.amd?define(n):f.IPv6=n(f)})(this,function(f){var n=f&&f.IPv6;return{best:function(h){h=h.toLowerCase().split(":");var k=h.length,b=8;""===h[0]&&""===h[1]&&""===h[2]?(h.shift(),h.shift()):""===h[0]&&""===h[1]?h.shift():""===h[k-1]&&""===h[k-2]&&h.pop();k=h.length;-1!==h[k-1].indexOf(".")&&(b=7);var q;for(q=0;q<k&&""!==h[q];q++);if(q<b)for(h.splice(q,1,"0000");h.length<b;)h.splice(q,0,"0000");
|
||||
for(q=0;q<b;q++){k=h[q].split("");for(var f=0;3>f;f++)if("0"===k[0]&&1<k.length)k.splice(0,1);else break;h[q]=k.join("")}k=-1;var n=f=0,g=-1,p=!1;for(q=0;q<b;q++)p?"0"===h[q]?n+=1:(p=!1,n>f&&(k=g,f=n)):"0"===h[q]&&(p=!0,g=q,n=1);n>f&&(k=g,f=n);1<f&&h.splice(k,f,"");k=h.length;b="";""===h[0]&&(b=":");for(q=0;q<k;q++){b+=h[q];if(q===k-1)break;b+=":"}""===h[k-1]&&(b+=":");return b},noConflict:function(){f.IPv6===this&&(f.IPv6=n);return this}}});
|
||||
(function(f){function n(b){throw new RangeError(w[b]);}function h(b,e){for(var g=b.length,h=[];g--;)h[g]=e(b[g]);return h}function k(b,e){var g=b.split("@"),f="";1<g.length&&(f=g[0]+"@",b=g[1]);b=b.replace(C,".");g=b.split(".");g=h(g,e).join(".");return f+g}function b(b){for(var e=[],g=0,h=b.length,f,a;g<h;)f=b.charCodeAt(g++),55296<=f&&56319>=f&&g<h?(a=b.charCodeAt(g++),56320==(a&64512)?e.push(((f&1023)<<10)+(a&1023)+65536):(e.push(f),g--)):e.push(f);return e}function q(b){return h(b,function(b){var e=
|
||||
"";65535<b&&(b-=65536,e+=t(b>>>10&1023|55296),b=56320|b&1023);return e+=t(b)}).join("")}function z(b,e){return b+22+75*(26>b)-((0!=e)<<5)}function u(b,g,h){var f=0;b=h?e(b/700):b>>1;for(b+=e(b/g);455<b;f+=36)b=e(b/35);return e(f+36*b/(b+38))}function g(b){var g=[],h=b.length,f=0,k=128,a=72,c,d;var l=b.lastIndexOf("-");0>l&&(l=0);for(c=0;c<l;++c)128<=b.charCodeAt(c)&&n("not-basic"),g.push(b.charCodeAt(c));for(l=0<l?l+1:0;l<h;){c=f;var m=1;for(d=36;;d+=36){l>=h&&n("invalid-input");var x=b.charCodeAt(l++);
|
||||
x=10>x-48?x-22:26>x-65?x-65:26>x-97?x-97:36;(36<=x||x>e((2147483647-f)/m))&&n("overflow");f+=x*m;var p=d<=a?1:d>=a+26?26:d-a;if(x<p)break;x=36-p;m>e(2147483647/x)&&n("overflow");m*=x}m=g.length+1;a=u(f-c,m,0==c);e(f/m)>2147483647-k&&n("overflow");k+=e(f/m);f%=m;g.splice(f++,0,k)}return q(g)}function p(g){var h,f,k,p=[];g=b(g);var a=g.length;var c=128;var d=0;var l=72;for(k=0;k<a;++k){var m=g[k];128>m&&p.push(t(m))}for((h=f=p.length)&&p.push("-");h<a;){var x=2147483647;for(k=0;k<a;++k)m=g[k],m>=c&&
|
||||
m<x&&(x=m);var q=h+1;x-c>e((2147483647-d)/q)&&n("overflow");d+=(x-c)*q;c=x;for(k=0;k<a;++k)if(m=g[k],m<c&&2147483647<++d&&n("overflow"),m==c){var r=d;for(x=36;;x+=36){m=x<=l?1:x>=l+26?26:x-l;if(r<m)break;var A=r-m;r=36-m;p.push(t(z(m+A%r,0)));r=e(A/r)}p.push(t(z(r,0)));l=u(d,q,h==f);d=0;++h}++d;++c}return p.join("")}var D="object"==typeof exports&&exports&&!exports.nodeType&&exports,A="object"==typeof module&&module&&!module.nodeType&&module,B="object"==typeof global&&global;if(B.global===B||B.window===
|
||||
B||B.self===B)f=B;var E=/^xn--/,r=/[^\x20-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},e=Math.floor,t=String.fromCharCode,y;var v={version:"1.3.2",ucs2:{decode:b,encode:q},decode:g,encode:p,toASCII:function(b){return k(b,function(b){return r.test(b)?"xn--"+p(b):b})},toUnicode:function(b){return k(b,function(b){return E.test(b)?g(b.slice(4).toLowerCase()):
|
||||
b})}};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return v});else if(D&&A)if(module.exports==D)A.exports=v;else for(y in v)v.hasOwnProperty(y)&&(D[y]=v[y]);else f.punycode=v})(this);
|
||||
(function(f,n){"object"===typeof module&&module.exports?module.exports=n():"function"===typeof define&&define.amd?define(n):f.SecondLevelDomains=n(f)})(this,function(f){var n=f&&f.SecondLevelDomains,h={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",
|
||||
bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",
|
||||
ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",
|
||||
es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",
|
||||
id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",
|
||||
kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",
|
||||
mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",
|
||||
ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",
|
||||
ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",
|
||||
tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",
|
||||
rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",
|
||||
tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",
|
||||
us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",
|
||||
org:"ae",de:"com "},has:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return!1;var k=f.lastIndexOf(".",b-1);if(0>=k||k>=b-1)return!1;var n=h.list[f.slice(b+1)];return n?0<=n.indexOf(" "+f.slice(k+1,b)+" "):!1},is:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1||0<=f.lastIndexOf(".",b-1))return!1;var k=h.list[f.slice(b+1)];return k?0<=k.indexOf(" "+f.slice(0,b)+" "):!1},get:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return null;var k=f.lastIndexOf(".",b-1);
|
||||
if(0>=k||k>=b-1)return null;var n=h.list[f.slice(b+1)];return!n||0>n.indexOf(" "+f.slice(k+1,b)+" ")?null:f.slice(k+1)},noConflict:function(){f.SecondLevelDomains===this&&(f.SecondLevelDomains=n);return this}};return h});
|
||||
(function(f,n){"object"===typeof module&&module.exports?module.exports=n(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],n):f.URI=n(f.punycode,f.IPv6,f.SecondLevelDomains,f)})(this,function(f,n,h,k){function b(a,c){var d=1<=arguments.length,l=2<=arguments.length;if(!(this instanceof b))return d?l?new b(a,c):new b(a):new b;if(void 0===a){if(d)throw new TypeError("undefined is not a valid argument for URI");
|
||||
a="undefined"!==typeof location?location.href+"":""}if(null===a&&d)throw new TypeError("null is not a valid argument for URI");this.href(a);return void 0!==c?this.absoluteTo(c):this}function q(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function z(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function u(a){return"Array"===z(a)}function g(a,c){var d={},b;if("RegExp"===z(c))d=null;else if(u(c)){var m=0;for(b=c.length;m<b;m++)d[c[m]]=!0}else d[c]=
|
||||
!0;m=0;for(b=a.length;m<b;m++)if(d&&void 0!==d[a[m]]||!d&&c.test(a[m]))a.splice(m,1),b--,m--;return a}function p(a,c){var d;if(u(c)){var b=0;for(d=c.length;b<d;b++)if(!p(a,c[b]))return!1;return!0}var m=z(c);b=0;for(d=a.length;b<d;b++)if("RegExp"===m){if("string"===typeof a[b]&&a[b].match(c))return!0}else if(a[b]===c)return!0;return!1}function D(a,c){if(!u(a)||!u(c)||a.length!==c.length)return!1;a.sort();c.sort();for(var d=0,b=a.length;d<b;d++)if(a[d]!==c[d])return!1;return!0}function A(a){return a.replace(/^\/+|\/+$/g,
|
||||
"")}function B(a){return escape(a)}function E(a){return encodeURIComponent(a).replace(/[!'()*]/g,B).replace(/\*/g,"%2A")}function r(a){return function(c,d){if(void 0===c)return this._parts[a]||"";this._parts[a]=c||null;this.build(!d);return this}}function C(a,c){return function(d,b){if(void 0===d)return this._parts[a]||"";null!==d&&(d+="",d.charAt(0)===c&&(d=d.substring(1)));this._parts[a]=d;this.build(!b);return this}}var w=k&&k.URI;b.version="1.19.1";var e=b.prototype,t=Object.prototype.hasOwnProperty;
|
||||
b._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:b.preventInvalidHostname,duplicateQueryParameters:b.duplicateQueryParameters,escapeQuerySpace:b.escapeQuerySpace}};b.preventInvalidHostname=!1;b.duplicateQueryParameters=!1;b.escapeQuerySpace=!0;b.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;b.idn_expression=/[^a-z0-9\._-]/i;b.punycode_expression=/(xn--)/i;b.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
|
||||
b.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
|
||||
b.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig;b.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g};b.defaultPorts={http:"80",https:"443",ftp:"21",
|
||||
gopher:"70",ws:"80",wss:"443"};b.hostProtocols=["http","https"];b.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/;b.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};b.getDomAttribute=function(a){if(a&&a.nodeName){var c=a.nodeName.toLowerCase();if("input"!==c||"image"===a.type)return b.domAttributes[c]}};b.encode=E;b.decode=decodeURIComponent;b.iso8859=
|
||||
function(){b.encode=escape;b.decode=unescape};b.unicode=function(){b.encode=E;b.decode=decodeURIComponent};b.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@",
|
||||
"%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}};b.encodeQuery=function(a,c){var d=b.encode(a+"");void 0===c&&(c=b.escapeQuerySpace);return c?d.replace(/%20/g,"+"):d};b.decodeQuery=
|
||||
function(a,c){a+="";void 0===c&&(c=b.escapeQuerySpace);try{return b.decode(c?a.replace(/\+/g,"%20"):a)}catch(d){return a}};var y={encode:"encode",decode:"decode"},v,F=function(a,c){return function(d){try{return b[c](d+"").replace(b.characters[a][c].expression,function(d){return b.characters[a][c].map[d]})}catch(l){return d}}};for(v in y)b[v+"PathSegment"]=F("pathname",y[v]),b[v+"UrnPathSegment"]=F("urnpath",y[v]);y=function(a,c,d){return function(l){var m=d?function(a){return b[c](b[d](a))}:b[c];
|
||||
l=(l+"").split(a);for(var e=0,g=l.length;e<g;e++)l[e]=m(l[e]);return l.join(a)}};b.decodePath=y("/","decodePathSegment");b.decodeUrnPath=y(":","decodeUrnPathSegment");b.recodePath=y("/","encodePathSegment","decode");b.recodeUrnPath=y(":","encodeUrnPathSegment","decode");b.encodeReserved=F("reserved","encode");b.parse=function(a,c){c||(c={preventInvalidHostname:b.preventInvalidHostname});var d=a.indexOf("#");-1<d&&(c.fragment=a.substring(d+1)||null,a=a.substring(0,d));d=a.indexOf("?");-1<d&&(c.query=
|
||||
a.substring(d+1)||null,a=a.substring(0,d));"//"===a.substring(0,2)?(c.protocol=null,a=a.substring(2),a=b.parseAuthority(a,c)):(d=a.indexOf(":"),-1<d&&(c.protocol=a.substring(0,d)||null,c.protocol&&!c.protocol.match(b.protocol_expression)?c.protocol=void 0:"//"===a.substring(d+1,d+3)?(a=a.substring(d+3),a=b.parseAuthority(a,c)):(a=a.substring(d+1),c.urn=!0)));c.path=a;return c};b.parseHost=function(a,c){a||(a="");a=a.replace(/\\/g,"/");var d=a.indexOf("/");-1===d&&(d=a.length);if("["===a.charAt(0)){var l=
|
||||
a.indexOf("]");c.hostname=a.substring(1,l)||null;c.port=a.substring(l+2,d)||null;"/"===c.port&&(c.port=null)}else{var m=a.indexOf(":");l=a.indexOf("/");m=a.indexOf(":",m+1);-1!==m&&(-1===l||m<l)?(c.hostname=a.substring(0,d)||null,c.port=null):(l=a.substring(0,d).split(":"),c.hostname=l[0]||null,c.port=l[1]||null)}c.hostname&&"/"!==a.substring(d).charAt(0)&&(d++,a="/"+a);c.preventInvalidHostname&&b.ensureValidHostname(c.hostname,c.protocol);c.port&&b.ensureValidPort(c.port);return a.substring(d)||
|
||||
"/"};b.parseAuthority=function(a,c){a=b.parseUserinfo(a,c);return b.parseHost(a,c)};b.parseUserinfo=function(a,c){var d=a.indexOf("/"),l=a.lastIndexOf("@",-1<d?d:a.length-1);-1<l&&(-1===d||l<d)?(d=a.substring(0,l).split(":"),c.username=d[0]?b.decode(d[0]):null,d.shift(),c.password=d[0]?b.decode(d.join(":")):null,a=a.substring(l+1)):(c.username=null,c.password=null);return a};b.parseQuery=function(a,c){if(!a)return{};a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a)return{};for(var d={},l=a.split("&"),
|
||||
m=l.length,e,g,f=0;f<m;f++)if(e=l[f].split("="),g=b.decodeQuery(e.shift(),c),e=e.length?b.decodeQuery(e.join("="),c):null,t.call(d,g)){if("string"===typeof d[g]||null===d[g])d[g]=[d[g]];d[g].push(e)}else d[g]=e;return d};b.build=function(a){var c="";a.protocol&&(c+=a.protocol+":");a.urn||!c&&!a.hostname||(c+="//");c+=b.buildAuthority(a)||"";"string"===typeof a.path&&("/"!==a.path.charAt(0)&&"string"===typeof a.hostname&&(c+="/"),c+=a.path);"string"===typeof a.query&&a.query&&(c+="?"+a.query);"string"===
|
||||
typeof a.fragment&&a.fragment&&(c+="#"+a.fragment);return c};b.buildHost=function(a){var c="";if(a.hostname)c=b.ip6_expression.test(a.hostname)?c+("["+a.hostname+"]"):c+a.hostname;else return"";a.port&&(c+=":"+a.port);return c};b.buildAuthority=function(a){return b.buildUserinfo(a)+b.buildHost(a)};b.buildUserinfo=function(a){var c="";a.username&&(c+=b.encode(a.username));a.password&&(c+=":"+b.encode(a.password));c&&(c+="@");return c};b.buildQuery=function(a,c,d){var l="",m,e;for(m in a)if(t.call(a,
|
||||
m)&&m)if(u(a[m])){var g={};var f=0;for(e=a[m].length;f<e;f++)void 0!==a[m][f]&&void 0===g[a[m][f]+""]&&(l+="&"+b.buildQueryParameter(m,a[m][f],d),!0!==c&&(g[a[m][f]+""]=!0))}else void 0!==a[m]&&(l+="&"+b.buildQueryParameter(m,a[m],d));return l.substring(1)};b.buildQueryParameter=function(a,c,d){return b.encodeQuery(a,d)+(null!==c?"="+b.encodeQuery(c,d):"")};b.addQuery=function(a,c,d){if("object"===typeof c)for(var l in c)t.call(c,l)&&b.addQuery(a,l,c[l]);else if("string"===typeof c)void 0===a[c]?
|
||||
a[c]=d:("string"===typeof a[c]&&(a[c]=[a[c]]),u(d)||(d=[d]),a[c]=(a[c]||[]).concat(d));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");};b.setQuery=function(a,c,d){if("object"===typeof c)for(var l in c)t.call(c,l)&&b.setQuery(a,l,c[l]);else if("string"===typeof c)a[c]=void 0===d?null:d;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");};b.removeQuery=function(a,c,d){var l;if(u(c))for(d=0,l=c.length;d<l;d++)a[c[d]]=
|
||||
void 0;else if("RegExp"===z(c))for(l in a)c.test(l)&&(a[l]=void 0);else if("object"===typeof c)for(l in c)t.call(c,l)&&b.removeQuery(a,l,c[l]);else if("string"===typeof c)void 0!==d?"RegExp"===z(d)?!u(a[c])&&d.test(a[c])?a[c]=void 0:a[c]=g(a[c],d):a[c]!==String(d)||u(d)&&1!==d.length?u(a[c])&&(a[c]=g(a[c],d)):a[c]=void 0:a[c]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");};b.hasQuery=function(a,c,d,l){switch(z(c)){case "String":break;
|
||||
case "RegExp":for(var m in a)if(t.call(a,m)&&c.test(m)&&(void 0===d||b.hasQuery(a,m,d)))return!0;return!1;case "Object":for(var e in c)if(t.call(c,e)&&!b.hasQuery(a,e,c[e]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter");}switch(z(d)){case "Undefined":return c in a;case "Boolean":return a=!(u(a[c])?!a[c].length:!a[c]),d===a;case "Function":return!!d(a[c],c,a);case "Array":return u(a[c])?(l?p:D)(a[c],d):!1;case "RegExp":return u(a[c])?
|
||||
l?p(a[c],d):!1:!(!a[c]||!a[c].match(d));case "Number":d=String(d);case "String":return u(a[c])?l?p(a[c],d):!1:a[c]===d;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");}};b.joinPaths=function(){for(var a=[],c=[],d=0,l=0;l<arguments.length;l++){var m=new b(arguments[l]);a.push(m);m=m.segment();for(var e=0;e<m.length;e++)"string"===typeof m[e]&&c.push(m[e]),m[e]&&d++}if(!c.length||!d)return new b("");c=(new b("")).segment(c);
|
||||
""!==a[0].path()&&"/"!==a[0].path().slice(0,1)||c.path("/"+c.path());return c.normalize()};b.commonPath=function(a,c){var d=Math.min(a.length,c.length),b;for(b=0;b<d;b++)if(a.charAt(b)!==c.charAt(b)){b--;break}if(1>b)return a.charAt(0)===c.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(b)||"/"!==c.charAt(b))b=a.substring(0,b).lastIndexOf("/");return a.substring(0,b+1)};b.withinString=function(a,c,d){d||(d={});var l=d.start||b.findUri.start,m=d.end||b.findUri.end,e=d.trim||b.findUri.trim,g=
|
||||
d.parens||b.findUri.parens,f=/[a-z0-9-]=["']?$/i;for(l.lastIndex=0;;){var h=l.exec(a);if(!h)break;var k=h.index;if(d.ignoreHtml){var p=a.slice(Math.max(k-3,0),k);if(p&&f.test(p))continue}var n=k+a.slice(k).search(m);p=a.slice(k,n);for(n=-1;;){var r=g.exec(p);if(!r)break;n=Math.max(n,r.index+r[0].length)}p=-1<n?p.slice(0,n)+p.slice(n).replace(e,""):p.replace(e,"");p.length<=h[0].length||d.ignore&&d.ignore.test(p)||(n=k+p.length,h=c(p,k,n,a),void 0===h?l.lastIndex=n:(h=String(h),a=a.slice(0,k)+h+a.slice(n),
|
||||
l.lastIndex=k+h.length))}l.lastIndex=0;return a};b.ensureValidHostname=function(a,c){var d=!!a,l=!1;c&&(l=p(b.hostProtocols,c));if(l&&!d)throw new TypeError("Hostname cannot be empty, if protocol is "+c);if(a&&a.match(b.invalid_hostname_characters)){if(!f)throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(f.toASCII(a).match(b.invalid_hostname_characters))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-:_]');
|
||||
}};b.ensureValidPort=function(a){if(a){var c=Number(a);if(!(/^[0-9]+$/.test(c)&&0<c&&65536>c))throw new TypeError('Port "'+a+'" is not a valid port');}};b.noConflict=function(a){if(a)return a={URI:this.noConflict()},k.URITemplate&&"function"===typeof k.URITemplate.noConflict&&(a.URITemplate=k.URITemplate.noConflict()),k.IPv6&&"function"===typeof k.IPv6.noConflict&&(a.IPv6=k.IPv6.noConflict()),k.SecondLevelDomains&&"function"===typeof k.SecondLevelDomains.noConflict&&(a.SecondLevelDomains=k.SecondLevelDomains.noConflict()),
|
||||
a;k.URI===this&&(k.URI=w);return this};e.build=function(a){if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=b.build(this._parts),this._deferred_build=!1;return this};e.clone=function(){return new b(this)};e.valueOf=e.toString=function(){return this.build(!1)._string};e.protocol=r("protocol");e.username=r("username");e.password=r("password");e.hostname=r("hostname");e.port=r("port");e.query=C("query","?");e.fragment=C("fragment","#");e.search=function(a,c){var b=
|
||||
this.query(a,c);return"string"===typeof b&&b.length?"?"+b:b};e.hash=function(a,c){var b=this.fragment(a,c);return"string"===typeof b&&b.length?"#"+b:b};e.pathname=function(a,c){if(void 0===a||!0===a){var d=this._parts.path||(this._parts.hostname?"/":"");return a?(this._parts.urn?b.decodeUrnPath:b.decodePath)(d):d}this._parts.path=this._parts.urn?a?b.recodeUrnPath(a):"":a?b.recodePath(a):"/";this.build(!c);return this};e.path=e.pathname;e.href=function(a,c){var d;if(void 0===a)return this.toString();
|
||||
this._string="";this._parts=b._parts();var l=a instanceof b,e="object"===typeof a&&(a.hostname||a.path||a.pathname);a.nodeName&&(e=b.getDomAttribute(a),a=a[e]||"",e=!1);!l&&e&&void 0!==a.pathname&&(a=a.toString());if("string"===typeof a||a instanceof String)this._parts=b.parse(String(a),this._parts);else if(l||e){l=l?a._parts:a;for(d in l)"query"!==d&&t.call(this._parts,d)&&(this._parts[d]=l[d]);l.query&&this.query(l.query,!1)}else throw new TypeError("invalid input");this.build(!c);return this};
|
||||
e.is=function(a){var c=!1,d=!1,e=!1,m=!1,g=!1,f=!1,k=!1,p=!this._parts.urn;this._parts.hostname&&(p=!1,d=b.ip4_expression.test(this._parts.hostname),e=b.ip6_expression.test(this._parts.hostname),c=d||e,g=(m=!c)&&h&&h.has(this._parts.hostname),f=m&&b.idn_expression.test(this._parts.hostname),k=m&&b.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case "relative":return p;case "absolute":return!p;case "domain":case "name":return m;case "sld":return g;case "ip":return c;case "ip4":case "ipv4":case "inet4":return d;
|
||||
case "ip6":case "ipv6":case "inet6":return e;case "idn":return f;case "url":return!this._parts.urn;case "urn":return!!this._parts.urn;case "punycode":return k}return null};var G=e.protocol,H=e.port,I=e.hostname;e.protocol=function(a,c){if(a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(b.protocol_expression)))throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return G.call(this,a,c)};e.scheme=e.protocol;e.port=function(a,c){if(this._parts.urn)return void 0===
|
||||
a?"":this;void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),b.ensureValidPort(a)));return H.call(this,a,c)};e.hostname=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var d={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==b.parseHost(a,d))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');a=d.hostname;this._parts.preventInvalidHostname&&b.ensureValidHostname(a,this._parts.protocol)}return I.call(this,
|
||||
a,c)};e.origin=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var d=this.protocol();return this.authority()?(d?d+"://":"")+this.authority():""}d=b(a);this.protocol(d.protocol()).authority(d.authority()).build(!c);return this};e.host=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildHost(this._parts):"";if("/"!==b.parseHost(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');
|
||||
this.build(!c);return this};e.authority=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildAuthority(this._parts):"";if("/"!==b.parseAuthority(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!c);return this};e.userinfo=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var d=b.buildUserinfo(this._parts);return d?d.substring(0,d.length-1):d}"@"!==a[a.length-1]&&
|
||||
(a+="@");b.parseUserinfo(a,this._parts);this.build(!c);return this};e.resource=function(a,c){if(void 0===a)return this.path()+this.search()+this.hash();var d=b.parse(a);this._parts.path=d.path;this._parts.query=d.query;this._parts.fragment=d.fragment;this.build(!c);return this};e.subdomain=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,
|
||||
d)||""}d=this._parts.hostname.length-this.domain().length;d=this._parts.hostname.substring(0,d);d=new RegExp("^"+q(d));a&&"."!==a.charAt(a.length-1)&&(a+=".");if(-1!==a.indexOf(":"))throw new TypeError("Domains cannot contain colons");a&&b.ensureValidHostname(a,this._parts.protocol);this._parts.hostname=this._parts.hostname.replace(d,a);this.build(!c);return this};e.domain=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||
|
||||
this.is("IP"))return"";var d=this._parts.hostname.match(/\./g);if(d&&2>d.length)return this._parts.hostname;d=this._parts.hostname.length-this.tld(c).length-1;d=this._parts.hostname.lastIndexOf(".",d-1)+1;return this._parts.hostname.substring(d)||""}if(!a)throw new TypeError("cannot set domain empty");if(-1!==a.indexOf(":"))throw new TypeError("Domains cannot contain colons");b.ensureValidHostname(a,this._parts.protocol);!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(d=new RegExp(q(this.domain())+
|
||||
"$"),this._parts.hostname=this._parts.hostname.replace(d,a));this.build(!c);return this};e.tld=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var b=this._parts.hostname.lastIndexOf(".");b=this._parts.hostname.substring(b+1);return!0!==c&&h&&h.list[b.toLowerCase()]?h.get(this._parts.hostname)||b:b}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(h&&h.is(a))b=new RegExp(q(this.tld())+"$"),this._parts.hostname=
|
||||
this._parts.hostname.replace(b,a);else throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");b=new RegExp(q(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(b,a)}else throw new TypeError("cannot set TLD empty");this.build(!c);return this};e.directory=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&
|
||||
!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var d=this._parts.path.length-this.filename().length-1;d=this._parts.path.substring(0,d)||(this._parts.hostname?"/":"");return a?b.decodePath(d):d}d=this._parts.path.length-this.filename().length;d=this._parts.path.substring(0,d);d=new RegExp("^"+q(d));this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a));a&&"/"!==a.charAt(a.length-1)&&(a+="/");a=b.recodePath(a);this._parts.path=this._parts.path.replace(d,a);this.build(!c);
|
||||
return this};e.filename=function(a,c){if(this._parts.urn)return void 0===a?"":this;if("string"!==typeof a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this._parts.path.lastIndexOf("/");d=this._parts.path.substring(d+1);return a?b.decodePathSegment(d):d}d=!1;"/"===a.charAt(0)&&(a=a.substring(1));a.match(/\.?\//)&&(d=!0);var e=new RegExp(q(this.filename())+"$");a=b.recodePath(a);this._parts.path=this._parts.path.replace(e,a);d?this.normalizePath(c):this.build(!c);return this};e.suffix=
|
||||
function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this.filename(),e=d.lastIndexOf(".");if(-1===e)return"";d=d.substring(e+1);d=/^[a-z0-9%]+$/i.test(d)?d:"";return a?b.decodePathSegment(d):d}"."===a.charAt(0)&&(a=a.substring(1));if(d=this.suffix())e=a?new RegExp(q(d)+"$"):new RegExp(q("."+d)+"$");else{if(!a)return this;this._parts.path+="."+b.recodePath(a)}e&&(a=b.recodePath(a),this._parts.path=this._parts.path.replace(e,
|
||||
a));this.build(!c);return this};e.segment=function(a,c,b){var d=this._parts.urn?":":"/",e=this.path(),g="/"===e.substring(0,1);e=e.split(d);void 0!==a&&"number"!==typeof a&&(b=c,c=a,a=void 0);if(void 0!==a&&"number"!==typeof a)throw Error('Bad segment "'+a+'", must be 0-based integer');g&&e.shift();0>a&&(a=Math.max(e.length+a,0));if(void 0===c)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(u(c)){e=[];a=0;for(var f=c.length;a<f;a++)if(c[a].length||e.length&&e[e.length-1].length)e.length&&!e[e.length-
|
||||
1].length&&e.pop(),e.push(A(c[a]))}else{if(c||"string"===typeof c)c=A(c),""===e[e.length-1]?e[e.length-1]=c:e.push(c)}else c?e[a]=A(c):e.splice(a,1);g&&e.unshift("");return this.path(e.join(d),b)};e.segmentCoded=function(a,c,d){var e;"number"!==typeof a&&(d=c,c=a,a=void 0);if(void 0===c){a=this.segment(a,c,d);if(u(a)){var g=0;for(e=a.length;g<e;g++)a[g]=b.decode(a[g])}else a=void 0!==a?b.decode(a):void 0;return a}if(u(c))for(g=0,e=c.length;g<e;g++)c[g]=b.encode(c[g]);else c="string"===typeof c||c instanceof
|
||||
String?b.encode(c):c;return this.segment(a,c,d)};var J=e.query;e.query=function(a,c){if(!0===a)return b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"===typeof a){var d=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace),e=a.call(this,d);this._parts.query=b.buildQuery(e||d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);this.build(!c);return this}return void 0!==a&&"string"!==typeof a?(this._parts.query=b.buildQuery(a,this._parts.duplicateQueryParameters,
|
||||
this._parts.escapeQuerySpace),this.build(!c),this):J.call(this,a,c)};e.setQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"===typeof a||a instanceof String)e[a]=void 0!==c?c:null;else if("object"===typeof a)for(var g in a)t.call(a,g)&&(e[g]=a[g]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&
|
||||
(d=c);this.build(!d);return this};e.addQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);b.addQuery(e,a,void 0===c?null:c);this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.removeQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);b.removeQuery(e,a,c);this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,
|
||||
this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.hasQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return b.hasQuery(e,a,c,d)};e.setSearch=e.setQuery;e.addSearch=e.addQuery;e.removeSearch=e.removeQuery;e.hasSearch=e.hasQuery;e.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()};
|
||||
e.normalizeProtocol=function(a){"string"===typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a));return this};e.normalizeHostname=function(a){this._parts.hostname&&(this.is("IDN")&&f?this._parts.hostname=f.toASCII(this._parts.hostname):this.is("IPv6")&&n&&(this._parts.hostname=n.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!a));return this};e.normalizePort=function(a){"string"===typeof this._parts.protocol&&
|
||||
this._parts.port===b.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a));return this};e.normalizePath=function(a){var c=this._parts.path;if(!c)return this;if(this._parts.urn)return this._parts.path=b.recodeUrnPath(this._parts.path),this.build(!a),this;if("/"===this._parts.path)return this;c=b.recodePath(c);var d="";if("/"!==c.charAt(0)){var e=!0;c="/"+c}if("/.."===c.slice(-3)||"/."===c.slice(-2))c+="/";c=c.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");e&&(d=c.substring(1).match(/^(\.\.\/)+/)||
|
||||
"")&&(d=d[0]);for(;;){var g=c.search(/\/\.\.(\/|$)/);if(-1===g)break;else if(0===g){c=c.substring(3);continue}var f=c.substring(0,g).lastIndexOf("/");-1===f&&(f=g);c=c.substring(0,f)+c.substring(g+3)}e&&this.is("relative")&&(c=d+c.substring(1));this._parts.path=c;this.build(!a);return this};e.normalizePathname=e.normalizePath;e.normalizeQuery=function(a){"string"===typeof this._parts.query&&(this._parts.query.length?this.query(b.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=
|
||||
null,this.build(!a));return this};e.normalizeFragment=function(a){this._parts.fragment||(this._parts.fragment=null,this.build(!a));return this};e.normalizeSearch=e.normalizeQuery;e.normalizeHash=e.normalizeFragment;e.iso8859=function(){var a=b.encode,c=b.decode;b.encode=escape;b.decode=decodeURIComponent;try{this.normalize()}finally{b.encode=a,b.decode=c}return this};e.unicode=function(){var a=b.encode,c=b.decode;b.encode=E;b.decode=unescape;try{this.normalize()}finally{b.encode=a,b.decode=c}return this};
|
||||
e.readable=function(){var a=this.clone();a.username("").password("").normalize();var c="";a._parts.protocol&&(c+=a._parts.protocol+"://");a._parts.hostname&&(a.is("punycode")&&f?(c+=f.toUnicode(a._parts.hostname),a._parts.port&&(c+=":"+a._parts.port)):c+=a.host());a._parts.hostname&&a._parts.path&&"/"!==a._parts.path.charAt(0)&&(c+="/");c+=a.path(!0);if(a._parts.query){for(var d="",e=0,g=a._parts.query.split("&"),h=g.length;e<h;e++){var k=(g[e]||"").split("=");d+="&"+b.decodeQuery(k[0],this._parts.escapeQuerySpace).replace(/&/g,
|
||||
"%26");void 0!==k[1]&&(d+="="+b.decodeQuery(k[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}c+="?"+d.substring(1)}return c+=b.decodeQuery(a.hash(),!0)};e.absoluteTo=function(a){var c=this.clone(),d=["protocol","username","password","hostname","port"],e,g;if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a instanceof b||(a=new b(a));if(c._parts.protocol)return c;c._parts.protocol=a._parts.protocol;if(this._parts.hostname)return c;for(e=0;g=d[e];e++)c._parts[g]=
|
||||
a._parts[g];c._parts.path?(".."===c._parts.path.substring(-2)&&(c._parts.path+="/"),"/"!==c.path().charAt(0)&&(d=(d=a.directory())?d:0===a.path().indexOf("/")?"/":"",c._parts.path=(d?d+"/":"")+c._parts.path,c.normalizePath())):(c._parts.path=a._parts.path,c._parts.query||(c._parts.query=a._parts.query));c.build();return c};e.relativeTo=function(a){var c=this.clone().normalize();if(c._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a=(new b(a)).normalize();var d=
|
||||
c._parts;var e=a._parts;var g=c.path();a=a.path();if("/"!==g.charAt(0))throw Error("URI is already relative");if("/"!==a.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");d.protocol===e.protocol&&(d.protocol=null);if(d.username===e.username&&d.password===e.password&&null===d.protocol&&null===d.username&&null===d.password&&d.hostname===e.hostname&&d.port===e.port)d.hostname=null,d.port=null;else return c.build();if(g===a)return d.path="",c.build();g=b.commonPath(g,a);
|
||||
if(!g)return c.build();e=e.path.substring(g.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");d.path=e+d.path.substring(g.length)||"./";return c.build()};e.equals=function(a){var c=this.clone(),d=new b(a);a={};var e;c.normalize();d.normalize();if(c.toString()===d.toString())return!0;var g=c.query();var f=d.query();c.query("");d.query("");if(c.toString()!==d.toString()||g.length!==f.length)return!1;c=b.parseQuery(g,this._parts.escapeQuerySpace);f=b.parseQuery(f,this._parts.escapeQuerySpace);for(e in c)if(t.call(c,
|
||||
e)){if(!u(c[e])){if(c[e]!==f[e])return!1}else if(!D(c[e],f[e]))return!1;a[e]=!0}for(e in f)if(t.call(f,e)&&!a[e])return!1;return!0};e.preventInvalidHostname=function(a){this._parts.preventInvalidHostname=!!a;return this};e.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};e.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=!!a;return this};return b});
|
||||
(function(f,n){"object"===typeof module&&module.exports?module.exports=n(require("./URI")):"function"===typeof define&&define.amd?define(["./URI"],n):f.URITemplate=n(f.URI,f)})(this,function(f,n){function h(b){if(h._cache[b])return h._cache[b];if(!(this instanceof h))return new h(b);this.expression=b;h._cache[b]=this;return this}function k(b){this.data=b;this.cache={}}var b=n&&n.URITemplate,q=Object.prototype.hasOwnProperty,z=h.prototype,u={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,
|
||||
encode:"encode"},"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},
|
||||
"&":{prefix:"&",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};h._cache={};h.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g;h.VARIABLE_PATTERN=/^([^*:.](?:\.?[^*:.])*)((\*)|:(\d+))?$/;h.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_.]/;h.LITERAL_PATTERN=/[<>{}"`^| \\]/;h.expand=function(b,f,k){var g=u[b.operator],p=g.named?"Named":"Unnamed";b=b.variables;var n=[],r,q;for(q=0;r=b[q];q++){var w=f.get(r.name);if(0===w.type&&k&&k.strict)throw Error('Missing expansion value for variable "'+
|
||||
r.name+'"');if(w.val.length){if(1<w.type&&r.maxlength)throw Error('Invalid expression: Prefix modifier not applicable to variable "'+r.name+'"');n.push(h["expand"+p](w,g,r.explode,r.explode&&g.separator||",",r.maxlength,r.name))}else w.type&&n.push("")}return n.length?g.prefix+n.join(g.separator):""};h.expandNamed=function(b,h,k,n,q,u){var g="",p=h.encode;h=h.empty_name_separator;var A=!b[p].length,e=2===b.type?"":f[p](u),t;var y=0;for(t=b.val.length;y<t;y++){if(q){var v=f[p](b.val[y][1].substring(0,
|
||||
q));2===b.type&&(e=f[p](b.val[y][0].substring(0,q)))}else A?(v=f[p](b.val[y][1]),2===b.type?(e=f[p](b.val[y][0]),b[p].push([e,v])):b[p].push([void 0,v])):(v=b[p][y][1],2===b.type&&(e=b[p][y][0]));g&&(g+=n);k?g+=e+(h||v?"=":"")+v:(y||(g+=f[p](u)+(h||v?"=":"")),2===b.type&&(g+=e+","),g+=v)}return g};h.expandUnnamed=function(b,h,k,n,q){var g="",p=h.encode;h=h.empty_name_separator;var A=!b[p].length,w;var e=0;for(w=b.val.length;e<w;e++){if(q)var t=f[p](b.val[e][1].substring(0,q));else A?(t=f[p](b.val[e][1]),
|
||||
b[p].push([2===b.type?f[p](b.val[e][0]):void 0,t])):t=b[p][e][1];g&&(g+=n);if(2===b.type){var u=q?f[p](b.val[e][0].substring(0,q)):b[p][e][0];g+=u;g=k?g+(h||t?"=":""):g+","}g+=t}return g};h.noConflict=function(){n.URITemplate===h&&(n.URITemplate=b);return h};z.expand=function(b,f){var g="";this.parts&&this.parts.length||this.parse();b instanceof k||(b=new k(b));for(var p=0,n=this.parts.length;p<n;p++)g+="string"===typeof this.parts[p]?this.parts[p]:h.expand(this.parts[p],b,f);return g};z.parse=function(){var b=
|
||||
this.expression,f=h.EXPRESSION_PATTERN,k=h.VARIABLE_PATTERN,n=h.VARIABLE_NAME_PATTERN,q=h.LITERAL_PATTERN,z=[],r=0,C=function(b){if(b.match(q))throw Error('Invalid Literal "'+b+'"');return b};for(f.lastIndex=0;;){var w=f.exec(b);if(null===w){z.push(C(b.substring(r)));break}else z.push(C(b.substring(r,w.index))),r=w.index+w[0].length;if(!u[w[1]])throw Error('Unknown Operator "'+w[1]+'" in "'+w[0]+'"');if(!w[3])throw Error('Unclosed Expression "'+w[0]+'"');var e=w[2].split(",");for(var t=0,y=e.length;t<
|
||||
y;t++){var v=e[t].match(k);if(null===v)throw Error('Invalid Variable "'+e[t]+'" in "'+w[0]+'"');if(v[1].match(n))throw Error('Invalid Variable Name "'+v[1]+'" in "'+w[0]+'"');e[t]={name:v[1],explode:!!v[3],maxlength:v[4]&&parseInt(v[4],10)}}if(!e.length)throw Error('Expression Missing Variable(s) "'+w[0]+'"');z.push({expression:w[0],operator:w[1],variables:e})}z.length||z.push(C(b));this.parts=z;return this};k.prototype.get=function(b){var f=this.data,g={type:0,val:[],encode:[],encodeReserved:[]};
|
||||
if(void 0!==this.cache[b])return this.cache[b];this.cache[b]=g;f="[object Function]"===String(Object.prototype.toString.call(f))?f(b):"[object Function]"===String(Object.prototype.toString.call(f[b]))?f[b](b):f[b];if(void 0!==f&&null!==f)if("[object Array]"===String(Object.prototype.toString.call(f))){var h=0;for(b=f.length;h<b;h++)void 0!==f[h]&&null!==f[h]&&g.val.push([void 0,String(f[h])]);g.val.length&&(g.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(f))){for(h in f)q.call(f,
|
||||
h)&&void 0!==f[h]&&null!==f[h]&&g.val.push([h,String(f[h])]);g.val.length&&(g.type=2)}else g.type=1,g.val.push([void 0,String(f)]);return g};f.expand=function(b,k){var g=(new h(b)).expand(k);return new f(g)};return h});
|
||||
516
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/URITemplate.js
vendored
Normal file
516
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/URITemplate.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
234
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/jquery.URI.js
vendored
Normal file
234
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/jquery.URI.js
vendored
Normal file
@@ -0,0 +1,234 @@
|
||||
/*!
|
||||
* URI.js - Mutating URLs
|
||||
* jQuery Plugin
|
||||
*
|
||||
* Version: 1.19.1
|
||||
*
|
||||
* Author: Rodney Rehm
|
||||
* Web: http://medialize.github.io/URI.js/jquery-uri-plugin.html
|
||||
*
|
||||
* Licensed under
|
||||
* MIT License http://www.opensource.org/licenses/mit-license
|
||||
*
|
||||
*/
|
||||
(function (root, factory) {
|
||||
'use strict';
|
||||
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
// Node
|
||||
module.exports = factory(require('jquery'), require('./URI'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery', './URI'], factory);
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.jQuery, root.URI);
|
||||
}
|
||||
}(this, function ($, URI) {
|
||||
'use strict';
|
||||
// FIXME: v2.0.0 renamce non-camelCase properties to uppercase
|
||||
/*jshint camelcase: false */
|
||||
|
||||
var comparable = {};
|
||||
var compare = {
|
||||
// equals
|
||||
'=': function(value, target) {
|
||||
return value === target;
|
||||
},
|
||||
// ~= translates to value.match((?:^|\s)target(?:\s|$)) which is useless for URIs
|
||||
// |= translates to value.match((?:\b)target(?:-|\s|$)) which is useless for URIs
|
||||
// begins with
|
||||
'^=': function(value, target) {
|
||||
return !!(value + '').match(new RegExp('^' + escapeRegEx(target), 'i'));
|
||||
},
|
||||
// ends with
|
||||
'$=': function(value, target) {
|
||||
return !!(value + '').match(new RegExp(escapeRegEx(target) + '$', 'i'));
|
||||
},
|
||||
// contains
|
||||
'*=': function(value, target, property) {
|
||||
if (property === 'directory') {
|
||||
// add trailing slash so /dir/ will match the deep-end as well
|
||||
value += '/';
|
||||
}
|
||||
|
||||
return !!(value + '').match(new RegExp(escapeRegEx(target), 'i'));
|
||||
},
|
||||
'equals:': function(uri, target) {
|
||||
return uri.equals(target);
|
||||
},
|
||||
'is:': function(uri, target) {
|
||||
return uri.is(target);
|
||||
}
|
||||
};
|
||||
|
||||
function escapeRegEx(string) {
|
||||
// https://github.com/medialize/URI.js/commit/85ac21783c11f8ccab06106dba9735a31a86924d#commitcomment-821963
|
||||
return string.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
|
||||
}
|
||||
|
||||
function getUriProperty(elem) {
|
||||
var nodeName = elem.nodeName.toLowerCase();
|
||||
var property = URI.domAttributes[nodeName];
|
||||
if (nodeName === 'input' && elem.type !== 'image') {
|
||||
// compensate ambiguous <input> that is not an image
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// NOTE: as we use a static mapping from element to attribute,
|
||||
// the HTML5 attribute issue should not come up again
|
||||
// https://github.com/medialize/URI.js/issues/69
|
||||
return property;
|
||||
}
|
||||
|
||||
function generateAccessor(property) {
|
||||
return {
|
||||
get: function(elem) {
|
||||
return $(elem).uri()[property]();
|
||||
},
|
||||
set: function(elem, value) {
|
||||
$(elem).uri()[property](value);
|
||||
return value;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// populate lookup table and register $.attr('uri:accessor') handlers
|
||||
$.each('origin authority directory domain filename fragment hash host hostname href password path pathname port protocol query resource scheme search subdomain suffix tld username'.split(' '), function(k, v) {
|
||||
comparable[v] = true;
|
||||
$.attrHooks['uri:' + v] = generateAccessor(v);
|
||||
});
|
||||
|
||||
// pipe $.attr('src') and $.attr('href') through URI.js
|
||||
var _attrHooks = {
|
||||
get: function(elem) {
|
||||
return $(elem).uri();
|
||||
},
|
||||
set: function(elem, value) {
|
||||
return $(elem).uri().href(value).toString();
|
||||
}
|
||||
};
|
||||
$.each(['src', 'href', 'action', 'uri', 'cite'], function(k, v) {
|
||||
$.attrHooks[v] = {
|
||||
set: _attrHooks.set
|
||||
};
|
||||
});
|
||||
$.attrHooks.uri.get = _attrHooks.get;
|
||||
|
||||
// general URI accessor
|
||||
$.fn.uri = function(uri) {
|
||||
var $this = this.first();
|
||||
var elem = $this.get(0);
|
||||
var property = getUriProperty(elem);
|
||||
|
||||
if (!property) {
|
||||
throw new Error('Element "' + elem.nodeName + '" does not have either property: href, src, action, cite');
|
||||
}
|
||||
|
||||
if (uri !== undefined) {
|
||||
var old = $this.data('uri');
|
||||
if (old) {
|
||||
return old.href(uri);
|
||||
}
|
||||
|
||||
if (!(uri instanceof URI)) {
|
||||
uri = URI(uri || '');
|
||||
}
|
||||
} else {
|
||||
uri = $this.data('uri');
|
||||
if (uri) {
|
||||
return uri;
|
||||
} else {
|
||||
uri = URI($this.attr(property) || '');
|
||||
}
|
||||
}
|
||||
|
||||
uri._dom_element = elem;
|
||||
uri._dom_attribute = property;
|
||||
uri.normalize();
|
||||
$this.data('uri', uri);
|
||||
return uri;
|
||||
};
|
||||
|
||||
// overwrite URI.build() to update associated DOM element if necessary
|
||||
URI.prototype.build = function(deferBuild) {
|
||||
if (this._dom_element) {
|
||||
// cannot defer building when hooked into a DOM element
|
||||
this._string = URI.build(this._parts);
|
||||
this._deferred_build = false;
|
||||
this._dom_element.setAttribute(this._dom_attribute, this._string);
|
||||
this._dom_element[this._dom_attribute] = this._string;
|
||||
} else if (deferBuild === true) {
|
||||
this._deferred_build = true;
|
||||
} else if (deferBuild === undefined || this._deferred_build) {
|
||||
this._string = URI.build(this._parts);
|
||||
this._deferred_build = false;
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
// add :uri() pseudo class selector to sizzle
|
||||
var uriSizzle;
|
||||
var pseudoArgs = /^([a-zA-Z]+)\s*([\^\$*]?=|:)\s*(['"]?)(.+)\3|^\s*([a-zA-Z0-9]+)\s*$/;
|
||||
function uriPseudo (elem, text) {
|
||||
var match, property, uri;
|
||||
|
||||
// skip anything without src|href|action and bad :uri() syntax
|
||||
if (!getUriProperty(elem) || !text) {
|
||||
return false;
|
||||
}
|
||||
|
||||
match = text.match(pseudoArgs);
|
||||
|
||||
if (!match || (!match[5] && match[2] !== ':' && !compare[match[2]])) {
|
||||
// abort because the given selector cannot be executed
|
||||
// filers seem to fail silently
|
||||
return false;
|
||||
}
|
||||
|
||||
uri = $(elem).uri();
|
||||
|
||||
if (match[5]) {
|
||||
return uri.is(match[5]);
|
||||
} else if (match[2] === ':') {
|
||||
property = match[1].toLowerCase() + ':';
|
||||
if (!compare[property]) {
|
||||
// filers seem to fail silently
|
||||
return false;
|
||||
}
|
||||
|
||||
return compare[property](uri, match[4]);
|
||||
} else {
|
||||
property = match[1].toLowerCase();
|
||||
if (!comparable[property]) {
|
||||
// filers seem to fail silently
|
||||
return false;
|
||||
}
|
||||
|
||||
return compare[match[2]](uri[property](), match[4], property);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($.expr.createPseudo) {
|
||||
// jQuery >= 1.8
|
||||
uriSizzle = $.expr.createPseudo(function (text) {
|
||||
return function (elem) {
|
||||
return uriPseudo(elem, text);
|
||||
};
|
||||
});
|
||||
} else {
|
||||
// jQuery < 1.8
|
||||
uriSizzle = function (elem, i, match) {
|
||||
return uriPseudo(elem, match[3]);
|
||||
};
|
||||
}
|
||||
|
||||
$.expr[':'].uri = uriSizzle;
|
||||
|
||||
// extending existing object rather than defining something new,
|
||||
// return jQuery anyway
|
||||
return $;
|
||||
}));
|
||||
7
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/jquery.URI.min.js
vendored
Normal file
7
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/jquery.URI.min.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/*! URI.js v1.19.1 http://medialize.github.io/URI.js/ */
|
||||
/* build contains: jquery.URI.js */
|
||||
(function(d,e){"object"===typeof module&&module.exports?module.exports=e(require("jquery"),require("./URI")):"function"===typeof define&&define.amd?define(["jquery","./URI"],e):e(d.jQuery,d.URI)})(this,function(d,e){function h(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function k(a){var b=a.nodeName.toLowerCase();if("input"!==b||"image"===a.type)return e.domAttributes[b]}function n(a){return{get:function(b){return d(b).uri()[a]()},set:function(b,c){d(b).uri()[a](c);return c}}}function l(a,
|
||||
b){if(!k(a)||!b)return!1;var c=b.match(p);if(!c||!c[5]&&":"!==c[2]&&!g[c[2]])return!1;var e=d(a).uri();if(c[5])return e.is(c[5]);if(":"===c[2]){var f=c[1].toLowerCase()+":";return g[f]?g[f](e,c[4]):!1}f=c[1].toLowerCase();return m[f]?g[c[2]](e[f](),c[4],f):!1}var m={},g={"=":function(a,b){return a===b},"^=":function(a,b){return!!(a+"").match(new RegExp("^"+h(b),"i"))},"$=":function(a,b){return!!(a+"").match(new RegExp(h(b)+"$","i"))},"*=":function(a,b,c){"directory"===c&&(a+="/");return!!(a+"").match(new RegExp(h(b),
|
||||
"i"))},"equals:":function(a,b){return a.equals(b)},"is:":function(a,b){return a.is(b)}};d.each("origin authority directory domain filename fragment hash host hostname href password path pathname port protocol query resource scheme search subdomain suffix tld username".split(" "),function(a,b){m[b]=!0;d.attrHooks["uri:"+b]=n(b)});var q=function(a,b){return d(a).uri().href(b).toString()};d.each(["src","href","action","uri","cite"],function(a,b){d.attrHooks[b]={set:q}});d.attrHooks.uri.get=function(a){return d(a).uri()};
|
||||
d.fn.uri=function(a){var b=this.first(),c=b.get(0),d=k(c);if(!d)throw Error('Element "'+c.nodeName+'" does not have either property: href, src, action, cite');if(void 0!==a){var f=b.data("uri");if(f)return f.href(a);a instanceof e||(a=e(a||""))}else{if(a=b.data("uri"))return a;a=e(b.attr(d)||"")}a._dom_element=c;a._dom_attribute=d;a.normalize();b.data("uri",a);return a};e.prototype.build=function(a){if(this._dom_element)this._string=e.build(this._parts),this._deferred_build=!1,this._dom_element.setAttribute(this._dom_attribute,
|
||||
this._string),this._dom_element[this._dom_attribute]=this._string;else if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=e.build(this._parts),this._deferred_build=!1;return this};var p=/^([a-zA-Z]+)\s*([\^\$*]?=|:)\s*(['"]?)(.+)\3|^\s*([a-zA-Z0-9]+)\s*$/;var r=d.expr.createPseudo?d.expr.createPseudo(function(a){return function(b){return l(b,a)}}):function(a,b,c){return l(a,c[3])};d.expr[":"].uri=r;return d});
|
||||
533
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/punycode.js
vendored
Normal file
533
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/src/punycode.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
26
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/index.html
vendored
Normal file
26
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/index.html
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>URI Test Suite</title>
|
||||
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
|
||||
<link rel="stylesheet" href="qunit/qunit-composite.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="qunit/qunit.js"></script>
|
||||
<script type="text/javascript" src="qunit/qunit-composite.js"></script>
|
||||
<script>
|
||||
QUnit.testSuites([
|
||||
"test.URI.html",
|
||||
"test.jQuery-1.10.html",
|
||||
"test.jQuery-1.9.html",
|
||||
"test.jQuery-1.8.html",
|
||||
"test.jQuery-1.7.html",
|
||||
"test.fragmentQuery.html",
|
||||
"test.fragmentURI.html"
|
||||
]);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
</html>
|
||||
7
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/pre_libs.js
vendored
Normal file
7
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/pre_libs.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/*global window */
|
||||
// FIXME: v2.0.0 renamce non-camelCase properties to uppercase
|
||||
/*jshint camelcase: false */
|
||||
window.URI = window.URI_pre_lib = 'original URI, before loading URI.js library';
|
||||
window.URITemplate = window.URITemplate_pre_lib = 'original URITemplate, before loading URI.js library';
|
||||
window.IPv6 = window.IPv6_pre_lib = 'original IPv6, before loading URI.js library';
|
||||
window.SecondLevelDomains = window.SecondLevelDomains_pre_lib = 'original SecondLevelDomains, before loading URI.js library';
|
||||
13
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/qunit/qunit-composite.css
vendored
Normal file
13
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/qunit/qunit-composite.css
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
.qunit-composite-suite {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-width: 1px 0 0;
|
||||
height: 45%;
|
||||
width: 100%;
|
||||
|
||||
background: #fff;
|
||||
}
|
||||
167
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/qunit/qunit-composite.js
vendored
Normal file
167
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/qunit/qunit-composite.js
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
/**
|
||||
* JUnit reporter for QUnit v1.0.1
|
||||
*
|
||||
* https://github.com/jquery/qunit-composite
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* https://jquery.org/license/
|
||||
*/
|
||||
(function( QUnit ) {
|
||||
var iframe, hasBound, addClass,
|
||||
modules = 1,
|
||||
executingComposite = false;
|
||||
|
||||
// TODO: Kill this fallback method once QUnit 1.12 is released
|
||||
addClass = typeof QUnit.addClass === "function" ?
|
||||
QUnit.addClass :
|
||||
(function() {
|
||||
var hasClass = typeof QUnit.hasClass === "function" ?
|
||||
QUnit.hasClass :
|
||||
function hasClass( elem, name ) {
|
||||
return ( " " + elem.className + " " ).indexOf( " " + name + " " ) > -1;
|
||||
};
|
||||
return function addClass( elem, name ) {
|
||||
if ( !hasClass( elem, name ) ) {
|
||||
elem.className += ( elem.className ? " " : "" ) + name;
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
function runSuite( suite ) {
|
||||
var path;
|
||||
|
||||
if ( QUnit.is( "object", suite ) ) {
|
||||
path = suite.path;
|
||||
suite = suite.name;
|
||||
} else {
|
||||
path = suite;
|
||||
}
|
||||
|
||||
QUnit.asyncTest( suite, function() {
|
||||
iframe.setAttribute( "src", path );
|
||||
// QUnit.start is called from the child iframe's QUnit.done hook.
|
||||
});
|
||||
}
|
||||
|
||||
function initIframe() {
|
||||
var iframeWin,
|
||||
body = document.body;
|
||||
|
||||
function onIframeLoad() {
|
||||
var moduleName, testName,
|
||||
count = 0;
|
||||
|
||||
if ( !iframe.src ) {
|
||||
return;
|
||||
}
|
||||
|
||||
iframeWin.QUnit.moduleStart(function( data ) {
|
||||
// Capture module name for messages
|
||||
moduleName = data.name;
|
||||
});
|
||||
|
||||
iframeWin.QUnit.testStart(function( data ) {
|
||||
// Capture test name for messages
|
||||
testName = data.name;
|
||||
});
|
||||
iframeWin.QUnit.testDone(function() {
|
||||
testName = undefined;
|
||||
});
|
||||
|
||||
iframeWin.QUnit.log(function( data ) {
|
||||
if (testName === undefined) {
|
||||
return;
|
||||
}
|
||||
// Pass all test details through to the main page
|
||||
var message = ( moduleName ? moduleName + ": " : "" ) + testName + ": " + ( data.message || ( data.result ? "okay" : "failed" ) );
|
||||
expect( ++count );
|
||||
QUnit.push( data.result, data.actual, data.expected, message );
|
||||
});
|
||||
|
||||
// Continue the outer test when the iframe's test is done
|
||||
iframeWin.QUnit.done( QUnit.start );
|
||||
}
|
||||
|
||||
iframe = document.createElement( "iframe" );
|
||||
iframe.className = "qunit-composite-suite";
|
||||
body.appendChild( iframe );
|
||||
|
||||
QUnit.addEvent( iframe, "load", onIframeLoad );
|
||||
|
||||
iframeWin = iframe.contentWindow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} [name] Module name to group these test suites.
|
||||
* @param {Array} suites List of suites where each suite
|
||||
* may either be a string (path to the html test page),
|
||||
* or an object with a path and name property.
|
||||
*/
|
||||
QUnit.testSuites = function( name, suites ) {
|
||||
var i, suitesLen;
|
||||
|
||||
if ( arguments.length === 1 ) {
|
||||
suites = name;
|
||||
name = "Composition #" + modules++;
|
||||
}
|
||||
suitesLen = suites.length;
|
||||
|
||||
if ( !hasBound ) {
|
||||
hasBound = true;
|
||||
QUnit.begin( initIframe );
|
||||
|
||||
// TODO: Would be better to use something like QUnit.once( 'moduleDone' )
|
||||
// after the last test suite.
|
||||
QUnit.moduleDone( function () {
|
||||
executingComposite = false;
|
||||
} );
|
||||
|
||||
QUnit.done(function() {
|
||||
iframe.style.display = "none";
|
||||
});
|
||||
}
|
||||
|
||||
QUnit.module( name, {
|
||||
setup: function () {
|
||||
executingComposite = true;
|
||||
}
|
||||
});
|
||||
|
||||
for ( i = 0; i < suitesLen; i++ ) {
|
||||
runSuite( suites[ i ] );
|
||||
}
|
||||
};
|
||||
|
||||
QUnit.testDone(function() {
|
||||
if ( !executingComposite ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var i, len,
|
||||
current = QUnit.id( this.config.current.id ),
|
||||
children = current.children,
|
||||
src = iframe.src;
|
||||
|
||||
QUnit.addEvent( current, "dblclick", function( e ) {
|
||||
var target = e && e.target ? e.target : window.event.srcElement;
|
||||
if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
|
||||
target = target.parentNode;
|
||||
}
|
||||
if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
|
||||
window.location = src;
|
||||
}
|
||||
});
|
||||
|
||||
// Undo QUnit's auto-expansion for bad tests
|
||||
for ( i = 0, len = children.length; i < len; i++ ) {
|
||||
if ( children[ i ].nodeName.toLowerCase() === "ol" ) {
|
||||
addClass( children[ i ], "qunit-collapsed" );
|
||||
}
|
||||
}
|
||||
|
||||
// Update Rerun link to point to the standalone test suite page
|
||||
current.getElementsByTagName( "a" )[ 0 ].href = src;
|
||||
});
|
||||
|
||||
})( QUnit );
|
||||
244
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/qunit/qunit.css
vendored
Normal file
244
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/qunit/qunit.css
vendored
Normal file
@@ -0,0 +1,244 @@
|
||||
/**
|
||||
* QUnit v1.12.0 - A JavaScript Unit Testing Framework
|
||||
*
|
||||
* http://qunitjs.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-tests { font-size: smaller; }
|
||||
|
||||
|
||||
/** Resets */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/** Header */
|
||||
|
||||
#qunit-header {
|
||||
padding: 0.5em 0 0.5em 1em;
|
||||
|
||||
color: #8699a4;
|
||||
background-color: #0d3349;
|
||||
|
||||
font-size: 1.5em;
|
||||
line-height: 1em;
|
||||
font-weight: normal;
|
||||
|
||||
border-radius: 5px 5px 0 0;
|
||||
-moz-border-radius: 5px 5px 0 0;
|
||||
-webkit-border-top-right-radius: 5px;
|
||||
-webkit-border-top-left-radius: 5px;
|
||||
}
|
||||
|
||||
#qunit-header a {
|
||||
text-decoration: none;
|
||||
color: #c2ccd1;
|
||||
}
|
||||
|
||||
#qunit-header a:hover,
|
||||
#qunit-header a:focus {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar label {
|
||||
display: inline-block;
|
||||
padding: 0 .5em 0 .1em;
|
||||
}
|
||||
|
||||
#qunit-banner {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0.5em 0 0.5em 2em;
|
||||
color: #5E740B;
|
||||
background-color: #eee;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 0 0.5em 2.5em;
|
||||
background-color: #2b81af;
|
||||
color: #fff;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-container {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/** Tests: Pass/Fail */
|
||||
|
||||
#qunit-tests {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests li {
|
||||
padding: 0.4em 0.5em 0.4em 2.5em;
|
||||
border-bottom: 1px solid #fff;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests li strong {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#qunit-tests li a {
|
||||
padding: 0.5em;
|
||||
color: #c2ccd1;
|
||||
text-decoration: none;
|
||||
}
|
||||
#qunit-tests li a:hover,
|
||||
#qunit-tests li a:focus {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#qunit-tests li .runtime {
|
||||
float: right;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.qunit-assert-list {
|
||||
margin-top: 0.5em;
|
||||
padding: 0.5em;
|
||||
|
||||
background-color: #fff;
|
||||
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
}
|
||||
|
||||
.qunit-collapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests table {
|
||||
border-collapse: collapse;
|
||||
margin-top: .2em;
|
||||
}
|
||||
|
||||
#qunit-tests th {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
padding: 0 .5em 0 0;
|
||||
}
|
||||
|
||||
#qunit-tests td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#qunit-tests pre {
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#qunit-tests del {
|
||||
background-color: #e0f2be;
|
||||
color: #374e0c;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests ins {
|
||||
background-color: #ffcaca;
|
||||
color: #500;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*** Test Counts */
|
||||
|
||||
#qunit-tests b.counts { color: black; }
|
||||
#qunit-tests b.passed { color: #5E740B; }
|
||||
#qunit-tests b.failed { color: #710909; }
|
||||
|
||||
#qunit-tests li li {
|
||||
padding: 5px;
|
||||
background-color: #fff;
|
||||
border-bottom: none;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/*** Passing Styles */
|
||||
|
||||
#qunit-tests li li.pass {
|
||||
color: #3c510c;
|
||||
background-color: #fff;
|
||||
border-left: 10px solid #C6E746;
|
||||
}
|
||||
|
||||
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
||||
#qunit-tests .pass .test-name { color: #366097; }
|
||||
|
||||
#qunit-tests .pass .test-actual,
|
||||
#qunit-tests .pass .test-expected { color: #999999; }
|
||||
|
||||
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
||||
|
||||
/*** Failing Styles */
|
||||
|
||||
#qunit-tests li li.fail {
|
||||
color: #710909;
|
||||
background-color: #fff;
|
||||
border-left: 10px solid #EE5757;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#qunit-tests > li:last-child {
|
||||
border-radius: 0 0 5px 5px;
|
||||
-moz-border-radius: 0 0 5px 5px;
|
||||
-webkit-border-bottom-right-radius: 5px;
|
||||
-webkit-border-bottom-left-radius: 5px;
|
||||
}
|
||||
|
||||
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
|
||||
#qunit-tests .fail .test-name,
|
||||
#qunit-tests .fail .module-name { color: #000000; }
|
||||
|
||||
#qunit-tests .fail .test-actual { color: #EE5757; }
|
||||
#qunit-tests .fail .test-expected { color: green; }
|
||||
|
||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
||||
|
||||
|
||||
/** Result */
|
||||
|
||||
#qunit-testresult {
|
||||
padding: 0.5em 0.5em 0.5em 2.5em;
|
||||
|
||||
color: #2b81af;
|
||||
background-color: #D2E0E6;
|
||||
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
#qunit-testresult .module-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/** Fixture */
|
||||
|
||||
#qunit-fixture {
|
||||
position: absolute;
|
||||
top: -10000px;
|
||||
left: -10000px;
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
}
|
||||
2212
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/qunit/qunit.js
vendored
Normal file
2212
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/qunit/qunit.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
26
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.URI.html
vendored
Normal file
26
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.URI.html
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>URI.js - URI Test Suite</title>
|
||||
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="pre_libs.js"></script>
|
||||
<script type="text/javascript" src="../src/punycode.js"></script>
|
||||
<script type="text/javascript" src="../src/IPv6.js"></script>
|
||||
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
|
||||
<script type="text/javascript" src="../src/URI.js"></script>
|
||||
<script type="text/javascript" src="../src/URITemplate.js"></script>
|
||||
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
|
||||
<script type="text/javascript" src="../src/jquery.URI.js"></script>
|
||||
<script type="text/javascript" src="qunit/qunit.js"></script>
|
||||
|
||||
<script type="text/javascript" src="urls.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript" src="test_jim.js"></script>
|
||||
<script type="text/javascript" src="test_template.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
</html>
|
||||
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.fragmentQuery.html
vendored
Normal file
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.fragmentQuery.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>fragmentQuery - URI Test Suite</title>
|
||||
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="pre_libs.js"></script>
|
||||
<script type="text/javascript" src="../src/punycode.js"></script>
|
||||
<script type="text/javascript" src="../src/IPv6.js"></script>
|
||||
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
|
||||
<script type="text/javascript" src="../src/URI.js"></script>
|
||||
<script type="text/javascript" src="../src/URITemplate.js"></script>
|
||||
<script type="text/javascript" src="../src/URI.fragmentQuery.js"></script>
|
||||
<script type="text/javascript" src="../jquery-1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="qunit/qunit.js"></script>
|
||||
|
||||
<!--
|
||||
as the plugins alter core URI functionality,
|
||||
it is necessary to re-test URI itself was well
|
||||
-->
|
||||
<script type="text/javascript" src="urls.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript" src="test_jim.js"></script>
|
||||
<script type="text/javascript" src="test_template.js"></script>
|
||||
<script type="text/javascript" src="test_fragmentQuery.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
</html>
|
||||
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.fragmentURI.html
vendored
Normal file
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.fragmentURI.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>fragmentURI - URI Test Suite</title>
|
||||
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="pre_libs.js"></script>
|
||||
<script type="text/javascript" src="../src/punycode.js"></script>
|
||||
<script type="text/javascript" src="../src/IPv6.js"></script>
|
||||
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
|
||||
<script type="text/javascript" src="../src/URI.js"></script>
|
||||
<script type="text/javascript" src="../src/URITemplate.js"></script>
|
||||
<script type="text/javascript" src="../src/URI.fragmentURI.js"></script>
|
||||
<script type="text/javascript" src="../jquery-1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="qunit/qunit.js"></script>
|
||||
|
||||
<!--
|
||||
as the plugins alter core URI functionality,
|
||||
it is necessary to re-test URI itself was well
|
||||
-->
|
||||
<script type="text/javascript" src="urls.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript" src="test_jim.js"></script>
|
||||
<script type="text/javascript" src="test_template.js"></script>
|
||||
<script type="text/javascript" src="test_fragmentURI.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
</html>
|
||||
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.jQuery-1.10.html
vendored
Normal file
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.jQuery-1.10.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>jQuery Plugin 1.10 - URI Test Suite</title>
|
||||
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="pre_libs.js"></script>
|
||||
<script type="text/javascript" src="../src/punycode.js"></script>
|
||||
<script type="text/javascript" src="../src/IPv6.js"></script>
|
||||
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
|
||||
<script type="text/javascript" src="../src/URI.js"></script>
|
||||
<script type="text/javascript" src="../src/URITemplate.js"></script>
|
||||
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
|
||||
<script type="text/javascript" src="../src/jquery.URI.js"></script>
|
||||
<script type="text/javascript" src="qunit/qunit.js"></script>
|
||||
|
||||
<!--
|
||||
as the plugins alter core URI functionality,
|
||||
it is necessary to re-test URI itself was well
|
||||
-->
|
||||
<script type="text/javascript" src="urls.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript" src="test_jim.js"></script>
|
||||
<script type="text/javascript" src="test_template.js"></script>
|
||||
<script type="text/javascript" src="test_jquery.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
</html>
|
||||
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.jQuery-1.7.html
vendored
Normal file
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.jQuery-1.7.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>jQuery Plugin 1.7 - URI Test Suite</title>
|
||||
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="pre_libs.js"></script>
|
||||
<script type="text/javascript" src="../src/punycode.js"></script>
|
||||
<script type="text/javascript" src="../src/IPv6.js"></script>
|
||||
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
|
||||
<script type="text/javascript" src="../src/URI.js"></script>
|
||||
<script type="text/javascript" src="../src/URITemplate.js"></script>
|
||||
<script type="text/javascript" src="../jquery-1.7.2.min.js"></script>
|
||||
<script type="text/javascript" src="../src/jquery.URI.js"></script>
|
||||
<script type="text/javascript" src="qunit/qunit.js"></script>
|
||||
|
||||
<!--
|
||||
as the plugins alter core URI functionality,
|
||||
it is necessary to re-test URI itself was well
|
||||
-->
|
||||
<script type="text/javascript" src="urls.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript" src="test_jim.js"></script>
|
||||
<script type="text/javascript" src="test_template.js"></script>
|
||||
<script type="text/javascript" src="test_jquery.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
</html>
|
||||
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.jQuery-1.8.html
vendored
Normal file
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.jQuery-1.8.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>jQuery Plugin 1.8 - URI Test Suite</title>
|
||||
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="pre_libs.js"></script>
|
||||
<script type="text/javascript" src="../src/punycode.js"></script>
|
||||
<script type="text/javascript" src="../src/IPv6.js"></script>
|
||||
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
|
||||
<script type="text/javascript" src="../src/URI.js"></script>
|
||||
<script type="text/javascript" src="../src/URITemplate.js"></script>
|
||||
<script type="text/javascript" src="../jquery-1.8.2.min.js"></script>
|
||||
<script type="text/javascript" src="../src/jquery.URI.js"></script>
|
||||
<script type="text/javascript" src="qunit/qunit.js"></script>
|
||||
|
||||
<!--
|
||||
as the plugins alter core URI functionality,
|
||||
it is necessary to re-test URI itself was well
|
||||
-->
|
||||
<script type="text/javascript" src="urls.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript" src="test_jim.js"></script>
|
||||
<script type="text/javascript" src="test_template.js"></script>
|
||||
<script type="text/javascript" src="test_jquery.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
</html>
|
||||
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.jQuery-1.9.html
vendored
Normal file
31
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.jQuery-1.9.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>jQuery Plugin 1.9 - URI Test Suite</title>
|
||||
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="pre_libs.js"></script>
|
||||
<script type="text/javascript" src="../src/punycode.js"></script>
|
||||
<script type="text/javascript" src="../src/IPv6.js"></script>
|
||||
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
|
||||
<script type="text/javascript" src="../src/URI.js"></script>
|
||||
<script type="text/javascript" src="../src/URITemplate.js"></script>
|
||||
<script type="text/javascript" src="../jquery-1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="../src/jquery.URI.js"></script>
|
||||
<script type="text/javascript" src="qunit/qunit.js"></script>
|
||||
|
||||
<!--
|
||||
as the plugins alter core URI functionality,
|
||||
it is necessary to re-test URI itself was well
|
||||
-->
|
||||
<script type="text/javascript" src="urls.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript" src="test_jim.js"></script>
|
||||
<script type="text/javascript" src="test_template.js"></script>
|
||||
<script type="text/javascript" src="test_jquery.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
</html>
|
||||
2036
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.js
vendored
Normal file
2036
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
67
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test_fragmentQuery.js
vendored
Normal file
67
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test_fragmentQuery.js
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
/*global URI, test, equal, deepEqual */
|
||||
|
||||
module('URI.fragmentQuery');
|
||||
test('storing query-data in fragment', function() {
|
||||
var u = URI('http://example.org');
|
||||
|
||||
deepEqual(u.fragment(true), {}, 'empty map for missing fragment');
|
||||
|
||||
u = URI('http://example.org/#');
|
||||
deepEqual(u.fragment(true), {}, 'empty map for empty fragment');
|
||||
|
||||
u = URI('http://example.org/#?hello=world');
|
||||
deepEqual(u.fragment(true), {hello: 'world'}, 'reading data object');
|
||||
|
||||
u.fragment({bar: 'foo'});
|
||||
deepEqual(u.fragment(true), {bar: 'foo'}, 'setting data object');
|
||||
equal(u.toString(), 'http://example.org/#?bar=foo', 'setting data object serialized');
|
||||
|
||||
u.addFragment('name', 'value');
|
||||
deepEqual(u.fragment(true), {bar: 'foo', name: 'value'}, 'adding value');
|
||||
equal(u.toString(), 'http://example.org/#?bar=foo&name=value', 'adding value serialized');
|
||||
|
||||
u.removeFragment('bar');
|
||||
deepEqual(u.fragment(true), {name: 'value'}, 'removing value bar');
|
||||
equal(u.toString(), 'http://example.org/#?name=value', 'removing value bar serialized');
|
||||
|
||||
u.removeFragment('name');
|
||||
deepEqual(u.fragment(true), {}, 'removing value name');
|
||||
equal(u.toString(), 'http://example.org/#?', 'removing value name serialized');
|
||||
|
||||
u.setFragment('name', 'value1');
|
||||
deepEqual(u.fragment(true), {name: 'value1'}, 'setting name to value1');
|
||||
equal(u.toString(), 'http://example.org/#?name=value1', 'setting name to value1 serialized');
|
||||
|
||||
u.setFragment('name', 'value2');
|
||||
deepEqual(u.fragment(true), {name: 'value2'}, 'setting name to value2');
|
||||
equal(u.toString(), 'http://example.org/#?name=value2', 'setting name to value2 serialized');
|
||||
});
|
||||
test('fragmentPrefix', function() {
|
||||
var u;
|
||||
|
||||
URI.fragmentPrefix = '!';
|
||||
u = URI('http://example.org');
|
||||
equal(u._parts.fragmentPrefix, '!', 'init using global property');
|
||||
|
||||
u.fragment('#?hello=world');
|
||||
equal(u.fragment(), '?hello=world', 'unparsed ?');
|
||||
deepEqual(u.fragment(true), {}, 'parsing ? prefix');
|
||||
|
||||
u.fragment('#!hello=world');
|
||||
equal(u.fragment(), '!hello=world', 'unparsed !');
|
||||
deepEqual(u.fragment(true), {hello: 'world'}, 'parsing ! prefix');
|
||||
|
||||
u.fragmentPrefix('§');
|
||||
equal(u.fragment(), '!hello=world', 'unparsed §');
|
||||
deepEqual(u.fragment(true), {}, 'parsing § prefix');
|
||||
|
||||
u.fragment('#§hello=world');
|
||||
equal(u.fragment(), '§hello=world', 'unparsed §');
|
||||
deepEqual(u.fragment(true), {hello: 'world'}, 'parsing § prefix');
|
||||
|
||||
URI.fragmentPrefix = '?';
|
||||
});
|
||||
|
||||
})();
|
||||
61
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test_fragmentURI.js
vendored
Normal file
61
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test_fragmentURI.js
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
/*global URI, test, equal, ok */
|
||||
|
||||
module('URI.fragmentURI');
|
||||
test('storing URLs in fragment', function() {
|
||||
var u = URI('http://example.org');
|
||||
var f;
|
||||
|
||||
// var uri = URI('http://example.org/#!/foo/bar/baz.html');
|
||||
// var furi = uri.fragment(true);
|
||||
// furi.pathname() === '/foo/bar/baz.html';
|
||||
// furi.pathname('/hello.html');
|
||||
// uri.toString() === 'http://example.org/#!/hello.html'
|
||||
|
||||
ok(u.fragment(true) instanceof URI, 'URI instance for missing fragment');
|
||||
|
||||
u = URI('http://example.org/#');
|
||||
ok(u.fragment(true) instanceof URI, 'URI instance for empty fragment');
|
||||
|
||||
u = URI('http://example.org/#!/foo/bar/baz.html');
|
||||
f = u.fragment(true);
|
||||
equal(f.pathname(), '/foo/bar/baz.html', 'reading path of FragmentURI');
|
||||
equal(f.filename(), 'baz.html', 'reading filename of FragmentURI');
|
||||
|
||||
f.filename('foobar.txt');
|
||||
equal(f.pathname(), '/foo/bar/foobar.txt', 'modifying filename of FragmentURI');
|
||||
equal(u.fragment(), '!/foo/bar/foobar.txt', 'modifying fragment() through FragmentURI on original');
|
||||
equal(u.toString(), 'http://example.org/#!/foo/bar/foobar.txt', 'modifying filename of FragmentURI on original');
|
||||
});
|
||||
test('fragmentPrefix', function() {
|
||||
var u;
|
||||
|
||||
URI.fragmentPrefix = '?';
|
||||
u = URI('http://example.org');
|
||||
equal(u._parts.fragmentPrefix, '?', 'init using global property');
|
||||
|
||||
u.fragment('#!/foo/bar/baz.html');
|
||||
equal(u.fragment(), '!/foo/bar/baz.html', 'unparsed ?');
|
||||
ok(u.fragment(true) instanceof URI, 'parsing ? prefix - is URI');
|
||||
equal(u.fragment(true).toString(), '', 'parsing ? prefix - result');
|
||||
|
||||
u.fragment('#?/foo/bar/baz.html');
|
||||
equal(u.fragment(), '?/foo/bar/baz.html', 'unparsed ?');
|
||||
ok(u.fragment(true) instanceof URI, 'parsing ? prefix - is URI');
|
||||
equal(u.fragment(true).toString(), '/foo/bar/baz.html', 'parsing ? prefix - result');
|
||||
|
||||
u.fragmentPrefix('§');
|
||||
equal(u.fragment(), '?/foo/bar/baz.html', 'unparsed §');
|
||||
ok(u.fragment(true) instanceof URI, 'parsing § prefix - is URI');
|
||||
equal(u.fragment(true).toString(), '', 'parsing § prefix - result');
|
||||
|
||||
u.fragment('#§/foo/bar/baz.html');
|
||||
equal(u.fragment(), '§/foo/bar/baz.html', 'unparsed §');
|
||||
ok(u.fragment(true) instanceof URI, 'parsing § prefix - is URI');
|
||||
equal(u.fragment(true).toString(), '/foo/bar/baz.html', 'parsing § prefix - result');
|
||||
|
||||
URI.fragmentPrefix = '!';
|
||||
});
|
||||
|
||||
})();
|
||||
158
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test_jim.js
vendored
Normal file
158
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test_jim.js
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
* What would jim do?
|
||||
* more tests for border-edge cases
|
||||
* Christian Harms.
|
||||
*
|
||||
* Note: I have no clue who or what jim is supposed to be. It might be something like the German DAU (dumbest possible user)
|
||||
*/
|
||||
(function() {
|
||||
'use strict';
|
||||
/*global URI, test, equal, raises */
|
||||
|
||||
module('injection');
|
||||
test('protocol', function() {
|
||||
var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
|
||||
raises(function() {
|
||||
u.protocol('ftp://example.org');
|
||||
}, TypeError, 'Failing invalid characters');
|
||||
|
||||
u.protocol('ftp:');
|
||||
equal(u.protocol(), 'ftp', 'protocol() has set invalid protocoll!');
|
||||
equal(u.hostname(), 'example.com', 'protocol() has changed the hostname');
|
||||
});
|
||||
test('port', function() {
|
||||
var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
|
||||
raises(function() {
|
||||
u.port('99:example.org');
|
||||
}, TypeError, 'Failing invalid characters');
|
||||
|
||||
u.port(':99');
|
||||
equal(u.hostname(), 'example.com', 'port() has modified hostname');
|
||||
equal(u.port(), 99, 'port() has set an invalid port');
|
||||
|
||||
u.port(false);
|
||||
equal(u.port(), '', 'port() has set an invalid port');
|
||||
|
||||
// RFC 3986 says nothing about "16-bit unsigned" http://tools.ietf.org/html/rfc3986#section-3.2.3
|
||||
// u.href(new URI("http://example.com/"))
|
||||
// u.port(65536);
|
||||
// notEqual(u.port(), "65536", "port() has set to an non-valid value (A port number is a 16-bit unsigned integer)");
|
||||
|
||||
raises(function() {
|
||||
u.port('-99');
|
||||
}, TypeError, 'Failing invalid characters');
|
||||
});
|
||||
test('domain', function() {
|
||||
var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
|
||||
|
||||
raises(function() {
|
||||
u.domain('example.org/dir0/');
|
||||
}, TypeError, 'Failing invalid characters');
|
||||
|
||||
raises(function() {
|
||||
u.domain('example.org:80');
|
||||
}, TypeError, 'Failing invalid characters');
|
||||
|
||||
raises(function() {
|
||||
u.domain('foo@example.org');
|
||||
}, TypeError, 'Failing invalid characters');
|
||||
});
|
||||
test('subdomain', function() {
|
||||
var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
|
||||
|
||||
raises(function() {
|
||||
u.subdomain('example.org/dir0/');
|
||||
}, TypeError, 'Failing invalid characters');
|
||||
|
||||
raises(function() {
|
||||
u.subdomain('example.org:80');
|
||||
}, TypeError, 'Failing invalid characters');
|
||||
|
||||
raises(function() {
|
||||
u.subdomain('foo@example.org');
|
||||
}, TypeError, 'Failing invalid characters');
|
||||
});
|
||||
test('tld', function() {
|
||||
var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
|
||||
|
||||
raises(function() {
|
||||
u.tld('foo/bar.html');
|
||||
}, TypeError, 'Failing invalid characters');
|
||||
});
|
||||
test('path', function() {
|
||||
var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
|
||||
u.path('/dir3/?query3=value3#fragment');
|
||||
equal(u.hostname(), 'example.com', 'path() has modified hostname');
|
||||
equal(u.path(), '/dir3/%3Fquery3=value3%23fragment', 'path() has set invalid path');
|
||||
equal(u.query(), 'query1=value1&query2=value2', 'path() has modified query');
|
||||
equal(u.fragment(), 'hash', 'path() has modified fragment');
|
||||
});
|
||||
test('filename', function() {
|
||||
var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
|
||||
|
||||
u.filename('name.html?query');
|
||||
equal(u.filename(), 'name.html%3Fquery', 'filename() has set invalid filename');
|
||||
equal(u.query(), 'query1=value1&query2=value2', 'filename() has modified query');
|
||||
|
||||
// allowed!
|
||||
u.filename('../name.html?query');
|
||||
equal(u.filename(), 'name.html%3Fquery', 'filename() has set invalid filename');
|
||||
equal(u.directory(), '/dir1', 'filename() has not altered directory properly');
|
||||
|
||||
u.filename(null);
|
||||
equal(u.filename(), 'name.html%3Fquery', 'filename() has set invalid filename');
|
||||
equal(u.directory(), '/dir1', 'filename() has not altered directory properly');
|
||||
|
||||
u.filename(false);
|
||||
equal(u.filename(), 'name.html%3Fquery', 'filename() has set invalid filename');
|
||||
equal(u.directory(), '/dir1', 'filename() has not altered directory properly');
|
||||
|
||||
u.filename(0);
|
||||
equal(u.filename(), 'name.html%3Fquery', 'filename() has set invalid filename');
|
||||
equal(u.directory(), '/dir1', 'filename() has not altered directory properly');
|
||||
});
|
||||
test('addQuery', function() {
|
||||
var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
|
||||
u.addQuery('query3', 'value3#got');
|
||||
equal(u.query(), 'query1=value1&query2=value2&query3=value3%23got', 'addQuery() has set invalid query');
|
||||
equal(u.fragment(), 'hash', 'addQuery() has modified fragment');
|
||||
});
|
||||
|
||||
/*
|
||||
// RFC 3986 says "…and should limit these names to no more than 255 characters in length."
|
||||
// SHOULD is not MUST therefore not the responsibility of URI.js
|
||||
|
||||
module("validation");
|
||||
test("domain", function() {
|
||||
// this bases on the wiki page information: http://en.wikipedia.org/wiki/Domain_Name_System
|
||||
var u = new URI("http://example.com/"), domain, i, j;
|
||||
|
||||
//generate a 204 character domain
|
||||
domain = "com"
|
||||
for (i=0; i<20; i++) {
|
||||
domain = "0123456789." + domain;
|
||||
}
|
||||
u.domain(domain);
|
||||
equals(u.hostname(), domain, "domain() has not set 204-character-domain");
|
||||
|
||||
//expand the domain to a 404 character domain
|
||||
for (i=0; i<20; i++) {
|
||||
domain = "0123456789." + domain;
|
||||
}
|
||||
u.domain(domain);
|
||||
equals(u.hostname() == domain, true, "set domain() with "+domain.length+" charachters - not valid domainname");
|
||||
|
||||
//generate a domain with three 70-char subdomains-parts.
|
||||
domain = "com";
|
||||
for (j=0; j<3; j++) {
|
||||
//start new subdomain
|
||||
domain = "." + domain;
|
||||
for (i=0; i<70; i++) {
|
||||
domain = "a" + domain;
|
||||
}
|
||||
}
|
||||
u.domain(domain);
|
||||
equals(u.hostname() == domain, true, "set domain() with 70-character subdomain not valid domainname");
|
||||
});
|
||||
*/
|
||||
})();
|
||||
141
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test_jquery.js
vendored
Normal file
141
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test_jquery.js
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
/*global document, URI, $, test, equal, ok */
|
||||
|
||||
module('jQuery.URI', {
|
||||
setup: function() {
|
||||
var links = [
|
||||
'<a href="http://example.org/">an HTTP link</a>',
|
||||
'<a href="https://example.org/">an HTTPS link</a>',
|
||||
'<a href="http://example.org/so)me.pdf">some pdf</a>',
|
||||
'<a href="http://example.org/hello/world.html">hello world</a>',
|
||||
'<a href="ftp://localhost/one/two/three/file.ext">directories</a>',
|
||||
'<a href="ftp://localhost/one/two/file.ext">directories</a>',
|
||||
'<a href="mailto:mail@example.org?subject=Hello+World">Mail me</a>',
|
||||
'<a href="javascript:alert(\'ugly!\');">some javascript</a>',
|
||||
'<a href="#anchor">jump to anchor</a>',
|
||||
'<img src="/dontexist.jpg" alt="some jpeg">',
|
||||
'<img src="/dontexist.svg" alt="some svg">',
|
||||
'<form method="post" action="/some/script.php"></form>'
|
||||
];
|
||||
|
||||
$('<div id="testestest">' + links.join('') + '</div>')
|
||||
.appendTo(document.body);
|
||||
$('<div>foo</div>')
|
||||
.appendTo(document.body);
|
||||
|
||||
var script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = '/nonexistant.js';
|
||||
document.getElementById('testestest').appendChild(script);
|
||||
},
|
||||
teardown: function() {
|
||||
var t = $('#testestest');
|
||||
t.next().remove();
|
||||
t.remove();
|
||||
}
|
||||
});
|
||||
test('.uri()', function() {
|
||||
var $links = $('#testestest'),
|
||||
$first = $links.children().first(),
|
||||
uri = $first.uri(),
|
||||
_uri = URI('/hello.world');
|
||||
|
||||
ok(uri !== _uri, 'different URI instances');
|
||||
var __uri = $first.uri(_uri);
|
||||
ok(uri !== _uri, 'different URI instances');
|
||||
ok(uri === __uri, 'same URI instances');
|
||||
equal($first.attr('href'), _uri.toString(), 'equal URI');
|
||||
|
||||
});
|
||||
test('filtering with :uri()', function() {
|
||||
var $links = $('#testestest');
|
||||
|
||||
// find using accessor and "begins with" comparison
|
||||
equal($('a:uri(href^=#anc)').length, 1, '$(selector) Anchor Link');
|
||||
equal($links.find(':uri(href^=#anc)').length, 1, '.find(selector) Anchor Link');
|
||||
|
||||
// find using accessor and "ends with" comparison
|
||||
equal($(':uri(href$=.css)').length, 1, ':uri(href$=.css)');
|
||||
|
||||
// find using accessor and "contains" comparison
|
||||
equal($(':uri(href *= /hello/)').length, 1, ':uri(href *= /hello/)');
|
||||
|
||||
// find using accessor and "equals" comparison
|
||||
equal($links.find(':uri(protocol=https)').length, 1, ':uri(protocol=https)');
|
||||
equal($links.find(':uri(protocol=http)').length, 3, ':uri(protocol=http)');
|
||||
|
||||
// directory match with trailing slash
|
||||
equal($links.find(':uri(directory *= /two/)').length, 2, ':uri(directory *= /two/)');
|
||||
|
||||
// find using URI.is()
|
||||
equal($links.find(':uri(relative)').length, 5, ':uri(relative)');
|
||||
equal($links.find(':uri(is:relative)').length, 5, ':uri(is:relative)');
|
||||
equal($links.find(':uri(is: relative)').length, 5, ':uri(is:relative)');
|
||||
|
||||
// find using URI.equal()
|
||||
// This syntax breaks Sizzle, probably because it's looking for a nested pseudo ":http"
|
||||
//equal($links.find(':uri(equals:http://example.org/hello/foo/../world.html)').length, 1, ':uri(equals:$url$)');
|
||||
equal($links.find(':uri(equals:"http://example.org/hello/foo/../world.html")').length, 1, ':uri(equals:$url$)');
|
||||
equal($links.find(':uri(equals: "http://example.org/hello/foo/../world.html")').length, 1, ':uri(equals:$url$)');
|
||||
|
||||
// find URNs
|
||||
equal($links.find(':uri(urn)').length, 2, ':uri(urn)');
|
||||
|
||||
// .is()
|
||||
equal($links.children('script').is(':uri(suffix=js)'), true, '.is(\':uri(suffix=js)\')');
|
||||
equal($links.children('form').is(':uri(suffix=php)'), true, '.is(\':uri(suffix=php)\')');
|
||||
|
||||
// .has()
|
||||
equal($('div').has(':uri(suffix=js)').length, 1, '.has(\':uri(suffix=js)\')');
|
||||
});
|
||||
test('.attr("href")', function() {
|
||||
var $links = $('#testestest'),
|
||||
$first = $links.children().first(),
|
||||
first = $first.get(0),
|
||||
uri = $first.uri(),
|
||||
href = function(elem) {
|
||||
return elem.getAttribute('href');
|
||||
};
|
||||
|
||||
if (!$.support.hrefNormalized) {
|
||||
href = function(elem) {
|
||||
return elem.getAttribute('href', 2);
|
||||
};
|
||||
}
|
||||
|
||||
ok(uri instanceof URI, 'instanceof URI');
|
||||
equal(href(first), uri.toString(), 'URI equals href');
|
||||
|
||||
// test feedback to DOM element
|
||||
uri.hostname('example.com');
|
||||
ok($first.uri() === uri, 'URI persisted');
|
||||
equal(href(first), uri.toString(), 'transparent href update');
|
||||
|
||||
// test feedback from DOM element
|
||||
$first.attr('href', 'http://example.net/');
|
||||
ok($first.uri() === uri, 'URI persisted');
|
||||
equal(href(first), uri.toString(), 'transparent href update');
|
||||
});
|
||||
test('.attr("uri:accessor")', function() {
|
||||
var $links = $('#testestest'),
|
||||
$first = $links.children().first(),
|
||||
uri = $first.uri(),
|
||||
href = function(elem) {
|
||||
return elem.getAttribute('href');
|
||||
};
|
||||
|
||||
if (!$.support.hrefNormalized) {
|
||||
href = function(elem) {
|
||||
return elem.getAttribute('href', 2);
|
||||
};
|
||||
}
|
||||
|
||||
equal($first.attr('uri:hostname'), 'example.org', 'reading uri:hostname');
|
||||
$first.attr('uri:hostname', 'example.com');
|
||||
equal($first.attr('uri:hostname'), 'example.com', 'changed uri:hostname');
|
||||
equal($first.is(':uri(hostname=example.com)'), true, ':uri() after changed uri:hostname');
|
||||
ok($first.uri() === uri, 'URI persisted');
|
||||
});
|
||||
|
||||
})();
|
||||
417
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test_template.js
vendored
Normal file
417
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/test_template.js
vendored
Normal file
@@ -0,0 +1,417 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
/*global window, URITemplate, URITemplate_pre_lib, test, equal, strictEqual, raises */
|
||||
// FIXME: v2.0.0 renamce non-camelCase properties to uppercase
|
||||
/*jshint camelcase: false, loopfunc: true, newcap: false */
|
||||
|
||||
var levels = {
|
||||
// http://tools.ietf.org/html/rfc6570#section-1.2
|
||||
'Level 1' : {
|
||||
expressions : {
|
||||
'Simple string expansion' : {
|
||||
'{var}' : 'value',
|
||||
'{hello}' : 'Hello%20World%21'
|
||||
}
|
||||
},
|
||||
values : {
|
||||
'var' : 'value',
|
||||
'hello' : 'Hello World!'
|
||||
}
|
||||
},
|
||||
'Level 2' : {
|
||||
expressions : {
|
||||
'Reserved string expansion' : {
|
||||
'{+var}' : 'value',
|
||||
'{+hello}' : 'Hello%20World!',
|
||||
'{+path}/here' : '/foo/bar/here',
|
||||
'here?ref={+path}' : 'here?ref=/foo/bar'
|
||||
},
|
||||
'Fragment expansion, crosshatch-prefixed' : {
|
||||
'X{#var}' : 'X#value',
|
||||
'X{#hello}' : 'X#Hello%20World!'
|
||||
}
|
||||
},
|
||||
values : {
|
||||
'var' : 'value',
|
||||
'hello' : 'Hello World!',
|
||||
'path' : '/foo/bar'
|
||||
}
|
||||
},
|
||||
'Level 3' : {
|
||||
expressions : {
|
||||
'String expansion with multiple variables' : {
|
||||
'map?{x,y}' : 'map?1024,768',
|
||||
'{x,hello,y}' : '1024,Hello%20World%21,768'
|
||||
},
|
||||
'Reserved expansion with multiple variables' : {
|
||||
'{+x,hello,y}' : '1024,Hello%20World!,768',
|
||||
'{+path,x}/here' : '/foo/bar,1024/here'
|
||||
},
|
||||
'Fragment expansion with multiple variables' : {
|
||||
'{#x,hello,y}' : '#1024,Hello%20World!,768',
|
||||
'{#path,x}/here' : '#/foo/bar,1024/here'
|
||||
},
|
||||
'Label expansion, dot-prefixed' : {
|
||||
'X{.var}' : 'X.value',
|
||||
'X{.x,y}' : 'X.1024.768'
|
||||
},
|
||||
'Path segments, slash-prefixed' : {
|
||||
'{/var}' : '/value',
|
||||
'{/var,x}/here' : '/value/1024/here'
|
||||
},
|
||||
'Path-style parameters, semicolon-prefixed' : {
|
||||
'{;x,y}' : ';x=1024;y=768',
|
||||
'{;x,y,empty}' : ';x=1024;y=768;empty'
|
||||
},
|
||||
'Form-style query, ampersand-separated' : {
|
||||
'{?x,y}' : '?x=1024&y=768',
|
||||
'{?x,y,empty}' : '?x=1024&y=768&empty='
|
||||
},
|
||||
'Form-style query continuation' : {
|
||||
'?fixed=yes{&x}' : '?fixed=yes&x=1024',
|
||||
'{&x,y,empty}' : '&x=1024&y=768&empty='
|
||||
}
|
||||
},
|
||||
values : {
|
||||
'var' : 'value',
|
||||
'hello' : 'Hello World!',
|
||||
'empty' : '',
|
||||
'path' : '/foo/bar',
|
||||
'x' : '1024',
|
||||
'y' : '768'
|
||||
}
|
||||
},
|
||||
'Level 4' : {
|
||||
expressions : {
|
||||
'String expansion with value modifiers' : {
|
||||
'{var:3}' : 'val',
|
||||
'{var:30}' : 'value',
|
||||
'{list}' : 'red,green,blue',
|
||||
'{list*}' : 'red,green,blue',
|
||||
'{keys}' : 'semi,%3B,dot,.,comma,%2C',
|
||||
'{keys*}' : 'semi=%3B,dot=.,comma=%2C'
|
||||
},
|
||||
'Reserved expansion with value modifiers' : {
|
||||
'{+path:6}/here' : '/foo/b/here',
|
||||
'{+list}' : 'red,green,blue',
|
||||
'{+list*}' : 'red,green,blue',
|
||||
'{+keys}' : 'semi,;,dot,.,comma,,',
|
||||
'{+keys*}' : 'semi=;,dot=.,comma=,'
|
||||
},
|
||||
'Fragment expansion with value modifiers' : {
|
||||
'{#path:6}/here' : '#/foo/b/here',
|
||||
'{#list}' : '#red,green,blue',
|
||||
'{#list*}' : '#red,green,blue',
|
||||
'{#keys}' : '#semi,;,dot,.,comma,,',
|
||||
'{#keys*}' : '#semi=;,dot=.,comma=,'
|
||||
},
|
||||
'Label expansion, dot-prefixed' : {
|
||||
'X{.var:3}' : 'X.val',
|
||||
'X{.list}' : 'X.red,green,blue',
|
||||
'X{.list*}' : 'X.red.green.blue',
|
||||
'X{.keys}' : 'X.semi,%3B,dot,.,comma,%2C',
|
||||
'X{.keys*}' : 'X.semi=%3B.dot=..comma=%2C'
|
||||
},
|
||||
'Path segments, slash-prefixed' : {
|
||||
'{/var:1,var}' : '/v/value',
|
||||
'{/list}' : '/red,green,blue',
|
||||
'{/list*}' : '/red/green/blue',
|
||||
'{/list*,path:4}' : '/red/green/blue/%2Ffoo',
|
||||
'{/keys}' : '/semi,%3B,dot,.,comma,%2C',
|
||||
'{/keys*}' : '/semi=%3B/dot=./comma=%2C'
|
||||
},
|
||||
'Path-style parameters, semicolon-prefixed' : {
|
||||
'{;hello:5}' : ';hello=Hello',
|
||||
'{;list}' : ';list=red,green,blue',
|
||||
'{;list*}' : ';list=red;list=green;list=blue',
|
||||
'{;keys}' : ';keys=semi,%3B,dot,.,comma,%2C',
|
||||
'{;keys*}' : ';semi=%3B;dot=.;comma=%2C'
|
||||
},
|
||||
|
||||
'Form-style query, ampersand-separated' : {
|
||||
'{?var:3}' : '?var=val',
|
||||
'{?list}' : '?list=red,green,blue',
|
||||
'{?list*}' : '?list=red&list=green&list=blue',
|
||||
'{?keys}' : '?keys=semi,%3B,dot,.,comma,%2C',
|
||||
'{?keys*}' : '?semi=%3B&dot=.&comma=%2C'
|
||||
},
|
||||
'Form-style query continuation' : {
|
||||
'{&var:3}' : '&var=val',
|
||||
'{&list}' : '&list=red,green,blue',
|
||||
'{&list*}' : '&list=red&list=green&list=blue',
|
||||
'{&keys}' : '&keys=semi,%3B,dot,.,comma,%2C',
|
||||
'{&keys*}' : '&semi=%3B&dot=.&comma=%2C'
|
||||
}
|
||||
},
|
||||
values : {
|
||||
'var' : 'value',
|
||||
'hello' : 'Hello World!',
|
||||
'path' : '/foo/bar',
|
||||
'list' : ['red', 'green', 'blue'],
|
||||
'keys' : {
|
||||
'semi' : ';',
|
||||
'dot' : '.',
|
||||
'comma' : ','
|
||||
}
|
||||
}
|
||||
},
|
||||
// http://tools.ietf.org/html/rfc6570#section-3
|
||||
'Expression Expansion' : {
|
||||
expressions : {
|
||||
'Variable Expansion' : {
|
||||
'{count}' : 'one,two,three',
|
||||
'{count*}' : 'one,two,three',
|
||||
'{/count}' : '/one,two,three',
|
||||
'{/count*}' : '/one/two/three',
|
||||
'{;count}' : ';count=one,two,three',
|
||||
'{;count*}' : ';count=one;count=two;count=three',
|
||||
'{?count}' : '?count=one,two,three',
|
||||
'{?count*}' : '?count=one&count=two&count=three',
|
||||
'{&count*}' : '&count=one&count=two&count=three'
|
||||
},
|
||||
'Simple String Expansion' : {
|
||||
'{var}' : 'value',
|
||||
'{hello}' : 'Hello%20World%21',
|
||||
'{half}' : '50%25',
|
||||
'O{empty}X' : 'OX',
|
||||
'O{undef}X' : 'OX',
|
||||
'{x,y}' : '1024,768',
|
||||
'{x,hello,y}' : '1024,Hello%20World%21,768',
|
||||
'?{x,empty}' : '?1024,',
|
||||
'?{x,undef}' : '?1024',
|
||||
'?{undef,y}' : '?768',
|
||||
'{var:3}' : 'val',
|
||||
'{var:30}' : 'value',
|
||||
'{list}' : 'red,green,blue',
|
||||
'{list*}' : 'red,green,blue',
|
||||
'{keys}' : 'semi,%3B,dot,.,comma,%2C',
|
||||
'{keys*}' : 'semi=%3B,dot=.,comma=%2C'
|
||||
},
|
||||
'Reserved Expansion' : {
|
||||
'{+var}' : 'value',
|
||||
'{+hello}' : 'Hello%20World!',
|
||||
'{+half}' : '50%25',
|
||||
'{base}index' : 'http%3A%2F%2Fexample.com%2Fhome%2Findex',
|
||||
'{+base}index' : 'http://example.com/home/index',
|
||||
'O{+empty}X' : 'OX',
|
||||
'O{+undef}X' : 'OX',
|
||||
'{+path}/here' : '/foo/bar/here',
|
||||
'here?ref={+path}' : 'here?ref=/foo/bar',
|
||||
'up{+path}{var}/here' : 'up/foo/barvalue/here',
|
||||
'{+x,hello,y}' : '1024,Hello%20World!,768',
|
||||
'{+path,x}/here' : '/foo/bar,1024/here',
|
||||
'{+path:6}/here' : '/foo/b/here',
|
||||
'{+list}' : 'red,green,blue',
|
||||
'{+list*}' : 'red,green,blue',
|
||||
'{+keys}' : 'semi,;,dot,.,comma,,',
|
||||
'{+keys*}' : 'semi=;,dot=.,comma=,'
|
||||
},
|
||||
'Fragment Expansion' : {
|
||||
'{#var}' : '#value',
|
||||
'{#hello}' : '#Hello%20World!',
|
||||
'{#half}' : '#50%25',
|
||||
'foo{#empty}' : 'foo#',
|
||||
'foo{#undef}' : 'foo',
|
||||
'{#x,hello,y}' : '#1024,Hello%20World!,768',
|
||||
'{#path,x}/here' : '#/foo/bar,1024/here',
|
||||
'{#path:6}/here' : '#/foo/b/here',
|
||||
'{#list}' : '#red,green,blue',
|
||||
'{#list*}' : '#red,green,blue',
|
||||
'{#keys}' : '#semi,;,dot,.,comma,,',
|
||||
'{#keys*}' : '#semi=;,dot=.,comma=,'
|
||||
},
|
||||
'Label Expansion with Dot-Prefix' : {
|
||||
'{.who}' : '.fred',
|
||||
'{.who,who}' : '.fred.fred',
|
||||
'{.half,who}' : '.50%25.fred',
|
||||
'www{.dom*}' : 'www.example.com',
|
||||
'X{.var}' : 'X.value',
|
||||
'X{.empty}' : 'X.',
|
||||
'X{.undef}' : 'X',
|
||||
'X{.var:3}' : 'X.val',
|
||||
'X{.list}' : 'X.red,green,blue',
|
||||
'X{.list*}' : 'X.red.green.blue',
|
||||
'X{.keys}' : 'X.semi,%3B,dot,.,comma,%2C',
|
||||
'X{.keys*}' : 'X.semi=%3B.dot=..comma=%2C',
|
||||
'X{.empty_keys}' : 'X',
|
||||
'X{.empty_keys*}' : 'X'
|
||||
},
|
||||
'Path Segment Expansion' : {
|
||||
'{/who}' : '/fred',
|
||||
'{/who,who}' : '/fred/fred',
|
||||
'{/half,who}' : '/50%25/fred',
|
||||
'{/who,dub}' : '/fred/me%2Ftoo',
|
||||
'{/var}' : '/value',
|
||||
'{/var,empty}' : '/value/',
|
||||
'{/var,undef}' : '/value',
|
||||
'{/var,x}/here' : '/value/1024/here',
|
||||
'{/var:1,var}' : '/v/value',
|
||||
'{/list}' : '/red,green,blue',
|
||||
'{/list*}' : '/red/green/blue',
|
||||
'{/list*,path:4}' : '/red/green/blue/%2Ffoo',
|
||||
'{/keys}' : '/semi,%3B,dot,.,comma,%2C',
|
||||
'{/keys*}' : '/semi=%3B/dot=./comma=%2C'
|
||||
},
|
||||
'Path-Style Parameter Expansion' : {
|
||||
'{;who}' : ';who=fred',
|
||||
'{;half}' : ';half=50%25',
|
||||
'{;empty}' : ';empty',
|
||||
'{;v,empty,who}' : ';v=6;empty;who=fred',
|
||||
'{;v,bar,who}' : ';v=6;who=fred',
|
||||
'{;x,y}' : ';x=1024;y=768',
|
||||
'{;x,y,empty}' : ';x=1024;y=768;empty',
|
||||
'{;x,y,undef}' : ';x=1024;y=768',
|
||||
'{;hello:5}' : ';hello=Hello',
|
||||
'{;list}' : ';list=red,green,blue',
|
||||
'{;list*}' : ';list=red;list=green;list=blue',
|
||||
'{;keys}' : ';keys=semi,%3B,dot,.,comma,%2C',
|
||||
'{;keys*}' : ';semi=%3B;dot=.;comma=%2C'
|
||||
},
|
||||
'Form-Style Query Expansion' : {
|
||||
'{?who}' : '?who=fred',
|
||||
'{?half}' : '?half=50%25',
|
||||
'{?x,y}' : '?x=1024&y=768',
|
||||
'{?x,y,empty}' : '?x=1024&y=768&empty=',
|
||||
'{?x,y,undef}' : '?x=1024&y=768',
|
||||
'{?var:3}' : '?var=val',
|
||||
'{?list}' : '?list=red,green,blue',
|
||||
'{?list*}' : '?list=red&list=green&list=blue',
|
||||
'{?keys}' : '?keys=semi,%3B,dot,.,comma,%2C',
|
||||
'{?keys*}' : '?semi=%3B&dot=.&comma=%2C'
|
||||
},
|
||||
'Form-Style Query Continuation' : {
|
||||
'{&who}' : '&who=fred',
|
||||
'{&half}' : '&half=50%25',
|
||||
'?fixed=yes{&x}' : '?fixed=yes&x=1024',
|
||||
'{&x,y,empty}' : '&x=1024&y=768&empty=',
|
||||
'{&x,y,undef}' : '&x=1024&y=768',
|
||||
'{&var:3}' : '&var=val',
|
||||
'{&list}' : '&list=red,green,blue',
|
||||
'{&list*}' : '&list=red&list=green&list=blue',
|
||||
'{&keys}' : '&keys=semi,%3B,dot,.,comma,%2C',
|
||||
'{&keys*}' : '&semi=%3B&dot=.&comma=%2C'
|
||||
}
|
||||
},
|
||||
values : {
|
||||
'count' : ['one', 'two', 'three'],
|
||||
'dom' : ['example', 'com'],
|
||||
'dub' : 'me/too',
|
||||
'hello' : 'Hello World!',
|
||||
'half' : '50%',
|
||||
'var' : 'value',
|
||||
'who' : 'fred',
|
||||
'base' : 'http://example.com/home/',
|
||||
'path' : '/foo/bar',
|
||||
'list' : ['red', 'green', 'blue'],
|
||||
'keys' : {
|
||||
'semi' : ';',
|
||||
'dot' : '.',
|
||||
'comma' : ','
|
||||
},
|
||||
'v' : '6',
|
||||
'x' : '1024',
|
||||
'y' : '768',
|
||||
'empty' : '',
|
||||
'empty_keys' : [],
|
||||
'undef' : null
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module('URITemplate');
|
||||
// [].forEach() no IE, lacking interest in polyfilling this...
|
||||
for (var i in levels) {
|
||||
(function(level, data){
|
||||
test(level, function() {
|
||||
var combined_expression = '',
|
||||
combined_expansion = '',
|
||||
template, expression, expansion;
|
||||
|
||||
for (var type in data.expressions) {
|
||||
for (expression in data.expressions[type]) {
|
||||
combined_expression += '/' + expression;
|
||||
combined_expansion += '/' + data.expressions[type][expression];
|
||||
|
||||
template = new URITemplate(expression);
|
||||
expansion = template.expand(data.values);
|
||||
equal(expansion, data.expressions[type][expression], type + ': ' + expression);
|
||||
}
|
||||
}
|
||||
|
||||
template = new URITemplate(combined_expression);
|
||||
expansion = template.expand(data.values);
|
||||
equal(expansion, combined_expansion, type + ': combined');
|
||||
});
|
||||
})(i, levels[i]);
|
||||
}
|
||||
test('Data Callbacks', function() {
|
||||
var template = new URITemplate('{var}');
|
||||
var global = function(key) {
|
||||
var data = {'var': 'hello world.html'};
|
||||
return data[key];
|
||||
};
|
||||
var local = function() {
|
||||
return 'hello world.html';
|
||||
};
|
||||
|
||||
equal(template.expand(global), 'hello%20world.html', 'global callback');
|
||||
equal(template.expand({'var': local}), 'hello%20world.html', 'local callback');
|
||||
});
|
||||
|
||||
test('Parse errors', function() {
|
||||
raises(function() {
|
||||
URITemplate('AB{var$}IJ').parse();
|
||||
}, Error, 'Failing invalid variable name');
|
||||
|
||||
raises(function() {
|
||||
URITemplate('AB{$var}IJ').parse();
|
||||
}, Error, 'Failing invalid operator');
|
||||
|
||||
raises(function() {
|
||||
URITemplate('AB{var:3IJ').parse();
|
||||
}, Error, 'Failing missing closing }');
|
||||
|
||||
raises(function() {
|
||||
URITemplate('AB{var:3*}IJ').parse();
|
||||
}, Error, 'Failing invalid modifier');
|
||||
});
|
||||
|
||||
test('Expansion errors', function() {
|
||||
raises(function() {
|
||||
var data = {'composite_var': ['multiple', 'values']};
|
||||
URITemplate('{composite_var:3}').expand(data);
|
||||
}, Error, 'Failing prefix modifier after composite variable');
|
||||
});
|
||||
|
||||
test('noConflict mode', function() {
|
||||
var actual_lib = URITemplate; // actual library; after loading, before noConflict()
|
||||
var unconflicted = URITemplate.noConflict();
|
||||
|
||||
strictEqual( unconflicted, actual_lib, 'noConflict() returns the URITemplate object' );
|
||||
strictEqual( URITemplate, URITemplate_pre_lib, 'noConflict() restores the `URITemplate` variable' );
|
||||
|
||||
// restore for other tests
|
||||
window.URITemplate = actual_lib;
|
||||
});
|
||||
|
||||
test('Periods in varnames', function() {
|
||||
var template = new URITemplate('{hello.world.var}');
|
||||
var literal = 'replacement';
|
||||
var data = {'hello.world.var': literal};
|
||||
var expansion = template.expand(data);
|
||||
equal(expansion, literal, 'period in varname');
|
||||
});
|
||||
|
||||
test('Invalid literals', function () {
|
||||
raises(function() {
|
||||
URITemplate('invalid.char}acter').parse();
|
||||
}, Error, 'Failing invalid literal');
|
||||
});
|
||||
|
||||
test('Strict mode', function () {
|
||||
raises(function() {
|
||||
new URITemplate("/{foo}/bar").expand({ foobar: 123 }, { strict: true });
|
||||
}, Error, 'Missing expansion value for variable in strict mode.');
|
||||
});
|
||||
|
||||
})();
|
||||
1941
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/urls.js
vendored
Normal file
1941
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/test/urls.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
239
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/uri-template.html
vendored
Normal file
239
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/uri-template.html
vendored
Normal file
@@ -0,0 +1,239 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>URI.js - URI-Template</title>
|
||||
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
|
||||
|
||||
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
|
||||
<script src="prettify/prettify.js" type="text/javascript"></script>
|
||||
<script src="screen.js" type="text/javascript"></script>
|
||||
<link href="screen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
|
||||
<script src="src/URI.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-8922143-3']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.tpl-operator {
|
||||
font-weight: bold;
|
||||
color: #669933;
|
||||
}
|
||||
.tpl-variable {
|
||||
font-weight: bold;
|
||||
color: #336699;
|
||||
}
|
||||
.tpl-modifier {
|
||||
font-weight: bold;
|
||||
color: #663399;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 10px;
|
||||
background: #EEE;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border: 1px solid #AAA;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
td, th {
|
||||
border: 1px solid #AAA;
|
||||
text-align: left;
|
||||
padding: 3px;
|
||||
}
|
||||
th {
|
||||
background: #EEE;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
|
||||
|
||||
<div id="container">
|
||||
<h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
|
||||
|
||||
<ul class="menu">
|
||||
<li><a href="/URI.js/">Intro</a></li>
|
||||
<li><a href="about-uris.html">Understanding URIs</a></li>
|
||||
<li><a href="docs.html">API-Documentation</a></li>
|
||||
<li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
|
||||
<li class="active"><a href="uri-template.html">URI Template</a></li>
|
||||
<li><a href="build.html">Build</a></li>
|
||||
<li><a href="http://rodneyrehm.de/en/">Author</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>URI Template</h2>
|
||||
|
||||
<p>As of version 1.7.0 URI.js includes an implementation of URI Templates, as specified in <a href="http://tools.ietf.org/html/rfc6570">RFC 6570</a> (Level 4, March 2012).</p>
|
||||
|
||||
|
||||
<h2>Using URI Templates</h2>
|
||||
|
||||
<pre class="prettyprint lang-js">
|
||||
// creating a new URI Template
|
||||
var template = new URITemplate("http://example.org/{file}");
|
||||
var result = template.expand({file: "hello world.html"});
|
||||
result === "http://example.org/hello%20world.html";
|
||||
|
||||
// of course you can call the constructor like a function and chain things:
|
||||
result = URITemplate("http://example.org/{file}")
|
||||
.expand({file: "hello world.html"});
|
||||
result === "http://example.org/hello%20world.html";
|
||||
|
||||
// access via URI
|
||||
result = URI.expand("http://example.org/{file}", {file: "hello world.html"});
|
||||
// result == new URI("http://example.org/hello%20world.html");
|
||||
|
||||
// expand() accepts data-callbacks:
|
||||
template.expand(function(key) {
|
||||
var data = {file: "hello world.html"};
|
||||
return data[key];
|
||||
});
|
||||
|
||||
// expand() accepts key-callbacks:
|
||||
template.expand({file : function(key) {
|
||||
return "hello world.html";
|
||||
}});
|
||||
|
||||
// Using strict mode
|
||||
var template = new URITemplate("http://example.org/{file}");
|
||||
var result = template.expand({filename: "hello world.html"}, { strict: true });
|
||||
// Uncaught Error: Missing expansion value for variable "file"
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
<h2>URI Template Syntax</h2>
|
||||
|
||||
<p><em>Expressions</em> are placeholders which are to be substituted by the values their variables reference.</p>
|
||||
<ul>
|
||||
<li><code>http://example.org/~<strong>{<em class="tpl-variable">username</em>}</strong>/</code></li>
|
||||
<li><code>http://example.org/dictionary/<strong>{<em class="tpl-variable">term</em><span class="tpl-modifier">:1</span>}</strong>/<strong>{<em class="tpl-variable">term</em>}</strong></code></li>
|
||||
<li><code>http://example.org/search<strong>{<span class="tpl-operator">?</span><em class="tpl-variable">q</em><span class="tpl-modifier">*</span>,<em class="tpl-variable">lang</em>}</strong></code></li>
|
||||
</ul>
|
||||
<p>
|
||||
An expression consists of an <span class="tpl-operator">operator</span> and a (comma-separated) list of <em>variable-specifications</em>.
|
||||
A variable-specification consists of a <em class="tpl-variable">variable</em> and an optional <em class="tpl-modifier">modifier</em>.
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
<p>Given the template</p>
|
||||
<pre><code>http://example.org/~<strong>{<em class="tpl-variable">username</em>}</strong>/<strong>{<em class="tpl-variable">term</em><span class="tpl-modifier">:1</span>}</strong>/<strong>{<em class="tpl-variable">term</em>}</strong><strong>{<span class="tpl-operator">?</span><em class="tpl-variable">q</em><span class="tpl-modifier">*</span>,<em class="tpl-variable">lang</em>}</strong></code></pre>
|
||||
<p>and the following data: </p>
|
||||
<pre><code>{username: "rodneyrehm", term: "hello world", q: {a: "mars", b: "jupiter"}, lang: "en"}</code></pre>
|
||||
<p>the expansion looks as follows:
|
||||
<pre><code>"http://example.org/~rodneyrehm/h/hello%20world?a=mars&b=jupiter&lang=en"</code></pre>
|
||||
<hr>
|
||||
|
||||
<p>List of supported <span class="tpl-operator">operators</span>:</p>
|
||||
<table>
|
||||
<tr><th>Operator</th><th>Description</th></tr>
|
||||
<tr><td><code><em>None</em></code></td><td>Simple String Expansion;</td></tr>
|
||||
<tr><td><code>+</code></td><td>Reserved character strings;</td></tr>
|
||||
<tr><td><code>#</code></td><td>Fragment identifiers prefixed by "#";</td></tr>
|
||||
<tr><td><code>.</code></td><td>Name labels or extensions prefixed by ".";</td></tr>
|
||||
<tr><td><code>/</code></td><td>Path segments prefixed by "/";</td></tr>
|
||||
<tr><td><code>;</code></td><td>Path parameter name or name=value pairs prefixed by ";";</td></tr>
|
||||
<tr><td><code>?</code></td><td>Query component beginning with "?" and consisting of name=value pairs separated by "&"; and,</td></tr>
|
||||
<tr><td><code>&</code></td><td>Continuation of query-style &name=value pairs within a literal query component.</td></tr>
|
||||
</table>
|
||||
|
||||
<p>List of supported <span class="tpl-modifier">modifiers</span>:</p>
|
||||
<table>
|
||||
<tr><th>Modifier</th><th>Description</th></tr>
|
||||
<tr><td><code><em>None</em></code></td><td>No modification, arrays and objects are joined with ","</td></tr>
|
||||
<tr><td><code>*</code></td><td>Explode arrays and objects (see tables below)</td></tr>
|
||||
<tr><td><code>:3</code></td><td>Substring of the first 3 characters of the variable's value</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>Strings and Numbers</h3>
|
||||
<p>
|
||||
Given <code>{"var": "hello[world]"}</code>, the expression <code>{var}</code> expands to <code>hello%5Bworld%5D</code>.
|
||||
The following table shows an output matrix for every possible operator/modifier combination produced for <code>string</code> input.
|
||||
</p>
|
||||
<table>
|
||||
<tr><th></th><th colspan="3">Modifier</th></tr>
|
||||
<tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
|
||||
<tr><td><code><em>None</em></code></td><td><code>hello%5Bworld%5D</code></td><td><code>hello%5Bworld%5D</code></td><td><code>he</code></td></tr>
|
||||
<tr><td><code><em>+</em></code></td><td><code>hello[world]</code></td><td><code>hello[world]</code></td><td><code>he</code></td></tr>
|
||||
<tr><td><code>#</code></td><td><code>#hello[world]</code></td><td><code>#hello[world]</code></td><td><code>#he</code></td></tr>
|
||||
<tr><td><code>.</code></td><td><code>.hello%5Bworld%5D</code></td><td><code>.hello%5Bworld%5D</code></td><td><code>.he</code></td></tr>
|
||||
<tr><td><code>/</code></td><td><code>/hello%5Bworld%5D</code></td><td><code>/hello%5Bworld%5D</code></td><td><code>/he</code></td></tr>
|
||||
<tr><td><code>;</code></td><td><code>;var=hello%5Bworld%5D</code></td><td><code>;var=hello%5Bworld%5D</code></td><td><code>;var=he</code></td></tr>
|
||||
<tr><td><code>?</code></td><td><code>?var=hello%5Bworld%5D</code></td><td><code>?var=hello%5Bworld%5D</code></td><td><code>?var=he</code></td></tr>
|
||||
<tr><td><code>&</code></td><td><code>&var=hello%5Bworld%5D</code></td><td><code>&var=hello%5Bworld%5D</code></td><td><code>&var=he</code></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h3>Arrays</h3>
|
||||
<p>
|
||||
Given <code>{"var": ["one", "two", "three"]}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
|
||||
The following table shows an output matrix for every possible operator/modifier combination produced for <code>array</code> input.
|
||||
</p>
|
||||
<table>
|
||||
<tr><th></th><th colspan="3">Modifier</th></tr>
|
||||
<tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
|
||||
<tr><td><code><em>None</em></code></td><td><code>one,two,three</code></td><td><code>one,two,three</code></td><td><code>on,tw,th</code></td></tr>
|
||||
<tr><td><code><em>+</em></code></td><td><code>one,two,three</code></td><td><code>one,two,three</code></td><td><code>on,tw,th</code></td></tr>
|
||||
<tr><td><code>#</code></td><td><code>#one,two,three</code></td><td><code>#one,two,three</code></td><td><code>#on,tw,th</code></td></tr>
|
||||
<tr><td><code>.</code></td><td><code>.one,two,three</code></td><td><code>.one.two.three</code></td><td><code>.on,tw,th</code></td></tr>
|
||||
<tr><td><code>/</code></td><td><code>/one,two,three</code></td><td><code>/one/two/three</code></td><td><code>/on,tw,th</code></td></tr>
|
||||
<tr><td><code>;</code></td><td><code>;var=one,two,three</code></td><td><code>;var=one;var=two;var=three</code></td><td><code>;var=on,tw,th</code></td></tr>
|
||||
<tr><td><code>?</code></td><td><code>?var=one,two,three</code></td><td><code>?var=one&var=two&var=three</code></td><td><code>?var=on,tw,th</code></td></tr>
|
||||
<tr><td><code>&</code></td><td><code>&var=one,two,three</code></td><td><code>&var=one&var=two&var=three</code></td><td><code>&var=on,tw,th</code></td></tr>
|
||||
</table>
|
||||
|
||||
<h3>Objects ("plain objects" / "hash maps")</h3>
|
||||
<p>
|
||||
Given <code>{"var": {"one": "alpha", "two": "bravo"}}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
|
||||
The following table shows an output matrix for every possible operator/modifier combination produced for <code>object</code> input.
|
||||
</p>
|
||||
<table>
|
||||
<tr><th></th><th colspan="3">Modifier</th></tr>
|
||||
<tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
|
||||
<tr><td><code><em>None</em></code></td><td><code>one,alpha,two,bravo</code></td><td><code>one=alpha,two=bravo</code></td><td><code>on,al,tw,br</code></td></tr>
|
||||
<tr><td><code><em>+</em></code></td><td><code>one,alpha,two,bravo</code></td><td><code>one=alpha,two=bravo</code></td><td><code>on,al,tw,br</code></td></tr>
|
||||
<tr><td><code>#</code></td><td><code>#one,alpha,two,bravo</code></td><td><code>#one=alpha,two=bravo</code></td><td><code>#on,al,tw,br</code></td></tr>
|
||||
<tr><td><code>.</code></td><td><code>.one,alpha,two,bravo</code></td><td><code>.one=alpha.two=bravo</code></td><td><code>.on,al,tw,br</code></td></tr>
|
||||
<tr><td><code>/</code></td><td><code>/one,alpha,two,bravo</code></td><td><code>/one=alpha/two=bravo</code></td><td><code>/on,al,tw,br</code></td></tr>
|
||||
<tr><td><code>;</code></td><td><code>;var=one,alpha,two,bravo</code></td><td><code>;one=alpha;two=bravo</code></td><td><code>;var=on,al,tw,br</code></td></tr>
|
||||
<tr><td><code>?</code></td><td><code>?var=one,alpha,two,bravo</code></td><td><code>?one=alpha&two=bravo</code></td><td><code>?var=on,al,tw,br</code></td></tr>
|
||||
<tr><td><code>&</code></td><td><code>&var=one,alpha,two,bravo</code></td><td><code>&one=alpha&two=bravo</code></td><td><code>&var=on,al,tw,br</code></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<h2>Limitations</h2>
|
||||
<p>URI Template is a <em>Proposed Standard</em> and because of that I did not want to deviate from it. That said I'm not at all happy with how the specification turned out. Here are some of my thoughts:</p>
|
||||
<ul>
|
||||
<li>The <em>explode modifier</em> works the wrong way. <code>{?some_object}</code> should lead to <code>?foo=bar&hello=world</code>, as this is the common expansion</li>
|
||||
<li>The <em>prefix modifier</em> (which I would've named <em>truncate modifier</em>) only has an end-offset.
|
||||
The specification says it's »used to partition an identifier space hierarchically«. <code>abc</code> may become <code>a/bc</code> or <code>a/ab/abc</code>.
|
||||
But there is no way of modifying output to <code>a/b/c</code> or <code>a/b/abc</code>. Whenever I had to partition identifier spaces, I used one of the latter patterns.</li>
|
||||
<li>Operators like <code>.</code> automatically prefix the expansion. So <code>{"var": ["filename", "extension"]}</code> and <code>{.var*}</code> results in <code>.filename.extension</code> - obviously not what I wanted.</li>
|
||||
<li>Variable names (<em>varname</em>) may only contain <code>ALPHA / DIGIT / "_" / pct-encoded</code> and may not be decoded for resolving the reference. This simply feels weird, especially the "may not be decoded" part.</li>
|
||||
<li>Other possible modifiers could include some simple character-munging like <em>UPPERCASE</em>, <em>LOWERCASE</em>, <em>CAPITALCASE</em></li>
|
||||
<li><code>{/var,empty,empty}</code> results in <code>/foobar//</code> - clearly not what one intended</li>
|
||||
<li><code>{var}</code> and <code>{"var" : {"a": "1", "b": "2"}}</code> results in <code>a,1,b,2</code> - excusemewhat? I would've expected <code>a=1,b=2</code> or <code>a:1,b:2</code> (in a perverse parallel universe).</li>
|
||||
<li>Spaces in the <em>query string</em> should be encoded to <code>+</code>, not <code>%20</code> according to <a href="http://www.w3.org/TR/html401/interact/forms.html#form-content-type">application/x-www-form-urlencoded</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
37
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/utils/SLDs.php
vendored
Normal file
37
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/utils/SLDs.php
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
$map = array();
|
||||
|
||||
// grab list of known SLDs from https://github.com/gavingmiller/second-level-domains
|
||||
// using curl since file_get_contents() won't do SSL...
|
||||
$url = 'https://raw.github.com/gavingmiller/second-level-domains/master/SLDs.csv';
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_setopt($curl, CURLOPT_MAXREDIRS, 10);
|
||||
$source = curl_exec($curl);
|
||||
|
||||
|
||||
// $source is a CSV, but a rather simple one I wouldn't go through the hassle of using str_getcsv() for
|
||||
$source = preg_split("/\r\n|\r|\n/", $source);
|
||||
foreach ($source as $line) {
|
||||
$t = explode(',', $line);
|
||||
$tld = strtolower(substr($t[0], 1)); // skip the leading dot
|
||||
$sld = strtolower(substr($t[1], 1, strrpos($t[1], '.') - 1));
|
||||
if (!$tld || !$sld || strpos($sld, '.') !== false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$map[$tld][] = $sld;
|
||||
}
|
||||
|
||||
// source seems to be tainted with duplicates (and false SLDs like "govt.uk")
|
||||
// for now we don't care about false (or missing) SLDs
|
||||
foreach ($map as $tld => &$slds) {
|
||||
$slds = array_unique($slds);
|
||||
sort($slds);
|
||||
$slds = join('|', $slds);
|
||||
}
|
||||
|
||||
echo json_encode($map);
|
||||
101
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/utils/sld.js
vendored
Normal file
101
mayan/apps/appearance/static/appearance/vendors/URI.js-1.19.1/utils/sld.js
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
var fs = require('fs');
|
||||
var url = require('url');
|
||||
var http = require('http');
|
||||
var domains = {};
|
||||
|
||||
/*
|
||||
Problem with PublicSuffix:
|
||||
The list not only contains TLDs/SLDs, but also domains like "dyndns.org".
|
||||
While this may be useful for Cookie-Origin-Policy, these domains are possibly
|
||||
being handled by URI.js, considering URI("//dyndns.org").tld("com").
|
||||
The list does not distinguish "official" TLDs from such domains.
|
||||
(At least I have problems with treating "cc.ga.us" as a SLD)
|
||||
*/
|
||||
|
||||
http.get("http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1", function(res) {
|
||||
res.on('data', function(data) {
|
||||
data.toString().replace(/\r/g, "").split("\n").forEach(function(line) {
|
||||
// skip empty lines, comments and TLDs
|
||||
if (!line || (line[0] === "/" && line[1] === "/") || line.indexOf('.') === -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parts = line.split('.');
|
||||
var sld = parts.slice(0, -1).join('.');
|
||||
var tld = parts.slice(-1);
|
||||
|
||||
if (parts.length < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!domains[tld]) {
|
||||
domains[tld] = [];
|
||||
}
|
||||
|
||||
domains[tld].push(sld);
|
||||
});
|
||||
}).on('end', function() {
|
||||
//file.end();
|
||||
for (var tld in domains) {
|
||||
domains[tld].sort();
|
||||
|
||||
// ! and * are sorted to the top
|
||||
if (domains[tld][0][0] == '!') {
|
||||
// we have wildcards and exclusions
|
||||
} else if (domains[tld][0][0] == '*') {
|
||||
// we have wildcards
|
||||
} else {
|
||||
// simple list
|
||||
}
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(domains, null, 2));
|
||||
//console.log(domains.jp);
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
|
||||
|
||||
// https://github.com/oncletom/tld.js
|
||||
// generates a 430KB file, which is inacceptible for the web
|
||||
|
||||
build a regex pattern from this -- http://publicsuffix.org/list/
|
||||
"!exclusion"
|
||||
"*" wildcard
|
||||
|
||||
uk: [ '!bl',
|
||||
'!british-library',
|
||||
'!jet',
|
||||
'!mod',
|
||||
'!national-library-scotland',
|
||||
'!nel',
|
||||
'!nic',
|
||||
'!nls',
|
||||
'!parliament',
|
||||
'*',
|
||||
'*.nhs',
|
||||
'*.police',
|
||||
'*.sch',
|
||||
'blogspot.co' ]
|
||||
|
||||
jp: [ '!city.kawasaki',
|
||||
'!city.kitakyushu',
|
||||
'!city.kobe',
|
||||
'!city.nagoya',
|
||||
'!city.sapporo',
|
||||
'!city.sendai',
|
||||
'!city.yokohama',
|
||||
'*.kawasaki',
|
||||
'*.kitakyushu',
|
||||
'*.kobe',
|
||||
'*.nagoya',
|
||||
'*.sapporo',
|
||||
'*.sendai',
|
||||
'*.yokohama',
|
||||
'abashiri.hokkaido',
|
||||
'abeno.osaka',
|
||||
'abiko.chiba',
|
||||
… ]
|
||||
|
||||
*/
|
||||
50
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.circleci/config.yml
vendored
Normal file
50
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.circleci/config.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# Javascript Node CircleCI 2.0 configuration file
|
||||
#
|
||||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
|
||||
#
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
# specify the version you desire here
|
||||
- image: circleci/node:8
|
||||
|
||||
# Specify service dependencies here if necessary
|
||||
# CircleCI maintains a library of pre-built images
|
||||
# documented at https://circleci.com/docs/2.0/circleci-images/
|
||||
# - image: circleci/mongo:3.4.4
|
||||
|
||||
working_directory: ~/repo
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run:
|
||||
name: "Checking Versions"
|
||||
command: |
|
||||
node --version
|
||||
npm --version
|
||||
|
||||
- run:
|
||||
name: update-npm
|
||||
command: 'sudo npm install -g npm@latest'
|
||||
|
||||
# Download and cache dependencies
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}
|
||||
|
||||
- run: npm install
|
||||
|
||||
- save_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ./node_modules
|
||||
|
||||
- run:
|
||||
name: "Checking Versions"
|
||||
command: |
|
||||
node --version
|
||||
npm --version
|
||||
|
||||
# run tests!
|
||||
- run: grunt test
|
||||
21
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.editorconfig
vendored
Normal file
21
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.editorconfig
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# http://editorconfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[{*.md,*.scss,*.css,*.php,*.yml,package.json}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
359
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.eslintrc.js
vendored
Normal file
359
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.eslintrc.js
vendored
Normal file
@@ -0,0 +1,359 @@
|
||||
module.exports = {
|
||||
"env": {
|
||||
"browser": true,
|
||||
"jquery": true,
|
||||
"node": true,
|
||||
"amd": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 5,
|
||||
"sourceType": "script"
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"rules": {
|
||||
"array-bracket-spacing": [
|
||||
"warn",
|
||||
"never"
|
||||
],
|
||||
"array-callback-return": "warn",
|
||||
"arrow-body-style": "error",
|
||||
"arrow-parens": "error",
|
||||
"arrow-spacing": "error",
|
||||
"block-scoped-var": "warn",
|
||||
"block-spacing": [
|
||||
"warn",
|
||||
"always"
|
||||
],
|
||||
"brace-style": [
|
||||
"error",
|
||||
"1tbs"
|
||||
],
|
||||
"callback-return": "error",
|
||||
"camelcase": [
|
||||
"warn",
|
||||
{ "properties": "always" }
|
||||
],
|
||||
"capitalized-comments": "off",
|
||||
"class-methods-use-this": "error",
|
||||
"comma-dangle": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"comma-spacing": "error",
|
||||
"comma-style": "error",
|
||||
"complexity": [
|
||||
"warn",
|
||||
20
|
||||
],
|
||||
"computed-property-spacing": "error",
|
||||
"consistent-return": "error",
|
||||
"consistent-this": [
|
||||
"error",
|
||||
"that",
|
||||
"outerThis",
|
||||
"self"
|
||||
],
|
||||
"curly": "error",
|
||||
"default-case": "error",
|
||||
"dot-location": [
|
||||
"error",
|
||||
"property"
|
||||
],
|
||||
"dot-notation": "error",
|
||||
"eol-last": "error",
|
||||
"eqeqeq": "error",
|
||||
"func-call-spacing": "error",
|
||||
"func-name-matching": "error",
|
||||
"func-names": "off",
|
||||
"func-style": "off",
|
||||
"generator-star-spacing": "error",
|
||||
"global-require": "error",
|
||||
"guard-for-in": "warn",
|
||||
"handle-callback-err": "error",
|
||||
"id-blacklist": "error",
|
||||
"id-length": [
|
||||
"warn",
|
||||
{ "exceptions": ["$","e","i","j"] }
|
||||
],
|
||||
"id-match": "error",
|
||||
"indent": [
|
||||
"error",
|
||||
"tab"
|
||||
],
|
||||
"init-declarations": "off",
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": [
|
||||
"warn", {
|
||||
"singleLine": {
|
||||
"beforeColon": false,
|
||||
"afterColon": true
|
||||
},
|
||||
"multiLine": {
|
||||
"beforeColon": true,
|
||||
"afterColon": true,
|
||||
"align": "colon"
|
||||
}
|
||||
}
|
||||
],
|
||||
"keyword-spacing": "error",
|
||||
"line-comment-position": "off",
|
||||
"linebreak-style": [
|
||||
"warn",
|
||||
"unix"
|
||||
],
|
||||
"lines-around-comment": "off",
|
||||
"lines-around-directive": "off",
|
||||
"max-depth": "warn",
|
||||
"max-len": "off",
|
||||
"max-lines": "off",
|
||||
"max-nested-callbacks": "error",
|
||||
"max-params": [
|
||||
"warn",
|
||||
{ "max": 4 }
|
||||
],
|
||||
"max-statements": [
|
||||
"warn",
|
||||
{ "max": 20 }
|
||||
],
|
||||
"max-statements-per-line": [
|
||||
"error",
|
||||
{ "max": 2 }
|
||||
],
|
||||
"multiline-ternary": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"new-parens": "error",
|
||||
"newline-after-var": "warn",
|
||||
"newline-before-return": "error",
|
||||
"newline-per-chained-call": [
|
||||
"warn",
|
||||
{ "ignoreChainWithDepth": 3 }
|
||||
],
|
||||
"no-alert": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-await-in-loop": "error",
|
||||
"no-bitwise": "error",
|
||||
"no-caller": "error",
|
||||
"no-catch-shadow": "warn",
|
||||
"no-compare-neg-zero": "error",
|
||||
"no-confusing-arrow": "error",
|
||||
"no-continue": "warn",
|
||||
"no-div-regex": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-else-return": "error",
|
||||
"no-empty": [
|
||||
"error",
|
||||
{ "allowEmptyCatch": true }
|
||||
],
|
||||
"no-empty-function": [
|
||||
"error",
|
||||
{ "allow": ["functions"] }
|
||||
],
|
||||
"no-eq-null": "error",
|
||||
"no-eval": [
|
||||
"error",
|
||||
{ "allowIndirect": true }
|
||||
],
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-extra-parens": [
|
||||
"warn",
|
||||
"all",
|
||||
{
|
||||
"returnAssign": false,
|
||||
"nestedBinaryExpressions": false
|
||||
}
|
||||
],
|
||||
"no-floating-decimal": "error",
|
||||
"no-global-assign": "error",
|
||||
"no-implicit-globals": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-inline-comments": "off",
|
||||
"no-inner-declarations": [
|
||||
"warn",
|
||||
"both"
|
||||
],
|
||||
"no-invalid-this": "off",
|
||||
"no-iterator": "error",
|
||||
"no-label-var": "error",
|
||||
"no-labels": "error",
|
||||
"no-lone-blocks": "error",
|
||||
"no-lonely-if": "error",
|
||||
"no-loop-func": "error",
|
||||
"no-magic-numbers": [
|
||||
"warn",
|
||||
{
|
||||
"ignore": [0,1],
|
||||
"ignoreArrayIndexes": true
|
||||
}
|
||||
],
|
||||
"no-mixed-operators": "error",
|
||||
"no-mixed-requires": "error",
|
||||
"no-multi-assign": "warn",
|
||||
"no-multi-spaces": "error",
|
||||
"no-multi-str": "error",
|
||||
"no-multiple-empty-lines": [
|
||||
"error",
|
||||
{
|
||||
max: 2,
|
||||
maxEOF: 1,
|
||||
maxBOF: 0
|
||||
}
|
||||
],
|
||||
"no-negated-condition": "warn",
|
||||
"no-nested-ternary": "error",
|
||||
"no-new": "error",
|
||||
"no-new-func": "error",
|
||||
"no-new-object": "error",
|
||||
"no-new-require": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "off",
|
||||
"no-path-concat": "error",
|
||||
"no-plusplus": "off",
|
||||
"no-process-env": "error",
|
||||
"no-process-exit": "error",
|
||||
"no-proto": "error",
|
||||
"no-prototype-builtins": "warn",
|
||||
"no-restricted-globals": "error",
|
||||
"no-restricted-imports": "error",
|
||||
"no-restricted-modules": "error",
|
||||
"no-restricted-properties": "error",
|
||||
"no-restricted-syntax": "error",
|
||||
"no-return-assign": "error",
|
||||
"no-return-await": "error",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "error",
|
||||
"no-shadow": "warn",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-spaced-func": "error",
|
||||
"no-sync": "warn",
|
||||
"no-tabs": "off",
|
||||
"no-template-curly-in-string": "error",
|
||||
"no-ternary": "warn",
|
||||
"no-throw-literal": "warn",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-undefined": "warn",
|
||||
"no-underscore-dangle": "error",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-unsafe-negation": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
"vars": "local",
|
||||
"args": "none"
|
||||
}
|
||||
],
|
||||
"no-use-before-define": [
|
||||
"error",
|
||||
{
|
||||
"functions": false
|
||||
}
|
||||
],
|
||||
"no-useless-call": "error",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-escape": "error",
|
||||
"no-useless-rename": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-var": "off",
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "warn",
|
||||
"no-whitespace-before-property": "error",
|
||||
"no-with": "error",
|
||||
"nonblock-statement-body-position": "error",
|
||||
"object-curly-newline": "error",
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"never",
|
||||
{
|
||||
"arraysInObjects": true,
|
||||
"objectsInObjects": true
|
||||
}
|
||||
],
|
||||
"object-property-newline": [
|
||||
"error",
|
||||
{
|
||||
"allowMultiplePropertiesPerLine": true
|
||||
}
|
||||
],
|
||||
"object-shorthand": [
|
||||
"warn",
|
||||
"consistent"
|
||||
],
|
||||
"one-var": "off",
|
||||
"one-var-declaration-per-line": "off",
|
||||
"operator-assignment": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"operator-linebreak": "error",
|
||||
"padded-blocks": "off",
|
||||
"prefer-arrow-callback": "off",
|
||||
"prefer-const": "error",
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-numeric-literals": "off",
|
||||
"prefer-promise-reject-errors": "error",
|
||||
"prefer-rest-params": "off",
|
||||
"prefer-spread": "off",
|
||||
"prefer-template": "off",
|
||||
"quote-props": [
|
||||
"warn",
|
||||
"consistent-as-needed"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"single",
|
||||
{
|
||||
"avoidEscape": true,
|
||||
"allowTemplateLiterals": true
|
||||
}
|
||||
],
|
||||
"radix": "error",
|
||||
"require-await": "error",
|
||||
"require-jsdoc": "off",
|
||||
"rest-spread-spacing": "error",
|
||||
"semi": "error",
|
||||
"semi-spacing": "error",
|
||||
"sort-imports": "error",
|
||||
"sort-keys": "warn",
|
||||
"sort-vars": "warn",
|
||||
"space-before-blocks": "warn",
|
||||
"space-before-function-paren": "off",
|
||||
"space-in-parens": "warn",
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": ["error", "always", {
|
||||
"line": {
|
||||
"markers": ["/"],
|
||||
"exceptions": ["-", "+"]
|
||||
},
|
||||
"block": {
|
||||
"markers": ["!"],
|
||||
"exceptions": ["*"],
|
||||
"balanced": true
|
||||
}
|
||||
}],
|
||||
"strict": [
|
||||
"warn",
|
||||
"function"
|
||||
],
|
||||
"symbol-description": "off",
|
||||
"template-curly-spacing": "error",
|
||||
"template-tag-spacing": "error",
|
||||
"unicode-bom": "error",
|
||||
"valid-jsdoc": "warn",
|
||||
"vars-on-top": "warn",
|
||||
"wrap-iife": "error",
|
||||
"wrap-regex": "off",
|
||||
"yield-star-spacing": "error",
|
||||
"yoda": "error"
|
||||
}
|
||||
};
|
||||
17
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.github/issue_template.md
vendored
Normal file
17
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.github/issue_template.md
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
Please review [Instructions for Reporting a Bug](https://github.com/jquery-form/form/blob/master/CONTRIBUTING.md#reporting-a-bug).
|
||||
|
||||
### Description:
|
||||
|
||||
### Expected Behavior:
|
||||
|
||||
### Actual behavior:
|
||||
|
||||
### Versions:
|
||||
**LoadJSON:**
|
||||
**jQuery:**
|
||||
**Browsers:**
|
||||
|
||||
### Demonstration
|
||||
Link to demonstration of issue in [JSFiddle](https://jsfiddle.net/) or [CodePen](https://codepen.io/):
|
||||
|
||||
### Steps to reproduce:
|
||||
298
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.gitignore
vendored
Normal file
298
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.gitignore
vendored
Normal file
@@ -0,0 +1,298 @@
|
||||
#################
|
||||
## Development Environment
|
||||
#################
|
||||
|
||||
cache/
|
||||
deploy.txt
|
||||
.svn
|
||||
prepros.cfg
|
||||
|
||||
# Node
|
||||
node_modules
|
||||
|
||||
# SASS Cache
|
||||
*.scssc
|
||||
|
||||
|
||||
#############
|
||||
## OS generated files
|
||||
#############
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Mac crap
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
|
||||
|
||||
#################
|
||||
## Compiled source
|
||||
#################
|
||||
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.so
|
||||
|
||||
|
||||
#################
|
||||
## Packages
|
||||
#################
|
||||
|
||||
# it's better to unpack these files and commit the raw source
|
||||
# git has its own built in compression methods
|
||||
*.7z
|
||||
*.dmg
|
||||
*.gz
|
||||
*.iso
|
||||
*.jar
|
||||
*.rar
|
||||
*.tar
|
||||
*.zip
|
||||
|
||||
|
||||
#################
|
||||
## Logs and databases
|
||||
#################
|
||||
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
|
||||
|
||||
#################
|
||||
## SublimeText
|
||||
#################
|
||||
|
||||
# cache files for sublime text
|
||||
*.tmlanguage.cache
|
||||
*.tmPreferences.cache
|
||||
*.stTheme.cache
|
||||
|
||||
# workspace files are user-specific
|
||||
*.sublime-workspace
|
||||
|
||||
# project files
|
||||
*.sublime-project
|
||||
# sftp configuration file
|
||||
sftp-config.json
|
||||
|
||||
|
||||
#################
|
||||
## Dreamweaver
|
||||
#################
|
||||
|
||||
_notes
|
||||
*dwsync.xml
|
||||
_includes/spry
|
||||
|
||||
|
||||
#################
|
||||
## Eclipse
|
||||
#################
|
||||
|
||||
*.pydevproject
|
||||
.project
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.classpath
|
||||
.settings
|
||||
.loadpath
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# CDT-specific
|
||||
.cproject
|
||||
|
||||
# PDT-specific
|
||||
.buildpath
|
||||
|
||||
|
||||
#################
|
||||
## Visual Studio
|
||||
#################
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
build/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.scc
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# NuGet Packages Directory
|
||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||
#packages/
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.[Pp]ublish.xml
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
App_Data/*.mdf
|
||||
App_Data/*.ldf
|
||||
|
||||
|
||||
#############
|
||||
## Python
|
||||
#############
|
||||
|
||||
*.py[cod]
|
||||
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
build/
|
||||
eggs/
|
||||
parts/
|
||||
var/
|
||||
sdist/
|
||||
develop-eggs/
|
||||
.installed.cfg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
|
||||
#Translations
|
||||
*.mo
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
||||
11
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.travis.yml
vendored
Normal file
11
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/.travis.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "8"
|
||||
script:
|
||||
- grunt test
|
||||
cache:
|
||||
bundler: true
|
||||
directories:
|
||||
- "node_modules" # NPM packages
|
||||
before_install:
|
||||
- if [[ `npm -v ` != 5* ]]; then npm i -g npm@5; fi
|
||||
74
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/CODE_OF_CONDUCT.md
vendored
Normal file
74
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/CODE_OF_CONDUCT.md
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
109
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/CONTRIBUTING.md
vendored
Normal file
109
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
# Contributing to jQuery Form
|
||||
|
||||
Want to contribute to jQuery Form? That's great! Contributions are most welcome!
|
||||
Here are a couple of guidelines that will help you contribute. Before we get started: Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md) to ensure that this project is a welcoming place for **everyone** to contribute to. By participating in this project you agree to abide by its terms.
|
||||
|
||||
#### Overview
|
||||
|
||||
* [Contribution workflow](#contribution-workflow)
|
||||
* [Testing](#testing)
|
||||
* [Reporting a bug](#reporting-a-bug)
|
||||
* [Contributing to an existing issue](#contributing-to-an-existing-issue)
|
||||
* [Feature Requests](#feature-requests)
|
||||
* [Additional info](#additional-info)
|
||||
|
||||
## Contribution workflow
|
||||
|
||||
1. Fork the repository in GitHub with the `Fork` button.
|
||||
2. Switch to a new branch (ie. `new-feature`), and work from there:
|
||||
`git checkout -b new-feature`
|
||||
3. Make your feature addition or bug fix.
|
||||
4. After setting up your [testing enviroment](#testing), run the tests:
|
||||
|
||||
```shell
|
||||
grunt test
|
||||
```
|
||||
|
||||
If the tests all pass, move on to step 5.
|
||||
|
||||
5. Send a pull request (PR). Bonus points for topic branches.
|
||||
* Please make sure all of your commits are atomic (one feature per commit).
|
||||
* Use sensible commit messages.
|
||||
* Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
|
||||
```shell
|
||||
$ git commit -m "A brief summary of the commit"
|
||||
>
|
||||
> A paragraph describing what changed and its impact."
|
||||
```
|
||||
* If your PR fixes a separate issue number, include it in the commit message.
|
||||
|
||||
### Things to keep in mind
|
||||
|
||||
* Smaller PRs are likely to be merged more quickly than bigger changes.
|
||||
* If it is a useful PR, it **will** get merged in eventually.
|
||||
* This project is using [Semantic Versioning 2.0.0](http://semver.org/)
|
||||
|
||||
## Testing
|
||||
|
||||
jQuery Form uses [Node.js](https://nodejs.org/), [Grunt](https://gruntjs.com/), [ESLint](http://eslint.org/), [Mocha](https://mochajs.org/), and [Chai](http://chaijs.com/) to automate the building and validation of source code. Here is how to set that up:
|
||||
|
||||
1. Get [Node.js](https://nodejs.org/) (includes [NPM](https://www.npmjs.com/), necessary for the next step)
|
||||
2. Install Grunt CLI:
|
||||
|
||||
```shell
|
||||
npm install -g grunt-cli
|
||||
```
|
||||
|
||||
3. Install dependencies:
|
||||
|
||||
```shell
|
||||
npm install
|
||||
```
|
||||
|
||||
4. Run the tests by opening `test/test.html` in your web browser or using Grunt:
|
||||
|
||||
```shell
|
||||
grunt test
|
||||
```
|
||||
|
||||
## Reporting a bug
|
||||
|
||||
So you've found a bug, and want to help us fix it? Before filing a bug report, please double-check the bug hasn't already been reported. You can do so [on our issue tracker](https://github.com/jquery-form/form/issues?q=is%3Aopen+is%3Aissue). If something hasn't been raised, you can go ahead and create a new issue with the following information:
|
||||
|
||||
* Which version of the plugin are you using?
|
||||
* Which version of the jQuery library are you using?
|
||||
* What browsers (and versions) have you tested in?
|
||||
* How can the error be reproduced?
|
||||
* If possible, include a link to a [JSFiddle](https://jsfiddle.net/) or [CodePen](https://codepen.io/) example of the error.
|
||||
|
||||
If you want to be really thorough, there is a great overview on Stack Overflow of [what you should consider when reporting a bug](https://stackoverflow.com/questions/240323/how-to-report-bugs-the-smart-way).
|
||||
|
||||
It goes without saying that you're welcome to help investigate further and/or find a fix for the bug. If you want to do so, just mention it in your bug report and offer your help!
|
||||
|
||||
## Contributing to an existing issue
|
||||
|
||||
### Finding an issue to work on
|
||||
|
||||
We've got a few open issues and are always glad to get help on that front. You can view the list of issues [here](https://github.com/jquery-form/form/issues). (Here's [a good article](https://medium.freecodecamp.com/finding-your-first-open-source-project-or-bug-to-work-on-1712f651e5ba) on how to find your first bug to fix).
|
||||
|
||||
Before getting to work, take a look at the issue and at the conversation around it. Has someone already offered to work on the issue? Has someone been assigned to the issue? If so, you might want to check with them to see whether they're still actively working on it.
|
||||
|
||||
If the issue is a few months old, it might be a good idea to write a short comment to double-check that the issue or feature is still a valid one to jump on.
|
||||
|
||||
Feel free to ask for more detail on what is expected: are there any more details or specifications you need to know?
|
||||
And if at any point you get stuck: don't hesitate to ask for help.
|
||||
|
||||
### Making your contribution
|
||||
|
||||
We've outlined the contribution workflow [here](#contribution-workflow). If you're a first-timer, don't worry! GitHub has a ton of guides to help you through your first pull request: You can find out more about pull requests [here](https://help.github.com/articles/about-pull-requests/) and about creating a pull request [here](https://help.github.com/articles/creating-a-pull-request/).
|
||||
|
||||
## Feature Requests
|
||||
|
||||
* You can _request_ a new feature by [submitting an issue](https://github.com/jquery-form/form/issues).
|
||||
* If you would like to _implement_ a new feature:
|
||||
* For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
|
||||
* **Small Features** can be crafted and directly [submitted as a Pull Request](#contribution-workflow).
|
||||
|
||||
## Additional info
|
||||
|
||||
Especially if you're a newcomer to Open Source and you've found some little bumps along the way while contributing, we recommend you write about them. [Here](https://medium.freecodecamp.com/new-contributors-to-open-source-please-blog-more-920af14cffd)'s a great article about why writing about your experience is important; this will encourage other beginners to try their luck at Open Source, too!
|
||||
10
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/CONTRIBUTORS.md
vendored
Normal file
10
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/CONTRIBUTORS.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
#Contributors
|
||||
|
||||
###Copyright 2017 Kevin Morris
|
||||
Continuing Work [jQuery Form](https://github.com/jquery-form/form/) by Kevin Morris
|
||||
Project Home: [github.com/jquery-form/form](https://github.com/jquery-form/form/)
|
||||
|
||||
###Copyright 2006-2014 Mike Alsup
|
||||
Original work [jQuery Form](https://github.com/malsup/form/) by Mike Alsup
|
||||
Project Home: [jquery.malsup.com/form](http://jquery.malsup.com/form/)
|
||||
The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX.
|
||||
69
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/Gruntfile.js
vendored
Normal file
69
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/Gruntfile.js
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
meta: {
|
||||
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd HH:MM:ss") %> */'
|
||||
},
|
||||
|
||||
githooks: {
|
||||
options: {
|
||||
hashbang: '#!/bin/sh',
|
||||
template: 'install/template/shell.hb',
|
||||
startMarker: '# GRUNT-GITHOOKS START',
|
||||
endMarker: '# GRUNT-GITHOOKS END'
|
||||
},
|
||||
all: {
|
||||
'pre-commit': 'pre-commit'
|
||||
}
|
||||
},
|
||||
|
||||
eslint: {
|
||||
options: {
|
||||
quiet: true
|
||||
},
|
||||
target: ['src/**/*.js']
|
||||
},
|
||||
|
||||
mocha: {
|
||||
all: {
|
||||
src: ['test/*.html'],
|
||||
},
|
||||
options: {
|
||||
run: true
|
||||
}
|
||||
},
|
||||
|
||||
// Minifies JS files
|
||||
uglify: {
|
||||
options: {
|
||||
output: {
|
||||
comments: /^!|@preserve|@license|@cc_on/i
|
||||
},
|
||||
sourceMap: true,
|
||||
footer: '\n'
|
||||
},
|
||||
dist: {
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: 'src',
|
||||
src: ['*.js','!*.min.js'],
|
||||
dest: 'dist',
|
||||
ext: '.min.js',
|
||||
extDot: 'last'
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Load tasks
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-mocha');
|
||||
grunt.loadNpmTasks('grunt-eslint');
|
||||
grunt.loadNpmTasks('grunt-githooks');
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('lint', [ 'eslint' ]);
|
||||
grunt.registerTask('test', [ 'lint', 'mocha' ]);
|
||||
grunt.registerTask('pre-commit', [ 'test' ]);
|
||||
grunt.registerTask('default', [ 'test', 'uglify' ]);
|
||||
};
|
||||
502
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/LICENSE
vendored
Normal file
502
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/LICENSE
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/LICENSE-MIT
vendored
Normal file
21
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/LICENSE-MIT
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 jquery-form
|
||||
|
||||
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.
|
||||
241
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/README.md
vendored
Normal file
241
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/README.md
vendored
Normal file
@@ -0,0 +1,241 @@
|
||||
# jQuery Form [](https://travis-ci.org/jquery-form/form)
|
||||
|
||||
## Overview
|
||||
The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allows you to have full control over how the data is submitted.
|
||||
|
||||
No special markup is needed, just a normal form. Submitting a form with AJAX doesn't get any easier than this!
|
||||
|
||||
## Community
|
||||
Want to contribute to jQuery Form? Awesome! See [CONTRIBUTING](CONTRIBUTING.md) for more information.
|
||||
|
||||
### Code of Conduct
|
||||
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md) to ensure that this project is a welcoming place for **everyone** to contribute to. By participating in this project you agree to abide by its terms.
|
||||
|
||||
## Requirements
|
||||
Requires jQuery 1.7.2 or later. Compatible with jQuery 2.x.x and 3.x.x.
|
||||
|
||||
## Download
|
||||
* **Development:** [src/jquery.form.js
|
||||
](https://github.com/jquery-form/form/blob/master/src/jquery.form.js)
|
||||
* **Production/Minified:** [dist/jquery.form.min.js
|
||||
](https://github.com/jquery-form/form/blob/master/dist/jquery.form.min.js)
|
||||
|
||||
### CDN
|
||||
```html
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.1/jquery.form.min.js" integrity="sha384-tIwI8+qJdZBtYYCKwRkjxBGQVZS3gGozr3CtI+5JF/oL1JmPEHzCEnIKbDbLTCer" crossorigin="anonymous"></script>
|
||||
```
|
||||
or
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/jquery.form/4.2.1/jquery.form.min.js" integrity="sha384-tIwI8+qJdZBtYYCKwRkjxBGQVZS3gGozr3CtI+5JF/oL1JmPEHzCEnIKbDbLTCer" crossorigin="anonymous"></script>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## API
|
||||
|
||||
### jqXHR
|
||||
The jqXHR object is stored in element <em>data</em>-cache with the <code>jqxhr</code> key after each <code>ajaxSubmit</code>
|
||||
call. It can be accessed like this:
|
||||
|
||||
````javascript
|
||||
var form = $('#myForm').ajaxSubmit({ /* options */ });
|
||||
var xhr = form.data('jqxhr');
|
||||
|
||||
xhr.done(function() {
|
||||
...
|
||||
});
|
||||
````
|
||||
|
||||
### ajaxForm( options )
|
||||
Prepares a form to be submitted via AJAX by adding all of the necessary event listeners. It does **not** submit the form. Use `ajaxForm` in your document's `ready` function to prepare existing forms for AJAX submission, or with the `delegation` option to handle forms not yet added to the DOM.
|
||||
Use ajaxForm when you want the plugin to manage all the event binding for you.
|
||||
|
||||
````javascript
|
||||
// prepare all forms for ajax submission
|
||||
$('form').ajaxForm({
|
||||
target: '#myResultsDiv'
|
||||
});
|
||||
````
|
||||
|
||||
### ajaxSubmit( options )
|
||||
Immediately submits the form via AJAX. In the most common use case this is invoked in response to the user clicking a submit button on the form.
|
||||
Use ajaxSubmit if you want to bind your own submit handler to the form.
|
||||
|
||||
````javascript
|
||||
// bind submit handler to form
|
||||
$('form').on('submit', function(e) {
|
||||
e.preventDefault(); // prevent native submit
|
||||
$(this).ajaxSubmit({
|
||||
target: 'myResultsDiv'
|
||||
})
|
||||
});
|
||||
````
|
||||
|
||||
---
|
||||
|
||||
## Options
|
||||
**Note:** All standard [$.ajax](http://api.jquery.com/jQuery.ajax) options can be used.
|
||||
|
||||
### beforeSerialize
|
||||
Callback function invoked prior to form serialization. Provides an opportunity to manipulate the form before its values are retrieved. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with two arguments: the jQuery wrapped form object and the options object.
|
||||
|
||||
````javascript
|
||||
beforeSerialize: function($form, options) {
|
||||
// return false to cancel submit
|
||||
}
|
||||
````
|
||||
|
||||
### beforeSubmit
|
||||
Callback function invoked prior to form submission. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with three arguments: the form data in array format, the jQuery wrapped form object, and the options object.
|
||||
|
||||
````javascript
|
||||
beforeSubmit: function(arr, $form, options) {
|
||||
// form data array is an array of objects with name and value properties
|
||||
// [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
|
||||
// return false to cancel submit
|
||||
}
|
||||
````
|
||||
|
||||
### filtering
|
||||
Callback function invoked before processing fields. This provides a way to filter elements.
|
||||
|
||||
````javascript
|
||||
filtering: function(el, index) {
|
||||
if ( !$(el).hasClass('ignore') ) {
|
||||
return el;
|
||||
}
|
||||
}
|
||||
````
|
||||
|
||||
### clearForm
|
||||
Boolean flag indicating whether the form should be cleared if the submit is successful
|
||||
|
||||
### data
|
||||
An object containing extra data that should be submitted along with the form.
|
||||
|
||||
````
|
||||
data: { key1: 'value1', key2: 'value2' }
|
||||
````
|
||||
|
||||
### dataType
|
||||
Expected data type of the response. One of: null, 'xml', 'script', or 'json'. The dataType option provides a means for specifying how the server response should be handled. This maps directly to jQuery's dataType method. The following values are supported:
|
||||
|
||||
* 'xml': server response is treated as XML and the 'success' callback method, if specified, will be passed the responseXML value
|
||||
* 'json': server response will be evaluted and passed to the 'success' callback, if specified
|
||||
* 'script': server response is evaluated in the global context
|
||||
|
||||
### delegation
|
||||
true to enable support for event delegation
|
||||
*requires jQuery v1.7+*
|
||||
|
||||
````javascript
|
||||
// prepare all existing and future forms for ajax submission
|
||||
$('form').ajaxForm({
|
||||
delegation: true
|
||||
});
|
||||
````
|
||||
|
||||
### error
|
||||
Callback function to be invoked upon error.
|
||||
|
||||
### forceSync
|
||||
Only applicable when explicity using the iframe option or when uploading files on browses that don't support XHR2.
|
||||
Set to `true` to remove the short delay before posting form when uploading files. The delay is used to allow the browser to render DOM updates prior to performing a native form submit. This improves usability when displaying notifications to the user, such as "Please Wait..."
|
||||
|
||||
### iframe
|
||||
Boolean flag indicating whether the form should *always* target the server response to an iframe instead of leveraging XHR when possible.
|
||||
|
||||
### iframeSrc
|
||||
String value that should be used for the iframe's src attribute when an iframe is used.
|
||||
|
||||
### iframeTarget
|
||||
Identifies the iframe element to be used as the response target for file uploads. By default, the plugin will create a temporary iframe element to capture the response when uploading files. This options allows you to use an existing iframe if you wish. When using this option the plugin will make no attempt at handling the response from the server.
|
||||
|
||||
### method
|
||||
The HTTP method to use for the request (e.g. 'POST', 'GET', 'PUT').
|
||||
|
||||
### replaceTarget
|
||||
Optionally used along with the the target option. Set to true if the target should be replaced or false if only the target contents should be replaced.
|
||||
|
||||
### resetForm
|
||||
Boolean flag indicating whether the form should be reset if the submit is successful
|
||||
|
||||
### semantic
|
||||
Boolean flag indicating whether data must be submitted in strict semantic order (slower). Note that the normal form serialization is done in semantic order with the exception of input elements of `type="image"`. You should only set the semantic option to true if your server has strict semantic requirements and your form contains an input element of `type="image"`.
|
||||
|
||||
### success
|
||||
Callback function to be invoked after the form has been submitted. If a 'success' callback function is provided it is invoked after the response has been returned from the server. It is passed the following standard jQuery arguments:
|
||||
|
||||
1. `data`, formatted according to the dataType parameter or the dataFilter callback function, if specified
|
||||
2. `textStatus`, string
|
||||
3. `jqXHR`, object
|
||||
4. `$form` jQuery object containing form element
|
||||
|
||||
### target
|
||||
Identifies the element(s) in the page to be updated with the server response. This value may be specified as a jQuery selection string, a jQuery object, or a DOM element.
|
||||
|
||||
### type
|
||||
The HTTP method to use for the request (e.g. 'POST', 'GET', 'PUT').
|
||||
An alias for `method` option. Overridden by the `method` value if both are present.
|
||||
|
||||
### uploadProgress
|
||||
Callback function to be invoked with upload progress information (if supported by the browser). The callback is passed the following arguments:
|
||||
|
||||
1. event; the browser event
|
||||
2. position (integer)
|
||||
3. total (integer)
|
||||
4. percentComplete (integer)
|
||||
|
||||
### url
|
||||
URL to which the form data will be submitted.
|
||||
|
||||
---
|
||||
|
||||
## Utility Methods
|
||||
### formSerialize
|
||||
Serializes the form into a query string. This method will return a string in the format: `name1=value1&name2=value2`
|
||||
|
||||
````javascript
|
||||
var queryString = $('#myFormId').formSerialize();
|
||||
````
|
||||
|
||||
### fieldSerialize
|
||||
Serializes field elements into a query string. This is handy when you need to serialize only part of a form. This method will return a string in the format: `name1=value1&name2=value2`
|
||||
|
||||
````javascript
|
||||
var queryString = $('#myFormId .specialFields').fieldSerialize();
|
||||
````
|
||||
|
||||
### fieldValue
|
||||
Returns the value(s) of the element(s) in the matched set in an array. This method always returns an array. If no valid value can be determined the array will be empty, otherwise it will contain one or more values.
|
||||
|
||||
### resetForm
|
||||
Resets the form to its original state by invoking the form element's native DOM method.
|
||||
|
||||
### clearForm
|
||||
Clears the form elements. This method emptys all of the text inputs, password inputs and textarea elements, clears the selection in any select elements, and unchecks all radio and checkbox inputs. It does *not* clear hidden field values.
|
||||
|
||||
### clearFields
|
||||
Clears selected field elements. This is handy when you need to clear only a part of the form.
|
||||
|
||||
---
|
||||
|
||||
## File Uploads
|
||||
The Form Plugin supports use of [XMLHttpRequest Level 2]("http://www.w3.org/TR/XMLHttpRequest/") and [FormData](https://developer.mozilla.org/en/XMLHttpRequest/FormData) objects on browsers that support these features. As of today (March 2012) that includes Chrome, Safari, and Firefox. On these browsers (and future Opera and IE10) files uploads will occur seamlessly through the XHR object and progress updates are available as the upload proceeds. For older browsers, a fallback technology is used which involves iframes. [More Info](http://malsup.com/jquery/form/#file-upload)
|
||||
|
||||
---
|
||||
|
||||
## Contributors
|
||||
This project has transferred from [github.com/malsup/form](https://github.com/malsup/form/), courtesy of [Mike Alsup](https://github.com/malsup).
|
||||
See [CONTRIBUTORS](CONTRIBUTORS.md) for details.
|
||||
|
||||
## License
|
||||
|
||||
This project is dual licensed under the LGPLv2.1 (or later) or MIT licenses:
|
||||
|
||||
* [GNU Lesser General Public License v2.1](LICENSE)
|
||||
* [MIT](LICENSE-MIT)
|
||||
|
||||
---
|
||||
|
||||
Additional documentation and examples for version 3.51- at: [http://malsup.com/jquery/form/](http://malsup.com/jquery/form/)
|
||||
1
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/_config.yml
vendored
Normal file
1
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/_config.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
theme: jekyll-theme-tactile
|
||||
25
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/bower.json
vendored
Normal file
25
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/bower.json
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "jquery-form",
|
||||
"description": "The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX.",
|
||||
"main": "src/jquery.form.js",
|
||||
"moduleType": [ "globals", "amd", "node" ],
|
||||
"license": "(LGPL-2.1+ OR MIT)",
|
||||
"ignore": [
|
||||
"README.md",
|
||||
"composer.json",
|
||||
"package.json"
|
||||
],
|
||||
"keywords": [ "jquery", "ajax", "jquery-plugin", "json", "json-form", "html-form", "form", "jquery-form" ],
|
||||
"authors": [
|
||||
{ "name": "Kevin Morris" },
|
||||
{ "name": "Mike Alsup" }
|
||||
],
|
||||
"homepage": "https://github.com/jquery-form/form",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jquery-form/form.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7.2"
|
||||
}
|
||||
}
|
||||
29
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/composer.json
vendored
Normal file
29
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/composer.json
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "jquery-form/form",
|
||||
"description": "The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX.",
|
||||
"keywords": [ "jquery", "ajax", "jquery-plugin", "json", "json-form", "html-form", "form", "jquery-form" ],
|
||||
"homepage": "https://github.com/jquery-form/form",
|
||||
"license": "(LGPL-2.1+ OR MIT)",
|
||||
"authors": [
|
||||
{ "name": "Kevin Morris" },
|
||||
{ "name": "Mike Alsup" }
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/jquery-form/form/issues"
|
||||
},
|
||||
"require": {
|
||||
"components/jquery": ">=1.7.2"
|
||||
},
|
||||
"extra": {
|
||||
"component": {
|
||||
"scripts": [
|
||||
"src/jquery.form.js"
|
||||
],
|
||||
"shim": {
|
||||
"deps": [
|
||||
"jquery"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
23
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/dist/jquery.form.min.js
vendored
Normal file
23
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/dist/jquery.form.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/dist/jquery.form.min.js.map
vendored
Normal file
1
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/dist/jquery.form.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/docs/.gitignore
vendored
Normal file
3
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/docs/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
index_files/
|
||||
_site/
|
||||
Gemfile.lock
|
||||
2
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/docs/Gemfile
vendored
Normal file
2
mayan/apps/appearance/static/appearance/vendors/form-4.2.2/docs/Gemfile
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
source 'https://rubygems.org'
|
||||
gem 'github-pages', group: :jekyll_plugins
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user