initial commit taken from gitlab.lrz.de

This commit is contained in:
privatereese
2018-08-24 18:09:42 +02:00
parent ae54ed4c48
commit fc05486403
28494 changed files with 2159823 additions and 0 deletions

65
node_modules/art/lib/sheet.js/Source/Sheet.DOM.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
/*
---
name : Sheet.DOM
description : Sheet.DOM adds some handy stuff for working with the browser's native CSS capabilities.
authors : Thomas Aylott
copyright : © 2010 Thomas Aylott
license : MIT
provides : Sheet.DOM
...
*/
;(function(document,styleSheets){
if (typeof Sheet == 'undefined') Sheet = {}
if (Sheet.DOM == null) Sheet.DOM = {}
Sheet.DOM.createSheetNode = function(raw){
var sheet = Sheet.DOM.createSheet(raw)
var node = sheet.ownerNode
node.parentNode.removeChild(node)
return node
}
var UID = 0
Sheet.DOM.createSheet = createStyleSheetWithCSS
function createStyleSheetWithCSS(css){
var styleElement = document.createElement("style")
styleElement.appendChild(document.createTextNode(css))
styleElement.setAttribute('name', styleElement.id = "SheetRuler-" + +new Date)
document.getElementsByTagName('head')[0].appendChild(styleElement)
return styleElement.sheet || styleElement.styleSheet
}
Sheet.DOM.createStyle = function(raw){
var div = document.createElement('div')
div.innerHTML = '<p style="' + String_escapeHTML.call(raw) + '"></p>'
return div.firstChild.style
}
Sheet.DOM.createSheetStyle = function(raw){
var className = 'Sheet' + +new Date
var sheet = Sheet.DOM.createSheet("." + className + "{" + raw + "}")
return (sheet.rules || sheet.cssRules)[0].style
}
Sheet.DOM.createRule = function(selector,style){
var rule = selector + "{" + style + "}"
var sheet = Sheet.DOM.createSheet(rule)
var rules = sheet.rules || sheet.cssRules
return rules[rules.length - 1]
}
Sheet.DOM.createStyleWrapped = function(raw){
return {style:Sheet.DOM.createStyle(raw)}
}
function String_escapeHTML(){
return ('' + this).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/"/g,'&quot;')
}
}(document, document.styleSheets));

80
node_modules/art/lib/sheet.js/Source/Sheet.js generated vendored Normal file
View File

@@ -0,0 +1,80 @@
/*
---
name : Sheet
authors : Thomas Aylott
copyright : © 2010 Thomas Aylott
license : MIT
provides : Sheet
requires : SheetParser.CSS
...
*/
;(function(exports){
/*<depend>*/
var UNDEF = {undefined:1}
/*<CommonJS>*/
var SheetParser = UNDEF[typeof require]
? exports.SheetParser
: require('./SheetParser.CSS').SheetParser
exports.Sheet = Sheet
/*</CommonJS>*/
/*<debug>*/;if (!(!UNDEF[typeof SheetParser] && SheetParser.CSS)) throw new Error('Missing required function: "SheetParser.CSS"');/*</debug>*/
/*</depend>*/
Sheet.version = '1.0.2 dev'
function Sheet(cssText){
if (this instanceof Sheet) this.initialize(cssText)
else return Sheet.from(cssText)
}
Sheet.from = function(cssText){
return new Sheet(cssText)
}
Sheet.prototype = {
parser: SheetParser.CSS,
initialize: function(cssText){
this.cssText = cssText || ''
this.style = this.rules = this.cssRules = this.parser.parse(this.cssText)
var self = this
},
update: function(){
var cssText = '',
i = -1,
rule,
rules = this.style || this.rules || this.cssRules
while ((rule = rules[++i])){
if (typeof rule == 'object'){
// cssRule
if (this.update) rule.cssText = this.update.call(rule)
cssText += rule.cssText = rule.selectorText + '{' + rule.cssText + '}'
} else {
// style key/value
cssText += rule + ':'
cssText += rules[rule] + ';'
}
}
if (rules.selectorText)
return rules.cssText = rules.selectorText + '{' + cssText + '}'
return rules.cssText = cssText
}
}
Sheet.prototype.toString = Sheet.prototype.update
}(typeof exports != 'undefined' ? exports : this));

194
node_modules/art/lib/sheet.js/Source/SheetParser.CSS.js generated vendored Normal file
View File

@@ -0,0 +1,194 @@
/*
---
name : SheetParser.CSS
authors : Thomas Aylott
copyright : © 2010 Thomas Aylott
license : MIT
provides : SheetParser.CSS
requires : combineRegExp
...
*/
;(function(exports){
/*<depend>*/
var UNDEF = {undefined:1}
if (!exports.SheetParser) exports.SheetParser = {}
/*<CommonJS>*/
var combineRegExp = UNDEF[typeof require]
? exports.combineRegExp
: require('./sg-regex-tools').combineRegExp
var SheetParser = exports.SheetParser
/*</CommonJS>*/
/*<debug>*/;if (UNDEF[typeof combineRegExp]) throw new Error('Missing required function: "combineRegExp"');/*</debug>*/
/*</depend>*/
var CSS = SheetParser.CSS = {version: '1.0.2 dev'}
CSS.trim = trim
function trim(str){
// http://blog.stevenlevithan.com/archives/faster-trim-javascript
var str = (''+str).replace(/^\s\s*/, ''),
ws = /\s/,
i = str.length;
while (ws.test(str.charAt(--i)));
return str.slice(0, i + 1);
}
CSS.camelCase = function(string){
return ('' + string).replace(camelCaseSearch, camelCaseReplace)
}
var camelCaseSearch = /-\D/g
function camelCaseReplace(match){
return match.charAt(1).toUpperCase()
}
CSS.parse = function(cssText){
var found
, rule
, rules = {length:0}
, keyIndex = -1
, regex = this.parser
, names = CSS.parser.names
, i,r,l
, ruleCount
rules.cssText = cssText = trim(cssText)
// strip comments
cssText = cssText.replace(CSS.comment, '');
regex.lastIndex = 0
while ((found = regex.exec(cssText))){
// avoid an infinite loop on zero-length keys
if (regex.lastIndex == found.index) ++ regex.lastIndex
// key:value
if (found[names._key]){
rules[rules.length ++] = found[names._key]
rules[found[names._key]] = found[names._value]
rules[CSS.camelCase(found[names._key])] = found[names._value]
continue
}
rules[rules.length++] = rule = {}
for (i = 0, l = names.length; i < l; ++i){
if (!(names[i-1] && found[i])) continue
rule[names[i-1]] = trim(found[i])
}
}
var atKey, atRule, atList, atI
for (i = 0, l = rules.length; i < l; ++i){
if (!rules[i]) continue
if (rules[i]._style_cssText){
rules[i].style = CSS.parse(rules[i]._style_cssText)
delete rules[i]._style_cssText
}
// _atKey/_atValue
if (atKey = rules[i]._atKey){
atKey = CSS.camelCase(atKey)
atRule = {length:0}
rules[i][atKey] = atRule
atRule["_source"] =
atRule[atKey + "Text"] = rules[i]._atValue
atList = ('' + rules[i]._atValue).split(/,\s*/)
for (atI = 0; atI < atList.length; ++atI){
atRule[atRule.length ++] = atList[atI]
}
rules[i].length = 1
rules[i][0] = atKey
delete rules[i]._atKey
delete rules[i]._atValue
}
if (rules[i].style)
for (ruleCount = -1, r = -1, rule; rule = rules[i].style[++r];){
if (typeof rule == 'string') continue
rules[i][r] = (rules[i].cssRules || (rules[i].cssRules = {}))[++ ruleCount] = rule
rules[i].cssRules.length = ruleCount + 1
rules[i].rules = rules[i].cssRules
}
}
return rules
}
var x = combineRegExp
var OR = '|'
;(CSS.at = x(/\s*@([-a-zA-Z0-9]+)\s+(([\w-]+)?[^;{]*)/))
.names=[ '_atKey', '_atValue', 'name']
CSS.atRule = x([CSS.at, ';'])
;(CSS.keyValue_key = x(/([-a-zA-Z0-9]+)/))
.names=[ '_key']
;(CSS.keyValue_value_end = x(/(?:;|(?=\})|$)/))
;(CSS.notString = x(/[^"']+/))
;(CSS.stringSingle = x(/"(?:[^"]|\\")*"/))
;(CSS.stringDouble = x(/'(?:[^']|\\')*'/))
;(CSS.string = x(['(?:',CSS.stringSingle ,OR, CSS.stringDouble,')']))
;(CSS.propertyValue = x([/[^;}]+/, CSS.keyValue_value_end]))
var rRound = "(?:[^()]|\\((?:[^()]|\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\))*\\))"
;(CSS.keyValue_value = x(
[
x(['((?:'
, CSS.stringSingle
, OR
, CSS.stringDouble
, OR
, "\\("+rRound+"*\\)"
, OR
, /[^;}()]/ // not a keyValue_value terminator
, ')*)'
])
, CSS.keyValue_value_end
])).names = ['_value']
;(CSS.keyValue = x([CSS.keyValue_key ,/\s*:\s*/, CSS.keyValue_value]))
;(CSS.comment = x(/\/\*\s*((?:[^*]|\*(?!\/))*)\s*\*\//))
.names=[ 'comment']
;(CSS.selector = x(['(',/\s*(\d+%)\s*/,OR,'(?:',/[^{}'"()]|\([^)]*\)|\[[^\]]*\]/,')+',')']))
.names=[ 'selectorText','keyText']
var rCurly = "(?:[^{}]|\\{(?:[^{}]|\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})*\\})*\\})"
var rCurlyRound = "(?:[^{}()]+|\\{(?:[^{}()]+|\\{(?:[^{}()]+|\\{(?:[^{}()]+|\\{[^{}()]*\\})*\\})*\\})*\\})"
;(CSS.block = x("\\{\\s*((?:"+"\\("+rRound+"*\\)|"+rCurly+")*)\\s*\\}"))
.names=[ '_style_cssText']
CSS.selectorBlock = x([CSS.selector, CSS.block])
CSS.atBlock = x([CSS.at, CSS.block])
CSS.parser = x
(
[ x(CSS.comment)
, OR
, x(CSS.atBlock)
, OR
, x(CSS.atRule)
, OR
, x(CSS.selectorBlock)
, OR
, x(CSS.keyValue)
]
, 'cssText'
)
})(typeof exports != 'undefined' ? exports : this);

42
node_modules/art/lib/sheet.js/Source/sg-regex-tools.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
/*
---
name : sg-regex-tools
description : A few super-handy tools for messing around with RegExp
authors : Thomas Aylott
copyright : © 2010 Thomas Aylott
license : MIT
provides : [combineRegExp]
...
*/
;(function(exports){
exports.combineRegExp = function(regex, group){
if (regex.source) regex = [regex]
var names = [], i, source = '', this_source
for (i = 0; i < regex.length; ++i){ if (!regex[i]) continue
this_source = regex[i].source || ''+regex[i]
if (this_source == '|') source += '|'
else {
source += (group?'(':'') + this_source.replace(/\s/g,'') + (group?')':'')
if (group) names.push(group)
}
if (regex[i].names) names = names.concat(regex[i].names)
}
try {
regex = new RegExp(source,'gm')
}
catch (e){
throw new SyntaxError('Invalid Syntax: ' + source +'; '+ e)
}
// [key] → 1
for (i = -1; i < names.length; ++i) names[names[i]] = i + 1
// [1] → key
regex.names = names
return regex
}
}(typeof exports != 'undefined' ? exports : this))