diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..9bf3b64 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,54 @@ +exclude: "^$|venv|.obsidian" +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-docstring-first + - id: check-json + - id: check-added-large-files + - id: check-yaml + - id: debug-statements + - repo: https://github.com/psf/black + rev: 24.4.2 + hooks: + - id: black + language_version: python3.12 + - repo: https://github.com/PyCQA/autoflake + rev: v2.3.1 + hooks: + - id: autoflake + args: [--remove-all-unused-imports, --in-place] + - repo: https://github.com/PyCQA/isort + rev: 5.13.2 + hooks: + - id: isort + args: ["--profile", "black", "--filter-files", "--line-length=79"] + language_version: python3.12 + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.10.0 + hooks: + - id: mypy + additional_dependencies: [types-requests, types-PyYAML, types-Flask, types-Werkzeug, + types-Markdown] + - repo: https://github.com/asottile/pyupgrade + rev: v3.15.2 + hooks: + - id: pyupgrade + args: + - --py38-plus + - repo: https://github.com/andreoliwa/nitpick + rev: v0.35.0 + hooks: + - id: nitpick + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: python-check-blanket-noqa + - id: python-check-mock-methods + - id: python-no-eval + - id: python-no-log-warn + - id: rst-backticks +default_language_version: + python: python3.11 diff --git a/README b/README index 8075c04..b619dcb 100644 --- a/README +++ b/README @@ -2,10 +2,10 @@ Note: This is a fork of http://sourceforge.net/projects/r2r/ and the original au See LICENCE-prefork for original licence from Sourceforge and LICENCE covers any changes made in this repository. -Homepage of the R2R Framework: +Homepage of the R2R Framework: - http://www4.wiwiss.fu-berlin.de/bizer/r2r/ +http://www4.wiwiss.fu-berlin.de/bizer/r2r/ R2R language specification and user manual: - http://www4.wiwiss.fu-berlin.de/bizer/r2r/spec/ +http://www4.wiwiss.fu-berlin.de/bizer/r2r/spec/ diff --git a/antlr-files/SourcePatternRewriter.g b/antlr-files/SourcePatternRewriter.g index 4ae525e..af0b67a 100644 --- a/antlr-files/SourcePatternRewriter.g +++ b/antlr-files/SourcePatternRewriter.g @@ -8,7 +8,7 @@ options { @header { package de.fuberlin.wiwiss.r2r.parser; - + import java.util.Set; import java.util.HashSet; import java.util.Map; @@ -26,14 +26,14 @@ options { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } } @@ -41,26 +41,26 @@ options { @members { StringGenerator variableGenerator = null; HashMap variableRewriter = null; - + public void setVariableGenerator(StringGenerator stringGenerator) { this.variableGenerator = stringGenerator; variableRewriter = new HashMap(); } - + public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public String rewriteVariable(String inVar) { if(variableRewriter==null || inVar.equals("SUBJ")) return inVar; @@ -68,10 +68,10 @@ options { String outVar = variableRewriter.get(inVar); if(outVar!=null) return outVar; - + outVar = variableGenerator.nextString(); variableRewriter.put(inVar, outVar); - return outVar; + return outVar; } } @@ -90,23 +90,23 @@ wherePattern groupGraphPattern : '{' triplesBlock? ((graphPatternNotTriples | filter) '.'? triplesBlock? )* '}' ; - + triplesBlock : triplesSameSubject ( '.' triplesBlock?)? ; - + graphPatternNotTriples : optionalGraphPattern | groupOrUnionGraphPattern | graphGraphPattern ; - + optionalGraphPattern : OPTIONAL groupGraphPattern ; - + graphGraphPattern : GRAPH varOrIriRef groupGraphPattern ; - + groupOrUnionGraphPattern : groupGraphPattern ( UNION groupGraphPattern )* ; @@ -114,11 +114,11 @@ groupOrUnionGraphPattern filter : FILTER constraint ; - + constraint : brackettedExpression | builtInCall | functionCall ; - + functionCall : iriRef argList ; @@ -126,35 +126,35 @@ functionCall argList : NIL | '(' expression ( ',' expression )* ')' ; - + triplesSameSubject : varOrTerm propertyListNotEmpty | triplesNode propertyList ; - + propertyListNotEmpty : v=verb oList=objectList ( ';' (verb objectList)?)* ; - + propertyList : propertyListNotEmpty? ; - + objectList : o=object ( ',' o=object )* ; - + object : graphNode ; - + verb - : iriRef + : iriRef | 'a' ; - + triplesNode : collection | blankNodePropertyList ; @@ -162,67 +162,67 @@ triplesNode blankNodePropertyList : '[' propertyListNotEmpty ']' ; - + collection : '(' graphNode+ ')' ; - + graphNode - : varOrTerm + : varOrTerm | triplesNode ; - + varOrTerm : var | graphTerm ; - + varOrIriRef : var | iriRef ; - + var - : VAR1 -> template(revar={rewriteVariable($VAR1.text.substring(1))}) "?" - | VAR2 -> template(revar={rewriteVariable($VAR2.text.substring(1))}) "$" + : VAR1 -> template(revar={rewriteVariable($VAR1.text.substring(1))}) "?" + | VAR2 -> template(revar={rewriteVariable($VAR2.text.substring(1))}) "$" ; - -graphTerm + +graphTerm : iriRef | rdfLiteral | numericLiteral | booleanLiteral | blankNode | NIL ; - + expression : conditionalOrExpression ; - + conditionalOrExpression : conditionalAndExpression ('||' conditionalAndExpression)* ; - + conditionalAndExpression : valueLogical ( '&&' valueLogical )* ; - + valueLogical : relationalExpression ; - + relationalExpression : numericExpression ( - '=' numericExpression - | '!=' numericExpression - | '<' numericExpression - | '>' numericExpression + '=' numericExpression + | '!=' numericExpression + | '<' numericExpression + | '>' numericExpression | '<=' numericExpression | '>=' numericExpression )? ; - + numericExpression : additiveExpression ; - + additiveExpression : multiplicativeExpression ( '+' multiplicativeExpression | '-' multiplicativeExpression @@ -230,18 +230,18 @@ relationalExpression | numericLiteralNegative )* ; - + multiplicativeExpression : unaryExpression ( '*' unaryExpression | '/' unaryExpression)* ; - + unaryExpression : '!' primaryExpression | '+' primaryExpression | '-' primaryExpression | primaryExpression ; - + primaryExpression : brackettedExpression | builtInCall @@ -251,11 +251,11 @@ relationalExpression | booleanLiteral | var ; - + brackettedExpression : '(' expression ')' ; - + builtInCall : STR '(' expression ')' | LANG '(' expression ')' @@ -264,57 +264,57 @@ relationalExpression | BOUND '(' var ')' | SAMETERM '(' expression ',' expression ')' | ISIRI '(' expression ')' - | ISURI '(' expression ')' + | ISURI '(' expression ')' | ISBLANK '(' expression ')' | ISLITERAL '(' expression ')' | regexExpression - ; - + ; + regexExpression : REGEX '(' expression ',' expression (',' expression)? ')' ; - + iriRefOrFunction : iriRef argList? ; - + rdfLiteral : string (LANGTAG | ('^^' iriRef) )? ; - + numericLiteral : numericLiteralUnsigned | numericLiteralPositive | numericLiteralNegative ; - + numericLiteralUnsigned : INTEGER | DECIMAL | DOUBLE ; - + numericLiteralPositive : INTEGER_POSITIVE | DECIMAL_POSITIVE | DOUBLE_POSITIVE ; - + numericLiteralNegative : INTEGER_NEGATIVE | DECIMAL_NEGATIVE | DOUBLE_NEGATIVE ; - + booleanLiteral : TRUE | FALSE ; - + string : STRING_LITERAL1 | STRING_LITERAL2 | STRING_LITERAL_LONG1 | STRING_LITERAL_LONG2 ; - - iriRef + + iriRef : IRI_REF | prefixedName ; - + prefixedName : p=PNAME_LN // | PNAME_NS ; - + blankNode : BLANK_NODE_LABEL | ANON ; @@ -375,7 +375,7 @@ IRI_REF PNAME_NS : PN_PREFIX? ':' ; - + PNAME_LN : PNAME_NS PN_LOCAL ; @@ -383,18 +383,18 @@ PNAME_LN BLANK_NODE_LABEL : '_:' PN_LOCAL ; - + VAR1 : '?' VARNAME ; - + VAR2 : '$' VARNAME ; - + LANGTAG : '@' ('a'..'z' | 'A'..'Z')+ ('-' ('a'..'z' | 'A'..'Z' | '0'..'9')+)* - ; + ; INTEGER : ('0'..'9')+ @@ -403,45 +403,45 @@ INTEGER DECIMAL : ('0'..'9')+ '.' ('0'..'9')* | '.' ('0'..'9')+ ; - + DOUBLE : ('0'..'9')+ '.' ('0'..'9')* EXPONENT | '.' ('0'..'9')+ EXPONENT | ('0'..'9')+ EXPONENT ; - + INTEGER_POSITIVE : '+' INTEGER ; - + DECIMAL_POSITIVE : '+' DECIMAL ; - + DOUBLE_POSITIVE : '+' DOUBLE ; - + INTEGER_NEGATIVE : '-' INTEGER ; - + DECIMAL_NEGATIVE : '-' DECIMAL ; - + DOUBLE_NEGATIVE : '-' DOUBLE ; - + EXPONENT : ('e' | 'E') ('+' | '-')? ('0'..'9')+ ; - + STRING_LITERAL1 : '\'' (~('\u0027' | '\u005c' | '\u000A' | '\u000D') | ECHAR)* '\'' ; - + STRING_LITERAL2 : '"' (~('\u0022' | '\u005c' | '\u000A' | '\u000D') | ECHAR)* '"' ; @@ -449,15 +449,15 @@ STRING_LITERAL2 STRING_LITERAL_LONG1 : '\'\'\'' (( '\'' | '\'\'')? (~('\'' | '\\') | ECHAR))* '\'\'\'' ; - + STRING_LITERAL_LONG2 : '"""' (( '"' | '""')? (~('"' | '\\') | ECHAR))* '"""' ; - + ECHAR : '\\' ('t' | 'b' | 'n' | 'r' | 'f' | '\\' | '"' | '\'') ; - + NIL : '(' WS* ')' ; @@ -489,28 +489,27 @@ fragment PN_CHARS_BASE | '\uF900'..'\uFDCF' | '\uFDF0'..'\uFFFD' ; - + fragment PN_CHARS_U : PN_CHARS_BASE | '_' ; - + PN_PREFIX : PN_CHARS_BASE ((PN_CHARS | '.')* PN_CHARS)? ; - + fragment PN_CHARS - : PN_CHARS_U - | '-' + : PN_CHARS_U + | '-' | '0'..'9' | '\u00B7' | '\u0300'..'\u036F' | '\u203F'..'\u2040' ; - + fragment PN_LOCAL : (PN_CHARS_U | '0'..'9') ((PN_CHARS | '.')* PN_CHARS)? ; fragment HEX : ('0'..'9' | 'a'..'f' | 'A'..'F'); COMMENT : '#' .* ('\n'|'\r') {$channel = HIDDEN;}; - diff --git a/antlr-files/TargetPattern.g b/antlr-files/TargetPattern.g index 0f12980..36d1d09 100755 --- a/antlr-files/TargetPattern.g +++ b/antlr-files/TargetPattern.g @@ -7,7 +7,7 @@ options { @header { package de.fuberlin.wiwiss.r2r.parser; - + import de.fuberlin.wiwiss.r2r.*; import de.fuberlin.wiwiss.r2r.utils.StringUtils; import java.util.List; @@ -30,26 +30,26 @@ options { Set props = new HashSet(); Set cls = new HashSet(); Map datatypeHints = new HashMap(); - + public void setPrefixMapper(PrefixMapper pm) { prefixMapper = pm; } - + public void setGeneratedVariables(Set variableNames) { generatedVariables = variableNames; } - + public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } } @@ -58,21 +58,21 @@ options { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } } targetPattern returns [Set variableDependencies, TargetPattern pattern, Set classes, Set properties, Map hints] - : first=tripleOrPath { List triples = $first.value; } + : first=tripleOrPath { List triples = $first.value; } ( '.' more=tripleOrPath { triples.addAll($more.value); } )* @@ -85,7 +85,7 @@ targetPattern returns [Set variableDependencies, TargetPattern pattern, ; - + tripleOrPath returns [List value] : | { List triples = null;} @@ -106,7 +106,7 @@ tripleOrPath returns [List value] )* o=object { String property = vElement.getValue(0); - String classURI = null; + String classURI = null; if(property.equals("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")) { cls.add($o.value.getValue(0)); classURI = $o.value.getValue(0); @@ -115,13 +115,13 @@ tripleOrPath returns [List value] triples.add(new Triple(sElement, vElement, $o.value, property, classURI)); $value = triples; } - ; - - + ; + + //triple returns [Triple value] // : s=subject v=verb o=object -// { +// { // $value = new Triple($s.value, $v.value, $o.value); // if($v.value.getValue(0).equals("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")) // cls.add($o.value.getValue(0)); @@ -134,43 +134,43 @@ subject returns [TripleElement value] | VARIABLEURI { String v = $VARIABLEURI.text; - v = v.substring(2, v.length()-1); - $value = new TripleElement(TripleElement.Type.IRIVARIABLE, v); + v = v.substring(2, v.length()-1); + $value = new TripleElement(TripleElement.Type.IRIVARIABLE, v); variables.add(v); } ; - + verb returns [TripleElement value] : iriRef { $value = new TripleElement(TripleElement.Type.IRI, $iriRef.value); } | 'a' { $value = new TripleElement(TripleElement.Type.IRI, PrintUtil.expandQname("rdf:type")); } ; - + object returns [TripleElement value] : varOrTerm { $value = $varOrTerm.value; } | VARIABLEURI { String v = $VARIABLEURI.text; - v = v.substring(2, v.length()-1); + v = v.substring(2, v.length()-1); $value = new TripleElement(TripleElement.Type.IRIVARIABLE, v); variables.add(v); } ; - + varOrTerm returns [TripleElement value] : var { $value = $var.value; } | graphTerm { $value = $graphTerm.value; } ; - + varOrIriRefOrBlankNode returns [TripleElement value] : var { $value = $var.value; } | iriRef { $value = new TripleElement(TripleElement.Type.IRI, $iriRef.value); } | blankNode { $value = $blankNode.value; } ; - + var returns [TripleElement value] : VAR1 { $value = new TripleElement(TripleElement.Type.VARIABLE, $VAR1.text.substring(1)); variables.add($VAR1.text.substring(1));} | VAR2 { $value = new TripleElement(TripleElement.Type.VARIABLE, $VAR2.text.substring(1)); variables.add($VAR2.text.substring(1));} ; - + graphTerm returns [TripleElement value] : iriRef { $value = new TripleElement(TripleElement.Type.IRI, $iriRef.value); } | rdfLiteral { $value = $rdfLiteral.value; } @@ -178,24 +178,24 @@ graphTerm returns [TripleElement value] | booleanLiteral { $value = $booleanLiteral.value; } | blankNode { $value = $blankNode.value; } ; - + rdfLiteral returns [TripleElement value] : { String v=null; TripleElement.Type vType = null; } (s=string - { v = $s.value; vType = TripleElement.Type.STRING; } + { v = $s.value; vType = TripleElement.Type.STRING; } | VARIABLETERM { v = $VARIABLETERM.text; v = v.substring(2, v.length()-1); variables.add(v); vType = TripleElement.Type.STRINGVARIABLE; } ) (l=LANGTAG - { + { if(vType==TripleElement.Type.STRING) $value = new TripleElement(TripleElement.Type.LANGTAGSTRING, v, $l.text.substring(1)); else $value = new TripleElement(TripleElement.Type.LANGTAGVARIABLE, v, $l.text.substring(1)); } - + | ('^^' i=iriRef - { + { if(vType==TripleElement.Type.STRING) $value = new TripleElement(TripleElement.Type.DATATYPESTRING, v, $i.value); else { @@ -209,51 +209,51 @@ graphTerm returns [TripleElement value] $value = new TripleElement(vType, v); } ; - + numericLiteral returns [TripleElement value] : v=numericLiteralUnsigned {$value=$v.value;} | v=numericLiteralPositive {$value=$v.value;} | v=numericLiteralNegative {$value=$v.value;} ; - + numericLiteralUnsigned returns [TripleElement value] : v=INTEGER {$value = new TripleElement(TripleElement.Type.INTEGER, $v.text); } | v=DECIMAL {$value = new TripleElement(TripleElement.Type.DECIMAL, $v.text); } | v=DOUBLE {$value = new TripleElement(TripleElement.Type.DOUBLE, $v.text); } ; - + numericLiteralPositive returns [TripleElement value] : v=INTEGER_POSITIVE {$value = new TripleElement(TripleElement.Type.INTEGER, $v.text); } | v=DECIMAL_POSITIVE {$value = new TripleElement(TripleElement.Type.DECIMAL, $v.text); } | v=DOUBLE_POSITIVE {$value = new TripleElement(TripleElement.Type.DOUBLE, $v.text); } ; - + numericLiteralNegative returns [TripleElement value] : v=INTEGER_NEGATIVE {$value = new TripleElement(TripleElement.Type.INTEGER, $v.text); } | v=DECIMAL_NEGATIVE {$value = new TripleElement(TripleElement.Type.DECIMAL, $v.text); } | v=DOUBLE_NEGATIVE {$value = new TripleElement(TripleElement.Type.DOUBLE, $v.text); } ; - + booleanLiteral returns [TripleElement value] : TRUE {$value = new TripleElement(TripleElement.Type.BOOLEAN, "true"); } | FALSE {$value = new TripleElement(TripleElement.Type.BOOLEAN, "false"); } ; - + string returns [String value] : s=STRING_LITERAL1 { String temp = $s.text; $value = StringUtils.unescapeString(temp.substring(1, temp.length() - 1)); } | s=STRING_LITERAL2 { String temp = $s.text; $value = StringUtils.unescapeString(temp.substring(1, temp.length() - 1)); } | s=STRING_LITERAL_LONG1 { String temp = $s.text; $value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); } | s=STRING_LITERAL_LONG2 { String temp = $s.text; $value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); } ; - + iriRef returns [String value] : IRI_REF - { + { String iri = $IRI_REF.text; $value = iri.substring(1, iri.length()-1); - } + } | prefixedName - { + { String qName = $prefixedName.text; String iri = PrintUtil.expandQname(qName); if(qName.equals(iri)) @@ -267,23 +267,23 @@ graphTerm returns [TripleElement value] $value = iri; else $value = iri + prefixAndName[1]; - } + } } else { $value = iri; } } ; - + prefixedName returns [String value] : PNAME_LN { $value = $PNAME_LN.text; } ; - + blankNode returns [TripleElement value] : BLANK_NODE_LABEL { $value = new TripleElement(TripleElement.Type.BLANKNODE, $BLANK_NODE_LABEL.text.substring(2)); } | ANON { $value = new TripleElement(TripleElement.Type.BLANKNODE, null); } ; - + //This is for case-insensitive parsing of SPARQL-keywords @@ -305,7 +305,7 @@ fragment U: ('u'|'U') ; WS : ('\u0020' | '\u0009' | '\u000D' | '\u000A') {$channel = HIDDEN;} ; - + IRI_REF : '<' (~('<' | '>' | '"' | '{' | '}' | '|' | '^' | '`' | '\\' | '\u0000'..'\u0020'))* '>' ; @@ -313,7 +313,7 @@ IRI_REF PNAME_NS : PN_PREFIX? ':' ; - + PNAME_LN : PNAME_NS PN_LOCAL ; @@ -321,26 +321,26 @@ PNAME_LN BLANK_NODE_LABEL : '_:' PN_LOCAL ; - + VAR1 : '?' VARNAME ; - + VAR2 : '$' VARNAME ; - + VARIABLETERM : '?\'' VARNAME '\'' ; - + VARIABLEURI : '?<' VARNAME '>' - ; - + ; + LANGTAG : '@' ('a'..'z' | 'A'..'Z')+ ('-' ('a'..'z' | 'A'..'Z' | '0'..'9')+)* - ; + ; INTEGER : ('0'..'9')+ @@ -349,61 +349,61 @@ INTEGER DECIMAL : ('0'..'9')+ '.' ('0'..'9')* | '.' ('0'..'9')+ ; - + DOUBLE : ('0'..'9')+ '.' ('0'..'9')* EXPONENT | '.' ('0'..'9')+ EXPONENT | ('0'..'9')+ EXPONENT ; - + INTEGER_POSITIVE : '+' INTEGER ; - + DECIMAL_POSITIVE : '+' DECIMAL ; - + DOUBLE_POSITIVE : '+' DOUBLE ; - + INTEGER_NEGATIVE : '-' INTEGER ; - + DECIMAL_NEGATIVE : '-' DECIMAL ; - + DOUBLE_NEGATIVE : '-' DOUBLE ; - + EXPONENT : E ('+' | '-')? ('0'..'9')+ ; - + STRING_LITERAL1 : '\'' (~('\u0027' | '\u005c' | '\u000A' | '\u000D') | ECHAR)* '\'' ; - + STRING_LITERAL2 : '"' (~('\u0022' | '\u005c' | '\u000A' | '\u000D') | ECHAR)* '"' ; - + STRING_LITERAL_LONG1 : '\'\'\'' (( '\'' | '\'\'')? (~('\'' | '\\') | ECHAR))* '\'\'\'' ; - + STRING_LITERAL_LONG2 : '"""' (( '"' | '""')? (~('"' | '\\') | ECHAR))* '"""' ; - + ECHAR : '\\' ('t' | 'b' | 'n' | 'r' | 'f' | '\\' | '"' | '\'') ; - + ANON @@ -429,28 +429,27 @@ fragment PN_CHARS_BASE | '\uF900'..'\uFDCF' | '\uFDF0'..'\uFFFD' ; - + fragment PN_CHARS_U : PN_CHARS_BASE | '_' ; - + PN_PREFIX : PN_CHARS_BASE ((PN_CHARS | '.')* PN_CHARS)? ; - + fragment PN_CHARS - : PN_CHARS_U - | '-' + : PN_CHARS_U + | '-' | '0'..'9' | '\u00B7' | '\u0300'..'\u036F' | '\u203F'..'\u2040' ; - + fragment PN_LOCAL : (PN_CHARS_U | '0'..'9') ((PN_CHARS | '.')* PN_CHARS)? ; fragment HEX : ('0'..'9' | 'a'..'f' | 'A'..'F'); COMMENT : '#' .* ('\n'|'\r') {$channel = HIDDEN;}; - diff --git a/antlr-files/TargetVocabulary.g b/antlr-files/TargetVocabulary.g index 4441123..4664bb1 100644 --- a/antlr-files/TargetVocabulary.g +++ b/antlr-files/TargetVocabulary.g @@ -6,7 +6,7 @@ options { @header { package de.fuberlin.wiwiss.r2r.parser; - + import java.util.Set; import java.util.HashSet; import java.util.Map; @@ -24,14 +24,14 @@ options { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } } @@ -42,14 +42,14 @@ options { public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } } @@ -65,17 +65,17 @@ vocabularyDefs returns [Collection value] (vocabularyDef { $value.addAll($vocabularyDef.value); - } + } )* ; - + vocabularyDef returns [List value] : { Set collectedEntities = new HashSet(); Set classRestrictions = new HashSet(); Set classRestrictionsToMap = new HashSet(); $value = new ArrayList(); - } + } (res=iriRef { classRestrictions.add($res.value); } ('+' { classRestrictionsToMap.add($res.value); } @@ -90,7 +90,7 @@ vocabularyDef returns [List value] ')' { if(classRestrictions.size()==0) { $value.add(new TargetVocabulary(null, collectedEntities, false)); - } + } else { for(String restriction: classRestrictions) { boolean addMappingForCR = classRestrictionsToMap.contains(restriction); @@ -111,12 +111,12 @@ prefixDef iriRef returns [String value] : IRI_REF - { + { String iri = $IRI_REF.text; $value = iri.substring(1, iri.length()-1); - } + } | prefixedName - { + { String qName = $prefixedName.text; String iri = PrintUtil.expandQname(qName); if(qName.equals(iri)) @@ -130,14 +130,14 @@ iriRef returns [String value] $value = iri; else $value = iri + prefixAndName[1]; - } + } } else { $value = iri; } } ; - + prefixedName : p=PNAME_LN // | PNAME_NS @@ -146,19 +146,19 @@ iriRef returns [String value] WS : ('\u0020' | '\u0009' | '\u000D' | '\u000A') {$channel = HIDDEN;} ; - + IRI_REF : '<' (~('<' | '>' | '"' | '{' | '}' | '|' | '^' | '`' | '\\' | '\u0000'..'\u0020'))* '>' ; - + PNAME_LN : PNAME_NS PN_LOCAL ; - + PNAME_NS : PN_PREFIX ':' ; - + fragment PN_CHARS_BASE : 'a'..'z' | 'A'..'Z' @@ -174,24 +174,24 @@ fragment PN_CHARS_BASE | '\uF900'..'\uFDCF' | '\uFDF0'..'\uFFFD' ; - + fragment PN_CHARS_U : PN_CHARS_BASE | '_' ; - + fragment PN_LOCAL : (PN_CHARS_U | '0'..'9') ((PN_CHARS | '.')* PN_CHARS)? ; - + PN_PREFIX : PN_CHARS_BASE ((PN_CHARS | '.')* PN_CHARS)? ; - + fragment PN_CHARS - : PN_CHARS_U - | '-' + : PN_CHARS_U + | '-' | '0'..'9' | '\u00B7' | '\u0300'..'\u036F' | '\u203F'..'\u2040' - ; \ No newline at end of file + ; diff --git a/antlr-files/TargetVocabularyDiscovery.g b/antlr-files/TargetVocabularyDiscovery.g index b785bd6..b847afd 100644 --- a/antlr-files/TargetVocabularyDiscovery.g +++ b/antlr-files/TargetVocabularyDiscovery.g @@ -6,7 +6,7 @@ options { @header { package de.fuberlin.wiwiss.r2r.parser; - + import java.util.Set; import java.util.HashSet; import java.util.Map; @@ -24,14 +24,14 @@ options { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } } @@ -42,14 +42,14 @@ options { public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } } @@ -65,16 +65,16 @@ vocabularyDefs returns [Collection value] (vocabularyDef { $value.add($vocabularyDef.value); - } + } )* ; - + vocabularyDef returns [DiscoveryTargetVocabulary value] : { String dataset = null; Map termDatasetPairs = new HashMap(); - } + } '(' (entity=termWithDataset { termDatasetPairs.put($entity.term, $entity.dataset);} (',' entity=termWithDataset { termDatasetPairs.put($entity.term, $entity.dataset);} )* )? ')' ('^' ds=iriRef {dataset = $ds.value;})? '.'? @@ -82,10 +82,10 @@ vocabularyDef returns [DiscoveryTargetVocabulary value] $value = new DiscoveryTargetVocabulary(termDatasetPairs, dataset); } ; - + termWithDataset returns [String term, String dataset] : t=iriRef { $term = $t.value; $dataset = null;} - ('^' ds=iriRef {$dataset = $ds.value;} )? + ('^' ds=iriRef {$dataset = $ds.value;} )? ; prefixDefs: prefixDef ('.' prefixDef)* '.'?; @@ -99,12 +99,12 @@ prefixDef iriRef returns [String value] : IRI_REF - { + { String iri = $IRI_REF.text; $value = iri.substring(1, iri.length()-1); - } + } | prefixedName - { + { String qName = $prefixedName.text; String iri = PrintUtil.expandQname(qName); if(qName.equals(iri)) @@ -118,14 +118,14 @@ iriRef returns [String value] $value = iri; else $value = iri + prefixAndName[1]; - } + } } else { $value = iri; } } ; - + prefixedName : p=PNAME_LN // | PNAME_NS @@ -134,19 +134,19 @@ iriRef returns [String value] WS : ('\u0020' | '\u0009' | '\u000D' | '\u000A') {$channel = HIDDEN;} ; - + IRI_REF : '<' (~('<' | '>' | '"' | '{' | '}' | '|' | '^' | '`' | '\\' | '\u0000'..'\u0020'))* '>' ; - + PNAME_LN : PNAME_NS PN_LOCAL ; - + PNAME_NS : PN_PREFIX ':' ; - + fragment PN_CHARS_BASE : 'a'..'z' | 'A'..'Z' @@ -162,24 +162,24 @@ fragment PN_CHARS_BASE | '\uF900'..'\uFDCF' | '\uFDF0'..'\uFFFD' ; - + fragment PN_CHARS_U : PN_CHARS_BASE | '_' ; - + fragment PN_LOCAL : (PN_CHARS_U | '0'..'9') ((PN_CHARS | '.')* PN_CHARS)? ; - + PN_PREFIX : PN_CHARS_BASE ((PN_CHARS | '.')* PN_CHARS)? ; - + fragment PN_CHARS - : PN_CHARS_U - | '-' + : PN_CHARS_U + | '-' | '0'..'9' | '\u00B7' | '\u0300'..'\u036F' | '\u203F'..'\u2040' - ; \ No newline at end of file + ; diff --git a/antlr-files/Transformation.g b/antlr-files/Transformation.g index 994fcde..7f3708b 100755 --- a/antlr-files/Transformation.g +++ b/antlr-files/Transformation.g @@ -6,7 +6,7 @@ options { @header { package de.fuberlin.wiwiss.r2r.parser; - + import de.fuberlin.wiwiss.r2r.*; import de.fuberlin.wiwiss.r2r.utils.StringUtils; import java.util.List; @@ -25,29 +25,29 @@ options { FunctionMapper funcMapper=new FunctionMapper(); Set variables = new HashSet(); boolean targetVariableParsed = false; - + public void setFunctionManager(FunctionManager fm) { funcManager = fm; } - + public void setFunctionMapping(FunctionMapper fm) { funcMapper = fm; } - + public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + private FunctionExecution createFunctionExecution(String functionName, Argument... args) { List arguments = new ArrayList(); for(Argument arg: args) @@ -65,14 +65,14 @@ options { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } } @@ -97,24 +97,24 @@ expression returns [Argument value] : m=mult { $value = $m.value; String operation = null;} (( PLUS {operation = "add"; } | MINUS {operation = "subtract"; } - ) m=mult { + ) m=mult { $value = createFunctionExecution(operation, $value, $m.value); } )* ; - + mult returns [Argument value] : u=unary { $value = $u.value; String operation = null;} - (( MULT { operation = "multiply"; } + (( MULT { operation = "multiply"; } | DIV { operation = "divide"; } ) u=unary { $value = createFunctionExecution(operation, $value, $u.value); } )* ; - + unary returns [Argument value] - : {boolean negative = false;} + : {boolean negative = false;} ( (MINUS { negative = !negative; } | PLUS) )* term { if(negative) @@ -123,11 +123,11 @@ unary returns [Argument value] $value = $term.value; } ; - + term returns [Argument value] : function { $value = $function.funcExec; } | variable - { + { String varName = $variable.text; $value = new VariableArgument(varName.substring(1)); } @@ -141,26 +141,26 @@ term returns [Argument value] | '(' expression ')' { $value = $expression.value; } | conditional { $value = $conditional.value; } ; - + conditional returns [Argument value] : '[' leftEx=expression comp=comparisonOp rightEx=expression '?' trueEx=expression ':' falseEx=expression ']' { // Create the comparison argument Argument compOpArg = new ConstantArgument(ConstantType.STRING, $comp.text); - + // First the compare function to calculate the boolean FunctionExecution comparisonFunction = createFunctionExecution("compare", compOpArg, $leftEx.value, $rightEx.value); // Then the booleanPick function to pick either the left or right value $value = createFunctionExecution("booleanPick", comparisonFunction, $trueEx.value, $falseEx.value); - } + } ; - + comparisonOp returns [Argument value] : '>' | '>=' | '=' | '<' | '<=' | '!=' ; - - + + variable : v=VAR1 { @@ -169,7 +169,7 @@ variable variables.add(varName.substring(1)); } else - targetVariableParsed = true; + targetVariableParsed = true; } | v=VAR2 { @@ -178,13 +178,13 @@ variable variables.add(varName.substring(1)); } else - targetVariableParsed = true; + targetVariableParsed = true; } ; - + function returns [FunctionExecution funcExec] : FUNCTIONNAME - { + { List arguments = new ArrayList(); String fname = $FUNCTIONNAME.text; String uri = funcMapper.getFunctionUri(fname); @@ -192,13 +192,13 @@ function returns [FunctionExecution funcExec] if(function==null) throw new ParseException("Function Manager could not find/load Function <" + uri + ">"); } - '(' + '(' (a=expression { arguments.add($a.value); } (',' a=expression { arguments.add($a.value);})* )? ')' { $funcExec = new FunctionExecution(function, Collections.unmodifiableList(arguments));} ; - + //integer // : INTEGER | INTEGER_NEGATIVE | INTEGER_POSITIVE // ; @@ -206,19 +206,19 @@ function returns [FunctionExecution funcExec] //decimal // : DECIMAL | DECIMAL_NEGATIVE | DECIMAL_POSITIVE // ; -// +// //doubleVal // : DOUBLE | DOUBLE_POSITIVE | DOUBLE_NEGATIVE // ; integer - : INTEGER + : INTEGER ; decimal : DECIMAL ; - + doubleVal : DOUBLE ; @@ -229,37 +229,37 @@ doubleVal | s=STRING_LITERAL_LONG1 { String temp = $s.text; $value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); } | s=STRING_LITERAL_LONG2 { String temp = $s.text; $value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); } ; - + //TOKENS - + VAR1 : '?' VARNAME ; - + VAR2 : '$' VARNAME ; - + INTEGER : ('0'..'9')+ ; - + FUNCTIONNAME : ((ALPHA)+ ':')? ALPHA ('a'..'z' | 'A'..'Z' | '_' | '-' | '0'..'9')* ; - + DECIMAL : ('0'..'9')+ '.' ('0'..'9')* | '.' ('0'..'9')+ ; - + DOUBLE : ('0'..'9')+ '.' ('0'..'9')* EXPONENT | '.' ('0'..'9')+ EXPONENT | ('0'..'9')+ EXPONENT ; - + MULT : '*' ; @@ -267,31 +267,31 @@ MULT DIV : '/' ; - + //INTEGER_POSITIVE // : PLUS INTEGER // ; -// +// //DECIMAL_POSITIVE // : PLUS DECIMAL // ; -// +// //DOUBLE_POSITIVE // : PLUS DOUBLE // ; -// +// //INTEGER_NEGATIVE // : MINUS INTEGER // ; -// +// //DECIMAL_NEGATIVE // : MINUS DECIMAL // ; -// +// //DOUBLE_NEGATIVE // : MINUS DOUBLE // ; - + EXPONENT : ('e' | 'E') (PLUS | MINUS)? ('0'..'9')+ ; @@ -299,7 +299,7 @@ EXPONENT STRING_LITERAL1 : '\'' (~('\u0027' | '\u005c' | '\u000A' | '\u000D') | ECHAR)* '\'' ; - + STRING_LITERAL2 : '"' (~('\u0022' | '\u005c' | '\u000A' | '\u000D') | ECHAR)* '"' ; @@ -307,19 +307,19 @@ STRING_LITERAL2 STRING_LITERAL_LONG1 : '\'\'\'' (( '\'' | '\'\'')? (~('\'' | '\\') | ECHAR))* '\'\'\'' ; - + STRING_LITERAL_LONG2 : '"""' (( '"' | '""')? (~('"' | '\\') | ECHAR))* '"""' ; - + MINUS : '-' ; - + PLUS : '+' ; - + ECHAR : '\\' ('t' | 'b' | 'n' | 'r' | 'f' | '\\' | '"' | '\'') ; @@ -327,7 +327,7 @@ ECHAR VARNAME : (PN_CHARS_U | '0'..'9') (PN_CHARS_U | '0'..'9' | '\u00B7' | '\u0300'..'\u036F' | '\u203F'..'\u2040')* ; - + WS : ('\u0020' | '\u0009' | '\u000D' | '\u000A') {$channel = HIDDEN;} ; @@ -335,7 +335,7 @@ WS PN_PREFIX : PN_CHARS_BASE ((PN_CHARS | '.')* PN_CHARS)? ; - + fragment PN_CHARS_BASE : 'a'..'z' | 'A'..'Z' @@ -351,24 +351,24 @@ fragment PN_CHARS_BASE | '\uF900'..'\uFDCF' | '\uFDF0'..'\uFFFD' ; - + fragment PN_CHARS_U : PN_CHARS_BASE | '_' ; - + fragment PN_CHARS - : PN_CHARS_U - | '-' + : PN_CHARS_U + | '-' | '0'..'9' | '\u00B7' | '\u0300'..'\u036F' | '\u203F'..'\u2040' ; - + fragment PN_LOCAL : (PN_CHARS_U | '0'..'9') ((PN_CHARS | '.')* PN_CHARS)? ; - + fragment ALPHA : 'a'..'z' | 'A'..'Z' - ; \ No newline at end of file + ; diff --git a/dependabot.yml b/dependabot.yml new file mode 100644 index 0000000..6114ed3 --- /dev/null +++ b/dependabot.yml @@ -0,0 +1,22 @@ +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/example_data/DBpediaToX.ttl b/example_data/DBpediaToX.ttl index e215418..1d70f90 100644 --- a/example_data/DBpediaToX.ttl +++ b/example_data/DBpediaToX.ttl @@ -53,7 +53,7 @@ r2r:targetPattern "?SUBJ a geonames:Feature" ; r2r:prefixDefinitions "dbpedia-owl: . geonames: " ; dc:date "2010-07-01"^^xsd:date ; - dc:creator . + dc:creator . mappings:dbpediaPopulationTotalToGeonamesPopulationProperty a r2r:Mapping ; @@ -61,7 +61,7 @@ r2r:targetPattern "?SUBJ geonames:population ?o" ; r2r:prefixDefinitions "dbpedia-owl: . geonames: " ; dc:date "2010-07-01"^^xsd:date ; - dc:creator . + dc:creator . mappings:geonamesPopulationToDBpediaPopulationTotalProperty a r2r:Mapping ; @@ -69,7 +69,7 @@ r2r:targetPattern "?SUBJ dbpedia-owl:populationTotal ?o" ; r2r:prefixDefinitions "dbpedia-owl: . geonames: " ; dc:date "2010-07-01"^^xsd:date ; - dc:creator . + dc:creator . mappings:geonamesPostalCodeToDBpediaPostalCodeProperty a r2r:Mapping ; @@ -77,7 +77,7 @@ r2r:targetPattern "?SUBJ dbpedia-owl:postalCode ?o" ; r2r:prefixDefinitions "dbpedia-owl: . geonames: " ; dc:date "2010-07-01"^^xsd:date ; - dc:creator . + dc:creator . mappings:dbpediaPostalCodeToGeonamesPostalCodeProperty a r2r:Mapping ; @@ -85,7 +85,7 @@ r2r:targetPattern "?SUBJ geonames:postalCode ?o" ; r2r:prefixDefinitions "dbpedia-owl: . geonames: " ; dc:date "2010-07-01"^^xsd:date ; - dc:creator . + dc:creator . # Factbook - DBpedia @@ -97,7 +97,7 @@ r2r:sourceDataset mappings:factbookVOID ; r2r:targetDataset mappings:dbpediaVOID ; dc:date "2010-07-01"^^xsd:date ; - dc:creator . + dc:creator . mappings:DBpediaGeoLatitudeToFactbookLatitudeProperty a r2r:Mapping ; @@ -117,7 +117,7 @@ r2r:sourceDataset mappings:factbookVOID ; r2r:targetDataset mappings:dbpediaVOID ; dc:date "2010-07-01"^^xsd:date ; - dc:creator . + dc:creator . mappings:DBpediaGeoLongitudeToFactbookLongitudeProperty a r2r:Mapping ; @@ -182,7 +182,7 @@ r2r:targetPattern "?SUBJ dc:creator ?author" ; r2r:prefixDefinitions "dc: . dbpedia-owl: " ; dc:date "2010-07-04"^^xsd:date ; - dc:creator . + dc:creator . mappings:bookmashupSkosSubjectToDBpediaGenre a r2r:Mapping ; r2r:sourcePattern "?SUBJ skos:subject ?genre . ?SUBJ a bm:Book" ; @@ -190,7 +190,7 @@ r2r:prefixDefinitions "skos: . dbpedia-owl: . bm: " ; r2r:sourceDataset mappings:bookmashupVOID ; dc:date "2010-07-04"^^xsd:date ; - dc:creator . + dc:creator . mappings:bookmashupToDbpediaBook a r2r:Mapping ; @@ -199,14 +199,14 @@ r2r:prefixDefinitions "dbpedia-owl: . bm: " ; dc:date "2010-07-04"^^xsd:date ; dc:creator . - + mappings:dbpediaToBookmashupBook a r2r:Mapping ; r2r:sourcePattern "?SUBJ a dbpedia-owl:Book" ; r2r:targetPattern "?SUBJ a bm:Book" ; r2r:prefixDefinitions "dbpedia-owl: . bm: " ; dc:date "2010-07-04"^^xsd:date ; - dc:creator . + dc:creator . mappings:dbpediaISBNToBookMashupIdentifier a r2r:Mapping ; @@ -287,7 +287,7 @@ mappings:dbpediaToUScensusLandArea a r2r:Mapping ; r2r:sourcePattern "?SUBJ dbpedia-owl:areaLand ?area" ; - r2r:targetPattern "?SUBJ ?areaString" ; + r2r:targetPattern "?SUBJ ?areaString" ; r2r:transformation "?areaString = concat(integer(?area), ' m^2')" ; r2r:prefixDefinitions "dbpedia-owl: " ; dc:creator ; @@ -298,47 +298,47 @@ mappings:dailymedToDBpediaProductProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ ?p" ; - r2r:targetPattern "?SUBJ dbpedia-owl:product ?p" ; + r2r:targetPattern "?SUBJ dbpedia-owl:product ?p" ; r2r:prefixDefinitions "dbpedia-owl: " ; dc:creator ; dc:date "2010-06-22"^^xsd:date . - + mappings:dailymedToDBpediaOrganisationClass a r2r:Mapping ; r2r:sourcePattern "?SUBJ a " ; - r2r:targetPattern "?SUBJ a dbpedia-owl:Organisation" ; + r2r:targetPattern "?SUBJ a dbpedia-owl:Organisation" ; r2r:prefixDefinitions "dbpedia-owl: " ; dc:creator ; dc:date "2010-06-22"^^xsd:date . - + mappings:dbpediaToDailymedOrganisationClass a r2r:Mapping ; r2r:sourcePattern "?SUBJ a dbpedia-owl:Organisation" ; - r2r:targetPattern "?SUBJ a " ; + r2r:targetPattern "?SUBJ a " ; r2r:prefixDefinitions "dbpedia-owl: " ; dc:creator ; - dc:date "2010-06-22"^^xsd:date . + dc:date "2010-06-22"^^xsd:date . -# Diseasome: +# Diseasome: mappings:dbpediaToDiseasomeDiseaseClass a r2r:Mapping ; r2r:sourcePattern "?SUBJ a dbpedia-owl:Disease" ; - r2r:targetPattern "?SUBJ a " ; + r2r:targetPattern "?SUBJ a " ; r2r:prefixDefinitions "dbpedia-owl: " ; dc:creator ; - dc:date "2010-06-22"^^xsd:date . - + dc:date "2010-06-22"^^xsd:date . + mappings:diseasomeToDBpediaDiseaseClass a r2r:Mapping ; r2r:sourcePattern "?SUBJ a " ; - r2r:targetPattern "?SUBJ a dbpedia-owl:Disease" ; + r2r:targetPattern "?SUBJ a dbpedia-owl:Disease" ; r2r:prefixDefinitions "dbpedia-owl: " ; dc:creator ; - dc:date "2010-06-22"^^xsd:date . - + dc:date "2010-06-22"^^xsd:date . + mappings:diseasomeToFoafName a r2r:Mapping ; r2r:sourcePattern "?SUBJ ?o" ; - r2r:targetPattern "?SUBJ foaf:name ?o" ; + r2r:targetPattern "?SUBJ foaf:name ?o" ; r2r:prefixDefinitions "foaf: " ; dc:creator ; - dc:date "2010-06-22"^^xsd:date . + dc:date "2010-06-22"^^xsd:date . mappings:omimMapping a r2r:Mapping ; r2r:sourcePattern "?SUBJ diseasome:omim ?omimURI" ; @@ -354,80 +354,80 @@ mappings:linkedmdbToDBpediaFilm a r2r:Mapping ; r2r:sourcePattern "?SUBJ a linkedmdb:film" ; - r2r:targetPattern "?SUBJ a dbpedia-owl:Film" ; + r2r:targetPattern "?SUBJ a dbpedia-owl:Film" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-07-03"^^xsd:date . - + mappings:dbpediaToLinkedmdbFilm a r2r:Mapping ; r2r:sourcePattern "?SUBJ a dbpedia-owl:Film" ; - r2r:targetPattern "?SUBJ a linkedmdb:film" ; + r2r:targetPattern "?SUBJ a linkedmdb:film" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; - dc:date "2010-07-03"^^xsd:date . - + dc:date "2010-07-03"^^xsd:date . + mappings:dbpediaStarringToLinkedmdbactor a r2r:Mapping ; r2r:sourcePattern "?SUBJ dbpedia-owl:starring ?o" ; - r2r:targetPattern "?SUBJ linkedmdb:actor ?o" ; + r2r:targetPattern "?SUBJ linkedmdb:actor ?o" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; - dc:date "2010-07-03"^^xsd:date . - + dc:date "2010-07-03"^^xsd:date . + mappings:linkedmdbToDBpediaDirectorProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ linkedmdb:director ?d" ; - r2r:targetPattern "?SUBJ dbpedia-owl:director ?d" ; + r2r:targetPattern "?SUBJ dbpedia-owl:director ?d" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-07-03"^^xsd:date . - + mappings:dbpediaToLinkedmdbDirectorProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ dbpedia-owl:director ?d" ; - r2r:targetPattern "?SUBJ linkedmdb:director ?d" ; + r2r:targetPattern "?SUBJ linkedmdb:director ?d" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; - dc:date "2010-07-03"^^xsd:date . + dc:date "2010-07-03"^^xsd:date . mappings:linkedmdbToDBpediaProducerProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ linkedmdb:producer ?d" ; - r2r:targetPattern "?SUBJ dbpedia-owl:producer ?d" ; + r2r:targetPattern "?SUBJ dbpedia-owl:producer ?d" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-07-03"^^xsd:date . - + mappings:dbpediaToLinkedmdbProducerProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ dbpedia-owl:producer ?d" ; - r2r:targetPattern "?SUBJ linkedmdb:producer ?d" ; + r2r:targetPattern "?SUBJ linkedmdb:producer ?d" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; - dc:date "2010-07-03"^^xsd:date . - + dc:date "2010-07-03"^^xsd:date . + mappings:linkedmdbToDBpediaEditorProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ linkedmdb:editor ?d" ; - r2r:targetPattern "?SUBJ dbpedia-owl:editing ?d" ; + r2r:targetPattern "?SUBJ dbpedia-owl:editing ?d" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-07-03"^^xsd:date . - + mappings:dbpediaToLinkedmdbEditorProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ dbpedia-owl:editing ?d" ; - r2r:targetPattern "?SUBJ linkedmdb:editor ?d" ; + r2r:targetPattern "?SUBJ linkedmdb:editor ?d" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; - dc:date "2010-07-03"^^xsd:date . + dc:date "2010-07-03"^^xsd:date . mappings:linkedmdbToDBpediaWriterProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ linkedmdb:writer ?d" ; - r2r:targetPattern "?SUBJ dbpedia-owl:writer ?d" ; + r2r:targetPattern "?SUBJ dbpedia-owl:writer ?d" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-07-03"^^xsd:date . - + mappings:dbpediaToLinkedmdbWriterProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ dbpedia-owl:writer ?d" ; - r2r:targetPattern "?SUBJ linkedmdb:writer ?d" ; + r2r:targetPattern "?SUBJ linkedmdb:writer ?d" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; - dc:date "2010-07-03"^^xsd:date . + dc:date "2010-07-03"^^xsd:date . mappings:dbpediaToLinkedmdbRuntime a r2r:Mapping ; r2r:prefixDefinitions "dbpedia-owl: . movie: " ; @@ -457,16 +457,16 @@ r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-06-22"^^xsd:date . - + mappings:dbpediaToLinkedmdbDistributorProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ dbpedia-owl:distributor ?distributor" ; r2r:targetPattern "?distributor linkedmdb:film_of_distributor ?SUBJ" ; r2r:prefixDefinitions "linkedmdb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-06-22"^^xsd:date . - -# Drugbank: + +# Drugbank: mappings:drugbankToDBpediaCasNumberProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ drugbank:casRegistryNumber ?casNrURI" ; @@ -493,34 +493,34 @@ r2r:prefixDefinitions "fb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-07-03"^^xsd:date . - + mappings:freebaseToDBpediaMusicalArtistClass a r2r:Mapping ; r2r:sourcePattern "?SUBJ a fb:music.artist" ; r2r:targetPattern "?SUBJ a dbpedia-owl:MusicalArtist" ; r2r:prefixDefinitions "fb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-07-03"^^xsd:date . - + mappings:dbpediaToFreebasePlaceOfBirth a r2r:Mapping ; r2r:sourcePattern "?SUBJ dbpedia-owl:birthPlace ?o" ; r2r:targetPattern "?SUBJ fb:people.person.place_of_birth ?o" ; r2r:prefixDefinitions "fb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-07-03"^^xsd:date . - + mappings:freebaseToDBpediaBirthPlace a r2r:Mapping ; r2r:sourcePattern "?SUBJ fb:people.person.place_of_birth ?o" ; r2r:targetPattern "?SUBJ dbpedia-owl:birthPlace ?o" ; r2r:prefixDefinitions "fb: . dbpedia-owl: " ; dc:creator ; - dc:date "2010-07-03"^^xsd:date . - + dc:date "2010-07-03"^^xsd:date . + mappings:freebaseToDBpediaDeathPlace a r2r:Mapping ; r2r:sourcePattern "?SUBJ fb:people.deceased_person.place_of_death ?o" ; r2r:targetPattern "?SUBJ dbpedia-owl:deathPlace ?o" ; r2r:prefixDefinitions "fb: . dbpedia-owl: " ; dc:creator ; - dc:date "2010-07-03"^^xsd:date . + dc:date "2010-07-03"^^xsd:date . mappings:dbpediaToFreebasePlaceOfDeath a r2r:Mapping ; r2r:sourcePattern "?SUBJ dbpedia-owl:deathPlace ?o" ; @@ -528,13 +528,13 @@ r2r:prefixDefinitions "fb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-07-03"^^xsd:date . - + mappings:freebaseToDBpediaInstrumentProperty a r2r:Mapping ; r2r:sourcePattern "?SUBJ fb:music.group_member.instruments_played ?o" ; r2r:targetPattern "?SUBJ dbpedia-owl:instrument ?o" ; r2r:prefixDefinitions "fb: . dbpedia-owl: " ; dc:creator ; - dc:date "2010-07-03"^^xsd:date . + dc:date "2010-07-03"^^xsd:date . mappings:dbpediaToFreebaseInstrumentsPlayed a r2r:Mapping ; r2r:sourcePattern "?SUBJ dbpedia-owl:instrument ?o" ; @@ -542,14 +542,14 @@ r2r:prefixDefinitions "fb: . dbpedia-owl: " ; dc:creator ; dc:date "2010-07-03"^^xsd:date . - + mappings:freebaseArtistGenreToDBpediaGenre a r2r:Mapping ; r2r:sourcePattern "?SUBJ fb:music.artist.genre ?o" ; r2r:targetPattern "?SUBJ dbpedia-owl:genre ?o" ; r2r:prefixDefinitions "fb: . dbpedia-owl: " ; dc:creator ; - dc:date "2010-07-03"^^xsd:date . - + dc:date "2010-07-03"^^xsd:date . + mappings:freebaseAlbum a r2r:Mapping ; r2r:sourcePattern "?artist fb:music.artist.album ?SUBJ" ; r2r:targetPattern "?SUBJ dbpedia-owl:artist ?artist" ; @@ -571,7 +571,7 @@ dc:creator ; dc:date "2010-06-22"^^xsd:date . - + # Freebase: Film mappings:freebaseToDBpediaRuntime @@ -582,7 +582,7 @@ r2r:transformation "?runtimeInSeconds = ?runtimeInMinutes * 60" ; dc:creator ; dc:date "2010-06-22"^^xsd:date . - + mappings:dbpediaToFreebaseRuntime a r2r:Mapping ; r2r:prefixDefinitions "dbpedia-owl: . fb: " ; @@ -591,7 +591,7 @@ r2r:transformation "?generatedURI = concat(?SUBJ, 'Runtime')" ; dc:creator ; dc:date "2010-06-22"^^xsd:date . - + # Freebase - Linkedmdb: Film mappings:freebaseToLinkedmdbRuntime @@ -602,7 +602,7 @@ r2r:targetDataset mappings:linkedmdbVOID ; dc:creator ; dc:date "2010-06-22"^^xsd:date . - + mappings:linkedmdbToFreebaseRuntime a r2r:Mapping ; r2r:prefixDefinitions "linkedmdb: . fb: " ; diff --git a/example_data/example1_data.ttl b/example_data/example1_data.ttl index 55a1065..f37ee1f 100644 --- a/example_data/example1_data.ttl +++ b/example_data/example1_data.ttl @@ -10,4 +10,4 @@ s:JohnDoe foaf:firstName "John" ; s:JohnSmith foaf:firstName "John" ; foaf:lastName "Smith" ; v:email "john.smith@nodomain" ; - a foaf:Person . \ No newline at end of file + a foaf:Person . diff --git a/example_data/example2_data.ttl b/example_data/example2_data.ttl index 966500e..b5e06b9 100644 --- a/example_data/example2_data.ttl +++ b/example_data/example2_data.ttl @@ -6,4 +6,4 @@ s:hydrogen "-434.45" . s:oxygen "-361.82" . -s:copper "1984.32" . \ No newline at end of file +s:copper "1984.32" . diff --git a/example_data/example5_data.ttl b/example_data/example5_data.ttl index 55a1065..f37ee1f 100644 --- a/example_data/example5_data.ttl +++ b/example_data/example5_data.ttl @@ -10,4 +10,4 @@ s:JohnDoe foaf:firstName "John" ; s:JohnSmith foaf:firstName "John" ; foaf:lastName "Smith" ; v:email "john.smith@nodomain" ; - a foaf:Person . \ No newline at end of file + a foaf:Person . diff --git a/example_data/mappings.ttl b/example_data/mappings.ttl index 4fafa5d..5436e92 100644 --- a/example_data/mappings.ttl +++ b/example_data/mappings.ttl @@ -17,7 +17,7 @@ mp:DBpediaToFoafPersonMapping r2r:prefixDefinitions "foaf: . dbpedia: " ; r2r:sourcePattern "?SUBJ a dbpedia:Person" ; r2r:targetPattern "?SUBJ a foaf:Person" . - + mp:labelToNameMapping a r2r:PropertyMapping ; @@ -42,13 +42,13 @@ mp:VCardEmailToFoafMbox r2r:sourcePattern "{ ?SUBJ v:email ?o } UNION { ?SUBJ v:workEmail ?o }" ; r2r:prefixDefinitions "foaf: . v: . " ; r2r:targetPattern "?SUBJ foaf:mbox ?o" . - + mp:VCardBirthDayMapping a r2r:PropertyMapping ; r2r:sourcePattern "?SUBJ v:bday ?o" ; r2r:prefixDefinitions "v: . dbpedia: " ; r2r:targetPattern "?SUBJ dbpedia:birthDay ?o" . - + # OWL:equivalentClass, OWL:equivalentProperty, RDFS:subPropertyOf and RDFS:subClassOf mappings foaf:Person owl:equivalentClass dbpedia:Person . diff --git a/example_data/run.bat b/example_data/run.bat index d7cc7f6..7517849 100644 --- a/example_data/run.bat +++ b/example_data/run.bat @@ -13,4 +13,4 @@ for %%j in (%R2RROOT%\lib\*.jar) do call :addjar %%j java -cp %CP% -Xmx256M %* :addjar -set CP=%CP%;%1 \ No newline at end of file +set CP=%CP%;%1 diff --git a/example_data/xpath_mappings.ttl b/example_data/xpath_mappings.ttl index 1f1a777..e3d02d8 100644 --- a/example_data/xpath_mappings.ttl +++ b/example_data/xpath_mappings.ttl @@ -25,4 +25,4 @@ mp:concatNamesAndConvertXPath r2r:sourcePattern "?SUBJ foaf:firstName ?f . ?SUBJ foaf:lastName ?l" ; r2r:targetPattern "?SUBJ v:uri ?" ; r2r:transformation "?name = xpath_concat('http://www.example.com/', xpath_encode_for_uri(xpath_concat(?f, ' ', ?l)))" ; # Concatenate the first and last name seperated by a comma+space. - r2r:prefixDefinitions "foaf: . v: " . \ No newline at end of file + r2r:prefixDefinitions "foaf: . v: " . diff --git a/nitpick-style.toml b/nitpick-style.toml new file mode 100644 index 0000000..0bbf053 --- /dev/null +++ b/nitpick-style.toml @@ -0,0 +1,4 @@ +[nitpick.styles] +include = [ + "py://nitpick/resources/python/pre-commit-hooks", +] diff --git a/r2r.iml b/r2r.iml index 35ebe31..b55b3a4 100644 --- a/r2r.iml +++ b/r2r.iml @@ -33,4 +33,4 @@ - \ No newline at end of file + diff --git a/r2redit/src/LICENSE b/r2redit/src/LICENSE index 7e99036..543a65a 100644 --- a/r2redit/src/LICENSE +++ b/r2redit/src/LICENSE @@ -15,4 +15,4 @@ Some Icons are Copyright © Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 license. -Contains icons from the Silk Icons under Creative Commons Attribution 2.5 License: http://www.famfamfam.com/lab/icons/silk/ \ No newline at end of file +Contains icons from the Silk Icons under Creative Commons Attribution 2.5 License: http://www.famfamfam.com/lab/icons/silk/ diff --git a/r2redit/src/css/jquery.treeview.css b/r2redit/src/css/jquery.treeview.css index c8e1ce4..23edee8 100755 --- a/r2redit/src/css/jquery.treeview.css +++ b/r2redit/src/css/jquery.treeview.css @@ -1,74 +1,136 @@ -.treeview, .treeview ul { - padding: 0; - margin: 0; - list-style: none; +.treeview, +.treeview ul { + padding: 0; + margin: 0; + list-style: none; } .treeview ul { - background-color: white; - margin-top: 4px; -} - -.treeview .hitarea { - background: url(../images/treeview-default.gif) -64px -25px no-repeat; - height: 16px; - width: 16px; - margin-left: -16px; - float: left; - cursor: pointer; -} -/* fix for IE6 */ -* html .hitarea { - display: inline; - float:none; -} - -.treeview li { - margin: 0; - padding: 3px 0pt 3px 16px; -} - -.treeview a.selected { - background-color: #eee; -} - -#treecontrol { margin: 1em 0; display: none; } - -.treeview .hover { color: red; cursor: pointer; } - -.treeview li { background: url(../images/treeview-default-line.gif) 0 0 no-repeat; } -.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; } - -.treeview .expandable-hitarea { background-position: -80px -3px; } - -.treeview li.last { background-position: 0 -1766px } -.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(../images/treeview-default.gif); } -.treeview li.lastCollapsable { background-position: 0 -111px } -.treeview li.lastExpandable { background-position: -32px -67px } - -.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; } - -.treeview-red li { background-image: url(../images/treeview-red-line.gif); } -.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(../images/treeview-red.gif); } - -.treeview-black li { background-image: url(../images/treeview-black-line.gif); } -.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(../images/treeview-black.gif); } - -.treeview-gray li { background-image: url(../images/treeview-gray-line.gif); } -.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(../images/treeview-gray.gif); } - -.treeview-famfamfam li { background-image: url(../images/treeview-famfamfam-line.gif); } -.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(../images/treeview-famfamfam.gif); } - -.treeview .placeholder { - background: url(../images/ajax-loader.gif) 0 0 no-repeat; - height: 16px; - width: 16px; - display: block; -} - -.filetree li { padding: 3px 0 2px 16px; } -.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; } -.filetree span.folder { background: url(../images/folder.gif) 0 0 no-repeat; } -.filetree li.expandable span.folder { background: url(../images/folder-closed.gif) 0 0 no-repeat; } -.filetree span.file { background: url(../images/file.gif) 0 0 no-repeat; } + background-color: white; + margin-top: 4px; +} + +.treeview .hitarea { + background: url(../images/treeview-default.gif) -64px -25px no-repeat; + height: 16px; + width: 16px; + margin-left: -16px; + float: left; + cursor: pointer; +} +/* fix for IE6 */ +* html .hitarea { + display: inline; + float: none; +} + +.treeview li { + margin: 0; + padding: 3px 0pt 3px 16px; +} + +.treeview a.selected { + background-color: #eee; +} + +#treecontrol { + margin: 1em 0; + display: none; +} + +.treeview .hover { + color: red; + cursor: pointer; +} + +.treeview li { + background: url(../images/treeview-default-line.gif) 0 0 no-repeat; +} +.treeview li.collapsable, +.treeview li.expandable { + background-position: 0 -176px; +} + +.treeview .expandable-hitarea { + background-position: -80px -3px; +} + +.treeview li.last { + background-position: 0 -1766px; +} +.treeview li.lastCollapsable, +.treeview li.lastExpandable { + background-image: url(../images/treeview-default.gif); +} +.treeview li.lastCollapsable { + background-position: 0 -111px; +} +.treeview li.lastExpandable { + background-position: -32px -67px; +} + +.treeview div.lastCollapsable-hitarea, +.treeview div.lastExpandable-hitarea { + background-position: 0; +} + +.treeview-red li { + background-image: url(../images/treeview-red-line.gif); +} +.treeview-red .hitarea, +.treeview-red li.lastCollapsable, +.treeview-red li.lastExpandable { + background-image: url(../images/treeview-red.gif); +} + +.treeview-black li { + background-image: url(../images/treeview-black-line.gif); +} +.treeview-black .hitarea, +.treeview-black li.lastCollapsable, +.treeview-black li.lastExpandable { + background-image: url(../images/treeview-black.gif); +} + +.treeview-gray li { + background-image: url(../images/treeview-gray-line.gif); +} +.treeview-gray .hitarea, +.treeview-gray li.lastCollapsable, +.treeview-gray li.lastExpandable { + background-image: url(../images/treeview-gray.gif); +} + +.treeview-famfamfam li { + background-image: url(../images/treeview-famfamfam-line.gif); +} +.treeview-famfamfam .hitarea, +.treeview-famfamfam li.lastCollapsable, +.treeview-famfamfam li.lastExpandable { + background-image: url(../images/treeview-famfamfam.gif); +} + +.treeview .placeholder { + background: url(../images/ajax-loader.gif) 0 0 no-repeat; + height: 16px; + width: 16px; + display: block; +} + +.filetree li { + padding: 3px 0 2px 16px; +} +.filetree span.folder, +.filetree span.file { + padding: 1px 0 1px 16px; + display: block; +} +.filetree span.folder { + background: url(../images/folder.gif) 0 0 no-repeat; +} +.filetree li.expandable span.folder { + background: url(../images/folder-closed.gif) 0 0 no-repeat; +} +.filetree span.file { + background: url(../images/file.gif) 0 0 no-repeat; +} diff --git a/r2redit/src/css/smoothness/jquery-ui-1.8.11.custom.css b/r2redit/src/css/smoothness/jquery-ui-1.8.11.custom.css index b2f72e9..beebd78 100755 --- a/r2redit/src/css/smoothness/jquery-ui-1.8.11.custom.css +++ b/r2redit/src/css/smoothness/jquery-ui-1.8.11.custom.css @@ -10,36 +10,80 @@ /* Layout helpers ----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + position: absolute !important; + clip: rect(1px 1px 1px 1px); + clip: rect(1px, 1px, 1px, 1px); +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} +.ui-helper-clearfix { + display: inline-block; +} /* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } +* html .ui-helper-clearfix { + height: 1%; +} +.ui-helper-clearfix { + display: block; +} /* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter: Alpha(Opacity=0); +} /* Interaction Cues ----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - +.ui-state-disabled { + cursor: default !important; +} /* Icons ----------------------------------*/ /* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} /* Misc visuals ----------------------------------*/ /* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - +.ui-widget-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} /* * jQuery UI CSS Framework 1.8.11 @@ -53,246 +97,786 @@ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px */ - /* Component containers ----------------------------------*/ -.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } -.ui-widget-content a { color: #222222; } -.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } -.ui-widget-header a { color: #222222; } +.ui-widget { + font-family: Verdana, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Verdana, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% + repeat-x; + color: #222222; +} +.ui-widget-content a { + color: #222222; +} +.ui-widget-header { + border: 1px solid #aaaaaa; + background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% + 50% repeat-x; + color: #222222; + font-weight: bold; +} +.ui-widget-header a { + color: #222222; +} /* Interaction states ----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } -.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; } -.ui-widget :active { outline: none; } +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #d3d3d3; + background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% + repeat-x; + font-weight: normal; + color: #555555; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #555555; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #999999; + background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% + repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-hover a, +.ui-state-hover a:hover { + color: #212121; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% + repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #212121; + text-decoration: none; +} +.ui-widget :active { + outline: none; +} /* Interaction Cues ----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fcefa1; + background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% + repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% + repeat-x; + color: #cd0a0a; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #cd0a0a; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #cd0a0a; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: 0.7; + filter: Alpha(Opacity=70); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: 0.35; + filter: Alpha(Opacity=35); + background-image: none; +} /* Icons ----------------------------------*/ /* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } +.ui-icon { + width: 16px; + height: 16px; + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-widget-content .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-widget-header .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-state-default .ui-icon { + background-image: url(images/ui-icons_888888_256x240.png); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-active .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-highlight .ui-icon { + background-image: url(images/ui-icons_2e83ff_256x240.png); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url(images/ui-icons_cd0a0a_256x240.png); +} /* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } +.ui-icon-carat-1-n { + background-position: 0 0; +} +.ui-icon-carat-1-ne { + background-position: -16px 0; +} +.ui-icon-carat-1-e { + background-position: -32px 0; +} +.ui-icon-carat-1-se { + background-position: -48px 0; +} +.ui-icon-carat-1-s { + background-position: -64px 0; +} +.ui-icon-carat-1-sw { + background-position: -80px 0; +} +.ui-icon-carat-1-w { + background-position: -96px 0; +} +.ui-icon-carat-1-nw { + background-position: -112px 0; +} +.ui-icon-carat-2-n-s { + background-position: -128px 0; +} +.ui-icon-carat-2-e-w { + background-position: -144px 0; +} +.ui-icon-triangle-1-n { + background-position: 0 -16px; +} +.ui-icon-triangle-1-ne { + background-position: -16px -16px; +} +.ui-icon-triangle-1-e { + background-position: -32px -16px; +} +.ui-icon-triangle-1-se { + background-position: -48px -16px; +} +.ui-icon-triangle-1-s { + background-position: -64px -16px; +} +.ui-icon-triangle-1-sw { + background-position: -80px -16px; +} +.ui-icon-triangle-1-w { + background-position: -96px -16px; +} +.ui-icon-triangle-1-nw { + background-position: -112px -16px; +} +.ui-icon-triangle-2-n-s { + background-position: -128px -16px; +} +.ui-icon-triangle-2-e-w { + background-position: -144px -16px; +} +.ui-icon-arrow-1-n { + background-position: 0 -32px; +} +.ui-icon-arrow-1-ne { + background-position: -16px -32px; +} +.ui-icon-arrow-1-e { + background-position: -32px -32px; +} +.ui-icon-arrow-1-se { + background-position: -48px -32px; +} +.ui-icon-arrow-1-s { + background-position: -64px -32px; +} +.ui-icon-arrow-1-sw { + background-position: -80px -32px; +} +.ui-icon-arrow-1-w { + background-position: -96px -32px; +} +.ui-icon-arrow-1-nw { + background-position: -112px -32px; +} +.ui-icon-arrow-2-n-s { + background-position: -128px -32px; +} +.ui-icon-arrow-2-ne-sw { + background-position: -144px -32px; +} +.ui-icon-arrow-2-e-w { + background-position: -160px -32px; +} +.ui-icon-arrow-2-se-nw { + background-position: -176px -32px; +} +.ui-icon-arrowstop-1-n { + background-position: -192px -32px; +} +.ui-icon-arrowstop-1-e { + background-position: -208px -32px; +} +.ui-icon-arrowstop-1-s { + background-position: -224px -32px; +} +.ui-icon-arrowstop-1-w { + background-position: -240px -32px; +} +.ui-icon-arrowthick-1-n { + background-position: 0 -48px; +} +.ui-icon-arrowthick-1-ne { + background-position: -16px -48px; +} +.ui-icon-arrowthick-1-e { + background-position: -32px -48px; +} +.ui-icon-arrowthick-1-se { + background-position: -48px -48px; +} +.ui-icon-arrowthick-1-s { + background-position: -64px -48px; +} +.ui-icon-arrowthick-1-sw { + background-position: -80px -48px; +} +.ui-icon-arrowthick-1-w { + background-position: -96px -48px; +} +.ui-icon-arrowthick-1-nw { + background-position: -112px -48px; +} +.ui-icon-arrowthick-2-n-s { + background-position: -128px -48px; +} +.ui-icon-arrowthick-2-ne-sw { + background-position: -144px -48px; +} +.ui-icon-arrowthick-2-e-w { + background-position: -160px -48px; +} +.ui-icon-arrowthick-2-se-nw { + background-position: -176px -48px; +} +.ui-icon-arrowthickstop-1-n { + background-position: -192px -48px; +} +.ui-icon-arrowthickstop-1-e { + background-position: -208px -48px; +} +.ui-icon-arrowthickstop-1-s { + background-position: -224px -48px; +} +.ui-icon-arrowthickstop-1-w { + background-position: -240px -48px; +} +.ui-icon-arrowreturnthick-1-w { + background-position: 0 -64px; +} +.ui-icon-arrowreturnthick-1-n { + background-position: -16px -64px; +} +.ui-icon-arrowreturnthick-1-e { + background-position: -32px -64px; +} +.ui-icon-arrowreturnthick-1-s { + background-position: -48px -64px; +} +.ui-icon-arrowreturn-1-w { + background-position: -64px -64px; +} +.ui-icon-arrowreturn-1-n { + background-position: -80px -64px; +} +.ui-icon-arrowreturn-1-e { + background-position: -96px -64px; +} +.ui-icon-arrowreturn-1-s { + background-position: -112px -64px; +} +.ui-icon-arrowrefresh-1-w { + background-position: -128px -64px; +} +.ui-icon-arrowrefresh-1-n { + background-position: -144px -64px; +} +.ui-icon-arrowrefresh-1-e { + background-position: -160px -64px; +} +.ui-icon-arrowrefresh-1-s { + background-position: -176px -64px; +} +.ui-icon-arrow-4 { + background-position: 0 -80px; +} +.ui-icon-arrow-4-diag { + background-position: -16px -80px; +} +.ui-icon-extlink { + background-position: -32px -80px; +} +.ui-icon-newwin { + background-position: -48px -80px; +} +.ui-icon-refresh { + background-position: -64px -80px; +} +.ui-icon-shuffle { + background-position: -80px -80px; +} +.ui-icon-transfer-e-w { + background-position: -96px -80px; +} +.ui-icon-transferthick-e-w { + background-position: -112px -80px; +} +.ui-icon-folder-collapsed { + background-position: 0 -96px; +} +.ui-icon-folder-open { + background-position: -16px -96px; +} +.ui-icon-document { + background-position: -32px -96px; +} +.ui-icon-document-b { + background-position: -48px -96px; +} +.ui-icon-note { + background-position: -64px -96px; +} +.ui-icon-mail-closed { + background-position: -80px -96px; +} +.ui-icon-mail-open { + background-position: -96px -96px; +} +.ui-icon-suitcase { + background-position: -112px -96px; +} +.ui-icon-comment { + background-position: -128px -96px; +} +.ui-icon-person { + background-position: -144px -96px; +} +.ui-icon-print { + background-position: -160px -96px; +} +.ui-icon-trash { + background-position: -176px -96px; +} +.ui-icon-locked { + background-position: -192px -96px; +} +.ui-icon-unlocked { + background-position: -208px -96px; +} +.ui-icon-bookmark { + background-position: -224px -96px; +} +.ui-icon-tag { + background-position: -240px -96px; +} +.ui-icon-home { + background-position: 0 -112px; +} +.ui-icon-flag { + background-position: -16px -112px; +} +.ui-icon-calendar { + background-position: -32px -112px; +} +.ui-icon-cart { + background-position: -48px -112px; +} +.ui-icon-pencil { + background-position: -64px -112px; +} +.ui-icon-clock { + background-position: -80px -112px; +} +.ui-icon-disk { + background-position: -96px -112px; +} +.ui-icon-calculator { + background-position: -112px -112px; +} +.ui-icon-zoomin { + background-position: -128px -112px; +} +.ui-icon-zoomout { + background-position: -144px -112px; +} +.ui-icon-search { + background-position: -160px -112px; +} +.ui-icon-wrench { + background-position: -176px -112px; +} +.ui-icon-gear { + background-position: -192px -112px; +} +.ui-icon-heart { + background-position: -208px -112px; +} +.ui-icon-star { + background-position: -224px -112px; +} +.ui-icon-link { + background-position: -240px -112px; +} +.ui-icon-cancel { + background-position: 0 -128px; +} +.ui-icon-plus { + background-position: -16px -128px; +} +.ui-icon-plusthick { + background-position: -32px -128px; +} +.ui-icon-minus { + background-position: -48px -128px; +} +.ui-icon-minusthick { + background-position: -64px -128px; +} +.ui-icon-close { + background-position: -80px -128px; +} +.ui-icon-closethick { + background-position: -96px -128px; +} +.ui-icon-key { + background-position: -112px -128px; +} +.ui-icon-lightbulb { + background-position: -128px -128px; +} +.ui-icon-scissors { + background-position: -144px -128px; +} +.ui-icon-clipboard { + background-position: -160px -128px; +} +.ui-icon-copy { + background-position: -176px -128px; +} +.ui-icon-contact { + background-position: -192px -128px; +} +.ui-icon-image { + background-position: -208px -128px; +} +.ui-icon-video { + background-position: -224px -128px; +} +.ui-icon-script { + background-position: -240px -128px; +} +.ui-icon-alert { + background-position: 0 -144px; +} +.ui-icon-info { + background-position: -16px -144px; +} +.ui-icon-notice { + background-position: -32px -144px; +} +.ui-icon-help { + background-position: -48px -144px; +} +.ui-icon-check { + background-position: -64px -144px; +} +.ui-icon-bullet { + background-position: -80px -144px; +} +.ui-icon-radio-off { + background-position: -96px -144px; +} +.ui-icon-radio-on { + background-position: -112px -144px; +} +.ui-icon-pin-w { + background-position: -128px -144px; +} +.ui-icon-pin-s { + background-position: -144px -144px; +} +.ui-icon-play { + background-position: 0 -160px; +} +.ui-icon-pause { + background-position: -16px -160px; +} +.ui-icon-seek-next { + background-position: -32px -160px; +} +.ui-icon-seek-prev { + background-position: -48px -160px; +} +.ui-icon-seek-end { + background-position: -64px -160px; +} +.ui-icon-seek-start { + background-position: -80px -160px; +} /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - +.ui-icon-seek-first { + background-position: -80px -160px; +} +.ui-icon-stop { + background-position: -96px -160px; +} +.ui-icon-eject { + background-position: -112px -160px; +} +.ui-icon-volume-off { + background-position: -128px -160px; +} +.ui-icon-volume-on { + background-position: -144px -160px; +} +.ui-icon-power { + background-position: 0 -176px; +} +.ui-icon-signal-diag { + background-position: -16px -176px; +} +.ui-icon-signal { + background-position: -32px -176px; +} +.ui-icon-battery-0 { + background-position: -48px -176px; +} +.ui-icon-battery-1 { + background-position: -64px -176px; +} +.ui-icon-battery-2 { + background-position: -80px -176px; +} +.ui-icon-battery-3 { + background-position: -96px -176px; +} +.ui-icon-circle-plus { + background-position: 0 -192px; +} +.ui-icon-circle-minus { + background-position: -16px -192px; +} +.ui-icon-circle-close { + background-position: -32px -192px; +} +.ui-icon-circle-triangle-e { + background-position: -48px -192px; +} +.ui-icon-circle-triangle-s { + background-position: -64px -192px; +} +.ui-icon-circle-triangle-w { + background-position: -80px -192px; +} +.ui-icon-circle-triangle-n { + background-position: -96px -192px; +} +.ui-icon-circle-arrow-e { + background-position: -112px -192px; +} +.ui-icon-circle-arrow-s { + background-position: -128px -192px; +} +.ui-icon-circle-arrow-w { + background-position: -144px -192px; +} +.ui-icon-circle-arrow-n { + background-position: -160px -192px; +} +.ui-icon-circle-zoomin { + background-position: -176px -192px; +} +.ui-icon-circle-zoomout { + background-position: -192px -192px; +} +.ui-icon-circle-check { + background-position: -208px -192px; +} +.ui-icon-circlesmall-plus { + background-position: 0 -208px; +} +.ui-icon-circlesmall-minus { + background-position: -16px -208px; +} +.ui-icon-circlesmall-close { + background-position: -32px -208px; +} +.ui-icon-squaresmall-plus { + background-position: -48px -208px; +} +.ui-icon-squaresmall-minus { + background-position: -64px -208px; +} +.ui-icon-squaresmall-close { + background-position: -80px -208px; +} +.ui-icon-grip-dotted-vertical { + background-position: 0 -224px; +} +.ui-icon-grip-dotted-horizontal { + background-position: -16px -224px; +} +.ui-icon-grip-solid-vertical { + background-position: -32px -224px; +} +.ui-icon-grip-solid-horizontal { + background-position: -48px -224px; +} +.ui-icon-gripsmall-diagonal-se { + background-position: -64px -224px; +} +.ui-icon-grip-diagonal-se { + background-position: -80px -224px; +} /* Misc visuals ----------------------------------*/ /* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } +.ui-corner-tl { + -moz-border-radius-topleft: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; +} +.ui-corner-tr { + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; +} +.ui-corner-bl { + -moz-border-radius-bottomleft: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.ui-corner-br { + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.ui-corner-top { + -moz-border-radius-topleft: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; +} +.ui-corner-bottom { + -moz-border-radius-bottomleft: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.ui-corner-right { + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.ui-corner-left { + -moz-border-radius-topleft: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.ui-corner-all { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} /* Overlays */ -.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } -.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* +.ui-widget-overlay { + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% + repeat-x; + opacity: 0.3; + filter: Alpha(Opacity=30); +} +.ui-widget-shadow { + margin: -8px 0 0 -8px; + padding: 8px; + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% + repeat-x; + opacity: 0.3; + filter: Alpha(Opacity=30); + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + border-radius: 8px; +} /* * jQuery UI Resizable 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -301,17 +885,75 @@ * * http://docs.jquery.com/UI/Resizable#theming */ -.ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + z-index: 99999; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} /* * jQuery UI Selectable 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -320,7 +962,11 @@ * * http://docs.jquery.com/UI/Selectable#theming */ -.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} /* * jQuery UI Accordion 1.8.11 * @@ -331,15 +977,49 @@ * http://docs.jquery.com/UI/Accordion#theming */ /* IE/Win - Fix animation bug - #4615 */ -.ui-accordion { width: 100%; } -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } -.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } -.ui-accordion .ui-accordion-content-active { display: block; } +.ui-accordion { + width: 100%; +} +.ui-accordion .ui-accordion-header { + cursor: pointer; + position: relative; + margin-top: 1px; + zoom: 1; +} +.ui-accordion .ui-accordion-li-fix { + display: inline; +} +.ui-accordion .ui-accordion-header-active { + border-bottom: 0 !important; +} +.ui-accordion .ui-accordion-header a { + display: block; + font-size: 1em; + padding: 0.5em 0.5em 0.5em 0.7em; +} +.ui-accordion-icons .ui-accordion-header a { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-icon { + position: absolute; + left: 0.5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + margin-top: -2px; + position: relative; + top: 1px; + margin-bottom: 2px; + overflow: auto; + display: none; + zoom: 1; +} +.ui-accordion .ui-accordion-content-active { + display: block; +} /* * jQuery UI Autocomplete 1.8.11 * @@ -349,10 +1029,15 @@ * * http://docs.jquery.com/UI/Autocomplete#theming */ -.ui-autocomplete { position: absolute; cursor: default; } +.ui-autocomplete { + position: absolute; + cursor: default; +} /* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ +* html .ui-autocomplete { + width: 1px; +} /* without this, the menu expands to 100% in IE6 */ /* * jQuery UI Menu 1.8.11 @@ -364,34 +1049,34 @@ * http://docs.jquery.com/UI/Menu#theming */ .ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; + list-style: none; + padding: 2px; + margin: 0; + display: block; + float: left; } .ui-menu .ui-menu { - margin-top: -3px; + margin-top: -3px; } .ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; + margin: 0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; } .ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; + text-decoration: none; + display: block; + padding: 0.2em 0.4em; + line-height: 1.5; + zoom: 1; } .ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; + font-weight: normal; + margin: -1px; } /* * jQuery UI Button 1.8.11 @@ -402,35 +1087,103 @@ * * http://docs.jquery.com/UI/Button#theming */ -.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ -.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ -button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } +.ui-button { + display: inline-block; + position: relative; + padding: 0; + margin-right: 0.1em; + text-decoration: none !important; + cursor: pointer; + text-align: center; + zoom: 1; + overflow: visible; +} /* the overflow property removes extra width in IE */ +.ui-button-icon-only { + width: 2.2em; +} /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { + width: 2.4em; +} /* button elements seem to need a little more width */ +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} /*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1.4; } -.ui-button-text-only .ui-button-text { padding: .4em 1em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } -.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +.ui-button .ui-button-text { + display: block; + line-height: 1.4; +} +.ui-button-text-only .ui-button-text { + padding: 0.4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: 0.4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 0.4em 1em 0.4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 0.4em 2.1em 0.4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} /* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } +input.ui-button { + padding: 0.4em 1em; +} /*button icon element(s) */ -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } -.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: 0.5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: 0.5em; +} +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: 0.5em; +} /*button sets*/ -.ui-buttonset { margin-right: 7px; } -.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -0.3em; +} /* workarounds */ -button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} /* reset extra padding in Firefox */ /* * jQuery UI Dialog 1.8.11 * @@ -440,18 +1193,68 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad * * http://docs.jquery.com/UI/Dialog#theming */ -.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } -.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } -.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } -.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } -.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } -.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } +.ui-dialog { + position: absolute; + padding: 0.2em; + width: 300px; + overflow: hidden; +} +.ui-dialog .ui-dialog-titlebar { + padding: 0.4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: 0.1em 16px 0.1em 0; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: 0.3em; + top: 50%; + width: 19px; + margin: -10px 0 0 0; + padding: 1px; + height: 18px; +} +.ui-dialog .ui-dialog-titlebar-close span { + display: block; + margin: 1px; +} +.ui-dialog .ui-dialog-titlebar-close:hover, +.ui-dialog .ui-dialog-titlebar-close:focus { + padding: 0; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: 0.5em 1em; + background: none; + overflow: auto; + zoom: 1; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin: 0.5em 0 0 0; + padding: 0.3em 1em 0.5em 0.4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: 0.5em 0.4em 0.5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 14px; + height: 14px; + right: 3px; + bottom: 3px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} /* * jQuery UI Slider 1.8.11 * @@ -461,21 +1264,63 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad * * http://docs.jquery.com/UI/Slider#theming */ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: 0.7em; + display: block; + border: 0; + background-position: 0 0; +} -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } +.ui-slider-horizontal { + height: 0.8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -0.3em; + margin-left: -0.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* +.ui-slider-vertical { + width: 0.8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -0.3em; + margin-left: 0; + margin-bottom: -0.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} /* * jQuery UI Tabs 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -484,15 +1329,52 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad * * http://docs.jquery.com/UI/Tabs#theming */ -.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ -.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } +.ui-tabs { + position: relative; + padding: 0.2em; + zoom: 1; +} /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: 0.2em 0.2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 1px; + margin: 0 0.2em 1px 0; + border-bottom: 0 !important; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav li a { + float: left; + padding: 0.5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { + margin-bottom: 0; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, +.ui-tabs .ui-tabs-nav li.ui-state-disabled a, +.ui-tabs .ui-tabs-nav li.ui-state-processing a { + cursor: text; +} +.ui-tabs .ui-tabs-nav li a, +.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { + cursor: pointer; +} /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tabs .ui-tabs-hide { + display: none !important; +} /* * jQuery UI Datepicker 1.8.11 * @@ -502,65 +1384,193 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad * * http://docs.jquery.com/UI/Datepicker#theming */ -.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } -.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } +.ui-datepicker { + width: 17em; + padding: 0.2em 0.2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: 0.2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month-year { + width: 100%; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 49%; +} +.ui-datepicker table { + width: 100%; + font-size: 0.9em; + border-collapse: collapse; + margin: 0 0 0.4em; +} +.ui-datepicker th { + padding: 0.7em 0.3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: 0.2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: 0.7em 0 0 0; + padding: 0 0.2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: 0.5em 0.2em 0.4em; + cursor: pointer; + padding: 0.2em 0.6em 0.3em 0.6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} /* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; } +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto 0.4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; +} /* RTL support */ -.ui-datepicker-rtl { direction: rtl; } -.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -.ui-datepicker-rtl .ui-datepicker-group { float:right; } -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ .ui-datepicker-cover { - display: none; /*sorry for IE5*/ - display/**/: block; /*sorry for IE5*/ - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -}/* + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} /* * jQuery UI Progressbar 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -569,5 +1579,11 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad * * http://docs.jquery.com/UI/Progressbar#theming */ -.ui-progressbar { height:2em; text-align: left; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file +.ui-progressbar { + height: 2em; + text-align: left; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} diff --git a/r2redit/src/css/style.css b/r2redit/src/css/style.css index cf2529a..706a426 100644 --- a/r2redit/src/css/style.css +++ b/r2redit/src/css/style.css @@ -1,297 +1,304 @@ /* Overview */ .r2redit-mappingTable { - border: 1px solid #000000; - border-collapse: collapse; - width: 100%; + border: 1px solid #000000; + border-collapse: collapse; + width: 100%; } .r2redit-mappingTable thead { - height: 28px; + height: 28px; } .r2redit-mappingTable td { - border: 1px solid #AAAAAA; + border: 1px solid #aaaaaa; } .r2redit-mappingTableClickable { - cursor: pointer; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -o-user-select: none; - user-select: none; + cursor: pointer; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; } .r2redit-mappingTableAction { - cursor: pointer; - width: 30px; - height: 30px; + cursor: pointer; + width: 30px; + height: 30px; } .r2redit-mappingTableProperty { - width: 30%; - padding: 1px 5px; + width: 30%; + padding: 1px 5px; } .r2redit-arrow-collapsed { - background: url(../images/arrow-collapsed.png) no-repeat 50% 50%; + background: url(../images/arrow-collapsed.png) no-repeat 50% 50%; } .r2redit-arrow-expanded { - background: url(../images/arrow-expanded.png) no-repeat 50% 50%; + background: url(../images/arrow-expanded.png) no-repeat 50% 50%; } .r2redit-mappingTableEdit { - background: url(../images/blue-document-pencil.png) no-repeat 50% 50%; + background: url(../images/blue-document-pencil.png) no-repeat 50% 50%; } .r2redit-mappingTableClassMapping .r2redit-mappingTableName { - background: url(../images/class.png) no-repeat 5px 50%; - padding-left: 25px; + background: url(../images/class.png) no-repeat 5px 50%; + padding-left: 25px; } .r2redit-mappingTablePropertyMapping .r2redit-mappingTableName { - background: url(../images/property.png) no-repeat 15px 50%; - padding-left: 35px; + background: url(../images/property.png) no-repeat 15px 50%; + padding-left: 35px; } .r2redit-mappingTableAddClassMapping .r2redit-mappingTableProperty { - padding-left: 5px; + padding-left: 5px; } .r2redit-mappingTableAddPropertyMapping .r2redit-mappingTableProperty { - padding-left: 15px; + padding-left: 15px; } -.r2redit-mappingTablePropertyMapping .r2redit-mappingTableProperty, .r2redit-mappingTablePropertyMapping .r2redit-mappingTableEdit { - background-color: #fafafa; +.r2redit-mappingTablePropertyMapping .r2redit-mappingTableProperty, +.r2redit-mappingTablePropertyMapping .r2redit-mappingTableEdit { + background-color: #fafafa; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { - left: 3px; +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: 3px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { - padding: 4px 6px 4px 23px; +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 4px 6px 4px 23px; } .ui-icon-add { - background: url(../images/add.png) no-repeat 0px 50% !important; - background-position: 0px 0px; + background: url(../images/add.png) no-repeat 0px 50% !important; + background-position: 0px 0px; } .ui-icon-minus-small-circle { - background: url(../images/minus-small-circle.png) no-repeat 0px 50% !important; - background-position: 0px 0px; + background: url(../images/minus-small-circle.png) no-repeat 0px 50% !important; + background-position: 0px 0px; } /* Editor */ .treeview li span { - padding-left: 20px; + padding-left: 20px; } .treeview li .ui-icon-minus-small-circle { - visibility: hidden; + visibility: hidden; } .treeview li:hover .ui-icon-minus-small-circle { - visibility: visible; + visibility: visible; } .ui-icon-arrow-transition { - background: url(../images/arrow-transition.png) no-repeat 0px 50% !important; - background-position: 0px 0px; + background: url(../images/arrow-transition.png) no-repeat 0px 50% !important; + background-position: 0px 0px; } .ui-icon-block-arrow { - background: url(../images/block-arrow.png) no-repeat 0px 50% !important; - background-position: 0px 0px; + background: url(../images/block-arrow.png) no-repeat 0px 50% !important; + background-position: 0px 0px; } .ui-icon-block-arrow-in { - background: url(../images/block-arrow-in.png) no-repeat 0px 50% !important; - background-position: 0px 0px; + background: url(../images/block-arrow-in.png) no-repeat 0px 50% !important; + background-position: 0px 0px; } .ui-icon-colon { - background: url(../images/colon.png) no-repeat 0px 50% !important; - background-position: 0px 0px; + background: url(../images/colon.png) no-repeat 0px 50% !important; + background-position: 0px 0px; } .ui-icon-filter { - background: url(../images/filter.png) no-repeat 0px 50% !important; - background-position: 0px 0px; + background: url(../images/filter.png) no-repeat 0px 50% !important; + background-position: 0px 0px; } .ui-widget { - font-size: 11px; + font-size: 11px; } .r2redit-hoverInput { - border: 1px solid #ffffff; + border: 1px solid #ffffff; } -.r2redit-input, .r2redit-hoverInput:hover { - border: 1px solid #AAAAAA; +.r2redit-input, +.r2redit-hoverInput:hover { + border: 1px solid #aaaaaa; } #r2redit-controlbar { - padding: 5px; - margin-bottom: 5px; + padding: 5px; + margin-bottom: 5px; } #r2redit-controlbar .ui-button { - margin-right: 5px; + margin-right: 5px; } #r2redit-controlbar .ui-button .ui-button-text { - padding-top: 2px; - padding-bottom: 2px; + padding-top: 2px; + padding-bottom: 2px; } #r2redit-bottomPane { - border-top: none; - padding: 0.5em 1.4em; + border-top: none; + padding: 0.5em 1.4em; } #r2redit-bottomPane .ui-button { - margin-right: 5px; + margin-right: 5px; } /* Dialogs */ .r2redit-dialog fieldset { - border: 0; - padding: 5px 0; + border: 0; + padding: 5px 0; } -.r2redit-dialog label, .r2redit-dialog input { - display: block; +.r2redit-dialog label, +.r2redit-dialog input { + display: block; } .r2redit-dialog textarea { - display: block; - width: 100%; - height: 185px; + display: block; + width: 100%; + height: 185px; } .r2redit-dialog p span.ui-icon { - float: left; margin: 0pt 7px 20px 0pt; + float: left; + margin: 0pt 7px 20px 0pt; } .r2redit-dialog-loading .ui-dialog-titlebar-close { - display: none; + display: none; } .r2redit-dialog-loading-image { - background-image: url(../images/loading.gif); - width: 220px; - height: 20px; - margin-left: auto; - margin-right: auto; + background-image: url(../images/loading.gif); + width: 220px; + height: 20px; + margin-left: auto; + margin-right: auto; } .r2redit-mappingTable thead th { - padding: 1px 10px; + padding: 1px 10px; } /* Editor */ -.r2redit-editor-transformation-dialog fieldset, .r2redit-editor-transformation-dialog .r2redit-editor-transformation-reference { - width: 48%; - height: 250px; - padding: 0; +.r2redit-editor-transformation-dialog fieldset, +.r2redit-editor-transformation-dialog .r2redit-editor-transformation-reference { + width: 48%; + height: 250px; + padding: 0; } .r2redit-editor-transformation-dialog fieldset { - margin-top: 5px; - float: left; + margin-top: 5px; + float: left; } .r2redit-editor-transformation-dialog .r2redit-editor-transformation-reference { - margin-top: 5px; - float: right; + margin-top: 5px; + float: right; } .r2redit-editor-transformation-dialog textarea { - height: 100%; - margin: 0; + height: 100%; + margin: 0; } #r2redit-editor-transformation-functions { - width: 100%; - height: 130px; - padding-left: 3px; + width: 100%; + height: 130px; + padding-left: 3px; } #r2redit-editor-transformation-search { - width: 100%; - background: url(../images/magnifier.png) no-repeat 4px 50%; - height: 24px; + width: 100%; + background: url(../images/magnifier.png) no-repeat 4px 50%; + height: 24px; } #r2redit-editor-transformation-search input { - position: relative; - left: 25px; - top: 2px; - width: 250px; - border: none; + position: relative; + left: 25px; + top: 2px; + width: 250px; + border: none; } #r2redit-editor-transformation-description { - height: 85px; - padding: 4px; - font-weight: normal; - overflow: auto; + height: 85px; + padding: 4px; + font-weight: normal; + overflow: auto; } .r2redit-editor-description { - padding: 4px 30px 4px 4px; - font-weight: normal; + padding: 4px 30px 4px 4px; + font-weight: normal; } .r2redit-editor-helplink { - width: 20px; - height: 20px; - position: absolute; - right: 20px; - margin-left: 10px; - margin-bottom: 30px; - background: url(../images/question-white.png) no-repeat 50% 50%; + width: 20px; + height: 20px; + position: absolute; + right: 20px; + margin-left: 10px; + margin-bottom: 30px; + background: url(../images/question-white.png) no-repeat 50% 50%; } .r2redit-editor-prefix-dialog-line { - width: 100%; - height: 18px; - clear: both; + width: 100%; + height: 18px; + clear: both; } .r2redit-editor-prefix-dialog-prefix { - width: 80px; - float: left; - margin-right: 5px; + width: 80px; + float: left; + margin-right: 5px; } .r2redit-editor-prefix-dialog-uri { - width: 350px; - float: left; - margin-right: 5px; + width: 350px; + float: left; + margin-right: 5px; } .r2redit-editor-prefix-dialog-remove { - width: 20px; - height: 20px; - cursor: pointer; - float: left; - visibility: hidden; + width: 20px; + height: 20px; + cursor: pointer; + float: left; + visibility: hidden; } .r2redit-editor-prefix-dialog-line:hover .r2redit-editor-prefix-dialog-remove { - visibility: visible; + visibility: visible; } - .placeholder { - color: #bbbbbb; -} \ No newline at end of file + color: #bbbbbb; +} diff --git a/r2redit/src/js/r2redit.editor.js b/r2redit/src/js/r2redit.editor.js index 7ec6cec..9ac4bc4 100644 --- a/r2redit/src/js/r2redit.editor.js +++ b/r2redit/src/js/r2redit.editor.js @@ -17,841 +17,944 @@ * @fileOverview R2R edit capabilities * @author Christian Becker */ -(function($){ - var treeViewTypes = []; - var functionReference = null; - var allFunctions = []; - - /** - * Represents an R2R tree object - * @param container The treeview - * @param obj rdfQuery object to represent - */ - $.r2rTreeViewObject = $.inherit({ - - __constructor: function(obj){ - this.obj = obj; - this.init(); - return this; - }, - - init: function() { - var base = this; - this.el = $("
  • ") - .data("r2rObject", this); - if (this.isVisible()) { - $("") - .addClass(this.getClass()) - .addClass("r2redit-mappingTableClickable") - .attr("title", this.getTooltip()) - .html(this.getLabel()) - .click(function() { - base.getEditor().show(); - }) - .appendTo(this.el); - $("") - .addClass("ui-icon-minus-small-circle") - .addClass("r2redit-mappingTableClickable") - .click(function() { - base.remove(); - }) - .appendTo(this.el); - } else { - this.el.hide(); - } - }, - addToTreeView: function(treeview) { - treeview - .append(this.el) - .treeview({add: this.el}); - this.treeview = treeview; - }, - removeFromTreeView: function() { - if (this.treeview) { - this.treeview.treeview({remove: this.el}); - } - }, - remove: function() { - this.removeFromTreeView(); - this.el.remove(); - }, - refresh: function() { - if (!this.isVisible()) { - return; - } - this.el.find("span:first").html(this.getLabel()); - }, - getClass: function() { - }, - getUnderlyingObject: function() { - return this.obj; - }, - setUnderlyingObject: function(obj) { - this.obj = obj; - }, - getLabel: function() { - }, - getTooltip: function() { - }, - /** - * Treeview objects are usually visible, but we might want to include some information - * that is not directly modifiable, such as the mapping type - */ - isVisible: function() { - return true; - }, - /** - * Helper method to allow us to invoke the static method getProperty() - * on instances - */ - getProperty: function() { - return this.__self.getProperty(); - } - }, { - getProperty: function() { - } - }); - - /** - * Represents an rdf:type definition (invisible) - */ - $.r2rTreeViewType = $.inherit( - $.r2rTreeViewObject, - { - isVisible: function() { - return false; - } - }, { - getProperty: function() { - return "rdf:type"; - } - } - ); - treeViewTypes.push($.r2rTreeViewType); - - /** - * Represents an r2r:mappingRef definition (invisible) - */ - $.r2rTreeViewMappingRef = $.inherit( - $.r2rTreeViewObject, - { - isVisible: function() { - return false; - } - }, { - getProperty: function() { - return "r2r:mappingRef"; - } - } - ); - treeViewTypes.push($.r2rTreeViewMappingRef); - - /** - * Represents a prefix definitions element in the treeview - */ - $.r2rTreeViewPrefixDefinitions = $.inherit( - $.r2rTreeViewObject, - { - getClass: function() { - return "ui-icon-colon"; - }, - getTooltip: function() { - return "Prefix Definitions"; - }, - getLabel: function() { - if (this.obj === undefined) { - return "(error)"; - } - - var prefixes = $.r2rUtils.parsePrefixDefinitions(this.getUnderlyingObject().value); - var label = ""; - $.each(prefixes, function(key, value) { - label += (label != "" ? ", " : "") + key; - }); - - return label; - }, - getEditor: function() { - return new $.r2rPrefixEditor(this); - } - }, { - getProperty: function() { - return "r2r:prefixDefinitions"; - } - } - ); - treeViewTypes.push($.r2rTreeViewPrefixDefinitions); - - /** - * Represents a source pattern in the treeview - */ - $.r2rTreeViewSourcePattern = $.inherit( - $.r2rTreeViewObject, - { - getClass: function() { - return "ui-icon-block-arrow-in"; - }, - getTooltip: function() { - return "Source Pattern"; - }, - getLabel: function() { - return (this.obj !== undefined ? this.obj.value : '(error)'); - }, - getEditor: function() { - return new $.r2rSourcePatternEditor(this); - } - }, { - getProperty: function() { - return "r2r:sourcePattern"; - } - } - ); - treeViewTypes.push($.r2rTreeViewSourcePattern); - - /** - * Represents a target pattern in the treeview - */ - $.r2rTreeViewTargetPattern = $.inherit( - $.r2rTreeViewObject, - { - getClass: function() { - return "ui-icon-block-arrow"; - }, - getTooltip: function() { - return "Target Pattern"; - }, - getLabel: function() { - return (this.obj !== undefined ? this.obj.value : '(error)'); - }, - getEditor: function() { - return new $.r2rTargetPatternEditor(this); - } - }, { - getProperty: function() { - return "r2r:targetPattern"; - } - } - ); - treeViewTypes.push($.r2rTreeViewTargetPattern); - - /** - * Represents a transformation in the treeview - */ - $.r2rTreeViewTransformation = $.inherit( - $.r2rTreeViewObject, - { - getClass: function() { - return "ui-icon-arrow-transition"; - }, - getTooltip: function() { - return "Transformation"; - }, - getLabel: function() { - return (this.obj !== undefined ? this.obj.value : '(error)'); - }, - getEditor: function() { - return new $.r2rTransformationEditor(this); - } - }, { - getProperty: function() { - return "r2r:transformation"; - } - } - ); - treeViewTypes.push($.r2rTreeViewTransformation); - - /** - * Generates editor chrome for a given single mapping - * @param container jQuery element to host the table / editor - * @param rdfStore An rdfQuery store containing the mapping definitions - * @param mapping The URI of the mapping to edit, or null to create a new mapping - * @param parentMapping When creating a new property mapping, specifies the parent class mapping - * @param basePath Base path to R2Redit - * @param onComplete Callback to invoke when editing has finished, adhering to the following interface: - * function(mapping, originalMapping, rdfRepresentation) - * @param mapping The URI of the mapping that was edited - * @param originalMapping The original URI of the mapping that was edited - this will differ from mapping if the user renamed it - * @param rdfRepresentation An rdfStore containing the RDF representation of the mapping. If the item was removed, the value is null. - * @param action One of "save", "remove", "cancel" - */ - $.r2rEditorMappingEditor = function(container, rdfStore, mapping, parentMapping, basePath, onComplete) { - var base = this; - base.container = container; - base.rdfStore = rdfStore; - base.rdfRepresentation = $.rdf(); - base.mapping = base.originalMapping = mapping; - base.parentMapping = parentMapping; - base.basePath = basePath; - base.onComplete = onComplete; - - base.init = function() { - base.initUI(); - base.importData(); - base.loadReference(); - }; - - base.loadReference = function() { - if (functionReference) { - return; - } - /* - * Just do this in the background without interrupting the user - * - the reference is easily loaded by the time he - * could reach the transformations dialog - */ - $.ajax({ - url: base.basePath + "json/transformations.json", - dataType:'json', - success: function(data) { - functionReference = data; - }, - error: function(jqXHR, textStatus, err) { - $.r2rUI.showError("Unable to function reference", err); - } - }); - } - - base.initUI = function() { - /* Main chrome */ - base.editor = $("
    \ -

    " + (mapping ? "Edit " :"New ") + (parentMapping ? "Property Mapping" : "Class Mapping") + "

    \ -
    ") - .addClass("r2redit-editor") - .appendTo(container); - /* Tabs */ - base.tabs = $("
    \ +(function ($) { + var treeViewTypes = []; + var functionReference = null; + var allFunctions = []; + + /** + * Represents an R2R tree object + * @param container The treeview + * @param obj rdfQuery object to represent + */ + $.r2rTreeViewObject = $.inherit( + { + __constructor: function (obj) { + this.obj = obj; + this.init(); + return this; + }, + + init: function () { + var base = this; + this.el = $("
  • ").data("r2rObject", this); + if (this.isVisible()) { + $("") + .addClass(this.getClass()) + .addClass("r2redit-mappingTableClickable") + .attr("title", this.getTooltip()) + .html(this.getLabel()) + .click(function () { + base.getEditor().show(); + }) + .appendTo(this.el); + $("") + .addClass("ui-icon-minus-small-circle") + .addClass("r2redit-mappingTableClickable") + .click(function () { + base.remove(); + }) + .appendTo(this.el); + } else { + this.el.hide(); + } + }, + addToTreeView: function (treeview) { + treeview.append(this.el).treeview({ add: this.el }); + this.treeview = treeview; + }, + removeFromTreeView: function () { + if (this.treeview) { + this.treeview.treeview({ remove: this.el }); + } + }, + remove: function () { + this.removeFromTreeView(); + this.el.remove(); + }, + refresh: function () { + if (!this.isVisible()) { + return; + } + this.el.find("span:first").html(this.getLabel()); + }, + getClass: function () {}, + getUnderlyingObject: function () { + return this.obj; + }, + setUnderlyingObject: function (obj) { + this.obj = obj; + }, + getLabel: function () {}, + getTooltip: function () {}, + /** + * Treeview objects are usually visible, but we might want to include some information + * that is not directly modifiable, such as the mapping type + */ + isVisible: function () { + return true; + }, + /** + * Helper method to allow us to invoke the static method getProperty() + * on instances + */ + getProperty: function () { + return this.__self.getProperty(); + }, + }, + { + getProperty: function () {}, + }, + ); + + /** + * Represents an rdf:type definition (invisible) + */ + $.r2rTreeViewType = $.inherit( + $.r2rTreeViewObject, + { + isVisible: function () { + return false; + }, + }, + { + getProperty: function () { + return "rdf:type"; + }, + }, + ); + treeViewTypes.push($.r2rTreeViewType); + + /** + * Represents an r2r:mappingRef definition (invisible) + */ + $.r2rTreeViewMappingRef = $.inherit( + $.r2rTreeViewObject, + { + isVisible: function () { + return false; + }, + }, + { + getProperty: function () { + return "r2r:mappingRef"; + }, + }, + ); + treeViewTypes.push($.r2rTreeViewMappingRef); + + /** + * Represents a prefix definitions element in the treeview + */ + $.r2rTreeViewPrefixDefinitions = $.inherit( + $.r2rTreeViewObject, + { + getClass: function () { + return "ui-icon-colon"; + }, + getTooltip: function () { + return "Prefix Definitions"; + }, + getLabel: function () { + if (this.obj === undefined) { + return "(error)"; + } + + var prefixes = $.r2rUtils.parsePrefixDefinitions( + this.getUnderlyingObject().value, + ); + var label = ""; + $.each(prefixes, function (key, value) { + label += (label != "" ? ", " : "") + key; + }); + + return label; + }, + getEditor: function () { + return new $.r2rPrefixEditor(this); + }, + }, + { + getProperty: function () { + return "r2r:prefixDefinitions"; + }, + }, + ); + treeViewTypes.push($.r2rTreeViewPrefixDefinitions); + + /** + * Represents a source pattern in the treeview + */ + $.r2rTreeViewSourcePattern = $.inherit( + $.r2rTreeViewObject, + { + getClass: function () { + return "ui-icon-block-arrow-in"; + }, + getTooltip: function () { + return "Source Pattern"; + }, + getLabel: function () { + return this.obj !== undefined ? this.obj.value : "(error)"; + }, + getEditor: function () { + return new $.r2rSourcePatternEditor(this); + }, + }, + { + getProperty: function () { + return "r2r:sourcePattern"; + }, + }, + ); + treeViewTypes.push($.r2rTreeViewSourcePattern); + + /** + * Represents a target pattern in the treeview + */ + $.r2rTreeViewTargetPattern = $.inherit( + $.r2rTreeViewObject, + { + getClass: function () { + return "ui-icon-block-arrow"; + }, + getTooltip: function () { + return "Target Pattern"; + }, + getLabel: function () { + return this.obj !== undefined ? this.obj.value : "(error)"; + }, + getEditor: function () { + return new $.r2rTargetPatternEditor(this); + }, + }, + { + getProperty: function () { + return "r2r:targetPattern"; + }, + }, + ); + treeViewTypes.push($.r2rTreeViewTargetPattern); + + /** + * Represents a transformation in the treeview + */ + $.r2rTreeViewTransformation = $.inherit( + $.r2rTreeViewObject, + { + getClass: function () { + return "ui-icon-arrow-transition"; + }, + getTooltip: function () { + return "Transformation"; + }, + getLabel: function () { + return this.obj !== undefined ? this.obj.value : "(error)"; + }, + getEditor: function () { + return new $.r2rTransformationEditor(this); + }, + }, + { + getProperty: function () { + return "r2r:transformation"; + }, + }, + ); + treeViewTypes.push($.r2rTreeViewTransformation); + + /** + * Generates editor chrome for a given single mapping + * @param container jQuery element to host the table / editor + * @param rdfStore An rdfQuery store containing the mapping definitions + * @param mapping The URI of the mapping to edit, or null to create a new mapping + * @param parentMapping When creating a new property mapping, specifies the parent class mapping + * @param basePath Base path to R2Redit + * @param onComplete Callback to invoke when editing has finished, adhering to the following interface: + * function(mapping, originalMapping, rdfRepresentation) + * @param mapping The URI of the mapping that was edited + * @param originalMapping The original URI of the mapping that was edited - this will differ from mapping if the user renamed it + * @param rdfRepresentation An rdfStore containing the RDF representation of the mapping. If the item was removed, the value is null. + * @param action One of "save", "remove", "cancel" + */ + $.r2rEditorMappingEditor = function ( + container, + rdfStore, + mapping, + parentMapping, + basePath, + onComplete, + ) { + var base = this; + base.container = container; + base.rdfStore = rdfStore; + base.rdfRepresentation = $.rdf(); + base.mapping = base.originalMapping = mapping; + base.parentMapping = parentMapping; + base.basePath = basePath; + base.onComplete = onComplete; + + base.init = function () { + base.initUI(); + base.importData(); + base.loadReference(); + }; + + base.loadReference = function () { + if (functionReference) { + return; + } + /* + * Just do this in the background without interrupting the user + * - the reference is easily loaded by the time he + * could reach the transformations dialog + */ + $.ajax({ + url: base.basePath + "json/transformations.json", + dataType: "json", + success: function (data) { + functionReference = data; + }, + error: function (jqXHR, textStatus, err) { + $.r2rUI.showError("Unable to function reference", err); + }, + }); + }; + + base.initUI = function () { + /* Main chrome */ + base.editor = $( + "
    \ +

    " + + (mapping ? "Edit " : "New ") + + (parentMapping ? "Property Mapping" : "Class Mapping") + + "

    \ +
    ", + ) + .addClass("r2redit-editor") + .appendTo(container); + /* Tabs */ + base.tabs = $( + '") - .appendTo(base.editor); - - /* Tree view */ - base.treeTab = $("
    \ -
    \ +
    ', + ).appendTo(base.editor); + + /* Tree view */ + base.treeTab = $( + '
    \ +
    \
    \ - \ -
    ") - .appendTo(base.tabs); - - $("#r2redit-mappingName").change(function() { - try { - base.mapping = $.rdf.resource($("#r2redit-mappingName").val(), { namespaces: base.rdfStore.databank.namespaces }); - } - catch(err) { - } - }).focus(function() { - this.select(); - }); - - /* Controls */ - $.each({ - "Prefix Definitions": { - icon: "ui-icon-colon", - objectClass: $.r2rTreeViewPrefixDefinitions - }, - "Source Pattern": { - icon: "ui-icon-block-arrow-in", - objectClass: $.r2rTreeViewSourcePattern - }, - "Target Pattern": { - icon: "ui-icon-block-arrow", - objectClass: $.r2rTreeViewTargetPattern - }, - "Transformation": { - icon: "ui-icon-arrow-transition", - objectClass: $.r2rTreeViewTransformation - } - }, function(key, options) { - base.treeTab.find("#r2redit-controlbar").append($("
    ") - .button({ - icons: { - primary: options.icon - }, - label: key, - }) - .click(function() { - var f = new options.objectClass($.r2rUtils.createStringLiteral("")); - f.getEditor().show(function() { - f.addToTreeView(base.treeview); - }); - }) - ); - }); - - /* Treeview */ - base.treeview = $("
      ") - .appendTo(base.treeTab) - .treeview(); - - base.editor.append( - $("
      ") - .attr("id", "r2redit-bottomPane") - .addClass("ui-widget") - .addClass("ui-widget-content") - .addClass("ui-corner-bottom") - .append($("
      ") - .button({ - label: "Save", - }) - .click(function() { - base.close("save"); - }) - ) - .append($("
      ") - .button({ - label: "Remove", - }) - .click(function() { - var dialogOpened = false; - var dialog = $("
      \ + \ +
      ', + ).appendTo(base.tabs); + + $("#r2redit-mappingName") + .change(function () { + try { + base.mapping = $.rdf.resource($("#r2redit-mappingName").val(), { + namespaces: base.rdfStore.databank.namespaces, + }); + } catch (err) {} + }) + .focus(function () { + this.select(); + }); + + /* Controls */ + $.each( + { + "Prefix Definitions": { + icon: "ui-icon-colon", + objectClass: $.r2rTreeViewPrefixDefinitions, + }, + "Source Pattern": { + icon: "ui-icon-block-arrow-in", + objectClass: $.r2rTreeViewSourcePattern, + }, + "Target Pattern": { + icon: "ui-icon-block-arrow", + objectClass: $.r2rTreeViewTargetPattern, + }, + Transformation: { + icon: "ui-icon-arrow-transition", + objectClass: $.r2rTreeViewTransformation, + }, + }, + function (key, options) { + base.treeTab.find("#r2redit-controlbar").append( + $("
      ") + .button({ + icons: { + primary: options.icon, + }, + label: key, + }) + .click(function () { + var f = new options.objectClass( + $.r2rUtils.createStringLiteral(""), + ); + f.getEditor().show(function () { + f.addToTreeView(base.treeview); + }); + }), + ); + }, + ); + + /* Treeview */ + base.treeview = $("
        ").appendTo(base.treeTab).treeview(); + + base.editor.append( + $("
        ") + .attr("id", "r2redit-bottomPane") + .addClass("ui-widget") + .addClass("ui-widget-content") + .addClass("ui-corner-bottom") + .append( + $("
        ") + .button({ + label: "Save", + }) + .click(function () { + base.close("save"); + }), + ) + .append( + $("
        ") + .button({ + label: "Remove", + }) + .click(function () { + var dialogOpened = false; + var dialog = $( + '
        \

        \ - \ - Are you sure?" + (base.parentMapping ? "" : " This will also remove all related property mappings.") + "\ + \ + Are you sure?' + + (base.parentMapping + ? "" + : " This will also remove all related property mappings.") + + "\

        \ -
        "); - dialog.dialog({ - autoOpen: true, - height: 150, - width: 300, - modal: true, - buttons: { - "Remove": function() { - /** - * Workaround: This gets called once on initialization... seems to be a jQuery UI bug - */ - if (!dialogOpened) { - return; - } - $(this).dialog("close"); - base.close("remove"); - }, - "Cancel": function() { - /** - * Workaround: This gets called once on initialization... seems to be a jQuery UI bug - */ - if (!dialogOpened) { - return; - } - $(this).dialog("close"); - } - } - }); - dialogOpened = true; - $.r2rUI.fixJQueryUIDialogButtons(dialog); - }) - ) - .append($("
        ") - .button({ - label: "Cancel", - }) - .click(function() { - base.close("cancel"); - }) - ) - ); - - /* Source code view */ - base.soureCodeTab = $("
        ")
        -				.appendTo(base.tabs);
        -			base.tabs.tabs({
        -				selected: 0,
        -				show: function(event, ui) {
        -					if (ui.index == 1) {
        -						base.generateRdfRepresentation();
        -						$("#sourceCode").text(base.rdfRepresentation.databank.dump({format:'text/turtle', serialize: true, indent: true}));									}
        -				}
        -			}).removeClass("ui-corner-all");
        -			/* Init qTips */
        -			base.editor.find("[title]").qtip({
        -				position: {
        -					corner: {
        -						target: "rightMiddle",
        -						tooltip: "leftMiddle"
        -					}
        -				},
        -				style: {
        -					background: '#feff9d',
        -					border: {
        -						width: 1,
        -						radius: 3,
        -						color: '#feff9d'
        -					},
        -					padding: 3, 
        -					textAlign: 'left',
        -					fontSize: '12px',
        -					tip: true, // Give it a speech bubble tip with automatic corner detection
        -					name: 'cream' // Style it according to the preset 'cream' style
        -				}
        -			});
        -		}
        -		
        -		base.importData = function() {
        -			if (base.mapping === null) {
        -				/* new mapping */
        -				var basePrefixStore = $.r2rUtils.basePrefixStore();				
        -				if (base.parentMapping) {
        -					new $.r2rTreeViewType($.rdf.resource("r2r:PropertyMapping", { namespaces: basePrefixStore.databank.namespaces })).addToTreeView(base.treeview);
        -					new $.r2rTreeViewMappingRef(base.parentMapping).addToTreeView(base.treeview);
        -					/* Add mandatory source pattern */
        -					new $.r2rTreeViewSourcePattern($.r2rUtils.createStringLiteral("")).addToTreeView(base.treeview);					
        -				} else {
        -					new $.r2rTreeViewType($.rdf.resource("r2r:ClassMapping", { namespaces: basePrefixStore.databank.namespaces })).addToTreeView(base.treeview);
        -					/* Add mandatory source pattern */
        -					new $.r2rTreeViewSourcePattern($.r2rUtils.createStringLiteral("")).addToTreeView(base.treeview);					
        -				}
        -				base.editor.find("#r2redit-mappingName").val("(please provide a name)");
        -				return;
        -			}
        -			
        -			/* Mapping URI */
        -			base.editor.find("#r2redit-mappingName").val($.r2rUtils.formatResource(base.mapping, base.rdfStore.databank.namespaces));
        -			
        -			/* Parse data */
        -			$(treeViewTypes).each(function(key, obj) {
        -				var objects = $.r2rUtils.findObjects(base.rdfStore, base.mapping, obj.getProperty());
        -				$(objects).each(function(key, value) {
        -					new obj(value).addToTreeView(base.treeview);
        -				});
        -			});
        -		},
        -		
        -		/**
        -		 * Popuplates rdfRepresentation object based on mappingObjects
        -		 */
        -		base.generateRdfRepresentation = function() {
        -			base.rdfRepresentation = $.rdf({namespaces: base.rdfStore.databank.namespaces});
        -			base.treeview.find("li").each(function(key, obj) {
        -				var mappingObject = $(obj).data("r2rObject");
        -				base.rdfRepresentation.add(
        -					$.rdf.triple(
        -						base.mapping,
        -						$.rdf.resource(mappingObject.getProperty(), { namespaces: base.rdfRepresentation.databank.namespaces }),
        -						mappingObject.getUnderlyingObject()
        -					)
        -				);
        -			});
        -		};
        -		
        -		base.close = function(action) {
        -			if (base.onComplete && action=="save") {
        -				base.generateRdfRepresentation();
        -			}
        -			base.treeview.find("li").remove();
        -			base.editor.remove();
        -			if (base.onComplete) {
        -				base.onComplete(base.mapping, base.originalMapping, base.rdfRepresentation, action);
        -			}
        -		};
        -		
        -		base.remove = function() {
        -			if (base.editor) {
        -				base.editor.remove();
        -			}
        -		}
        -
        -        base.init();
        -        return base;
        -	};
        -	
        -	/** 
        -	 * Base value editor class
        -	 */
        -	$.r2rValueEditor = $.inherit({
        -
        -		__constructor: function(obj){
        -			this.obj = obj;
        -			this.init();
        -	        return this;
        -		},
        -	
        -		init: function() {
        -		},
        -		
        -		getObject: function() {
        -			return this.obj;
        -		},
        -		
        -		show: function(onSave) {
        -			var base = this;
        -			this.form = $("
        "); - this.fieldSet = $("
        ").appendTo(this.form); - this.dialog = $("
        ") - .addClass("r2redit-dialog") - .attr("title", this.obj.getTooltip()) - .append(this.fieldSet); - this.dialogOptions = { - autoOpen: true, - width: 350, - height: 300, - modal: true, - buttons: { - Save: function() { - /** - * Workaround: This gets called once on initialization... seems to be a jQuery UI bug - */ - if (!dialogOpened) { - return; - } - base.save(); - $(this).dialog("close"); - if (onSave) { - onSave(); - } - }, - "Cancel": function() { - /** - * Workaround: This gets called once on initialization... seems to be a jQuery UI bug - */ - if (!dialogOpened) { - return; - } - $(this).dialog("close"); - } - }, - close: function() { - } - }; - this.initUI(); - var dialogOpened = false; - this.dialog.dialog(this.dialogOptions); - var dialogOpened = true; - $.r2rUI.fixJQueryUIDialogButtons(this.dialog); - }, - - /** - * Override to add fields to edit form - */ - initUI: function() { - }, - save: function() { - } - }); - - /** - * Prefix Definitions editor - */ - $.r2rPrefixEditor = $.inherit( - $.r2rValueEditor, - { - initUI: function() { - var base = this; - this.__base(); - $.extend(this.dialogOptions, { - width: 510, - height: 200, - dialogClass: "r2redit-editor-prefix-dialog" - }); - $.each($.r2rUtils.parsePrefixDefinitions(this.obj.getUnderlyingObject().value), function(prefix, uri) { - base.addLine(prefix, uri); - }); - base.addLine(); - }, - save: function() { - var prefixes = {}; - this.fieldSet.find(".r2redit-editor-prefix-dialog-line").each(function(key, line) { - line = $(line); - var prefix = line.find(".r2redit-editor-prefix-dialog-prefix").val(); - if (prefix != "(new)") { - prefixes[prefix] = line.find(".r2redit-editor-prefix-dialog-uri").val(); - } - }); - this.obj.setUnderlyingObject($.r2rUtils.createStringLiteral($.r2rUtils.constructPrefixDefinitions(prefixes))); - this.obj.refresh(); - }, - addLine: function(prefix, uri) { - var base = this; - if (prefix == null) { - prefix = "(new)"; - uri = ""; - } - var line = $("
        \ - \ - \ -
        \ -
        ") - .appendTo(this.fieldSet); - line.find(".r2redit-editor-prefix-dialog-prefix").focus(function() { - if ($(this).val() == "(new)") { - $(this) - .select() - .data("new", true); - } - }).change(function() { - if ($(this).data("new")) { - base.addLine(); - $(this).data("new", false); - } - }); - line.find(".ui-icon-minus-small-circle").click(function() { - if ($(this).siblings(".r2redit-editor-prefix-dialog-prefix").val() != "(new)") { - line.remove(); - } - }); - }, - removeLine: function() { - }, - } - ); - - /** - * Basic string editor - */ - $.r2rStringEditor = $.inherit( - $.r2rValueEditor, - { - initUI: function() { - var value = (this.obj.getUnderlyingObject().value != "" ? this.obj.getUnderlyingObject().value : this.getDefaultValue()); - this.valueField = $("").val(value) - .appendTo(this.fieldSet); - var description = this.getDescription(); - if (description) { - $("
        " + description + "
        ").appendTo(this.dialog); - } - }, - save: function() { - this.obj.setUnderlyingObject($.r2rUtils.createStringLiteral(this.valueField.val())); - this.obj.refresh(); - }, - getDescription: function() { - }, - getDefaultValue: function() { - return ""; - } - } - ); - - /** - * Source pattern editor - */ - $.r2rSourcePatternEditor = $.inherit( - $.r2rStringEditor, - { - initUI: function() { - $.extend(this.dialogOptions, { - width: 500, - height: 365, - }); - - this.__base(); - }, - getDescription: function() { - return "A Source Pattern expresses the structure of the source vocabulary terms.
        All of the SPARQL syntax that is valid in a WHERE-clause is allowed here, with the restriciton that properties must be explicit URIs. Also, in order to make it unambiguous which variable in the source pattern corresponds to the mapped resources, the variable ?SUBJ has to be used."; - }, - getDefaultValue: function() { - return "?SUBJ rdf:type ns:Class"; - } - } - ); - - /** - * Traget pattern editor - */ - $.r2rTargetPatternEditor = $.inherit( - $.r2rStringEditor, - { - initUI: function() { - $.extend(this.dialogOptions, { - width: 500, - height: 320, - }); - - this.__base(); - }, - getDescription: function() { - return "A target pattern contains target triples that are constructed by using constants, variables of the source pattern or of tranformation patterns."; - }, - getDefaultValue: function() { - return "?SUBJ ns:prop ?var"; - } - } - ); - - /** - * Transformation editor - */ - $.r2rTransformationEditor = $.inherit( - $.r2rValueEditor, - { - initUI: function() { - var valueField = this.valueField = $("").val(this.obj.getUnderlyingObject().value) - .appendTo(this.fieldSet); - var reference = $("
        \ -
        \ - \ +
        ", + ); + dialog.dialog({ + autoOpen: true, + height: 150, + width: 300, + modal: true, + buttons: { + Remove: function () { + /** + * Workaround: This gets called once on initialization... seems to be a jQuery UI bug + */ + if (!dialogOpened) { + return; + } + $(this).dialog("close"); + base.close("remove"); + }, + Cancel: function () { + /** + * Workaround: This gets called once on initialization... seems to be a jQuery UI bug + */ + if (!dialogOpened) { + return; + } + $(this).dialog("close"); + }, + }, + }); + dialogOpened = true; + $.r2rUI.fixJQueryUIDialogButtons(dialog); + }), + ) + .append( + $("
        ") + .button({ + label: "Cancel", + }) + .click(function () { + base.close("cancel"); + }), + ), + ); + + /* Source code view */ + base.soureCodeTab = $('
        ').appendTo(base.tabs);
        +      base.tabs
        +        .tabs({
        +          selected: 0,
        +          show: function (event, ui) {
        +            if (ui.index == 1) {
        +              base.generateRdfRepresentation();
        +              $("#sourceCode").text(
        +                base.rdfRepresentation.databank.dump({
        +                  format: "text/turtle",
        +                  serialize: true,
        +                  indent: true,
        +                }),
        +              );
        +            }
        +          },
        +        })
        +        .removeClass("ui-corner-all");
        +      /* Init qTips */
        +      base.editor.find("[title]").qtip({
        +        position: {
        +          corner: {
        +            target: "rightMiddle",
        +            tooltip: "leftMiddle",
        +          },
        +        },
        +        style: {
        +          background: "#feff9d",
        +          border: {
        +            width: 1,
        +            radius: 3,
        +            color: "#feff9d",
        +          },
        +          padding: 3,
        +          textAlign: "left",
        +          fontSize: "12px",
        +          tip: true, // Give it a speech bubble tip with automatic corner detection
        +          name: "cream", // Style it according to the preset 'cream' style
        +        },
        +      });
        +    };
        +
        +    (base.importData = function () {
        +      if (base.mapping === null) {
        +        /* new mapping */
        +        var basePrefixStore = $.r2rUtils.basePrefixStore();
        +        if (base.parentMapping) {
        +          new $.r2rTreeViewType(
        +            $.rdf.resource("r2r:PropertyMapping", {
        +              namespaces: basePrefixStore.databank.namespaces,
        +            }),
        +          ).addToTreeView(base.treeview);
        +          new $.r2rTreeViewMappingRef(base.parentMapping).addToTreeView(
        +            base.treeview,
        +          );
        +          /* Add mandatory source pattern */
        +          new $.r2rTreeViewSourcePattern(
        +            $.r2rUtils.createStringLiteral(""),
        +          ).addToTreeView(base.treeview);
        +        } else {
        +          new $.r2rTreeViewType(
        +            $.rdf.resource("r2r:ClassMapping", {
        +              namespaces: basePrefixStore.databank.namespaces,
        +            }),
        +          ).addToTreeView(base.treeview);
        +          /* Add mandatory source pattern */
        +          new $.r2rTreeViewSourcePattern(
        +            $.r2rUtils.createStringLiteral(""),
        +          ).addToTreeView(base.treeview);
        +        }
        +        base.editor.find("#r2redit-mappingName").val("(please provide a name)");
        +        return;
        +      }
        +
        +      /* Mapping URI */
        +      base.editor
        +        .find("#r2redit-mappingName")
        +        .val(
        +          $.r2rUtils.formatResource(
        +            base.mapping,
        +            base.rdfStore.databank.namespaces,
        +          ),
        +        );
        +
        +      /* Parse data */
        +      $(treeViewTypes).each(function (key, obj) {
        +        var objects = $.r2rUtils.findObjects(
        +          base.rdfStore,
        +          base.mapping,
        +          obj.getProperty(),
        +        );
        +        $(objects).each(function (key, value) {
        +          new obj(value).addToTreeView(base.treeview);
        +        });
        +      });
        +    }),
        +      /**
        +       * Popuplates rdfRepresentation object based on mappingObjects
        +       */
        +      (base.generateRdfRepresentation = function () {
        +        base.rdfRepresentation = $.rdf({
        +          namespaces: base.rdfStore.databank.namespaces,
        +        });
        +        base.treeview.find("li").each(function (key, obj) {
        +          var mappingObject = $(obj).data("r2rObject");
        +          base.rdfRepresentation.add(
        +            $.rdf.triple(
        +              base.mapping,
        +              $.rdf.resource(mappingObject.getProperty(), {
        +                namespaces: base.rdfRepresentation.databank.namespaces,
        +              }),
        +              mappingObject.getUnderlyingObject(),
        +            ),
        +          );
        +        });
        +      });
        +
        +    base.close = function (action) {
        +      if (base.onComplete && action == "save") {
        +        base.generateRdfRepresentation();
        +      }
        +      base.treeview.find("li").remove();
        +      base.editor.remove();
        +      if (base.onComplete) {
        +        base.onComplete(
        +          base.mapping,
        +          base.originalMapping,
        +          base.rdfRepresentation,
        +          action,
        +        );
        +      }
        +    };
        +
        +    base.remove = function () {
        +      if (base.editor) {
        +        base.editor.remove();
        +      }
        +    };
        +
        +    base.init();
        +    return base;
        +  };
        +
        +  /**
        +   * Base value editor class
        +   */
        +  $.r2rValueEditor = $.inherit({
        +    __constructor: function (obj) {
        +      this.obj = obj;
        +      this.init();
        +      return this;
        +    },
        +
        +    init: function () {},
        +
        +    getObject: function () {
        +      return this.obj;
        +    },
        +
        +    show: function (onSave) {
        +      var base = this;
        +      this.form = $("
        "); + this.fieldSet = $("
        ").appendTo(this.form); + this.dialog = $("
        ") + .addClass("r2redit-dialog") + .attr("title", this.obj.getTooltip()) + .append(this.fieldSet); + this.dialogOptions = { + autoOpen: true, + width: 350, + height: 300, + modal: true, + buttons: { + Save: function () { + /** + * Workaround: This gets called once on initialization... seems to be a jQuery UI bug + */ + if (!dialogOpened) { + return; + } + base.save(); + $(this).dialog("close"); + if (onSave) { + onSave(); + } + }, + Cancel: function () { + /** + * Workaround: This gets called once on initialization... seems to be a jQuery UI bug + */ + if (!dialogOpened) { + return; + } + $(this).dialog("close"); + }, + }, + close: function () {}, + }; + this.initUI(); + var dialogOpened = false; + this.dialog.dialog(this.dialogOptions); + var dialogOpened = true; + $.r2rUI.fixJQueryUIDialogButtons(this.dialog); + }, + + /** + * Override to add fields to edit form + */ + initUI: function () {}, + save: function () {}, + }); + + /** + * Prefix Definitions editor + */ + $.r2rPrefixEditor = $.inherit($.r2rValueEditor, { + initUI: function () { + var base = this; + this.__base(); + $.extend(this.dialogOptions, { + width: 510, + height: 200, + dialogClass: "r2redit-editor-prefix-dialog", + }); + $.each( + $.r2rUtils.parsePrefixDefinitions(this.obj.getUnderlyingObject().value), + function (prefix, uri) { + base.addLine(prefix, uri); + }, + ); + base.addLine(); + }, + save: function () { + var prefixes = {}; + this.fieldSet + .find(".r2redit-editor-prefix-dialog-line") + .each(function (key, line) { + line = $(line); + var prefix = line.find(".r2redit-editor-prefix-dialog-prefix").val(); + if (prefix != "(new)") { + prefixes[prefix] = line + .find(".r2redit-editor-prefix-dialog-uri") + .val(); + } + }); + this.obj.setUnderlyingObject( + $.r2rUtils.createStringLiteral( + $.r2rUtils.constructPrefixDefinitions(prefixes), + ), + ); + this.obj.refresh(); + }, + addLine: function (prefix, uri) { + var base = this; + if (prefix == null) { + prefix = "(new)"; + uri = ""; + } + var line = $( + '
        \ + \ + \ +
        \ +
        ', + ).appendTo(this.fieldSet); + line + .find(".r2redit-editor-prefix-dialog-prefix") + .focus(function () { + if ($(this).val() == "(new)") { + $(this).select().data("new", true); + } + }) + .change(function () { + if ($(this).data("new")) { + base.addLine(); + $(this).data("new", false); + } + }); + line.find(".ui-icon-minus-small-circle").click(function () { + if ( + $(this).siblings(".r2redit-editor-prefix-dialog-prefix").val() != + "(new)" + ) { + line.remove(); + } + }); + }, + removeLine: function () {}, + }); + + /** + * Basic string editor + */ + $.r2rStringEditor = $.inherit($.r2rValueEditor, { + initUI: function () { + var value = + this.obj.getUnderlyingObject().value != "" + ? this.obj.getUnderlyingObject().value + : this.getDefaultValue(); + this.valueField = $("") + .val(value) + .appendTo(this.fieldSet); + var description = this.getDescription(); + if (description) { + $( + '
        ' + + description + + "
        ", + ).appendTo(this.dialog); + } + }, + save: function () { + this.obj.setUnderlyingObject( + $.r2rUtils.createStringLiteral(this.valueField.val()), + ); + this.obj.refresh(); + }, + getDescription: function () {}, + getDefaultValue: function () { + return ""; + }, + }); + + /** + * Source pattern editor + */ + $.r2rSourcePatternEditor = $.inherit($.r2rStringEditor, { + initUI: function () { + $.extend(this.dialogOptions, { + width: 500, + height: 365, + }); + + this.__base(); + }, + getDescription: function () { + return 'A Source Pattern expresses the structure of the source vocabulary terms.
        All of the SPARQL syntax that is valid in a WHERE-clause is allowed here, with the restriciton that properties must be explicit URIs. Also, in order to make it unambiguous which variable in the source pattern corresponds to the mapped resources, the variable ?SUBJ has to be used.'; + }, + getDefaultValue: function () { + return "?SUBJ rdf:type ns:Class"; + }, + }); + + /** + * Traget pattern editor + */ + $.r2rTargetPatternEditor = $.inherit($.r2rStringEditor, { + initUI: function () { + $.extend(this.dialogOptions, { + width: 500, + height: 320, + }); + + this.__base(); + }, + getDescription: function () { + return 'A target pattern contains target triples that are constructed by using constants, variables of the source pattern or of tranformation patterns.'; + }, + getDefaultValue: function () { + return "?SUBJ ns:prop ?var"; + }, + }); + + /** + * Transformation editor + */ + $.r2rTransformationEditor = $.inherit($.r2rValueEditor, { + initUI: function () { + var valueField = (this.valueField = $("") + .val(this.obj.getUnderlyingObject().value) + .appendTo(this.fieldSet)); + var reference = $( + '
        \ + \ - \ \ -
        \ -
        ").appendTo(this.dialog); - /* Function list */ - var functionList = reference.find("#r2redit-editor-transformation-functions"); - $.each(functionReference, function(group, functions) { - var optGroup = $("" + syntax + "") - .attr("value", functionName) - .dblclick(function() { - valueField.insertAtCaret(syntax); - }) - .appendTo(optGroup); - }); - }); - }); - functionList - .scrollTop(0) - .change(function() { - var description = reference.find("#r2redit-editor-transformation-description"); - var f = allFunctions[functionList.val()]; - if (f) { - var usage = ""; - var functionName = (functionList.val() == "_length" ? "length" : functionList.val()); - $.each($.isArray(f.arguments) ? f.arguments : [ f.arguments ], function(index, arguments) { - usage += "" + functionName + "(" + f.arguments + ")
        "; - }); - usage += "
        " + f.description; - if (f.note) { - usage += "
        Note: " + f.note + ""; - } - description.html(usage); - } else { - description.html(""); - } - }); - - /* Search */ - var searchField = reference.find('#r2redit-editor-transformation-searchfield'); - searchField - .placeholder() - .keyup(function() { - var regexp = new RegExp(searchField.val(), "i"); - functionList.find("option").each(function(key, option) { - var option = $(option); - if (option.attr("value").search(regexp) != -1 || allFunctions[option.attr("value")].description.search(regexp) != -1) { - option.show(); - } else { - option.hide(); - } - }); - }); - - $.extend(this.dialogOptions, { - width: 800, - height: 340, - dialogClass: "r2redit-editor-transformation-dialog" - }); - }, - save: function() { - this.obj.setUnderlyingObject($.r2rUtils.createStringLiteral(this.valueField.val())); - this.obj.refresh(); - } - } - ); - -})(jQuery); \ No newline at end of file +
        \ +
        ', + ).appendTo(this.dialog); + /* Function list */ + var functionList = reference.find( + "#r2redit-editor-transformation-functions", + ); + $.each(functionReference, function (group, functions) { + var optGroup = $("" + syntax + "") + .attr("value", functionName) + .dblclick(function () { + valueField.insertAtCaret(syntax); + }) + .appendTo(optGroup); + }, + ); + }); + }); + functionList.scrollTop(0).change(function () { + var description = reference.find( + "#r2redit-editor-transformation-description", + ); + var f = allFunctions[functionList.val()]; + if (f) { + var usage = ""; + var functionName = + functionList.val() == "_length" ? "length" : functionList.val(); + $.each( + $.isArray(f.arguments) ? f.arguments : [f.arguments], + function (index, arguments) { + usage += "" + functionName + "(" + f.arguments + ")
        "; + }, + ); + usage += "
        " + f.description; + if (f.note) { + usage += "
        Note: " + f.note + ""; + } + description.html(usage); + } else { + description.html(""); + } + }); + + /* Search */ + var searchField = reference.find( + "#r2redit-editor-transformation-searchfield", + ); + searchField.placeholder().keyup(function () { + var regexp = new RegExp(searchField.val(), "i"); + functionList.find("option").each(function (key, option) { + var option = $(option); + if ( + option.attr("value").search(regexp) != -1 || + allFunctions[option.attr("value")].description.search(regexp) != -1 + ) { + option.show(); + } else { + option.hide(); + } + }); + }); + + $.extend(this.dialogOptions, { + width: 800, + height: 340, + dialogClass: "r2redit-editor-transformation-dialog", + }); + }, + save: function () { + this.obj.setUnderlyingObject( + $.r2rUtils.createStringLiteral(this.valueField.val()), + ); + this.obj.refresh(); + }, + }); +})(jQuery); diff --git a/r2redit/src/js/r2redit.env.js b/r2redit/src/js/r2redit.env.js index 3243776..a507eac 100644 --- a/r2redit/src/js/r2redit.env.js +++ b/r2redit/src/js/r2redit.env.js @@ -17,157 +17,180 @@ * @fileOverview R2R query environment * @author Christian Becker */ -(function($){ - - /** - * Provides an environment to query details about R2R mappings - * @param prefixesArray Array of r2r:prefixDefinition objects - */ - $.r2rQueryEnv = function(prefixesArray) { - var base = this; - - base.init = function() { - base.prefixStore = $.r2rUtils.basePrefixStore(); - base.addPrefixDefinitions(prefixesArray); - }; - - /** - * Parses R2R prefix definition and adds the prefixes to the internal rdf object. - * @param prefixesArray Array of r2r:prefixDefinition objects - * - * Example: - * ["smwcat: . - * smwprop: ."] - */ - base.addPrefixDefinitions = function(prefixesArray) { - $(prefixesArray).each(function(key, prefixes) { - if (prefixes === undefined) { - return; - } - - $.each($.r2rUtils.parsePrefixDefinitions(prefixes.value), function(key, value) { - base.prefixStore.prefix(key, value); - }); - }); - }; - - /** - * Tries to output a resource in prefix notation - * @param resource - * @return string - */ - base.formatResource = function(resource) { - try { - return $.createCurie(resource.value, { namespaces: base.prefixStore.databank.namespaces }); - } catch (g) { - return resource.value; - } - }; - - /** - * A pattern is usually characterized by the properties that are generated for ?SUBJ - * @param classMapping If true and the property is rdf:type, the object is used instead (as it's more descriptive) - */ - base.formatPattern = function(patternArray, classMapping) { - try { - /* Parse statements to find the properties that ?SUBJ is addressed with */ - var query = base.prefixStore; - var properties = []; - $(patternArray).each(function(key, pattern) { - var subPatterns = pattern.value.split("."); - $(subPatterns).each(function(key,value) { - query = query.where(value); - if (query && query.filterExp && (query.filterExp.subject == "?SUBJ" || query.filterExp.object == "?SUBJ")) { - if (classMapping && patternArray.length == 1 && subPatterns.length == 1 - && base.formatResource(query.filterExp.property) == "rdf:type") { - properties.push(base.formatResource(query.filterExp.object)); - } else { - properties.push(base.formatResource(query.filterExp.property)); - } - } - }); - }); - if (properties.length) { - return properties.join("
        "); - } - } catch(err) { - } - /* default: return pattern with minor cleanup */ - if (patternArray.length == 1 && patternArray[0].value.split(".").length == 1) { - try { - var query = base.prefixStore; - query = query.where(patternArray[0].value); - return base.formatResource(query.filterExp.property); - } catch (err) { - } - } - var result = ""; - $(patternArray).each(function(key, pattern) { - result += pattern.value.replace("?SUBJ a ", "") + "
        "; - }); - return result; - }; - - /** - * A source pattern is characterized by the properties that are generated for the variables used in target patterns - */ - base.formatSourcePattern = function(sourcePattern, targetPattern) { - if (0 == sourcePattern.length) { - return ''; - } - try { - /* Parse target patterns to find the variables used */ - var query = base.prefixStore; - var variables = []; - $(targetPattern).each(function(key, pattern) { - $(pattern.value.split(".")).each(function(key,value) { - query = query.where(value); - if (query && query.filterExp) { - $([query.filterExp.subject, query.filterExp.object]).each(function(key, value) { - value = $.r2rUtils.cleanVariable(value); - if (value != "?SUBJ" && -1 == $.inArray(value, variables)) { - variables.push(value); - } - }); - } - }); - }); - - /* Parse source patterns to find the properties used with these variables */ - var query = base.prefixStore; - var properties = []; - $(sourcePattern).each(function(key, pattern) { - $(pattern.value.split(".")).each(function(key,value) { - query = query.where(value); - if (query && query.filterExp && (-1 != $.inArray(query.filterExp.subject, variables) || -1 != $.inArray(query.filterExp.object, variables))) { - properties.push(base.formatResource(query.filterExp.property)); - } - }); - }); - if (properties.length) { - return properties.join("
        "); - } - } catch(err) { -// console.log(sourcePattern); -// console.log(err); - } - /* default: return pattern with minor cleanup */ - if (sourcePattern.length == 1 && sourcePattern[0].value.split(".").length == 1) { - try { - var query = base.prefixStore; - query = query.where(sourcePattern[0].value); - return base.formatResource(query.filterExp.property); - } catch (err) { - } - } - var result = ""; - $(sourcePattern).each(function(key, pattern) { - result += pattern.value.replace("?SUBJ a ", "") + "
        "; - }); - return result; - }; +(function ($) { + /** + * Provides an environment to query details about R2R mappings + * @param prefixesArray Array of r2r:prefixDefinition objects + */ + $.r2rQueryEnv = function (prefixesArray) { + var base = this; - base.init(); - return base; - }; -})(jQuery); \ No newline at end of file + base.init = function () { + base.prefixStore = $.r2rUtils.basePrefixStore(); + base.addPrefixDefinitions(prefixesArray); + }; + + /** + * Parses R2R prefix definition and adds the prefixes to the internal rdf object. + * @param prefixesArray Array of r2r:prefixDefinition objects + * + * Example: + * ["smwcat: . + * smwprop: ."] + */ + base.addPrefixDefinitions = function (prefixesArray) { + $(prefixesArray).each(function (key, prefixes) { + if (prefixes === undefined) { + return; + } + + $.each( + $.r2rUtils.parsePrefixDefinitions(prefixes.value), + function (key, value) { + base.prefixStore.prefix(key, value); + }, + ); + }); + }; + + /** + * Tries to output a resource in prefix notation + * @param resource + * @return string + */ + base.formatResource = function (resource) { + try { + return $.createCurie(resource.value, { + namespaces: base.prefixStore.databank.namespaces, + }); + } catch (g) { + return resource.value; + } + }; + + /** + * A pattern is usually characterized by the properties that are generated for ?SUBJ + * @param classMapping If true and the property is rdf:type, the object is used instead (as it's more descriptive) + */ + base.formatPattern = function (patternArray, classMapping) { + try { + /* Parse statements to find the properties that ?SUBJ is addressed with */ + var query = base.prefixStore; + var properties = []; + $(patternArray).each(function (key, pattern) { + var subPatterns = pattern.value.split("."); + $(subPatterns).each(function (key, value) { + query = query.where(value); + if ( + query && + query.filterExp && + (query.filterExp.subject == "?SUBJ" || + query.filterExp.object == "?SUBJ") + ) { + if ( + classMapping && + patternArray.length == 1 && + subPatterns.length == 1 && + base.formatResource(query.filterExp.property) == "rdf:type" + ) { + properties.push(base.formatResource(query.filterExp.object)); + } else { + properties.push(base.formatResource(query.filterExp.property)); + } + } + }); + }); + if (properties.length) { + return properties.join("
        "); + } + } catch (err) {} + /* default: return pattern with minor cleanup */ + if ( + patternArray.length == 1 && + patternArray[0].value.split(".").length == 1 + ) { + try { + var query = base.prefixStore; + query = query.where(patternArray[0].value); + return base.formatResource(query.filterExp.property); + } catch (err) {} + } + var result = ""; + $(patternArray).each(function (key, pattern) { + result += pattern.value.replace("?SUBJ a ", "") + "
        "; + }); + return result; + }; + + /** + * A source pattern is characterized by the properties that are generated for the variables used in target patterns + */ + base.formatSourcePattern = function (sourcePattern, targetPattern) { + if (0 == sourcePattern.length) { + return ""; + } + try { + /* Parse target patterns to find the variables used */ + var query = base.prefixStore; + var variables = []; + $(targetPattern).each(function (key, pattern) { + $(pattern.value.split(".")).each(function (key, value) { + query = query.where(value); + if (query && query.filterExp) { + $([query.filterExp.subject, query.filterExp.object]).each( + function (key, value) { + value = $.r2rUtils.cleanVariable(value); + if (value != "?SUBJ" && -1 == $.inArray(value, variables)) { + variables.push(value); + } + }, + ); + } + }); + }); + + /* Parse source patterns to find the properties used with these variables */ + var query = base.prefixStore; + var properties = []; + $(sourcePattern).each(function (key, pattern) { + $(pattern.value.split(".")).each(function (key, value) { + query = query.where(value); + if ( + query && + query.filterExp && + (-1 != $.inArray(query.filterExp.subject, variables) || + -1 != $.inArray(query.filterExp.object, variables)) + ) { + properties.push(base.formatResource(query.filterExp.property)); + } + }); + }); + if (properties.length) { + return properties.join("
        "); + } + } catch (err) { + // console.log(sourcePattern); + // console.log(err); + } + /* default: return pattern with minor cleanup */ + if ( + sourcePattern.length == 1 && + sourcePattern[0].value.split(".").length == 1 + ) { + try { + var query = base.prefixStore; + query = query.where(sourcePattern[0].value); + return base.formatResource(query.filterExp.property); + } catch (err) {} + } + var result = ""; + $(sourcePattern).each(function (key, pattern) { + result += pattern.value.replace("?SUBJ a ", "") + "
        "; + }); + return result; + }; + + base.init(); + return base; + }; +})(jQuery); diff --git a/r2redit/src/js/r2redit.js b/r2redit/src/js/r2redit.js index 3756ae0..0b41d05 100644 --- a/r2redit/src/js/r2redit.js +++ b/r2redit/src/js/r2redit.js @@ -17,74 +17,86 @@ * @fileOverview Main R2Redit class * @author Christian Becker */ -(function($){ - - /** - * Embeds an R2Redit instance in a DOM container - * @param container jQuery element to host the table / editor - * @param options - * sourceUrl URL to load mapping from - * basePath Base path to R2Redit - * rdfSource RDF/XML or TTL source (as an alternative to specifying sourceURL) - * title Editor title to use - * onCommit Callback handler to save mapping - * serialize If true, the mappings will be passed to onCommit as serialized TTL, - * otherwise the rdfStore will be passed - */ - $.r2rEditor = function(container, options) { - var base = this; - base.container = container; - base.options = options; - - /** - * Initialization - */ - base.init = function() { - if (base.options.sourceUrl) { - $.r2rUI.showProgress(); - $.ajax({ - url: base.options.sourceUrl, - dataType:'text', - success: function(data) { - try { - base.startFromData(data); - } catch (err) { - $.r2rUI.showError("R2Redit error", err); - } - }, - error: function(jqXHR, textStatus, err) { - $.r2rUI.showError("Unable to load mapping", err); - }, - complete: function() { - $.r2rUI.hideProgress(); - } - }); - } else { - base.startFromData(base.options.rdfSource); - } - }; - - /** - * Actual initialization - */ - base.startFromData = function(rdfSource) { - base.rdfStore = $.r2rUtils.loadRDF(rdfSource); - base.mappingTable = new $.r2rEditorMappingTable(base.container, base.options, base.rdfStore, base.onCommit); - }; - - base.onCommit = function(rdfStore) { - if (base.options.onCommit) { - base.options.onCommit(base.options.serialize ? rdfStore.databank.dump({format:'text/turtle', serialize: true, indent: true}) : rdfStore); - } - } - - base.remove = function() { - if (base.mappingTable) { - base.mappingTable.remove(); - } - } - - base.init(); - return base; - }; -})(jQuery); \ No newline at end of file +(function ($) { + /** + * Embeds an R2Redit instance in a DOM container + * @param container jQuery element to host the table / editor + * @param options + * sourceUrl URL to load mapping from + * basePath Base path to R2Redit + * rdfSource RDF/XML or TTL source (as an alternative to specifying sourceURL) + * title Editor title to use + * onCommit Callback handler to save mapping + * serialize If true, the mappings will be passed to onCommit as serialized TTL, + * otherwise the rdfStore will be passed + */ + $.r2rEditor = function (container, options) { + var base = this; + base.container = container; + base.options = options; + + /** + * Initialization + */ + base.init = function () { + if (base.options.sourceUrl) { + $.r2rUI.showProgress(); + $.ajax({ + url: base.options.sourceUrl, + dataType: "text", + success: function (data) { + try { + base.startFromData(data); + } catch (err) { + $.r2rUI.showError("R2Redit error", err); + } + }, + error: function (jqXHR, textStatus, err) { + $.r2rUI.showError("Unable to load mapping", err); + }, + complete: function () { + $.r2rUI.hideProgress(); + }, + }); + } else { + base.startFromData(base.options.rdfSource); + } + }; + + /** + * Actual initialization + */ + base.startFromData = function (rdfSource) { + base.rdfStore = $.r2rUtils.loadRDF(rdfSource); + base.mappingTable = new $.r2rEditorMappingTable( + base.container, + base.options, + base.rdfStore, + base.onCommit, + ); + }; + + base.onCommit = function (rdfStore) { + if (base.options.onCommit) { + base.options.onCommit( + base.options.serialize + ? rdfStore.databank.dump({ + format: "text/turtle", + serialize: true, + indent: true, + }) + : rdfStore, + ); + } + }; + + base.remove = function () { + if (base.mappingTable) { + base.mappingTable.remove(); + } + }; + + base.init(); + return base; + }; +})(jQuery); diff --git a/r2redit/src/js/r2redit.overview.js b/r2redit/src/js/r2redit.overview.js index c5091ed..291db89 100644 --- a/r2redit/src/js/r2redit.overview.js +++ b/r2redit/src/js/r2redit.overview.js @@ -17,433 +17,496 @@ * @fileOverview Listing of available R2R mappings * @author Christian Becker */ -(function($){ - - $.r2rExpandedClassMappings = []; - - /** - * Represents an object in the overview table - * @param {Object} uri, name, source, target, onEdit(mapping, parentMapping) - */ - $.mappingRow = $.inherit({ +(function ($) { + $.r2rExpandedClassMappings = []; - __constructor: function(container, options){ - this.container = container; - this.options = options; - this.init(); - return this; - }, - - init: function() { - this.el = $("").addClass(this.getClass()); - this.el.appendTo(this.container); - /* Collapse / expand */ - $("") - .addClass("r2redit-mappingTableAction") - .addClass("r2redit-mappingTableClickable") - .appendTo(this.el); - /* Name */ - $("" + this.options.name + "") - .addClass("r2redit-mappingTableProperty") - .addClass("r2redit-mappingTableName") - .appendTo(this.el); - /* Source */ - $("" + this.options.source + "") - .addClass("r2redit-mappingTableProperty") - .appendTo(this.el); - /* Target */ - $("" + this.options.target + "") - .addClass("r2redit-mappingTableProperty") - .appendTo(this.el); - /* Edit link */ - $("") - .appendTo(this.el) - .addClass("r2redit-mappingTableAction") - .addClass("r2redit-mappingTableClickable") - .addClass("r2redit-mappingTableEdit"); - } - }); - - /** - * Represents a class mapping in the overview table - * @param {Object} uri, name, source, target, onEdit(mapping, parentMapping) - */ - $.classMappingRow = $.inherit( - $.mappingRow, - { - getClass: function() { - return "r2redit-mappingTableClassMapping"; - }, - init: function() { - this.__base(); - var base = this; - base.id = $.classMappingRow.idCtr++; - /* Add collapse / expand handling */ - base.el.find(".r2redit-mappingTableAction:first") - .addClass(this.isCollapsed() ? "r2redit-arrow-collapsed" : "r2redit-arrow-expanded") - .click(function() { - if ($(this).hasClass("r2redit-arrow-collapsed")) { - $(this).removeClass("r2redit-arrow-collapsed").addClass("r2redit-arrow-expanded"); - base.el.siblings(".r2redit-parent" + base.getId()).show(); - $.r2rExpandedClassMappings.push(base.options.uri); - } else { - $(this).removeClass("r2redit-arrow-expanded").addClass("r2redit-arrow-collapsed"); - base.el.siblings(".r2redit-parent" + base.getId()).hide(); - $.r2rExpandedClassMappings = $.grep($.r2rExpandedClassMappings, function(value) { return value != base.options.uri; }); - } - }); - /* Allow clicking on property rows */ - base.el.find(".r2redit-mappingTableProperty") - .addClass("r2redit-mappingTableClickable") - .click(function() { - $(this).siblings(".r2redit-mappingTableAction:first").click(); - }); - /* Add edit handling */ - base.el.find(".r2redit-mappingTableEdit") - .click(function() { - base.options.onEdit(base.options.uri); - }); - }, - getId: function() { - return this.id; - }, - getUri: function() { - return this.options.uri; - }, - isCollapsed: function() { - return $.inArray(this.options.uri, $.r2rExpandedClassMappings) == -1; - } - }, - { - idCtr: 0 - } - ); - - /** - * Represents a property mapping in the overview table - * @param {Object} uri, name, source, target, parentClassMapping - */ - $.propertyMappingRow = $.inherit( - $.mappingRow, - { - getClass: function() { - return "r2redit-mappingTablePropertyMapping"; - }, - init: function() { - this.__base(); - var base = this; - base.el - .addClass("r2redit-parent" + base.options.parentClassMapping.getId()); - if (base.options.parentClassMapping.isCollapsed()) { - base.el.hide(); - } - /* Add edit handling */ - base.el.find(".r2redit-mappingTableEdit") - .click(function() { - base.options.onEdit(base.options.uri, base.options.parentClassMapping.getUri()); - }); - } - } - ); - - - /** - * Represents an action row in the overview table - * @param {Object} - */ - $.actionRow = $.inherit({ + /** + * Represents an object in the overview table + * @param {Object} uri, name, source, target, onEdit(mapping, parentMapping) + */ + $.mappingRow = $.inherit({ + __constructor: function (container, options) { + this.container = container; + this.options = options; + this.init(); + return this; + }, - __constructor: function(container, options){ - this.container = container; - this.options = options; - this.init(); - return this; - }, - - init: function() { - var base = this; - this.el = $("").addClass(this.getClass()); - this.el.appendTo(this.container); - /* Collapse / expand */ - $("") - .addClass("r2redit-mappingTableAction") - .appendTo(this.el); - /* Name / Source / Target */ - $("") - .addClass("r2redit-mappingTableProperty") - .appendTo(this.el) - .append($("
        ") - .button({ - icons: { - primary: "ui-icon-add" - }, - label: this.getLabel(), - }) - .click(this.getClickHandler()) - ); - - } - }); - - /** - * Represents an action row to add a new class mapping - * @param {Object} onEdit(mapping, parentMapping) - */ - $.addClassMappingRow = $.inherit( - $.actionRow, - { - init: function() { - this.__base(); - }, - getClass: function() { - return "r2redit-mappingTableAddClassMapping"; - }, - getLabel: function() { - return "New Class Mapping"; - }, - getClickHandler: function() { - var base = this; - return function() { - base.options.onEdit(null); - }; - } - } - ); + init: function () { + this.el = $("").addClass(this.getClass()); + this.el.appendTo(this.container); + /* Collapse / expand */ + $("") + .addClass("r2redit-mappingTableAction") + .addClass("r2redit-mappingTableClickable") + .appendTo(this.el); + /* Name */ + $("" + this.options.name + "") + .addClass("r2redit-mappingTableProperty") + .addClass("r2redit-mappingTableName") + .appendTo(this.el); + /* Source */ + $("" + this.options.source + "") + .addClass("r2redit-mappingTableProperty") + .appendTo(this.el); + /* Target */ + $("" + this.options.target + "") + .addClass("r2redit-mappingTableProperty") + .appendTo(this.el); + /* Edit link */ + $("") + .appendTo(this.el) + .addClass("r2redit-mappingTableAction") + .addClass("r2redit-mappingTableClickable") + .addClass("r2redit-mappingTableEdit"); + }, + }); - /** - * Represents an action row to add a new property mapping - * @param {Object} parentClassMapping, onEdit(mapping, parentMapping) - */ - $.addPropertyMappingRow = $.inherit( - $.actionRow, - { - init: function() { - this.__base(); - this.el - .addClass("r2redit-parent" + this.options.parentClassMapping.getId()) - .addClass("r2redit-mappingTablePropertyMapping"); - if (this.options.parentClassMapping.isCollapsed()) { - this.el.hide(); - } - }, - getClass: function() { - return "r2redit-mappingTableAddPropertyMapping"; - }, - getLabel: function() { - return "New Property Mapping"; - }, - getClickHandler: function() { - var base = this; - return function() { - base.options.onEdit(null, base.options.parentClassMapping.getUri()); - }; - } - } - ); - - /** - * Generates an overview table for a given mapping from source - * @param container jQuery element to host the table / editor - * @param options - * title Editor title to use - * basePath Base path to R2Redit - * @param rdfStore rdfQuery object containing the mappings - * @param onCommit function(rdfStore) - */ - $.r2rEditorMappingTable = function(container, options, rdfStore, onCommit) { - var base = this; - base.container = container; - base.title = options.title; - base.basePath = options.basePath; - base.rdfStore = rdfStore; - base.onCommit = onCommit; - - /** - * Initialization - */ - base.init = function() { - base.mappingTable = $("
        \ -

        " + base.title + "

        \ -
        \ - \ - \ + /** + * Represents a class mapping in the overview table + * @param {Object} uri, name, source, target, onEdit(mapping, parentMapping) + */ + $.classMappingRow = $.inherit( + $.mappingRow, + { + getClass: function () { + return "r2redit-mappingTableClassMapping"; + }, + init: function () { + this.__base(); + var base = this; + base.id = $.classMappingRow.idCtr++; + /* Add collapse / expand handling */ + base.el + .find(".r2redit-mappingTableAction:first") + .addClass( + this.isCollapsed() + ? "r2redit-arrow-collapsed" + : "r2redit-arrow-expanded", + ) + .click(function () { + if ($(this).hasClass("r2redit-arrow-collapsed")) { + $(this) + .removeClass("r2redit-arrow-collapsed") + .addClass("r2redit-arrow-expanded"); + base.el.siblings(".r2redit-parent" + base.getId()).show(); + $.r2rExpandedClassMappings.push(base.options.uri); + } else { + $(this) + .removeClass("r2redit-arrow-expanded") + .addClass("r2redit-arrow-collapsed"); + base.el.siblings(".r2redit-parent" + base.getId()).hide(); + $.r2rExpandedClassMappings = $.grep( + $.r2rExpandedClassMappings, + function (value) { + return value != base.options.uri; + }, + ); + } + }); + /* Allow clicking on property rows */ + base.el + .find(".r2redit-mappingTableProperty") + .addClass("r2redit-mappingTableClickable") + .click(function () { + $(this).siblings(".r2redit-mappingTableAction:first").click(); + }); + /* Add edit handling */ + base.el.find(".r2redit-mappingTableEdit").click(function () { + base.options.onEdit(base.options.uri); + }); + }, + getId: function () { + return this.id; + }, + getUri: function () { + return this.options.uri; + }, + isCollapsed: function () { + return $.inArray(this.options.uri, $.r2rExpandedClassMappings) == -1; + }, + }, + { + idCtr: 0, + }, + ); + + /** + * Represents a property mapping in the overview table + * @param {Object} uri, name, source, target, parentClassMapping + */ + $.propertyMappingRow = $.inherit($.mappingRow, { + getClass: function () { + return "r2redit-mappingTablePropertyMapping"; + }, + init: function () { + this.__base(); + var base = this; + base.el.addClass( + "r2redit-parent" + base.options.parentClassMapping.getId(), + ); + if (base.options.parentClassMapping.isCollapsed()) { + base.el.hide(); + } + /* Add edit handling */ + base.el.find(".r2redit-mappingTableEdit").click(function () { + base.options.onEdit( + base.options.uri, + base.options.parentClassMapping.getUri(), + ); + }); + }, + }); + + /** + * Represents an action row in the overview table + * @param {Object} + */ + $.actionRow = $.inherit({ + __constructor: function (container, options) { + this.container = container; + this.options = options; + this.init(); + return this; + }, + + init: function () { + var base = this; + this.el = $("").addClass(this.getClass()); + this.el.appendTo(this.container); + /* Collapse / expand */ + $("").addClass("r2redit-mappingTableAction").appendTo(this.el); + /* Name / Source / Target */ + $('') + .addClass("r2redit-mappingTableProperty") + .appendTo(this.el) + .append( + $("
        ") + .button({ + icons: { + primary: "ui-icon-add", + }, + label: this.getLabel(), + }) + .click(this.getClickHandler()), + ); + }, + }); + + /** + * Represents an action row to add a new class mapping + * @param {Object} onEdit(mapping, parentMapping) + */ + $.addClassMappingRow = $.inherit($.actionRow, { + init: function () { + this.__base(); + }, + getClass: function () { + return "r2redit-mappingTableAddClassMapping"; + }, + getLabel: function () { + return "New Class Mapping"; + }, + getClickHandler: function () { + var base = this; + return function () { + base.options.onEdit(null); + }; + }, + }); + + /** + * Represents an action row to add a new property mapping + * @param {Object} parentClassMapping, onEdit(mapping, parentMapping) + */ + $.addPropertyMappingRow = $.inherit($.actionRow, { + init: function () { + this.__base(); + this.el + .addClass("r2redit-parent" + this.options.parentClassMapping.getId()) + .addClass("r2redit-mappingTablePropertyMapping"); + if (this.options.parentClassMapping.isCollapsed()) { + this.el.hide(); + } + }, + getClass: function () { + return "r2redit-mappingTableAddPropertyMapping"; + }, + getLabel: function () { + return "New Property Mapping"; + }, + getClickHandler: function () { + var base = this; + return function () { + base.options.onEdit(null, base.options.parentClassMapping.getUri()); + }; + }, + }); + + /** + * Generates an overview table for a given mapping from source + * @param container jQuery element to host the table / editor + * @param options + * title Editor title to use + * basePath Base path to R2Redit + * @param rdfStore rdfQuery object containing the mappings + * @param onCommit function(rdfStore) + */ + $.r2rEditorMappingTable = function (container, options, rdfStore, onCommit) { + var base = this; + base.container = container; + base.title = options.title; + base.basePath = options.basePath; + base.rdfStore = rdfStore; + base.onCommit = onCommit; + + /** + * Initialization + */ + base.init = function () { + base.mappingTable = $( + "
        \ +

        " + + base.title + + '

        \ +
        \ +
        \ + \ \ - \ - \ - \ - \ - \ + \ + \ + \ + \ + \ \ - \ + \ \ \
        NameSourceTargetEditNameSourceTargetEdit
        \
        \ -
        ").appendTo(container); - base.mappingTableBody = base.mappingTable.find("tbody"); - base.rebuild(); - }; - - /** - * Build table based on store contents - */ - base.rebuild = function() { - base.mappingTableBody.empty(); - /* Add class mappings to the table */ - var classMappingResults = {}; - var classMappingKeys = []; - base.rdfStore - .where("?c a r2r:ClassMapping") - .where("?c r2r:sourcePattern ?sourcePattern") /* "Each mapping must have exactly one source pattern" */ - .each(function () { - var key = $.r2rUtils.formatResource(this.c, base.rdfStore.databank.namespaces); - classMappingResults[key] = this; - classMappingKeys.push(key); - }); - - $(classMappingKeys).sort().each(function(index,key) { - var result = classMappingResults[key]; - var prefixDefinitions = $.r2rUtils.findObjects(base.rdfStore, result.c, "r2r:prefixDefinitions"); - var env = $.r2rQueryEnv(prefixDefinitions); - var targetPatterns = $.r2rUtils.findObjects(base.rdfStore, result.c, "r2r:targetPattern"); - - var classMapping = new $.classMappingRow(base.mappingTableBody, { - uri: result.c, - name: $.r2rUtils.formatResource(result.c, base.rdfStore.databank.namespaces), - source: env.formatPattern([result.sourcePattern], true), - target: env.formatPattern(targetPatterns, true), - onEdit: base.edit - }); - - /* Add related property mappings to the table */ - var propertyMappingResults = {}; - var propertyMappingKeys = []; - base.rdfStore - .where("?p a r2r:PropertyMapping") - .where("?p r2r:mappingRef " + result.c) - .where("?p r2r:sourcePattern ?sourcePattern") /* "Each mapping must have exactly one source pattern" */ - .each(function () { - var key = $.r2rUtils.formatResource(this.p, base.rdfStore.databank.namespaces); - propertyMappingResults[key] = this; - propertyMappingKeys.push(key); - }); - - $(propertyMappingKeys).sort().each(function(index,key) { - var result = propertyMappingResults[key]; - var propertyEnv = env; - var prefixDefinitions = $.r2rUtils.findObjects(base.rdfStore, result.p, "r2r:prefixDefinitions"); - if (prefixDefinitions.length > 0) { - propertyEnv = $.r2rQueryEnv(env.databank.namespaces); - propertyEnv.addPrefixDefinitions(prefixDefinitions); - } - var targetPatterns = $.r2rUtils.findObjects(base.rdfStore, result.p, "r2r:targetPattern"); - var row = new $.propertyMappingRow(base.mappingTableBody, { - uri: result.p, - name: $.r2rUtils.formatResource(result.p, base.rdfStore.databank.namespaces), - source: propertyEnv.formatSourcePattern([result.sourcePattern], targetPatterns), - target: propertyEnv.formatPattern(targetPatterns), - parentClassMapping: classMapping, - onEdit: base.edit - }); - }); +
        ', + ).appendTo(container); + base.mappingTableBody = base.mappingTable.find("tbody"); + base.rebuild(); + }; + + /** + * Build table based on store contents + */ + base.rebuild = function () { + base.mappingTableBody.empty(); + /* Add class mappings to the table */ + var classMappingResults = {}; + var classMappingKeys = []; + base.rdfStore + .where("?c a r2r:ClassMapping") + .where( + "?c r2r:sourcePattern ?sourcePattern", + ) /* "Each mapping must have exactly one source pattern" */ + .each(function () { + var key = $.r2rUtils.formatResource( + this.c, + base.rdfStore.databank.namespaces, + ); + classMappingResults[key] = this; + classMappingKeys.push(key); + }); + + $(classMappingKeys) + .sort() + .each(function (index, key) { + var result = classMappingResults[key]; + var prefixDefinitions = $.r2rUtils.findObjects( + base.rdfStore, + result.c, + "r2r:prefixDefinitions", + ); + var env = $.r2rQueryEnv(prefixDefinitions); + var targetPatterns = $.r2rUtils.findObjects( + base.rdfStore, + result.c, + "r2r:targetPattern", + ); + + var classMapping = new $.classMappingRow(base.mappingTableBody, { + uri: result.c, + name: $.r2rUtils.formatResource( + result.c, + base.rdfStore.databank.namespaces, + ), + source: env.formatPattern([result.sourcePattern], true), + target: env.formatPattern(targetPatterns, true), + onEdit: base.edit, + }); + + /* Add related property mappings to the table */ + var propertyMappingResults = {}; + var propertyMappingKeys = []; + base.rdfStore + .where("?p a r2r:PropertyMapping") + .where("?p r2r:mappingRef " + result.c) + .where( + "?p r2r:sourcePattern ?sourcePattern", + ) /* "Each mapping must have exactly one source pattern" */ + .each(function () { + var key = $.r2rUtils.formatResource( + this.p, + base.rdfStore.databank.namespaces, + ); + propertyMappingResults[key] = this; + propertyMappingKeys.push(key); + }); + + $(propertyMappingKeys) + .sort() + .each(function (index, key) { + var result = propertyMappingResults[key]; + var propertyEnv = env; + var prefixDefinitions = $.r2rUtils.findObjects( + base.rdfStore, + result.p, + "r2r:prefixDefinitions", + ); + if (prefixDefinitions.length > 0) { + propertyEnv = $.r2rQueryEnv(env.databank.namespaces); + propertyEnv.addPrefixDefinitions(prefixDefinitions); + } + var targetPatterns = $.r2rUtils.findObjects( + base.rdfStore, + result.p, + "r2r:targetPattern", + ); + var row = new $.propertyMappingRow(base.mappingTableBody, { + uri: result.p, + name: $.r2rUtils.formatResource( + result.p, + base.rdfStore.databank.namespaces, + ), + source: propertyEnv.formatSourcePattern( + [result.sourcePattern], + targetPatterns, + ), + target: propertyEnv.formatPattern(targetPatterns), + parentClassMapping: classMapping, + onEdit: base.edit, + }); + }); + + new $.addPropertyMappingRow(base.mappingTableBody, { + parentClassMapping: classMapping, + onEdit: base.edit, + }); + }); + + new $.addClassMappingRow(base.mappingTableBody, { + onEdit: base.edit, + }); + }; + + /** + * Edit callback + * @param mapping The URI of the mapping to edit, or null to create a new mapping + * @param parentMapping When creating a new property mapping, specifies the parent class mapping + */ + base.edit = function (mapping, parentMapping) { + base.mappingTable.hide(); + base.editor = $.r2rEditorMappingEditor( + base.container, + base.rdfStore, + mapping, + parentMapping, + base.basePath, + base.onEditComplete, + ); + }; + + /** + * Edit completion + * @param mapping The URI of the mapping that was edited + * @param originalMapping The original URI of the mapping that was edited - this will differ from mapping if the user renamed it + * @param rdfRepresentation An rdfStore containing the RDF representation of the mapping + * @param action One of "save", "remove", "cancel" + */ + base.onEditComplete = function ( + mapping, + originalMapping, + rdfRepresentation, + action, + ) { + if (action != "cancel") { + /* + * Remove all old data + */ + if (originalMapping != null) { + base.rdfStore + .where(originalMapping + " ?p ?o") + .remove(originalMapping + " ?p ?o"); + + if (action == "remove") { + /* + * When removing a class mapping, remove its property mappings + */ + base.rdfStore + .where("?p a r2r:PropertyMapping") + .where("?p r2r:mappingRef " + originalMapping) + .each(function () { + base.rdfStore + .where(this.p + " ?p ?o") + .remove(this.p + " ?p ?o"); + }); + } + } + + if (action == "save") { + /* + * Add new data + */ + // Works, but creates union with distinct namespace definitions: + // base.rdfStore = base.rdfStore.add(rdfRepresentation); + $(rdfRepresentation.databank.tripleStore).each(function (key, value) { + base.rdfStore.add(value); + }); - new $.addPropertyMappingRow(base.mappingTableBody, { - parentClassMapping: classMapping, - onEdit: base.edit - }); - }); + if ( + originalMapping != null && + originalMapping.toString() != mapping.toString() + ) { + /* + * When renaming a class mapping, rename all mappingRefs from property mappings + */ + base.rdfStore + .where("?p a r2r:PropertyMapping") + .where("?p r2r:mappingRef " + originalMapping) + .add("?p r2r:mappingRef " + mapping) + .remove("?p r2r:mappingRef " + originalMapping); + /* Bonus: Also copy the collapse state! */ + var collapsePos = $.inArray( + originalMapping, + $.r2rExpandedClassMappings, + ); + if (collapsePos != -1) { + $.r2rExpandedClassMappings[collapsePos] = mapping; + } + } + } + if (base.onCommit) { + base.onCommit(base.rdfStore); + } + } + base.rebuild(); + base.mappingTable.show(); + }; - new $.addClassMappingRow(base.mappingTableBody, { - onEdit: base.edit - }); - }; - - /** - * Edit callback - * @param mapping The URI of the mapping to edit, or null to create a new mapping - * @param parentMapping When creating a new property mapping, specifies the parent class mapping - */ - base.edit = function(mapping, parentMapping) { - base.mappingTable.hide(); - base.editor = $.r2rEditorMappingEditor(base.container, base.rdfStore, mapping, parentMapping, base.basePath, base.onEditComplete); - }; - - /** - * Edit completion - * @param mapping The URI of the mapping that was edited - * @param originalMapping The original URI of the mapping that was edited - this will differ from mapping if the user renamed it - * @param rdfRepresentation An rdfStore containing the RDF representation of the mapping - * @param action One of "save", "remove", "cancel" - */ - base.onEditComplete = function(mapping, originalMapping, rdfRepresentation, action) { - if (action != "cancel") { - /* - * Remove all old data - */ - if (originalMapping != null) { - base.rdfStore - .where(originalMapping + " ?p ?o") - .remove(originalMapping + " ?p ?o"); + base.remove = function () { + if (base.mappingTable) { + base.mappingTable.remove(); + } + if (base.editor) { + base.editor.remove(); + } + }; - if (action == "remove") { - /* - * When removing a class mapping, remove its property mappings - */ - base.rdfStore - .where("?p a r2r:PropertyMapping") - .where("?p r2r:mappingRef " + originalMapping) - .each(function () { - base.rdfStore - .where(this.p + " ?p ?o") - .remove(this.p + " ?p ?o"); - }); - } - } - - if (action == "save") { - /* - * Add new data - */ - // Works, but creates union with distinct namespace definitions: - // base.rdfStore = base.rdfStore.add(rdfRepresentation); - $(rdfRepresentation.databank.tripleStore).each(function(key, value) { - base.rdfStore.add(value); - }); - - if (originalMapping != null && originalMapping.toString() != mapping.toString()) { - /* - * When renaming a class mapping, rename all mappingRefs from property mappings - */ - base.rdfStore - .where("?p a r2r:PropertyMapping") - .where("?p r2r:mappingRef " + originalMapping) - .add("?p r2r:mappingRef " + mapping) - .remove("?p r2r:mappingRef " + originalMapping); - /* Bonus: Also copy the collapse state! */ - var collapsePos = $.inArray(originalMapping, $.r2rExpandedClassMappings); - if (collapsePos != -1) { - $.r2rExpandedClassMappings[collapsePos] = mapping; - } - } - } - if (base.onCommit) { - base.onCommit(base.rdfStore); - } - } - base.rebuild(); - base.mappingTable.show(); - }; - - base.remove = function() { - if (base.mappingTable) { - base.mappingTable.remove(); - } - if (base.editor) { - base.editor.remove(); - } - }; - - base.init(); - return base; - }; -})(jQuery); \ No newline at end of file + base.init(); + return base; + }; +})(jQuery); diff --git a/r2redit/src/js/r2redit.ui.js b/r2redit/src/js/r2redit.ui.js index a087f1c..c94e836 100644 --- a/r2redit/src/js/r2redit.ui.js +++ b/r2redit/src/js/r2redit.ui.js @@ -17,90 +17,105 @@ * @fileOverview Generic R2R utility methods * @author Christian Becker */ -(function($){ - - /** - * Generic R2R UI methods - */ - $.r2rUI = {}; +(function ($) { + /** + * Generic R2R UI methods + */ + $.r2rUI = {}; - $.r2rUI.showError = function(title, message) { - var dialog = $("
        \ -
        \ + $.r2rUI.showError = function (title, message) { + var dialog = $( + '
        \ +
        \

        \ - \ - " + message + "\ + \ + ' + + message + + "\

        \
        \ -
        "); - dialog.dialog({ - autoOpen: true, - height: 150, - width: 300, - modal: true, - buttons: { - "Ok": function() { - $(this).dialog("close"); - } - } - }); - $.r2rUI.fixJQueryUIDialogButtons(dialog); - }; - - $.r2rUI.showProgress = function(message) { - if (message == null) { - message = "Loading..."; - } - $.r2rUI.progressDialog = $("
        ") - .attr("title", message) - .append($("
        ") - .addClass("r2redit-dialog-loading-image") - ); - $.r2rUI.progressDialog.dialog({dialogClass: "r2redit-dialog-loading", width: 250, height: 65, resizable: false, modal: true, closeOnEscape: false, buttons: {}}); - } - - $.r2rUI.hideProgress = function() { - $.r2rUI.progressDialog.dialog("close"); - } - - /* - * Workaround: jQuery UI doesn't put the button text inside the ui-button-text span, - * but in the attribute "text" of the encompassing button element - */ - $.r2rUI.fixJQueryUIDialogButtons = function(dialog) { - dialog.dialog("widget").find(".ui-dialog-buttonpane .ui-button").each(function(key, value) { - var span = $(value).find(".ui-button-text"); - if ($(span).text() == "") { - $(span).text($(value).attr("text")); - } - }); - } - +
        ", + ); + dialog.dialog({ + autoOpen: true, + height: 150, + width: 300, + modal: true, + buttons: { + Ok: function () { + $(this).dialog("close"); + }, + }, + }); + $.r2rUI.fixJQueryUIDialogButtons(dialog); + }; + + $.r2rUI.showProgress = function (message) { + if (message == null) { + message = "Loading..."; + } + $.r2rUI.progressDialog = $("
        ") + .attr("title", message) + .append($("
        ").addClass("r2redit-dialog-loading-image")); + $.r2rUI.progressDialog.dialog({ + dialogClass: "r2redit-dialog-loading", + width: 250, + height: 65, + resizable: false, + modal: true, + closeOnEscape: false, + buttons: {}, + }); + }; + + $.r2rUI.hideProgress = function () { + $.r2rUI.progressDialog.dialog("close"); + }; + + /* + * Workaround: jQuery UI doesn't put the button text inside the ui-button-text span, + * but in the attribute "text" of the encompassing button element + */ + $.r2rUI.fixJQueryUIDialogButtons = function (dialog) { + dialog + .dialog("widget") + .find(".ui-dialog-buttonpane .ui-button") + .each(function (key, value) { + var span = $(value).find(".ui-button-text"); + if ($(span).text() == "") { + $(span).text($(value).attr("text")); + } + }); + }; })(jQuery); /* Source: http://stackoverflow.com/questions/946534/insert-text-into-textarea-with-jquery */ jQuery.fn.extend({ -insertAtCaret: function(myValue){ - return this.each(function(i) { - if (document.selection) { - this.focus(); - sel = document.selection.createRange(); - sel.text = myValue; - this.focus(); - } - else if (this.selectionStart || this.selectionStart == '0') { - var startPos = this.selectionStart; - var endPos = this.selectionEnd; - var scrollTop = this.scrollTop; - this.value = this.value.substring(0, startPos)+myValue+this.value.substring(endPos,this.value.length); - this.focus(); - this.selectionStart = startPos + myValue.length; - this.selectionEnd = startPos + myValue.length; - this.scrollTop = scrollTop; - } else { - this.value += myValue; - this.focus(); - } - }) -} -}); \ No newline at end of file + insertAtCaret: function (myValue) { + return this.each(function (i) { + if (document.selection) { + this.focus(); + sel = document.selection.createRange(); + sel.text = myValue; + this.focus(); + } else if (this.selectionStart || this.selectionStart == "0") { + var startPos = this.selectionStart; + var endPos = this.selectionEnd; + var scrollTop = this.scrollTop; + this.value = + this.value.substring(0, startPos) + + myValue + + this.value.substring(endPos, this.value.length); + this.focus(); + this.selectionStart = startPos + myValue.length; + this.selectionEnd = startPos + myValue.length; + this.scrollTop = scrollTop; + } else { + this.value += myValue; + this.focus(); + } + }); + }, +}); diff --git a/r2redit/src/js/r2redit.util.js b/r2redit/src/js/r2redit.util.js index 5c6b0cd..64b8cbb 100644 --- a/r2redit/src/js/r2redit.util.js +++ b/r2redit/src/js/r2redit.util.js @@ -17,127 +17,128 @@ * @fileOverview Generic R2R utility methods * @author Christian Becker */ -(function($){ - - /** - * Generic R2R utility methods - */ - $.r2rUtils = { - /** - * In R2R, mappings are executed with these prefixes are already set - * These are these PrefixMapping.Standard prefixes plus R2R - */ - builtInPrefixes: { - rdfs: "http://www.w3.org/2000/01/rdf-schema#", - rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - dc: "http://purl.org/dc/terms/", - daml: "http://www.daml.org/2001/03/daml+oil#", - owl: "http://www.w3.org/2002/07/owl#", - xsd: "http://www.w3.org/2001/XMLSchema#", - r2r: "http://www4.wiwiss.fu-berlin.de/bizer/r2r/" - }, - /** - * Tries to output a resource in prefix notation - * @param resource - * @return string - */ - formatResource: function(resource, namespaces) { - try { - return $.createCurie(resource.value, { namespaces: namespaces }); - } catch (g) { - return resource.value; - } - }, - formatPattern: function(pattern, namespaces) { - return (pattern === undefined ? '' : pattern.value).replace("?SUBJ a ", "").replace("?SUBJ ", ""); - }, - /** - * Apply built-in prefixes so that mappings depending on them can be parsed correctly. - * If a prefix is already defined as something else, rdfQuery will expand the - * respective URIs to their correct value before replacing the prefix. - */ - initPrefixes: function(rdf) { - $.each($.r2rUtils.builtInPrefixes, function(prefix, namespace) { - rdf.prefix(prefix, namespace); - }); - }, - basePrefixStore: function() { - var store = $.rdf(); - $.r2rUtils.initPrefixes(store); - return store; - }, - /** - * Removes type coercion syntax to simplify working with a variable - * - * Sample input: - * ?'id'^^xsd:int - * Sample output: - * ?id - */ - cleanVariable: function(variable) { - var matches = variable.match(/\?'([^']+)'/); - return (matches ? "?" + matches[1] : variable); - }, - /** - * Find all objects for a given subject and property - */ - findObjects: function(rdf, subject, property) { - var results = []; - rdf.where(subject + " " + property + " ?o").each(function(){ - if (this.o !== undefined) { - results.push(this.o); - } - }); - return results; - }, - /** - * Loads an RDF/XML or TTL document into a rdfQuery object initialized with the built-in r2r prefixes - * @param rdfSource RDF/XML source code - * @return rdfQuery object - */ - loadRDF: function(rdfSource) { - var rdf = $.rdf().load(rdfSource, {}); - $.r2rUtils.initPrefixes(rdf); - return rdf; - }, - /** - * Parses R2R prefix definitions into JavaScript objects - * @param prefixDefinitions string value - * - * Example input: - * "smwcat: . - * smwprop: ." - * Example output: - * {smwcat: "http://mywiki/resource/category/", - * smwprop: "http://mywiki/resource/property/"}" - */ - parsePrefixDefinitions: function(prefixDefinitions) { - var resultObj = {}; - if (prefixDefinitions === undefined) { - return; - } - - var matches = prefixDefinitions.match(/([^:]+):.*?<([^>]+)>\s?\.?\s*/g); - if (matches) { - $(matches).each(function(key, val) { - var result = val.match(/([^:]+):.*?<([^>]+)>\s?\.?\s*/); - resultObj[result[1]] = result[2]; - }); - } - return resultObj; - }, - /** - * Creates an R2R prefix definition from a JavaScript object (inverse of parsePrefixDefinitions) - */ - constructPrefixDefinitions: function (obj) { - var prefixDefinitions = ""; - $.each(obj, function(key, value) { - prefixDefinitions += key + ": <" + value + "> .\n"; - }); - return prefixDefinitions; - }, - createStringLiteral: function(str) { - return $.rdf.literal('"' + str.replace(/"/g, '\\"') + '"'); - } - }; -})(jQuery); \ No newline at end of file +(function ($) { + /** + * Generic R2R utility methods + */ + $.r2rUtils = { + /** + * In R2R, mappings are executed with these prefixes are already set + * These are these PrefixMapping.Standard prefixes plus R2R + */ + builtInPrefixes: { + rdfs: "http://www.w3.org/2000/01/rdf-schema#", + rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + dc: "http://purl.org/dc/terms/", + daml: "http://www.daml.org/2001/03/daml+oil#", + owl: "http://www.w3.org/2002/07/owl#", + xsd: "http://www.w3.org/2001/XMLSchema#", + r2r: "http://www4.wiwiss.fu-berlin.de/bizer/r2r/", + }, + /** + * Tries to output a resource in prefix notation + * @param resource + * @return string + */ + formatResource: function (resource, namespaces) { + try { + return $.createCurie(resource.value, { namespaces: namespaces }); + } catch (g) { + return resource.value; + } + }, + formatPattern: function (pattern, namespaces) { + return (pattern === undefined ? "" : pattern.value) + .replace("?SUBJ a ", "") + .replace("?SUBJ ", ""); + }, + /** + * Apply built-in prefixes so that mappings depending on them can be parsed correctly. + * If a prefix is already defined as something else, rdfQuery will expand the + * respective URIs to their correct value before replacing the prefix. + */ + initPrefixes: function (rdf) { + $.each($.r2rUtils.builtInPrefixes, function (prefix, namespace) { + rdf.prefix(prefix, namespace); + }); + }, + basePrefixStore: function () { + var store = $.rdf(); + $.r2rUtils.initPrefixes(store); + return store; + }, + /** + * Removes type coercion syntax to simplify working with a variable + * + * Sample input: + * ?'id'^^xsd:int + * Sample output: + * ?id + */ + cleanVariable: function (variable) { + var matches = variable.match(/\?'([^']+)'/); + return matches ? "?" + matches[1] : variable; + }, + /** + * Find all objects for a given subject and property + */ + findObjects: function (rdf, subject, property) { + var results = []; + rdf.where(subject + " " + property + " ?o").each(function () { + if (this.o !== undefined) { + results.push(this.o); + } + }); + return results; + }, + /** + * Loads an RDF/XML or TTL document into a rdfQuery object initialized with the built-in r2r prefixes + * @param rdfSource RDF/XML source code + * @return rdfQuery object + */ + loadRDF: function (rdfSource) { + var rdf = $.rdf().load(rdfSource, {}); + $.r2rUtils.initPrefixes(rdf); + return rdf; + }, + /** + * Parses R2R prefix definitions into JavaScript objects + * @param prefixDefinitions string value + * + * Example input: + * "smwcat: . + * smwprop: ." + * Example output: + * {smwcat: "http://mywiki/resource/category/", + * smwprop: "http://mywiki/resource/property/"}" + */ + parsePrefixDefinitions: function (prefixDefinitions) { + var resultObj = {}; + if (prefixDefinitions === undefined) { + return; + } + + var matches = prefixDefinitions.match(/([^:]+):.*?<([^>]+)>\s?\.?\s*/g); + if (matches) { + $(matches).each(function (key, val) { + var result = val.match(/([^:]+):.*?<([^>]+)>\s?\.?\s*/); + resultObj[result[1]] = result[2]; + }); + } + return resultObj; + }, + /** + * Creates an R2R prefix definition from a JavaScript object (inverse of parsePrefixDefinitions) + */ + constructPrefixDefinitions: function (obj) { + var prefixDefinitions = ""; + $.each(obj, function (key, value) { + prefixDefinitions += key + ": <" + value + "> .\n"; + }); + return prefixDefinitions; + }, + createStringLiteral: function (str) { + return $.rdf.literal('"' + str.replace(/"/g, '\\"') + '"'); + }, + }; +})(jQuery); diff --git a/r2redit/src/json/transformations.json b/r2redit/src/json/transformations.json index c24e507..690a5a6 100644 --- a/r2redit/src/json/transformations.json +++ b/r2redit/src/json/transformations.json @@ -1,244 +1,259 @@ { - "String functions": { - "join": { - "arguments": "infix, arg1, arg2, ..., argN", - "description": "Concatenates arg1 to argN with the infix string given by the first argument", - "returnsList": false - }, - "concat": { - "arguments": "arg1, arg2, ..., argN", - "description": "Returns a string of the concatenated argument values", - "returnsList": false - }, - "split": { - "arguments": "regex, stringarg", - "description": "Split the second argument at places matching the regex", - "returnsList": true - }, - "listJoin": { - "arguments": "infix, list", - "description": "Concatenates the values of the list argument with infix inserted inbetween", - "returnsList": false - }, - "regexToList": { - "arguments": "regex, stringarg", - "description": "Returns a list of strings as specified by the regex", - "returnsList": true - }, - "replaceAll": { - "arguments": "thisRegex, withThatString, inThisString", - "description": "Replaces all matches of the regex with a string", - "returnsList": false - } - }, - "Arithmetic functions": { - "add": { - "arguments": "arg1, arg2, ..., argN", - "shortForm": "+", - "description": "Add arg1 to argN", - "returnsList": false - }, - "subtract": { - "arguments": "arg1, arg2, ..., argN", - "shortForm": "-", - "description": "Subtract arg2 to argN from arg1", - "returnsList": false - }, "multiply": { - "arguments": "arg1, arg2, ..., argN", - "shortForm": "*", - "description": "Multiply arg1 to argN", - "returnsList": false - }, - "divide": { - "arguments": "arg1, arg2", - "shortForm": "/", - "description": "Divide arg1 by arg2", - "returnsList": false - }, - "integer": { - "arguments": "arg", - "description": "Convert argument to integer value by taking only the integer number part", - "returnsList": false - }, - "mod": { - "arguments": "arg1, arg2", - "description": "returns: arg1 modulo arg2", - "returnsList": false - } - }, - "List functions": { - "list": { - "arguments": "arg1, arg2, ..., argN", - "description": "Create a list out of the arguments", - "returnsList": true - }, - "sublist": { - "arguments": "listarg, from, to", - "description": "Returns a sub list of the given list argument from index \"from\" to index \"to\" (exclusive)", - "returnsList": true - }, "subListByIndex": { - "arguments": "listarg, i1, i2, ..., iN", - "description": "Build a list from the given list, but with elements picked as specified by the index arguments", - "returnsList": true - }, "listConcat": { - "arguments": "listArg1, listArg2, ..., listArg3", - "description": "Concatenate the list arguments to one list", - "returnsList": true - }, "getByIndex" : { - "arguments": "listArg, index", - "description": "Get the value at the index of the list argument", - "returnsList": false - }, - "_length": { - "arguments": "arg", - "description": "Returns the number of elements in the list. For atomar values this will be 1", - "returnsList": false - } - }, - "XPath functions": { - "xpath_abs": { - "arguments": "x", - "description": "Returns the absolute value of the argument.", - "returnsList": false - }, - "xpath_ceiling": { - "arguments": "x", - "description": "Returns the smallest number with no fractional part that is greater than or equal to the argument.", - "returnsList": false - }, - "xpath_floor": { - "arguments": "x", - "description": "Returns the largest number with no fractional part that is less than or equal to the argument.", - "returnsList": false - }, - "xpath_round": { - "arguments": "x", - "description": "Rounds to the nearest number with no fractional part.", - "returnsList": false - }, - "xpath_round_half_to_even": { - "arguments": "x", - "description": "Takes a number and a precision and returns a number rounded to the given precision. If the fractional part is exactly half, the result is the number whose least significant digit is even.", - "returnsList": false - }, - "xpath_codepoints_to_string": { - "arguments": "cp1, ...", - "description": "Creates an xs:string from a sequence of Unicode code points.", - "returnsList": false - }, - "xpath_string_to_codepoints": { - "arguments": "str", - "description": "Returns the sequence of Unicode code points that constitute an xs:string.", - "returnsList": true - }, - "xpath_compare": { - "arguments": ["s1, s2", "s1, s2, collation"], - "description": "Returns -1, 0, or 1, depending on whether the value of the first argument is respectively less than, equal to, or greater than the value of the second argument, according to the rules of the collation that is used.", - "returnsList": false - }, - "xpath_codepoint_equal": { - "arguments": "s1, s2", - "description": "Returns true if the two arguments are equal using the Unicode code point collation.", - "returnsList": false - }, - "xpath_concat": { - "arguments": "s1, ...", - "description": "Concatenates two or more arguments to a string.", - "returnsList": false - }, - "xpath_string_join": { - "arguments": ["(s1, ...)", "(s1, ...), separator"], - "description": "Returns the string produced by concatenating a sequence of strings using an optional separator.", - "returnsList": false - }, - "xpath_substring": { - "arguments": ["s, start", "s, start, length"], - "description": "Returns the string located at a specified place within an argument string.", - "returnsList": false - }, - "xpath_string_length": { - "arguments": "s", - "description": "Returns the length of the argument.", - "returnsList": false - }, - "xpath_normalize_space": { - "arguments": "s", - "description": "Returns the whitespace-normalized value of the argument.", - "returnsList": false - }, - "xpath_normalize_unicode": { - "arguments": ["s", "s, norm"], - "description": "Returns the normalized value of the first argument in the normalization form specified by the second (optional) argument.", - "note": "Implemented normalization forms are NFC (default), NFD, NFKC and NFKD.", - "returnsList": false - }, - "xpath_upper_case": { - "arguments": "s", - "description": "Returns the upper-cased value of the argument.", - "returnsList": false - }, - "xpath_lower_case": { - "arguments": "s", - "description": "Returns the lower-cased value of the argument.", - "returnsList": false - }, - "xpath_translate": { - "arguments": "s, map, trans", - "description": "Returns the first string argument with occurrences of characters contained in the second argument replaced by the character at the corresponding position in the third argument.", - "returnsList": false - }, - "xpath_encode_for_uri": { - "arguments": "s", - "description": "Returns the string argument with certain characters escaped to enable the resulting string to be used as a path segment in a URI.", - "returnsList": false - }, - "xpath_iri_to_uri": { - "arguments": "s", - "description": "Returns the string argument with certain characters escaped to enable the resulting string to be used as (part of) a URI.", - "returnsList": false - }, "xpath_escape_html_uri": { - "arguments": "s", - "description": "Returns the string argument with certain characters escaped in the manner that html user agents handle attribute values that expect URIs.", - "note": "This is not working correctly to the specification. Try to avoid the function.", - "returnsList": false - }, - "xpath_contains": { - "arguments": "s, c", - "description": "Indicates whether one string contains another string.", - "note": "Other than in the XPath function, a collation must not be specified.", - "returnsList": false - }, "xpath_starts_with": { - "arguments": "s, c", - "description": "Indicates whether the value of one string begins with another string.", - "note": "Other than in the XPath function, a collation must not be specified.", "returnsList": false - }, "xpath_ends_with": { - "arguments": "s, c", - "description": "Indicates whether the value of one string ends with another string.", - "note": "Other than in the XPath function, a collation must not be specified.", "returnsList": false - }, "xpath_substring_before": { - "arguments": "s, c", - "description": "Returns the string that precedes in that string another string.", - "note": "Other than in the XPath function, a collation must not be specified.", - "returnsList": false - }, - "xpath_substring_after": { - "arguments": "s, c", - "description": "Returns the string that follow in that string another string.", - "note": "Other than in the XPath function, a collation must not be specified.", "returnsList": false - }, - "xpath_matches": { - "arguments": "s, pattern", - "description": "Returns an boolean value that indicates whether the value of the first argument is matched by the regular expression that is the value of the second argument.", - "note": "There may be differences to the XPath regular expression syntax. If in doubt, consult the Java regex syntax.", "returnsList": false - }, "xpath_replace": { - "arguments": "s, pattern, replacement", - "description": "Returns the value of the first argument with every substring matched by the regular expression that is the value of the second argument replaced by the replacement string that is the value of the third argument.", - "note": "There may be differences to the XPath regular expression syntax. If in doubt, consult the Java regex syntax.", "returnsList": false - }, "xpath_tokenize": { - "arguments": "s, pattern", - "description": "Returns a sequence of one or more strings whose values are substrings of the value of the first argument separated by substrings that match the regular expression that is the value of the second argument.", - "note": "There may be differences to the XPath regular expression syntax. If in doubt, consult the Java regex syntax.", - "returnsList": true - } - } -} \ No newline at end of file + "String functions": { + "join": { + "arguments": "infix, arg1, arg2, ..., argN", + "description": "Concatenates arg1 to argN with the infix string given by the first argument", + "returnsList": false + }, + "concat": { + "arguments": "arg1, arg2, ..., argN", + "description": "Returns a string of the concatenated argument values", + "returnsList": false + }, + "split": { + "arguments": "regex, stringarg", + "description": "Split the second argument at places matching the regex", + "returnsList": true + }, + "listJoin": { + "arguments": "infix, list", + "description": "Concatenates the values of the list argument with infix inserted inbetween", + "returnsList": false + }, + "regexToList": { + "arguments": "regex, stringarg", + "description": "Returns a list of strings as specified by the regex", + "returnsList": true + }, + "replaceAll": { + "arguments": "thisRegex, withThatString, inThisString", + "description": "Replaces all matches of the regex with a string", + "returnsList": false + } + }, + "Arithmetic functions": { + "add": { + "arguments": "arg1, arg2, ..., argN", + "shortForm": "+", + "description": "Add arg1 to argN", + "returnsList": false + }, + "subtract": { + "arguments": "arg1, arg2, ..., argN", + "shortForm": "-", + "description": "Subtract arg2 to argN from arg1", + "returnsList": false + }, + "multiply": { + "arguments": "arg1, arg2, ..., argN", + "shortForm": "*", + "description": "Multiply arg1 to argN", + "returnsList": false + }, + "divide": { + "arguments": "arg1, arg2", + "shortForm": "/", + "description": "Divide arg1 by arg2", + "returnsList": false + }, + "integer": { + "arguments": "arg", + "description": "Convert argument to integer value by taking only the integer number part", + "returnsList": false + }, + "mod": { + "arguments": "arg1, arg2", + "description": "returns: arg1 modulo arg2", + "returnsList": false + } + }, + "List functions": { + "list": { + "arguments": "arg1, arg2, ..., argN", + "description": "Create a list out of the arguments", + "returnsList": true + }, + "sublist": { + "arguments": "listarg, from, to", + "description": "Returns a sub list of the given list argument from index \"from\" to index \"to\" (exclusive)", + "returnsList": true + }, + "subListByIndex": { + "arguments": "listarg, i1, i2, ..., iN", + "description": "Build a list from the given list, but with elements picked as specified by the index arguments", + "returnsList": true + }, + "listConcat": { + "arguments": "listArg1, listArg2, ..., listArg3", + "description": "Concatenate the list arguments to one list", + "returnsList": true + }, + "getByIndex": { + "arguments": "listArg, index", + "description": "Get the value at the index of the list argument", + "returnsList": false + }, + "_length": { + "arguments": "arg", + "description": "Returns the number of elements in the list. For atomar values this will be 1", + "returnsList": false + } + }, + "XPath functions": { + "xpath_abs": { + "arguments": "x", + "description": "Returns the absolute value of the argument.", + "returnsList": false + }, + "xpath_ceiling": { + "arguments": "x", + "description": "Returns the smallest number with no fractional part that is greater than or equal to the argument.", + "returnsList": false + }, + "xpath_floor": { + "arguments": "x", + "description": "Returns the largest number with no fractional part that is less than or equal to the argument.", + "returnsList": false + }, + "xpath_round": { + "arguments": "x", + "description": "Rounds to the nearest number with no fractional part.", + "returnsList": false + }, + "xpath_round_half_to_even": { + "arguments": "x", + "description": "Takes a number and a precision and returns a number rounded to the given precision. If the fractional part is exactly half, the result is the number whose least significant digit is even.", + "returnsList": false + }, + "xpath_codepoints_to_string": { + "arguments": "cp1, ...", + "description": "Creates an xs:string from a sequence of Unicode code points.", + "returnsList": false + }, + "xpath_string_to_codepoints": { + "arguments": "str", + "description": "Returns the sequence of Unicode code points that constitute an xs:string.", + "returnsList": true + }, + "xpath_compare": { + "arguments": ["s1, s2", "s1, s2, collation"], + "description": "Returns -1, 0, or 1, depending on whether the value of the first argument is respectively less than, equal to, or greater than the value of the second argument, according to the rules of the collation that is used.", + "returnsList": false + }, + "xpath_codepoint_equal": { + "arguments": "s1, s2", + "description": "Returns true if the two arguments are equal using the Unicode code point collation.", + "returnsList": false + }, + "xpath_concat": { + "arguments": "s1, ...", + "description": "Concatenates two or more arguments to a string.", + "returnsList": false + }, + "xpath_string_join": { + "arguments": ["(s1, ...)", "(s1, ...), separator"], + "description": "Returns the string produced by concatenating a sequence of strings using an optional separator.", + "returnsList": false + }, + "xpath_substring": { + "arguments": ["s, start", "s, start, length"], + "description": "Returns the string located at a specified place within an argument string.", + "returnsList": false + }, + "xpath_string_length": { + "arguments": "s", + "description": "Returns the length of the argument.", + "returnsList": false + }, + "xpath_normalize_space": { + "arguments": "s", + "description": "Returns the whitespace-normalized value of the argument.", + "returnsList": false + }, + "xpath_normalize_unicode": { + "arguments": ["s", "s, norm"], + "description": "Returns the normalized value of the first argument in the normalization form specified by the second (optional) argument.", + "note": "Implemented normalization forms are NFC (default), NFD, NFKC and NFKD.", + "returnsList": false + }, + "xpath_upper_case": { + "arguments": "s", + "description": "Returns the upper-cased value of the argument.", + "returnsList": false + }, + "xpath_lower_case": { + "arguments": "s", + "description": "Returns the lower-cased value of the argument.", + "returnsList": false + }, + "xpath_translate": { + "arguments": "s, map, trans", + "description": "Returns the first string argument with occurrences of characters contained in the second argument replaced by the character at the corresponding position in the third argument.", + "returnsList": false + }, + "xpath_encode_for_uri": { + "arguments": "s", + "description": "Returns the string argument with certain characters escaped to enable the resulting string to be used as a path segment in a URI.", + "returnsList": false + }, + "xpath_iri_to_uri": { + "arguments": "s", + "description": "Returns the string argument with certain characters escaped to enable the resulting string to be used as (part of) a URI.", + "returnsList": false + }, + "xpath_escape_html_uri": { + "arguments": "s", + "description": "Returns the string argument with certain characters escaped in the manner that html user agents handle attribute values that expect URIs.", + "note": "This is not working correctly to the specification. Try to avoid the function.", + "returnsList": false + }, + "xpath_contains": { + "arguments": "s, c", + "description": "Indicates whether one string contains another string.", + "note": "Other than in the XPath function, a collation must not be specified.", + "returnsList": false + }, + "xpath_starts_with": { + "arguments": "s, c", + "description": "Indicates whether the value of one string begins with another string.", + "note": "Other than in the XPath function, a collation must not be specified.", + "returnsList": false + }, + "xpath_ends_with": { + "arguments": "s, c", + "description": "Indicates whether the value of one string ends with another string.", + "note": "Other than in the XPath function, a collation must not be specified.", + "returnsList": false + }, + "xpath_substring_before": { + "arguments": "s, c", + "description": "Returns the string that precedes in that string another string.", + "note": "Other than in the XPath function, a collation must not be specified.", + "returnsList": false + }, + "xpath_substring_after": { + "arguments": "s, c", + "description": "Returns the string that follow in that string another string.", + "note": "Other than in the XPath function, a collation must not be specified.", + "returnsList": false + }, + "xpath_matches": { + "arguments": "s, pattern", + "description": "Returns an boolean value that indicates whether the value of the first argument is matched by the regular expression that is the value of the second argument.", + "note": "There may be differences to the XPath regular expression syntax. If in doubt, consult the Java regex syntax.", + "returnsList": false + }, + "xpath_replace": { + "arguments": "s, pattern, replacement", + "description": "Returns the value of the first argument with every substring matched by the regular expression that is the value of the second argument replaced by the replacement string that is the value of the third argument.", + "note": "There may be differences to the XPath regular expression syntax. If in doubt, consult the Java regex syntax.", + "returnsList": false + }, + "xpath_tokenize": { + "arguments": "s, pattern", + "description": "Returns a sequence of one or more strings whose values are substrings of the value of the first argument separated by substrings that match the regular expression that is the value of the second argument.", + "note": "There may be differences to the XPath regular expression syntax. If in doubt, consult the Java regex syntax.", + "returnsList": true + } + } +} diff --git a/r2redit/src/lib/jquery-ui-1.8.11.custom.min.js b/r2redit/src/lib/jquery-ui-1.8.11.custom.min.js index f8709e0..3fb9b6b 100755 --- a/r2redit/src/lib/jquery-ui-1.8.11.custom.min.js +++ b/r2redit/src/lib/jquery-ui-1.8.11.custom.min.js @@ -7,15 +7,240 @@ * * http://docs.jquery.com/UI */ -(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.11",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106, -NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this, -"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position"); -if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f, -"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h, -d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}}); -c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a= 0) && c(a).is(":focusable"); + }, + }); + c(function () { + var a = document.body, + b = a.appendChild((b = document.createElement("div"))); + c.extend(b.style, { + minHeight: "100px", + height: "auto", + padding: 0, + borderWidth: 0, + }); + c.support.minHeight = b.offsetHeight === 100; + c.support.selectstart = "onselectstart" in b; + a.removeChild(b).style.display = "none"; + }); + c.extend(c.ui, { + plugin: { + add: function (a, b, d) { + a = c.ui[a].prototype; + for (var e in d) { + a.plugins[e] = a.plugins[e] || []; + a.plugins[e].push([b, d[e]]); + } + }, + call: function (a, b, d) { + if ((b = a.plugins[b]) && a.element[0].parentNode) + for (var e = 0; e < b.length; e++) + a.options[b[e][0]] && b[e][1].apply(a.element, d); + }, + }, + contains: function (a, b) { + return document.compareDocumentPosition + ? a.compareDocumentPosition(b) & 16 + : a !== b && a.contains(b); + }, + hasScroll: function (a, b) { + if (c(a).css("overflow") === "hidden") return false; + b = b && b === "left" ? "scrollLeft" : "scrollTop"; + var d = false; + if (a[b] > 0) return true; + a[b] = 1; + d = a[b] > 0; + a[b] = 0; + return d; + }, + isOverAxis: function (a, b, d) { + return a > b && a < b + d; + }, + isOver: function (a, b, d, e, h, i) { + return c.ui.isOverAxis(a, d, h) && c.ui.isOverAxis(b, e, i); + }, + }); + } +})(jQuery); /*! * jQuery UI Widget 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -24,13 +249,178 @@ b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocum * * http://docs.jquery.com/UI/Widget */ -(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h, -a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h; -e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options, -this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")}, -widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this}, -enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery); -;/*! +(function (b, j) { + if (b.cleanData) { + var k = b.cleanData; + b.cleanData = function (a) { + for (var c = 0, d; (d = a[c]) != null; c++) b(d).triggerHandler("remove"); + k(a); + }; + } else { + var l = b.fn.remove; + b.fn.remove = function (a, c) { + return this.each(function () { + if (!c) + if (!a || b.filter(a, [this]).length) + b("*", this) + .add([this]) + .each(function () { + b(this).triggerHandler("remove"); + }); + return l.call(b(this), a, c); + }); + }; + } + b.widget = function (a, c, d) { + var e = a.split(".")[0], + f; + a = a.split(".")[1]; + f = e + "-" + a; + if (!d) { + d = c; + c = b.Widget; + } + b.expr[":"][f] = function (h) { + return !!b.data(h, a); + }; + b[e] = b[e] || {}; + b[e][a] = function (h, g) { + arguments.length && this._createWidget(h, g); + }; + c = new c(); + c.options = b.extend(true, {}, c.options); + b[e][a].prototype = b.extend( + true, + c, + { + namespace: e, + widgetName: a, + widgetEventPrefix: b[e][a].prototype.widgetEventPrefix || a, + widgetBaseClass: f, + }, + d, + ); + b.widget.bridge(a, b[e][a]); + }; + b.widget.bridge = function (a, c) { + b.fn[a] = function (d) { + var e = typeof d === "string", + f = Array.prototype.slice.call(arguments, 1), + h = this; + d = !e && f.length ? b.extend.apply(null, [true, d].concat(f)) : d; + if (e && d.charAt(0) === "_") return h; + e + ? this.each(function () { + var g = b.data(this, a), + i = g && b.isFunction(g[d]) ? g[d].apply(g, f) : g; + if (i !== g && i !== j) { + h = i; + return false; + } + }) + : this.each(function () { + var g = b.data(this, a); + g ? g.option(d || {})._init() : b.data(this, a, new c(d, this)); + }); + return h; + }; + }; + b.Widget = function (a, c) { + arguments.length && this._createWidget(a, c); + }; + b.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + options: { disabled: false }, + _createWidget: function (a, c) { + b.data(c, this.widgetName, this); + this.element = b(c); + this.options = b.extend( + true, + {}, + this.options, + this._getCreateOptions(), + a, + ); + var d = this; + this.element.bind("remove." + this.widgetName, function () { + d.destroy(); + }); + this._create(); + this._trigger("create"); + this._init(); + }, + _getCreateOptions: function () { + return b.metadata && b.metadata.get(this.element[0])[this.widgetName]; + }, + _create: function () {}, + _init: function () {}, + destroy: function () { + this.element.unbind("." + this.widgetName).removeData(this.widgetName); + this.widget() + .unbind("." + this.widgetName) + .removeAttr("aria-disabled") + .removeClass(this.widgetBaseClass + "-disabled ui-state-disabled"); + }, + widget: function () { + return this.element; + }, + option: function (a, c) { + var d = a; + if (arguments.length === 0) return b.extend({}, this.options); + if (typeof a === "string") { + if (c === j) return this.options[a]; + d = {}; + d[a] = c; + } + this._setOptions(d); + return this; + }, + _setOptions: function (a) { + var c = this; + b.each(a, function (d, e) { + c._setOption(d, e); + }); + return this; + }, + _setOption: function (a, c) { + this.options[a] = c; + if (a === "disabled") + this.widget() + [c ? "addClass" : "removeClass"]( + this.widgetBaseClass + "-disabled ui-state-disabled", + ) + .attr("aria-disabled", c); + return this; + }, + enable: function () { + return this._setOption("disabled", false); + }, + disable: function () { + return this._setOption("disabled", true); + }, + _trigger: function (a, c, d) { + var e = this.options[a]; + c = b.Event(c); + c.type = ( + a === this.widgetEventPrefix ? a : this.widgetEventPrefix + a + ).toLowerCase(); + d = d || {}; + if (c.originalEvent) { + a = b.event.props.length; + for (var f; a; ) { + f = b.event.props[--a]; + c[f] = c.originalEvent[f]; + } + } + this.element.trigger(c, d); + return !( + (b.isFunction(e) && e.call(this.element[0], c, d) === false) || + c.isDefaultPrevented() + ); + }, + }; +})(jQuery); /*! * jQuery UI Mouse 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -42,12 +432,112 @@ enable:function(){return this._setOption("disabled",false)},disable:function(){r * Depends: * jquery.ui.widget.js */ -(function(b){b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent= -a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,e=a.which==1,f=typeof this.options.cancel=="string"?b(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted= -this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(d){return c._mouseMove(d)};this._mouseUpDelegate=function(d){return c._mouseUp(d)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled= -true}},_mouseMove:function(a){if(b.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate); -if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); -;/* +(function (b) { + b.widget("ui.mouse", { + options: { cancel: ":input,option", distance: 1, delay: 0 }, + _mouseInit: function () { + var a = this; + this.element + .bind("mousedown." + this.widgetName, function (c) { + return a._mouseDown(c); + }) + .bind("click." + this.widgetName, function (c) { + if (true === b.data(c.target, a.widgetName + ".preventClickEvent")) { + b.removeData(c.target, a.widgetName + ".preventClickEvent"); + c.stopImmediatePropagation(); + return false; + } + }); + this.started = false; + }, + _mouseDestroy: function () { + this.element.unbind("." + this.widgetName); + }, + _mouseDown: function (a) { + a.originalEvent = a.originalEvent || {}; + if (!a.originalEvent.mouseHandled) { + this._mouseStarted && this._mouseUp(a); + this._mouseDownEvent = a; + var c = this, + e = a.which == 1, + f = + typeof this.options.cancel == "string" + ? b(a.target).parents().add(a.target).filter(this.options.cancel) + .length + : false; + if (!e || f || !this._mouseCapture(a)) return true; + this.mouseDelayMet = !this.options.delay; + if (!this.mouseDelayMet) + this._mouseDelayTimer = setTimeout(function () { + c.mouseDelayMet = true; + }, this.options.delay); + if (this._mouseDistanceMet(a) && this._mouseDelayMet(a)) { + this._mouseStarted = this._mouseStart(a) !== false; + if (!this._mouseStarted) { + a.preventDefault(); + return true; + } + } + true === b.data(a.target, this.widgetName + ".preventClickEvent") && + b.removeData(a.target, this.widgetName + ".preventClickEvent"); + this._mouseMoveDelegate = function (d) { + return c._mouseMove(d); + }; + this._mouseUpDelegate = function (d) { + return c._mouseUp(d); + }; + b(document) + .bind("mousemove." + this.widgetName, this._mouseMoveDelegate) + .bind("mouseup." + this.widgetName, this._mouseUpDelegate); + a.preventDefault(); + return (a.originalEvent.mouseHandled = true); + } + }, + _mouseMove: function (a) { + if (b.browser.msie && !(document.documentMode >= 9) && !a.button) + return this._mouseUp(a); + if (this._mouseStarted) { + this._mouseDrag(a); + return a.preventDefault(); + } + if (this._mouseDistanceMet(a) && this._mouseDelayMet(a)) + (this._mouseStarted = + this._mouseStart(this._mouseDownEvent, a) !== false) + ? this._mouseDrag(a) + : this._mouseUp(a); + return !this._mouseStarted; + }, + _mouseUp: function (a) { + b(document) + .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); + if (this._mouseStarted) { + this._mouseStarted = false; + a.target == this._mouseDownEvent.target && + b.data(a.target, this.widgetName + ".preventClickEvent", true); + this._mouseStop(a); + } + return false; + }, + _mouseDistanceMet: function (a) { + return ( + Math.max( + Math.abs(this._mouseDownEvent.pageX - a.pageX), + Math.abs(this._mouseDownEvent.pageY - a.pageY), + ) >= this.options.distance + ); + }, + _mouseDelayMet: function () { + return this.mouseDelayMet; + }, + _mouseStart: function () {}, + _mouseDrag: function () {}, + _mouseStop: function () {}, + _mouseCapture: function () { + return true; + }, + }); +})(jQuery); /* * jQuery UI Position 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -56,14 +546,186 @@ if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.t * * http://docs.jquery.com/UI/Position */ -(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, -left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= -k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= -m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= -d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= -a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), -g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); -;/* +(function (c) { + c.ui = c.ui || {}; + var n = /left|center|right/, + o = /top|center|bottom/, + t = c.fn.position, + u = c.fn.offset; + c.fn.position = function (b) { + if (!b || !b.of) return t.apply(this, arguments); + b = c.extend({}, b); + var a = c(b.of), + d = a[0], + g = (b.collision || "flip").split(" "), + e = b.offset ? b.offset.split(" ") : [0, 0], + h, + k, + j; + if (d.nodeType === 9) { + h = a.width(); + k = a.height(); + j = { top: 0, left: 0 }; + } else if (d.setTimeout) { + h = a.width(); + k = a.height(); + j = { top: a.scrollTop(), left: a.scrollLeft() }; + } else if (d.preventDefault) { + b.at = "left top"; + h = k = 0; + j = { top: b.of.pageY, left: b.of.pageX }; + } else { + h = a.outerWidth(); + k = a.outerHeight(); + j = a.offset(); + } + c.each(["my", "at"], function () { + var f = (b[this] || "").split(" "); + if (f.length === 1) + f = n.test(f[0]) + ? f.concat(["center"]) + : o.test(f[0]) + ? ["center"].concat(f) + : ["center", "center"]; + f[0] = n.test(f[0]) ? f[0] : "center"; + f[1] = o.test(f[1]) ? f[1] : "center"; + b[this] = f; + }); + if (g.length === 1) g[1] = g[0]; + e[0] = parseInt(e[0], 10) || 0; + if (e.length === 1) e[1] = e[0]; + e[1] = parseInt(e[1], 10) || 0; + if (b.at[0] === "right") j.left += h; + else if (b.at[0] === "center") j.left += h / 2; + if (b.at[1] === "bottom") j.top += k; + else if (b.at[1] === "center") j.top += k / 2; + j.left += e[0]; + j.top += e[1]; + return this.each(function () { + var f = c(this), + l = f.outerWidth(), + m = f.outerHeight(), + p = parseInt(c.curCSS(this, "marginLeft", true)) || 0, + q = parseInt(c.curCSS(this, "marginTop", true)) || 0, + v = l + p + (parseInt(c.curCSS(this, "marginRight", true)) || 0), + w = m + q + (parseInt(c.curCSS(this, "marginBottom", true)) || 0), + i = c.extend({}, j), + r; + if (b.my[0] === "right") i.left -= l; + else if (b.my[0] === "center") i.left -= l / 2; + if (b.my[1] === "bottom") i.top -= m; + else if (b.my[1] === "center") i.top -= m / 2; + i.left = Math.round(i.left); + i.top = Math.round(i.top); + r = { left: i.left - p, top: i.top - q }; + c.each(["left", "top"], function (s, x) { + c.ui.position[g[s]] && + c.ui.position[g[s]][x](i, { + targetWidth: h, + targetHeight: k, + elemWidth: l, + elemHeight: m, + collisionPosition: r, + collisionWidth: v, + collisionHeight: w, + offset: e, + my: b.my, + at: b.at, + }); + }); + c.fn.bgiframe && f.bgiframe(); + f.offset(c.extend(i, { using: b.using })); + }); + }; + c.ui.position = { + fit: { + left: function (b, a) { + var d = c(window); + d = + a.collisionPosition.left + + a.collisionWidth - + d.width() - + d.scrollLeft(); + b.left = + d > 0 + ? b.left - d + : Math.max(b.left - a.collisionPosition.left, b.left); + }, + top: function (b, a) { + var d = c(window); + d = + a.collisionPosition.top + + a.collisionHeight - + d.height() - + d.scrollTop(); + b.top = + d > 0 ? b.top - d : Math.max(b.top - a.collisionPosition.top, b.top); + }, + }, + flip: { + left: function (b, a) { + if (a.at[0] !== "center") { + var d = c(window); + d = + a.collisionPosition.left + + a.collisionWidth - + d.width() - + d.scrollLeft(); + var g = + a.my[0] === "left" + ? -a.elemWidth + : a.my[0] === "right" + ? a.elemWidth + : 0, + e = a.at[0] === "left" ? a.targetWidth : -a.targetWidth, + h = -2 * a.offset[0]; + b.left += + a.collisionPosition.left < 0 ? g + e + h : d > 0 ? g + e + h : 0; + } + }, + top: function (b, a) { + if (a.at[1] !== "center") { + var d = c(window); + d = + a.collisionPosition.top + + a.collisionHeight - + d.height() - + d.scrollTop(); + var g = + a.my[1] === "top" + ? -a.elemHeight + : a.my[1] === "bottom" + ? a.elemHeight + : 0, + e = a.at[1] === "top" ? a.targetHeight : -a.targetHeight, + h = -2 * a.offset[1]; + b.top += + a.collisionPosition.top < 0 ? g + e + h : d > 0 ? g + e + h : 0; + } + }, + }, + }; + if (!c.offset.setOffset) { + c.offset.setOffset = function (b, a) { + if (/static/.test(c.curCSS(b, "position"))) b.style.position = "relative"; + var d = c(b), + g = d.offset(), + e = parseInt(c.curCSS(b, "top", true), 10) || 0, + h = parseInt(c.curCSS(b, "left", true), 10) || 0; + g = { top: a.top - g.top + e, left: a.left - g.left + h }; + "using" in a ? a.using.call(b, g) : d.css(g); + }; + c.fn.offset = function (b) { + var a = this[0]; + if (!a || !a.ownerDocument) return null; + if (b) + return this.each(function () { + c.offset.setOffset(this, b); + }); + return u.call(this); + }; + } +})(jQuery); /* * jQuery UI Draggable 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -77,43 +739,805 @@ g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"lef * jquery.ui.mouse.js * jquery.ui.widget.js */ -(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== -"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= -this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top- -this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions(); -d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis|| -this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&& -this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this== -a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]|| -0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0], -this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top- -(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(), -height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"? -document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"), -10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"), -10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom]}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&& -d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0], -this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.leftthis.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g= -this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])? -e:!(e-this.offset.click.left
        ').css({width:this.offsetWidth+ -"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})},stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity", -a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e this.containment[2]) + e = this.containment[2] + this.offset.click.left; + if (a.pageY - this.offset.click.top > this.containment[3]) + g = this.containment[3] + this.offset.click.top; + } + if (b.grid) { + g = + this.originalPageY + + Math.round((g - this.originalPageY) / b.grid[1]) * b.grid[1]; + g = this.containment + ? !( + g - this.offset.click.top < this.containment[1] || + g - this.offset.click.top > this.containment[3] + ) + ? g + : !(g - this.offset.click.top < this.containment[1]) + ? g - b.grid[1] + : g + b.grid[1] + : g; + e = + this.originalPageX + + Math.round((e - this.originalPageX) / b.grid[0]) * b.grid[0]; + e = this.containment + ? !( + e - this.offset.click.left < this.containment[0] || + e - this.offset.click.left > this.containment[2] + ) + ? e + : !(e - this.offset.click.left < this.containment[0]) + ? e - b.grid[0] + : e + b.grid[0] + : e; + } + } + return { + top: + g - + this.offset.click.top - + this.offset.relative.top - + this.offset.parent.top + + (d.browser.safari && + d.browser.version < 526 && + this.cssPosition == "fixed" + ? 0 + : this.cssPosition == "fixed" + ? -this.scrollParent.scrollTop() + : f + ? 0 + : c.scrollTop()), + left: + e - + this.offset.click.left - + this.offset.relative.left - + this.offset.parent.left + + (d.browser.safari && + d.browser.version < 526 && + this.cssPosition == "fixed" + ? 0 + : this.cssPosition == "fixed" + ? -this.scrollParent.scrollLeft() + : f + ? 0 + : c.scrollLeft()), + }; + }, + _clear: function () { + this.helper.removeClass("ui-draggable-dragging"); + this.helper[0] != this.element[0] && + !this.cancelHelperRemoval && + this.helper.remove(); + this.helper = null; + this.cancelHelperRemoval = false; + }, + _trigger: function (a, b, c) { + c = c || this._uiHash(); + d.ui.plugin.call(this, a, [b, c]); + if (a == "drag") this.positionAbs = this._convertPositionTo("absolute"); + return d.Widget.prototype._trigger.call(this, a, b, c); + }, + plugins: {}, + _uiHash: function () { + return { + helper: this.helper, + position: this.position, + originalPosition: this.originalPosition, + offset: this.positionAbs, + }; + }, + }); + d.extend(d.ui.draggable, { version: "1.8.11" }); + d.ui.plugin.add("draggable", "connectToSortable", { + start: function (a, b) { + var c = d(this).data("draggable"), + f = c.options, + e = d.extend({}, b, { item: c.element }); + c.sortables = []; + d(f.connectToSortable).each(function () { + var g = d.data(this, "sortable"); + if (g && !g.options.disabled) { + c.sortables.push({ instance: g, shouldRevert: g.options.revert }); + g.refreshPositions(); + g._trigger("activate", a, e); + } + }); + }, + stop: function (a, b) { + var c = d(this).data("draggable"), + f = d.extend({}, b, { item: c.element }); + d.each(c.sortables, function () { + if (this.instance.isOver) { + this.instance.isOver = 0; + c.cancelHelperRemoval = true; + this.instance.cancelHelperRemoval = false; + if (this.shouldRevert) this.instance.options.revert = true; + this.instance._mouseStop(a); + this.instance.options.helper = this.instance.options._helper; + c.options.helper == "original" && + this.instance.currentItem.css({ top: "auto", left: "auto" }); + } else { + this.instance.cancelHelperRemoval = false; + this.instance._trigger("deactivate", a, f); + } + }); + }, + drag: function (a, b) { + var c = d(this).data("draggable"), + f = this; + d.each(c.sortables, function () { + this.instance.positionAbs = c.positionAbs; + this.instance.helperProportions = c.helperProportions; + this.instance.offset.click = c.offset.click; + if (this.instance._intersectsWith(this.instance.containerCache)) { + if (!this.instance.isOver) { + this.instance.isOver = 1; + this.instance.currentItem = d(f) + .clone() + .appendTo(this.instance.element) + .data("sortable-item", true); + this.instance.options._helper = this.instance.options.helper; + this.instance.options.helper = function () { + return b.helper[0]; + }; + a.target = this.instance.currentItem[0]; + this.instance._mouseCapture(a, true); + this.instance._mouseStart(a, true, true); + this.instance.offset.click.top = c.offset.click.top; + this.instance.offset.click.left = c.offset.click.left; + this.instance.offset.parent.left -= + c.offset.parent.left - this.instance.offset.parent.left; + this.instance.offset.parent.top -= + c.offset.parent.top - this.instance.offset.parent.top; + c._trigger("toSortable", a); + c.dropped = this.instance.element; + c.currentItem = c.element; + this.instance.fromOutside = c; + } + this.instance.currentItem && this.instance._mouseDrag(a); + } else if (this.instance.isOver) { + this.instance.isOver = 0; + this.instance.cancelHelperRemoval = true; + this.instance.options.revert = false; + this.instance._trigger( + "out", + a, + this.instance._uiHash(this.instance), + ); + this.instance._mouseStop(a, true); + this.instance.options.helper = this.instance.options._helper; + this.instance.currentItem.remove(); + this.instance.placeholder && this.instance.placeholder.remove(); + c._trigger("fromSortable", a); + c.dropped = false; + } + }); + }, + }); + d.ui.plugin.add("draggable", "cursor", { + start: function () { + var a = d("body"), + b = d(this).data("draggable").options; + if (a.css("cursor")) b._cursor = a.css("cursor"); + a.css("cursor", b.cursor); + }, + stop: function () { + var a = d(this).data("draggable").options; + a._cursor && d("body").css("cursor", a._cursor); + }, + }); + d.ui.plugin.add("draggable", "iframeFix", { + start: function () { + var a = d(this).data("draggable").options; + d(a.iframeFix === true ? "iframe" : a.iframeFix).each(function () { + d( + '
        ', + ) + .css({ + width: this.offsetWidth + "px", + height: this.offsetHeight + "px", + position: "absolute", + opacity: "0.001", + zIndex: 1e3, + }) + .css(d(this).offset()) + .appendTo("body"); + }); + }, + stop: function () { + d("div.ui-draggable-iframeFix").each(function () { + this.parentNode.removeChild(this); + }); + }, + }); + d.ui.plugin.add("draggable", "opacity", { + start: function (a, b) { + a = d(b.helper); + b = d(this).data("draggable").options; + if (a.css("opacity")) b._opacity = a.css("opacity"); + a.css("opacity", b.opacity); + }, + stop: function (a, b) { + a = d(this).data("draggable").options; + a._opacity && d(b.helper).css("opacity", a._opacity); + }, + }); + d.ui.plugin.add("draggable", "scroll", { + start: function () { + var a = d(this).data("draggable"); + if (a.scrollParent[0] != document && a.scrollParent[0].tagName != "HTML") + a.overflowOffset = a.scrollParent.offset(); + }, + drag: function (a) { + var b = d(this).data("draggable"), + c = b.options, + f = false; + if ( + b.scrollParent[0] != document && + b.scrollParent[0].tagName != "HTML" + ) { + if (!c.axis || c.axis != "x") + if ( + b.overflowOffset.top + b.scrollParent[0].offsetHeight - a.pageY < + c.scrollSensitivity + ) + b.scrollParent[0].scrollTop = f = + b.scrollParent[0].scrollTop + c.scrollSpeed; + else if (a.pageY - b.overflowOffset.top < c.scrollSensitivity) + b.scrollParent[0].scrollTop = f = + b.scrollParent[0].scrollTop - c.scrollSpeed; + if (!c.axis || c.axis != "y") + if ( + b.overflowOffset.left + b.scrollParent[0].offsetWidth - a.pageX < + c.scrollSensitivity + ) + b.scrollParent[0].scrollLeft = f = + b.scrollParent[0].scrollLeft + c.scrollSpeed; + else if (a.pageX - b.overflowOffset.left < c.scrollSensitivity) + b.scrollParent[0].scrollLeft = f = + b.scrollParent[0].scrollLeft - c.scrollSpeed; + } else { + if (!c.axis || c.axis != "x") + if (a.pageY - d(document).scrollTop() < c.scrollSensitivity) + f = d(document).scrollTop(d(document).scrollTop() - c.scrollSpeed); + else if ( + d(window).height() - (a.pageY - d(document).scrollTop()) < + c.scrollSensitivity + ) + f = d(document).scrollTop(d(document).scrollTop() + c.scrollSpeed); + if (!c.axis || c.axis != "y") + if (a.pageX - d(document).scrollLeft() < c.scrollSensitivity) + f = d(document).scrollLeft( + d(document).scrollLeft() - c.scrollSpeed, + ); + else if ( + d(window).width() - (a.pageX - d(document).scrollLeft()) < + c.scrollSensitivity + ) + f = d(document).scrollLeft( + d(document).scrollLeft() + c.scrollSpeed, + ); + } + f !== false && + d.ui.ddmanager && + !c.dropBehaviour && + d.ui.ddmanager.prepareOffsets(b, a); + }, + }); + d.ui.plugin.add("draggable", "snap", { + start: function () { + var a = d(this).data("draggable"), + b = a.options; + a.snapElements = []; + d( + b.snap.constructor != String + ? b.snap.items || ":data(draggable)" + : b.snap, + ).each(function () { + var c = d(this), + f = c.offset(); + this != a.element[0] && + a.snapElements.push({ + item: this, + width: c.outerWidth(), + height: c.outerHeight(), + top: f.top, + left: f.left, + }); + }); + }, + drag: function (a, b) { + for ( + var c = d(this).data("draggable"), + f = c.options, + e = f.snapTolerance, + g = b.offset.left, + n = g + c.helperProportions.width, + m = b.offset.top, + o = m + c.helperProportions.height, + h = c.snapElements.length - 1; + h >= 0; + h-- + ) { + var i = c.snapElements[h].left, + k = i + c.snapElements[h].width, + j = c.snapElements[h].top, + l = j + c.snapElements[h].height; + if ( + (i - e < g && g < k + e && j - e < m && m < l + e) || + (i - e < g && g < k + e && j - e < o && o < l + e) || + (i - e < n && n < k + e && j - e < m && m < l + e) || + (i - e < n && n < k + e && j - e < o && o < l + e) + ) { + if (f.snapMode != "inner") { + var p = Math.abs(j - o) <= e, + q = Math.abs(l - m) <= e, + r = Math.abs(i - n) <= e, + s = Math.abs(k - g) <= e; + if (p) + b.position.top = + c._convertPositionTo("relative", { + top: j - c.helperProportions.height, + left: 0, + }).top - c.margins.top; + if (q) + b.position.top = + c._convertPositionTo("relative", { top: l, left: 0 }).top - + c.margins.top; + if (r) + b.position.left = + c._convertPositionTo("relative", { + top: 0, + left: i - c.helperProportions.width, + }).left - c.margins.left; + if (s) + b.position.left = + c._convertPositionTo("relative", { top: 0, left: k }).left - + c.margins.left; + } + var t = p || q || r || s; + if (f.snapMode != "outer") { + p = Math.abs(j - m) <= e; + q = Math.abs(l - o) <= e; + r = Math.abs(i - g) <= e; + s = Math.abs(k - n) <= e; + if (p) + b.position.top = + c._convertPositionTo("relative", { top: j, left: 0 }).top - + c.margins.top; + if (q) + b.position.top = + c._convertPositionTo("relative", { + top: l - c.helperProportions.height, + left: 0, + }).top - c.margins.top; + if (r) + b.position.left = + c._convertPositionTo("relative", { top: 0, left: i }).left - + c.margins.left; + if (s) + b.position.left = + c._convertPositionTo("relative", { + top: 0, + left: k - c.helperProportions.width, + }).left - c.margins.left; + } + if (!c.snapElements[h].snapping && (p || q || r || s || t)) + c.options.snap.snap && + c.options.snap.snap.call( + c.element, + a, + d.extend(c._uiHash(), { snapItem: c.snapElements[h].item }), + ); + c.snapElements[h].snapping = p || q || r || s || t; + } else { + c.snapElements[h].snapping && + c.options.snap.release && + c.options.snap.release.call( + c.element, + a, + d.extend(c._uiHash(), { snapItem: c.snapElements[h].item }), + ); + c.snapElements[h].snapping = false; + } + } + }, + }); + d.ui.plugin.add("draggable", "stack", { + start: function () { + var a = d(this).data("draggable").options; + a = d.makeArray(d(a.stack)).sort(function (c, f) { + return ( + (parseInt(d(c).css("zIndex"), 10) || 0) - + (parseInt(d(f).css("zIndex"), 10) || 0) + ); + }); + if (a.length) { + var b = parseInt(a[0].style.zIndex) || 0; + d(a).each(function (c) { + this.style.zIndex = b + c; + }); + this[0].style.zIndex = b + a.length; + } + }, + }); + d.ui.plugin.add("draggable", "zIndex", { + start: function (a, b) { + a = d(b.helper); + b = d(this).data("draggable").options; + if (a.css("zIndex")) b._zIndex = a.css("zIndex"); + a.css("zIndex", b.zIndex); + }, + stop: function (a, b) { + a = d(this).data("draggable").options; + a._zIndex && d(b.helper).css("zIndex", a._zIndex); + }, + }); +})(jQuery); /* * jQuery UI Droppable 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -128,18 +1552,270 @@ parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});thi * jquery.ui.mouse.js * jquery.ui.draggable.js */ -(function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this); -a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b=j&&f<=l||h>=j&&h<=l||fl)&&(e>= -i&&e<=k||g>=i&&g<=k||ek);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f= j && f <= l) || (h >= j && h <= l) || (f < j && h > l)) && + ((e >= i && e <= k) || (g >= i && g <= k) || (e < i && g > k)) + ); + default: + return false; + } + }; + d.ui.ddmanager = { + current: null, + droppables: { default: [] }, + prepareOffsets: function (a, b) { + var c = d.ui.ddmanager.droppables[a.options.scope] || [], + e = b ? b.type : null, + g = (a.currentItem || a.element).find(":data(droppable)").andSelf(), + f = 0; + a: for (; f < c.length; f++) + if ( + !( + c[f].options.disabled || + (a && + !c[f].accept.call(c[f].element[0], a.currentItem || a.element)) + ) + ) { + for (var h = 0; h < g.length; h++) + if (g[h] == c[f].element[0]) { + c[f].proportions.height = 0; + continue a; + } + c[f].visible = c[f].element.css("display") != "none"; + if (c[f].visible) { + e == "mousedown" && c[f]._activate.call(c[f], b); + c[f].offset = c[f].element.offset(); + c[f].proportions = { + width: c[f].element[0].offsetWidth, + height: c[f].element[0].offsetHeight, + }; + } + } + }, + drop: function (a, b) { + var c = false; + d.each(d.ui.ddmanager.droppables[a.options.scope] || [], function () { + if (this.options) { + if ( + !this.options.disabled && + this.visible && + d.ui.intersect(a, this, this.options.tolerance) + ) + c = c || this._drop.call(this, b); + if ( + !this.options.disabled && + this.visible && + this.accept.call(this.element[0], a.currentItem || a.element) + ) { + this.isout = 1; + this.isover = 0; + this._deactivate.call(this, b); + } + } + }); + return c; + }, + drag: function (a, b) { + a.options.refreshPositions && d.ui.ddmanager.prepareOffsets(a, b); + d.each(d.ui.ddmanager.droppables[a.options.scope] || [], function () { + if (!(this.options.disabled || this.greedyChild || !this.visible)) { + var c = d.ui.intersect(a, this, this.options.tolerance); + if ( + (c = + !c && this.isover == 1 + ? "isout" + : c && this.isover == 0 + ? "isover" + : null) + ) { + var e; + if (this.options.greedy) { + var g = this.element.parents(":data(droppable):eq(0)"); + if (g.length) { + e = d.data(g[0], "droppable"); + e.greedyChild = c == "isover" ? 1 : 0; + } + } + if (e && c == "isover") { + e.isover = 0; + e.isout = 1; + e._out.call(e, b); + } + this[c] = 1; + this[c == "isout" ? "isover" : "isout"] = 0; + this[c == "isover" ? "_over" : "_out"].call(this, b); + if (e && c == "isout") { + e.isout = 0; + e.isover = 1; + e._over.call(e, b); + } + } + } + }); + }, + }; +})(jQuery); /* * jQuery UI Resizable 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -153,40 +1829,774 @@ d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.iso * jquery.ui.mouse.js * jquery.ui.widget.js */ -(function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element, -_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('
        ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), -top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= -this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", -nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d
        ');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== -String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); -this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()}; -if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(), -d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset= -this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio: -this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize", -b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height; -f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing"); -this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top= -null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidthb.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+ -this.size.height,k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b, -a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a, -c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize, -originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.11"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize= -b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width", -"height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})}; -if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height- -g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width, -height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d= -e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options, -d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper? -d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height= -a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&& -/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable"); -b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/ -(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery); -;/* +(function (e) { + e.widget("ui.resizable", e.ui.mouse, { + widgetEventPrefix: "resize", + options: { + alsoResize: false, + animate: false, + animateDuration: "slow", + animateEasing: "swing", + aspectRatio: false, + autoHide: false, + containment: false, + ghost: false, + grid: false, + handles: "e,s,se", + helper: false, + maxHeight: null, + maxWidth: null, + minHeight: 10, + minWidth: 10, + zIndex: 1e3, + }, + _create: function () { + var b = this, + a = this.options; + this.element.addClass("ui-resizable"); + e.extend(this, { + _aspectRatio: !!a.aspectRatio, + aspectRatio: a.aspectRatio, + originalElement: this.element, + _proportionallyResizeElements: [], + _helper: + a.helper || a.ghost || a.animate + ? a.helper || "ui-resizable-helper" + : null, + }); + if ( + this.element[0].nodeName.match( + /canvas|textarea|input|select|button|img/i, + ) + ) { + /relative/.test(this.element.css("position")) && + e.browser.opera && + this.element.css({ position: "relative", top: "auto", left: "auto" }); + this.element.wrap( + e('
        ').css({ + position: this.element.css("position"), + width: this.element.outerWidth(), + height: this.element.outerHeight(), + top: this.element.css("top"), + left: this.element.css("left"), + }), + ); + this.element = this.element + .parent() + .data("resizable", this.element.data("resizable")); + this.elementIsWrapper = true; + this.element.css({ + marginLeft: this.originalElement.css("marginLeft"), + marginTop: this.originalElement.css("marginTop"), + marginRight: this.originalElement.css("marginRight"), + marginBottom: this.originalElement.css("marginBottom"), + }); + this.originalElement.css({ + marginLeft: 0, + marginTop: 0, + marginRight: 0, + marginBottom: 0, + }); + this.originalResizeStyle = this.originalElement.css("resize"); + this.originalElement.css("resize", "none"); + this._proportionallyResizeElements.push( + this.originalElement.css({ + position: "static", + zoom: 1, + display: "block", + }), + ); + this.originalElement.css({ + margin: this.originalElement.css("margin"), + }); + this._proportionallyResize(); + } + this.handles = + a.handles || + (!e(".ui-resizable-handle", this.element).length + ? "e,s,se" + : { + n: ".ui-resizable-n", + e: ".ui-resizable-e", + s: ".ui-resizable-s", + w: ".ui-resizable-w", + se: ".ui-resizable-se", + sw: ".ui-resizable-sw", + ne: ".ui-resizable-ne", + nw: ".ui-resizable-nw", + }); + if (this.handles.constructor == String) { + if (this.handles == "all") this.handles = "n,e,s,w,se,sw,ne,nw"; + var c = this.handles.split(","); + this.handles = {}; + for (var d = 0; d < c.length; d++) { + var f = e.trim(c[d]), + g = e( + '
        ', + ); + /sw|se|ne|nw/.test(f) && g.css({ zIndex: ++a.zIndex }); + "se" == f && g.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); + this.handles[f] = ".ui-resizable-" + f; + this.element.append(g); + } + } + this._renderAxis = function (h) { + h = h || this.element; + for (var i in this.handles) { + if (this.handles[i].constructor == String) + this.handles[i] = e(this.handles[i], this.element).show(); + if ( + this.elementIsWrapper && + this.originalElement[0].nodeName.match( + /textarea|input|select|button/i, + ) + ) { + var j = e(this.handles[i], this.element), + k = 0; + k = /sw|ne|nw|se|n|s/.test(i) ? j.outerHeight() : j.outerWidth(); + j = [ + "padding", + /ne|nw|n/.test(i) + ? "Top" + : /se|sw|s/.test(i) + ? "Bottom" + : /^e$/.test(i) + ? "Right" + : "Left", + ].join(""); + h.css(j, k); + this._proportionallyResize(); + } + e(this.handles[i]); + } + }; + this._renderAxis(this.element); + this._handles = e( + ".ui-resizable-handle", + this.element, + ).disableSelection(); + this._handles.mouseover(function () { + if (!b.resizing) { + if (this.className) + var h = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); + b.axis = h && h[1] ? h[1] : "se"; + } + }); + if (a.autoHide) { + this._handles.hide(); + e(this.element) + .addClass("ui-resizable-autohide") + .hover( + function () { + e(this).removeClass("ui-resizable-autohide"); + b._handles.show(); + }, + function () { + if (!b.resizing) { + e(this).addClass("ui-resizable-autohide"); + b._handles.hide(); + } + }, + ); + } + this._mouseInit(); + }, + destroy: function () { + this._mouseDestroy(); + var b = function (c) { + e(c) + .removeClass( + "ui-resizable ui-resizable-disabled ui-resizable-resizing", + ) + .removeData("resizable") + .unbind(".resizable") + .find(".ui-resizable-handle") + .remove(); + }; + if (this.elementIsWrapper) { + b(this.element); + var a = this.element; + a.after( + this.originalElement.css({ + position: a.css("position"), + width: a.outerWidth(), + height: a.outerHeight(), + top: a.css("top"), + left: a.css("left"), + }), + ).remove(); + } + this.originalElement.css("resize", this.originalResizeStyle); + b(this.originalElement); + return this; + }, + _mouseCapture: function (b) { + var a = false; + for (var c in this.handles) + if (e(this.handles[c])[0] == b.target) a = true; + return !this.options.disabled && a; + }, + _mouseStart: function (b) { + var a = this.options, + c = this.element.position(), + d = this.element; + this.resizing = true; + this.documentScroll = { + top: e(document).scrollTop(), + left: e(document).scrollLeft(), + }; + if (d.is(".ui-draggable") || /absolute/.test(d.css("position"))) + d.css({ position: "absolute", top: c.top, left: c.left }); + e.browser.opera && + /relative/.test(d.css("position")) && + d.css({ position: "relative", top: "auto", left: "auto" }); + this._renderProxy(); + c = m(this.helper.css("left")); + var f = m(this.helper.css("top")); + if (a.containment) { + c += e(a.containment).scrollLeft() || 0; + f += e(a.containment).scrollTop() || 0; + } + this.offset = this.helper.offset(); + this.position = { left: c, top: f }; + this.size = this._helper + ? { width: d.outerWidth(), height: d.outerHeight() } + : { width: d.width(), height: d.height() }; + this.originalSize = this._helper + ? { width: d.outerWidth(), height: d.outerHeight() } + : { width: d.width(), height: d.height() }; + this.originalPosition = { left: c, top: f }; + this.sizeDiff = { + width: d.outerWidth() - d.width(), + height: d.outerHeight() - d.height(), + }; + this.originalMousePosition = { left: b.pageX, top: b.pageY }; + this.aspectRatio = + typeof a.aspectRatio == "number" + ? a.aspectRatio + : this.originalSize.width / this.originalSize.height || 1; + a = e(".ui-resizable-" + this.axis).css("cursor"); + e("body").css("cursor", a == "auto" ? this.axis + "-resize" : a); + d.addClass("ui-resizable-resizing"); + this._propagate("start", b); + return true; + }, + _mouseDrag: function (b) { + var a = this.helper, + c = this.originalMousePosition, + d = this._change[this.axis]; + if (!d) return false; + c = d.apply(this, [b, b.pageX - c.left || 0, b.pageY - c.top || 0]); + if (this._aspectRatio || b.shiftKey) c = this._updateRatio(c, b); + c = this._respectSize(c, b); + this._propagate("resize", b); + a.css({ + top: this.position.top + "px", + left: this.position.left + "px", + width: this.size.width + "px", + height: this.size.height + "px", + }); + !this._helper && + this._proportionallyResizeElements.length && + this._proportionallyResize(); + this._updateCache(c); + this._trigger("resize", b, this.ui()); + return false; + }, + _mouseStop: function (b) { + this.resizing = false; + var a = this.options, + c = this; + if (this._helper) { + var d = this._proportionallyResizeElements, + f = d.length && /textarea/i.test(d[0].nodeName); + d = f && e.ui.hasScroll(d[0], "left") ? 0 : c.sizeDiff.height; + f = f ? 0 : c.sizeDiff.width; + f = { width: c.helper.width() - f, height: c.helper.height() - d }; + d = + parseInt(c.element.css("left"), 10) + + (c.position.left - c.originalPosition.left) || null; + var g = + parseInt(c.element.css("top"), 10) + + (c.position.top - c.originalPosition.top) || null; + a.animate || this.element.css(e.extend(f, { top: g, left: d })); + c.helper.height(c.size.height); + c.helper.width(c.size.width); + this._helper && !a.animate && this._proportionallyResize(); + } + e("body").css("cursor", "auto"); + this.element.removeClass("ui-resizable-resizing"); + this._propagate("stop", b); + this._helper && this.helper.remove(); + return false; + }, + _updateCache: function (b) { + this.offset = this.helper.offset(); + if (l(b.left)) this.position.left = b.left; + if (l(b.top)) this.position.top = b.top; + if (l(b.height)) this.size.height = b.height; + if (l(b.width)) this.size.width = b.width; + }, + _updateRatio: function (b) { + var a = this.position, + c = this.size, + d = this.axis; + if (b.height) b.width = c.height * this.aspectRatio; + else if (b.width) b.height = c.width / this.aspectRatio; + if (d == "sw") { + b.left = a.left + (c.width - b.width); + b.top = null; + } + if (d == "nw") { + b.top = a.top + (c.height - b.height); + b.left = a.left + (c.width - b.width); + } + return b; + }, + _respectSize: function (b) { + var a = this.options, + c = this.axis, + d = l(b.width) && a.maxWidth && a.maxWidth < b.width, + f = l(b.height) && a.maxHeight && a.maxHeight < b.height, + g = l(b.width) && a.minWidth && a.minWidth > b.width, + h = l(b.height) && a.minHeight && a.minHeight > b.height; + if (g) b.width = a.minWidth; + if (h) b.height = a.minHeight; + if (d) b.width = a.maxWidth; + if (f) b.height = a.maxHeight; + var i = this.originalPosition.left + this.originalSize.width, + j = this.position.top + this.size.height, + k = /sw|nw|w/.test(c); + c = /nw|ne|n/.test(c); + if (g && k) b.left = i - a.minWidth; + if (d && k) b.left = i - a.maxWidth; + if (h && c) b.top = j - a.minHeight; + if (f && c) b.top = j - a.maxHeight; + if ((a = !b.width && !b.height) && !b.left && b.top) b.top = null; + else if (a && !b.top && b.left) b.left = null; + return b; + }, + _proportionallyResize: function () { + if (this._proportionallyResizeElements.length) + for ( + var b = this.helper || this.element, a = 0; + a < this._proportionallyResizeElements.length; + a++ + ) { + var c = this._proportionallyResizeElements[a]; + if (!this.borderDif) { + var d = [ + c.css("borderTopWidth"), + c.css("borderRightWidth"), + c.css("borderBottomWidth"), + c.css("borderLeftWidth"), + ], + f = [ + c.css("paddingTop"), + c.css("paddingRight"), + c.css("paddingBottom"), + c.css("paddingLeft"), + ]; + this.borderDif = e.map(d, function (g, h) { + g = parseInt(g, 10) || 0; + h = parseInt(f[h], 10) || 0; + return g + h; + }); + } + (e.browser.msie && + (e(b).is(":hidden") || e(b).parents(":hidden").length)) || + c.css({ + height: b.height() - this.borderDif[0] - this.borderDif[2] || 0, + width: b.width() - this.borderDif[1] - this.borderDif[3] || 0, + }); + } + }, + _renderProxy: function () { + var b = this.options; + this.elementOffset = this.element.offset(); + if (this._helper) { + this.helper = this.helper || e('
        '); + var a = e.browser.msie && e.browser.version < 7, + c = a ? 1 : 0; + a = a ? 2 : -1; + this.helper.addClass(this._helper).css({ + width: this.element.outerWidth() + a, + height: this.element.outerHeight() + a, + position: "absolute", + left: this.elementOffset.left - c + "px", + top: this.elementOffset.top - c + "px", + zIndex: ++b.zIndex, + }); + this.helper.appendTo("body").disableSelection(); + } else this.helper = this.element; + }, + _change: { + e: function (b, a) { + return { width: this.originalSize.width + a }; + }, + w: function (b, a) { + return { + left: this.originalPosition.left + a, + width: this.originalSize.width - a, + }; + }, + n: function (b, a, c) { + return { + top: this.originalPosition.top + c, + height: this.originalSize.height - c, + }; + }, + s: function (b, a, c) { + return { height: this.originalSize.height + c }; + }, + se: function (b, a, c) { + return e.extend( + this._change.s.apply(this, arguments), + this._change.e.apply(this, [b, a, c]), + ); + }, + sw: function (b, a, c) { + return e.extend( + this._change.s.apply(this, arguments), + this._change.w.apply(this, [b, a, c]), + ); + }, + ne: function (b, a, c) { + return e.extend( + this._change.n.apply(this, arguments), + this._change.e.apply(this, [b, a, c]), + ); + }, + nw: function (b, a, c) { + return e.extend( + this._change.n.apply(this, arguments), + this._change.w.apply(this, [b, a, c]), + ); + }, + }, + _propagate: function (b, a) { + e.ui.plugin.call(this, b, [a, this.ui()]); + b != "resize" && this._trigger(b, a, this.ui()); + }, + plugins: {}, + ui: function () { + return { + originalElement: this.originalElement, + element: this.element, + helper: this.helper, + position: this.position, + size: this.size, + originalSize: this.originalSize, + originalPosition: this.originalPosition, + }; + }, + }); + e.extend(e.ui.resizable, { version: "1.8.11" }); + e.ui.plugin.add("resizable", "alsoResize", { + start: function () { + var b = e(this).data("resizable").options, + a = function (c) { + e(c).each(function () { + var d = e(this); + d.data("resizable-alsoresize", { + width: parseInt(d.width(), 10), + height: parseInt(d.height(), 10), + left: parseInt(d.css("left"), 10), + top: parseInt(d.css("top"), 10), + position: d.css("position"), + }); + }); + }; + if (typeof b.alsoResize == "object" && !b.alsoResize.parentNode) + if (b.alsoResize.length) { + b.alsoResize = b.alsoResize[0]; + a(b.alsoResize); + } else + e.each(b.alsoResize, function (c) { + a(c); + }); + else a(b.alsoResize); + }, + resize: function (b, a) { + var c = e(this).data("resizable"); + b = c.options; + var d = c.originalSize, + f = c.originalPosition, + g = { + height: c.size.height - d.height || 0, + width: c.size.width - d.width || 0, + top: c.position.top - f.top || 0, + left: c.position.left - f.left || 0, + }, + h = function (i, j) { + e(i).each(function () { + var k = e(this), + q = e(this).data("resizable-alsoresize"), + p = {}, + r = + j && j.length + ? j + : k.parents(a.originalElement[0]).length + ? ["width", "height"] + : ["width", "height", "top", "left"]; + e.each(r, function (n, o) { + if ((n = (q[o] || 0) + (g[o] || 0)) && n >= 0) p[o] = n || null; + }); + if (e.browser.opera && /relative/.test(k.css("position"))) { + c._revertToRelativePosition = true; + k.css({ position: "absolute", top: "auto", left: "auto" }); + } + k.css(p); + }); + }; + typeof b.alsoResize == "object" && !b.alsoResize.nodeType + ? e.each(b.alsoResize, function (i, j) { + h(i, j); + }) + : h(b.alsoResize); + }, + stop: function () { + var b = e(this).data("resizable"), + a = b.options, + c = function (d) { + e(d).each(function () { + var f = e(this); + f.css({ position: f.data("resizable-alsoresize").position }); + }); + }; + if (b._revertToRelativePosition) { + b._revertToRelativePosition = false; + typeof a.alsoResize == "object" && !a.alsoResize.nodeType + ? e.each(a.alsoResize, function (d) { + c(d); + }) + : c(a.alsoResize); + } + e(this).removeData("resizable-alsoresize"); + }, + }); + e.ui.plugin.add("resizable", "animate", { + stop: function (b) { + var a = e(this).data("resizable"), + c = a.options, + d = a._proportionallyResizeElements, + f = d.length && /textarea/i.test(d[0].nodeName), + g = f && e.ui.hasScroll(d[0], "left") ? 0 : a.sizeDiff.height; + f = { + width: a.size.width - (f ? 0 : a.sizeDiff.width), + height: a.size.height - g, + }; + g = + parseInt(a.element.css("left"), 10) + + (a.position.left - a.originalPosition.left) || null; + var h = + parseInt(a.element.css("top"), 10) + + (a.position.top - a.originalPosition.top) || null; + a.element.animate(e.extend(f, h && g ? { top: h, left: g } : {}), { + duration: c.animateDuration, + easing: c.animateEasing, + step: function () { + var i = { + width: parseInt(a.element.css("width"), 10), + height: parseInt(a.element.css("height"), 10), + top: parseInt(a.element.css("top"), 10), + left: parseInt(a.element.css("left"), 10), + }; + d && d.length && e(d[0]).css({ width: i.width, height: i.height }); + a._updateCache(i); + a._propagate("resize", b); + }, + }); + }, + }); + e.ui.plugin.add("resizable", "containment", { + start: function () { + var b = e(this).data("resizable"), + a = b.element, + c = b.options.containment; + if ( + (a = + c instanceof e ? c.get(0) : /parent/.test(c) ? a.parent().get(0) : c) + ) { + b.containerElement = e(a); + if (/document/.test(c) || c == document) { + b.containerOffset = { left: 0, top: 0 }; + b.containerPosition = { left: 0, top: 0 }; + b.parentData = { + element: e(document), + left: 0, + top: 0, + width: e(document).width(), + height: + e(document).height() || document.body.parentNode.scrollHeight, + }; + } else { + var d = e(a), + f = []; + e(["Top", "Right", "Left", "Bottom"]).each(function (i, j) { + f[i] = m(d.css("padding" + j)); + }); + b.containerOffset = d.offset(); + b.containerPosition = d.position(); + b.containerSize = { + height: d.innerHeight() - f[3], + width: d.innerWidth() - f[1], + }; + c = b.containerOffset; + var g = b.containerSize.height, + h = b.containerSize.width; + h = e.ui.hasScroll(a, "left") ? a.scrollWidth : h; + g = e.ui.hasScroll(a) ? a.scrollHeight : g; + b.parentData = { + element: a, + left: c.left, + top: c.top, + width: h, + height: g, + }; + } + } + }, + resize: function (b) { + var a = e(this).data("resizable"), + c = a.options, + d = a.containerOffset, + f = a.position; + b = a._aspectRatio || b.shiftKey; + var g = { top: 0, left: 0 }, + h = a.containerElement; + if (h[0] != document && /static/.test(h.css("position"))) g = d; + if (f.left < (a._helper ? d.left : 0)) { + a.size.width += a._helper + ? a.position.left - d.left + : a.position.left - g.left; + if (b) a.size.height = a.size.width / c.aspectRatio; + a.position.left = c.helper ? d.left : 0; + } + if (f.top < (a._helper ? d.top : 0)) { + a.size.height += a._helper ? a.position.top - d.top : a.position.top; + if (b) a.size.width = a.size.height * c.aspectRatio; + a.position.top = a._helper ? d.top : 0; + } + a.offset.left = a.parentData.left + a.position.left; + a.offset.top = a.parentData.top + a.position.top; + c = Math.abs( + (a._helper ? a.offset.left - g.left : a.offset.left - g.left) + + a.sizeDiff.width, + ); + d = Math.abs( + (a._helper ? a.offset.top - g.top : a.offset.top - d.top) + + a.sizeDiff.height, + ); + f = a.containerElement.get(0) == a.element.parent().get(0); + g = /relative|absolute/.test(a.containerElement.css("position")); + if (f && g) c -= a.parentData.left; + if (c + a.size.width >= a.parentData.width) { + a.size.width = a.parentData.width - c; + if (b) a.size.height = a.size.width / a.aspectRatio; + } + if (d + a.size.height >= a.parentData.height) { + a.size.height = a.parentData.height - d; + if (b) a.size.width = a.size.height * a.aspectRatio; + } + }, + stop: function () { + var b = e(this).data("resizable"), + a = b.options, + c = b.containerOffset, + d = b.containerPosition, + f = b.containerElement, + g = e(b.helper), + h = g.offset(), + i = g.outerWidth() - b.sizeDiff.width; + g = g.outerHeight() - b.sizeDiff.height; + b._helper && + !a.animate && + /relative/.test(f.css("position")) && + e(this).css({ left: h.left - d.left - c.left, width: i, height: g }); + b._helper && + !a.animate && + /static/.test(f.css("position")) && + e(this).css({ left: h.left - d.left - c.left, width: i, height: g }); + }, + }); + e.ui.plugin.add("resizable", "ghost", { + start: function () { + var b = e(this).data("resizable"), + a = b.options, + c = b.size; + b.ghost = b.originalElement.clone(); + b.ghost + .css({ + opacity: 0.25, + display: "block", + position: "relative", + height: c.height, + width: c.width, + margin: 0, + left: 0, + top: 0, + }) + .addClass("ui-resizable-ghost") + .addClass(typeof a.ghost == "string" ? a.ghost : ""); + b.ghost.appendTo(b.helper); + }, + resize: function () { + var b = e(this).data("resizable"); + b.ghost && + b.ghost.css({ + position: "relative", + height: b.size.height, + width: b.size.width, + }); + }, + stop: function () { + var b = e(this).data("resizable"); + b.ghost && b.helper && b.helper.get(0).removeChild(b.ghost.get(0)); + }, + }); + e.ui.plugin.add("resizable", "grid", { + resize: function () { + var b = e(this).data("resizable"), + a = b.options, + c = b.size, + d = b.originalSize, + f = b.originalPosition, + g = b.axis; + a.grid = typeof a.grid == "number" ? [a.grid, a.grid] : a.grid; + var h = + Math.round((c.width - d.width) / (a.grid[0] || 1)) * (a.grid[0] || 1); + a = + Math.round((c.height - d.height) / (a.grid[1] || 1)) * (a.grid[1] || 1); + if (/^(se|s|e)$/.test(g)) { + b.size.width = d.width + h; + b.size.height = d.height + a; + } else if (/^(ne)$/.test(g)) { + b.size.width = d.width + h; + b.size.height = d.height + a; + b.position.top = f.top - a; + } else { + if (/^(sw)$/.test(g)) { + b.size.width = d.width + h; + b.size.height = d.height + a; + } else { + b.size.width = d.width + h; + b.size.height = d.height + a; + b.position.top = f.top - a; + } + b.position.left = f.left - h; + } + }, + }); + var m = function (b) { + return parseInt(b, 10) || 0; + }, + l = function (b) { + return !isNaN(parseInt(b, 10)); + }; +})(jQuery); /* * jQuery UI Selectable 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -200,15 +2610,196 @@ b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.widt * jquery.ui.mouse.js * jquery.ui.widget.js */ -(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"), -selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("
        ")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, -c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting", -c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d= -this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.righti||a.bottomb&&a.rightg&&a.bottom"); + }, + destroy: function () { + this.selectees.removeClass("ui-selectee").removeData("selectable-item"); + this.element + .removeClass("ui-selectable ui-selectable-disabled") + .removeData("selectable") + .unbind(".selectable"); + this._mouseDestroy(); + return this; + }, + _mouseStart: function (c) { + var f = this; + this.opos = [c.pageX, c.pageY]; + if (!this.options.disabled) { + var d = this.options; + this.selectees = e(d.filter, this.element[0]); + this._trigger("start", c); + e(d.appendTo).append(this.helper); + this.helper.css({ + left: c.clientX, + top: c.clientY, + width: 0, + height: 0, + }); + d.autoRefresh && this.refresh(); + this.selectees.filter(".ui-selected").each(function () { + var b = e.data(this, "selectable-item"); + b.startselected = true; + if (!c.metaKey) { + b.$element.removeClass("ui-selected"); + b.selected = false; + b.$element.addClass("ui-unselecting"); + b.unselecting = true; + f._trigger("unselecting", c, { unselecting: b.element }); + } + }); + e(c.target) + .parents() + .andSelf() + .each(function () { + var b = e.data(this, "selectable-item"); + if (b) { + var g = !c.metaKey || !b.$element.hasClass("ui-selected"); + b.$element + .removeClass(g ? "ui-unselecting" : "ui-selected") + .addClass(g ? "ui-selecting" : "ui-unselecting"); + b.unselecting = !g; + b.selecting = g; + (b.selected = g) + ? f._trigger("selecting", c, { selecting: b.element }) + : f._trigger("unselecting", c, { unselecting: b.element }); + return false; + } + }); + } + }, + _mouseDrag: function (c) { + var f = this; + this.dragged = true; + if (!this.options.disabled) { + var d = this.options, + b = this.opos[0], + g = this.opos[1], + h = c.pageX, + i = c.pageY; + if (b > h) { + var j = h; + h = b; + b = j; + } + if (g > i) { + j = i; + i = g; + g = j; + } + this.helper.css({ left: b, top: g, width: h - b, height: i - g }); + this.selectees.each(function () { + var a = e.data(this, "selectable-item"); + if (!(!a || a.element == f.element[0])) { + var k = false; + if (d.tolerance == "touch") + k = !(a.left > h || a.right < b || a.top > i || a.bottom < g); + else if (d.tolerance == "fit") + k = a.left > b && a.right < h && a.top > g && a.bottom < i; + if (k) { + if (a.selected) { + a.$element.removeClass("ui-selected"); + a.selected = false; + } + if (a.unselecting) { + a.$element.removeClass("ui-unselecting"); + a.unselecting = false; + } + if (!a.selecting) { + a.$element.addClass("ui-selecting"); + a.selecting = true; + f._trigger("selecting", c, { selecting: a.element }); + } + } else { + if (a.selecting) + if (c.metaKey && a.startselected) { + a.$element.removeClass("ui-selecting"); + a.selecting = false; + a.$element.addClass("ui-selected"); + a.selected = true; + } else { + a.$element.removeClass("ui-selecting"); + a.selecting = false; + if (a.startselected) { + a.$element.addClass("ui-unselecting"); + a.unselecting = true; + } + f._trigger("unselecting", c, { unselecting: a.element }); + } + if (a.selected) + if (!c.metaKey && !a.startselected) { + a.$element.removeClass("ui-selected"); + a.selected = false; + a.$element.addClass("ui-unselecting"); + a.unselecting = true; + f._trigger("unselecting", c, { unselecting: a.element }); + } + } + } + }); + return false; + } + }, + _mouseStop: function (c) { + var f = this; + this.dragged = false; + e(".ui-unselecting", this.element[0]).each(function () { + var d = e.data(this, "selectable-item"); + d.$element.removeClass("ui-unselecting"); + d.unselecting = false; + d.startselected = false; + f._trigger("unselected", c, { unselected: d.element }); + }); + e(".ui-selecting", this.element[0]).each(function () { + var d = e.data(this, "selectable-item"); + d.$element.removeClass("ui-selecting").addClass("ui-selected"); + d.selecting = false; + d.selected = true; + d.startselected = true; + f._trigger("selected", c, { selected: d.element }); + }); + this._trigger("stop", c); + this.helper.remove(); + return false; + }, + }); + e.extend(e.ui.selectable, { version: "1.8.11" }); +})(jQuery); /* * jQuery UI Sortable 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -222,53 +2813,1039 @@ e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass(" * jquery.ui.mouse.js * jquery.ui.widget.js */ -(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable"); -this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]= -b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false; -d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left- -this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]}; -this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!= -document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a); -return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0], -e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset(); -c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"): -this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null, -dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")}, -toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+jg&&b+la[this.floating?"width":"height"]?j:g0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith(); -if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), -this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h=0;b--){var c=this.items[b],e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left= -e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; -if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder); -c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length=== -1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top< -this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left=0;e--)if(d.ui.contains(this.containers[e].element[0], -this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out", -g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(e=0;e *", + opacity: false, + placeholder: false, + revert: false, + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1e3, + }, + _create: function () { + this.containerCache = {}; + this.element.addClass("ui-sortable"); + this.refresh(); + this.floating = this.items.length + ? /left|right/.test(this.items[0].item.css("float")) || + /inline|table-cell/.test(this.items[0].item.css("display")) + : false; + this.offset = this.element.offset(); + this._mouseInit(); + }, + destroy: function () { + this.element + .removeClass("ui-sortable ui-sortable-disabled") + .removeData("sortable") + .unbind(".sortable"); + this._mouseDestroy(); + for (var a = this.items.length - 1; a >= 0; a--) + this.items[a].item.removeData("sortable-item"); + return this; + }, + _setOption: function (a, b) { + if (a === "disabled") { + this.options[a] = b; + this.widget()[b ? "addClass" : "removeClass"]("ui-sortable-disabled"); + } else d.Widget.prototype._setOption.apply(this, arguments); + }, + _mouseCapture: function (a, b) { + if (this.reverting) return false; + if (this.options.disabled || this.options.type == "static") return false; + this._refreshItems(a); + var c = null, + e = this; + d(a.target) + .parents() + .each(function () { + if (d.data(this, "sortable-item") == e) { + c = d(this); + return false; + } + }); + if (d.data(a.target, "sortable-item") == e) c = d(a.target); + if (!c) return false; + if (this.options.handle && !b) { + var f = false; + d(this.options.handle, c) + .find("*") + .andSelf() + .each(function () { + if (this == a.target) f = true; + }); + if (!f) return false; + } + this.currentItem = c; + this._removeCurrentsFromItems(); + return true; + }, + _mouseStart: function (a, b, c) { + b = this.options; + var e = this; + this.currentContainer = this; + this.refreshPositions(); + this.helper = this._createHelper(a); + this._cacheHelperProportions(); + this._cacheMargins(); + this.scrollParent = this.helper.scrollParent(); + this.offset = this.currentItem.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left, + }; + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + d.extend(this.offset, { + click: { + left: a.pageX - this.offset.left, + top: a.pageY - this.offset.top, + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset(), + }); + this.originalPosition = this._generatePosition(a); + this.originalPageX = a.pageX; + this.originalPageY = a.pageY; + b.cursorAt && this._adjustOffsetFromHelper(b.cursorAt); + this.domPosition = { + prev: this.currentItem.prev()[0], + parent: this.currentItem.parent()[0], + }; + this.helper[0] != this.currentItem[0] && this.currentItem.hide(); + this._createPlaceholder(); + b.containment && this._setContainment(); + if (b.cursor) { + if (d("body").css("cursor")) + this._storedCursor = d("body").css("cursor"); + d("body").css("cursor", b.cursor); + } + if (b.opacity) { + if (this.helper.css("opacity")) + this._storedOpacity = this.helper.css("opacity"); + this.helper.css("opacity", b.opacity); + } + if (b.zIndex) { + if (this.helper.css("zIndex")) + this._storedZIndex = this.helper.css("zIndex"); + this.helper.css("zIndex", b.zIndex); + } + if ( + this.scrollParent[0] != document && + this.scrollParent[0].tagName != "HTML" + ) + this.overflowOffset = this.scrollParent.offset(); + this._trigger("start", a, this._uiHash()); + this._preserveHelperProportions || this._cacheHelperProportions(); + if (!c) + for (c = this.containers.length - 1; c >= 0; c--) + this.containers[c]._trigger("activate", a, e._uiHash(this)); + if (d.ui.ddmanager) d.ui.ddmanager.current = this; + d.ui.ddmanager && + !b.dropBehaviour && + d.ui.ddmanager.prepareOffsets(this, a); + this.dragging = true; + this.helper.addClass("ui-sortable-helper"); + this._mouseDrag(a); + return true; + }, + _mouseDrag: function (a) { + this.position = this._generatePosition(a); + this.positionAbs = this._convertPositionTo("absolute"); + if (!this.lastPositionAbs) this.lastPositionAbs = this.positionAbs; + if (this.options.scroll) { + var b = this.options, + c = false; + if ( + this.scrollParent[0] != document && + this.scrollParent[0].tagName != "HTML" + ) { + if ( + this.overflowOffset.top + + this.scrollParent[0].offsetHeight - + a.pageY < + b.scrollSensitivity + ) + this.scrollParent[0].scrollTop = c = + this.scrollParent[0].scrollTop + b.scrollSpeed; + else if (a.pageY - this.overflowOffset.top < b.scrollSensitivity) + this.scrollParent[0].scrollTop = c = + this.scrollParent[0].scrollTop - b.scrollSpeed; + if ( + this.overflowOffset.left + + this.scrollParent[0].offsetWidth - + a.pageX < + b.scrollSensitivity + ) + this.scrollParent[0].scrollLeft = c = + this.scrollParent[0].scrollLeft + b.scrollSpeed; + else if (a.pageX - this.overflowOffset.left < b.scrollSensitivity) + this.scrollParent[0].scrollLeft = c = + this.scrollParent[0].scrollLeft - b.scrollSpeed; + } else { + if (a.pageY - d(document).scrollTop() < b.scrollSensitivity) + c = d(document).scrollTop(d(document).scrollTop() - b.scrollSpeed); + else if ( + d(window).height() - (a.pageY - d(document).scrollTop()) < + b.scrollSensitivity + ) + c = d(document).scrollTop(d(document).scrollTop() + b.scrollSpeed); + if (a.pageX - d(document).scrollLeft() < b.scrollSensitivity) + c = d(document).scrollLeft( + d(document).scrollLeft() - b.scrollSpeed, + ); + else if ( + d(window).width() - (a.pageX - d(document).scrollLeft()) < + b.scrollSensitivity + ) + c = d(document).scrollLeft( + d(document).scrollLeft() + b.scrollSpeed, + ); + } + c !== false && + d.ui.ddmanager && + !b.dropBehaviour && + d.ui.ddmanager.prepareOffsets(this, a); + } + this.positionAbs = this._convertPositionTo("absolute"); + if (!this.options.axis || this.options.axis != "y") + this.helper[0].style.left = this.position.left + "px"; + if (!this.options.axis || this.options.axis != "x") + this.helper[0].style.top = this.position.top + "px"; + for (b = this.items.length - 1; b >= 0; b--) { + c = this.items[b]; + var e = c.item[0], + f = this._intersectsWithPointer(c); + if (f) + if ( + e != this.currentItem[0] && + this.placeholder[f == 1 ? "next" : "prev"]()[0] != e && + !d.ui.contains(this.placeholder[0], e) && + (this.options.type == "semi-dynamic" + ? !d.ui.contains(this.element[0], e) + : true) + ) { + this.direction = f == 1 ? "down" : "up"; + if ( + this.options.tolerance == "pointer" || + this._intersectsWithSides(c) + ) + this._rearrange(a, c); + else break; + this._trigger("change", a, this._uiHash()); + break; + } + } + this._contactContainers(a); + d.ui.ddmanager && d.ui.ddmanager.drag(this, a); + this._trigger("sort", a, this._uiHash()); + this.lastPositionAbs = this.positionAbs; + return false; + }, + _mouseStop: function (a, b) { + if (a) { + d.ui.ddmanager && + !this.options.dropBehaviour && + d.ui.ddmanager.drop(this, a); + if (this.options.revert) { + var c = this; + b = c.placeholder.offset(); + c.reverting = true; + d(this.helper).animate( + { + left: + b.left - + this.offset.parent.left - + c.margins.left + + (this.offsetParent[0] == document.body + ? 0 + : this.offsetParent[0].scrollLeft), + top: + b.top - + this.offset.parent.top - + c.margins.top + + (this.offsetParent[0] == document.body + ? 0 + : this.offsetParent[0].scrollTop), + }, + parseInt(this.options.revert, 10) || 500, + function () { + c._clear(a); + }, + ); + } else this._clear(a, b); + return false; + } + }, + cancel: function () { + var a = this; + if (this.dragging) { + this._mouseUp({ target: null }); + this.options.helper == "original" + ? this.currentItem + .css(this._storedCSS) + .removeClass("ui-sortable-helper") + : this.currentItem.show(); + for (var b = this.containers.length - 1; b >= 0; b--) { + this.containers[b]._trigger("deactivate", null, a._uiHash(this)); + if (this.containers[b].containerCache.over) { + this.containers[b]._trigger("out", null, a._uiHash(this)); + this.containers[b].containerCache.over = 0; + } + } + } + if (this.placeholder) { + this.placeholder[0].parentNode && + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + this.options.helper != "original" && + this.helper && + this.helper[0].parentNode && + this.helper.remove(); + d.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null, + }); + this.domPosition.prev + ? d(this.domPosition.prev).after(this.currentItem) + : d(this.domPosition.parent).prepend(this.currentItem); + } + return this; + }, + serialize: function (a) { + var b = this._getItemsAsjQuery(a && a.connected), + c = []; + a = a || {}; + d(b).each(function () { + var e = (d(a.item || this).attr(a.attribute || "id") || "").match( + a.expression || /(.+)[-=_](.+)/, + ); + if (e) + c.push( + (a.key || e[1] + "[]") + + "=" + + (a.key && a.expression ? e[1] : e[2]), + ); + }); + !c.length && a.key && c.push(a.key + "="); + return c.join("&"); + }, + toArray: function (a) { + var b = this._getItemsAsjQuery(a && a.connected), + c = []; + a = a || {}; + b.each(function () { + c.push(d(a.item || this).attr(a.attribute || "id") || ""); + }); + return c; + }, + _intersectsWith: function (a) { + var b = this.positionAbs.left, + c = b + this.helperProportions.width, + e = this.positionAbs.top, + f = e + this.helperProportions.height, + g = a.left, + h = g + a.width, + i = a.top, + k = i + a.height, + j = this.offset.click.top, + l = this.offset.click.left; + j = e + j > i && e + j < k && b + l > g && b + l < h; + return this.options.tolerance == "pointer" || + this.options.forcePointerForContainers || + (this.options.tolerance != "pointer" && + this.helperProportions[this.floating ? "width" : "height"] > + a[this.floating ? "width" : "height"]) + ? j + : g < b + this.helperProportions.width / 2 && + c - this.helperProportions.width / 2 < h && + i < e + this.helperProportions.height / 2 && + f - this.helperProportions.height / 2 < k; + }, + _intersectsWithPointer: function (a) { + var b = d.ui.isOverAxis( + this.positionAbs.top + this.offset.click.top, + a.top, + a.height, + ); + a = d.ui.isOverAxis( + this.positionAbs.left + this.offset.click.left, + a.left, + a.width, + ); + b = b && a; + a = this._getDragVerticalDirection(); + var c = this._getDragHorizontalDirection(); + if (!b) return false; + return this.floating + ? (c && c == "right") || a == "down" + ? 2 + : 1 + : a && (a == "down" ? 2 : 1); + }, + _intersectsWithSides: function (a) { + var b = d.ui.isOverAxis( + this.positionAbs.top + this.offset.click.top, + a.top + a.height / 2, + a.height, + ); + a = d.ui.isOverAxis( + this.positionAbs.left + this.offset.click.left, + a.left + a.width / 2, + a.width, + ); + var c = this._getDragVerticalDirection(), + e = this._getDragHorizontalDirection(); + return this.floating && e + ? (e == "right" && a) || (e == "left" && !a) + : c && ((c == "down" && b) || (c == "up" && !b)); + }, + _getDragVerticalDirection: function () { + var a = this.positionAbs.top - this.lastPositionAbs.top; + return a != 0 && (a > 0 ? "down" : "up"); + }, + _getDragHorizontalDirection: function () { + var a = this.positionAbs.left - this.lastPositionAbs.left; + return a != 0 && (a > 0 ? "right" : "left"); + }, + refresh: function (a) { + this._refreshItems(a); + this.refreshPositions(); + return this; + }, + _connectWith: function () { + var a = this.options; + return a.connectWith.constructor == String + ? [a.connectWith] + : a.connectWith; + }, + _getItemsAsjQuery: function (a) { + var b = [], + c = [], + e = this._connectWith(); + if (e && a) + for (a = e.length - 1; a >= 0; a--) + for (var f = d(e[a]), g = f.length - 1; g >= 0; g--) { + var h = d.data(f[g], "sortable"); + if (h && h != this && !h.options.disabled) + c.push([ + d.isFunction(h.options.items) + ? h.options.items.call(h.element) + : d(h.options.items, h.element) + .not(".ui-sortable-helper") + .not(".ui-sortable-placeholder"), + h, + ]); + } + c.push([ + d.isFunction(this.options.items) + ? this.options.items.call(this.element, null, { + options: this.options, + item: this.currentItem, + }) + : d(this.options.items, this.element) + .not(".ui-sortable-helper") + .not(".ui-sortable-placeholder"), + this, + ]); + for (a = c.length - 1; a >= 0; a--) + c[a][0].each(function () { + b.push(this); + }); + return d(b); + }, + _removeCurrentsFromItems: function () { + for ( + var a = this.currentItem.find(":data(sortable-item)"), b = 0; + b < this.items.length; + b++ + ) + for (var c = 0; c < a.length; c++) + a[c] == this.items[b].item[0] && this.items.splice(b, 1); + }, + _refreshItems: function (a) { + this.items = []; + this.containers = [this]; + var b = this.items, + c = [ + [ + d.isFunction(this.options.items) + ? this.options.items.call(this.element[0], a, { + item: this.currentItem, + }) + : d(this.options.items, this.element), + this, + ], + ], + e = this._connectWith(); + if (e) + for (var f = e.length - 1; f >= 0; f--) + for (var g = d(e[f]), h = g.length - 1; h >= 0; h--) { + var i = d.data(g[h], "sortable"); + if (i && i != this && !i.options.disabled) { + c.push([ + d.isFunction(i.options.items) + ? i.options.items.call(i.element[0], a, { + item: this.currentItem, + }) + : d(i.options.items, i.element), + i, + ]); + this.containers.push(i); + } + } + for (f = c.length - 1; f >= 0; f--) { + a = c[f][1]; + e = c[f][0]; + h = 0; + for (g = e.length; h < g; h++) { + i = d(e[h]); + i.data("sortable-item", a); + b.push({ + item: i, + instance: a, + width: 0, + height: 0, + left: 0, + top: 0, + }); + } + } + }, + refreshPositions: function (a) { + if (this.offsetParent && this.helper) + this.offset.parent = this._getParentOffset(); + for (var b = this.items.length - 1; b >= 0; b--) { + var c = this.items[b], + e = this.options.toleranceElement + ? d(this.options.toleranceElement, c.item) + : c.item; + if (!a) { + c.width = e.outerWidth(); + c.height = e.outerHeight(); + } + e = e.offset(); + c.left = e.left; + c.top = e.top; + } + if (this.options.custom && this.options.custom.refreshContainers) + this.options.custom.refreshContainers.call(this); + else + for (b = this.containers.length - 1; b >= 0; b--) { + e = this.containers[b].element.offset(); + this.containers[b].containerCache.left = e.left; + this.containers[b].containerCache.top = e.top; + this.containers[b].containerCache.width = + this.containers[b].element.outerWidth(); + this.containers[b].containerCache.height = + this.containers[b].element.outerHeight(); + } + return this; + }, + _createPlaceholder: function (a) { + var b = a || this, + c = b.options; + if (!c.placeholder || c.placeholder.constructor == String) { + var e = c.placeholder; + c.placeholder = { + element: function () { + var f = d(document.createElement(b.currentItem[0].nodeName)) + .addClass( + e || b.currentItem[0].className + " ui-sortable-placeholder", + ) + .removeClass("ui-sortable-helper")[0]; + if (!e) f.style.visibility = "hidden"; + return f; + }, + update: function (f, g) { + if (!(e && !c.forcePlaceholderSize)) { + g.height() || + g.height( + b.currentItem.innerHeight() - + parseInt(b.currentItem.css("paddingTop") || 0, 10) - + parseInt(b.currentItem.css("paddingBottom") || 0, 10), + ); + g.width() || + g.width( + b.currentItem.innerWidth() - + parseInt(b.currentItem.css("paddingLeft") || 0, 10) - + parseInt(b.currentItem.css("paddingRight") || 0, 10), + ); + } + }, + }; + } + b.placeholder = d(c.placeholder.element.call(b.element, b.currentItem)); + b.currentItem.after(b.placeholder); + c.placeholder.update(b, b.placeholder); + }, + _contactContainers: function (a) { + for (var b = null, c = null, e = this.containers.length - 1; e >= 0; e--) + if (!d.ui.contains(this.currentItem[0], this.containers[e].element[0])) + if (this._intersectsWith(this.containers[e].containerCache)) { + if ( + !(b && d.ui.contains(this.containers[e].element[0], b.element[0])) + ) { + b = this.containers[e]; + c = e; + } + } else if (this.containers[e].containerCache.over) { + this.containers[e]._trigger("out", a, this._uiHash(this)); + this.containers[e].containerCache.over = 0; + } + if (b) + if (this.containers.length === 1) { + this.containers[c]._trigger("over", a, this._uiHash(this)); + this.containers[c].containerCache.over = 1; + } else if (this.currentContainer != this.containers[c]) { + b = 1e4; + e = null; + for ( + var f = + this.positionAbs[this.containers[c].floating ? "left" : "top"], + g = this.items.length - 1; + g >= 0; + g-- + ) + if ( + d.ui.contains( + this.containers[c].element[0], + this.items[g].item[0], + ) + ) { + var h = + this.items[g][this.containers[c].floating ? "left" : "top"]; + if (Math.abs(h - f) < b) { + b = Math.abs(h - f); + e = this.items[g]; + } + } + if (e || this.options.dropOnEmpty) { + this.currentContainer = this.containers[c]; + e + ? this._rearrange(a, e, null, true) + : this._rearrange(a, null, this.containers[c].element, true); + this._trigger("change", a, this._uiHash()); + this.containers[c]._trigger("change", a, this._uiHash(this)); + this.options.placeholder.update( + this.currentContainer, + this.placeholder, + ); + this.containers[c]._trigger("over", a, this._uiHash(this)); + this.containers[c].containerCache.over = 1; + } + } + }, + _createHelper: function (a) { + var b = this.options; + a = d.isFunction(b.helper) + ? d(b.helper.apply(this.element[0], [a, this.currentItem])) + : b.helper == "clone" + ? this.currentItem.clone() + : this.currentItem; + a.parents("body").length || + d( + b.appendTo != "parent" ? b.appendTo : this.currentItem[0].parentNode, + )[0].appendChild(a[0]); + if (a[0] == this.currentItem[0]) + this._storedCSS = { + width: this.currentItem[0].style.width, + height: this.currentItem[0].style.height, + position: this.currentItem.css("position"), + top: this.currentItem.css("top"), + left: this.currentItem.css("left"), + }; + if (a[0].style.width == "" || b.forceHelperSize) + a.width(this.currentItem.width()); + if (a[0].style.height == "" || b.forceHelperSize) + a.height(this.currentItem.height()); + return a; + }, + _adjustOffsetFromHelper: function (a) { + if (typeof a == "string") a = a.split(" "); + if (d.isArray(a)) a = { left: +a[0], top: +a[1] || 0 }; + if ("left" in a) this.offset.click.left = a.left + this.margins.left; + if ("right" in a) + this.offset.click.left = + this.helperProportions.width - a.right + this.margins.left; + if ("top" in a) this.offset.click.top = a.top + this.margins.top; + if ("bottom" in a) + this.offset.click.top = + this.helperProportions.height - a.bottom + this.margins.top; + }, + _getParentOffset: function () { + this.offsetParent = this.helper.offsetParent(); + var a = this.offsetParent.offset(); + if ( + this.cssPosition == "absolute" && + this.scrollParent[0] != document && + d.ui.contains(this.scrollParent[0], this.offsetParent[0]) + ) { + a.left += this.scrollParent.scrollLeft(); + a.top += this.scrollParent.scrollTop(); + } + if ( + this.offsetParent[0] == document.body || + (this.offsetParent[0].tagName && + this.offsetParent[0].tagName.toLowerCase() == "html" && + d.browser.msie) + ) + a = { top: 0, left: 0 }; + return { + top: + a.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), + left: + a.left + + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0), + }; + }, + _getRelativeOffset: function () { + if (this.cssPosition == "relative") { + var a = this.currentItem.position(); + return { + top: + a.top - + (parseInt(this.helper.css("top"), 10) || 0) + + this.scrollParent.scrollTop(), + left: + a.left - + (parseInt(this.helper.css("left"), 10) || 0) + + this.scrollParent.scrollLeft(), + }; + } else return { top: 0, left: 0 }; + }, + _cacheMargins: function () { + this.margins = { + left: parseInt(this.currentItem.css("marginLeft"), 10) || 0, + top: parseInt(this.currentItem.css("marginTop"), 10) || 0, + }; + }, + _cacheHelperProportions: function () { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight(), + }; + }, + _setContainment: function () { + var a = this.options; + if (a.containment == "parent") a.containment = this.helper[0].parentNode; + if (a.containment == "document" || a.containment == "window") + this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + d(a.containment == "document" ? document : window).width() - + this.helperProportions.width - + this.margins.left, + (d(a.containment == "document" ? document : window).height() || + document.body.parentNode.scrollHeight) - + this.helperProportions.height - + this.margins.top, + ]; + if (!/^(document|window|parent)$/.test(a.containment)) { + var b = d(a.containment)[0]; + a = d(a.containment).offset(); + var c = d(b).css("overflow") != "hidden"; + this.containment = [ + a.left + + (parseInt(d(b).css("borderLeftWidth"), 10) || 0) + + (parseInt(d(b).css("paddingLeft"), 10) || 0) - + this.margins.left, + a.top + + (parseInt(d(b).css("borderTopWidth"), 10) || 0) + + (parseInt(d(b).css("paddingTop"), 10) || 0) - + this.margins.top, + a.left + + (c ? Math.max(b.scrollWidth, b.offsetWidth) : b.offsetWidth) - + (parseInt(d(b).css("borderLeftWidth"), 10) || 0) - + (parseInt(d(b).css("paddingRight"), 10) || 0) - + this.helperProportions.width - + this.margins.left, + a.top + + (c ? Math.max(b.scrollHeight, b.offsetHeight) : b.offsetHeight) - + (parseInt(d(b).css("borderTopWidth"), 10) || 0) - + (parseInt(d(b).css("paddingBottom"), 10) || 0) - + this.helperProportions.height - + this.margins.top, + ]; + } + }, + _convertPositionTo: function (a, b) { + if (!b) b = this.position; + a = a == "absolute" ? 1 : -1; + var c = + this.cssPosition == "absolute" && + !( + this.scrollParent[0] != document && + d.ui.contains(this.scrollParent[0], this.offsetParent[0]) + ) + ? this.offsetParent + : this.scrollParent, + e = /(html|body)/i.test(c[0].tagName); + return { + top: + b.top + + this.offset.relative.top * a + + this.offset.parent.top * a - + (d.browser.safari && this.cssPosition == "fixed" + ? 0 + : (this.cssPosition == "fixed" + ? -this.scrollParent.scrollTop() + : e + ? 0 + : c.scrollTop()) * a), + left: + b.left + + this.offset.relative.left * a + + this.offset.parent.left * a - + (d.browser.safari && this.cssPosition == "fixed" + ? 0 + : (this.cssPosition == "fixed" + ? -this.scrollParent.scrollLeft() + : e + ? 0 + : c.scrollLeft()) * a), + }; + }, + _generatePosition: function (a) { + var b = this.options, + c = + this.cssPosition == "absolute" && + !( + this.scrollParent[0] != document && + d.ui.contains(this.scrollParent[0], this.offsetParent[0]) + ) + ? this.offsetParent + : this.scrollParent, + e = /(html|body)/i.test(c[0].tagName); + if ( + this.cssPosition == "relative" && + !( + this.scrollParent[0] != document && + this.scrollParent[0] != this.offsetParent[0] + ) + ) + this.offset.relative = this._getRelativeOffset(); + var f = a.pageX, + g = a.pageY; + if (this.originalPosition) { + if (this.containment) { + if (a.pageX - this.offset.click.left < this.containment[0]) + f = this.containment[0] + this.offset.click.left; + if (a.pageY - this.offset.click.top < this.containment[1]) + g = this.containment[1] + this.offset.click.top; + if (a.pageX - this.offset.click.left > this.containment[2]) + f = this.containment[2] + this.offset.click.left; + if (a.pageY - this.offset.click.top > this.containment[3]) + g = this.containment[3] + this.offset.click.top; + } + if (b.grid) { + g = + this.originalPageY + + Math.round((g - this.originalPageY) / b.grid[1]) * b.grid[1]; + g = this.containment + ? !( + g - this.offset.click.top < this.containment[1] || + g - this.offset.click.top > this.containment[3] + ) + ? g + : !(g - this.offset.click.top < this.containment[1]) + ? g - b.grid[1] + : g + b.grid[1] + : g; + f = + this.originalPageX + + Math.round((f - this.originalPageX) / b.grid[0]) * b.grid[0]; + f = this.containment + ? !( + f - this.offset.click.left < this.containment[0] || + f - this.offset.click.left > this.containment[2] + ) + ? f + : !(f - this.offset.click.left < this.containment[0]) + ? f - b.grid[0] + : f + b.grid[0] + : f; + } + } + return { + top: + g - + this.offset.click.top - + this.offset.relative.top - + this.offset.parent.top + + (d.browser.safari && this.cssPosition == "fixed" + ? 0 + : this.cssPosition == "fixed" + ? -this.scrollParent.scrollTop() + : e + ? 0 + : c.scrollTop()), + left: + f - + this.offset.click.left - + this.offset.relative.left - + this.offset.parent.left + + (d.browser.safari && this.cssPosition == "fixed" + ? 0 + : this.cssPosition == "fixed" + ? -this.scrollParent.scrollLeft() + : e + ? 0 + : c.scrollLeft()), + }; + }, + _rearrange: function (a, b, c, e) { + c + ? c[0].appendChild(this.placeholder[0]) + : b.item[0].parentNode.insertBefore( + this.placeholder[0], + this.direction == "down" ? b.item[0] : b.item[0].nextSibling, + ); + this.counter = this.counter ? ++this.counter : 1; + var f = this, + g = this.counter; + window.setTimeout(function () { + g == f.counter && f.refreshPositions(!e); + }, 0); + }, + _clear: function (a, b) { + this.reverting = false; + var c = []; + !this._noFinalSort && + this.currentItem[0].parentNode && + this.placeholder.before(this.currentItem); + this._noFinalSort = null; + if (this.helper[0] == this.currentItem[0]) { + for (var e in this._storedCSS) + if (this._storedCSS[e] == "auto" || this._storedCSS[e] == "static") + this._storedCSS[e] = ""; + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else this.currentItem.show(); + this.fromOutside && + !b && + c.push(function (f) { + this._trigger("receive", f, this._uiHash(this.fromOutside)); + }); + if ( + (this.fromOutside || + this.domPosition.prev != + this.currentItem.prev().not(".ui-sortable-helper")[0] || + this.domPosition.parent != this.currentItem.parent()[0]) && + !b + ) + c.push(function (f) { + this._trigger("update", f, this._uiHash()); + }); + if (!d.ui.contains(this.element[0], this.currentItem[0])) { + b || + c.push(function (f) { + this._trigger("remove", f, this._uiHash()); + }); + for (e = this.containers.length - 1; e >= 0; e--) + if ( + d.ui.contains(this.containers[e].element[0], this.currentItem[0]) && + !b + ) { + c.push( + function (f) { + return function (g) { + f._trigger("receive", g, this._uiHash(this)); + }; + }.call(this, this.containers[e]), + ); + c.push( + function (f) { + return function (g) { + f._trigger("update", g, this._uiHash(this)); + }; + }.call(this, this.containers[e]), + ); + } + } + for (e = this.containers.length - 1; e >= 0; e--) { + b || + c.push( + function (f) { + return function (g) { + f._trigger("deactivate", g, this._uiHash(this)); + }; + }.call(this, this.containers[e]), + ); + if (this.containers[e].containerCache.over) { + c.push( + function (f) { + return function (g) { + f._trigger("out", g, this._uiHash(this)); + }; + }.call(this, this.containers[e]), + ); + this.containers[e].containerCache.over = 0; + } + } + this._storedCursor && d("body").css("cursor", this._storedCursor); + this._storedOpacity && this.helper.css("opacity", this._storedOpacity); + if (this._storedZIndex) + this.helper.css( + "zIndex", + this._storedZIndex == "auto" ? "" : this._storedZIndex, + ); + this.dragging = false; + if (this.cancelHelperRemoval) { + if (!b) { + this._trigger("beforeStop", a, this._uiHash()); + for (e = 0; e < c.length; e++) c[e].call(this, a); + this._trigger("stop", a, this._uiHash()); + } + return false; + } + b || this._trigger("beforeStop", a, this._uiHash()); + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + this.helper[0] != this.currentItem[0] && this.helper.remove(); + this.helper = null; + if (!b) { + for (e = 0; e < c.length; e++) c[e].call(this, a); + this._trigger("stop", a, this._uiHash()); + } + this.fromOutside = false; + return true; + }, + _trigger: function () { + d.Widget.prototype._trigger.apply(this, arguments) === false && + this.cancel(); + }, + _uiHash: function (a) { + var b = a || this; + return { + helper: b.helper, + placeholder: b.placeholder || d([]), + position: b.position, + originalPosition: b.originalPosition, + offset: b.positionAbs, + item: b.currentItem, + sender: a ? a.element : null, + }; + }, + }); + d.extend(d.ui.sortable, { version: "1.8.11" }); +})(jQuery); /* * jQuery UI Accordion 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -281,24 +3858,439 @@ originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,send * jquery.ui.core.js * jquery.ui.widget.js */ -(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"); -a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); -if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion", -function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a= -this.options;if(a.icons){c("").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"); -this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons(); -b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target); -a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+ -c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options; -if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); -if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(), -e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight|| -e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false", -"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.11", -animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/); -f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide", -paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery); -;/* +(function (c) { + c.widget("ui.accordion", { + options: { + active: 0, + animated: "slide", + autoHeight: true, + clearStyle: false, + collapsible: false, + event: "click", + fillSpace: false, + header: "> li > :first-child,> :not(li):even", + icons: { + header: "ui-icon-triangle-1-e", + headerSelected: "ui-icon-triangle-1-s", + }, + navigation: false, + navigationFilter: function () { + return this.href.toLowerCase() === location.href.toLowerCase(); + }, + }, + _create: function () { + var a = this, + b = a.options; + a.running = 0; + a.element + .addClass("ui-accordion ui-widget ui-helper-reset") + .children("li") + .addClass("ui-accordion-li-fix"); + a.headers = a.element + .find(b.header) + .addClass( + "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all", + ) + .bind("mouseenter.accordion", function () { + b.disabled || c(this).addClass("ui-state-hover"); + }) + .bind("mouseleave.accordion", function () { + b.disabled || c(this).removeClass("ui-state-hover"); + }) + .bind("focus.accordion", function () { + b.disabled || c(this).addClass("ui-state-focus"); + }) + .bind("blur.accordion", function () { + b.disabled || c(this).removeClass("ui-state-focus"); + }); + a.headers + .next() + .addClass( + "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom", + ); + if (b.navigation) { + var d = a.element.find("a").filter(b.navigationFilter).eq(0); + if (d.length) { + var h = d.closest(".ui-accordion-header"); + a.active = h.length ? h : d.closest(".ui-accordion-content").prev(); + } + } + a.active = a + ._findActive(a.active || b.active) + .addClass("ui-state-default ui-state-active") + .toggleClass("ui-corner-all") + .toggleClass("ui-corner-top"); + a.active.next().addClass("ui-accordion-content-active"); + a._createIcons(); + a.resize(); + a.element.attr("role", "tablist"); + a.headers + .attr("role", "tab") + .bind("keydown.accordion", function (f) { + return a._keydown(f); + }) + .next() + .attr("role", "tabpanel"); + a.headers + .not(a.active || "") + .attr({ + "aria-expanded": "false", + "aria-selected": "false", + tabIndex: -1, + }) + .next() + .hide(); + a.active.length + ? a.active.attr({ + "aria-expanded": "true", + "aria-selected": "true", + tabIndex: 0, + }) + : a.headers.eq(0).attr("tabIndex", 0); + c.browser.safari || a.headers.find("a").attr("tabIndex", -1); + b.event && + a.headers.bind( + b.event.split(" ").join(".accordion ") + ".accordion", + function (f) { + a._clickHandler.call(a, f, this); + f.preventDefault(); + }, + ); + }, + _createIcons: function () { + var a = this.options; + if (a.icons) { + c("") + .addClass("ui-icon " + a.icons.header) + .prependTo(this.headers); + this.active + .children(".ui-icon") + .toggleClass(a.icons.header) + .toggleClass(a.icons.headerSelected); + this.element.addClass("ui-accordion-icons"); + } + }, + _destroyIcons: function () { + this.headers.children(".ui-icon").remove(); + this.element.removeClass("ui-accordion-icons"); + }, + destroy: function () { + var a = this.options; + this.element + .removeClass("ui-accordion ui-widget ui-helper-reset") + .removeAttr("role"); + this.headers + .unbind(".accordion") + .removeClass( + "ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top", + ) + .removeAttr("role") + .removeAttr("aria-expanded") + .removeAttr("aria-selected") + .removeAttr("tabIndex"); + this.headers.find("a").removeAttr("tabIndex"); + this._destroyIcons(); + var b = this.headers + .next() + .css("display", "") + .removeAttr("role") + .removeClass( + "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled", + ); + if (a.autoHeight || a.fillHeight) b.css("height", ""); + return c.Widget.prototype.destroy.call(this); + }, + _setOption: function (a, b) { + c.Widget.prototype._setOption.apply(this, arguments); + a == "active" && this.activate(b); + if (a == "icons") { + this._destroyIcons(); + b && this._createIcons(); + } + if (a == "disabled") + this.headers + .add(this.headers.next()) + [ + b ? "addClass" : "removeClass" + ]("ui-accordion-disabled ui-state-disabled"); + }, + _keydown: function (a) { + if (!(this.options.disabled || a.altKey || a.ctrlKey)) { + var b = c.ui.keyCode, + d = this.headers.length, + h = this.headers.index(a.target), + f = false; + switch (a.keyCode) { + case b.RIGHT: + case b.DOWN: + f = this.headers[(h + 1) % d]; + break; + case b.LEFT: + case b.UP: + f = this.headers[(h - 1 + d) % d]; + break; + case b.SPACE: + case b.ENTER: + this._clickHandler({ target: a.target }, a.target); + a.preventDefault(); + } + if (f) { + c(a.target).attr("tabIndex", -1); + c(f).attr("tabIndex", 0); + f.focus(); + return false; + } + return true; + } + }, + resize: function () { + var a = this.options, + b; + if (a.fillSpace) { + if (c.browser.msie) { + var d = this.element.parent().css("overflow"); + this.element.parent().css("overflow", "hidden"); + } + b = this.element.parent().height(); + c.browser.msie && this.element.parent().css("overflow", d); + this.headers.each(function () { + b -= c(this).outerHeight(true); + }); + this.headers + .next() + .each(function () { + c(this).height( + Math.max(0, b - c(this).innerHeight() + c(this).height()), + ); + }) + .css("overflow", "auto"); + } else if (a.autoHeight) { + b = 0; + this.headers + .next() + .each(function () { + b = Math.max(b, c(this).height("").height()); + }) + .height(b); + } + return this; + }, + activate: function (a) { + this.options.active = a; + a = this._findActive(a)[0]; + this._clickHandler({ target: a }, a); + return this; + }, + _findActive: function (a) { + return a + ? typeof a === "number" + ? this.headers.filter(":eq(" + a + ")") + : this.headers.not(this.headers.not(a)) + : a === false + ? c([]) + : this.headers.filter(":eq(0)"); + }, + _clickHandler: function (a, b) { + var d = this.options; + if (!d.disabled) + if (a.target) { + a = c(a.currentTarget || b); + b = a[0] === this.active[0]; + d.active = d.collapsible && b ? false : this.headers.index(a); + if (!(this.running || (!d.collapsible && b))) { + var h = this.active; + j = a.next(); + g = this.active.next(); + e = { + options: d, + newHeader: b && d.collapsible ? c([]) : a, + oldHeader: this.active, + newContent: b && d.collapsible ? c([]) : j, + oldContent: g, + }; + var f = + this.headers.index(this.active[0]) > this.headers.index(a[0]); + this.active = b ? c([]) : a; + this._toggle(j, g, e, b, f); + h.removeClass("ui-state-active ui-corner-top") + .addClass("ui-state-default ui-corner-all") + .children(".ui-icon") + .removeClass(d.icons.headerSelected) + .addClass(d.icons.header); + if (!b) { + a.removeClass("ui-state-default ui-corner-all") + .addClass("ui-state-active ui-corner-top") + .children(".ui-icon") + .removeClass(d.icons.header) + .addClass(d.icons.headerSelected); + a.next().addClass("ui-accordion-content-active"); + } + } + } else if (d.collapsible) { + this.active + .removeClass("ui-state-active ui-corner-top") + .addClass("ui-state-default ui-corner-all") + .children(".ui-icon") + .removeClass(d.icons.headerSelected) + .addClass(d.icons.header); + this.active.next().addClass("ui-accordion-content-active"); + var g = this.active.next(), + e = { + options: d, + newHeader: c([]), + oldHeader: d.active, + newContent: c([]), + oldContent: g, + }, + j = (this.active = c([])); + this._toggle(j, g, e); + } + }, + _toggle: function (a, b, d, h, f) { + var g = this, + e = g.options; + g.toShow = a; + g.toHide = b; + g.data = d; + var j = function () { + if (g) return g._completed.apply(g, arguments); + }; + g._trigger("changestart", null, g.data); + g.running = b.size() === 0 ? a.size() : b.size(); + if (e.animated) { + d = {}; + d = + e.collapsible && h + ? { + toShow: c([]), + toHide: b, + complete: j, + down: f, + autoHeight: e.autoHeight || e.fillSpace, + } + : { + toShow: a, + toHide: b, + complete: j, + down: f, + autoHeight: e.autoHeight || e.fillSpace, + }; + if (!e.proxied) e.proxied = e.animated; + if (!e.proxiedDuration) e.proxiedDuration = e.duration; + e.animated = c.isFunction(e.proxied) ? e.proxied(d) : e.proxied; + e.duration = c.isFunction(e.proxiedDuration) + ? e.proxiedDuration(d) + : e.proxiedDuration; + h = c.ui.accordion.animations; + var i = e.duration, + k = e.animated; + if (k && !h[k] && !c.easing[k]) k = "slide"; + h[k] || + (h[k] = function (l) { + this.slide(l, { easing: k, duration: i || 700 }); + }); + h[k](d); + } else { + if (e.collapsible && h) a.toggle(); + else { + b.hide(); + a.show(); + } + j(true); + } + b.prev() + .attr({ + "aria-expanded": "false", + "aria-selected": "false", + tabIndex: -1, + }) + .blur(); + a.prev() + .attr({ "aria-expanded": "true", "aria-selected": "true", tabIndex: 0 }) + .focus(); + }, + _completed: function (a) { + this.running = a ? 0 : --this.running; + if (!this.running) { + this.options.clearStyle && + this.toShow.add(this.toHide).css({ height: "", overflow: "" }); + this.toHide.removeClass("ui-accordion-content-active"); + if (this.toHide.length) + this.toHide.parent()[0].className = this.toHide.parent()[0].className; + this._trigger("change", null, this.data); + } + }, + }); + c.extend(c.ui.accordion, { + version: "1.8.11", + animations: { + slide: function (a, b) { + a = c.extend({ easing: "swing", duration: 300 }, a, b); + if (a.toHide.size()) + if (a.toShow.size()) { + var d = a.toShow.css("overflow"), + h = 0, + f = {}, + g = {}, + e; + b = a.toShow; + e = b[0].style.width; + b.width( + parseInt(b.parent().width(), 10) - + parseInt(b.css("paddingLeft"), 10) - + parseInt(b.css("paddingRight"), 10) - + (parseInt(b.css("borderLeftWidth"), 10) || 0) - + (parseInt(b.css("borderRightWidth"), 10) || 0), + ); + c.each(["height", "paddingTop", "paddingBottom"], function (j, i) { + g[i] = "hide"; + j = ("" + c.css(a.toShow[0], i)).match(/^([\d+-.]+)(.*)$/); + f[i] = { value: j[1], unit: j[2] || "px" }; + }); + a.toShow.css({ height: 0, overflow: "hidden" }).show(); + a.toHide + .filter(":hidden") + .each(a.complete) + .end() + .filter(":visible") + .animate(g, { + step: function (j, i) { + if (i.prop == "height") + h = + i.end - i.start === 0 + ? 0 + : (i.now - i.start) / (i.end - i.start); + a.toShow[0].style[i.prop] = + h * f[i.prop].value + f[i.prop].unit; + }, + duration: a.duration, + easing: a.easing, + complete: function () { + a.autoHeight || a.toShow.css("height", ""); + a.toShow.css({ width: e, overflow: d }); + a.complete(); + }, + }); + } else + a.toHide.animate( + { height: "hide", paddingTop: "hide", paddingBottom: "hide" }, + a, + ); + else + a.toShow.animate( + { height: "show", paddingTop: "show", paddingBottom: "show" }, + a, + ); + }, + bounceslide: function (a) { + this.slide(a, { + easing: a.down ? "easeOutBounce" : "swing", + duration: a.down ? 1e3 : 200, + }); + }, + }, + }); +})(jQuery); /* * jQuery UI Autocomplete 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -312,25 +4304,433 @@ paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show", * jquery.ui.widget.js * jquery.ui.position.js */ -(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){g= -false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!= -a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)}; -this.menu=d("
          ").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&& -a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"); -d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&& -b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source= -this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length").data("item.autocomplete",b).append(d("").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, -"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); -(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", --1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.attr("scrollTop"),c=this.element.height();if(b<0)this.element.attr("scrollTop",g+b);else b>=c&&this.element.attr("scrollTop",g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})}, -deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0); -e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b,this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e, -g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first")); -this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()") + .addClass("ui-autocomplete") + .appendTo(d(this.options.appendTo || "body", b)[0]) + .mousedown(function (c) { + var f = a.menu.element[0]; + d(c.target).closest(".ui-menu-item").length || + setTimeout(function () { + d(document).one("mousedown", function (h) { + h.target !== a.element[0] && + h.target !== f && + !d.ui.contains(f, h.target) && + a.close(); + }); + }, 1); + setTimeout(function () { + clearTimeout(a.closing); + }, 13); + }) + .menu({ + focus: function (c, f) { + f = f.item.data("item.autocomplete"); + false !== a._trigger("focus", c, { item: f }) && + /^key/.test(c.originalEvent.type) && + a.element.val(f.value); + }, + selected: function (c, f) { + var h = f.item.data("item.autocomplete"), + i = a.previous; + if (a.element[0] !== b.activeElement) { + a.element.focus(); + a.previous = i; + setTimeout(function () { + a.previous = i; + a.selectedItem = h; + }, 1); + } + false !== a._trigger("select", c, { item: h }) && + a.element.val(h.value); + a.term = a.element.val(); + a.close(c); + a.selectedItem = h; + }, + blur: function () { + a.menu.element.is(":visible") && + a.element.val() !== a.term && + a.element.val(a.term); + }, + }) + .zIndex(this.element.zIndex() + 1) + .css({ top: 0, left: 0 }) + .hide() + .data("menu"); + d.fn.bgiframe && this.menu.element.bgiframe(); + }, + destroy: function () { + this.element + .removeClass("ui-autocomplete-input") + .removeAttr("autocomplete") + .removeAttr("role") + .removeAttr("aria-autocomplete") + .removeAttr("aria-haspopup"); + this.menu.element.remove(); + d.Widget.prototype.destroy.call(this); + }, + _setOption: function (a, b) { + d.Widget.prototype._setOption.apply(this, arguments); + a === "source" && this._initSource(); + if (a === "appendTo") + this.menu.element.appendTo( + d(b || "body", this.element[0].ownerDocument)[0], + ); + a === "disabled" && b && this.xhr && this.xhr.abort(); + }, + _initSource: function () { + var a = this, + b, + g; + if (d.isArray(this.options.source)) { + b = this.options.source; + this.source = function (c, f) { + f(d.ui.autocomplete.filter(b, c.term)); + }; + } else if (typeof this.options.source === "string") { + g = this.options.source; + this.source = function (c, f) { + a.xhr && a.xhr.abort(); + a.xhr = d.ajax({ + url: g, + data: c, + dataType: "json", + autocompleteRequest: ++e, + success: function (h) { + this.autocompleteRequest === e && f(h); + }, + error: function () { + this.autocompleteRequest === e && f([]); + }, + }); + }; + } else this.source = this.options.source; + }, + search: function (a, b) { + a = a != null ? a : this.element.val(); + this.term = this.element.val(); + if (a.length < this.options.minLength) return this.close(b); + clearTimeout(this.closing); + if (this._trigger("search", b) !== false) return this._search(a); + }, + _search: function (a) { + this.pending++; + this.element.addClass("ui-autocomplete-loading"); + this.source({ term: a }, this.response); + }, + _response: function (a) { + if (!this.options.disabled && a && a.length) { + a = this._normalize(a); + this._suggest(a); + this._trigger("open"); + } else this.close(); + this.pending--; + this.pending || this.element.removeClass("ui-autocomplete-loading"); + }, + close: function (a) { + clearTimeout(this.closing); + if (this.menu.element.is(":visible")) { + this.menu.element.hide(); + this.menu.deactivate(); + this._trigger("close", a); + } + }, + _change: function (a) { + this.previous !== this.element.val() && + this._trigger("change", a, { item: this.selectedItem }); + }, + _normalize: function (a) { + if (a.length && a[0].label && a[0].value) return a; + return d.map(a, function (b) { + if (typeof b === "string") return { label: b, value: b }; + return d.extend( + { label: b.label || b.value, value: b.value || b.label }, + b, + ); + }); + }, + _suggest: function (a) { + var b = this.menu.element.empty().zIndex(this.element.zIndex() + 1); + this._renderMenu(b, a); + this.menu.deactivate(); + this.menu.refresh(); + b.show(); + this._resizeMenu(); + b.position(d.extend({ of: this.element }, this.options.position)); + this.options.autoFocus && this.menu.next(new d.Event("mouseover")); + }, + _resizeMenu: function () { + var a = this.menu.element; + a.outerWidth( + Math.max(a.width("").outerWidth(), this.element.outerWidth()), + ); + }, + _renderMenu: function (a, b) { + var g = this; + d.each(b, function (c, f) { + g._renderItem(a, f); + }); + }, + _renderItem: function (a, b) { + return d("
        • ") + .data("item.autocomplete", b) + .append(d("").text(b.label)) + .appendTo(a); + }, + _move: function (a, b) { + if (this.menu.element.is(":visible")) + if ( + (this.menu.first() && /^previous/.test(a)) || + (this.menu.last() && /^next/.test(a)) + ) { + this.element.val(this.term); + this.menu.deactivate(); + } else this.menu[a](b); + else this.search(null, b); + }, + widget: function () { + return this.menu.element; + }, + }); + d.extend(d.ui.autocomplete, { + escapeRegex: function (a) { + return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + }, + filter: function (a, b) { + var g = new RegExp(d.ui.autocomplete.escapeRegex(b), "i"); + return d.grep(a, function (c) { + return g.test(c.label || c.value || c); + }); + }, + }); +})(jQuery); +(function (d) { + d.widget("ui.menu", { + _create: function () { + var e = this; + this.element + .addClass("ui-menu ui-widget ui-widget-content ui-corner-all") + .attr({ + role: "listbox", + "aria-activedescendant": "ui-active-menuitem", + }) + .click(function (a) { + if (d(a.target).closest(".ui-menu-item a").length) { + a.preventDefault(); + e.select(a); + } + }); + this.refresh(); + }, + refresh: function () { + var e = this; + this.element + .children("li:not(.ui-menu-item):has(a)") + .addClass("ui-menu-item") + .attr("role", "menuitem") + .children("a") + .addClass("ui-corner-all") + .attr("tabindex", -1) + .mouseenter(function (a) { + e.activate(a, d(this).parent()); + }) + .mouseleave(function () { + e.deactivate(); + }); + }, + activate: function (e, a) { + this.deactivate(); + if (this.hasScroll()) { + var b = a.offset().top - this.element.offset().top, + g = this.element.attr("scrollTop"), + c = this.element.height(); + if (b < 0) this.element.attr("scrollTop", g + b); + else b >= c && this.element.attr("scrollTop", g + b - c + a.height()); + } + this.active = a + .eq(0) + .children("a") + .addClass("ui-state-hover") + .attr("id", "ui-active-menuitem") + .end(); + this._trigger("focus", e, { item: a }); + }, + deactivate: function () { + if (this.active) { + this.active + .children("a") + .removeClass("ui-state-hover") + .removeAttr("id"); + this._trigger("blur"); + this.active = null; + } + }, + next: function (e) { + this.move("next", ".ui-menu-item:first", e); + }, + previous: function (e) { + this.move("prev", ".ui-menu-item:last", e); + }, + first: function () { + return this.active && !this.active.prevAll(".ui-menu-item").length; + }, + last: function () { + return this.active && !this.active.nextAll(".ui-menu-item").length; + }, + move: function (e, a, b) { + if (this.active) { + e = this.active[e + "All"](".ui-menu-item").eq(0); + e.length + ? this.activate(b, e) + : this.activate(b, this.element.children(a)); + } else this.activate(b, this.element.children(a)); + }, + nextPage: function (e) { + if (this.hasScroll()) + if (!this.active || this.last()) + this.activate(e, this.element.children(".ui-menu-item:first")); + else { + var a = this.active.offset().top, + b = this.element.height(), + g = this.element.children(".ui-menu-item").filter(function () { + var c = d(this).offset().top - a - b + d(this).height(); + return c < 10 && c > -10; + }); + g.length || (g = this.element.children(".ui-menu-item:last")); + this.activate(e, g); + } + else + this.activate( + e, + this.element + .children(".ui-menu-item") + .filter(!this.active || this.last() ? ":first" : ":last"), + ); + }, + previousPage: function (e) { + if (this.hasScroll()) + if (!this.active || this.first()) + this.activate(e, this.element.children(".ui-menu-item:last")); + else { + var a = this.active.offset().top, + b = this.element.height(); + result = this.element.children(".ui-menu-item").filter(function () { + var g = d(this).offset().top - a + b - d(this).height(); + return g < 10 && g > -10; + }); + result.length || + (result = this.element.children(".ui-menu-item:first")); + this.activate(e, result); + } + else + this.activate( + e, + this.element + .children(".ui-menu-item") + .filter(!this.active || this.first() ? ":last" : ":first"), + ); + }, + hasScroll: function () { + return this.element.height() < this.element.attr("scrollHeight"); + }, + select: function (e) { + this._trigger("selected", e, { item: this.active }); + }, + }); +})(jQuery); /* * jQuery UI Button 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -343,19 +4743,284 @@ this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-ite * jquery.ui.core.js * jquery.ui.widget.js */ -(function(a){var g,i=function(b){a(":ui-button",b.target.form).each(function(){var c=a(this).data("button");setTimeout(function(){c.refresh()},1)})},h=function(b){var c=b.name,d=b.form,f=a([]);if(c)f=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form});return f};a.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button", -i);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!d?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button", -function(){if(!c.disabled){a(this).addClass("ui-state-hover");this===g&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){c.disabled||a(this).removeClass(f)}).bind("focus.button",function(){a(this).addClass("ui-state-focus")}).bind("blur.button",function(){a(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){b.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).toggleClass("ui-state-active"); -b.buttonElement.attr("aria-pressed",b.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed",true);var e=b.element[0];h(e).not(e).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active"); -g=this;a(document).one("mouseup",function(){g=null})}).bind("mouseup.button",function(){if(c.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(e){if(c.disabled)return false;if(e.keyCode==a.ui.keyCode.SPACE||e.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled", -c.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){var b=this.element.parents().filter(":last"),c="label[for="+this.element.attr("id")+"]";this.buttonElement=b.find(c);if(!this.buttonElement.length){b=b.length?b.siblings():this.element.siblings();this.buttonElement=b.filter(c);if(!this.buttonElement.length)this.buttonElement=b.find(c)}this.element.addClass("ui-helper-hidden-accessible"); -(b=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",b)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()); -this.hasTitle||this.buttonElement.removeAttr("title");a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled")c?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b);if(this.type==="radio")h(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed", -true):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"), -c=a("").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,f=d.primary&&d.secondary,e=[];if(d.primary||d.secondary){if(this.options.text)e.push("ui-button-text-icon"+(f?"s":d.primary?"-primary":"-secondary"));d.primary&&b.prepend("");d.secondary&&b.append("");if(!this.options.text){e.push(f?"ui-button-icons-only": -"ui-button-icon-only");this.hasTitle||b.attr("title",c)}}else e.push("ui-button-text-only");b.addClass(e.join(" "))}}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()}, -destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery); -;/* +(function (a) { + var g, + i = function (b) { + a(":ui-button", b.target.form).each(function () { + var c = a(this).data("button"); + setTimeout(function () { + c.refresh(); + }, 1); + }); + }, + h = function (b) { + var c = b.name, + d = b.form, + f = a([]); + if (c) + f = d + ? a(d).find("[name='" + c + "']") + : a("[name='" + c + "']", b.ownerDocument).filter(function () { + return !this.form; + }); + return f; + }; + a.widget("ui.button", { + options: { + disabled: null, + text: true, + label: null, + icons: { primary: null, secondary: null }, + }, + _create: function () { + this.element + .closest("form") + .unbind("reset.button") + .bind("reset.button", i); + if (typeof this.options.disabled !== "boolean") + this.options.disabled = this.element.attr("disabled"); + this._determineButtonType(); + this.hasTitle = !!this.buttonElement.attr("title"); + var b = this, + c = this.options, + d = this.type === "checkbox" || this.type === "radio", + f = "ui-state-hover" + (!d ? " ui-state-active" : ""); + if (c.label === null) c.label = this.buttonElement.html(); + if (this.element.is(":disabled")) c.disabled = true; + this.buttonElement + .addClass("ui-button ui-widget ui-state-default ui-corner-all") + .attr("role", "button") + .bind("mouseenter.button", function () { + if (!c.disabled) { + a(this).addClass("ui-state-hover"); + this === g && a(this).addClass("ui-state-active"); + } + }) + .bind("mouseleave.button", function () { + c.disabled || a(this).removeClass(f); + }) + .bind("focus.button", function () { + a(this).addClass("ui-state-focus"); + }) + .bind("blur.button", function () { + a(this).removeClass("ui-state-focus"); + }); + d && + this.element.bind("change.button", function () { + b.refresh(); + }); + if (this.type === "checkbox") + this.buttonElement.bind("click.button", function () { + if (c.disabled) return false; + a(this).toggleClass("ui-state-active"); + b.buttonElement.attr("aria-pressed", b.element[0].checked); + }); + else if (this.type === "radio") + this.buttonElement.bind("click.button", function () { + if (c.disabled) return false; + a(this).addClass("ui-state-active"); + b.buttonElement.attr("aria-pressed", true); + var e = b.element[0]; + h(e) + .not(e) + .map(function () { + return a(this).button("widget")[0]; + }) + .removeClass("ui-state-active") + .attr("aria-pressed", false); + }); + else { + this.buttonElement + .bind("mousedown.button", function () { + if (c.disabled) return false; + a(this).addClass("ui-state-active"); + g = this; + a(document).one("mouseup", function () { + g = null; + }); + }) + .bind("mouseup.button", function () { + if (c.disabled) return false; + a(this).removeClass("ui-state-active"); + }) + .bind("keydown.button", function (e) { + if (c.disabled) return false; + if ( + e.keyCode == a.ui.keyCode.SPACE || + e.keyCode == a.ui.keyCode.ENTER + ) + a(this).addClass("ui-state-active"); + }) + .bind("keyup.button", function () { + a(this).removeClass("ui-state-active"); + }); + this.buttonElement.is("a") && + this.buttonElement.keyup(function (e) { + e.keyCode === a.ui.keyCode.SPACE && a(this).click(); + }); + } + this._setOption("disabled", c.disabled); + }, + _determineButtonType: function () { + this.type = this.element.is(":checkbox") + ? "checkbox" + : this.element.is(":radio") + ? "radio" + : this.element.is("input") + ? "input" + : "button"; + if (this.type === "checkbox" || this.type === "radio") { + var b = this.element.parents().filter(":last"), + c = "label[for=" + this.element.attr("id") + "]"; + this.buttonElement = b.find(c); + if (!this.buttonElement.length) { + b = b.length ? b.siblings() : this.element.siblings(); + this.buttonElement = b.filter(c); + if (!this.buttonElement.length) this.buttonElement = b.find(c); + } + this.element.addClass("ui-helper-hidden-accessible"); + (b = this.element.is(":checked")) && + this.buttonElement.addClass("ui-state-active"); + this.buttonElement.attr("aria-pressed", b); + } else this.buttonElement = this.element; + }, + widget: function () { + return this.buttonElement; + }, + destroy: function () { + this.element.removeClass("ui-helper-hidden-accessible"); + this.buttonElement + .removeClass( + "ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", + ) + .removeAttr("role") + .removeAttr("aria-pressed") + .html(this.buttonElement.find(".ui-button-text").html()); + this.hasTitle || this.buttonElement.removeAttr("title"); + a.Widget.prototype.destroy.call(this); + }, + _setOption: function (b, c) { + a.Widget.prototype._setOption.apply(this, arguments); + if (b === "disabled") + c + ? this.element.attr("disabled", true) + : this.element.removeAttr("disabled"); + this._resetButton(); + }, + refresh: function () { + var b = this.element.is(":disabled"); + b !== this.options.disabled && this._setOption("disabled", b); + if (this.type === "radio") + h(this.element[0]).each(function () { + a(this).is(":checked") + ? a(this) + .button("widget") + .addClass("ui-state-active") + .attr("aria-pressed", true) + : a(this) + .button("widget") + .removeClass("ui-state-active") + .attr("aria-pressed", false); + }); + else if (this.type === "checkbox") + this.element.is(":checked") + ? this.buttonElement + .addClass("ui-state-active") + .attr("aria-pressed", true) + : this.buttonElement + .removeClass("ui-state-active") + .attr("aria-pressed", false); + }, + _resetButton: function () { + if (this.type === "input") + this.options.label && this.element.val(this.options.label); + else { + var b = this.buttonElement.removeClass( + "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", + ), + c = a("") + .addClass("ui-button-text") + .html(this.options.label) + .appendTo(b.empty()) + .text(), + d = this.options.icons, + f = d.primary && d.secondary, + e = []; + if (d.primary || d.secondary) { + if (this.options.text) + e.push( + "ui-button-text-icon" + + (f ? "s" : d.primary ? "-primary" : "-secondary"), + ); + d.primary && + b.prepend( + "", + ); + d.secondary && + b.append( + "", + ); + if (!this.options.text) { + e.push(f ? "ui-button-icons-only" : "ui-button-icon-only"); + this.hasTitle || b.attr("title", c); + } + } else e.push("ui-button-text-only"); + b.addClass(e.join(" ")); + } + }, + }); + a.widget("ui.buttonset", { + options: { + items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)", + }, + _create: function () { + this.element.addClass("ui-buttonset"); + }, + _init: function () { + this.refresh(); + }, + _setOption: function (b, c) { + b === "disabled" && this.buttons.button("option", b, c); + a.Widget.prototype._setOption.apply(this, arguments); + }, + refresh: function () { + this.buttons = this.element + .find(this.options.items) + .filter(":ui-button") + .button("refresh") + .end() + .not(":ui-button") + .button() + .end() + .map(function () { + return a(this).button("widget")[0]; + }) + .removeClass("ui-corner-all ui-corner-left ui-corner-right") + .filter(":first") + .addClass("ui-corner-left") + .end() + .filter(":last") + .addClass("ui-corner-right") + .end() + .end(); + }, + destroy: function () { + this.element.removeClass("ui-buttonset"); + this.buttons + .map(function () { + return a(this).button("widget")[0]; + }) + .removeClass("ui-corner-left ui-corner-right") + .end() + .button("destroy"); + a.Widget.prototype.destroy.call(this); + }, + }); +})(jQuery); /* * jQuery UI Dialog 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -373,29 +5038,571 @@ destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(fun * jquery.ui.position.js * jquery.ui.resizable.js */ -(function(c,j){var k={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},l={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&& -c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
          ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex", --1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
          ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", -"button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id",e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose= -b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();a.originalTitle&& -a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==b.uiDialog[0]){e=c(this).css("z-index"); -isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",c.ui.dialog.maxZ); -d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===f[0]&&e.shiftKey){g.focus(1);return false}}}); -c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("
          ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("
          ").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,function(f, -h){h=c.isFunction(h)?{click:h,text:f}:h;f=c('').attr(h,true).unbind("click").click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.fn.button&&f.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g= -d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,originalSize:f.originalSize, -position:f.position,size:f.size}}a=a===j?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",f,b(h))},stop:function(f, -h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length=== -1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f);if(g in k)e=true;if(g in -l)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled"); -break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=this.options,b,d,e= -this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-b,0));this.uiDialog.is(":data(resizable)")&& -this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.11",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length=== -0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(), -height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight); -b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a")) + .appendTo(document.body) + .hide() + .addClass( + "ui-dialog ui-widget ui-widget-content ui-corner-all " + + b.dialogClass, + ) + .css({ zIndex: b.zIndex }) + .attr("tabIndex", -1) + .css("outline", 0) + .keydown(function (i) { + if ( + b.closeOnEscape && + i.keyCode && + i.keyCode === c.ui.keyCode.ESCAPE + ) { + a.close(i); + i.preventDefault(); + } + }) + .attr({ role: "dialog", "aria-labelledby": e }) + .mousedown(function (i) { + a.moveToTop(false, i); + }); + a.element + .show() + .removeAttr("title") + .addClass("ui-dialog-content ui-widget-content") + .appendTo(g); + var f = (a.uiDialogTitlebar = c("
          ")) + .addClass( + "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix", + ) + .prependTo(g), + h = c('') + .addClass("ui-dialog-titlebar-close ui-corner-all") + .attr("role", "button") + .hover( + function () { + h.addClass("ui-state-hover"); + }, + function () { + h.removeClass("ui-state-hover"); + }, + ) + .focus(function () { + h.addClass("ui-state-focus"); + }) + .blur(function () { + h.removeClass("ui-state-focus"); + }) + .click(function (i) { + a.close(i); + return false; + }) + .appendTo(f); + (a.uiDialogTitlebarCloseText = c("")) + .addClass("ui-icon ui-icon-closethick") + .text(b.closeText) + .appendTo(h); + c("") + .addClass("ui-dialog-title") + .attr("id", e) + .html(d) + .prependTo(f); + if (c.isFunction(b.beforeclose) && !c.isFunction(b.beforeClose)) + b.beforeClose = b.beforeclose; + f.find("*").add(f).disableSelection(); + b.draggable && c.fn.draggable && a._makeDraggable(); + b.resizable && c.fn.resizable && a._makeResizable(); + a._createButtons(b.buttons); + a._isOpen = false; + c.fn.bgiframe && g.bgiframe(); + }, + _init: function () { + this.options.autoOpen && this.open(); + }, + destroy: function () { + var a = this; + a.overlay && a.overlay.destroy(); + a.uiDialog.hide(); + a.element + .unbind(".dialog") + .removeData("dialog") + .removeClass("ui-dialog-content ui-widget-content") + .hide() + .appendTo("body"); + a.uiDialog.remove(); + a.originalTitle && a.element.attr("title", a.originalTitle); + return a; + }, + widget: function () { + return this.uiDialog; + }, + close: function (a) { + var b = this, + d, + e; + if (false !== b._trigger("beforeClose", a)) { + b.overlay && b.overlay.destroy(); + b.uiDialog.unbind("keypress.ui-dialog"); + b._isOpen = false; + if (b.options.hide) + b.uiDialog.hide(b.options.hide, function () { + b._trigger("close", a); + }); + else { + b.uiDialog.hide(); + b._trigger("close", a); + } + c.ui.dialog.overlay.resize(); + if (b.options.modal) { + d = 0; + c(".ui-dialog").each(function () { + if (this !== b.uiDialog[0]) { + e = c(this).css("z-index"); + isNaN(e) || (d = Math.max(d, e)); + } + }); + c.ui.dialog.maxZ = d; + } + return b; + } + }, + isOpen: function () { + return this._isOpen; + }, + moveToTop: function (a, b) { + var d = this, + e = d.options; + if ((e.modal && !a) || (!e.stack && !e.modal)) + return d._trigger("focus", b); + if (e.zIndex > c.ui.dialog.maxZ) c.ui.dialog.maxZ = e.zIndex; + if (d.overlay) { + c.ui.dialog.maxZ += 1; + d.overlay.$el.css( + "z-index", + (c.ui.dialog.overlay.maxZ = c.ui.dialog.maxZ), + ); + } + a = { + scrollTop: d.element.attr("scrollTop"), + scrollLeft: d.element.attr("scrollLeft"), + }; + c.ui.dialog.maxZ += 1; + d.uiDialog.css("z-index", c.ui.dialog.maxZ); + d.element.attr(a); + d._trigger("focus", b); + return d; + }, + open: function () { + if (!this._isOpen) { + var a = this, + b = a.options, + d = a.uiDialog; + a.overlay = b.modal ? new c.ui.dialog.overlay(a) : null; + a._size(); + a._position(b.position); + d.show(b.show); + a.moveToTop(true); + b.modal && + d.bind("keypress.ui-dialog", function (e) { + if (e.keyCode === c.ui.keyCode.TAB) { + var g = c(":tabbable", this), + f = g.filter(":first"); + g = g.filter(":last"); + if (e.target === g[0] && !e.shiftKey) { + f.focus(1); + return false; + } else if (e.target === f[0] && e.shiftKey) { + g.focus(1); + return false; + } + } + }); + c( + a.element + .find(":tabbable") + .get() + .concat( + d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()), + ), + ) + .eq(0) + .focus(); + a._isOpen = true; + a._trigger("open"); + return a; + } + }, + _createButtons: function (a) { + var b = this, + d = false, + e = c("
          ").addClass( + "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix", + ), + g = c("
          ").addClass("ui-dialog-buttonset").appendTo(e); + b.uiDialog.find(".ui-dialog-buttonpane").remove(); + typeof a === "object" && + a !== null && + c.each(a, function () { + return !(d = true); + }); + if (d) { + c.each(a, function (f, h) { + h = c.isFunction(h) ? { click: h, text: f } : h; + f = c('') + .attr(h, true) + .unbind("click") + .click(function () { + h.click.apply(b.element[0], arguments); + }) + .appendTo(g); + c.fn.button && f.button(); + }); + e.appendTo(b.uiDialog); + } + }, + _makeDraggable: function () { + function a(f) { + return { position: f.position, offset: f.offset }; + } + var b = this, + d = b.options, + e = c(document), + g; + b.uiDialog.draggable({ + cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", + handle: ".ui-dialog-titlebar", + containment: "document", + start: function (f, h) { + g = d.height === "auto" ? "auto" : c(this).height(); + c(this).height(c(this).height()).addClass("ui-dialog-dragging"); + b._trigger("dragStart", f, a(h)); + }, + drag: function (f, h) { + b._trigger("drag", f, a(h)); + }, + stop: function (f, h) { + d.position = [ + h.position.left - e.scrollLeft(), + h.position.top - e.scrollTop(), + ]; + c(this).removeClass("ui-dialog-dragging").height(g); + b._trigger("dragStop", f, a(h)); + c.ui.dialog.overlay.resize(); + }, + }); + }, + _makeResizable: function (a) { + function b(f) { + return { + originalPosition: f.originalPosition, + originalSize: f.originalSize, + position: f.position, + size: f.size, + }; + } + a = a === j ? this.options.resizable : a; + var d = this, + e = d.options, + g = d.uiDialog.css("position"); + a = typeof a === "string" ? a : "n,e,s,w,se,sw,ne,nw"; + d.uiDialog + .resizable({ + cancel: ".ui-dialog-content", + containment: "document", + alsoResize: d.element, + maxWidth: e.maxWidth, + maxHeight: e.maxHeight, + minWidth: e.minWidth, + minHeight: d._minHeight(), + handles: a, + start: function (f, h) { + c(this).addClass("ui-dialog-resizing"); + d._trigger("resizeStart", f, b(h)); + }, + resize: function (f, h) { + d._trigger("resize", f, b(h)); + }, + stop: function (f, h) { + c(this).removeClass("ui-dialog-resizing"); + e.height = c(this).height(); + e.width = c(this).width(); + d._trigger("resizeStop", f, b(h)); + c.ui.dialog.overlay.resize(); + }, + }) + .css("position", g) + .find(".ui-resizable-se") + .addClass("ui-icon ui-icon-grip-diagonal-se"); + }, + _minHeight: function () { + var a = this.options; + return a.height === "auto" + ? a.minHeight + : Math.min(a.minHeight, a.height); + }, + _position: function (a) { + var b = [], + d = [0, 0], + e; + if (a) { + if (typeof a === "string" || (typeof a === "object" && "0" in a)) { + b = a.split ? a.split(" ") : [a[0], a[1]]; + if (b.length === 1) b[1] = b[0]; + c.each(["left", "top"], function (g, f) { + if (+b[g] === b[g]) { + d[g] = b[g]; + b[g] = f; + } + }); + a = { my: b.join(" "), at: b.join(" "), offset: d.join(" ") }; + } + a = c.extend({}, c.ui.dialog.prototype.options.position, a); + } else a = c.ui.dialog.prototype.options.position; + (e = this.uiDialog.is(":visible")) || this.uiDialog.show(); + this.uiDialog + .css({ top: 0, left: 0 }) + .position(c.extend({ of: window }, a)); + e || this.uiDialog.hide(); + }, + _setOptions: function (a) { + var b = this, + d = {}, + e = false; + c.each(a, function (g, f) { + b._setOption(g, f); + if (g in k) e = true; + if (g in l) d[g] = f; + }); + e && this._size(); + this.uiDialog.is(":data(resizable)") && + this.uiDialog.resizable("option", d); + }, + _setOption: function (a, b) { + var d = this, + e = d.uiDialog; + switch (a) { + case "beforeclose": + a = "beforeClose"; + break; + case "buttons": + d._createButtons(b); + break; + case "closeText": + d.uiDialogTitlebarCloseText.text("" + b); + break; + case "dialogClass": + e.removeClass(d.options.dialogClass).addClass( + "ui-dialog ui-widget ui-widget-content ui-corner-all " + b, + ); + break; + case "disabled": + b + ? e.addClass("ui-dialog-disabled") + : e.removeClass("ui-dialog-disabled"); + break; + case "draggable": + var g = e.is(":data(draggable)"); + g && !b && e.draggable("destroy"); + !g && b && d._makeDraggable(); + break; + case "position": + d._position(b); + break; + case "resizable": + (g = e.is(":data(resizable)")) && !b && e.resizable("destroy"); + g && typeof b === "string" && e.resizable("option", "handles", b); + !g && b !== false && d._makeResizable(b); + break; + case "title": + c(".ui-dialog-title", d.uiDialogTitlebar).html("" + (b || " ")); + break; + } + c.Widget.prototype._setOption.apply(d, arguments); + }, + _size: function () { + var a = this.options, + b, + d, + e = this.uiDialog.is(":visible"); + this.element.show().css({ width: "auto", minHeight: 0, height: 0 }); + if (a.minWidth > a.width) a.width = a.minWidth; + b = this.uiDialog.css({ height: "auto", width: a.width }).height(); + d = Math.max(0, a.minHeight - b); + if (a.height === "auto") + if (c.support.minHeight) + this.element.css({ minHeight: d, height: "auto" }); + else { + this.uiDialog.show(); + a = this.element.css("height", "auto").height(); + e || this.uiDialog.hide(); + this.element.height(Math.max(a, d)); + } + else this.element.height(Math.max(a.height - b, 0)); + this.uiDialog.is(":data(resizable)") && + this.uiDialog.resizable("option", "minHeight", this._minHeight()); + }, + }); + c.extend(c.ui.dialog, { + version: "1.8.11", + uuid: 0, + maxZ: 0, + getTitleId: function (a) { + a = a.attr("id"); + if (!a) { + this.uuid += 1; + a = this.uuid; + } + return "ui-dialog-title-" + a; + }, + overlay: function (a) { + this.$el = c.ui.dialog.overlay.create(a); + }, + }); + c.extend(c.ui.dialog.overlay, { + instances: [], + oldInstances: [], + maxZ: 0, + events: c + .map( + "focus,mousedown,mouseup,keydown,keypress,click".split(","), + function (a) { + return a + ".dialog-overlay"; + }, + ) + .join(" "), + create: function (a) { + if (this.instances.length === 0) { + setTimeout(function () { + c.ui.dialog.overlay.instances.length && + c(document).bind(c.ui.dialog.overlay.events, function (d) { + if (c(d.target).zIndex() < c.ui.dialog.overlay.maxZ) return false; + }); + }, 1); + c(document).bind("keydown.dialog-overlay", function (d) { + if ( + a.options.closeOnEscape && + d.keyCode && + d.keyCode === c.ui.keyCode.ESCAPE + ) { + a.close(d); + d.preventDefault(); + } + }); + c(window).bind("resize.dialog-overlay", c.ui.dialog.overlay.resize); + } + var b = ( + this.oldInstances.pop() || + c("
          ").addClass("ui-widget-overlay") + ) + .appendTo(document.body) + .css({ width: this.width(), height: this.height() }); + c.fn.bgiframe && b.bgiframe(); + this.instances.push(b); + return b; + }, + destroy: function (a) { + var b = c.inArray(a, this.instances); + b != -1 && this.oldInstances.push(this.instances.splice(b, 1)[0]); + this.instances.length === 0 && + c([document, window]).unbind(".dialog-overlay"); + a.remove(); + var d = 0; + c.each(this.instances, function () { + d = Math.max(d, this.css("z-index")); + }); + this.maxZ = d; + }, + height: function () { + var a, b; + if (c.browser.msie && c.browser.version < 7) { + a = Math.max( + document.documentElement.scrollHeight, + document.body.scrollHeight, + ); + b = Math.max( + document.documentElement.offsetHeight, + document.body.offsetHeight, + ); + return a < b ? c(window).height() + "px" : a + "px"; + } else return c(document).height() + "px"; + }, + width: function () { + var a, b; + if (c.browser.msie && c.browser.version < 7) { + a = Math.max( + document.documentElement.scrollWidth, + document.body.scrollWidth, + ); + b = Math.max( + document.documentElement.offsetWidth, + document.body.offsetWidth, + ); + return a < b ? c(window).width() + "px" : a + "px"; + } else return c(document).width() + "px"; + }, + resize: function () { + var a = c([]); + c.each(c.ui.dialog.overlay.instances, function () { + a = a.add(this); + }); + a.css({ width: 0, height: 0 }).css({ + width: c.ui.dialog.overlay.width(), + height: c.ui.dialog.overlay.height(), + }); + }, + }); + c.extend(c.ui.dialog.overlay.prototype, { + destroy: function () { + c.ui.dialog.overlay.destroy(this.$el); + }, + }); +})(jQuery); /* * jQuery UI Slider 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -409,26 +5616,485 @@ function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.over * jquery.ui.mouse.js * jquery.ui.widget.js */ -(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b=this,a=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");a.disabled&&this.element.addClass("ui-slider-disabled ui-disabled"); -this.range=d([]);if(a.range){if(a.range===true){this.range=d("
          ");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("
          ");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("").appendTo(this.element).addClass("ui-slider-handle"); -if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur(); -else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e= -false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");h=b._start(c,f);if(h===false)return}break}i=b.options.step;h=b.options.values&&b.options.values.length?(g=b.values(f)):(g=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=b._valueMin();break;case d.ui.keyCode.END:g=b._valueMax();break;case d.ui.keyCode.PAGE_UP:g=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h=== -b._valueMax())return;g=b._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===b._valueMin())return;g=b._trimAlignValue(h-i);break}b._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"); -this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,h,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(a.range===true&&this.values(1)===a.min){g+=1;f=d(this.handles[g])}if(this._start(b, -g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();a=f.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-f.width()/2,top:b.pageY-a.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true}, -_mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a; -if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value= -this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max}, -_refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate); -if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:a.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1, -1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.11"})})(jQuery); -;/* +(function (d) { + d.widget("ui.slider", d.ui.mouse, { + widgetEventPrefix: "slide", + options: { + animate: false, + distance: 0, + max: 100, + min: 0, + orientation: "horizontal", + range: false, + step: 1, + value: 0, + values: null, + }, + _create: function () { + var b = this, + a = this.options; + this._mouseSliding = this._keySliding = false; + this._animateOff = true; + this._handleIndex = null; + this._detectOrientation(); + this._mouseInit(); + this.element.addClass( + "ui-slider ui-slider-" + + this.orientation + + " ui-widget ui-widget-content ui-corner-all", + ); + a.disabled && this.element.addClass("ui-slider-disabled ui-disabled"); + this.range = d([]); + if (a.range) { + if (a.range === true) { + this.range = d("
          "); + if (!a.values) a.values = [this._valueMin(), this._valueMin()]; + if (a.values.length && a.values.length !== 2) + a.values = [a.values[0], a.values[0]]; + } else this.range = d("
          "); + this.range.appendTo(this.element).addClass("ui-slider-range"); + if (a.range === "min" || a.range === "max") + this.range.addClass("ui-slider-range-" + a.range); + this.range.addClass("ui-widget-header"); + } + d(".ui-slider-handle", this.element).length === 0 && + d("") + .appendTo(this.element) + .addClass("ui-slider-handle"); + if (a.values && a.values.length) + for (; d(".ui-slider-handle", this.element).length < a.values.length; ) + d("") + .appendTo(this.element) + .addClass("ui-slider-handle"); + this.handles = d(".ui-slider-handle", this.element).addClass( + "ui-state-default ui-corner-all", + ); + this.handle = this.handles.eq(0); + this.handles + .add(this.range) + .filter("a") + .click(function (c) { + c.preventDefault(); + }) + .hover( + function () { + a.disabled || d(this).addClass("ui-state-hover"); + }, + function () { + d(this).removeClass("ui-state-hover"); + }, + ) + .focus(function () { + if (a.disabled) d(this).blur(); + else { + d(".ui-slider .ui-state-focus").removeClass("ui-state-focus"); + d(this).addClass("ui-state-focus"); + } + }) + .blur(function () { + d(this).removeClass("ui-state-focus"); + }); + this.handles.each(function (c) { + d(this).data("index.ui-slider-handle", c); + }); + this.handles + .keydown(function (c) { + var e = true, + f = d(this).data("index.ui-slider-handle"), + h, + g, + i; + if (!b.options.disabled) { + switch (c.keyCode) { + case d.ui.keyCode.HOME: + case d.ui.keyCode.END: + case d.ui.keyCode.PAGE_UP: + case d.ui.keyCode.PAGE_DOWN: + case d.ui.keyCode.UP: + case d.ui.keyCode.RIGHT: + case d.ui.keyCode.DOWN: + case d.ui.keyCode.LEFT: + e = false; + if (!b._keySliding) { + b._keySliding = true; + d(this).addClass("ui-state-active"); + h = b._start(c, f); + if (h === false) return; + } + break; + } + i = b.options.step; + h = + b.options.values && b.options.values.length + ? (g = b.values(f)) + : (g = b.value()); + switch (c.keyCode) { + case d.ui.keyCode.HOME: + g = b._valueMin(); + break; + case d.ui.keyCode.END: + g = b._valueMax(); + break; + case d.ui.keyCode.PAGE_UP: + g = b._trimAlignValue(h + (b._valueMax() - b._valueMin()) / 5); + break; + case d.ui.keyCode.PAGE_DOWN: + g = b._trimAlignValue(h - (b._valueMax() - b._valueMin()) / 5); + break; + case d.ui.keyCode.UP: + case d.ui.keyCode.RIGHT: + if (h === b._valueMax()) return; + g = b._trimAlignValue(h + i); + break; + case d.ui.keyCode.DOWN: + case d.ui.keyCode.LEFT: + if (h === b._valueMin()) return; + g = b._trimAlignValue(h - i); + break; + } + b._slide(c, f, g); + return e; + } + }) + .keyup(function (c) { + var e = d(this).data("index.ui-slider-handle"); + if (b._keySliding) { + b._keySliding = false; + b._stop(c, e); + b._change(c, e); + d(this).removeClass("ui-state-active"); + } + }); + this._refreshValue(); + this._animateOff = false; + }, + destroy: function () { + this.handles.remove(); + this.range.remove(); + this.element + .removeClass( + "ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all", + ) + .removeData("slider") + .unbind(".slider"); + this._mouseDestroy(); + return this; + }, + _mouseCapture: function (b) { + var a = this.options, + c, + e, + f, + h, + g; + if (a.disabled) return false; + this.elementSize = { + width: this.element.outerWidth(), + height: this.element.outerHeight(), + }; + this.elementOffset = this.element.offset(); + c = this._normValueFromMouse({ x: b.pageX, y: b.pageY }); + e = this._valueMax() - this._valueMin() + 1; + h = this; + this.handles.each(function (i) { + var j = Math.abs(c - h.values(i)); + if (e > j) { + e = j; + f = d(this); + g = i; + } + }); + if (a.range === true && this.values(1) === a.min) { + g += 1; + f = d(this.handles[g]); + } + if (this._start(b, g) === false) return false; + this._mouseSliding = true; + h._handleIndex = g; + f.addClass("ui-state-active").focus(); + a = f.offset(); + this._clickOffset = !d(b.target) + .parents() + .andSelf() + .is(".ui-slider-handle") + ? { left: 0, top: 0 } + : { + left: b.pageX - a.left - f.width() / 2, + top: + b.pageY - + a.top - + f.height() / 2 - + (parseInt(f.css("borderTopWidth"), 10) || 0) - + (parseInt(f.css("borderBottomWidth"), 10) || 0) + + (parseInt(f.css("marginTop"), 10) || 0), + }; + this.handles.hasClass("ui-state-hover") || this._slide(b, g, c); + return (this._animateOff = true); + }, + _mouseStart: function () { + return true; + }, + _mouseDrag: function (b) { + var a = this._normValueFromMouse({ x: b.pageX, y: b.pageY }); + this._slide(b, this._handleIndex, a); + return false; + }, + _mouseStop: function (b) { + this.handles.removeClass("ui-state-active"); + this._mouseSliding = false; + this._stop(b, this._handleIndex); + this._change(b, this._handleIndex); + this._clickOffset = this._handleIndex = null; + return (this._animateOff = false); + }, + _detectOrientation: function () { + this.orientation = + this.options.orientation === "vertical" ? "vertical" : "horizontal"; + }, + _normValueFromMouse: function (b) { + var a; + if (this.orientation === "horizontal") { + a = this.elementSize.width; + b = + b.x - + this.elementOffset.left - + (this._clickOffset ? this._clickOffset.left : 0); + } else { + a = this.elementSize.height; + b = + b.y - + this.elementOffset.top - + (this._clickOffset ? this._clickOffset.top : 0); + } + a = b / a; + if (a > 1) a = 1; + if (a < 0) a = 0; + if (this.orientation === "vertical") a = 1 - a; + b = this._valueMax() - this._valueMin(); + return this._trimAlignValue(this._valueMin() + a * b); + }, + _start: function (b, a) { + var c = { handle: this.handles[a], value: this.value() }; + if (this.options.values && this.options.values.length) { + c.value = this.values(a); + c.values = this.values(); + } + return this._trigger("start", b, c); + }, + _slide: function (b, a, c) { + var e; + if (this.options.values && this.options.values.length) { + e = this.values(a ? 0 : 1); + if ( + this.options.values.length === 2 && + this.options.range === true && + ((a === 0 && c > e) || (a === 1 && c < e)) + ) + c = e; + if (c !== this.values(a)) { + e = this.values(); + e[a] = c; + b = this._trigger("slide", b, { + handle: this.handles[a], + value: c, + values: e, + }); + this.values(a ? 0 : 1); + b !== false && this.values(a, c, true); + } + } else if (c !== this.value()) { + b = this._trigger("slide", b, { handle: this.handles[a], value: c }); + b !== false && this.value(c); + } + }, + _stop: function (b, a) { + var c = { handle: this.handles[a], value: this.value() }; + if (this.options.values && this.options.values.length) { + c.value = this.values(a); + c.values = this.values(); + } + this._trigger("stop", b, c); + }, + _change: function (b, a) { + if (!this._keySliding && !this._mouseSliding) { + var c = { handle: this.handles[a], value: this.value() }; + if (this.options.values && this.options.values.length) { + c.value = this.values(a); + c.values = this.values(); + } + this._trigger("change", b, c); + } + }, + value: function (b) { + if (arguments.length) { + this.options.value = this._trimAlignValue(b); + this._refreshValue(); + this._change(null, 0); + } + return this._value(); + }, + values: function (b, a) { + var c, e, f; + if (arguments.length > 1) { + this.options.values[b] = this._trimAlignValue(a); + this._refreshValue(); + this._change(null, b); + } + if (arguments.length) + if (d.isArray(arguments[0])) { + c = this.options.values; + e = arguments[0]; + for (f = 0; f < c.length; f += 1) { + c[f] = this._trimAlignValue(e[f]); + this._change(null, f); + } + this._refreshValue(); + } else + return this.options.values && this.options.values.length + ? this._values(b) + : this.value(); + else return this._values(); + }, + _setOption: function (b, a) { + var c, + e = 0; + if (d.isArray(this.options.values)) e = this.options.values.length; + d.Widget.prototype._setOption.apply(this, arguments); + switch (b) { + case "disabled": + if (a) { + this.handles.filter(".ui-state-focus").blur(); + this.handles.removeClass("ui-state-hover"); + this.handles.attr("disabled", "disabled"); + this.element.addClass("ui-disabled"); + } else { + this.handles.removeAttr("disabled"); + this.element.removeClass("ui-disabled"); + } + break; + case "orientation": + this._detectOrientation(); + this.element + .removeClass("ui-slider-horizontal ui-slider-vertical") + .addClass("ui-slider-" + this.orientation); + this._refreshValue(); + break; + case "value": + this._animateOff = true; + this._refreshValue(); + this._change(null, 0); + this._animateOff = false; + break; + case "values": + this._animateOff = true; + this._refreshValue(); + for (c = 0; c < e; c += 1) this._change(null, c); + this._animateOff = false; + break; + } + }, + _value: function () { + var b = this.options.value; + return (b = this._trimAlignValue(b)); + }, + _values: function (b) { + var a, c; + if (arguments.length) { + a = this.options.values[b]; + return (a = this._trimAlignValue(a)); + } else { + a = this.options.values.slice(); + for (c = 0; c < a.length; c += 1) a[c] = this._trimAlignValue(a[c]); + return a; + } + }, + _trimAlignValue: function (b) { + if (b <= this._valueMin()) return this._valueMin(); + if (b >= this._valueMax()) return this._valueMax(); + var a = this.options.step > 0 ? this.options.step : 1, + c = (b - this._valueMin()) % a; + alignValue = b - c; + if (Math.abs(c) * 2 >= a) alignValue += c > 0 ? a : -a; + return parseFloat(alignValue.toFixed(5)); + }, + _valueMin: function () { + return this.options.min; + }, + _valueMax: function () { + return this.options.max; + }, + _refreshValue: function () { + var b = this.options.range, + a = this.options, + c = this, + e = !this._animateOff ? a.animate : false, + f, + h = {}, + g, + i, + j, + l; + if (this.options.values && this.options.values.length) + this.handles.each(function (k) { + f = + ((c.values(k) - c._valueMin()) / (c._valueMax() - c._valueMin())) * + 100; + h[c.orientation === "horizontal" ? "left" : "bottom"] = f + "%"; + d(this).stop(1, 1)[e ? "animate" : "css"](h, a.animate); + if (c.options.range === true) + if (c.orientation === "horizontal") { + if (k === 0) + c.range + .stop(1, 1) + [e ? "animate" : "css"]({ left: f + "%" }, a.animate); + if (k === 1) + c.range[e ? "animate" : "css"]( + { width: f - g + "%" }, + { queue: false, duration: a.animate }, + ); + } else { + if (k === 0) + c.range + .stop(1, 1) + [e ? "animate" : "css"]({ bottom: f + "%" }, a.animate); + if (k === 1) + c.range[e ? "animate" : "css"]( + { height: f - g + "%" }, + { queue: false, duration: a.animate }, + ); + } + g = f; + }); + else { + i = this.value(); + j = this._valueMin(); + l = this._valueMax(); + f = l !== j ? ((i - j) / (l - j)) * 100 : 0; + h[c.orientation === "horizontal" ? "left" : "bottom"] = f + "%"; + this.handle.stop(1, 1)[e ? "animate" : "css"](h, a.animate); + if (b === "min" && this.orientation === "horizontal") + this.range + .stop(1, 1) + [e ? "animate" : "css"]({ width: f + "%" }, a.animate); + if (b === "max" && this.orientation === "horizontal") + this.range[e ? "animate" : "css"]( + { width: 100 - f + "%" }, + { queue: false, duration: a.animate }, + ); + if (b === "min" && this.orientation === "vertical") + this.range + .stop(1, 1) + [e ? "animate" : "css"]({ height: f + "%" }, a.animate); + if (b === "max" && this.orientation === "vertical") + this.range[e ? "animate" : "css"]( + { height: 100 - f + "%" }, + { queue: false, duration: a.animate }, + ); + } + }, + }); + d.extend(d.ui.slider, { version: "1.8.11" }); +})(jQuery); /* * jQuery UI Tabs 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -441,29 +6107,548 @@ if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.anim * jquery.ui.core.js * jquery.ui.widget.js */ -(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
          ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
        • #{label}
        • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& -e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= -d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| -(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); -this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= -this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); -if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); -this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ -g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", -function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; -this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= --1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; -d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= -d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, -e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); -j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); -if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, -this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, -load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, -"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, -url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.11"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k", + remove: null, + select: null, + show: null, + spinner: "Loading…", + tabTemplate: "
        • #{label}
        • ", + }, + _create: function () { + this._tabify(true); + }, + _setOption: function (b, e) { + if (b == "selected") + (this.options.collapsible && e == this.options.selected) || + this.select(e); + else { + this.options[b] = e; + this._tabify(); + } + }, + _tabId: function (b) { + return ( + (b.title && + b.title.replace(/\s/g, "_").replace(/[^\w\u00c0-\uFFFF-]/g, "")) || + this.options.idPrefix + u() + ); + }, + _sanitizeSelector: function (b) { + return b.replace(/:/g, "\\:"); + }, + _cookie: function () { + var b = + this.cookie || + (this.cookie = this.options.cookie.name || "ui-tabs-" + w()); + return d.cookie.apply(null, [b].concat(d.makeArray(arguments))); + }, + _ui: function (b, e) { + return { tab: b, panel: e, index: this.anchors.index(b) }; + }, + _cleanup: function () { + this.lis + .filter(".ui-state-processing") + .removeClass("ui-state-processing") + .find("span:data(label.tabs)") + .each(function () { + var b = d(this); + b.html(b.data("label.tabs")).removeData("label.tabs"); + }); + }, + _tabify: function (b) { + function e(g, f) { + g.css("display", ""); + !d.support.opacity && f.opacity && g[0].style.removeAttribute("filter"); + } + var a = this, + c = this.options, + h = /^#.+/; + this.list = this.element.find("ol,ul").eq(0); + this.lis = d(" > li:has(a[href])", this.list); + this.anchors = this.lis.map(function () { + return d("a", this)[0]; + }); + this.panels = d([]); + this.anchors.each(function (g, f) { + var i = d(f).attr("href"), + l = i.split("#")[0], + q; + if ( + l && + (l === location.toString().split("#")[0] || + ((q = d("base")[0]) && l === q.href)) + ) { + i = f.hash; + f.href = i; + } + if (h.test(i)) + a.panels = a.panels.add(a.element.find(a._sanitizeSelector(i))); + else if (i && i !== "#") { + d.data(f, "href.tabs", i); + d.data(f, "load.tabs", i.replace(/#.*$/, "")); + i = a._tabId(f); + f.href = "#" + i; + f = a.element.find("#" + i); + if (!f.length) { + f = d(c.panelTemplate) + .attr("id", i) + .addClass("ui-tabs-panel ui-widget-content ui-corner-bottom") + .insertAfter(a.panels[g - 1] || a.list); + f.data("destroy.tabs", true); + } + a.panels = a.panels.add(f); + } else c.disabled.push(g); + }); + if (b) { + this.element.addClass( + "ui-tabs ui-widget ui-widget-content ui-corner-all", + ); + this.list.addClass( + "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all", + ); + this.lis.addClass("ui-state-default ui-corner-top"); + this.panels.addClass( + "ui-tabs-panel ui-widget-content ui-corner-bottom", + ); + if (c.selected === p) { + location.hash && + this.anchors.each(function (g, f) { + if (f.hash == location.hash) { + c.selected = g; + return false; + } + }); + if (typeof c.selected !== "number" && c.cookie) + c.selected = parseInt(a._cookie(), 10); + if ( + typeof c.selected !== "number" && + this.lis.filter(".ui-tabs-selected").length + ) + c.selected = this.lis.index(this.lis.filter(".ui-tabs-selected")); + c.selected = c.selected || (this.lis.length ? 0 : -1); + } else if (c.selected === null) c.selected = -1; + c.selected = + (c.selected >= 0 && this.anchors[c.selected]) || c.selected < 0 + ? c.selected + : 0; + c.disabled = d + .unique( + c.disabled.concat( + d.map(this.lis.filter(".ui-state-disabled"), function (g) { + return a.lis.index(g); + }), + ), + ) + .sort(); + d.inArray(c.selected, c.disabled) != -1 && + c.disabled.splice(d.inArray(c.selected, c.disabled), 1); + this.panels.addClass("ui-tabs-hide"); + this.lis.removeClass("ui-tabs-selected ui-state-active"); + if (c.selected >= 0 && this.anchors.length) { + a.element + .find(a._sanitizeSelector(a.anchors[c.selected].hash)) + .removeClass("ui-tabs-hide"); + this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active"); + a.element.queue("tabs", function () { + a._trigger( + "show", + null, + a._ui( + a.anchors[c.selected], + a.element.find( + a._sanitizeSelector(a.anchors[c.selected].hash), + )[0], + ), + ); + }); + this.load(c.selected); + } + d(window).bind("unload", function () { + a.lis.add(a.anchors).unbind(".tabs"); + a.lis = a.anchors = a.panels = null; + }); + } else c.selected = this.lis.index(this.lis.filter(".ui-tabs-selected")); + this.element[c.collapsible ? "addClass" : "removeClass"]( + "ui-tabs-collapsible", + ); + c.cookie && this._cookie(c.selected, c.cookie); + b = 0; + for (var j; (j = this.lis[b]); b++) + d(j)[ + d.inArray(b, c.disabled) != -1 && !d(j).hasClass("ui-tabs-selected") + ? "addClass" + : "removeClass" + ]("ui-state-disabled"); + c.cache === false && this.anchors.removeData("cache.tabs"); + this.lis.add(this.anchors).unbind(".tabs"); + if (c.event !== "mouseover") { + var k = function (g, f) { + f.is(":not(.ui-state-disabled)") && f.addClass("ui-state-" + g); + }, + n = function (g, f) { + f.removeClass("ui-state-" + g); + }; + this.lis.bind("mouseover.tabs", function () { + k("hover", d(this)); + }); + this.lis.bind("mouseout.tabs", function () { + n("hover", d(this)); + }); + this.anchors.bind("focus.tabs", function () { + k("focus", d(this).closest("li")); + }); + this.anchors.bind("blur.tabs", function () { + n("focus", d(this).closest("li")); + }); + } + var m, o; + if (c.fx) + if (d.isArray(c.fx)) { + m = c.fx[0]; + o = c.fx[1]; + } else m = o = c.fx; + var r = o + ? function (g, f) { + d(g).closest("li").addClass("ui-tabs-selected ui-state-active"); + f.hide() + .removeClass("ui-tabs-hide") + .animate(o, o.duration || "normal", function () { + e(f, o); + a._trigger("show", null, a._ui(g, f[0])); + }); + } + : function (g, f) { + d(g).closest("li").addClass("ui-tabs-selected ui-state-active"); + f.removeClass("ui-tabs-hide"); + a._trigger("show", null, a._ui(g, f[0])); + }, + s = m + ? function (g, f) { + f.animate(m, m.duration || "normal", function () { + a.lis.removeClass("ui-tabs-selected ui-state-active"); + f.addClass("ui-tabs-hide"); + e(f, m); + a.element.dequeue("tabs"); + }); + } + : function (g, f) { + a.lis.removeClass("ui-tabs-selected ui-state-active"); + f.addClass("ui-tabs-hide"); + a.element.dequeue("tabs"); + }; + this.anchors.bind(c.event + ".tabs", function () { + var g = this, + f = d(g).closest("li"), + i = a.panels.filter(":not(.ui-tabs-hide)"), + l = a.element.find(a._sanitizeSelector(g.hash)); + if ( + (f.hasClass("ui-tabs-selected") && !c.collapsible) || + f.hasClass("ui-state-disabled") || + f.hasClass("ui-state-processing") || + a.panels.filter(":animated").length || + a._trigger("select", null, a._ui(this, l[0])) === false + ) { + this.blur(); + return false; + } + c.selected = a.anchors.index(this); + a.abort(); + if (c.collapsible) + if (f.hasClass("ui-tabs-selected")) { + c.selected = -1; + c.cookie && a._cookie(c.selected, c.cookie); + a.element + .queue("tabs", function () { + s(g, i); + }) + .dequeue("tabs"); + this.blur(); + return false; + } else if (!i.length) { + c.cookie && a._cookie(c.selected, c.cookie); + a.element.queue("tabs", function () { + r(g, l); + }); + a.load(a.anchors.index(this)); + this.blur(); + return false; + } + c.cookie && a._cookie(c.selected, c.cookie); + if (l.length) { + i.length && + a.element.queue("tabs", function () { + s(g, i); + }); + a.element.queue("tabs", function () { + r(g, l); + }); + a.load(a.anchors.index(this)); + } else throw "jQuery UI Tabs: Mismatching fragment identifier."; + d.browser.msie && this.blur(); + }); + this.anchors.bind("click.tabs", function () { + return false; + }); + }, + _getIndex: function (b) { + if (typeof b == "string") + b = this.anchors.index(this.anchors.filter("[href$=" + b + "]")); + return b; + }, + destroy: function () { + var b = this.options; + this.abort(); + this.element + .unbind(".tabs") + .removeClass( + "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible", + ) + .removeData("tabs"); + this.list.removeClass( + "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all", + ); + this.anchors.each(function () { + var e = d.data(this, "href.tabs"); + if (e) this.href = e; + var a = d(this).unbind(".tabs"); + d.each(["href", "load", "cache"], function (c, h) { + a.removeData(h + ".tabs"); + }); + }); + this.lis + .unbind(".tabs") + .add(this.panels) + .each(function () { + d.data(this, "destroy.tabs") + ? d(this).remove() + : d(this).removeClass( + "ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide", + ); + }); + b.cookie && this._cookie(null, b.cookie); + return this; + }, + add: function (b, e, a) { + if (a === p) a = this.anchors.length; + var c = this, + h = this.options; + e = d(h.tabTemplate.replace(/#\{href\}/g, b).replace(/#\{label\}/g, e)); + b = !b.indexOf("#") ? b.replace("#", "") : this._tabId(d("a", e)[0]); + e.addClass("ui-state-default ui-corner-top").data("destroy.tabs", true); + var j = c.element.find("#" + b); + j.length || + (j = d(h.panelTemplate).attr("id", b).data("destroy.tabs", true)); + j.addClass( + "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide", + ); + if (a >= this.lis.length) { + e.appendTo(this.list); + j.appendTo(this.list[0].parentNode); + } else { + e.insertBefore(this.lis[a]); + j.insertBefore(this.panels[a]); + } + h.disabled = d.map(h.disabled, function (k) { + return k >= a ? ++k : k; + }); + this._tabify(); + if (this.anchors.length == 1) { + h.selected = 0; + e.addClass("ui-tabs-selected ui-state-active"); + j.removeClass("ui-tabs-hide"); + this.element.queue("tabs", function () { + c._trigger("show", null, c._ui(c.anchors[0], c.panels[0])); + }); + this.load(0); + } + this._trigger("add", null, this._ui(this.anchors[a], this.panels[a])); + return this; + }, + remove: function (b) { + b = this._getIndex(b); + var e = this.options, + a = this.lis.eq(b).remove(), + c = this.panels.eq(b).remove(); + if (a.hasClass("ui-tabs-selected") && this.anchors.length > 1) + this.select(b + (b + 1 < this.anchors.length ? 1 : -1)); + e.disabled = d.map( + d.grep(e.disabled, function (h) { + return h != b; + }), + function (h) { + return h >= b ? --h : h; + }, + ); + this._tabify(); + this._trigger("remove", null, this._ui(a.find("a")[0], c[0])); + return this; + }, + enable: function (b) { + b = this._getIndex(b); + var e = this.options; + if (d.inArray(b, e.disabled) != -1) { + this.lis.eq(b).removeClass("ui-state-disabled"); + e.disabled = d.grep(e.disabled, function (a) { + return a != b; + }); + this._trigger( + "enable", + null, + this._ui(this.anchors[b], this.panels[b]), + ); + return this; + } + }, + disable: function (b) { + b = this._getIndex(b); + var e = this.options; + if (b != e.selected) { + this.lis.eq(b).addClass("ui-state-disabled"); + e.disabled.push(b); + e.disabled.sort(); + this._trigger( + "disable", + null, + this._ui(this.anchors[b], this.panels[b]), + ); + } + return this; + }, + select: function (b) { + b = this._getIndex(b); + if (b == -1) + if (this.options.collapsible && this.options.selected != -1) + b = this.options.selected; + else return this; + this.anchors.eq(b).trigger(this.options.event + ".tabs"); + return this; + }, + load: function (b) { + b = this._getIndex(b); + var e = this, + a = this.options, + c = this.anchors.eq(b)[0], + h = d.data(c, "load.tabs"); + this.abort(); + if ( + !h || + (this.element.queue("tabs").length !== 0 && d.data(c, "cache.tabs")) + ) + this.element.dequeue("tabs"); + else { + this.lis.eq(b).addClass("ui-state-processing"); + if (a.spinner) { + var j = d("span", c); + j.data("label.tabs", j.html()).html(a.spinner); + } + this.xhr = d.ajax( + d.extend({}, a.ajaxOptions, { + url: h, + success: function (k, n) { + e.element.find(e._sanitizeSelector(c.hash)).html(k); + e._cleanup(); + a.cache && d.data(c, "cache.tabs", true); + e._trigger("load", null, e._ui(e.anchors[b], e.panels[b])); + try { + a.ajaxOptions.success(k, n); + } catch (m) {} + }, + error: function (k, n) { + e._cleanup(); + e._trigger("load", null, e._ui(e.anchors[b], e.panels[b])); + try { + a.ajaxOptions.error(k, n, b, c); + } catch (m) {} + }, + }), + ); + e.element.dequeue("tabs"); + return this; + } + }, + abort: function () { + this.element.queue([]); + this.panels.stop(false, true); + this.element.queue("tabs", this.element.queue("tabs").splice(-2, 2)); + if (this.xhr) { + this.xhr.abort(); + delete this.xhr; + } + this._cleanup(); + return this; + }, + url: function (b, e) { + this.anchors.eq(b).removeData("cache.tabs").data("load.tabs", e); + return this; + }, + length: function () { + return this.anchors.length; + }, + }); + d.extend(d.ui.tabs, { version: "1.8.11" }); + d.extend(d.ui.tabs.prototype, { + rotation: null, + rotate: function (b, e) { + var a = this, + c = this.options, + h = + a._rotate || + (a._rotate = function (j) { + clearTimeout(a.rotation); + a.rotation = setTimeout(function () { + var k = c.selected; + a.select(++k < a.anchors.length ? k : 0); + }, b); + j && j.stopPropagation(); + }); + e = + a._unrotate || + (a._unrotate = !e + ? function (j) { + j.clientX && a.rotate(null); + } + : function () { + t = c.selected; + h(); + }); + if (b) { + this.element.bind("tabsshow", h); + this.anchors.bind(c.event + ".tabs", e); + h(); + } else { + clearTimeout(a.rotation); + this.element.unbind("tabsshow", h); + this.anchors.unbind(c.event + ".tabs", e); + delete this._rotate; + delete this._unrotate; + } + return this; + }, + }); +})(jQuery); /* * jQuery UI Datepicker 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -475,77 +6660,1833 @@ a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow" * Depends: * jquery.ui.core.js */ -(function(d,A){function K(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass= -"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su", -"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10", -minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('
          ')}function F(a,b){d.extend(a,b);for(var c in b)if(b[c]== -null||b[c]==A)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.11"}});var y=(new Date).getTime();d.extend(K.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){F(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase(); -f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('
          ')}}, -_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&& -b.append.remove();if(c){b.append=d(''+c+"");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('').addClass(this._triggerClass).html(f== -""?c:d("").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;gh){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a, -c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b), -true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}F(a.settings,e||{}); -b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass); -this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup", -this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs, -function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null: -f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target); -if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a); -d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");F(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-= -document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim"); -var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst= -b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover"); -this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+ -this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&& -a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);f=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth(): -0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a), -"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"? -"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose"))a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a= -d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a= -d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c== -"M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth= -b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker(); -this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0); -a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c? -c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=z+1-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}w=this._daylightSavingAdjust(new Date(c,j-1,l));if(w.getFullYear()!=c||w.getMonth()+1!=j||w.getDate()!=l)throw"Invalid date";return w},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y", -RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+112?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay= -a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(), -b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n= -this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&nn;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?''+n+"":f?"":''+n+"";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?''+r+"":f?"":''+r+"";j=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,r,this._getFormatConfig(a));h=!a.inline?'":"";e=e?'
          '+(c?h:"")+(this._isInRange(a,r)?'":"")+(c?"":h)+"
          ":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z= -this._get(a,"monthNames"),w=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var L=this._getDefaultDate(a),I="",D=0;D1)switch(E){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]- -1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}x+='">'}x+='
          '+(/all|left/.test(t)&&D==0?c?f:n:"")+(/all|right/.test(t)&&D==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,D>0||E>0,z,w)+'
          ';var B=j?'":"";for(t=0;t<7;t++){var q= -(t+h)%7;B+="=5?' class="ui-datepicker-week-end"':"")+'>'+s[q]+""}x+=B+"";B=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,B);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;B=l?6:Math.ceil((t+B)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O";var P=!j?"":'";for(t=0;t<7;t++){var G= -p?p.apply(a.input?a.input[0]:null,[q]):[true,""],C=q.getMonth()!=g,J=C&&!H||!G[0]||k&&qo;P+='";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+= -P+""}g++;if(g>11){g=0;m++}x+="
          '+this._get(a,"weekHeader")+"
          '+this._get(a,"calculateWeek")(q)+""+(C&&!v?" ":J?''+q.getDate()+"":''+q.getDate()+"")+"
          "+(l?""+(i[0]>0&&E==i[1]-1?'
          ':""):"");M+=x}I+=M}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
          ', -o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&& -l)?" ":""));a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";if(d.browser.mozilla)k+='";else{k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
          ";return k},_adjustInstDate:function(a,b,c){var e= -a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a, -"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a); -c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a, -"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker= -function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker, -[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.11";window["DP_jQuery_"+y]=d})(jQuery); -;/* +(function (d, A) { + function K() { + this.debug = false; + this._curInst = null; + this._keyEvent = false; + this._disabledInputs = []; + this._inDialog = this._datepickerShowing = false; + this._mainDivId = "ui-datepicker-div"; + this._inlineClass = "ui-datepicker-inline"; + this._appendClass = "ui-datepicker-append"; + this._triggerClass = "ui-datepicker-trigger"; + this._dialogClass = "ui-datepicker-dialog"; + this._disableClass = "ui-datepicker-disabled"; + this._unselectableClass = "ui-datepicker-unselectable"; + this._currentClass = "ui-datepicker-current-day"; + this._dayOverClass = "ui-datepicker-days-cell-over"; + this.regional = []; + this.regional[""] = { + closeText: "Done", + prevText: "Prev", + nextText: "Next", + currentText: "Today", + monthNames: [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + ], + monthNamesShort: [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec", + ], + dayNames: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + ], + dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + weekHeader: "Wk", + dateFormat: "mm/dd/yy", + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: "", + }; + this._defaults = { + showOn: "focus", + showAnim: "fadeIn", + showOptions: {}, + defaultDate: null, + appendText: "", + buttonText: "...", + buttonImage: "", + buttonImageOnly: false, + hideIfNoPrevNext: false, + navigationAsDateFormat: false, + gotoCurrent: false, + changeMonth: false, + changeYear: false, + yearRange: "c-10:c+10", + showOtherMonths: false, + selectOtherMonths: false, + showWeek: false, + calculateWeek: this.iso8601Week, + shortYearCutoff: "+10", + minDate: null, + maxDate: null, + duration: "fast", + beforeShowDay: null, + beforeShow: null, + onSelect: null, + onChangeMonthYear: null, + onClose: null, + numberOfMonths: 1, + showCurrentAtPos: 0, + stepMonths: 1, + stepBigMonths: 12, + altField: "", + altFormat: "", + constrainInput: true, + showButtonPanel: false, + autoSize: false, + }; + d.extend(this._defaults, this.regional[""]); + this.dpDiv = d( + '
          ', + ); + } + function F(a, b) { + d.extend(a, b); + for (var c in b) if (b[c] == null || b[c] == A) a[c] = b[c]; + return a; + } + d.extend(d.ui, { datepicker: { version: "1.8.11" } }); + var y = new Date().getTime(); + d.extend(K.prototype, { + markerClassName: "hasDatepicker", + log: function () { + this.debug && console.log.apply("", arguments); + }, + _widgetDatepicker: function () { + return this.dpDiv; + }, + setDefaults: function (a) { + F(this._defaults, a || {}); + return this; + }, + _attachDatepicker: function (a, b) { + var c = null; + for (var e in this._defaults) { + var f = a.getAttribute("date:" + e); + if (f) { + c = c || {}; + try { + c[e] = eval(f); + } catch (h) { + c[e] = f; + } + } + } + e = a.nodeName.toLowerCase(); + f = e == "div" || e == "span"; + if (!a.id) { + this.uuid += 1; + a.id = "dp" + this.uuid; + } + var i = this._newInst(d(a), f); + i.settings = d.extend({}, b || {}, c || {}); + if (e == "input") this._connectDatepicker(a, i); + else f && this._inlineDatepicker(a, i); + }, + _newInst: function (a, b) { + return { + id: a[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1"), + input: a, + selectedDay: 0, + selectedMonth: 0, + selectedYear: 0, + drawMonth: 0, + drawYear: 0, + inline: b, + dpDiv: !b + ? this.dpDiv + : d( + '
          ', + ), + }; + }, + _connectDatepicker: function (a, b) { + var c = d(a); + b.append = d([]); + b.trigger = d([]); + if (!c.hasClass(this.markerClassName)) { + this._attachments(c, b); + c.addClass(this.markerClassName) + .keydown(this._doKeyDown) + .keypress(this._doKeyPress) + .keyup(this._doKeyUp) + .bind("setData.datepicker", function (e, f, h) { + b.settings[f] = h; + }) + .bind("getData.datepicker", function (e, f) { + return this._get(b, f); + }); + this._autoSize(b); + d.data(a, "datepicker", b); + } + }, + _attachments: function (a, b) { + var c = this._get(b, "appendText"), + e = this._get(b, "isRTL"); + b.append && b.append.remove(); + if (c) { + b.append = d( + '' + c + "", + ); + a[e ? "before" : "after"](b.append); + } + a.unbind("focus", this._showDatepicker); + b.trigger && b.trigger.remove(); + c = this._get(b, "showOn"); + if (c == "focus" || c == "both") a.focus(this._showDatepicker); + if (c == "button" || c == "both") { + c = this._get(b, "buttonText"); + var f = this._get(b, "buttonImage"); + b.trigger = d( + this._get(b, "buttonImageOnly") + ? d("") + .addClass(this._triggerClass) + .attr({ src: f, alt: c, title: c }) + : d('') + .addClass(this._triggerClass) + .html( + f == "" ? c : d("").attr({ src: f, alt: c, title: c }), + ), + ); + a[e ? "before" : "after"](b.trigger); + b.trigger.click(function () { + d.datepicker._datepickerShowing && d.datepicker._lastInput == a[0] + ? d.datepicker._hideDatepicker() + : d.datepicker._showDatepicker(a[0]); + return false; + }); + } + }, + _autoSize: function (a) { + if (this._get(a, "autoSize") && !a.inline) { + var b = new Date(2009, 11, 20), + c = this._get(a, "dateFormat"); + if (c.match(/[DM]/)) { + var e = function (f) { + for (var h = 0, i = 0, g = 0; g < f.length; g++) + if (f[g].length > h) { + h = f[g].length; + i = g; + } + return i; + }; + b.setMonth( + e(this._get(a, c.match(/MM/) ? "monthNames" : "monthNamesShort")), + ); + b.setDate( + e(this._get(a, c.match(/DD/) ? "dayNames" : "dayNamesShort")) + + 20 - + b.getDay(), + ); + } + a.input.attr("size", this._formatDate(a, b).length); + } + }, + _inlineDatepicker: function (a, b) { + var c = d(a); + if (!c.hasClass(this.markerClassName)) { + c.addClass(this.markerClassName) + .append(b.dpDiv) + .bind("setData.datepicker", function (e, f, h) { + b.settings[f] = h; + }) + .bind("getData.datepicker", function (e, f) { + return this._get(b, f); + }); + d.data(a, "datepicker", b); + this._setDate(b, this._getDefaultDate(b), true); + this._updateDatepicker(b); + this._updateAlternate(b); + b.dpDiv.show(); + } + }, + _dialogDatepicker: function (a, b, c, e, f) { + a = this._dialogInst; + if (!a) { + this.uuid += 1; + this._dialogInput = d( + '', + ); + this._dialogInput.keydown(this._doKeyDown); + d("body").append(this._dialogInput); + a = this._dialogInst = this._newInst(this._dialogInput, false); + a.settings = {}; + d.data(this._dialogInput[0], "datepicker", a); + } + F(a.settings, e || {}); + b = b && b.constructor == Date ? this._formatDate(a, b) : b; + this._dialogInput.val(b); + this._pos = f ? (f.length ? f : [f.pageX, f.pageY]) : null; + if (!this._pos) + this._pos = [ + document.documentElement.clientWidth / 2 - + 100 + + (document.documentElement.scrollLeft || document.body.scrollLeft), + document.documentElement.clientHeight / 2 - + 150 + + (document.documentElement.scrollTop || document.body.scrollTop), + ]; + this._dialogInput + .css("left", this._pos[0] + 20 + "px") + .css("top", this._pos[1] + "px"); + a.settings.onSelect = c; + this._inDialog = true; + this.dpDiv.addClass(this._dialogClass); + this._showDatepicker(this._dialogInput[0]); + d.blockUI && d.blockUI(this.dpDiv); + d.data(this._dialogInput[0], "datepicker", a); + return this; + }, + _destroyDatepicker: function (a) { + var b = d(a), + c = d.data(a, "datepicker"); + if (b.hasClass(this.markerClassName)) { + var e = a.nodeName.toLowerCase(); + d.removeData(a, "datepicker"); + if (e == "input") { + c.append.remove(); + c.trigger.remove(); + b.removeClass(this.markerClassName) + .unbind("focus", this._showDatepicker) + .unbind("keydown", this._doKeyDown) + .unbind("keypress", this._doKeyPress) + .unbind("keyup", this._doKeyUp); + } else if (e == "div" || e == "span") + b.removeClass(this.markerClassName).empty(); + } + }, + _enableDatepicker: function (a) { + var b = d(a), + c = d.data(a, "datepicker"); + if (b.hasClass(this.markerClassName)) { + var e = a.nodeName.toLowerCase(); + if (e == "input") { + a.disabled = false; + c.trigger + .filter("button") + .each(function () { + this.disabled = false; + }) + .end() + .filter("img") + .css({ opacity: "1.0", cursor: "" }); + } else if (e == "div" || e == "span") + b.children("." + this._inlineClass) + .children() + .removeClass("ui-state-disabled"); + this._disabledInputs = d.map(this._disabledInputs, function (f) { + return f == a ? null : f; + }); + } + }, + _disableDatepicker: function (a) { + var b = d(a), + c = d.data(a, "datepicker"); + if (b.hasClass(this.markerClassName)) { + var e = a.nodeName.toLowerCase(); + if (e == "input") { + a.disabled = true; + c.trigger + .filter("button") + .each(function () { + this.disabled = true; + }) + .end() + .filter("img") + .css({ opacity: "0.5", cursor: "default" }); + } else if (e == "div" || e == "span") + b.children("." + this._inlineClass) + .children() + .addClass("ui-state-disabled"); + this._disabledInputs = d.map(this._disabledInputs, function (f) { + return f == a ? null : f; + }); + this._disabledInputs[this._disabledInputs.length] = a; + } + }, + _isDisabledDatepicker: function (a) { + if (!a) return false; + for (var b = 0; b < this._disabledInputs.length; b++) + if (this._disabledInputs[b] == a) return true; + return false; + }, + _getInst: function (a) { + try { + return d.data(a, "datepicker"); + } catch (b) { + throw "Missing instance data for this datepicker"; + } + }, + _optionDatepicker: function (a, b, c) { + var e = this._getInst(a); + if (arguments.length == 2 && typeof b == "string") + return b == "defaults" + ? d.extend({}, d.datepicker._defaults) + : e + ? b == "all" + ? d.extend({}, e.settings) + : this._get(e, b) + : null; + var f = b || {}; + if (typeof b == "string") { + f = {}; + f[b] = c; + } + if (e) { + this._curInst == e && this._hideDatepicker(); + var h = this._getDateDatepicker(a, true), + i = this._getMinMaxDate(e, "min"), + g = this._getMinMaxDate(e, "max"); + F(e.settings, f); + if (i !== null && f.dateFormat !== A && f.minDate === A) + e.settings.minDate = this._formatDate(e, i); + if (g !== null && f.dateFormat !== A && f.maxDate === A) + e.settings.maxDate = this._formatDate(e, g); + this._attachments(d(a), e); + this._autoSize(e); + this._setDateDatepicker(a, h); + this._updateDatepicker(e); + } + }, + _changeDatepicker: function (a, b, c) { + this._optionDatepicker(a, b, c); + }, + _refreshDatepicker: function (a) { + (a = this._getInst(a)) && this._updateDatepicker(a); + }, + _setDateDatepicker: function (a, b) { + if ((a = this._getInst(a))) { + this._setDate(a, b); + this._updateDatepicker(a); + this._updateAlternate(a); + } + }, + _getDateDatepicker: function (a, b) { + (a = this._getInst(a)) && !a.inline && this._setDateFromField(a, b); + return a ? this._getDate(a) : null; + }, + _doKeyDown: function (a) { + var b = d.datepicker._getInst(a.target), + c = true, + e = b.dpDiv.is(".ui-datepicker-rtl"); + b._keyEvent = true; + if (d.datepicker._datepickerShowing) + switch (a.keyCode) { + case 9: + d.datepicker._hideDatepicker(); + c = false; + break; + case 13: + c = d( + "td." + + d.datepicker._dayOverClass + + ":not(." + + d.datepicker._currentClass + + ")", + b.dpDiv, + ); + c[0] + ? d.datepicker._selectDay( + a.target, + b.selectedMonth, + b.selectedYear, + c[0], + ) + : d.datepicker._hideDatepicker(); + return false; + case 27: + d.datepicker._hideDatepicker(); + break; + case 33: + d.datepicker._adjustDate( + a.target, + a.ctrlKey + ? -d.datepicker._get(b, "stepBigMonths") + : -d.datepicker._get(b, "stepMonths"), + "M", + ); + break; + case 34: + d.datepicker._adjustDate( + a.target, + a.ctrlKey + ? +d.datepicker._get(b, "stepBigMonths") + : +d.datepicker._get(b, "stepMonths"), + "M", + ); + break; + case 35: + if (a.ctrlKey || a.metaKey) d.datepicker._clearDate(a.target); + c = a.ctrlKey || a.metaKey; + break; + case 36: + if (a.ctrlKey || a.metaKey) d.datepicker._gotoToday(a.target); + c = a.ctrlKey || a.metaKey; + break; + case 37: + if (a.ctrlKey || a.metaKey) + d.datepicker._adjustDate(a.target, e ? +1 : -1, "D"); + c = a.ctrlKey || a.metaKey; + if (a.originalEvent.altKey) + d.datepicker._adjustDate( + a.target, + a.ctrlKey + ? -d.datepicker._get(b, "stepBigMonths") + : -d.datepicker._get(b, "stepMonths"), + "M", + ); + break; + case 38: + if (a.ctrlKey || a.metaKey) + d.datepicker._adjustDate(a.target, -7, "D"); + c = a.ctrlKey || a.metaKey; + break; + case 39: + if (a.ctrlKey || a.metaKey) + d.datepicker._adjustDate(a.target, e ? -1 : +1, "D"); + c = a.ctrlKey || a.metaKey; + if (a.originalEvent.altKey) + d.datepicker._adjustDate( + a.target, + a.ctrlKey + ? +d.datepicker._get(b, "stepBigMonths") + : +d.datepicker._get(b, "stepMonths"), + "M", + ); + break; + case 40: + if (a.ctrlKey || a.metaKey) + d.datepicker._adjustDate(a.target, +7, "D"); + c = a.ctrlKey || a.metaKey; + break; + default: + c = false; + } + else if (a.keyCode == 36 && a.ctrlKey) d.datepicker._showDatepicker(this); + else c = false; + if (c) { + a.preventDefault(); + a.stopPropagation(); + } + }, + _doKeyPress: function (a) { + var b = d.datepicker._getInst(a.target); + if (d.datepicker._get(b, "constrainInput")) { + b = d.datepicker._possibleChars(d.datepicker._get(b, "dateFormat")); + var c = String.fromCharCode(a.charCode == A ? a.keyCode : a.charCode); + return a.ctrlKey || a.metaKey || c < " " || !b || b.indexOf(c) > -1; + } + }, + _doKeyUp: function (a) { + a = d.datepicker._getInst(a.target); + if (a.input.val() != a.lastVal) + try { + if ( + d.datepicker.parseDate( + d.datepicker._get(a, "dateFormat"), + a.input ? a.input.val() : null, + d.datepicker._getFormatConfig(a), + ) + ) { + d.datepicker._setDateFromField(a); + d.datepicker._updateAlternate(a); + d.datepicker._updateDatepicker(a); + } + } catch (b) { + d.datepicker.log(b); + } + return true; + }, + _showDatepicker: function (a) { + a = a.target || a; + if (a.nodeName.toLowerCase() != "input") a = d("input", a.parentNode)[0]; + if ( + !(d.datepicker._isDisabledDatepicker(a) || d.datepicker._lastInput == a) + ) { + var b = d.datepicker._getInst(a); + d.datepicker._curInst && + d.datepicker._curInst != b && + d.datepicker._curInst.dpDiv.stop(true, true); + var c = d.datepicker._get(b, "beforeShow"); + F(b.settings, c ? c.apply(a, [a, b]) : {}); + b.lastVal = null; + d.datepicker._lastInput = a; + d.datepicker._setDateFromField(b); + if (d.datepicker._inDialog) a.value = ""; + if (!d.datepicker._pos) { + d.datepicker._pos = d.datepicker._findPos(a); + d.datepicker._pos[1] += a.offsetHeight; + } + var e = false; + d(a) + .parents() + .each(function () { + e |= d(this).css("position") == "fixed"; + return !e; + }); + if (e && d.browser.opera) { + d.datepicker._pos[0] -= document.documentElement.scrollLeft; + d.datepicker._pos[1] -= document.documentElement.scrollTop; + } + c = { left: d.datepicker._pos[0], top: d.datepicker._pos[1] }; + d.datepicker._pos = null; + b.dpDiv.empty(); + b.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }); + d.datepicker._updateDatepicker(b); + c = d.datepicker._checkOffset(b, c, e); + b.dpDiv.css({ + position: + d.datepicker._inDialog && d.blockUI + ? "static" + : e + ? "fixed" + : "absolute", + display: "none", + left: c.left + "px", + top: c.top + "px", + }); + if (!b.inline) { + c = d.datepicker._get(b, "showAnim"); + var f = d.datepicker._get(b, "duration"), + h = function () { + d.datepicker._datepickerShowing = true; + var i = b.dpDiv.find("iframe.ui-datepicker-cover"); + if (i.length) { + var g = d.datepicker._getBorders(b.dpDiv); + i.css({ + left: -g[0], + top: -g[1], + width: b.dpDiv.outerWidth(), + height: b.dpDiv.outerHeight(), + }); + } + }; + b.dpDiv.zIndex(d(a).zIndex() + 1); + d.effects && d.effects[c] + ? b.dpDiv.show(c, d.datepicker._get(b, "showOptions"), f, h) + : b.dpDiv[c || "show"](c ? f : null, h); + if (!c || !f) h(); + b.input.is(":visible") && !b.input.is(":disabled") && b.input.focus(); + d.datepicker._curInst = b; + } + } + }, + _updateDatepicker: function (a) { + var b = this, + c = d.datepicker._getBorders(a.dpDiv); + a.dpDiv.empty().append(this._generateHTML(a)); + var e = a.dpDiv.find("iframe.ui-datepicker-cover"); + e.length && + e.css({ + left: -c[0], + top: -c[1], + width: a.dpDiv.outerWidth(), + height: a.dpDiv.outerHeight(), + }); + a.dpDiv + .find( + "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a", + ) + .bind("mouseout", function () { + d(this).removeClass("ui-state-hover"); + this.className.indexOf("ui-datepicker-prev") != -1 && + d(this).removeClass("ui-datepicker-prev-hover"); + this.className.indexOf("ui-datepicker-next") != -1 && + d(this).removeClass("ui-datepicker-next-hover"); + }) + .bind("mouseover", function () { + if ( + !b._isDisabledDatepicker( + a.inline ? a.dpDiv.parent()[0] : a.input[0], + ) + ) { + d(this) + .parents(".ui-datepicker-calendar") + .find("a") + .removeClass("ui-state-hover"); + d(this).addClass("ui-state-hover"); + this.className.indexOf("ui-datepicker-prev") != -1 && + d(this).addClass("ui-datepicker-prev-hover"); + this.className.indexOf("ui-datepicker-next") != -1 && + d(this).addClass("ui-datepicker-next-hover"); + } + }) + .end() + .find("." + this._dayOverClass + " a") + .trigger("mouseover") + .end(); + c = this._getNumberOfMonths(a); + e = c[1]; + e > 1 + ? a.dpDiv + .addClass("ui-datepicker-multi-" + e) + .css("width", 17 * e + "em") + : a.dpDiv + .removeClass( + "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4", + ) + .width(""); + a.dpDiv[(c[0] != 1 || c[1] != 1 ? "add" : "remove") + "Class"]( + "ui-datepicker-multi", + ); + a.dpDiv[(this._get(a, "isRTL") ? "add" : "remove") + "Class"]( + "ui-datepicker-rtl", + ); + a == d.datepicker._curInst && + d.datepicker._datepickerShowing && + a.input && + a.input.is(":visible") && + !a.input.is(":disabled") && + a.input[0] != document.activeElement && + a.input.focus(); + if (a.yearshtml) { + var f = a.yearshtml; + setTimeout(function () { + f === a.yearshtml && + a.dpDiv + .find("select.ui-datepicker-year:first") + .replaceWith(a.yearshtml); + f = a.yearshtml = null; + }, 0); + } + }, + _getBorders: function (a) { + var b = function (c) { + return { thin: 1, medium: 2, thick: 3 }[c] || c; + }; + return [ + parseFloat(b(a.css("border-left-width"))), + parseFloat(b(a.css("border-top-width"))), + ]; + }, + _checkOffset: function (a, b, c) { + var e = a.dpDiv.outerWidth(), + f = a.dpDiv.outerHeight(), + h = a.input ? a.input.outerWidth() : 0, + i = a.input ? a.input.outerHeight() : 0, + g = document.documentElement.clientWidth + d(document).scrollLeft(), + j = document.documentElement.clientHeight + d(document).scrollTop(); + b.left -= this._get(a, "isRTL") ? e - h : 0; + b.left -= + c && b.left == a.input.offset().left ? d(document).scrollLeft() : 0; + b.top -= + c && b.top == a.input.offset().top + i ? d(document).scrollTop() : 0; + b.left -= Math.min( + b.left, + b.left + e > g && g > e ? Math.abs(b.left + e - g) : 0, + ); + b.top -= Math.min(b.top, b.top + f > j && j > f ? Math.abs(f + i) : 0); + return b; + }, + _findPos: function (a) { + for ( + var b = this._get(this._getInst(a), "isRTL"); + a && + (a.type == "hidden" || a.nodeType != 1 || d.expr.filters.hidden(a)); + + ) + a = a[b ? "previousSibling" : "nextSibling"]; + a = d(a).offset(); + return [a.left, a.top]; + }, + _hideDatepicker: function (a) { + var b = this._curInst; + if (!(!b || (a && b != d.data(a, "datepicker")))) + if (this._datepickerShowing) { + a = this._get(b, "showAnim"); + var c = this._get(b, "duration"), + e = function () { + d.datepicker._tidyDialog(b); + this._curInst = null; + }; + d.effects && d.effects[a] + ? b.dpDiv.hide(a, d.datepicker._get(b, "showOptions"), c, e) + : b.dpDiv[ + a == "slideDown" + ? "slideUp" + : a == "fadeIn" + ? "fadeOut" + : "hide" + ](a ? c : null, e); + a || e(); + if ((a = this._get(b, "onClose"))) + a.apply(b.input ? b.input[0] : null, [ + b.input ? b.input.val() : "", + b, + ]); + this._datepickerShowing = false; + this._lastInput = null; + if (this._inDialog) { + this._dialogInput.css({ + position: "absolute", + left: "0", + top: "-100px", + }); + if (d.blockUI) { + d.unblockUI(); + d("body").append(this.dpDiv); + } + } + this._inDialog = false; + } + }, + _tidyDialog: function (a) { + a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar"); + }, + _checkExternalClick: function (a) { + if (d.datepicker._curInst) { + a = d(a.target); + a[0].id != d.datepicker._mainDivId && + a.parents("#" + d.datepicker._mainDivId).length == 0 && + !a.hasClass(d.datepicker.markerClassName) && + !a.hasClass(d.datepicker._triggerClass) && + d.datepicker._datepickerShowing && + !(d.datepicker._inDialog && d.blockUI) && + d.datepicker._hideDatepicker(); + } + }, + _adjustDate: function (a, b, c) { + a = d(a); + var e = this._getInst(a[0]); + if (!this._isDisabledDatepicker(a[0])) { + this._adjustInstDate( + e, + b + (c == "M" ? this._get(e, "showCurrentAtPos") : 0), + c, + ); + this._updateDatepicker(e); + } + }, + _gotoToday: function (a) { + a = d(a); + var b = this._getInst(a[0]); + if (this._get(b, "gotoCurrent") && b.currentDay) { + b.selectedDay = b.currentDay; + b.drawMonth = b.selectedMonth = b.currentMonth; + b.drawYear = b.selectedYear = b.currentYear; + } else { + var c = new Date(); + b.selectedDay = c.getDate(); + b.drawMonth = b.selectedMonth = c.getMonth(); + b.drawYear = b.selectedYear = c.getFullYear(); + } + this._notifyChange(b); + this._adjustDate(a); + }, + _selectMonthYear: function (a, b, c) { + a = d(a); + var e = this._getInst(a[0]); + e._selectingMonthYear = false; + e["selected" + (c == "M" ? "Month" : "Year")] = e[ + "draw" + (c == "M" ? "Month" : "Year") + ] = parseInt(b.options[b.selectedIndex].value, 10); + this._notifyChange(e); + this._adjustDate(a); + }, + _clickMonthYear: function (a) { + var b = this._getInst(d(a)[0]); + b.input && + b._selectingMonthYear && + setTimeout(function () { + b.input.focus(); + }, 0); + b._selectingMonthYear = !b._selectingMonthYear; + }, + _selectDay: function (a, b, c, e) { + var f = d(a); + if ( + !( + d(e).hasClass(this._unselectableClass) || + this._isDisabledDatepicker(f[0]) + ) + ) { + f = this._getInst(f[0]); + f.selectedDay = f.currentDay = d("a", e).html(); + f.selectedMonth = f.currentMonth = b; + f.selectedYear = f.currentYear = c; + this._selectDate( + a, + this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear), + ); + } + }, + _clearDate: function (a) { + a = d(a); + this._getInst(a[0]); + this._selectDate(a, ""); + }, + _selectDate: function (a, b) { + a = this._getInst(d(a)[0]); + b = b != null ? b : this._formatDate(a); + a.input && a.input.val(b); + this._updateAlternate(a); + var c = this._get(a, "onSelect"); + if (c) c.apply(a.input ? a.input[0] : null, [b, a]); + else a.input && a.input.trigger("change"); + if (a.inline) this._updateDatepicker(a); + else { + this._hideDatepicker(); + this._lastInput = a.input[0]; + typeof a.input[0] != "object" && a.input.focus(); + this._lastInput = null; + } + }, + _updateAlternate: function (a) { + var b = this._get(a, "altField"); + if (b) { + var c = this._get(a, "altFormat") || this._get(a, "dateFormat"), + e = this._getDate(a), + f = this.formatDate(c, e, this._getFormatConfig(a)); + d(b).each(function () { + d(this).val(f); + }); + } + }, + noWeekends: function (a) { + a = a.getDay(); + return [a > 0 && a < 6, ""]; + }, + iso8601Week: function (a) { + a = new Date(a.getTime()); + a.setDate(a.getDate() + 4 - (a.getDay() || 7)); + var b = a.getTime(); + a.setMonth(0); + a.setDate(1); + return Math.floor(Math.round((b - a) / 864e5) / 7) + 1; + }, + parseDate: function (a, b, c) { + if (a == null || b == null) throw "Invalid arguments"; + b = typeof b == "object" ? b.toString() : b + ""; + if (b == "") return null; + var e = (c ? c.shortYearCutoff : null) || this._defaults.shortYearCutoff; + e = + typeof e != "string" + ? e + : (new Date().getFullYear() % 100) + parseInt(e, 10); + for ( + var f = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort, + h = (c ? c.dayNames : null) || this._defaults.dayNames, + i = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort, + g = (c ? c.monthNames : null) || this._defaults.monthNames, + j = (c = -1), + l = -1, + u = -1, + k = false, + o = function (p) { + (p = z + 1 < a.length && a.charAt(z + 1) == p) && z++; + return p; + }, + m = function (p) { + var v = o(p); + p = new RegExp( + "^\\d{1," + + (p == "@" + ? 14 + : p == "!" + ? 20 + : p == "y" && v + ? 4 + : p == "o" + ? 3 + : 2) + + "}", + ); + p = b.substring(s).match(p); + if (!p) throw "Missing number at position " + s; + s += p[0].length; + return parseInt(p[0], 10); + }, + n = function (p, v, H) { + p = o(p) ? H : v; + for (v = 0; v < p.length; v++) + if ( + b.substr(s, p[v].length).toLowerCase() == p[v].toLowerCase() + ) { + s += p[v].length; + return v + 1; + } + throw "Unknown name at position " + s; + }, + r = function () { + if (b.charAt(s) != a.charAt(z)) + throw "Unexpected literal at position " + s; + s++; + }, + s = 0, + z = 0; + z < a.length; + z++ + ) + if (k) + if (a.charAt(z) == "'" && !o("'")) k = false; + else r(); + else + switch (a.charAt(z)) { + case "d": + l = m("d"); + break; + case "D": + n("D", f, h); + break; + case "o": + u = m("o"); + break; + case "m": + j = m("m"); + break; + case "M": + j = n("M", i, g); + break; + case "y": + c = m("y"); + break; + case "@": + var w = new Date(m("@")); + c = w.getFullYear(); + j = w.getMonth() + 1; + l = w.getDate(); + break; + case "!": + w = new Date((m("!") - this._ticksTo1970) / 1e4); + c = w.getFullYear(); + j = w.getMonth() + 1; + l = w.getDate(); + break; + case "'": + if (o("'")) r(); + else k = true; + break; + default: + r(); + } + if (c == -1) c = new Date().getFullYear(); + else if (c < 100) + c += + new Date().getFullYear() - + (new Date().getFullYear() % 100) + + (c <= e ? 0 : -100); + if (u > -1) { + j = 1; + l = u; + do { + e = this._getDaysInMonth(c, j - 1); + if (l <= e) break; + j++; + l -= e; + } while (1); + } + w = this._daylightSavingAdjust(new Date(c, j - 1, l)); + if (w.getFullYear() != c || w.getMonth() + 1 != j || w.getDate() != l) + throw "Invalid date"; + return w; + }, + ATOM: "yy-mm-dd", + COOKIE: "D, dd M yy", + ISO_8601: "yy-mm-dd", + RFC_822: "D, d M y", + RFC_850: "DD, dd-M-y", + RFC_1036: "D, d M y", + RFC_1123: "D, d M yy", + RFC_2822: "D, d M yy", + RSS: "D, d M y", + TICKS: "!", + TIMESTAMP: "@", + W3C: "yy-mm-dd", + _ticksTo1970: + (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * + 24 * + 60 * + 60 * + 1e7, + formatDate: function (a, b, c) { + if (!b) return ""; + var e = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort, + f = (c ? c.dayNames : null) || this._defaults.dayNames, + h = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort; + c = (c ? c.monthNames : null) || this._defaults.monthNames; + var i = function (o) { + (o = k + 1 < a.length && a.charAt(k + 1) == o) && k++; + return o; + }, + g = function (o, m, n) { + m = "" + m; + if (i(o)) for (; m.length < n; ) m = "0" + m; + return m; + }, + j = function (o, m, n, r) { + return i(o) ? r[m] : n[m]; + }, + l = "", + u = false; + if (b) + for (var k = 0; k < a.length; k++) + if (u) + if (a.charAt(k) == "'" && !i("'")) u = false; + else l += a.charAt(k); + else + switch (a.charAt(k)) { + case "d": + l += g("d", b.getDate(), 2); + break; + case "D": + l += j("D", b.getDay(), e, f); + break; + case "o": + l += g( + "o", + (b.getTime() - new Date(b.getFullYear(), 0, 0).getTime()) / + 864e5, + 3, + ); + break; + case "m": + l += g("m", b.getMonth() + 1, 2); + break; + case "M": + l += j("M", b.getMonth(), h, c); + break; + case "y": + l += i("y") + ? b.getFullYear() + : (b.getYear() % 100 < 10 ? "0" : "") + (b.getYear() % 100); + break; + case "@": + l += b.getTime(); + break; + case "!": + l += b.getTime() * 1e4 + this._ticksTo1970; + break; + case "'": + if (i("'")) l += "'"; + else u = true; + break; + default: + l += a.charAt(k); + } + return l; + }, + _possibleChars: function (a) { + for ( + var b = "", + c = false, + e = function (h) { + (h = f + 1 < a.length && a.charAt(f + 1) == h) && f++; + return h; + }, + f = 0; + f < a.length; + f++ + ) + if (c) + if (a.charAt(f) == "'" && !e("'")) c = false; + else b += a.charAt(f); + else + switch (a.charAt(f)) { + case "d": + case "m": + case "y": + case "@": + b += "0123456789"; + break; + case "D": + case "M": + return null; + case "'": + if (e("'")) b += "'"; + else c = true; + break; + default: + b += a.charAt(f); + } + return b; + }, + _get: function (a, b) { + return a.settings[b] !== A ? a.settings[b] : this._defaults[b]; + }, + _setDateFromField: function (a, b) { + if (a.input.val() != a.lastVal) { + var c = this._get(a, "dateFormat"), + e = (a.lastVal = a.input ? a.input.val() : null), + f, + h; + f = h = this._getDefaultDate(a); + var i = this._getFormatConfig(a); + try { + f = this.parseDate(c, e, i) || h; + } catch (g) { + this.log(g); + e = b ? "" : e; + } + a.selectedDay = f.getDate(); + a.drawMonth = a.selectedMonth = f.getMonth(); + a.drawYear = a.selectedYear = f.getFullYear(); + a.currentDay = e ? f.getDate() : 0; + a.currentMonth = e ? f.getMonth() : 0; + a.currentYear = e ? f.getFullYear() : 0; + this._adjustInstDate(a); + } + }, + _getDefaultDate: function (a) { + return this._restrictMinMax( + a, + this._determineDate(a, this._get(a, "defaultDate"), new Date()), + ); + }, + _determineDate: function (a, b, c) { + var e = function (h) { + var i = new Date(); + i.setDate(i.getDate() + h); + return i; + }, + f = function (h) { + try { + return d.datepicker.parseDate( + d.datepicker._get(a, "dateFormat"), + h, + d.datepicker._getFormatConfig(a), + ); + } catch (i) {} + var g = + (h.toLowerCase().match(/^c/) ? d.datepicker._getDate(a) : null) || + new Date(), + j = g.getFullYear(), + l = g.getMonth(); + g = g.getDate(); + for ( + var u = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, k = u.exec(h); + k; + + ) { + switch (k[2] || "d") { + case "d": + case "D": + g += parseInt(k[1], 10); + break; + case "w": + case "W": + g += parseInt(k[1], 10) * 7; + break; + case "m": + case "M": + l += parseInt(k[1], 10); + g = Math.min(g, d.datepicker._getDaysInMonth(j, l)); + break; + case "y": + case "Y": + j += parseInt(k[1], 10); + g = Math.min(g, d.datepicker._getDaysInMonth(j, l)); + break; + } + k = u.exec(h); + } + return new Date(j, l, g); + }; + if ( + (b = + (b = + b == null || b === "" + ? c + : typeof b == "string" + ? f(b) + : typeof b == "number" + ? isNaN(b) + ? c + : e(b) + : new Date(b.getTime())) && b.toString() == "Invalid Date" + ? c + : b) + ) { + b.setHours(0); + b.setMinutes(0); + b.setSeconds(0); + b.setMilliseconds(0); + } + return this._daylightSavingAdjust(b); + }, + _daylightSavingAdjust: function (a) { + if (!a) return null; + a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0); + return a; + }, + _setDate: function (a, b, c) { + var e = !b, + f = a.selectedMonth, + h = a.selectedYear; + b = this._restrictMinMax(a, this._determineDate(a, b, new Date())); + a.selectedDay = a.currentDay = b.getDate(); + a.drawMonth = a.selectedMonth = a.currentMonth = b.getMonth(); + a.drawYear = a.selectedYear = a.currentYear = b.getFullYear(); + if ((f != a.selectedMonth || h != a.selectedYear) && !c) + this._notifyChange(a); + this._adjustInstDate(a); + if (a.input) a.input.val(e ? "" : this._formatDate(a)); + }, + _getDate: function (a) { + return !a.currentYear || (a.input && a.input.val() == "") + ? null + : this._daylightSavingAdjust( + new Date(a.currentYear, a.currentMonth, a.currentDay), + ); + }, + _generateHTML: function (a) { + var b = new Date(); + b = this._daylightSavingAdjust( + new Date(b.getFullYear(), b.getMonth(), b.getDate()), + ); + var c = this._get(a, "isRTL"), + e = this._get(a, "showButtonPanel"), + f = this._get(a, "hideIfNoPrevNext"), + h = this._get(a, "navigationAsDateFormat"), + i = this._getNumberOfMonths(a), + g = this._get(a, "showCurrentAtPos"), + j = this._get(a, "stepMonths"), + l = i[0] != 1 || i[1] != 1, + u = this._daylightSavingAdjust( + !a.currentDay + ? new Date(9999, 9, 9) + : new Date(a.currentYear, a.currentMonth, a.currentDay), + ), + k = this._getMinMaxDate(a, "min"), + o = this._getMinMaxDate(a, "max"); + g = a.drawMonth - g; + var m = a.drawYear; + if (g < 0) { + g += 12; + m--; + } + if (o) { + var n = this._daylightSavingAdjust( + new Date( + o.getFullYear(), + o.getMonth() - i[0] * i[1] + 1, + o.getDate(), + ), + ); + for ( + n = k && n < k ? k : n; + this._daylightSavingAdjust(new Date(m, g, 1)) > n; + + ) { + g--; + if (g < 0) { + g = 11; + m--; + } + } + } + a.drawMonth = g; + a.drawYear = m; + n = this._get(a, "prevText"); + n = !h + ? n + : this.formatDate( + n, + this._daylightSavingAdjust(new Date(m, g - j, 1)), + this._getFormatConfig(a), + ); + n = this._canAdjustMonth(a, -1, m, g) + ? '' + + n + + "" + : f + ? "" + : '' + + n + + ""; + var r = this._get(a, "nextText"); + r = !h + ? r + : this.formatDate( + r, + this._daylightSavingAdjust(new Date(m, g + j, 1)), + this._getFormatConfig(a), + ); + f = this._canAdjustMonth(a, +1, m, g) + ? '' + + r + + "" + : f + ? "" + : '' + + r + + ""; + j = this._get(a, "currentText"); + r = this._get(a, "gotoCurrent") && a.currentDay ? u : b; + j = !h ? j : this.formatDate(j, r, this._getFormatConfig(a)); + h = !a.inline + ? '" + : ""; + e = e + ? '
          ' + + (c ? h : "") + + (this._isInRange(a, r) + ? '" + : "") + + (c ? "" : h) + + "
          " + : ""; + h = parseInt(this._get(a, "firstDay"), 10); + h = isNaN(h) ? 0 : h; + j = this._get(a, "showWeek"); + r = this._get(a, "dayNames"); + this._get(a, "dayNamesShort"); + var s = this._get(a, "dayNamesMin"), + z = this._get(a, "monthNames"), + w = this._get(a, "monthNamesShort"), + p = this._get(a, "beforeShowDay"), + v = this._get(a, "showOtherMonths"), + H = this._get(a, "selectOtherMonths"); + this._get(a, "calculateWeek"); + for (var L = this._getDefaultDate(a), I = "", D = 0; D < i[0]; D++) { + for (var M = "", E = 0; E < i[1]; E++) { + var N = this._daylightSavingAdjust(new Date(m, g, a.selectedDay)), + t = " ui-corner-all", + x = ""; + if (l) { + x += '
          ' + + (/all|left/.test(t) && D == 0 ? (c ? f : n) : "") + + (/all|right/.test(t) && D == 0 ? (c ? n : f) : "") + + this._generateMonthYearHeader(a, g, m, k, o, D > 0 || E > 0, z, w) + + '
          '; + var B = j + ? '" + : ""; + for (t = 0; t < 7; t++) { + var q = (t + h) % 7; + B += + "= 5 ? ' class="ui-datepicker-week-end"' : "") + + '>' + + s[q] + + ""; + } + x += B + ""; + B = this._getDaysInMonth(m, g); + if (m == a.selectedYear && g == a.selectedMonth) + a.selectedDay = Math.min(a.selectedDay, B); + t = (this._getFirstDayOfMonth(m, g) - h + 7) % 7; + B = l ? 6 : Math.ceil((t + B) / 7); + q = this._daylightSavingAdjust(new Date(m, g, 1 - t)); + for (var O = 0; O < B; O++) { + x += ""; + var P = !j + ? "" + : '"; + for (t = 0; t < 7; t++) { + var G = p + ? p.apply(a.input ? a.input[0] : null, [q]) + : [true, ""], + C = q.getMonth() != g, + J = (C && !H) || !G[0] || (k && q < k) || (o && q > o); + P += + '"; + q.setDate(q.getDate() + 1); + q = this._daylightSavingAdjust(q); + } + x += P + ""; + } + g++; + if (g > 11) { + g = 0; + m++; + } + x += + "
          ' + + this._get(a, "weekHeader") + + "
          ' + + this._get(a, "calculateWeek")(q) + + "" + + (C && !v + ? " " + : J + ? '' + + q.getDate() + + "" + : '' + + q.getDate() + + "") + + "
          " + + (l + ? "" + + (i[0] > 0 && E == i[1] - 1 + ? '
          ' + : "") + : ""); + M += x; + } + I += M; + } + I += + e + + (d.browser.msie && parseInt(d.browser.version, 10) < 7 && !a.inline + ? '' + : ""); + a._keyEvent = false; + return I; + }, + _generateMonthYearHeader: function (a, b, c, e, f, h, i, g) { + var j = this._get(a, "changeMonth"), + l = this._get(a, "changeYear"), + u = this._get(a, "showMonthAfterYear"), + k = '
          ', + o = ""; + if (h || !j) o += '' + i[b] + ""; + else { + i = e && e.getFullYear() == c; + var m = f && f.getFullYear() == c; + o += + '"; + } + u || (k += o + (h || !(j && l) ? " " : "")); + a.yearshtml = ""; + if (h || !l) k += '' + c + ""; + else { + g = this._get(a, "yearRange").split(":"); + var r = new Date().getFullYear(); + i = function (s) { + s = s.match(/c[+-].*/) + ? c + parseInt(s.substring(1), 10) + : s.match(/[+-].*/) + ? r + parseInt(s, 10) + : parseInt(s, 10); + return isNaN(s) ? r : s; + }; + b = i(g[0]); + g = Math.max(b, i(g[1] || "")); + b = e ? Math.max(b, e.getFullYear()) : b; + g = f ? Math.min(g, f.getFullYear()) : g; + for ( + a.yearshtml += + '"; + if (d.browser.mozilla) + k += + '"; + else { + k += a.yearshtml; + a.yearshtml = null; + } + } + k += this._get(a, "yearSuffix"); + if (u) k += (h || !(j && l) ? " " : "") + o; + k += "
          "; + return k; + }, + _adjustInstDate: function (a, b, c) { + var e = a.drawYear + (c == "Y" ? b : 0), + f = a.drawMonth + (c == "M" ? b : 0); + b = + Math.min(a.selectedDay, this._getDaysInMonth(e, f)) + + (c == "D" ? b : 0); + e = this._restrictMinMax( + a, + this._daylightSavingAdjust(new Date(e, f, b)), + ); + a.selectedDay = e.getDate(); + a.drawMonth = a.selectedMonth = e.getMonth(); + a.drawYear = a.selectedYear = e.getFullYear(); + if (c == "M" || c == "Y") this._notifyChange(a); + }, + _restrictMinMax: function (a, b) { + var c = this._getMinMaxDate(a, "min"); + a = this._getMinMaxDate(a, "max"); + b = c && b < c ? c : b; + return (b = a && b > a ? a : b); + }, + _notifyChange: function (a) { + var b = this._get(a, "onChangeMonthYear"); + if (b) + b.apply(a.input ? a.input[0] : null, [ + a.selectedYear, + a.selectedMonth + 1, + a, + ]); + }, + _getNumberOfMonths: function (a) { + a = this._get(a, "numberOfMonths"); + return a == null ? [1, 1] : typeof a == "number" ? [1, a] : a; + }, + _getMinMaxDate: function (a, b) { + return this._determineDate(a, this._get(a, b + "Date"), null); + }, + _getDaysInMonth: function (a, b) { + return 32 - this._daylightSavingAdjust(new Date(a, b, 32)).getDate(); + }, + _getFirstDayOfMonth: function (a, b) { + return new Date(a, b, 1).getDay(); + }, + _canAdjustMonth: function (a, b, c, e) { + var f = this._getNumberOfMonths(a); + c = this._daylightSavingAdjust( + new Date(c, e + (b < 0 ? b : f[0] * f[1]), 1), + ); + b < 0 && c.setDate(this._getDaysInMonth(c.getFullYear(), c.getMonth())); + return this._isInRange(a, c); + }, + _isInRange: function (a, b) { + var c = this._getMinMaxDate(a, "min"); + a = this._getMinMaxDate(a, "max"); + return ( + (!c || b.getTime() >= c.getTime()) && (!a || b.getTime() <= a.getTime()) + ); + }, + _getFormatConfig: function (a) { + var b = this._get(a, "shortYearCutoff"); + b = + typeof b != "string" + ? b + : (new Date().getFullYear() % 100) + parseInt(b, 10); + return { + shortYearCutoff: b, + dayNamesShort: this._get(a, "dayNamesShort"), + dayNames: this._get(a, "dayNames"), + monthNamesShort: this._get(a, "monthNamesShort"), + monthNames: this._get(a, "monthNames"), + }; + }, + _formatDate: function (a, b, c, e) { + if (!b) { + a.currentDay = a.selectedDay; + a.currentMonth = a.selectedMonth; + a.currentYear = a.selectedYear; + } + b = b + ? typeof b == "object" + ? b + : this._daylightSavingAdjust(new Date(e, c, b)) + : this._daylightSavingAdjust( + new Date(a.currentYear, a.currentMonth, a.currentDay), + ); + return this.formatDate( + this._get(a, "dateFormat"), + b, + this._getFormatConfig(a), + ); + }, + }); + d.fn.datepicker = function (a) { + if (!this.length) return this; + if (!d.datepicker.initialized) { + d(document) + .mousedown(d.datepicker._checkExternalClick) + .find("body") + .append(d.datepicker.dpDiv); + d.datepicker.initialized = true; + } + var b = Array.prototype.slice.call(arguments, 1); + if ( + typeof a == "string" && + (a == "isDisabled" || a == "getDate" || a == "widget") + ) + return d.datepicker["_" + a + "Datepicker"].apply( + d.datepicker, + [this[0]].concat(b), + ); + if ( + a == "option" && + arguments.length == 2 && + typeof arguments[1] == "string" + ) + return d.datepicker["_" + a + "Datepicker"].apply( + d.datepicker, + [this[0]].concat(b), + ); + return this.each(function () { + typeof a == "string" + ? d.datepicker["_" + a + "Datepicker"].apply( + d.datepicker, + [this].concat(b), + ) + : d.datepicker._attachDatepicker(this, a); + }); + }; + d.datepicker = new K(); + d.datepicker.initialized = false; + d.datepicker.uuid = new Date().getTime(); + d.datepicker.version = "1.8.11"; + window["DP_jQuery_" + y] = d; +})(jQuery); /* * jQuery UI Progressbar 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -558,10 +8499,71 @@ function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document * jquery.ui.core.js * jquery.ui.widget.js */ -(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
          ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); -this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* -this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.11"})})(jQuery); -;/* +(function (b, d) { + b.widget("ui.progressbar", { + options: { value: 0, max: 100 }, + min: 0, + _create: function () { + this.element + .addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all") + .attr({ + role: "progressbar", + "aria-valuemin": this.min, + "aria-valuemax": this.options.max, + "aria-valuenow": this._value(), + }); + this.valueDiv = b( + "
          ", + ).appendTo(this.element); + this.oldValue = this._value(); + this._refreshValue(); + }, + destroy: function () { + this.element + .removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all") + .removeAttr("role") + .removeAttr("aria-valuemin") + .removeAttr("aria-valuemax") + .removeAttr("aria-valuenow"); + this.valueDiv.remove(); + b.Widget.prototype.destroy.apply(this, arguments); + }, + value: function (a) { + if (a === d) return this._value(); + this._setOption("value", a); + return this; + }, + _setOption: function (a, c) { + if (a === "value") { + this.options.value = c; + this._refreshValue(); + this._value() === this.options.max && this._trigger("complete"); + } + b.Widget.prototype._setOption.apply(this, arguments); + }, + _value: function () { + var a = this.options.value; + if (typeof a !== "number") a = 0; + return Math.min(this.options.max, Math.max(this.min, a)); + }, + _percentage: function () { + return (100 * this._value()) / this.options.max; + }, + _refreshValue: function () { + var a = this.value(), + c = this._percentage(); + if (this.oldValue !== a) { + this.oldValue = a; + this._trigger("change"); + } + this.valueDiv + .toggleClass("ui-corner-right", a === this.options.max) + .width(c.toFixed(0) + "%"); + this.element.attr("aria-valuenow", a); + }, + }); + b.extend(b.ui.progressbar, { version: "1.8.11" }); +})(jQuery); /* * jQuery UI Effects 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -570,28 +8572,624 @@ this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=th * * http://docs.jquery.com/UI/Effects/ */ -jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], -16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, -a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= -a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", -"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, -0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, -211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, -d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0]; -h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c, -a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.11",save:function(c,a){for(var b=0;b").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent", -border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c); -return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments); -else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c), -b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c, -a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c, -a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a== -e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h").addClass("ui-effects-wrapper").css({ + fontSize: "100%", + background: "transparent", + border: "none", + margin: 0, + padding: 0, + }); + c.wrap(b); + b = c.parent(); + if (c.css("position") == "static") { + b.css({ position: "relative" }); + c.css({ position: "relative" }); + } else { + f.extend(a, { + position: c.css("position"), + zIndex: c.css("z-index"), + }); + f.each(["top", "left", "bottom", "right"], function (d, e) { + a[e] = c.css(e); + if (isNaN(parseInt(a[e], 10))) a[e] = "auto"; + }); + c.css({ + position: "relative", + top: 0, + left: 0, + right: "auto", + bottom: "auto", + }); + } + return b.css(a).show(); + }, + removeWrapper: function (c) { + if (c.parent().is(".ui-effects-wrapper")) + return c.parent().replaceWith(c); + return c; + }, + setTransition: function (c, a, b, d) { + d = d || {}; + f.each(a, function (e, g) { + unit = c.cssUnit(g); + if (unit[0] > 0) d[g] = unit[0] * b + unit[1]; + }); + return d; + }, + }); + f.fn.extend({ + effect: function (c) { + var a = k.apply(this, arguments), + b = { options: a[1], duration: a[2], callback: a[3] }; + a = b.options.mode; + var d = f.effects[c]; + if (f.fx.off || !d) + return a + ? this[a](b.duration, b.callback) + : this.each(function () { + b.callback && b.callback.call(this); + }); + return d.call(this, b); + }, + _show: f.fn.show, + show: function (c) { + if (m(c)) return this._show.apply(this, arguments); + else { + var a = k.apply(this, arguments); + a[1].mode = "show"; + return this.effect.apply(this, a); + } + }, + _hide: f.fn.hide, + hide: function (c) { + if (m(c)) return this._hide.apply(this, arguments); + else { + var a = k.apply(this, arguments); + a[1].mode = "hide"; + return this.effect.apply(this, a); + } + }, + __toggle: f.fn.toggle, + toggle: function (c) { + if (m(c) || typeof c === "boolean" || f.isFunction(c)) + return this.__toggle.apply(this, arguments); + else { + var a = k.apply(this, arguments); + a[1].mode = "toggle"; + return this.effect.apply(this, a); + } + }, + cssUnit: function (c) { + var a = this.css(c), + b = []; + f.each(["em", "px", "%", "pt"], function (d, e) { + if (a.indexOf(e) > 0) b = [parseFloat(a), e]; + }); + return b; + }, + }); + f.easing.jswing = f.easing.swing; + f.extend(f.easing, { + def: "easeOutQuad", + swing: function (c, a, b, d, e) { + return f.easing[f.easing.def](c, a, b, d, e); + }, + easeInQuad: function (c, a, b, d, e) { + return d * (a /= e) * a + b; + }, + easeOutQuad: function (c, a, b, d, e) { + return -d * (a /= e) * (a - 2) + b; + }, + easeInOutQuad: function (c, a, b, d, e) { + if ((a /= e / 2) < 1) return (d / 2) * a * a + b; + return (-d / 2) * (--a * (a - 2) - 1) + b; + }, + easeInCubic: function (c, a, b, d, e) { + return d * (a /= e) * a * a + b; + }, + easeOutCubic: function (c, a, b, d, e) { + return d * ((a = a / e - 1) * a * a + 1) + b; + }, + easeInOutCubic: function (c, a, b, d, e) { + if ((a /= e / 2) < 1) return (d / 2) * a * a * a + b; + return (d / 2) * ((a -= 2) * a * a + 2) + b; + }, + easeInQuart: function (c, a, b, d, e) { + return d * (a /= e) * a * a * a + b; + }, + easeOutQuart: function (c, a, b, d, e) { + return -d * ((a = a / e - 1) * a * a * a - 1) + b; + }, + easeInOutQuart: function (c, a, b, d, e) { + if ((a /= e / 2) < 1) return (d / 2) * a * a * a * a + b; + return (-d / 2) * ((a -= 2) * a * a * a - 2) + b; + }, + easeInQuint: function (c, a, b, d, e) { + return d * (a /= e) * a * a * a * a + b; + }, + easeOutQuint: function (c, a, b, d, e) { + return d * ((a = a / e - 1) * a * a * a * a + 1) + b; + }, + easeInOutQuint: function (c, a, b, d, e) { + if ((a /= e / 2) < 1) return (d / 2) * a * a * a * a * a + b; + return (d / 2) * ((a -= 2) * a * a * a * a + 2) + b; + }, + easeInSine: function (c, a, b, d, e) { + return -d * Math.cos((a / e) * (Math.PI / 2)) + d + b; + }, + easeOutSine: function (c, a, b, d, e) { + return d * Math.sin((a / e) * (Math.PI / 2)) + b; + }, + easeInOutSine: function (c, a, b, d, e) { + return (-d / 2) * (Math.cos((Math.PI * a) / e) - 1) + b; + }, + easeInExpo: function (c, a, b, d, e) { + return a == 0 ? b : d * Math.pow(2, 10 * (a / e - 1)) + b; + }, + easeOutExpo: function (c, a, b, d, e) { + return a == e ? b + d : d * (-Math.pow(2, (-10 * a) / e) + 1) + b; + }, + easeInOutExpo: function (c, a, b, d, e) { + if (a == 0) return b; + if (a == e) return b + d; + if ((a /= e / 2) < 1) return (d / 2) * Math.pow(2, 10 * (a - 1)) + b; + return (d / 2) * (-Math.pow(2, -10 * --a) + 2) + b; + }, + easeInCirc: function (c, a, b, d, e) { + return -d * (Math.sqrt(1 - (a /= e) * a) - 1) + b; + }, + easeOutCirc: function (c, a, b, d, e) { + return d * Math.sqrt(1 - (a = a / e - 1) * a) + b; + }, + easeInOutCirc: function (c, a, b, d, e) { + if ((a /= e / 2) < 1) return (-d / 2) * (Math.sqrt(1 - a * a) - 1) + b; + return (d / 2) * (Math.sqrt(1 - (a -= 2) * a) + 1) + b; + }, + easeInElastic: function (c, a, b, d, e) { + c = 1.70158; + var g = 0, + h = d; + if (a == 0) return b; + if ((a /= e) == 1) return b + d; + g || (g = e * 0.3); + if (h < Math.abs(d)) { + h = d; + c = g / 4; + } else c = (g / (2 * Math.PI)) * Math.asin(d / h); + return ( + -( + h * + Math.pow(2, 10 * (a -= 1)) * + Math.sin(((a * e - c) * 2 * Math.PI) / g) + ) + b + ); + }, + easeOutElastic: function (c, a, b, d, e) { + c = 1.70158; + var g = 0, + h = d; + if (a == 0) return b; + if ((a /= e) == 1) return b + d; + g || (g = e * 0.3); + if (h < Math.abs(d)) { + h = d; + c = g / 4; + } else c = (g / (2 * Math.PI)) * Math.asin(d / h); + return ( + h * Math.pow(2, -10 * a) * Math.sin(((a * e - c) * 2 * Math.PI) / g) + + d + + b + ); + }, + easeInOutElastic: function (c, a, b, d, e) { + c = 1.70158; + var g = 0, + h = d; + if (a == 0) return b; + if ((a /= e / 2) == 2) return b + d; + g || (g = e * 0.3 * 1.5); + if (h < Math.abs(d)) { + h = d; + c = g / 4; + } else c = (g / (2 * Math.PI)) * Math.asin(d / h); + if (a < 1) + return ( + -0.5 * + h * + Math.pow(2, 10 * (a -= 1)) * + Math.sin(((a * e - c) * 2 * Math.PI) / g) + + b + ); + return ( + h * + Math.pow(2, -10 * (a -= 1)) * + Math.sin(((a * e - c) * 2 * Math.PI) / g) * + 0.5 + + d + + b + ); + }, + easeInBack: function (c, a, b, d, e, g) { + if (g == j) g = 1.70158; + return d * (a /= e) * a * ((g + 1) * a - g) + b; + }, + easeOutBack: function (c, a, b, d, e, g) { + if (g == j) g = 1.70158; + return d * ((a = a / e - 1) * a * ((g + 1) * a + g) + 1) + b; + }, + easeInOutBack: function (c, a, b, d, e, g) { + if (g == j) g = 1.70158; + if ((a /= e / 2) < 1) + return (d / 2) * a * a * (((g *= 1.525) + 1) * a - g) + b; + return (d / 2) * ((a -= 2) * a * (((g *= 1.525) + 1) * a + g) + 2) + b; + }, + easeInBounce: function (c, a, b, d, e) { + return d - f.easing.easeOutBounce(c, e - a, 0, d, e) + b; + }, + easeOutBounce: function (c, a, b, d, e) { + return (a /= e) < 1 / 2.75 + ? d * 7.5625 * a * a + b + : a < 2 / 2.75 + ? d * (7.5625 * (a -= 1.5 / 2.75) * a + 0.75) + b + : a < 2.5 / 2.75 + ? d * (7.5625 * (a -= 2.25 / 2.75) * a + 0.9375) + b + : d * (7.5625 * (a -= 2.625 / 2.75) * a + 0.984375) + b; + }, + easeInOutBounce: function (c, a, b, d, e) { + if (a < e / 2) + return f.easing.easeInBounce(c, a * 2, 0, d, e) * 0.5 + b; + return ( + f.easing.easeOutBounce(c, a * 2 - e, 0, d, e) * 0.5 + d * 0.5 + b + ); + }, + }); + })(jQuery); /* * jQuery UI Effects Blind 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -603,9 +9201,31 @@ a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function( * Depends: * jquery.effects.core.js */ -(function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","bottom","left","right"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a, -g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery); -;/* +(function (b) { + b.effects.blind = function (c) { + return this.queue(function () { + var a = b(this), + g = ["position", "top", "bottom", "left", "right"], + f = b.effects.setMode(a, c.options.mode || "hide"), + d = c.options.direction || "vertical"; + b.effects.save(a, g); + a.show(); + var e = b.effects.createWrapper(a).css({ overflow: "hidden" }), + h = d == "vertical" ? "height" : "width"; + d = d == "vertical" ? e.height() : e.width(); + f == "show" && e.css(h, 0); + var i = {}; + i[h] = f == "show" ? d : 0; + e.animate(i, c.duration, c.options.easing, function () { + f == "hide" && a.hide(); + b.effects.restore(a, g); + b.effects.removeWrapper(a); + c.callback && c.callback.apply(a[0], arguments); + a.dequeue(); + }); + }); + }; +})(jQuery); /* * jQuery UI Effects Bounce 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -617,10 +9237,81 @@ g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.deq * Depends: * jquery.effects.core.js */ -(function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","bottom","left","right"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/ -3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ -e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); -;/* +(function (j) { + j.effects.explode = function (a) { + return this.queue(function () { + var c = a.options.pieces ? Math.round(Math.sqrt(a.options.pieces)) : 3, + d = a.options.pieces ? Math.round(Math.sqrt(a.options.pieces)) : 3; + a.options.mode = + a.options.mode == "toggle" + ? j(this).is(":visible") + ? "hide" + : "show" + : a.options.mode; + var b = j(this).show().css("visibility", "hidden"), + g = b.offset(); + g.top -= parseInt(b.css("marginTop"), 10) || 0; + g.left -= parseInt(b.css("marginLeft"), 10) || 0; + for ( + var h = b.outerWidth(true), i = b.outerHeight(true), e = 0; + e < c; + e++ + ) + for (var f = 0; f < d; f++) + b.clone() + .appendTo("body") + .wrap("
          ") + .css({ + position: "absolute", + visibility: "visible", + left: -f * (h / d), + top: -e * (i / c), + }) + .parent() + .addClass("ui-effects-explode") + .css({ + position: "absolute", + overflow: "hidden", + width: h / d, + height: i / c, + left: + g.left + + f * (h / d) + + (a.options.mode == "show" + ? (f - Math.floor(d / 2)) * (h / d) + : 0), + top: + g.top + + e * (i / c) + + (a.options.mode == "show" + ? (e - Math.floor(c / 2)) * (i / c) + : 0), + opacity: a.options.mode == "show" ? 0 : 1, + }) + .animate( + { + left: + g.left + + f * (h / d) + + (a.options.mode == "show" + ? 0 + : (f - Math.floor(d / 2)) * (h / d)), + top: + g.top + + e * (i / c) + + (a.options.mode == "show" + ? 0 + : (e - Math.floor(c / 2)) * (i / c)), + opacity: a.options.mode == "show" ? 1 : 0, + }, + a.duration || 500, + ); + setTimeout(function () { + a.options.mode == "show" + ? b.css({ visibility: "visible" }) + : b.css({ visibility: "visible" }).hide(); + a.callback && a.callback.apply(b[0]); + b.dequeue(); + j("div.ui-effects-explode").remove(); + }, a.duration || 500); + }); + }; +})(jQuery); /* * jQuery UI Effects Fade 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -675,8 +9511,26 @@ e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.m * Depends: * jquery.effects.core.js */ -(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); -;/* +(function (b) { + b.effects.fade = function (a) { + return this.queue(function () { + var c = b(this), + d = b.effects.setMode(c, a.options.mode || "hide"); + c.animate( + { opacity: d }, + { + queue: false, + duration: a.duration, + easing: a.options.easing, + complete: function () { + a.callback && a.callback.apply(this, arguments); + c.dequeue(); + }, + }, + ); + }); + }; +})(jQuery); /* * jQuery UI Effects Fold 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -688,9 +9542,44 @@ e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.m * Depends: * jquery.effects.core.js */ -(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], -10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); -;/* +(function (c) { + c.effects.fold = function (a) { + return this.queue(function () { + var b = c(this), + j = ["position", "top", "bottom", "left", "right"], + d = c.effects.setMode(b, a.options.mode || "hide"), + g = a.options.size || 15, + h = !!a.options.horizFirst, + k = a.duration ? a.duration / 2 : c.fx.speeds._default / 2; + c.effects.save(b, j); + b.show(); + var e = c.effects.createWrapper(b).css({ overflow: "hidden" }), + f = (d == "show") != h, + l = f ? ["width", "height"] : ["height", "width"]; + f = f ? [e.width(), e.height()] : [e.height(), e.width()]; + var i = /([0-9]+)%/.exec(g); + if (i) g = (parseInt(i[1], 10) / 100) * f[d == "hide" ? 0 : 1]; + if (d == "show") + e.css(h ? { height: 0, width: g } : { height: g, width: 0 }); + h = {}; + i = {}; + h[l[0]] = d == "show" ? f[0] : g; + i[l[1]] = d == "show" ? f[1] : 0; + e.animate(h, k, a.options.easing).animate( + i, + k, + a.options.easing, + function () { + d == "hide" && b.hide(); + c.effects.restore(b, j); + c.effects.removeWrapper(b); + a.callback && a.callback.apply(b[0], arguments); + b.dequeue(); + }, + ); + }); + }; +})(jQuery); /* * jQuery UI Effects Highlight 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -702,9 +9591,37 @@ e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.m * Depends: * jquery.effects.core.js */ -(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& -this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); -;/* +(function (b) { + b.effects.highlight = function (c) { + return this.queue(function () { + var a = b(this), + e = ["backgroundImage", "backgroundColor", "opacity"], + d = b.effects.setMode(a, c.options.mode || "show"), + f = { backgroundColor: a.css("backgroundColor") }; + if (d == "hide") f.opacity = 0; + b.effects.save(a, e); + a.show() + .css({ + backgroundImage: "none", + backgroundColor: c.options.color || "#ffff99", + }) + .animate(f, { + queue: false, + duration: c.duration, + easing: c.options.easing, + complete: function () { + d == "hide" && a.hide(); + b.effects.restore(a, e); + d == "show" && + !b.support.opacity && + this.style.removeAttribute("filter"); + c.callback && c.callback.apply(this, arguments); + a.dequeue(); + }, + }); + }); + }; +})(jQuery); /* * jQuery UI Effects Pulsate 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) @@ -716,9 +9633,39 @@ this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments * Depends: * jquery.effects.core.js */ -(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); -b.dequeue()})})}})(jQuery); -; \ No newline at end of file +(function (e) { + e.effects.transfer = function (a) { + return this.queue(function () { + var b = e(this), + c = e(a.options.to), + d = c.offset(); + c = { + top: d.top, + left: d.left, + height: c.innerHeight(), + width: c.innerWidth(), + }; + d = b.offset(); + var f = e('
          ') + .appendTo(document.body) + .addClass(a.options.className) + .css({ + top: d.top, + left: d.left, + height: b.innerHeight(), + width: b.innerWidth(), + position: "absolute", + }) + .animate(c, a.duration, a.options.easing, function () { + f.remove(); + a.callback && a.callback.apply(b[0], arguments); + b.dequeue(); + }); + }); + }; +})(jQuery); diff --git a/r2redit/src/lib/jquery.curie.js b/r2redit/src/lib/jquery.curie.js index 91b49b8..9357abe 100644 --- a/r2redit/src/lib/jquery.curie.js +++ b/r2redit/src/lib/jquery.curie.js @@ -19,55 +19,71 @@ * @requires jquery.xmlns.js */ (function ($) { - - /** - * Creates a {@link jQuery.uri} object by parsing a CURIE. - * @methodOf jQuery - * @param {String} curie The CURIE to be parsed - * @param {String} uri The URI string to be converted to a CURIE. - * @param {Object} [options] CURIE parsing options - * @param {string} [options.reservedNamespace='http://www.w3.org/1999/xhtml/vocab#'] The namespace to apply to a CURIE that has no prefix and either starts with a colon or is in the list of reserved local names - * @param {string} [options.defaultNamespace] The namespace to apply to a CURIE with no prefix which is not mapped to the reserved namespace by the rules given above. - * @param {Object} [options.namespaces] A map of namespace bindings used to map CURIE prefixes to URIs. - * @param {string[]} [options.reserved=['alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright', 'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next', 'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']] A list of local names that will always be mapped to the URI specified by reservedNamespace. - * @param {string} [options.charcase='lower'] Specifies whether the curie's case is altered before it's interpreted. Acceptable values are: - *
          - *
          lower
          Force the CURIE string to lower case.
          - *
          upper
          Force the CURIE string to upper case.
          - *
          preserve
          Preserve the original case of the CURIE. Note that this might not be possible if the CURIE has been taken from an HTML attribute value because of the case conversions performed automatically by browsers. For this reason, it's a good idea to avoid mixed-case CURIEs within RDFa.
          - *
          - * @returns {jQuery.uri} A new {@link jQuery.uri} object representing the full absolute URI specified by the CURIE. - */ + /** + * Creates a {@link jQuery.uri} object by parsing a CURIE. + * @methodOf jQuery + * @param {String} curie The CURIE to be parsed + * @param {String} uri The URI string to be converted to a CURIE. + * @param {Object} [options] CURIE parsing options + * @param {string} [options.reservedNamespace='http://www.w3.org/1999/xhtml/vocab#'] The namespace to apply to a CURIE that has no prefix and either starts with a colon or is in the list of reserved local names + * @param {string} [options.defaultNamespace] The namespace to apply to a CURIE with no prefix which is not mapped to the reserved namespace by the rules given above. + * @param {Object} [options.namespaces] A map of namespace bindings used to map CURIE prefixes to URIs. + * @param {string[]} [options.reserved=['alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright', 'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next', 'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']] A list of local names that will always be mapped to the URI specified by reservedNamespace. + * @param {string} [options.charcase='lower'] Specifies whether the curie's case is altered before it's interpreted. Acceptable values are: + *
          + *
          lower
          Force the CURIE string to lower case.
          + *
          upper
          Force the CURIE string to upper case.
          + *
          preserve
          Preserve the original case of the CURIE. Note that this might not be possible if the CURIE has been taken from an HTML attribute value because of the case conversions performed automatically by browsers. For this reason, it's a good idea to avoid mixed-case CURIEs within RDFa.
          + *
          + * @returns {jQuery.uri} A new {@link jQuery.uri} object representing the full absolute URI specified by the CURIE. + */ $.curie = function (curie, options) { - var - opts = $.extend({}, $.curie.defaults, options || {}), + var opts = $.extend({}, $.curie.defaults, options || {}), m = /^(([^:]*):)?(.+)$/.exec(curie), prefix = m[2], local = m[3], ns = opts.namespaces[prefix]; - if (/^:.+/.test(curie)) { // This is the case of a CURIE like ":test" - if (opts.reservedNamespace === undefined || opts.reservedNamespace === null) { - throw "Malformed CURIE: No prefix and no default namespace for unprefixed CURIE " + curie; + if (/^:.+/.test(curie)) { + // This is the case of a CURIE like ":test" + if ( + opts.reservedNamespace === undefined || + opts.reservedNamespace === null + ) { + throw ( + "Malformed CURIE: No prefix and no default namespace for unprefixed CURIE " + + curie + ); } else { ns = opts.reservedNamespace; } } else if (prefix) { if (ns === undefined) { - throw "Malformed CURIE: No namespace binding for " + prefix + " in CURIE " + curie; + throw ( + "Malformed CURIE: No namespace binding for " + + prefix + + " in CURIE " + + curie + ); } } else { - if (opts.charcase === 'lower') { + if (opts.charcase === "lower") { curie = curie.toLowerCase(); - } else if (opts.charcase === 'upper') { + } else if (opts.charcase === "upper") { curie = curie.toUpperCase(); } if (opts.reserved.length && $.inArray(curie, opts.reserved) >= 0) { ns = opts.reservedNamespace; local = curie; - } else if (opts.defaultNamespace === undefined || opts.defaultNamespace === null) { + } else if ( + opts.defaultNamespace === undefined || + opts.defaultNamespace === null + ) { // the default namespace is provided by the application; it's not clear whether // the default XML namespace should be used if there's a colon but no prefix - throw "Malformed CURIE: No prefix and no default namespace for unprefixed CURIE " + curie; + throw ( + "Malformed CURIE: No prefix and no default namespace for unprefixed CURIE " + + curie + ); } else { ns = opts.defaultNamespace; } @@ -80,10 +96,10 @@ reserved: [], reservedNamespace: undefined, defaultNamespace: undefined, - charcase: 'preserve' + charcase: "preserve", }; - /** + /** * Creates a {@link jQuery.uri} object by parsing a safe CURIE string (a CURIE * contained within square brackets). If the input safeCurie string does not * start with '[' and end with ']', the entire string content will be interpreted @@ -111,7 +127,7 @@ return m ? $.curie(m[1], options) : $.uri(safeCurie); }; - /** + /** * Creates a CURIE string from a URI string. * @methodOf jQuery * @param {String} uri The URI string to be converted to a CURIE. @@ -142,97 +158,141 @@ ns = opts.namespaces, curie; uri = $.uri(uri).toString(); - if (opts.reservedNamespace !== undefined && - uri.substring(0, opts.reservedNamespace.toString().length) === opts.reservedNamespace.toString()) { + if ( + opts.reservedNamespace !== undefined && + uri.substring(0, opts.reservedNamespace.toString().length) === + opts.reservedNamespace.toString() + ) { curie = uri.substring(opts.reservedNamespace.toString().length); if ($.inArray(curie, opts.reserved) === -1) { - curie = ':' + curie; + curie = ":" + curie; } } else { $.each(ns, function (prefix, namespace) { - if (uri.substring(0, namespace.toString().length) === namespace.toString()) { - curie = prefix + ':' + uri.substring(namespace.toString().length); + if ( + uri.substring(0, namespace.toString().length) === namespace.toString() + ) { + curie = prefix + ":" + uri.substring(namespace.toString().length); return null; } }); } if (curie === undefined) { - throw "No Namespace Binding: There's no appropriate namespace binding for generating a CURIE from " + uri; + throw ( + "No Namespace Binding: There's no appropriate namespace binding for generating a CURIE from " + + uri + ); } else { return curie; } }; - /** - * Creates a {@link jQuery.uri} object by parsing the specified - * CURIE string in the context of the namespaces defined by the - * jQuery selection. - * @methodOf jQuery# - * @name jQuery#curie - * @param {String} curie The CURIE string to be parsed - * @param {Object} options The CURIE parsing options. - * See {@link jQuery.curie} for details of the supported options. - * The namespace declarations declared on the current jQuery - * selection (and inherited from any ancestor elements) will automatically - * be included in the options.namespaces property. - * @returns {jQuery.uri} - * @see jQuery.curie - */ + /** + * Creates a {@link jQuery.uri} object by parsing the specified + * CURIE string in the context of the namespaces defined by the + * jQuery selection. + * @methodOf jQuery# + * @name jQuery#curie + * @param {String} curie The CURIE string to be parsed + * @param {Object} options The CURIE parsing options. + * See {@link jQuery.curie} for details of the supported options. + * The namespace declarations declared on the current jQuery + * selection (and inherited from any ancestor elements) will automatically + * be included in the options.namespaces property. + * @returns {jQuery.uri} + * @see jQuery.curie + */ $.fn.curie = function (curie, options) { - var opts = $.extend({}, $.fn.curie.defaults, { namespaces: this.xmlns() }, options || {}); + var opts = $.extend( + {}, + $.fn.curie.defaults, + { namespaces: this.xmlns() }, + options || {}, + ); return $.curie(curie, opts); }; - /** - * Creates a {@link jQuery.uri} object by parsing the specified - * safe CURIE string in the context of the namespaces defined by - * the jQuery selection. - * - * @methodOf jQuery# - * @name jQuery#safeCurie - * @param {String} safeCurie The safe CURIE string to be parsed. See {@link jQuery.safeCurie} for details on how safe CURIE strings are processed. - * @param {Object} options The CURIE parsing options. - * See {@link jQuery.safeCurie} for details of the supported options. - * The namespace declarations declared on the current jQuery - * selection (and inherited from any ancestor elements) will automatically - * be included in the options.namespaces property. - * @returns {jQuery.uri} - * @see jQuery.safeCurie - */ + /** + * Creates a {@link jQuery.uri} object by parsing the specified + * safe CURIE string in the context of the namespaces defined by + * the jQuery selection. + * + * @methodOf jQuery# + * @name jQuery#safeCurie + * @param {String} safeCurie The safe CURIE string to be parsed. See {@link jQuery.safeCurie} for details on how safe CURIE strings are processed. + * @param {Object} options The CURIE parsing options. + * See {@link jQuery.safeCurie} for details of the supported options. + * The namespace declarations declared on the current jQuery + * selection (and inherited from any ancestor elements) will automatically + * be included in the options.namespaces property. + * @returns {jQuery.uri} + * @see jQuery.safeCurie + */ $.fn.safeCurie = function (safeCurie, options) { - var opts = $.extend({}, $.fn.curie.defaults, { namespaces: this.xmlns() }, options || {}); + var opts = $.extend( + {}, + $.fn.curie.defaults, + { namespaces: this.xmlns() }, + options || {}, + ); return $.safeCurie(safeCurie, opts); }; - /** - * Creates a CURIE string from a URI string using the namespace - * bindings in the context of the current jQuery selection. - * - * @methodOf jQuery# - * @name jQuery#createCurie - * @param {String|jQuery.uri} uri The URI string to be converted to a CURIE - * @param {Object} options the CURIE parsing options. - * See {@link jQuery.createCurie} for details of the supported options. - * The namespace declarations declared on the current jQuery - * selection (and inherited from any ancestor elements) will automatically - * be included in the options.namespaces property. - * @returns {String} - * @see jQuery.createCurie - */ + /** + * Creates a CURIE string from a URI string using the namespace + * bindings in the context of the current jQuery selection. + * + * @methodOf jQuery# + * @name jQuery#createCurie + * @param {String|jQuery.uri} uri The URI string to be converted to a CURIE + * @param {Object} options the CURIE parsing options. + * See {@link jQuery.createCurie} for details of the supported options. + * The namespace declarations declared on the current jQuery + * selection (and inherited from any ancestor elements) will automatically + * be included in the options.namespaces property. + * @returns {String} + * @see jQuery.createCurie + */ $.fn.createCurie = function (uri, options) { - var opts = $.extend({}, $.fn.curie.defaults, { namespaces: this.xmlns() }, options || {}); + var opts = $.extend( + {}, + $.fn.curie.defaults, + { namespaces: this.xmlns() }, + options || {}, + ); return $.createCurie(uri, opts); }; $.fn.curie.defaults = { reserved: [ - 'alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright', - 'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next', - 'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up' + "alternate", + "appendix", + "bookmark", + "cite", + "chapter", + "contents", + "copyright", + "first", + "glossary", + "help", + "icon", + "index", + "last", + "license", + "meta", + "next", + "p3pv1", + "prev", + "role", + "section", + "stylesheet", + "subsection", + "start", + "top", + "up", ], - reservedNamespace: 'http://www.w3.org/1999/xhtml/vocab#', + reservedNamespace: "http://www.w3.org/1999/xhtml/vocab#", defaultNamespace: undefined, - charcase: 'lower' + charcase: "lower", }; - })(jQuery); diff --git a/r2redit/src/lib/jquery.datatype.js b/r2redit/src/lib/jquery.datatype.js index c871e01..fe052c0 100644 --- a/r2redit/src/lib/jquery.datatype.js +++ b/r2redit/src/lib/jquery.datatype.js @@ -17,9 +17,11 @@ */ (function ($) { - var strip = function (value) { - return value.replace(/[ \t\n\r]+/, ' ').replace(/^ +/, '').replace(/ +$/, ''); + return value + .replace(/[ \t\n\r]+/, " ") + .replace(/^ +/, "") + .replace(/ +$/, ""); }; /** @@ -122,15 +124,18 @@ if ($.typedValue.valid(value, datatype)) { this.representation = value; this.datatype = datatype; - this.value = d === undefined ? strip(value) : d.value(d.strip ? strip(value) : value); + this.value = + d === undefined + ? strip(value) + : d.value(d.strip ? strip(value) : value); return this; } else { throw { - name: 'InvalidValue', - message: value + ' is not a valid ' + datatype + ' value' + name: "InvalidValue", + message: value + " is not a valid " + datatype + " value", }; } - } + }, }; $.typedValue.fn.init.prototype = $.typedValue.fn; @@ -153,105 +158,106 @@ */ $.typedValue.types = {}; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#string'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#string"] = { regex: /^.*$/, strip: false, /** @ignore */ value: function (v) { return v; - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#token'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#token"] = { regex: /^.*$/, strip: true, /** @ignore */ value: function (v) { return strip(v); - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#NCName'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#NCName"] = { regex: /^[a-z_][-\.a-z0-9]+$/i, strip: true, /** @ignore */ value: function (v) { return strip(v); - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#boolean'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#boolean"] = { regex: /^(?:true|false|1|0)$/, strip: true, /** @ignore */ value: function (v) { - return v === 'true' || v === '1'; - } + return v === "true" || v === "1"; + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#decimal'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#decimal"] = { regex: /^[\-\+]?(?:[0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)$/, strip: true, /** @ignore */ value: function (v) { - v = v.replace(/^0+/, '') - .replace(/0+$/, ''); - if (v === '') { - v = '0.0'; + v = v.replace(/^0+/, "").replace(/0+$/, ""); + if (v === "") { + v = "0.0"; } - if (v.substring(0, 1) === '.') { - v = '0' + v; + if (v.substring(0, 1) === ".") { + v = "0" + v; } if (/\.$/.test(v)) { - v = v + '0'; + v = v + "0"; } else if (!/\./.test(v)) { - v = v + '.0'; + v = v + ".0"; } return v; - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#integer'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#integer"] = { regex: /^[\-\+]?[0-9]+$/, strip: true, /** @ignore */ value: function (v) { return parseInt(v, 10); - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#int'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#int"] = { regex: /^[\-\+]?[0-9]+$/, strip: true, /** @ignore */ value: function (v) { return parseInt(v, 10); - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#float'] = { - regex: /^(?:[\-\+]?(?:[0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)(?:[eE][\-\+]?[0-9]+)?|[\-\+]?INF|NaN)$/, + $.typedValue.types["http://www.w3.org/2001/XMLSchema#float"] = { + regex: + /^(?:[\-\+]?(?:[0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)(?:[eE][\-\+]?[0-9]+)?|[\-\+]?INF|NaN)$/, strip: true, /** @ignore */ value: function (v) { - if (v === '-INF') { + if (v === "-INF") { return -1 / 0; - } else if (v === 'INF' || v === '+INF') { + } else if (v === "INF" || v === "+INF") { return 1 / 0; } else { return parseFloat(v); } - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#double'] = { - regex: $.typedValue.types['http://www.w3.org/2001/XMLSchema#float'].regex, + $.typedValue.types["http://www.w3.org/2001/XMLSchema#double"] = { + regex: $.typedValue.types["http://www.w3.org/2001/XMLSchema#float"].regex, strip: true, - value: $.typedValue.types['http://www.w3.org/2001/XMLSchema#float'].value + value: $.typedValue.types["http://www.w3.org/2001/XMLSchema#float"].value, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#duration'] = { - regex: /^([\-\+])?P(?:([0-9]+)Y)?(?:([0-9]+)M)?(?:([0-9]+)D)?(?:T(?:([0-9]+)H)?(?:([0-9]+)M)?(?:([0-9]+(?:\.[0-9]+)?)?S)?)$/, + $.typedValue.types["http://www.w3.org/2001/XMLSchema#duration"] = { + regex: + /^([\-\+])?P(?:([0-9]+)Y)?(?:([0-9]+)M)?(?:([0-9]+)D)?(?:T(?:([0-9]+)H)?(?:([0-9]+)M)?(?:([0-9]+(?:\.[0-9]+)?)?S)?)$/, /** @ignore */ validate: function (v) { var m = this.regex.exec(v); @@ -261,10 +267,10 @@ /** @ignore */ value: function (v) { return v; - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#yearMonthDuration'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#yearMonthDuration"] = { regex: /^([\-\+])?P(?:([0-9]+)Y)?(?:([0-9]+)M)?$/, /** @ignore */ validate: function (v) { @@ -278,21 +284,23 @@ years = m[2] || 0, months = m[3] || 0; months += years * 12; - return m[1] === '-' ? -1 * months : months; - } + return m[1] === "-" ? -1 * months : months; + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#dateTime'] = { - regex: /^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):(([0-9]{2})(\.([0-9]+))?)((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/, + $.typedValue.types["http://www.w3.org/2001/XMLSchema#dateTime"] = { + regex: + /^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):(([0-9]{2})(\.([0-9]+))?)((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/, /** @ignore */ validate: function (v) { - var - m = this.regex.exec(v), + var m = this.regex.exec(v), year = parseInt(m[1], 10), - tz = m[10] === undefined || m[10] === 'Z' ? '+0000' : m[10].replace(/:/, ''), + tz = + m[10] === undefined || m[10] === "Z" + ? "+0000" + : m[10].replace(/:/, ""), date; - if (year === 0 || - parseInt(tz, 10) < -1400 || parseInt(tz, 10) > 1400) { + if (year === 0 || parseInt(tz, 10) < -1400 || parseInt(tz, 10) > 1400) { return false; } try { @@ -301,16 +309,44 @@ day = parseInt(m[3], 10); if (day > 31) { return false; - } else if (day > 30 && !(month === 1 || month === 3 || month === 5 || month === 7 || month === 8 || month === 10 || month === 12)) { + } else if ( + day > 30 && + !( + month === 1 || + month === 3 || + month === 5 || + month === 7 || + month === 8 || + month === 10 || + month === 12 + ) + ) { return false; } else if (month === 2) { if (day > 29) { return false; - } else if (day === 29 && (year % 4 !== 0 || (year % 100 === 0 && year % 400 !== 0))) { + } else if ( + day === 29 && + (year % 4 !== 0 || (year % 100 === 0 && year % 400 !== 0)) + ) { return false; } } - date = '' + year + '/' + m[2] + '/' + m[3] + ' ' + m[4] + ':' + m[5] + ':' + m[7] + ' ' + tz; + date = + "" + + year + + "/" + + m[2] + + "/" + + m[3] + + " " + + m[4] + + ":" + + m[5] + + ":" + + m[7] + + " " + + tz; date = new Date(date); return true; } catch (e) { @@ -321,23 +357,29 @@ /** @ignore */ value: function (v) { return v; - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#date'] = { - regex: /^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/, + $.typedValue.types["http://www.w3.org/2001/XMLSchema#date"] = { + regex: + /^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/, /** @ignore */ validate: function (v) { - var - m = this.regex.exec(v), + var m = this.regex.exec(v), year = parseInt(m[1], 10), month = parseInt(m[2], 10), day = parseInt(m[3], 10), - tz = m[10] === undefined || m[10] === 'Z' ? '+0000' : m[10].replace(/:/, ''); - if (year === 0 || - month > 12 || - day > 31 || - parseInt(tz, 10) < -1400 || parseInt(tz, 10) > 1400) { + tz = + m[10] === undefined || m[10] === "Z" + ? "+0000" + : m[10].replace(/:/, ""); + if ( + year === 0 || + month > 12 || + day > 31 || + parseInt(tz, 10) < -1400 || + parseInt(tz, 10) > 1400 + ) { return false; } else { return true; @@ -347,10 +389,10 @@ /** @ignore */ value: function (v) { return v; - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#gYear'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#gYear"] = { regex: /^-?([0-9]{4,})$/, /** @ignore */ validate: function (v) { @@ -361,25 +403,31 @@ /** @ignore */ value: function (v) { return parseInt(v, 10); - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#gMonthDay'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#gMonthDay"] = { regex: /^--([0-9]{2})-([0-9]{2})((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/, /** @ignore */ validate: function (v) { - var - m = this.regex.exec(v), + var m = this.regex.exec(v), month = parseInt(m[1], 10), day = parseInt(m[2], 10), - tz = m[3] === undefined || m[3] === 'Z' ? '+0000' : m[3].replace(/:/, ''); - if (month > 12 || - day > 31 || - parseInt(tz, 10) < -1400 || parseInt(tz, 10) > 1400) { + tz = + m[3] === undefined || m[3] === "Z" ? "+0000" : m[3].replace(/:/, ""); + if ( + month > 12 || + day > 31 || + parseInt(tz, 10) < -1400 || + parseInt(tz, 10) > 1400 + ) { return false; } else if (month === 2 && day > 29) { return false; - } else if ((month === 4 || month === 6 || month === 9 || month === 11) && day > 30) { + } else if ( + (month === 4 || month === 6 || month === 9 || month === 11) && + day > 30 + ) { return false; } else { return true; @@ -389,22 +437,22 @@ /** @ignore */ value: function (v) { return v; - } + }, }; - $.typedValue.types['http://www.w3.org/2001/XMLSchema#anyURI'] = { + $.typedValue.types["http://www.w3.org/2001/XMLSchema#anyURI"] = { regex: /^.*$/, strip: true, /** @ignore */ value: function (v, options) { var opts = $.extend({}, $.typedValue.defaults, options); return $.uri.resolve(v, opts.base); - } + }, }; $.typedValue.defaults = { base: $.uri.base(), - namespaces: {} + namespaces: {}, }; /** @@ -427,5 +475,4 @@ } } }; - })(jQuery); diff --git a/r2redit/src/lib/jquery.inherit-1.3.2.js b/r2redit/src/lib/jquery.inherit-1.3.2.js index dc7a13e..b362c39 100644 --- a/r2redit/src/lib/jquery.inherit-1.3.2.js +++ b/r2redit/src/lib/jquery.inherit-1.3.2.js @@ -9,92 +9,94 @@ * @version 1.3.2 */ -(function($) { - -var hasIntrospection = (function(){_}).toString().indexOf('_') > -1, - needCheckProps = $.browser.msie, // fucking ie hasn't toString, valueOf in for - specProps = needCheckProps? ['toString', 'valueOf'] : null, - emptyBase = function() {}; - -function override(base, result, add) { - - var hasSpecProps = false; - if(needCheckProps) { - var addList = []; - $.each(specProps, function() { - add.hasOwnProperty(this) && (hasSpecProps = true) && addList.push({ - name : this, - val : add[this] - }); - }); - if(hasSpecProps) { - $.each(add, function(name) { - addList.push({ - name : name, - val : this - }); - }); - add = addList; - } - } - - $.each(add, function(name, prop) { - if(hasSpecProps) { - name = prop.name; - prop = prop.val; - } - if($.isFunction(base[name]) && $.isFunction(prop) && - (!hasIntrospection || prop.toString().indexOf('.__base') > -1)) { - - var baseMethod = base[name]; - result[name] = function() { - var baseSaved = this.__base; - this.__base = baseMethod; - var result = prop.apply(this, arguments); - this.__base = baseSaved; - return result; - }; - - } - else { - result[name] = prop; - } - - }); - -} - -$.inherit = function() { - - var hasBase = $.isFunction(arguments[0]), - base = hasBase? arguments[0] : emptyBase, - props = arguments[hasBase? 1 : 0] || {}, - staticProps = arguments[hasBase? 2 : 1], - result = props.__constructor || (hasBase && base.prototype.__constructor)? - function() { - this.__constructor.apply(this, arguments); - } : function() {}; - - if(!hasBase) { - result.prototype = props; - result.prototype.__self = result.prototype.constructor = result; - return $.extend(result, staticProps); - } - - $.extend(result, base); - - var inheritance = function() {}, - basePtp = base.prototype; - inheritance.prototype = base.prototype; - result.prototype = new inheritance(); - var resultPtp = result.prototype; - resultPtp.__self = resultPtp.constructor = result; - - override(basePtp, resultPtp, props); - staticProps && override(base, result, staticProps); - - return result; - -}; - +(function ($) { + var hasIntrospection = + function () { + _; + } + .toString() + .indexOf("_") > -1, + needCheckProps = $.browser.msie, // fucking ie hasn't toString, valueOf in for + specProps = needCheckProps ? ["toString", "valueOf"] : null, + emptyBase = function () {}; + + function override(base, result, add) { + var hasSpecProps = false; + if (needCheckProps) { + var addList = []; + $.each(specProps, function () { + add.hasOwnProperty(this) && + (hasSpecProps = true) && + addList.push({ + name: this, + val: add[this], + }); + }); + if (hasSpecProps) { + $.each(add, function (name) { + addList.push({ + name: name, + val: this, + }); + }); + add = addList; + } + } + + $.each(add, function (name, prop) { + if (hasSpecProps) { + name = prop.name; + prop = prop.val; + } + if ( + $.isFunction(base[name]) && + $.isFunction(prop) && + (!hasIntrospection || prop.toString().indexOf(".__base") > -1) + ) { + var baseMethod = base[name]; + result[name] = function () { + var baseSaved = this.__base; + this.__base = baseMethod; + var result = prop.apply(this, arguments); + this.__base = baseSaved; + return result; + }; + } else { + result[name] = prop; + } + }); + } + + $.inherit = function () { + var hasBase = $.isFunction(arguments[0]), + base = hasBase ? arguments[0] : emptyBase, + props = arguments[hasBase ? 1 : 0] || {}, + staticProps = arguments[hasBase ? 2 : 1], + result = + props.__constructor || (hasBase && base.prototype.__constructor) + ? function () { + this.__constructor.apply(this, arguments); + } + : function () {}; + + if (!hasBase) { + result.prototype = props; + result.prototype.__self = result.prototype.constructor = result; + return $.extend(result, staticProps); + } + + $.extend(result, base); + + var inheritance = function () {}, + basePtp = base.prototype; + inheritance.prototype = base.prototype; + result.prototype = new inheritance(); + var resultPtp = result.prototype; + resultPtp.__self = resultPtp.constructor = result; + + override(basePtp, resultPtp, props); + staticProps && override(base, result, staticProps); + + return result; + }; })(jQuery); diff --git a/r2redit/src/lib/jquery.js b/r2redit/src/lib/jquery.js index c25ee31..c9ffaa3 100644 --- a/r2redit/src/lib/jquery.js +++ b/r2redit/src/lib/jquery.js @@ -9,4376 +9,4711 @@ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ -(function(){ - -var - // Will speed up references to window, and allows munging its name. - window = this, - // Will speed up references to undefined, and allows munging its name. - undefined, - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - // Map over the $ in case of overwrite - _$ = window.$, - - jQuery = window.jQuery = window.$ = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context ); - }, - - // A simple way to check for HTML strings or ID strings - // (both of which we optimize for) - quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, - // Is it a simple selector - isSimple = /^.[^:#\[\.,]*$/; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - // Make sure that a selection was provided - selector = selector || document; - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this[0] = selector; - this.length = 1; - this.context = selector; - return this; - } - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - var match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) - selector = jQuery.clean( [ match[1] ], context ); - - // HANDLE: $("#id") - else { - var elem = document.getElementById( match[3] ); - - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem && elem.id != match[3] ) - return jQuery().find( selector ); - - // Otherwise, we inject the element directly into the jQuery object - var ret = jQuery( elem || [] ); - ret.context = document; - ret.selector = selector; - return ret; - } - - // HANDLE: $(expr, [context]) - // (which is just equivalent to: $(content).find(expr) - } else - return jQuery( context ).find( selector ); - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) - return jQuery( document ).ready( selector ); - - // Make sure that old selector state is passed along - if ( selector.selector && selector.context ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return this.setArray(jQuery.isArray( selector ) ? - selector : - jQuery.makeArray(selector)); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.3.2", - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num === undefined ? - - // Return a 'clean' array - Array.prototype.slice.call( this ) : - - // Return just the object - this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = jQuery( elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) - ret.selector = this.selector + (this.selector ? " " : "") + selector; - else if ( name ) - ret.selector = this.selector + "." + name + "(" + selector + ")"; - - // Return the newly-formed element set - return ret; - }, - - // Force the current matched set of elements to become - // the specified array of elements (destroying the stack in the process) - // You should use pushStack() in order to do this, but maintain the stack - setArray: function( elems ) { - // Resetting the length to 0, then using the native Array push - // is a super-fast way to populate an object with array-like properties - this.length = 0; - Array.prototype.push.apply( this, elems ); - - return this; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem && elem.jquery ? elem[0] : elem - , this ); - }, - - attr: function( name, value, type ) { - var options = name; - - // Look for the case where we're accessing a style value - if ( typeof name === "string" ) - if ( value === undefined ) - return this[0] && jQuery[ type || "attr" ]( this[0], name ); - - else { - options = {}; - options[ name ] = value; - } - - // Check to see if we're setting style values - return this.each(function(i){ - // Set all the styles - for ( name in options ) - jQuery.attr( - type ? - this.style : - this, - name, jQuery.prop( this, options[ name ], type, i, name ) - ); - }); - }, - - css: function( key, value ) { - // ignore negative width and height values - if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) - value = undefined; - return this.attr( key, value, "curCSS" ); - }, - - text: function( text ) { - if ( typeof text !== "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - - var ret = ""; - - jQuery.each( text || this, function(){ - jQuery.each( this.childNodes, function(){ - if ( this.nodeType != 8 ) - ret += this.nodeType != 1 ? - this.nodeValue : - jQuery.fn.text( [ this ] ); - }); - }); - - return ret; - }, - - wrapAll: function( html ) { - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).clone(); - - if ( this[0].parentNode ) - wrap.insertBefore( this[0] ); - - wrap.map(function(){ - var elem = this; - - while ( elem.firstChild ) - elem = elem.firstChild; - - return elem; - }).append(this); - } - - return this; - }, - - wrapInner: function( html ) { - return this.each(function(){ - jQuery( this ).contents().wrapAll( html ); - }); - }, - - wrap: function( html ) { - return this.each(function(){ - jQuery( this ).wrapAll( html ); - }); - }, - - append: function() { - return this.domManip(arguments, true, function(elem){ - if (this.nodeType == 1) - this.appendChild( elem ); - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function(elem){ - if (this.nodeType == 1) - this.insertBefore( elem, this.firstChild ); - }); - }, - - before: function() { - return this.domManip(arguments, false, function(elem){ - this.parentNode.insertBefore( elem, this ); - }); - }, - - after: function() { - return this.domManip(arguments, false, function(elem){ - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - }, - - end: function() { - return this.prevObject || jQuery( [] ); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: [].push, - sort: [].sort, - splice: [].splice, - - find: function( selector ) { - if ( this.length === 1 ) { - var ret = this.pushStack( [], "find", selector ); - ret.length = 0; - jQuery.find( selector, this[0], ret ); - return ret; - } else { - return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ - return jQuery.find( selector, elem ); - })), "find", selector ); - } - }, - - clone: function( events ) { - // Do the clone - var ret = this.map(function(){ - if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { - // IE copies events bound via attachEvent when - // using cloneNode. Calling detachEvent on the - // clone will also remove the events from the orignal - // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored - // as properties will not be copied (such as the - // the name attribute on an input). - var html = this.outerHTML; - if ( !html ) { - var div = this.ownerDocument.createElement("div"); - div.appendChild( this.cloneNode(true) ); - html = div.innerHTML; - } - - return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; - } else - return this.cloneNode(true); - }); - - // Copy the events from the original to the clone - if ( events === true ) { - var orig = this.find("*").andSelf(), i = 0; - - ret.find("*").andSelf().each(function(){ - if ( this.nodeName !== orig[i].nodeName ) - return; - - var events = jQuery.data( orig[i], "events" ); - - for ( var type in events ) { - for ( var handler in events[ type ] ) { - jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); - } - } - - i++; - }); - } - - // Return the cloned set - return ret; - }, - - filter: function( selector ) { - return this.pushStack( - jQuery.isFunction( selector ) && - jQuery.grep(this, function(elem, i){ - return selector.call( elem, i ); - }) || - - jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ - return elem.nodeType === 1; - }) ), "filter", selector ); - }, - - closest: function( selector ) { - var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, - closer = 0; - - return this.map(function(){ - var cur = this; - while ( cur && cur.ownerDocument ) { - if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { - jQuery.data(cur, "closest", closer); - return cur; - } - cur = cur.parentNode; - closer++; - } - }); - }, - - not: function( selector ) { - if ( typeof selector === "string" ) - // test special case where just one selector is passed in - if ( isSimple.test( selector ) ) - return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); - else - selector = jQuery.multiFilter( selector, this ); - - var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; - return this.filter(function() { - return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; - }); - }, - - add: function( selector ) { - return this.pushStack( jQuery.unique( jQuery.merge( - this.get(), - typeof selector === "string" ? - jQuery( selector ) : - jQuery.makeArray( selector ) - ))); - }, - - is: function( selector ) { - return !!selector && jQuery.multiFilter( selector, this ).length > 0; - }, - - hasClass: function( selector ) { - return !!selector && this.is( "." + selector ); - }, - - val: function( value ) { - if ( value === undefined ) { - var elem = this[0]; - - if ( elem ) { - if( jQuery.nodeName( elem, 'option' ) ) - return (elem.attributes.value || {}).specified ? elem.value : elem.text; - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type == "select-one"; - - // Nothing was selected - if ( index < 0 ) - return null; - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - if ( option.selected ) { - // Get the specifc value for the option - value = jQuery(option).val(); - - // We don't need an array for one selects - if ( one ) - return value; - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - } - - // Everything else, we just grab the value - return (elem.value || "").replace(/\r/g, ""); - - } - - return undefined; - } - - if ( typeof value === "number" ) - value += ''; - - return this.each(function(){ - if ( this.nodeType != 1 ) - return; - - if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) - this.checked = (jQuery.inArray(this.value, value) >= 0 || - jQuery.inArray(this.name, value) >= 0); - - else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(value); - - jQuery( "option", this ).each(function(){ - this.selected = (jQuery.inArray( this.value, values ) >= 0 || - jQuery.inArray( this.text, values ) >= 0); - }); - - if ( !values.length ) - this.selectedIndex = -1; - - } else - this.value = value; - }); - }, - - html: function( value ) { - return value === undefined ? - (this[0] ? - this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : - null) : - this.empty().append( value ); - }, - - replaceWith: function( value ) { - return this.after( value ).remove(); - }, - - eq: function( i ) { - return this.slice( i, +i + 1 ); - }, - - slice: function() { - return this.pushStack( Array.prototype.slice.apply( this, arguments ), - "slice", Array.prototype.slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ - return callback.call( elem, i, elem ); - })); - }, - - andSelf: function() { - return this.add( this.prevObject ); - }, - - domManip: function( args, table, callback ) { - if ( this[0] ) { - var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), - scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), - first = fragment.firstChild; - - if ( first ) - for ( var i = 0, l = this.length; i < l; i++ ) - callback.call( root(this[i], first), this.length > 1 || i > 0 ? - fragment.cloneNode(true) : fragment ); - - if ( scripts ) - jQuery.each( scripts, evalScript ); - } - - return this; - - function root( elem, cur ) { - return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? - (elem.getElementsByTagName("tbody")[0] || - elem.appendChild(elem.ownerDocument.createElement("tbody"))) : - elem; - } - } -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -function evalScript( i, elem ) { - if ( elem.src ) - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - - else - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); - - if ( elem.parentNode ) - elem.parentNode.removeChild( elem ); -} - -function now(){ - return +new Date; -} - -jQuery.extend = jQuery.fn.extend = function() { - // copy reference to target object - var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) - target = {}; - - // extend jQuery itself if only one argument is passed - if ( length == i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) - // Extend the base object - for ( var name in options ) { - var src = target[ name ], copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) - continue; - - // Recurse if we're merging object values - if ( deep && copy && typeof copy === "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, - // Never move original objects, clone them - src || ( copy.length != null ? [ ] : { } ) - , copy ); - - // Don't bring in undefined values - else if ( copy !== undefined ) - target[ name ] = copy; - - } - - // Return the modified object - return target; -}; - -// exclude the following css properties to add px -var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, - // cache defaultView - defaultView = document.defaultView || {}, - toString = Object.prototype.toString; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) - window.jQuery = _jQuery; - - return jQuery; - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return toString.call(obj) === "[object Function]"; - }, - - isArray: function( obj ) { - return toString.call(obj) === "[object Array]"; - }, - - // check if an element is in a (or is an) XML document - isXMLDoc: function( elem ) { - return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || - !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); - }, - - // Evalulates a script in a global context - globalEval: function( data ) { - if ( data && /\S/.test(data) ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - if ( jQuery.support.scriptEval ) - script.appendChild( document.createTextNode( data ) ); - else - script.text = data; - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, length = object.length; - - if ( args ) { - if ( length === undefined ) { - for ( name in object ) - if ( callback.apply( object[ name ], args ) === false ) - break; - } else - for ( ; i < length; ) - if ( callback.apply( object[ i++ ], args ) === false ) - break; - - // A special, fast, case for the most common use of each - } else { - if ( length === undefined ) { - for ( name in object ) - if ( callback.call( object[ name ], name, object[ name ] ) === false ) - break; - } else - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} - } - - return object; - }, - - prop: function( elem, value, type, i, name ) { - // Handle executable functions - if ( jQuery.isFunction( value ) ) - value = value.call( elem, i ); - - // Handle passing in a number to a CSS property - return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? - value + "px" : - value; - }, - - className: { - // internal only, use addClass("class") - add: function( elem, classNames ) { - jQuery.each((classNames || "").split(/\s+/), function(i, className){ - if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) - elem.className += (elem.className ? " " : "") + className; - }); - }, - - // internal only, use removeClass("class") - remove: function( elem, classNames ) { - if (elem.nodeType == 1) - elem.className = classNames !== undefined ? - jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); - }).join(" ") : - ""; - }, - - // internal only, use hasClass("class") - has: function( elem, className ) { - return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( var name in options ) - elem.style[ name ] = old[ name ]; - }, - - css: function( elem, name, force, extra ) { - if ( name == "width" || name == "height" ) { - var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - - function getWH() { - val = name == "width" ? elem.offsetWidth : elem.offsetHeight; - - if ( extra === "border" ) - return; - - jQuery.each( which, function() { - if ( !extra ) - val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; - if ( extra === "margin" ) - val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; - else - val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; - }); - } - - if ( elem.offsetWidth !== 0 ) - getWH(); - else - jQuery.swap( elem, props, getWH ); - - return Math.max(0, Math.round(val)); - } - - return jQuery.curCSS( elem, name, force ); - }, - - curCSS: function( elem, name, force ) { - var ret, style = elem.style; - - // We need to handle opacity special in IE - if ( name == "opacity" && !jQuery.support.opacity ) { - ret = jQuery.attr( style, "opacity" ); - - return ret == "" ? - "1" : - ret; - } - - // Make sure we're using the right name for getting the float value - if ( name.match( /float/i ) ) - name = styleFloat; - - if ( !force && style && style[ name ] ) - ret = style[ name ]; - - else if ( defaultView.getComputedStyle ) { - - // Only "float" is needed here - if ( name.match( /float/i ) ) - name = "float"; - - name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); - try{ - var computedStyle = defaultView.getComputedStyle( elem, null ); - }catch(e){ - // Error in getting computedStyle - } - if ( computedStyle ) - ret = computedStyle.getPropertyValue( name ); - - // We should always get a number back from opacity - if ( name == "opacity" && ret == "" ) - ret = "1"; - - } else if ( elem.currentStyle ) { - var camelCase = name.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - - ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { - // Remember the original values - var left = style.left, rsLeft = elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - elem.runtimeStyle.left = elem.currentStyle.left; - style.left = ret || 0; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - elem.runtimeStyle.left = rsLeft; - } - } - - return ret; - }, - - clean: function( elems, context, fragment ) { - context = context || document; - - // !context.createElement fails in IE with an error but returns typeof 'object' - if ( typeof context.createElement === "undefined" ) - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { - var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); - if ( match ) - return [ context.createElement( match[1] ) ]; - } - - var ret = [], scripts = [], div = context.createElement("div"); - - jQuery.each(elems, function(i, elem){ - if ( typeof elem === "number" ) - elem += ''; - - if ( !elem ) - return; - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? - all : - front + ">"; - }); - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); - - var wrap = - // option or optgroup - !tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && - [ 1, "", "
          " ] || - - !tags.indexOf("", "" ] || - - // matched above - (!tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - // IE can't serialize and '; + script = + ''; if (async) { setTimeout("$('head').append('" + script + "')", 0); } else { - $('head').append(script); + $("head").append(script); } } return this; } else { if (format === undefined) { - if (typeof data === 'string') { - if (data.substring(0, 1) === '{') { - format = 'application/json'; - } else if (data.substring(0, 14) === '') }); */ fill: function (bindings) { var s = this.subject, p = this.property, o = this.object; - if (typeof s === 'string' && bindings[s.substring(1)]) { + if (typeof s === "string" && bindings[s.substring(1)]) { s = bindings[s.substring(1)]; } - if (typeof p === 'string' && bindings[p.substring(1)]) { + if (typeof p === "string" && bindings[p.substring(1)]) { p = bindings[p.substring(1)]; } - if (typeof o === 'string' && bindings[o.substring(1)]) { + if (typeof o === "string" && bindings[o.substring(1)]) { o = bindings[o.substring(1)]; } return $.rdf.pattern(s, p, o, { optional: this.optional }); @@ -1892,9 +2069,11 @@ * $.rdf.pattern('<> a foaf:Person', { namespaces: ns }).isFixed(); // true */ isFixed: function () { - return typeof this.subject !== 'string' && - typeof this.property !== 'string' && - typeof this.object !== 'string'; + return ( + typeof this.subject !== "string" && + typeof this.property !== "string" && + typeof this.object !== "string" + ); }, /** @@ -1904,9 +2083,9 @@ * @example * pattern = $.rdf.pattern('?thing a ?class'); * // triple is a new triple '<> a foaf:Person' - * triple = pattern.triple({ + * triple = pattern.triple({ * thing: $.rdf.resource('<>'), - * class: $.rdf.resource('foaf:Person', { namespaces: ns }) + * class: $.rdf.resource('foaf:Person', { namespaces: ns }) * }); */ triple: function (bindings) { @@ -1915,7 +2094,9 @@ t = this.fill(bindings); } if (t.isFixed()) { - return $.rdf.triple(t.subject, t.property, t.object, { source: this.toString() }); + return $.rdf.triple(t.subject, t.property, t.object, { + source: this.toString(), + }); } else { return null; } @@ -1926,8 +2107,8 @@ * @returns {String} */ toString: function () { - return this.subject + ' ' + this.property + ' ' + this.object; - } + return this.subject + " " + this.property + " " + this.object; + }, }; $.rdf.pattern.fn.init.prototype = $.rdf.pattern.fn; @@ -1935,7 +2116,7 @@ $.rdf.pattern.defaults = { base: $.uri.base(), namespaces: {}, - optional: false + optional: false, }; /** @@ -1950,8 +2131,8 @@ * @returns {jQuery.rdf.triple} The newly-created triple. * @throws {String} Errors if any of the strings are not in a recognised format. * @example pattern = $.rdf.triple('<>', $.rdf.type, 'foaf:Person', { namespaces: { foaf: "http://xmlns.com/foaf/0.1/" }}); - * @example - * pattern = $.rdf.triple('<> a foaf:Person', { + * @example + * pattern = $.rdf.triple('<> a foaf:Person', { * namespaces: { foaf: "http://xmlns.com/foaf/0.1/" } * }); * @see jQuery.rdf#add @@ -1965,7 +2146,7 @@ if (object === undefined) { options = property; m = $.trim(subject).match(tripleRegex); - if (m.length === 3 || (m.length === 4 && m[3] === '.')) { + if (m.length === 3 || (m.length === 4 && m[3] === ".")) { subject = m[0]; property = m[1]; object = m[2]; @@ -1973,19 +2154,23 @@ throw "Bad Triple: Couldn't parse string " + subject; } } - graph = (options && options.graph) || ''; - if (memTriple[graph] && - memTriple[graph][subject] && - memTriple[graph][subject][property] && - memTriple[graph][subject][property][object]) { + graph = (options && options.graph) || ""; + if ( + memTriple[graph] && + memTriple[graph][subject] && + memTriple[graph][subject][property] && + memTriple[graph][subject][property][object] + ) { return memTriple[graph][subject][property][object]; } triple = new $.rdf.triple.fn.init(subject, property, object, options); - graph = triple.graph || ''; - if (memTriple[graph] && - memTriple[graph][triple.subject] && - memTriple[graph][triple.subject][triple.property] && - memTriple[graph][triple.subject][triple.property][triple.object]) { + graph = triple.graph || ""; + if ( + memTriple[graph] && + memTriple[graph][triple.subject] && + memTriple[graph][triple.subject][triple.property] && + memTriple[graph][triple.subject][triple.property][triple.object] + ) { return memTriple[graph][triple.subject][triple.property][triple.object]; } else { if (memTriple[graph] === undefined) { @@ -2025,7 +2210,8 @@ * (Experimental) The named graph the triple belongs to. * @type jQuery.rdf.resource|jQuery.rdf.blank */ - this.graph = opts.graph === undefined ? undefined : subject(opts.graph, opts); + this.graph = + opts.graph === undefined ? undefined : subject(opts.graph, opts); /** * The source of the triple, which might be a node within the page (if the RDF is generated from the page) or a string holding the pattern that generated the triple. */ @@ -2067,8 +2253,8 @@ * @returns {String} */ toString: function () { - return this.subject + ' ' + this.property + ' ' + this.object + ' .'; - } + return this.subject + " " + this.property + " " + this.object + " ."; + }, }; $.rdf.triple.fn.init.prototype = $.rdf.triple.fn; @@ -2076,7 +2262,7 @@ $.rdf.triple.defaults = { base: $.uri.base(), source: [document], - namespaces: {} + namespaces: {}, }; /** @@ -2114,7 +2300,7 @@ * Always fixed to 'uri' for resources. * @type String */ - type: 'uri', + type: "uri", /** * The URI for the resource. * @type jQuery.rdf.uri @@ -2123,23 +2309,31 @@ init: function (value, options) { var m, prefix, uri, opts; - if (typeof value === 'string') { + if (typeof value === "string") { m = uriRegex.exec(value); opts = $.extend({}, $.rdf.resource.defaults, options); if (m !== null) { - this.value = $.uri.resolve(m[1].replace(/\\>/g, '>'), opts.base); - } else if (value.substring(0, 1) === ':') { - uri = opts.namespaces['']; + this.value = $.uri.resolve(m[1].replace(/\\>/g, ">"), opts.base); + } else if (value.substring(0, 1) === ":") { + uri = opts.namespaces[""]; if (uri === undefined) { - throw "Malformed Resource: No namespace binding for default namespace in " + value; + throw ( + "Malformed Resource: No namespace binding for default namespace in " + + value + ); } else { this.value = $.uri.resolve(uri + value.substring(1)); } - } else if (value.substring(value.length - 1) === ':') { + } else if (value.substring(value.length - 1) === ":") { prefix = value.substring(0, value.length - 1); uri = opts.namespaces[prefix]; if (uri === undefined) { - throw "Malformed Resource: No namespace binding for prefix " + prefix + " in " + value; + throw ( + "Malformed Resource: No namespace binding for prefix " + + prefix + + " in " + + value + ); } else { this.value = $.uri.resolve(uri); } @@ -2162,8 +2356,8 @@ */ dump: function () { return { - type: 'uri', - value: this.value.toString() + type: "uri", + value: this.value.toString(), }; }, @@ -2172,15 +2366,15 @@ * @returns {String} */ toString: function () { - return '<' + this.value + '>'; - } + return "<" + this.value + ">"; + }, }; $.rdf.resource.fn.init.prototype = $.rdf.resource.fn; $.rdf.resource.defaults = { base: $.uri.base(), - namespaces: {} + namespaces: {}, }; /** @@ -2188,49 +2382,49 @@ * @constant * @type jQuery.rdf.resource */ - $.rdf.type = $.rdf.resource('<' + rdfNs + 'type>'); + $.rdf.type = $.rdf.resource("<" + rdfNs + "type>"); /** * A {@link jQuery.rdf.resource} for rdfs:label * @constant * @type jQuery.rdf.resource */ - $.rdf.label = $.rdf.resource('<' + rdfsNs + 'label>'); + $.rdf.label = $.rdf.resource("<" + rdfsNs + "label>"); /** * A {@link jQuery.rdf.resource} for rdf:first * @constant * @type jQuery.rdf.resource */ - $.rdf.first = $.rdf.resource('<' + rdfNs + 'first>'); + $.rdf.first = $.rdf.resource("<" + rdfNs + "first>"); /** * A {@link jQuery.rdf.resource} for rdf:rest * @constant * @type jQuery.rdf.resource */ - $.rdf.rest = $.rdf.resource('<' + rdfNs + 'rest>'); + $.rdf.rest = $.rdf.resource("<" + rdfNs + "rest>"); /** * A {@link jQuery.rdf.resource} for rdf:nil * @constant * @type jQuery.rdf.resource */ - $.rdf.nil = $.rdf.resource('<' + rdfNs + 'nil>'); + $.rdf.nil = $.rdf.resource("<" + rdfNs + "nil>"); /** * A {@link jQuery.rdf.resource} for rdf:subject * @constant * @type jQuery.rdf.resource */ - $.rdf.subject = $.rdf.resource('<' + rdfNs + 'subject>'); + $.rdf.subject = $.rdf.resource("<" + rdfNs + "subject>"); /** * A {@link jQuery.rdf.resource} for rdf:property * @constant * @type jQuery.rdf.resource */ - $.rdf.property = $.rdf.resource('<' + rdfNs + 'property>'); + $.rdf.property = $.rdf.resource("<" + rdfNs + "property>"); /** * A {@link jQuery.rdf.resource} for rdf:object * @constant * @type jQuery.rdf.resource */ - $.rdf.object = $.rdf.resource('<' + rdfNs + 'object>'); + $.rdf.object = $.rdf.resource("<" + rdfNs + "object>"); /** *

          Creates a new jQuery.rdf.blank object. This should be invoked as a method rather than constructed using new; indeed you will not usually want to generate these objects directly, since they are automatically created from strings where necessary, such as by {@link jQuery.rdf#add}.

          @@ -2264,7 +2458,7 @@ * Always fixed to 'bnode' for blank nodes. * @type String */ - type: 'bnode', + type: "bnode", /** * The value of the blank node in the format _:id * @type String @@ -2277,14 +2471,18 @@ id: undefined, init: function (value) { - if (value === '[]') { + if (value === "[]") { this.id = blankNodeID(); - this.value = '_:' + this.id; - } else if (value.substring(0, 2) === '_:') { + this.value = "_:" + this.id; + } else if (value.substring(0, 2) === "_:") { this.id = value.substring(2); this.value = value; } else { - throw "Malformed Blank Node: " + value + " is not a legal format for a blank node"; + throw ( + "Malformed Blank Node: " + + value + + " is not a legal format for a blank node" + ); } return this; }, @@ -2295,8 +2493,8 @@ */ dump: function () { return { - type: 'bnode', - value: this.value + type: "bnode", + value: this.value, }; }, @@ -2306,7 +2504,7 @@ */ toString: function () { return this.value; - } + }, }; $.rdf.blank.fn.init.prototype = $.rdf.blank.fn; @@ -2349,7 +2547,7 @@ * Always fixed to 'literal' for literals. * @type String */ - type: 'literal', + type: "literal", /** * The value of the literal as a string. * @type String @@ -2367,39 +2565,54 @@ datatype: undefined, init: function (value, options) { - var - m, datatype, + var m, + datatype, opts = $.extend({}, $.rdf.literal.defaults, options); datatype = $.safeCurie(opts.datatype, { namespaces: opts.namespaces }); - if (opts.lang !== undefined && opts.datatype !== undefined && datatype.toString() !== (rdfNs + 'XMLLiteral')) { - throw "Malformed Literal: Cannot define both a language and a datatype for a literal (" + value + ")"; + if ( + opts.lang !== undefined && + opts.datatype !== undefined && + datatype.toString() !== rdfNs + "XMLLiteral" + ) { + throw ( + "Malformed Literal: Cannot define both a language and a datatype for a literal (" + + value + + ")" + ); } if (opts.datatype !== undefined) { datatype = $.safeCurie(opts.datatype, { namespaces: opts.namespaces }); $.extend(this, $.typedValue(value.toString(), datatype)); - if (datatype.toString() === rdfNs + 'XMLLiteral') { + if (datatype.toString() === rdfNs + "XMLLiteral") { this.lang = opts.lang; } } else if (opts.lang !== undefined) { this.value = value.toString(); this.lang = opts.lang; - } else if (typeof value === 'boolean') { - $.extend(this, $.typedValue(value.toString(), xsdNs + 'boolean')); - } else if (typeof value === 'number') { - $.extend(this, $.typedValue(value.toString(), xsdNs + 'double')); - } else if (value === 'true' || value === 'false') { - $.extend(this, $.typedValue(value, xsdNs + 'boolean')); - } else if ($.typedValue.valid(value, xsdNs + 'integer')) { - $.extend(this, $.typedValue(value, xsdNs + 'integer')); - } else if ($.typedValue.valid(value, xsdNs + 'decimal')) { - $.extend(this, $.typedValue(value, xsdNs + 'decimal')); - } else if ($.typedValue.valid(value, xsdNs + 'double') && - !/^\s*([\-\+]?INF|NaN)\s*$/.test(value)) { // INF, -INF and NaN aren't valid literals in Turtle - $.extend(this, $.typedValue(value, xsdNs + 'double')); + } else if (typeof value === "boolean") { + $.extend(this, $.typedValue(value.toString(), xsdNs + "boolean")); + } else if (typeof value === "number") { + $.extend(this, $.typedValue(value.toString(), xsdNs + "double")); + } else if (value === "true" || value === "false") { + $.extend(this, $.typedValue(value, xsdNs + "boolean")); + } else if ($.typedValue.valid(value, xsdNs + "integer")) { + $.extend(this, $.typedValue(value, xsdNs + "integer")); + } else if ($.typedValue.valid(value, xsdNs + "decimal")) { + $.extend(this, $.typedValue(value, xsdNs + "decimal")); + } else if ( + $.typedValue.valid(value, xsdNs + "double") && + !/^\s*([\-\+]?INF|NaN)\s*$/.test(value) + ) { + // INF, -INF and NaN aren't valid literals in Turtle + $.extend(this, $.typedValue(value, xsdNs + "double")); } else { m = literalRegex.exec(value); if (m !== null) { - this.value = (m[2] || m[4] || m[6]).replace(/\\"/g, '"').replace(/\\n/g, '\n').replace(/\\t/g, '\t').replace(/\\r/g, '\r'); + this.value = (m[2] || m[4] || m[6]) + .replace(/\\"/g, '"') + .replace(/\\n/g, "\n") + .replace(/\\t/g, "\t") + .replace(/\\r/g, "\r"); if (m[11]) { datatype = $.rdf.resource(m[11], opts); $.extend(this, $.typedValue(this.value, datatype.value)); @@ -2419,8 +2632,8 @@ */ dump: function () { var e = { - type: 'literal', - value: this.value.toString() + type: "literal", + value: this.value.toString(), }; if (this.lang !== undefined) { e.lang = this.lang; @@ -2429,7 +2642,7 @@ } return e; }, - + /** * Returns a string representing this resource in Turtle format. * @returns {String} @@ -2437,12 +2650,12 @@ toString: function () { var val = '"' + this.value + '"'; if (this.lang !== undefined) { - val += '@' + this.lang; + val += "@" + this.lang; } else if (this.datatype !== undefined) { - val += '^^<' + this.datatype + '>'; + val += "^^<" + this.datatype + ">"; } return val; - } + }, }; $.rdf.literal.fn.init.prototype = $.rdf.literal.fn; @@ -2451,7 +2664,6 @@ base: $.uri.base(), namespaces: {}, datatype: undefined, - lang: undefined + lang: undefined, }; - })(jQuery); diff --git a/r2redit/src/lib/jquery.rdf.json.js b/r2redit/src/lib/jquery.rdf.json.js index 04bdb79..d46b726 100644 --- a/r2redit/src/lib/jquery.rdf.json.js +++ b/r2redit/src/lib/jquery.rdf.json.js @@ -26,21 +26,31 @@ * @ignore */ (function ($) { - - $.rdf.parsers['application/json'] = { + $.rdf.parsers["application/json"] = { parse: $.secureEvalJSON, serialize: $.toJSON, triples: function (data) { - var s, subject, p, property, o, object, i, opts, triples = []; + var s, + subject, + p, + property, + o, + object, + i, + opts, + triples = []; for (s in data) { - subject = (s.substring(0, 2) === '_:') ? $.rdf.blank(s) : $.rdf.resource('<' + s + '>'); + subject = + s.substring(0, 2) === "_:" + ? $.rdf.blank(s) + : $.rdf.resource("<" + s + ">"); for (p in data[s]) { - property = $.rdf.resource('<' + p + '>'); + property = $.rdf.resource("<" + p + ">"); for (i = 0; i < data[s][p].length; i += 1) { o = data[s][p][i]; - if (o.type === 'uri') { - object = $.rdf.resource('<' + o.value + '>'); - } else if (o.type === 'bnode') { + if (o.type === "uri") { + object = $.rdf.resource("<" + o.value + ">"); + } else if (o.type === "bnode") { object = $.rdf.blank(o.value); } else { // o.type === 'literal' @@ -62,7 +72,10 @@ }, dump: function (triples) { var e = {}, - i, t, s, p; + i, + t, + s, + p; for (i = 0; i < triples.length; i += 1) { t = triples[i]; s = t.subject.value.toString(); @@ -76,7 +89,6 @@ e[s][p].push(t.object.dump()); } return e; - } + }, }; - })(jQuery); diff --git a/r2redit/src/lib/jquery.rdf.orig.js b/r2redit/src/lib/jquery.rdf.orig.js index 7ab3fef..526d522 100644 --- a/r2redit/src/lib/jquery.rdf.orig.js +++ b/r2redit/src/lib/jquery.rdf.orig.js @@ -25,37 +25,32 @@ * @ignore */ (function ($) { - var - memResource = {}, + var memResource = {}, memBlank = {}, memLiteral = {}, memTriple = {}, memPattern = {}, - xsdNs = "http://www.w3.org/2001/XMLSchema#", rdfNs = "http://www.w3.org/1999/02/22-rdf-syntax-ns#", rdfsNs = "http://www.w3.org/2000/01/rdf-schema#", - uriRegex = /^<(([^>]|\\>)*)>$/, - literalRegex = /^("""((\\"|[^"])*)"""|"((\\"|[^"])*)")(@([a-z]+(-[a-z0-9]+)*)|\^\^(.+))?$/, - tripleRegex = /(("""((\\"|[^"])*)""")|("(\\"|[^"]|)*")|(<(\\>|[^>])*>)|\S)+/g, - - blankNodeSeed = databankSeed = new Date().getTime() % 1000, + literalRegex = + /^("""((\\"|[^"])*)"""|"((\\"|[^"])*)")(@([a-z]+(-[a-z0-9]+)*)|\^\^(.+))?$/, + tripleRegex = + /(("""((\\"|[^"])*)""")|("(\\"|[^"]|)*")|(<(\\>|[^>])*>)|\S)+/g, + blankNodeSeed = (databankSeed = new Date().getTime() % 1000), blankNodeID = function () { blankNodeSeed += 1; - return 'b' + blankNodeSeed.toString(16); + return "b" + blankNodeSeed.toString(16); }, - databankID = function () { databankSeed += 1; - return 'data' + databankSeed.toString(16); + return "data" + databankSeed.toString(16); }, databanks = {}, - documentQueue = {}, - subject = function (subject, opts) { - if (typeof subject === 'string') { + if (typeof subject === "string") { try { return $.rdf.resource(subject, opts); } catch (e) { @@ -69,11 +64,10 @@ return subject; } }, - property = function (property, opts) { - if (property === 'a') { + if (property === "a") { return $.rdf.type; - } else if (typeof property === 'string') { + } else if (typeof property === "string") { try { return $.rdf.resource(property, opts); } catch (e) { @@ -83,9 +77,8 @@ return property; } }, - object = function (object, opts) { - if (typeof object === 'string') { + if (typeof object === "string") { try { return $.rdf.resource(object, opts); } catch (e) { @@ -95,7 +88,12 @@ try { return $.rdf.literal(object, opts); } catch (g) { - throw "Bad Triple: Object " + object + " is not a resource or a literal " + g; + throw ( + "Bad Triple: Object " + + object + + " is not a resource or a literal " + + g + ); } } } @@ -103,10 +101,9 @@ return object; } }, - testResource = function (resource, filter, existing) { var variable; - if (typeof filter === 'string') { + if (typeof filter === "string") { variable = filter.substring(1); if (existing[variable] && existing[variable] !== resource) { return null; @@ -120,52 +117,73 @@ return null; } }, - findMatches = function (databank, pattern) { if (databank.union === undefined) { if (pattern.subject.type !== undefined) { if (databank.subjectIndex[pattern.subject] === undefined) { return []; } - return $.map(databank.subjectIndex[pattern.subject], function (triple) { - var bindings = pattern.exec(triple); - return bindings === null ? null : { bindings: bindings, triples: [triple] }; - }); - } else if (pattern.object.type === 'uri' || pattern.object.type === 'bnode') { + return $.map( + databank.subjectIndex[pattern.subject], + function (triple) { + var bindings = pattern.exec(triple); + return bindings === null + ? null + : { bindings: bindings, triples: [triple] }; + }, + ); + } else if ( + pattern.object.type === "uri" || + pattern.object.type === "bnode" + ) { if (databank.objectIndex[pattern.object] === undefined) { return []; } return $.map(databank.objectIndex[pattern.object], function (triple) { var bindings = pattern.exec(triple); - return bindings === null ? null : { bindings: bindings, triples: [triple] }; + return bindings === null + ? null + : { bindings: bindings, triples: [triple] }; }); } else if (pattern.property.type !== undefined) { if (databank.propertyIndex[pattern.property] === undefined) { return []; } - return $.map(databank.propertyIndex[pattern.property], function (triple) { - var bindings = pattern.exec(triple); - return bindings === null ? null : { bindings: bindings, triples: [triple] }; - }); + return $.map( + databank.propertyIndex[pattern.property], + function (triple) { + var bindings = pattern.exec(triple); + return bindings === null + ? null + : { bindings: bindings, triples: [triple] }; + }, + ); } } return $.map(databank.triples(), function (triple) { var bindings = pattern.exec(triple); - return bindings === null ? null : { bindings: bindings, triples: [triple] }; + return bindings === null + ? null + : { bindings: bindings, triples: [triple] }; }); }, - mergeMatches = function (existingMs, newMs, optional) { return $.map(existingMs, function (existingM, i) { var compatibleMs = $.map(newMs, function (newM) { // For newM to be compatible with existingM, all the bindings // in newM must either be the same as in existingM, or not // exist in existingM - var k, b, isCompatible = true; + var k, + b, + isCompatible = true; for (k in newM.bindings) { b = newM.bindings[k]; - if (!(existingM.bindings[k] === undefined || - existingM.bindings[k] === b)) { + if ( + !( + existingM.bindings[k] === undefined || + existingM.bindings[k] === b + ) + ) { isCompatible = false; break; } @@ -176,7 +194,7 @@ return $.map(compatibleMs, function (compatibleM) { return { bindings: $.extend({}, existingM.bindings, compatibleM.bindings), - triples: unique(existingM.triples.concat(compatibleM.triples)) + triples: unique(existingM.triples.concat(compatibleM.triples)), }; }); } else { @@ -184,14 +202,22 @@ } }); }, - registerQuery = function (databank, query) { var s, p, o; if (query.filterExp !== undefined && !$.isFunction(query.filterExp)) { if (databank.union === undefined) { - s = typeof query.filterExp.subject === 'string' ? '' : query.filterExp.subject; - p = typeof query.filterExp.property === 'string' ? '' : query.filterExp.property; - o = typeof query.filterExp.object === 'string' ? '' : query.filterExp.object; + s = + typeof query.filterExp.subject === "string" + ? "" + : query.filterExp.subject; + p = + typeof query.filterExp.property === "string" + ? "" + : query.filterExp.property; + o = + typeof query.filterExp.object === "string" + ? "" + : query.filterExp.object; if (databank.queries[s] === undefined) { databank.queries[s] = {}; } @@ -209,7 +235,6 @@ } } }, - resetQuery = function (query) { query.length = 0; query.matches = []; @@ -220,7 +245,6 @@ resetQuery(union); }); }, - updateQuery = function (query, matches) { if (matches.length > 0) { $.each(query.children, function (i, child) { @@ -235,10 +259,20 @@ }); } }, - filterMatches = function (matches, variables) { - var i, bindings, triples, j, k, variable, value, nvariables = variables.length, - newbindings, match = {}, keyobject = {}, keys = {}, filtered = []; + var i, + bindings, + triples, + j, + k, + variable, + value, + nvariables = variables.length, + newbindings, + match = {}, + keyobject = {}, + keys = {}, + filtered = []; for (i = 0; i < matches.length; i += 1) { bindings = matches[i].bindings; triples = matches[i].triples; @@ -268,15 +302,18 @@ } return filtered; }, - renameMatches = function (matches, old) { - var i, match, newMatch, keys = {}, renamed = []; + var i, + match, + newMatch, + keys = {}, + renamed = []; for (i = 0; i < matches.length; i += 1) { match = matches[i]; if (keys[match.bindings[old]] === undefined) { newMatch = { bindings: { node: match.bindings[old] }, - triples: match.triples + triples: match.triples, }; renamed.push(newMatch); keys[match.bindings[old]] = newMatch; @@ -287,7 +324,6 @@ } return renamed; }, - leftActivate = function (query, matches) { var newMatches; if (query.union === undefined) { @@ -297,10 +333,21 @@ matches = matches || query.parent.matches; if ($.isFunction(query.filterExp)) { newMatches = $.map(matches, function (match, i) { - return query.filterExp.call(match.bindings, i, match.bindings, match.triples) ? match : null; + return query.filterExp.call( + match.bindings, + i, + match.bindings, + match.triples, + ) + ? match + : null; }); } else if (query.filterExp !== undefined) { - newMatches = mergeMatches(matches, query.alphaMemory, query.filterExp.optional); + newMatches = mergeMatches( + matches, + query.alphaMemory, + query.filterExp.optional, + ); } else { newMatches = matches; } @@ -317,7 +364,6 @@ } updateQuery(query, newMatches); }, - rightActivate = function (query, match) { var newMatches; if (query.filterExp.optional) { @@ -332,7 +378,6 @@ updateQuery(query, newMatches); } }, - addToQuery = function (query, triple) { var match, bindings = query.filterExp.exec(triple); @@ -342,25 +387,21 @@ rightActivate(query, match); } }, - removeFromQuery = function (query, triple) { query.alphaMemory.splice($.inArray(triple, query.alphaMemory), 1); resetQuery(query); leftActivate(query); }, - addToQueries = function (queries, triple) { $.each(queries, function (i, query) { addToQuery(query, triple); }); }, - removeFromQueries = function (queries, triple) { $.each(queries, function (i, query) { removeFromQuery(query, triple); }); }, - addToDatabankQueries = function (databank, triple) { var s = triple.subject, p = triple.property, @@ -371,34 +412,34 @@ if (databank.queries[s][p][o] !== undefined) { addToQueries(databank.queries[s][p][o], triple); } - if (databank.queries[s][p][''] !== undefined) { - addToQueries(databank.queries[s][p][''], triple); + if (databank.queries[s][p][""] !== undefined) { + addToQueries(databank.queries[s][p][""], triple); } } - if (databank.queries[s][''] !== undefined) { - if (databank.queries[s][''][o] !== undefined) { - addToQueries(databank.queries[s][''][o], triple); + if (databank.queries[s][""] !== undefined) { + if (databank.queries[s][""][o] !== undefined) { + addToQueries(databank.queries[s][""][o], triple); } - if (databank.queries[s][''][''] !== undefined) { - addToQueries(databank.queries[s][''][''], triple); + if (databank.queries[s][""][""] !== undefined) { + addToQueries(databank.queries[s][""][""], triple); } } } - if (databank.queries[''] !== undefined) { - if (databank.queries[''][p] !== undefined) { - if (databank.queries[''][p][o] !== undefined) { - addToQueries(databank.queries[''][p][o], triple); + if (databank.queries[""] !== undefined) { + if (databank.queries[""][p] !== undefined) { + if (databank.queries[""][p][o] !== undefined) { + addToQueries(databank.queries[""][p][o], triple); } - if (databank.queries[''][p][''] !== undefined) { - addToQueries(databank.queries[''][p][''], triple); + if (databank.queries[""][p][""] !== undefined) { + addToQueries(databank.queries[""][p][""], triple); } } - if (databank.queries[''][''] !== undefined) { - if (databank.queries[''][''][o] !== undefined) { - addToQueries(databank.queries[''][''][o], triple); + if (databank.queries[""][""] !== undefined) { + if (databank.queries[""][""][o] !== undefined) { + addToQueries(databank.queries[""][""][o], triple); } - if (databank.queries[''][''][''] !== undefined) { - addToQueries(databank.queries[''][''][''], triple); + if (databank.queries[""][""][""] !== undefined) { + addToQueries(databank.queries[""][""][""], triple); } } } @@ -408,7 +449,6 @@ }); } }, - removeFromDatabankQueries = function (databank, triple) { var s = triple.subject, p = triple.property, @@ -419,34 +459,34 @@ if (databank.queries[s][p][o] !== undefined) { removeFromQueries(databank.queries[s][p][o], triple); } - if (databank.queries[s][p][''] !== undefined) { - removeFromQueries(databank.queries[s][p][''], triple); + if (databank.queries[s][p][""] !== undefined) { + removeFromQueries(databank.queries[s][p][""], triple); } } - if (databank.queries[s][''] !== undefined) { - if (databank.queries[s][''][o] !== undefined) { - removeFromQueries(databank.queries[s][''][o], triple); + if (databank.queries[s][""] !== undefined) { + if (databank.queries[s][""][o] !== undefined) { + removeFromQueries(databank.queries[s][""][o], triple); } - if (databank.queries[s][''][''] !== undefined) { - removeFromQueries(databank.queries[s][''][''], triple); + if (databank.queries[s][""][""] !== undefined) { + removeFromQueries(databank.queries[s][""][""], triple); } } } - if (databank.queries[''] !== undefined) { - if (databank.queries[''][p] !== undefined) { - if (databank.queries[''][p][o] !== undefined) { - removeFromQueries(databank.queries[''][p][o], triple); + if (databank.queries[""] !== undefined) { + if (databank.queries[""][p] !== undefined) { + if (databank.queries[""][p][o] !== undefined) { + removeFromQueries(databank.queries[""][p][o], triple); } - if (databank.queries[''][p][''] !== undefined) { - removeFromQueries(databank.queries[''][p][''], triple); + if (databank.queries[""][p][""] !== undefined) { + removeFromQueries(databank.queries[""][p][""], triple); } } - if (databank.queries[''][''] !== undefined) { - if (databank.queries[''][''][o] !== undefined) { - removeFromQueries(databank.queries[''][''][o], triple); + if (databank.queries[""][""] !== undefined) { + if (databank.queries[""][""][o] !== undefined) { + removeFromQueries(databank.queries[""][""][o], triple); } - if (databank.queries[''][''][''] !== undefined) { - removeFromQueries(databank.queries[''][''][''], triple); + if (databank.queries[""][""][""] !== undefined) { + removeFromQueries(databank.queries[""][""][""], triple); } } } @@ -456,9 +496,12 @@ }); } }, - group = function (bindings, variables, base) { - var variable = variables[0], grouped = {}, results = [], i, newbase; + var variable = variables[0], + grouped = {}, + results = [], + i, + newbase; base = base || {}; if (variables.length === 0) { for (i = 0; i < bindings.length; i += 1) { @@ -490,7 +533,6 @@ } return results; }, - queue = function (databank, url, callbacks) { if (documentQueue[databank.id] === undefined) { documentQueue[databank.id] = {}; @@ -501,7 +543,6 @@ } return true; }, - dequeue = function (databank, url, result, args) { var callbacks = documentQueue[databank.id][url]; if ($.isFunction(callbacks[result])) { @@ -509,35 +550,33 @@ } documentQueue[databank.id][url] = undefined; }, - - unique = function( b ) { + unique = function (b) { var a = []; var l = b.length; - for(var i=0; iCreates a new jQuery.rdf object. This should be invoked as a method rather than constructed using new; indeed you will usually want to generate these objects using a method such as {@link jQuery#rdf} or {@link jQuery.rdf#where}.

          * @class

          A jQuery.rdf object represents the results of a query over its {@link jQuery.rdf#databank}. The results of a query are a sequence of objects which represent the bindings of values to the variables used in filter expressions specified using {@link jQuery.rdf#where} or {@link jQuery.rdf#optional}. Each of the objects in this sequence has associated with it a set of triples that are the sources for the variable bindings, which you can get at using {@link jQuery.rdf#sources}.

          - *

          The {@link jQuery.rdf} object itself is a lot like a {@link jQuery} object. It has a {@link jQuery.rdf#length} and the individual matches can be accessed using [n], but you can also iterate through the matches using {@link jQuery.rdf#map} or {@link jQuery.rdf#each}.

          - *

          {@link jQuery.rdf} is designed to mirror the functionality of SPARQL while providing an interface that's familiar and easy to use for jQuery programmers.

          + *

          The {@link jQuery.rdf} object itself is a lot like a {@link jQuery} object. It has a {@link jQuery.rdf#length} and the individual matches can be accessed using [n], but you can also iterate through the matches using {@link jQuery.rdf#map} or {@link jQuery.rdf#each}.

          + *

          {@link jQuery.rdf} is designed to mirror the functionality of SPARQL while providing an interface that's familiar and easy to use for jQuery programmers.

          * @param {Object} [options] * @param {jQuery.rdf.databank} [options.databank] The databank that this query should operate over. * @param {jQuery.rdf.triple[]} [options.triples] A set of triples over which the query operates; this is only used if options.databank isn't specified, in which case a new databank with these triples is generated. @@ -556,7 +595,7 @@ * The version of rdfQuery. * @type String */ - rdfquery: '1.1', + rdfquery: "1.1", init: function (options) { var databanks, i; @@ -571,7 +610,10 @@ * The databank over which this query operates. * @type jQuery.rdf.databank */ - this.databank = this.parent === undefined ? $.rdf.databank(options.triples, options) : this.parent.databank; + this.databank = + this.parent === undefined + ? $.rdf.databank(options.triples, options) + : this.parent.databank; } else { this.databank = options.databank; } @@ -608,7 +650,7 @@ for (i = 0; i < options.nodes.length; i += 1) { this.alphaMemory.push({ bindings: { node: options.nodes[i] }, - triples: [] + triples: [], }); } } @@ -695,8 +737,12 @@ triple.partOf.push(this); } } else { - if (typeof triple === 'string') { - options = $.extend({}, { base: this.base(), namespaces: this.prefix(), source: triple }, options); + if (typeof triple === "string") { + options = $.extend( + {}, + { base: this.base(), namespaces: this.prefix(), source: triple }, + options, + ); triple = $.rdf.pattern(triple, options); } if (triple.isFixed()) { @@ -730,8 +776,12 @@ * @see jQuery.rdf.databank#remove */ remove: function (triple, options) { - if (typeof triple === 'string') { - options = $.extend({}, { base: this.base(), namespaces: this.prefix() }, options); + if (typeof triple === "string") { + options = $.extend( + {}, + { base: this.base(), namespaces: this.prefix() }, + options, + ); triple = $.rdf.pattern(triple, options); } if (triple.isFixed()) { @@ -761,7 +811,7 @@ if (success !== undefined) { options.success = function () { success.call(rdf); - } + }; } this.databank.load(data, options); return this; @@ -796,15 +846,19 @@ * .add('_:b foaf:family_name "Hacker" .') * .where('?person foaf:family_name "Hacker"') * .where('?person foaf:givenname "Bob"); - */ + */ where: function (filter, options) { var query, base, namespaces, optional; options = options || {}; - if (typeof filter === 'string') { + if (typeof filter === "string") { base = options.base || this.base(); namespaces = $.extend({}, this.prefix(), options.namespaces || {}); optional = options.optional || false; - filter = $.rdf.pattern(filter, { namespaces: namespaces, base: base, optional: optional }); + filter = $.rdf.pattern(filter, { + namespaces: namespaces, + base: base, + optional: optional, + }); } query = $.rdf($.extend({}, options, { parent: this, filter: filter })); this.children.push(query); @@ -835,7 +889,10 @@ * .optional('?x foaf:mbox ?mbox'); */ optional: function (filter, options) { - return this.where(filter, $.extend({}, options || {}, { optional: true })); + return this.where( + filter, + $.extend({}, options || {}, { optional: true }), + ); }, /** @@ -859,7 +916,7 @@ * .about('<http://www.blogger.com/profile/1109404>'); */ about: function (resource, options) { - return this.where(resource + ' ?property ?value', options); + return this.where(resource + " ?property ?value", options); }, /** @@ -904,7 +961,7 @@ */ filter: function (property, condition) { var func, query; - if (typeof property === 'string') { + if (typeof property === "string") { if (condition.constructor === RegExp) { /** @ignore func */ func = function () { @@ -912,7 +969,9 @@ }; } else { func = function () { - return this[property].type === 'literal' ? this[property].value === condition : this[property] === condition; + return this[property].type === "literal" + ? this[property].value === condition + : this[property] === condition; }; } } else { @@ -936,19 +995,22 @@ */ node: function (resource) { var variable, query; - if (resource.toString().substring(0, 1) === '?') { + if (resource.toString().substring(0, 1) === "?") { variable = resource.toString().substring(1); query = $.rdf({ parent: this, navigate: variable }); } else { - if (typeof resource === 'string') { - resource = object(resource, { namespaces: this.prefix(), base: this.base() }); + if (typeof resource === "string") { + resource = object(resource, { + namespaces: this.prefix(), + base: this.base(), + }); } query = $.rdf({ parent: this, nodes: [resource] }); } this.children.push(query); return query; }, - + /** * Navigates from the resource identified by the 'node' binding to another node through the property passed as the argument. * @param {String|Object} property The property whose value will be the new node. @@ -961,9 +1023,11 @@ * .find('dc:creator'); */ find: function (property) { - return this.where('?node ' + property + ' ?object', { navigate: 'object' }); + return this.where("?node " + property + " ?object", { + navigate: "object", + }); }, - + /** * Navigates from the resource identified by the 'node' binding to another node through the property passed as the argument, like {jQuery.rdf#find}, but backwards. * @param {String|Object} property The property whose value will be the new node. @@ -976,7 +1040,9 @@ * .back('rdf:type'); */ back: function (property) { - return this.where('?subject ' + property + ' ?node', { navigate: 'subject' }); + return this.where("?subject " + property + " ?node", { + navigate: "subject", + }); }, /** @@ -997,7 +1063,11 @@ * .group(['surname', 'forename']); */ group: function (bindings) { - var grouped = {}, results = [], i, key, v; + var grouped = {}, + results = [], + i, + key, + v; if (!$.isArray(bindings)) { bindings = [bindings]; } @@ -1015,7 +1085,9 @@ * var selected = rdf.select(['creator']); */ select: function (bindings) { - var s = [], i, j; + var s = [], + i, + j; for (i = 0; i < this.length; i += 1) { if (bindings === undefined) { s[i] = this[i]; @@ -1042,10 +1114,13 @@ * .describe(['?photo']) */ describe: function (bindings) { - var i, j, binding, resources = []; + var i, + j, + binding, + resources = []; for (i = 0; i < bindings.length; i += 1) { binding = bindings[i]; - if (binding.substring(0, 1) === '?') { + if (binding.substring(0, 1) === "?") { binding = binding.substring(1); for (j = 0; j < this.length; j += 1) { resources.push(this[j][binding]); @@ -1131,14 +1206,16 @@ * .where('?thing a foaf:Person') * .sources() * .each(function () { - * ...do something with the array of triples... + * ...do something with the array of triples... * }); */ sources: function () { - return $($.map(this.matches, function (match) { - // return an array-of-an-array because arrays automatically get expanded by $.map() - return [match.triples]; - })); + return $( + $.map(this.matches, function (match) { + // return an array-of-an-array because arrays automatically get expanded by $.map() + return [match.triples]; + }), + ); }, /** @@ -1150,7 +1227,10 @@ var triples = $.map(this.matches, function (match) { return match.triples; }); - options = $.extend({ namespaces: this.databank.namespaces, base: this.databank.base }, options || {}); + options = $.extend( + { namespaces: this.databank.namespaces, base: this.databank.base }, + options || {}, + ); return $.rdf.dump(triples, options); }, @@ -1166,7 +1246,7 @@ * .value; */ get: function (num) { - return (num === undefined) ? $.makeArray(this) : this[num]; + return num === undefined ? $.makeArray(this) : this[num]; }, /** @@ -1212,10 +1292,17 @@ * }); */ map: function (callback) { - return $($.map(this.matches, function (match, i) { - // in the callback, "this" is the bindings, and the arguments are swapped from $.map() - return callback.call(match.bindings, i, match.bindings, match.triples); - })); + return $( + $.map(this.matches, function (match, i) { + // in the callback, "this" is the bindings, and the arguments are swapped from $.map() + return callback.call( + match.bindings, + i, + match.bindings, + match.triples, + ); + }), + ); }, /** @@ -1224,7 +1311,7 @@ */ jquery: function () { return $(this); - } + }, }; $.rdf.fn.init.prototype = $.rdf.fn; @@ -1261,25 +1348,32 @@ var opts = $.extend({}, $.rdf.dump.defaults, options || {}), format = opts.format, serialize = opts.serialize, - dump, parser, parsers; + dump, + parser, + parsers; parser = $.rdf.parsers[format]; if (parser === undefined) { parsers = []; for (p in $.rdf.parsers) { parsers.push(p); } - throw "Unrecognised dump format: " + format + ". Expected one of " + parsers.join(", "); + throw ( + "Unrecognised dump format: " + + format + + ". Expected one of " + + parsers.join(", ") + ); } dump = parser.dump(triples, opts); return serialize ? parser.serialize(dump) : dump; }; $.rdf.dump.defaults = { - format: 'application/json', + format: "application/json", serialize: false, indent: false, - namespaces: {} - } + namespaces: {}, + }; /** * Gleans RDF triples from the nodes held by the {@link jQuery} object, puts them into a {@link jQuery.rdf.databank} and returns a {@link jQuery.rdf} object that allows you to query and otherwise manipulate them. The mechanism for gleaning RDF triples from the web page depends on the rdfQuery modules that have been included. The core version of rdfQuery doesn't support any gleaners; other versions support a RDFa gleaner, and there are some modules available for common microformats. @@ -1296,9 +1390,13 @@ */ $.fn.rdf = function (callback) { var triples = [], - callback = callback || function () { return this; }; + callback = + callback || + function () { + return this; + }; if ($(this)[0] && $(this)[0].nodeType === 9) { - return $(this).children('*').rdf(callback); + return $(this).children("*").rdf(callback); } else if ($(this).length > 0) { triples = $(this).map(function (i, elem) { return $.map($.rdf.gleaners, function (gleaner) { @@ -1311,8 +1409,7 @@ } }; - $.extend($.expr[':'], { - + $.extend($.expr[":"], { about: function (a, i, m) { var j = $(a), resource = m[3] ? j.safeCurie(m[3]) : null, @@ -1337,8 +1434,7 @@ } }); return isType; - } - + }, }); /** @@ -1378,7 +1474,7 @@ } return this; }, - + /** * Sets or returns the base URI of the {@link jQuery.rdf.databank}. * @param {String|jQuery.uri} [base] @@ -1450,7 +1546,11 @@ */ add: function (triple, options) { var base = (options && options.base) || this.base(), - namespaces = $.extend({}, this.prefix(), (options && options.namespaces) || {}), + namespaces = $.extend( + {}, + this.prefix(), + (options && options.namespaces) || {}, + ), depth = (options && options.depth) || $.rdf.databank.defaults.depth, proxy = (options && options.proxy) || $.rdf.databank.defaults.proxy, databank; @@ -1466,31 +1566,47 @@ return this; } } else { - if (typeof triple === 'string') { - triple = $.rdf.triple(triple, { namespaces: namespaces, base: base, source: triple }); + if (typeof triple === "string") { + triple = $.rdf.triple(triple, { + namespaces: namespaces, + base: base, + source: triple, + }); } if (this.union === undefined) { if (this.subjectIndex[triple.subject] === undefined) { this.subjectIndex[triple.subject] = []; - if (depth > 0 && triple.subject.type === 'uri') { - this.load(triple.subject.value, { depth: depth - 1, proxy: proxy }); + if (depth > 0 && triple.subject.type === "uri") { + this.load(triple.subject.value, { + depth: depth - 1, + proxy: proxy, + }); } } if (this.propertyIndex[triple.property] === undefined) { this.propertyIndex[triple.property] = []; if (depth > 0) { - this.load(triple.property.value, { depth: depth - 1, proxy: proxy }); + this.load(triple.property.value, { + depth: depth - 1, + proxy: proxy, + }); } } if ($.inArray(triple, this.subjectIndex[triple.subject]) === -1) { this.tripleStore.push(triple); this.subjectIndex[triple.subject].push(triple); this.propertyIndex[triple.property].push(triple); - if (triple.object.type === 'uri' || triple.object.type === 'bnode') { + if ( + triple.object.type === "uri" || + triple.object.type === "bnode" + ) { if (this.objectIndex[triple.object] === undefined) { this.objectIndex[triple.object] = []; - if (depth > 0 && triple.object.type === 'uri') { - this.load(triple.object.value, { depth: depth - 1, proxy: proxy }); + if (depth > 0 && triple.object.type === "uri") { + this.load(triple.object.value, { + depth: depth - 1, + proxy: proxy, + }); } } this.objectIndex[triple.object].push(triple); @@ -1517,11 +1633,21 @@ */ remove: function (triple, options) { var base = (options && options.base) || this.base(), - namespaces = $.extend({}, this.prefix(), (options && options.namespaces) || {}), - striples, ptriples, otriples, + namespaces = $.extend( + {}, + this.prefix(), + (options && options.namespaces) || {}, + ), + striples, + ptriples, + otriples, databank; - if (typeof triple === 'string') { - triple = $.rdf.triple(triple, { namespaces: namespaces, base: base, source: triple }); + if (typeof triple === "string") { + triple = $.rdf.triple(triple, { + namespaces: namespaces, + base: base, + source: triple, + }); } this.tripleStore.splice($.inArray(triple, this.tripleStore), 1); striples = this.subjectIndex[triple.subject]; @@ -1532,7 +1658,7 @@ if (ptriples !== undefined) { ptriples.splice($.inArray(triple, ptriples), 1); } - if (triple.object.type === 'uri' || triple.object.type === 'bnode') { + if (triple.object.type === "uri" || triple.object.type === "bnode") { otriples = this.objectIndex[triple.object]; if (otriples !== undefined) { otriples.splice($.inArray(triple, otriples), 1); @@ -1576,7 +1702,8 @@ * @returns {jQuery} A {@link jQuery} object containing {@link jQuery.rdf.triple} objects. */ triples: function () { - var s, triples = []; + var s, + triples = []; if (this.union === undefined) { triples = this.tripleStore; } else { @@ -1604,7 +1731,11 @@ * @see jQuery.rdf#describe */ describe: function (resources) { - var i, r, t, rhash = {}, triples = []; + var i, + r, + t, + rhash = {}, + triples = []; while (resources.length > 0) { r = resources.pop(); if (rhash[r] === undefined) { @@ -1615,7 +1746,7 @@ for (i = 0; i < this.subjectIndex[r].length; i += 1) { t = this.subjectIndex[r][i]; triples.push(t); - if (t.object.type === 'bnode') { + if (t.object.type === "bnode") { resources.push(t.object); } } @@ -1624,7 +1755,7 @@ for (i = 0; i < this.objectIndex[r].length; i += 1) { t = this.objectIndex[r][i]; triples.push(t); - if (t.subject.type === 'bnode') { + if (t.subject.type === "bnode") { resources.push(t.subject); } } @@ -1642,7 +1773,10 @@ * @see jQuery.rdf.dump */ dump: function (options) { - options = $.extend({ namespaces: this.namespaces, base: this.base }, options || {}); + options = $.extend( + { namespaces: this.namespaces, base: this.base }, + options || {}, + ); return $.rdf.dump(this.triples(), options); }, @@ -1660,49 +1794,74 @@ * @see jQuery.rdf#load */ load: function (data, opts) { - var i, triples, url, script, parser, docElem, - format = (opts && opts.format), + var i, + triples, + url, + script, + parser, + docElem, + format = opts && opts.format, async = (opts && opts.async) || $.rdf.databank.defaults.async, success = (opts && opts.success) || $.rdf.databank.defaults.success, error = (opts && opts.error) || $.rdf.databank.defaults.error, proxy = (opts && opts.proxy) || $.rdf.databank.defaults.proxy, depth = (opts && opts.depth) || $.rdf.databank.defaults.depth; - url = (typeof data === 'string' && data.substring(1, 7) === 'http://') ? $.uri(data) : data; + url = + typeof data === "string" && data.substring(1, 7) === "http://" + ? $.uri(data) + : data; if (url.scheme) { if (!queue(this, url, { success: success, error: error })) { - script = ''; + script = + ''; if (async) { setTimeout("$('head').append('" + script + "')", 0); } else { - $('head').append(script); + $("head").append(script); } } return this; } else { if (format === undefined) { - if (typeof data === 'string') { - if (data.substring(0, 1) === '{') { - format = 'application/json'; - } else if (data.substring(0, 14) === '') }); */ fill: function (bindings) { var s = this.subject, p = this.property, o = this.object; - if (typeof s === 'string' && bindings[s.substring(1)]) { + if (typeof s === "string" && bindings[s.substring(1)]) { s = bindings[s.substring(1)]; } - if (typeof p === 'string' && bindings[p.substring(1)]) { + if (typeof p === "string" && bindings[p.substring(1)]) { p = bindings[p.substring(1)]; } - if (typeof o === 'string' && bindings[o.substring(1)]) { + if (typeof o === "string" && bindings[o.substring(1)]) { o = bindings[o.substring(1)]; } return $.rdf.pattern(s, p, o, { optional: this.optional }); @@ -1887,9 +2064,11 @@ * $.rdf.pattern('<> a foaf:Person', { namespaces: ns }).isFixed(); // true */ isFixed: function () { - return typeof this.subject !== 'string' && - typeof this.property !== 'string' && - typeof this.object !== 'string'; + return ( + typeof this.subject !== "string" && + typeof this.property !== "string" && + typeof this.object !== "string" + ); }, /** @@ -1899,9 +2078,9 @@ * @example * pattern = $.rdf.pattern('?thing a ?class'); * // triple is a new triple '<> a foaf:Person' - * triple = pattern.triple({ + * triple = pattern.triple({ * thing: $.rdf.resource('<>'), - * class: $.rdf.resource('foaf:Person', { namespaces: ns }) + * class: $.rdf.resource('foaf:Person', { namespaces: ns }) * }); */ triple: function (bindings) { @@ -1910,7 +2089,9 @@ t = this.fill(bindings); } if (t.isFixed()) { - return $.rdf.triple(t.subject, t.property, t.object, { source: this.toString() }); + return $.rdf.triple(t.subject, t.property, t.object, { + source: this.toString(), + }); } else { return null; } @@ -1921,8 +2102,8 @@ * @returns {String} */ toString: function () { - return this.subject + ' ' + this.property + ' ' + this.object; - } + return this.subject + " " + this.property + " " + this.object; + }, }; $.rdf.pattern.fn.init.prototype = $.rdf.pattern.fn; @@ -1930,7 +2111,7 @@ $.rdf.pattern.defaults = { base: $.uri.base(), namespaces: {}, - optional: false + optional: false, }; /** @@ -1945,8 +2126,8 @@ * @returns {jQuery.rdf.triple} The newly-created triple. * @throws {String} Errors if any of the strings are not in a recognised format. * @example pattern = $.rdf.triple('<>', $.rdf.type, 'foaf:Person', { namespaces: { foaf: "http://xmlns.com/foaf/0.1/" }}); - * @example - * pattern = $.rdf.triple('<> a foaf:Person', { + * @example + * pattern = $.rdf.triple('<> a foaf:Person', { * namespaces: { foaf: "http://xmlns.com/foaf/0.1/" } * }); * @see jQuery.rdf#add @@ -1960,7 +2141,7 @@ if (object === undefined) { options = property; m = $.trim(subject).match(tripleRegex); - if (m.length === 3 || (m.length === 4 && m[3] === '.')) { + if (m.length === 3 || (m.length === 4 && m[3] === ".")) { subject = m[0]; property = m[1]; object = m[2]; @@ -1968,19 +2149,23 @@ throw "Bad Triple: Couldn't parse string " + subject; } } - graph = (options && options.graph) || ''; - if (memTriple[graph] && - memTriple[graph][subject] && - memTriple[graph][subject][property] && - memTriple[graph][subject][property][object]) { + graph = (options && options.graph) || ""; + if ( + memTriple[graph] && + memTriple[graph][subject] && + memTriple[graph][subject][property] && + memTriple[graph][subject][property][object] + ) { return memTriple[graph][subject][property][object]; } triple = new $.rdf.triple.fn.init(subject, property, object, options); - graph = triple.graph || ''; - if (memTriple[graph] && - memTriple[graph][triple.subject] && - memTriple[graph][triple.subject][triple.property] && - memTriple[graph][triple.subject][triple.property][triple.object]) { + graph = triple.graph || ""; + if ( + memTriple[graph] && + memTriple[graph][triple.subject] && + memTriple[graph][triple.subject][triple.property] && + memTriple[graph][triple.subject][triple.property][triple.object] + ) { return memTriple[graph][triple.subject][triple.property][triple.object]; } else { if (memTriple[graph] === undefined) { @@ -2020,7 +2205,8 @@ * (Experimental) The named graph the triple belongs to. * @type jQuery.rdf.resource|jQuery.rdf.blank */ - this.graph = opts.graph === undefined ? undefined : subject(opts.graph, opts); + this.graph = + opts.graph === undefined ? undefined : subject(opts.graph, opts); /** * The source of the triple, which might be a node within the page (if the RDF is generated from the page) or a string holding the pattern that generated the triple. */ @@ -2062,8 +2248,8 @@ * @returns {String} */ toString: function () { - return this.subject + ' ' + this.property + ' ' + this.object + ' .'; - } + return this.subject + " " + this.property + " " + this.object + " ."; + }, }; $.rdf.triple.fn.init.prototype = $.rdf.triple.fn; @@ -2071,7 +2257,7 @@ $.rdf.triple.defaults = { base: $.uri.base(), source: [document], - namespaces: {} + namespaces: {}, }; /** @@ -2109,7 +2295,7 @@ * Always fixed to 'uri' for resources. * @type String */ - type: 'uri', + type: "uri", /** * The URI for the resource. * @type jQuery.rdf.uri @@ -2118,23 +2304,31 @@ init: function (value, options) { var m, prefix, uri, opts; - if (typeof value === 'string') { + if (typeof value === "string") { m = uriRegex.exec(value); opts = $.extend({}, $.rdf.resource.defaults, options); if (m !== null) { - this.value = $.uri.resolve(m[1].replace(/\\>/g, '>'), opts.base); - } else if (value.substring(0, 1) === ':') { - uri = opts.namespaces['']; + this.value = $.uri.resolve(m[1].replace(/\\>/g, ">"), opts.base); + } else if (value.substring(0, 1) === ":") { + uri = opts.namespaces[""]; if (uri === undefined) { - throw "Malformed Resource: No namespace binding for default namespace in " + value; + throw ( + "Malformed Resource: No namespace binding for default namespace in " + + value + ); } else { this.value = $.uri.resolve(uri + value.substring(1)); } - } else if (value.substring(value.length - 1) === ':') { + } else if (value.substring(value.length - 1) === ":") { prefix = value.substring(0, value.length - 1); uri = opts.namespaces[prefix]; if (uri === undefined) { - throw "Malformed Resource: No namespace binding for prefix " + prefix + " in " + value; + throw ( + "Malformed Resource: No namespace binding for prefix " + + prefix + + " in " + + value + ); } else { this.value = $.uri.resolve(uri); } @@ -2157,8 +2351,8 @@ */ dump: function () { return { - type: 'uri', - value: this.value.toString() + type: "uri", + value: this.value.toString(), }; }, @@ -2167,15 +2361,15 @@ * @returns {String} */ toString: function () { - return '<' + this.value + '>'; - } + return "<" + this.value + ">"; + }, }; $.rdf.resource.fn.init.prototype = $.rdf.resource.fn; $.rdf.resource.defaults = { base: $.uri.base(), - namespaces: {} + namespaces: {}, }; /** @@ -2183,49 +2377,49 @@ * @constant * @type jQuery.rdf.resource */ - $.rdf.type = $.rdf.resource('<' + rdfNs + 'type>'); + $.rdf.type = $.rdf.resource("<" + rdfNs + "type>"); /** * A {@link jQuery.rdf.resource} for rdfs:label * @constant * @type jQuery.rdf.resource */ - $.rdf.label = $.rdf.resource('<' + rdfsNs + 'label>'); + $.rdf.label = $.rdf.resource("<" + rdfsNs + "label>"); /** * A {@link jQuery.rdf.resource} for rdf:first * @constant * @type jQuery.rdf.resource */ - $.rdf.first = $.rdf.resource('<' + rdfNs + 'first>'); + $.rdf.first = $.rdf.resource("<" + rdfNs + "first>"); /** * A {@link jQuery.rdf.resource} for rdf:rest * @constant * @type jQuery.rdf.resource */ - $.rdf.rest = $.rdf.resource('<' + rdfNs + 'rest>'); + $.rdf.rest = $.rdf.resource("<" + rdfNs + "rest>"); /** * A {@link jQuery.rdf.resource} for rdf:nil * @constant * @type jQuery.rdf.resource */ - $.rdf.nil = $.rdf.resource('<' + rdfNs + 'nil>'); + $.rdf.nil = $.rdf.resource("<" + rdfNs + "nil>"); /** * A {@link jQuery.rdf.resource} for rdf:subject * @constant * @type jQuery.rdf.resource */ - $.rdf.subject = $.rdf.resource('<' + rdfNs + 'subject>'); + $.rdf.subject = $.rdf.resource("<" + rdfNs + "subject>"); /** * A {@link jQuery.rdf.resource} for rdf:property * @constant * @type jQuery.rdf.resource */ - $.rdf.property = $.rdf.resource('<' + rdfNs + 'property>'); + $.rdf.property = $.rdf.resource("<" + rdfNs + "property>"); /** * A {@link jQuery.rdf.resource} for rdf:object * @constant * @type jQuery.rdf.resource */ - $.rdf.object = $.rdf.resource('<' + rdfNs + 'object>'); + $.rdf.object = $.rdf.resource("<" + rdfNs + "object>"); /** *

          Creates a new jQuery.rdf.blank object. This should be invoked as a method rather than constructed using new; indeed you will not usually want to generate these objects directly, since they are automatically created from strings where necessary, such as by {@link jQuery.rdf#add}.

          @@ -2259,7 +2453,7 @@ * Always fixed to 'bnode' for blank nodes. * @type String */ - type: 'bnode', + type: "bnode", /** * The value of the blank node in the format _:id * @type String @@ -2272,14 +2466,18 @@ id: undefined, init: function (value) { - if (value === '[]') { + if (value === "[]") { this.id = blankNodeID(); - this.value = '_:' + this.id; - } else if (value.substring(0, 2) === '_:') { + this.value = "_:" + this.id; + } else if (value.substring(0, 2) === "_:") { this.id = value.substring(2); this.value = value; } else { - throw "Malformed Blank Node: " + value + " is not a legal format for a blank node"; + throw ( + "Malformed Blank Node: " + + value + + " is not a legal format for a blank node" + ); } return this; }, @@ -2290,8 +2488,8 @@ */ dump: function () { return { - type: 'bnode', - value: this.value + type: "bnode", + value: this.value, }; }, @@ -2301,7 +2499,7 @@ */ toString: function () { return this.value; - } + }, }; $.rdf.blank.fn.init.prototype = $.rdf.blank.fn; @@ -2344,7 +2542,7 @@ * Always fixed to 'literal' for literals. * @type String */ - type: 'literal', + type: "literal", /** * The value of the literal as a string. * @type String @@ -2362,39 +2560,54 @@ datatype: undefined, init: function (value, options) { - var - m, datatype, + var m, + datatype, opts = $.extend({}, $.rdf.literal.defaults, options); datatype = $.safeCurie(opts.datatype, { namespaces: opts.namespaces }); - if (opts.lang !== undefined && opts.datatype !== undefined && datatype.toString() !== (rdfNs + 'XMLLiteral')) { - throw "Malformed Literal: Cannot define both a language and a datatype for a literal (" + value + ")"; + if ( + opts.lang !== undefined && + opts.datatype !== undefined && + datatype.toString() !== rdfNs + "XMLLiteral" + ) { + throw ( + "Malformed Literal: Cannot define both a language and a datatype for a literal (" + + value + + ")" + ); } if (opts.datatype !== undefined) { datatype = $.safeCurie(opts.datatype, { namespaces: opts.namespaces }); $.extend(this, $.typedValue(value.toString(), datatype)); - if (datatype.toString() === rdfNs + 'XMLLiteral') { + if (datatype.toString() === rdfNs + "XMLLiteral") { this.lang = opts.lang; } } else if (opts.lang !== undefined) { this.value = value.toString(); this.lang = opts.lang; - } else if (typeof value === 'boolean') { - $.extend(this, $.typedValue(value.toString(), xsdNs + 'boolean')); - } else if (typeof value === 'number') { - $.extend(this, $.typedValue(value.toString(), xsdNs + 'double')); - } else if (value === 'true' || value === 'false') { - $.extend(this, $.typedValue(value, xsdNs + 'boolean')); - } else if ($.typedValue.valid(value, xsdNs + 'integer')) { - $.extend(this, $.typedValue(value, xsdNs + 'integer')); - } else if ($.typedValue.valid(value, xsdNs + 'decimal')) { - $.extend(this, $.typedValue(value, xsdNs + 'decimal')); - } else if ($.typedValue.valid(value, xsdNs + 'double') && - !/^\s*([\-\+]?INF|NaN)\s*$/.test(value)) { // INF, -INF and NaN aren't valid literals in Turtle - $.extend(this, $.typedValue(value, xsdNs + 'double')); + } else if (typeof value === "boolean") { + $.extend(this, $.typedValue(value.toString(), xsdNs + "boolean")); + } else if (typeof value === "number") { + $.extend(this, $.typedValue(value.toString(), xsdNs + "double")); + } else if (value === "true" || value === "false") { + $.extend(this, $.typedValue(value, xsdNs + "boolean")); + } else if ($.typedValue.valid(value, xsdNs + "integer")) { + $.extend(this, $.typedValue(value, xsdNs + "integer")); + } else if ($.typedValue.valid(value, xsdNs + "decimal")) { + $.extend(this, $.typedValue(value, xsdNs + "decimal")); + } else if ( + $.typedValue.valid(value, xsdNs + "double") && + !/^\s*([\-\+]?INF|NaN)\s*$/.test(value) + ) { + // INF, -INF and NaN aren't valid literals in Turtle + $.extend(this, $.typedValue(value, xsdNs + "double")); } else { m = literalRegex.exec(value); if (m !== null) { - this.value = (m[2] || m[4]).replace(/\\"/g, '"').replace(/\\n/g, '\n').replace(/\\t/g, '\t').replace(/\\r/g, '\r'); + this.value = (m[2] || m[4]) + .replace(/\\"/g, '"') + .replace(/\\n/g, "\n") + .replace(/\\t/g, "\t") + .replace(/\\r/g, "\r"); if (m[9]) { datatype = $.rdf.resource(m[9], opts); $.extend(this, $.typedValue(this.value, datatype.value)); @@ -2414,8 +2627,8 @@ */ dump: function () { var e = { - type: 'literal', - value: this.value.toString() + type: "literal", + value: this.value.toString(), }; if (this.lang !== undefined) { e.lang = this.lang; @@ -2424,7 +2637,7 @@ } return e; }, - + /** * Returns a string representing this resource in Turtle format. * @returns {String} @@ -2432,12 +2645,12 @@ toString: function () { var val = '"' + this.value + '"'; if (this.lang !== undefined) { - val += '@' + this.lang; + val += "@" + this.lang; } else if (this.datatype !== undefined) { - val += '^^<' + this.datatype + '>'; + val += "^^<" + this.datatype + ">"; } return val; - } + }, }; $.rdf.literal.fn.init.prototype = $.rdf.literal.fn; @@ -2446,7 +2659,6 @@ base: $.uri.base(), namespaces: {}, datatype: undefined, - lang: undefined + lang: undefined, }; - })(jQuery); diff --git a/r2redit/src/lib/jquery.rdf.turtle.js b/r2redit/src/lib/jquery.rdf.turtle.js index dcf52db..971ca13 100644 --- a/r2redit/src/lib/jquery.rdf.turtle.js +++ b/r2redit/src/lib/jquery.rdf.turtle.js @@ -27,132 +27,144 @@ * @ignore */ (function ($) { - var - wsRegex = /^(\u0009|\u000A|\u000D|\u0020|#([^\u000A\u000D])*)+/, - nameStartChars = 'A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD', // can't include \u10000-\uEFFFF - nameChars = '-' + nameStartChars + '0-9\u00B7\u0300-\u036F\u203F-\u2040', - nameRegex = new RegExp('^[' + nameStartChars + '][' + nameChars + ']*'), - uriRegex = /^(\\u[0-9A-F]{4}|\\U[0-9A-F]{8}|\\\\|\\>|[\u0020-\u003D\u003F-\u005B\u005D-\u10FFFF])*/, + var wsRegex = /^(\u0009|\u000A|\u000D|\u0020|#([^\u000A\u000D])*)+/, + nameStartChars = + "A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD", // can't include \u10000-\uEFFFF + nameChars = "-" + nameStartChars + "0-9\u00B7\u0300-\u036F\u203F-\u2040", + nameRegex = new RegExp("^[" + nameStartChars + "][" + nameChars + "]*"), + uriRegex = + /^(\\u[0-9A-F]{4}|\\U[0-9A-F]{8}|\\\\|\\>|[\u0020-\u003D\u003F-\u005B\u005D-\u10FFFF])*/, booleanRegex = /^(true|false)[\s\.;,)\]]/, - doubleRegex = /^(-|\+)?([0-9]+\.[0-9]*[eE](-|\+)?[0-9]+|\.[0-9]+[eE](-|\+)?[0-9]+|[0-9]+[eE](-|\+)?[0-9]+)/, + doubleRegex = + /^(-|\+)?([0-9]+\.[0-9]*[eE](-|\+)?[0-9]+|\.[0-9]+[eE](-|\+)?[0-9]+|[0-9]+[eE](-|\+)?[0-9]+)/, decimalRegex = /^(-|\+)?(([0-9]+\.[0-9]*)|(\.[0-9]))+/, integerRegex = /^(-|\+)?[0-9]+/, - stringRegex = /^(\\u[0-9A-F]{4}|\\U[0-9A-F]{8}|\\\\|[\u0020-\u0021\u0023-\u005B]|[\u005D-\u10FFFF]|\\t|\\n|\\r|\\")*/, - longStringRegex = /^(\\u[0-9A-F]{4}|\\U[0-9A-F]{8}|\\\\|[\u0020-\u0021\u0023-\u005B]|[\u005D-\u10FFFF]|\\t|\\n|\\r|\\"|\u0009|\u000A|\u000D|"[^"]|""[^"])*/, + stringRegex = + /^(\\u[0-9A-F]{4}|\\U[0-9A-F]{8}|\\\\|[\u0020-\u0021\u0023-\u005B]|[\u005D-\u10FFFF]|\\t|\\n|\\r|\\")*/, + longStringRegex = + /^(\\u[0-9A-F]{4}|\\U[0-9A-F]{8}|\\\\|[\u0020-\u0021\u0023-\u005B]|[\u005D-\u10FFFF]|\\t|\\n|\\r|\\"|\u0009|\u000A|\u000D|"[^"]|""[^"])*/, languageRegex = /^[a-z]+(-[a-z0-9]+)*/, - log = function (message) { //console.log(message); }, - unescape = function (string) { - return string.replace(/(\\u([0-9A-F]{4}))|(\\U([0-9A-F]{4})([0-9A-F]{4}))/g, function (m, u4, u4h, u8, u8h1, u8h2) { - if (u4 !== undefined) { - return String.fromCharCode(parseInt(u4h, 16)); - } else { - return String.fromCharCode(parseInt(u8h1, 16)) + String.fromCharCode(parseInt(u8h2, 16)); - } - }); + return string.replace( + /(\\u([0-9A-F]{4}))|(\\U([0-9A-F]{4})([0-9A-F]{4}))/g, + function (m, u4, u4h, u8, u8h1, u8h2) { + if (u4 !== undefined) { + return String.fromCharCode(parseInt(u4h, 16)); + } else { + return ( + String.fromCharCode(parseInt(u8h1, 16)) + + String.fromCharCode(parseInt(u8h2, 16)) + ); + } + }, + ); }, - require = function (data, str) { if (data.substring(0, str.length) === str) { return data.substring(str.length); } else { - throw "Invalid Turtle: Expecting '" + str + "', found '" + data.substring(0, 20) + "...'"; + throw ( + "Invalid Turtle: Expecting '" + + str + + "', found '" + + data.substring(0, 20) + + "...'" + ); } }, - ws = function (data, opts) { var required; opts = opts || {}; required = opts.required || false; if (required && !wsRegex.test(data)) { - throw("Invalid Turtle: Required whitespace is missing!"); + throw "Invalid Turtle: Required whitespace is missing!"; } - return data.replace(wsRegex, ''); + return data.replace(wsRegex, ""); }, - uriref = function (data, opts) { var uri; - log('uriref: ' + data); - data = require(data, '<'); + log("uriref: " + data); + data = require(data, "<"); uri = uriRegex.exec(data)[0]; data = data.substring(uri.length); - data = require(data, '>'); + data = require(data, ">"); return { remainder: data, - uri: $.uri.resolve(uri, opts.base) + uri: $.uri.resolve(uri, opts.base), }; }, - name = function (data, opts) { var result; - log('name: ' + data); + log("name: " + data); if (nameRegex.test(data)) { result = nameRegex.exec(data); return { name: result[0], - remainder: data.substring(result[0].length) + remainder: data.substring(result[0].length), }; } else { return { - name: '', - remainder: data - } + name: "", + remainder: data, + }; } }, - prefixName = function (data, opts) { var n = name(data, opts); - log('prefixName: ' + data); - if (n.name.substring(0, 1) === '_') { - throw "Invalid Turtle: Prefix must not start with an underscore: " + name; + log("prefixName: " + data); + if (n.name.substring(0, 1) === "_") { + throw ( + "Invalid Turtle: Prefix must not start with an underscore: " + name + ); } else { return { prefix: n.name, - remainder: n.remainder + remainder: n.remainder, }; } }, - directive = function (data, opts) { var parsed, prefix, uri; - log('directive: ' + data); - if (data.substring(0, 7) === '@prefix') { + log("directive: " + data); + if (data.substring(0, 7) === "@prefix") { data = data.substring(7); data = ws(data, { required: true }); parsed = prefixName(data, opts); prefix = parsed.prefix; data = parsed.remainder; data = ws(data); - data = require(data, ':'); + data = require(data, ":"); data = ws(data); parsed = uriref(data, opts); opts.namespaces[prefix] = parsed.uri; data = parsed.remainder; - } else if (data.substring(0, 5) === '@base') { - data = require(data, '@base'); + } else if (data.substring(0, 5) === "@base") { + data = require(data, "@base"); data = ws(data, { required: true }); parsed = uriref(data, opts); opts.base = parsed.uri; data = parsed.remainder; } else { - throw ("Invalid Turtle: Unrecognised directive: " + data); + throw "Invalid Turtle: Unrecognised directive: " + data; } data = ws(data); - data = require(data, '.'); + data = require(data, "."); return { remainder: data, opts: opts, - triples: [] + triples: [], }; }, - itemList = function (data, opts) { - var parsed, items = [], triples = [], first = data.substring(0, 1); - log('itemList: ' + data); - while (first !== ')') { + var parsed, + items = [], + triples = [], + first = data.substring(0, 1); + log("itemList: " + data); + while (first !== ")") { parsed = object(data, opts); data = parsed.remainder; items.push(parsed.object); @@ -163,104 +175,111 @@ return { remainder: data, items: items, - triples: triples + triples: triples, }; }, - collection = function (data, opts) { - var parsed, i, items, triples, list, rest = $.rdf.nil; - log('collection: ' + data); - data = require(data, '('); + var parsed, + i, + items, + triples, + list, + rest = $.rdf.nil; + log("collection: " + data); + data = require(data, "("); data = ws(data); parsed = itemList(data, opts); data = parsed.remainder; items = parsed.items; triples = parsed.triples; for (i = items.length - 1; i >= 0; i -= 1) { - list = $.rdf.blank('[]'); + list = $.rdf.blank("[]"); triples.push($.rdf.triple(list, $.rdf.first, items[i])); triples.push($.rdf.triple(list, $.rdf.rest, rest)); rest = list; } data = ws(data); - data = require(data, ')'); + data = require(data, ")"); return { remainder: data, collection: rest, - triples: triples + triples: triples, }; }, - blank = function (data, opts) { - var parsed, bnode, first = data.substring(0, 1); - log('blank: ' + data); - if (first === '_') { - data = require(data, '_:'); + var parsed, + bnode, + first = data.substring(0, 1); + log("blank: " + data); + if (first === "_") { + data = require(data, "_:"); parsed = name(data, opts); return { remainder: parsed.remainder, - blank: $.rdf.blank('_:' + parsed.name), - triples: [] - } - } else if (first === '(') { + blank: $.rdf.blank("_:" + parsed.name), + triples: [], + }; + } else if (first === "(") { parsed = collection(data, opts); return { remainder: parsed.remainder, blank: parsed.collection, - triples: parsed.triples + triples: parsed.triples, }; - } else if (data.substring(0, 2) === '[]') { + } else if (data.substring(0, 2) === "[]") { return { remainder: data.substring(2), - blank: $.rdf.blank('[]'), - triples: [] + blank: $.rdf.blank("[]"), + triples: [], }; } else { - bnode = $.rdf.blank('[]'); + bnode = $.rdf.blank("[]"); opts.subject.unshift(bnode); - data = require(data, '['); + data = require(data, "["); data = ws(data); parsed = predicateObjectList(data, opts); data = parsed.remainder; data = ws(data); - data = require(data, ']'); + data = require(data, "]"); opts.subject.shift(); return { remainder: data, blank: bnode, - triples: parsed.triples + triples: parsed.triples, }; } }, - subject = function (data, opts) { - var parsed, first = data.substring(0, 1); - log('subject: ' + data); - if (first === '[' || first === '_' || first === '(') { + var parsed, + first = data.substring(0, 1); + log("subject: " + data); + if (first === "[" || first === "_" || first === "(") { parsed = blank(data, opts); return { remainder: parsed.remainder, subject: parsed.blank, - triples: parsed.triples + triples: parsed.triples, }; } else { parsed = resource(data, opts); return { remainder: parsed.remainder, subject: parsed.resource, - triples: [] + triples: [], }; } }, - resource = function (data, opts) { - var parsed, prefix, local, first = data.substring(0, 1); - log('resource: ' + data); - if (first === '<') { + var parsed, + prefix, + local, + first = data.substring(0, 1); + log("resource: " + data); + if (first === "<") { parsed = uriref(data, opts); return { remainder: parsed.remainder, - resource: $.rdf.resource(parsed.uri, opts.base) + resource: $.rdf.resource(parsed.uri, opts.base), }; } else { try { @@ -268,35 +287,37 @@ prefix = parsed.prefix; data = parsed.remainder; } catch (e) { - prefix = ''; + prefix = ""; } - data = require(data, ':'); + data = require(data, ":"); parsed = name(data, opts); local = parsed.name; return { remainder: parsed.remainder, - resource: $.rdf.resource(prefix + ':' + local, { namespaces: opts.namespaces, base: opts.base }) + resource: $.rdf.resource(prefix + ":" + local, { + namespaces: opts.namespaces, + base: opts.base, + }), }; } }, - quotedString = function (data, opts) { var str; - log('quotedString: ' + data); + log("quotedString: " + data); if (data.substring(0, 3) === '"""') { data = require(data, '"""'); str = longStringRegex.exec(data)[0]; data = data.substring(str.length); str = str - .replace(/\n/g, '\\n') - .replace(/\t/g, '\\t') - .replace(/\r/g, '\\r') + .replace(/\n/g, "\\n") + .replace(/\t/g, "\\t") + .replace(/\r/g, "\\r") .replace(/\\"/g, '"'); str = unescape(str); data = require(data, '"""'); return { remainder: data, - string: str + string: str, }; } else { data = require(data, '"'); @@ -307,47 +328,53 @@ data = require(data, '"'); return { remainder: data, - string: str + string: str, }; } }, - language = function (data, opts) { var lang; - log('language: ' + data); + log("language: " + data); lang = languageRegex.exec(data)[0]; return { remainder: data.substring(lang.length), - language: lang - } + language: lang, + }; }, - literal = function (data, opts) { var first, str; - log('literal: ' + data); + log("literal: " + data); if (booleanRegex.test(data)) { str = booleanRegex.exec(data)[1]; return { remainder: data.substring(str.length), - literal: $.rdf.literal(str, { datatype: 'http://www.w3.org/2001/XMLSchema#boolean' }) - } + literal: $.rdf.literal(str, { + datatype: "http://www.w3.org/2001/XMLSchema#boolean", + }), + }; } else if (doubleRegex.test(data)) { str = doubleRegex.exec(data)[0]; return { remainder: data.substring(str.length), - literal: $.rdf.literal(str, { datatype: 'http://www.w3.org/2001/XMLSchema#double' }) + literal: $.rdf.literal(str, { + datatype: "http://www.w3.org/2001/XMLSchema#double", + }), }; } else if (decimalRegex.test(data)) { str = decimalRegex.exec(data)[0]; return { remainder: data.substring(str.length), - literal: $.rdf.literal(str, { datatype: 'http://www.w3.org/2001/XMLSchema#decimal' }) + literal: $.rdf.literal(str, { + datatype: "http://www.w3.org/2001/XMLSchema#decimal", + }), }; } else if (integerRegex.test(data)) { str = integerRegex.exec(data)[0]; return { remainder: data.substring(str.length), - literal: $.rdf.literal(str, { datatype: 'http://www.w3.org/2001/XMLSchema#integer' }) + literal: $.rdf.literal(str, { + datatype: "http://www.w3.org/2001/XMLSchema#integer", + }), }; } else { parsed = quotedString(data, opts); @@ -355,62 +382,63 @@ str = parsed.string; data = ws(data); first = data.substring(0, 1); - if (first === '^') { - data = require(data, '^^'); + if (first === "^") { + data = require(data, "^^"); data = ws(data); parsed = resource(data, opts); return { remainder: parsed.remainder, - literal: $.rdf.literal(str, { datatype: parsed.resource.value }) + literal: $.rdf.literal(str, { datatype: parsed.resource.value }), }; - } else if (first === '@') { - data = require(data, '@'); + } else if (first === "@") { + data = require(data, "@"); data = ws(data); parsed = language(data, opts); return { remainder: parsed.remainder, - literal: $.rdf.literal(str, { lang: parsed.language }) + literal: $.rdf.literal(str, { lang: parsed.language }), }; } else { return { remainder: data, - literal: $.rdf.literal('"' + str.replace(/"/g, '\\"') + '"') + literal: $.rdf.literal('"' + str.replace(/"/g, '\\"') + '"'), }; } } }, - verb = function (data, opts) { - var parsed, first = data.substring(0, 1); - log('verb: ' + data); + var parsed, + first = data.substring(0, 1); + log("verb: " + data); try { parsed = resource(data, opts); return { remainder: parsed.remainder, - verb: parsed.resource + verb: parsed.resource, }; } catch (e) { - if (first === 'a') { + if (first === "a") { data = ws(data.substring(1), { required: true }); return { remainder: data, - verb: $.rdf.type + verb: $.rdf.type, }; } else { throw e; } } }, - object = function (data, opts) { - var parsed, o, first = data.substring(0, 1); - log('object: ' + data); - if (first === '[' || first === '_' || first === '(') { + var parsed, + o, + first = data.substring(0, 1); + log("object: " + data); + if (first === "[" || first === "_" || first === "(") { parsed = blank(data, opts); return { remainder: parsed.remainder, object: parsed.blank, - triples: parsed.triples + triples: parsed.triples, }; } else { try { @@ -418,22 +446,25 @@ return { remainder: parsed.remainder, object: parsed.literal, - triples: [] + triples: [], }; } catch (e) { parsed = resource(data, opts); return { remainder: parsed.remainder, object: parsed.resource, - triples: [] + triples: [], }; } } }, - objectList = function (data, opts) { - var parsed, obj, triple, triples = [], first = data.substring(0, 1); - log('objectList: ' + data); + var parsed, + obj, + triple, + triples = [], + first = data.substring(0, 1); + log("objectList: " + data); do { parsed = object(data, opts); data = parsed.remainder; @@ -442,23 +473,26 @@ triples.push(triple); data = ws(data); first = data.substring(0, 1); - if (first === ',') { - data = require(data, ','); + if (first === ",") { + data = require(data, ","); data = ws(data); first = data.substring(0, 1); } else { break; } - } while (first !== ']' && first !== ';' && first !== '.'); + } while (first !== "]" && first !== ";" && first !== "."); return { remainder: data, - triples: triples + triples: triples, }; }, - predicateObjectList = function (data, opts) { - var parsed, property, objects, triples = [], first = data.substring(0, 1); - log('predicateObjectList: ' + data); + var parsed, + property, + objects, + triples = [], + first = data.substring(0, 1); + log("predicateObjectList: " + data); do { parsed = verb(data, opts); data = parsed.remainder; @@ -471,23 +505,23 @@ opts.verb.shift(); data = ws(data); first = data.substring(0, 1); - if (first === ';') { - data = require(data, ';'); + if (first === ";") { + data = require(data, ";"); data = ws(data); first = data.substring(0, 1); } else { break; } - } while (first !== ']' && first !== '.'); + } while (first !== "]" && first !== "."); return { remainder: data, - triples: triples + triples: triples, }; }, - triples = function (data, opts) { - var parsed, triples = []; - log('triples: ' + data); + var parsed, + triples = []; + log("triples: " + data); parsed = subject(data, opts); data = parsed.remainder; opts.subject.unshift(parsed.subject); @@ -496,137 +530,143 @@ parsed = predicateObjectList(data, opts); opts.subject.shift(); data = ws(parsed.remainder); - data = require(data, '.'); + data = require(data, "."); return { remainder: data, opts: opts, - triples: triples.concat(parsed.triples) + triples: triples.concat(parsed.triples), }; }, - statement = function (data, opts) { var first, parsed; - log('statement: ' + data); + log("statement: " + data); data = ws(data); if (data.length === 0) { - return { remainder: '', opts: opts, triples: [] }; + return { remainder: "", opts: opts, triples: [] }; } else { first = data.substring(0, 1); - if (first === '@') { + if (first === "@") { return directive(data, opts); } else { return triples(data, opts); } } }, - parseTurtle = function (data, opts) { - var base, ns = {}, parsed = {}, triples = []; + var base, + ns = {}, + parsed = {}, + triples = []; opts = opts || {}; opts.namespaces = {}; opts.base = opts.base || $.uri.base(); opts.subject = []; opts.verb = []; - while (data !== '') { - log('parseTurtle: ' + data); + while (data !== "") { + log("parseTurtle: " + data); parsed = statement(data, opts); data = parsed.remainder; opts = parsed.opts; triples = triples.concat(parsed.triples); - } + } return triples; }, - createTurtle = function (triples, options) { - var dump = $.rdf.parsers['application/json'].dump(triples), + var dump = $.rdf.parsers["application/json"].dump(triples), namespaces = options.namespaces || {}, indent = options.indent || false, - firstP, prefix, - s, p, v, i, - result = ''; + firstP, + prefix, + s, + p, + v, + i, + result = ""; for (prefix in namespaces) { - result += '@prefix ' + prefix + ': <' + namespaces[prefix] + '> . '; + result += "@prefix " + prefix + ": <" + namespaces[prefix] + "> . "; if (indent) { - result += '\n'; + result += "\n"; } } for (s in dump) { if (indent) { - result += '\n'; + result += "\n"; } - if (s.substring(0, 2) === '_:') { + if (s.substring(0, 2) === "_:") { result += s; } else { try { result += $.createCurie(s, { namespaces: namespaces }); } catch (e) { - result += '<' + s + '>'; + result += "<" + s + ">"; } } - result += ' '; + result += " "; firstP = true; for (p in dump[s]) { if (indent) { - result += '\n '; + result += "\n "; } firstP = false; if (p === $.rdf.type.value.toString()) { - result += 'a'; + result += "a"; } else { try { result += $.createCurie(p, { namespaces: namespaces }); } catch (f) { - result += '<' + p + '>'; + result += "<" + p + ">"; } } - result += ' '; + result += " "; for (i = 0; i < dump[s][p].length; i += 1) { if (i > 0 && indent) { - result += '\n '; + result += "\n "; } v = dump[s][p][i]; - if (v.type === 'uri') { + if (v.type === "uri") { try { result += $.createCurie(v.value, { namespaces: namespaces }); } catch (g) { - result += '<' + v.value + '>'; + result += "<" + v.value + ">"; } - } else if (v.type === 'bnode') { + } else if (v.type === "bnode") { result += v.value; } else { /* cb */ if (v.value.indexOf("\n") === -1) { - result += '"' + v.value + '"'; + result += '"' + v.value + '"'; } else { - result += '"""' + v.value + '"""'; + result += '"""' + v.value + '"""'; } if (v.lang) { - result += '@' + v.lang; + result += "@" + v.lang; } if (v.datatype) { - result += '^^'; + result += "^^"; try { - result += $.createCurie(v.datatype, { namespaces: namespaces }); + result += $.createCurie(v.datatype, { + namespaces: namespaces, + }); } catch (h) { - result += '<' + v.datatype + '>'; + result += "<" + v.datatype + ">"; } } } - result += ' , '; + result += " , "; } result = result.substring(0, result.length - 3); - result += ' ; '; + result += " ; "; } result = result.substring(0, result.length - 3); - result += ' . '; + result += " . "; if (indent) { - result += '\n'; + result += "\n"; } } return result; }; - $.rdf.parsers['text/turtle'] = { + $.rdf.parsers["text/turtle"] = { parse: function (data) { return data; }, @@ -634,7 +674,6 @@ return dump; }, triples: parseTurtle, - dump: createTurtle + dump: createTurtle, }; - })(jQuery); diff --git a/r2redit/src/lib/jquery.rdf.xml.js b/r2redit/src/lib/jquery.rdf.xml.js index 781cb7e..f42901c 100644 --- a/r2redit/src/lib/jquery.rdf.xml.js +++ b/r2redit/src/lib/jquery.rdf.xml.js @@ -27,9 +27,7 @@ * @ignore */ (function ($) { - var - rdfNs = "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - + var rdfNs = "http://www.w3.org/1999/02/22-rdf-syntax-ns#", addAttribute = function (parent, namespace, name, value) { var doc = parent.ownerDocument, a; @@ -50,27 +48,35 @@ } return parent; }, - createXmlnsAtt = function (parent, namespace, prefix) { - if (namespace === 'http://www.w3.org/XML/1998/namespace' || namespace === 'http://www.w3.org/2000/xmlns/') { + if ( + namespace === "http://www.w3.org/XML/1998/namespace" || + namespace === "http://www.w3.org/2000/xmlns/" + ) { } else if (prefix) { - addAttribute(parent, 'http://www.w3.org/2000/xmlns/', 'xmlns:' + prefix, namespace); + addAttribute( + parent, + "http://www.w3.org/2000/xmlns/", + "xmlns:" + prefix, + namespace, + ); } else { - addAttribute(parent, undefined, 'xmlns', namespace); + addAttribute(parent, undefined, "xmlns", namespace); } return parent; }, - createDocument = function (namespace, name) { - var doc, xmlns = '', prefix, addAttribute = false; + var doc, + xmlns = "", + prefix, + addAttribute = false; if (namespace !== undefined && namespace !== null) { if (/:/.test(name)) { prefix = /([^:]+):/.exec(name)[1]; } addAttribute = true; } - if (document.implementation && - document.implementation.createDocument) { + if (document.implementation && document.implementation.createDocument) { doc = document.implementation.createDocument(namespace, name, null); if (addAttribute) { createXmlnsAtt(doc.documentElement, namespace, prefix); @@ -82,33 +88,33 @@ if (prefix === undefined) { xmlns = ' xmlns="' + namespace + '"'; } else { - xmlns = ' xmlns:' + prefix + '="' + namespace + '"'; + xmlns = " xmlns:" + prefix + '="' + namespace + '"'; } - doc.loadXML('<' + name + xmlns + '/>'); + doc.loadXML("<" + name + xmlns + "/>"); return doc; } }, - appendElement = function (parent, namespace, name, indent) { var doc = parent.ownerDocument, e; if (namespace !== undefined && namespace !== null) { - e = doc.createElementNS ? doc.createElementNS(namespace, name) : doc.createNode(1, name, namespace); + e = doc.createElementNS + ? doc.createElementNS(namespace, name) + : doc.createNode(1, name, namespace); } else { e = doc.createElement(name); } if (indent !== -1) { - appendText(parent, '\n'); + appendText(parent, "\n"); if (indent === 0) { - appendText(parent, '\n'); + appendText(parent, "\n"); } else { - appendText(parent, ' '); + appendText(parent, " "); } } parent.appendChild(e); return e; }, - appendText = function (parent, text) { var doc = parent.ownerDocument, t; @@ -116,30 +122,37 @@ parent.appendChild(t); return parent; }, - appendXML = function (parent, xml) { var parser, doc, i, child; try { - doc = new ActiveXObject('Microsoft.XMLDOM'); + doc = new ActiveXObject("Microsoft.XMLDOM"); doc.async = "false"; - doc.loadXML('' + xml + ''); - } catch(e) { + doc.loadXML("" + xml + ""); + } catch (e) { parser = new DOMParser(); - doc = parser.parseFromString('' + xml + '', 'text/xml'); + doc = parser.parseFromString("" + xml + "", "text/xml"); } for (i = 0; i < doc.documentElement.childNodes.length; i += 1) { parent.appendChild(doc.documentElement.childNodes[i].cloneNode(true)); } return parent; }, - createRdfXml = function (triples, options) { - var doc = createDocument(rdfNs, 'rdf:RDF'), - dump = $.rdf.parsers['application/json'].dump(triples), + var doc = createDocument(rdfNs, "rdf:RDF"), + dump = $.rdf.parsers["application/json"].dump(triples), namespaces = options.namespaces || {}, indent = options.indent || false, - n, s, se, p, pe, i, v, - m, local, ns, prefix; + n, + s, + se, + p, + pe, + i, + v, + m, + local, + ns, + prefix; for (n in namespaces) { createXmlnsAtt(doc.documentElement, namespaces[n], n); } @@ -154,14 +167,24 @@ break; } } - se = appendElement(doc.documentElement, ns, prefix + ':' + local, indent ? 0 : -1); + se = appendElement( + doc.documentElement, + ns, + prefix + ":" + local, + indent ? 0 : -1, + ); } else { - se = appendElement(doc.documentElement, rdfNs, 'rdf:Description', indent ? 0 : -1); + se = appendElement( + doc.documentElement, + rdfNs, + "rdf:Description", + indent ? 0 : -1, + ); } if (/^_:/.test(s)) { - addAttribute(se, rdfNs, 'rdf:nodeID', s.substring(2)); + addAttribute(se, rdfNs, "rdf:nodeID", s.substring(2)); } else { - addAttribute(se, rdfNs, 'rdf:about', s); + addAttribute(se, rdfNs, "rdf:about", s); } for (p in dump[s]) { if (p !== $.rdf.type.value.toString() || dump[s][p].length > 1) { @@ -174,63 +197,73 @@ break; } } - for (i = (p === $.rdf.type.value.toString() ? 1 : 0); i < dump[s][p].length; i += 1) { + for ( + i = p === $.rdf.type.value.toString() ? 1 : 0; + i < dump[s][p].length; + i += 1 + ) { v = dump[s][p][i]; - pe = appendElement(se, ns, prefix + ':' + local, indent ? 1 : -1); - if (v.type === 'uri') { - addAttribute(pe, rdfNs, 'rdf:resource', v.value); - } else if (v.type === 'literal') { + pe = appendElement(se, ns, prefix + ":" + local, indent ? 1 : -1); + if (v.type === "uri") { + addAttribute(pe, rdfNs, "rdf:resource", v.value); + } else if (v.type === "literal") { if (v.datatype !== undefined) { - if (v.datatype === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') { - addAttribute(pe, rdfNs, 'rdf:parseType', 'Literal'); + if ( + v.datatype === + "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral" + ) { + addAttribute(pe, rdfNs, "rdf:parseType", "Literal"); if (indent) { - appendText(pe, '\n '); + appendText(pe, "\n "); } appendXML(pe, v.value); if (indent) { - appendText(pe, '\n '); + appendText(pe, "\n "); } } else { - addAttribute(pe, rdfNs, 'rdf:datatype', v.datatype); + addAttribute(pe, rdfNs, "rdf:datatype", v.datatype); appendText(pe, v.value); } } else if (v.lang !== undefined) { - addAttribute(pe, 'http://www.w3.org/XML/1998/namespace', 'xml:lang', v.lang); + addAttribute( + pe, + "http://www.w3.org/XML/1998/namespace", + "xml:lang", + v.lang, + ); appendText(pe, v.value); } else { appendText(pe, v.value); } } else { // blank node - addAttribute(pe, rdfNs, 'rdf:nodeID', v.value.substring(2)); + addAttribute(pe, rdfNs, "rdf:nodeID", v.value.substring(2)); } } if (indent) { - appendText(se, '\n'); + appendText(se, "\n"); } } } } if (indent) { - appendText(doc.documentElement, '\n\n'); + appendText(doc.documentElement, "\n\n"); } return doc; }, - getDefaultNamespacePrefix = function (namespaceUri) { switch (namespaceUri) { - case 'http://www.w3.org/1999/02/22-rdf-syntax-ns': - return 'rdf'; - case 'http://www.w3.org/XML/1998/namespace': - return 'xml'; - case 'http://www.w3.org/2000/xmlns/': - return 'xmlns'; + case "http://www.w3.org/1999/02/22-rdf-syntax-ns": + return "rdf"; + case "http://www.w3.org/XML/1998/namespace": + return "xml"; + case "http://www.w3.org/2000/xmlns/": + return "xmlns"; default: - throw ('No default prefix mapped for namespace ' + namespaceUri); + throw "No default prefix mapped for namespace " + namespaceUri; } }, - - hasAttributeNS = function(elem, namespace, name){ + hasAttributeNS = function (elem, namespace, name) { var basename; if (elem.hasAttributeNS) { return elem.hasAttributeNS(namespace, name); @@ -239,75 +272,110 @@ basename = /:/.test(name) ? /:(.+)$/.exec(name)[1] : name; return elem.attributes.getQualifiedItem(basename, namespace) !== null; } catch (e) { - return elem.getAttribute(getDefaultNamespacePrefix(namespace) + ':' + name) !== null; + return ( + elem.getAttribute( + getDefaultNamespacePrefix(namespace) + ":" + name, + ) !== null + ); } } }, - - getAttributeNS = function(elem, namespace, name){ + getAttributeNS = function (elem, namespace, name) { var basename; if (elem.getAttributeNS) { return elem.getAttributeNS(namespace, name); } else { try { basename = /:/.test(name) ? /:(.+)$/.exec(name)[1] : name; - return elem.attributes.getQualifiedItem(basename, namespace).nodeValue; + return elem.attributes.getQualifiedItem(basename, namespace) + .nodeValue; } catch (e) { - return elem.getAttribute(getDefaultNamespacePrefix(namespace) + ':' + name); + return elem.getAttribute( + getDefaultNamespacePrefix(namespace) + ":" + name, + ); } } }, - - getLocalName = function(elem){ + getLocalName = function (elem) { return elem.localName || elem.baseName; }, - parseRdfXmlSubject = function (elem, base) { var s, subject; - if (hasAttributeNS(elem, rdfNs, 'about')) { - s = getAttributeNS(elem, rdfNs, 'about'); - subject = $.rdf.resource('<' + s + '>', { base: base }); - } else if (hasAttributeNS(elem, rdfNs, 'ID')) { - s = getAttributeNS(elem, rdfNs, 'ID'); - subject = $.rdf.resource('<#' + s + '>', { base: base }); - } else if (hasAttributeNS(elem, rdfNs, 'nodeID')) { - s = getAttributeNS(elem, rdfNs, 'nodeID'); - subject = $.rdf.blank('_:' + s); + if (hasAttributeNS(elem, rdfNs, "about")) { + s = getAttributeNS(elem, rdfNs, "about"); + subject = $.rdf.resource("<" + s + ">", { base: base }); + } else if (hasAttributeNS(elem, rdfNs, "ID")) { + s = getAttributeNS(elem, rdfNs, "ID"); + subject = $.rdf.resource("<#" + s + ">", { base: base }); + } else if (hasAttributeNS(elem, rdfNs, "nodeID")) { + s = getAttributeNS(elem, rdfNs, "nodeID"); + subject = $.rdf.blank("_:" + s); } else { - subject = $.rdf.blank('[]'); + subject = $.rdf.blank("[]"); } return subject; }, - parseRdfXmlDescription = function (elem, isDescription, base, lang) { - var subject, p, property, o, object, reified, lang, i, j, li = 1, - collection1, collection2, collectionItem, collectionItems = [], - parseType, serializer, literalOpts = {}, oTriples, triples = []; - lang = getAttributeNS(elem, 'http://www.w3.org/XML/1998/namespace', 'lang') || lang; - base = getAttributeNS(elem, 'http://www.w3.org/XML/1998/namespace', 'base') || base; - if (lang !== null && lang !== undefined && lang !== '') { + var subject, + p, + property, + o, + object, + reified, + lang, + i, + j, + li = 1, + collection1, + collection2, + collectionItem, + collectionItems = [], + parseType, + serializer, + literalOpts = {}, + oTriples, + triples = []; + lang = + getAttributeNS(elem, "http://www.w3.org/XML/1998/namespace", "lang") || + lang; + base = + getAttributeNS(elem, "http://www.w3.org/XML/1998/namespace", "base") || + base; + if (lang !== null && lang !== undefined && lang !== "") { literalOpts = { lang: lang }; } subject = parseRdfXmlSubject(elem, base); - if (isDescription && (elem.namespaceURI !== rdfNs || getLocalName(elem) !== 'Description')) { + if ( + isDescription && + (elem.namespaceURI !== rdfNs || getLocalName(elem) !== "Description") + ) { property = $.rdf.type; - object = $.rdf.resource('<' + elem.namespaceURI + getLocalName(elem) + '>'); + object = $.rdf.resource( + "<" + elem.namespaceURI + getLocalName(elem) + ">", + ); triples.push($.rdf.triple(subject, property, object)); } for (i = 0; i < elem.attributes.length; i += 1) { p = elem.attributes.item(i); - if (p.namespaceURI !== undefined && - p.namespaceURI !== 'http://www.w3.org/2000/xmlns/' && - p.namespaceURI !== 'http://www.w3.org/XML/1998/namespace' && - p.prefix !== 'xmlns' && - p.prefix !== 'xml') { + if ( + p.namespaceURI !== undefined && + p.namespaceURI !== "http://www.w3.org/2000/xmlns/" && + p.namespaceURI !== "http://www.w3.org/XML/1998/namespace" && + p.prefix !== "xmlns" && + p.prefix !== "xml" + ) { if (p.namespaceURI !== rdfNs) { - property = $.rdf.resource('<' + p.namespaceURI + getLocalName(p) + '>'); - object = $.rdf.literal(literalOpts.lang ? p.nodeValue : '"' + p.nodeValue + '"', literalOpts); + property = $.rdf.resource( + "<" + p.namespaceURI + getLocalName(p) + ">", + ); + object = $.rdf.literal( + literalOpts.lang ? p.nodeValue : '"' + p.nodeValue + '"', + literalOpts, + ); triples.push($.rdf.triple(subject, property, object)); - } else if (getLocalName(p) === 'type') { + } else if (getLocalName(p) === "type") { property = $.rdf.type; - object = $.rdf.resource('<' + p.nodeValue + '>', { base: base }); + object = $.rdf.resource("<" + p.nodeValue + ">", { base: base }); triples.push($.rdf.triple(subject, property, object)); } } @@ -316,54 +384,60 @@ for (i = 0; i < elem.childNodes.length; i += 1) { p = elem.childNodes[i]; if (p.nodeType === 1) { - if (p.namespaceURI === rdfNs && getLocalName(p) === 'li') { - property = $.rdf.resource('<' + rdfNs + '_' + li + '>'); + if (p.namespaceURI === rdfNs && getLocalName(p) === "li") { + property = $.rdf.resource("<" + rdfNs + "_" + li + ">"); li += 1; } else { - property = $.rdf.resource('<' + p.namespaceURI + getLocalName(p) + '>'); + property = $.rdf.resource( + "<" + p.namespaceURI + getLocalName(p) + ">", + ); } - lang = getAttributeNS(p, 'http://www.w3.org/XML/1998/namespace', 'lang') || parentLang; - if (lang !== null && lang !== undefined && lang !== '') { - literalOpts = { lang: lang }; + lang = + getAttributeNS(p, "http://www.w3.org/XML/1998/namespace", "lang") || + parentLang; + if (lang !== null && lang !== undefined && lang !== "") { + literalOpts = { lang: lang }; } else { literalOpts = {}; } - if (hasAttributeNS(p, rdfNs, 'resource')) { - o = getAttributeNS(p, rdfNs, 'resource'); - object = $.rdf.resource('<' + o + '>', { base: base }); - } else if (hasAttributeNS(p, rdfNs, 'nodeID')) { - o = getAttributeNS(p, rdfNs, 'nodeID'); - object = $.rdf.blank('_:' + o); - } else if (hasAttributeNS(p, rdfNs, 'parseType')) { - parseType = getAttributeNS(p, rdfNs, 'parseType'); - if (parseType === 'Literal') { + if (hasAttributeNS(p, rdfNs, "resource")) { + o = getAttributeNS(p, rdfNs, "resource"); + object = $.rdf.resource("<" + o + ">", { base: base }); + } else if (hasAttributeNS(p, rdfNs, "nodeID")) { + o = getAttributeNS(p, rdfNs, "nodeID"); + object = $.rdf.blank("_:" + o); + } else if (hasAttributeNS(p, rdfNs, "parseType")) { + parseType = getAttributeNS(p, rdfNs, "parseType"); + if (parseType === "Literal") { try { serializer = new XMLSerializer(); - o = serializer.serializeToString(p.getElementsByTagName('*')[0]); + o = serializer.serializeToString( + p.getElementsByTagName("*")[0], + ); } catch (e) { o = ""; for (j = 0; j < p.childNodes.length; j += 1) { o += p.childNodes[j].xml; } } - object = $.rdf.literal(o, { datatype: rdfNs + 'XMLLiteral' }); - } else if (parseType === 'Resource') { + object = $.rdf.literal(o, { datatype: rdfNs + "XMLLiteral" }); + } else if (parseType === "Resource") { oTriples = parseRdfXmlDescription(p, false, base, lang); if (oTriples.length > 0) { object = oTriples[oTriples.length - 1].subject; triples = triples.concat(oTriples); } else { - object = $.rdf.blank('[]'); + object = $.rdf.blank("[]"); } - } else if (parseType === 'Collection') { - if (p.getElementsByTagName('*').length > 0) { + } else if (parseType === "Collection") { + if (p.getElementsByTagName("*").length > 0) { for (j = 0; j < p.childNodes.length; j += 1) { o = p.childNodes[j]; if (o.nodeType === 1) { collectionItems.push(o); } } - collection1 = $.rdf.blank('[]'); + collection1 = $.rdf.blank("[]"); object = collection1; for (j = 0; j < collectionItems.length; j += 1) { o = collectionItems[j]; @@ -374,12 +448,18 @@ } else { collectionItem = parseRdfXmlSubject(o); } - triples.push($.rdf.triple(collection1, $.rdf.first, collectionItem)); + triples.push( + $.rdf.triple(collection1, $.rdf.first, collectionItem), + ); if (j === collectionItems.length - 1) { - triples.push($.rdf.triple(collection1, $.rdf.rest, $.rdf.nil)); + triples.push( + $.rdf.triple(collection1, $.rdf.rest, $.rdf.nil), + ); } else { - collection2 = $.rdf.blank('[]'); - triples.push($.rdf.triple(collection1, $.rdf.rest, collection2)); + collection2 = $.rdf.blank("[]"); + triples.push( + $.rdf.triple(collection1, $.rdf.rest, collection2), + ); collection1 = collection2; } } @@ -387,10 +467,12 @@ object = $.rdf.nil; } } - } else if (hasAttributeNS(p, rdfNs, 'datatype')) { + } else if (hasAttributeNS(p, rdfNs, "datatype")) { o = p.childNodes[0].nodeValue; - object = $.rdf.literal(o, { datatype: getAttributeNS(p, rdfNs, 'datatype') }); - } else if (p.getElementsByTagName('*').length > 0) { + object = $.rdf.literal(o, { + datatype: getAttributeNS(p, rdfNs, "datatype"), + }); + } else if (p.getElementsByTagName("*").length > 0) { for (j = 0; j < p.childNodes.length; j += 1) { o = p.childNodes[j]; if (o.nodeType === 1) { @@ -405,19 +487,25 @@ } } else if (p.childNodes.length > 0) { o = p.childNodes[0].nodeValue; - object = $.rdf.literal(literalOpts.lang ? o : '"' + o + '"', literalOpts); + object = $.rdf.literal( + literalOpts.lang ? o : '"' + o + '"', + literalOpts, + ); } else { oTriples = parseRdfXmlDescription(p, false, base, lang); if (oTriples.length > 0) { object = oTriples[oTriples.length - 1].subject; triples = triples.concat(oTriples); } else { - object = $.rdf.blank('[]'); + object = $.rdf.blank("[]"); } } triples.push($.rdf.triple(subject, property, object)); - if (hasAttributeNS(p, rdfNs, 'ID')) { - reified = $.rdf.resource('<#' + getAttributeNS(p, rdfNs, 'ID') + '>', { base: base }); + if (hasAttributeNS(p, rdfNs, "ID")) { + reified = $.rdf.resource( + "<#" + getAttributeNS(p, rdfNs, "ID") + ">", + { base: base }, + ); triples.push($.rdf.triple(reified, $.rdf.subject, subject)); triples.push($.rdf.triple(reified, $.rdf.property, property)); triples.push($.rdf.triple(reified, $.rdf.object, object)); @@ -426,12 +514,26 @@ } return triples; }, - parseRdfXml = function (doc) { - var i, lang, d, triples = []; - if (doc.documentElement.namespaceURI === rdfNs && getLocalName(doc.documentElement) === 'RDF') { - lang = getAttributeNS(doc.documentElement, 'http://www.w3.org/XML/1998/namespace', 'lang'); - base = getAttributeNS(doc.documentElement, 'http://www.w3.org/XML/1998/namespace', 'base') || $.uri.base(); + var i, + lang, + d, + triples = []; + if ( + doc.documentElement.namespaceURI === rdfNs && + getLocalName(doc.documentElement) === "RDF" + ) { + lang = getAttributeNS( + doc.documentElement, + "http://www.w3.org/XML/1998/namespace", + "lang", + ); + base = + getAttributeNS( + doc.documentElement, + "http://www.w3.org/XML/1998/namespace", + "base", + ) || $.uri.base(); triples = $.map(doc.documentElement.childNodes, function (d) { if (d.nodeType === 1) { return parseRdfXmlDescription(d, true, base, lang); @@ -453,29 +555,28 @@ return triples; }; - $.rdf.parsers['application/rdf+xml'] = { + $.rdf.parsers["application/rdf+xml"] = { parse: function (data) { var doc; try { doc = new ActiveXObject("Microsoft.XMLDOM"); doc.async = "false"; doc.loadXML(data); - } catch(e) { + } catch (e) { var parser = new DOMParser(); - doc = parser.parseFromString(data, 'text/xml'); + doc = parser.parseFromString(data, "text/xml"); } return doc; }, serialize: function (data) { if (data.xml) { - return data.xml.replace(/\s+$/,''); + return data.xml.replace(/\s+$/, ""); } else { serializer = new XMLSerializer(); return serializer.serializeToString(data); } }, triples: parseRdfXml, - dump: createRdfXml + dump: createRdfXml, }; - })(jQuery); diff --git a/r2redit/src/lib/jquery.treeview.edit.js b/r2redit/src/lib/jquery.treeview.edit.js index c8557fd..d8c3802 100644 --- a/r2redit/src/lib/jquery.treeview.edit.js +++ b/r2redit/src/lib/jquery.treeview.edit.js @@ -1,43 +1,68 @@ -(function($) { - var CLASSES = $.treeview.classes; - var proxied = $.fn.treeview; - $.fn.treeview = function(settings) { - settings = $.extend({}, settings); - if (settings.add) { - return this.trigger("add", [settings.add]); - } - if (settings.remove) { - return this.trigger("remove", [settings.remove]); - } - return proxied.apply(this, arguments).bind("add", function(event, branches) { - if (branches == null) { - return; - } - $(branches).prev() - .removeClass(CLASSES.last) - .removeClass(CLASSES.lastCollapsable) - .removeClass(CLASSES.lastExpandable) - .find(">.hitarea") - .removeClass(CLASSES.lastCollapsableHitarea) - .removeClass(CLASSES.lastExpandableHitarea); - $(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, $(this).data("toggler")); - }).bind("remove", function(event, branches) { - if (branches == null) { - return; - } - var prev = $(branches).prev(); - var parent = $(branches).parent(); - $(branches).remove(); - prev.filter(":last-child").addClass(CLASSES.last) - .filter("." + CLASSES.expandable).replaceClass(CLASSES.last, CLASSES.lastExpandable).end() - .find(">.hitarea").replaceClass(CLASSES.expandableHitarea, CLASSES.lastExpandableHitarea).end() - .filter("." + CLASSES.collapsable).replaceClass(CLASSES.last, CLASSES.lastCollapsable).end() - .find(">.hitarea").replaceClass(CLASSES.collapsableHitarea, CLASSES.lastCollapsableHitarea); - if (parent.is(":not(:has(>))") && parent[0] != this) { - parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable) - parent.siblings(".hitarea").andSelf().remove(); - } - }); - }; - -})(jQuery); \ No newline at end of file +(function ($) { + var CLASSES = $.treeview.classes; + var proxied = $.fn.treeview; + $.fn.treeview = function (settings) { + settings = $.extend({}, settings); + if (settings.add) { + return this.trigger("add", [settings.add]); + } + if (settings.remove) { + return this.trigger("remove", [settings.remove]); + } + return proxied + .apply(this, arguments) + .bind("add", function (event, branches) { + if (branches == null) { + return; + } + $(branches) + .prev() + .removeClass(CLASSES.last) + .removeClass(CLASSES.lastCollapsable) + .removeClass(CLASSES.lastExpandable) + .find(">.hitarea") + .removeClass(CLASSES.lastCollapsableHitarea) + .removeClass(CLASSES.lastExpandableHitarea); + $(branches) + .find("li") + .andSelf() + .prepareBranches(settings) + .applyClasses(settings, $(this).data("toggler")); + }) + .bind("remove", function (event, branches) { + if (branches == null) { + return; + } + var prev = $(branches).prev(); + var parent = $(branches).parent(); + $(branches).remove(); + prev + .filter(":last-child") + .addClass(CLASSES.last) + .filter("." + CLASSES.expandable) + .replaceClass(CLASSES.last, CLASSES.lastExpandable) + .end() + .find(">.hitarea") + .replaceClass( + CLASSES.expandableHitarea, + CLASSES.lastExpandableHitarea, + ) + .end() + .filter("." + CLASSES.collapsable) + .replaceClass(CLASSES.last, CLASSES.lastCollapsable) + .end() + .find(">.hitarea") + .replaceClass( + CLASSES.collapsableHitarea, + CLASSES.lastCollapsableHitarea, + ); + if (parent.is(":not(:has(>))") && parent[0] != this) { + parent + .parent() + .removeClass(CLASSES.collapsable) + .removeClass(CLASSES.expandable); + parent.siblings(".hitarea").andSelf().remove(); + } + }); + }; +})(jQuery); diff --git a/r2redit/src/lib/jquery.treeview.js b/r2redit/src/lib/jquery.treeview.js index 02b452c..66d0db3 100755 --- a/r2redit/src/lib/jquery.treeview.js +++ b/r2redit/src/lib/jquery.treeview.js @@ -1,6 +1,6 @@ /* * Treeview 1.5pre - jQuery plugin to hide and show branches of a tree - * + * * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ * http://docs.jquery.com/Plugins/Treeview * @@ -14,243 +14,285 @@ * */ -;(function($) { +(function ($) { + // TODO rewrite as a widget, removing all the extra plugins + $.extend($.fn, { + swapClass: function (c1, c2) { + var c1Elements = this.filter("." + c1); + this.filter("." + c2) + .removeClass(c2) + .addClass(c1); + c1Elements.removeClass(c1).addClass(c2); + return this; + }, + replaceClass: function (c1, c2) { + return this.filter("." + c1) + .removeClass(c1) + .addClass(c2) + .end(); + }, + hoverClass: function (className) { + className = className || "hover"; + return this.hover( + function () { + $(this).addClass(className); + }, + function () { + $(this).removeClass(className); + }, + ); + }, + heightToggle: function (animated, callback) { + animated + ? this.animate({ height: "toggle" }, animated, callback) + : this.each(function () { + jQuery(this)[jQuery(this).is(":hidden") ? "show" : "hide"](); + if (callback) callback.apply(this, arguments); + }); + }, + heightHide: function (animated, callback) { + if (animated) { + this.animate({ height: "hide" }, animated, callback); + } else { + this.hide(); + if (callback) this.each(callback); + } + }, + prepareBranches: function (settings) { + if (!settings.prerendered) { + // mark last tree items + this.filter(":last-child:not(ul)").addClass(CLASSES.last); + // collapse whole tree, or only those marked as closed, anyway except those marked as open + this.filter( + (settings.collapsed ? "" : "." + CLASSES.closed) + + ":not(." + + CLASSES.open + + ")", + ) + .find(">ul") + .hide(); + } + // return all items with sublists + return this.filter(":has(>ul)"); + }, + applyClasses: function (settings, toggler) { + // TODO use event delegation + this.filter(":has(>ul):not(:has(>a))") + .find(">span") + .unbind("click.treeview") + .bind("click.treeview", function (event) { + // don't handle click events on children, eg. checkboxes + if (this == event.target) toggler.apply($(this).next()); + }) + .add($("a", this)) + .hoverClass(); + + if (!settings.prerendered) { + // handle closed ones first + this.filter(":has(>ul:hidden)") + .addClass(CLASSES.expandable) + .replaceClass(CLASSES.last, CLASSES.lastExpandable); + + // handle open ones + this.not(":has(>ul:hidden)") + .addClass(CLASSES.collapsable) + .replaceClass(CLASSES.last, CLASSES.lastCollapsable); + + // create hitarea if not present + var hitarea = this.find("div." + CLASSES.hitarea); + if (!hitarea.length) + hitarea = this.prepend('
          ').find( + "div." + CLASSES.hitarea, + ); + hitarea + .removeClass() + .addClass(CLASSES.hitarea) + .each(function () { + var classes = ""; + $.each($(this).parent().attr("class").split(" "), function () { + classes += this + "-hitarea "; + }); + $(this).addClass(classes); + }); + } + + // apply event to hitarea + this.find("div." + CLASSES.hitarea).click(toggler); + }, + treeview: function (settings) { + settings = $.extend( + { + cookieId: "treeview", + }, + settings, + ); + + if (settings.toggle) { + var callback = settings.toggle; + settings.toggle = function () { + return callback.apply($(this).parent()[0], arguments); + }; + } + + // factory for treecontroller + function treeController(tree, control) { + // factory for click handlers + function handler(filter) { + return function () { + // reuse toggle event handler, applying the elements to toggle + // start searching for all hitareas + toggler.apply( + $("div." + CLASSES.hitarea, tree).filter(function () { + // for plain toggle, no filter is provided, otherwise we need to check the parent element + return filter ? $(this).parent("." + filter).length : true; + }), + ); + return false; + }; + } + // click on first element to collapse tree + $("a:eq(0)", control).click(handler(CLASSES.collapsable)); + // click on second to expand tree + $("a:eq(1)", control).click(handler(CLASSES.expandable)); + // click on third to toggle tree + $("a:eq(2)", control).click(handler()); + } + + // handle toggle event + function toggler() { + $(this) + .parent() + // swap classes for hitarea + .find(">.hitarea") + .swapClass(CLASSES.collapsableHitarea, CLASSES.expandableHitarea) + .swapClass( + CLASSES.lastCollapsableHitarea, + CLASSES.lastExpandableHitarea, + ) + .end() + // swap classes for parent li + .swapClass(CLASSES.collapsable, CLASSES.expandable) + .swapClass(CLASSES.lastCollapsable, CLASSES.lastExpandable) + // find child lists + .find(">ul") + // toggle them + .heightToggle(settings.animated, settings.toggle); + if (settings.unique) { + $(this) + .parent() + .siblings() + // swap classes for hitarea + .find(">.hitarea") + .replaceClass(CLASSES.collapsableHitarea, CLASSES.expandableHitarea) + .replaceClass( + CLASSES.lastCollapsableHitarea, + CLASSES.lastExpandableHitarea, + ) + .end() + .replaceClass(CLASSES.collapsable, CLASSES.expandable) + .replaceClass(CLASSES.lastCollapsable, CLASSES.lastExpandable) + .find(">ul") + .heightHide(settings.animated, settings.toggle); + } + } + this.data("toggler", toggler); + + function serialize() { + function binary(arg) { + return arg ? 1 : 0; + } + var data = []; + branches.each(function (i, e) { + data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0; + }); + $.cookie(settings.cookieId, data.join(""), settings.cookieOptions); + } + + function deserialize() { + var stored = $.cookie(settings.cookieId); + if (stored) { + var data = stored.split(""); + branches.each(function (i, e) { + $(e).find(">ul")[parseInt(data[i]) ? "show" : "hide"](); + }); + } + } + + // add treeview class to activate styles + this.addClass("treeview"); + + // prepare branches and find all tree items with child lists + var branches = this.find("li").prepareBranches(settings); + + switch (settings.persist) { + case "cookie": + var toggleCallback = settings.toggle; + settings.toggle = function () { + serialize(); + if (toggleCallback) { + toggleCallback.apply(this, arguments); + } + }; + deserialize(); + break; + case "location": + var current = this.find("a").filter(function () { + return this.href.toLowerCase() == location.href.toLowerCase(); + }); + if (current.length) { + // TODO update the open/closed classes + var items = current + .addClass("selected") + .parents("ul, li") + .add(current.next()) + .show(); + if (settings.prerendered) { + // if prerendered is on, replicate the basic class swapping + items + .filter("li") + .swapClass(CLASSES.collapsable, CLASSES.expandable) + .swapClass(CLASSES.lastCollapsable, CLASSES.lastExpandable) + .find(">.hitarea") + .swapClass( + CLASSES.collapsableHitarea, + CLASSES.expandableHitarea, + ) + .swapClass( + CLASSES.lastCollapsableHitarea, + CLASSES.lastExpandableHitarea, + ); + } + } + break; + } + + branches.applyClasses(settings, toggler); + + // if control option is set, create the treecontroller and show it + if (settings.control) { + treeController(this, settings.control); + $(settings.control).show(); + } + + return this; + }, + }); - // TODO rewrite as a widget, removing all the extra plugins - $.extend($.fn, { - swapClass: function(c1, c2) { - var c1Elements = this.filter('.' + c1); - this.filter('.' + c2).removeClass(c2).addClass(c1); - c1Elements.removeClass(c1).addClass(c2); - return this; - }, - replaceClass: function(c1, c2) { - return this.filter('.' + c1).removeClass(c1).addClass(c2).end(); - }, - hoverClass: function(className) { - className = className || "hover"; - return this.hover(function() { - $(this).addClass(className); - }, function() { - $(this).removeClass(className); - }); - }, - heightToggle: function(animated, callback) { - animated ? - this.animate({ height: "toggle" }, animated, callback) : - this.each(function(){ - jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); - if(callback) - callback.apply(this, arguments); - }); - }, - heightHide: function(animated, callback) { - if (animated) { - this.animate({ height: "hide" }, animated, callback); - } else { - this.hide(); - if (callback) - this.each(callback); - } - }, - prepareBranches: function(settings) { - if (!settings.prerendered) { - // mark last tree items - this.filter(":last-child:not(ul)").addClass(CLASSES.last); - // collapse whole tree, or only those marked as closed, anyway except those marked as open - this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide(); - } - // return all items with sublists - return this.filter(":has(>ul)"); - }, - applyClasses: function(settings, toggler) { - // TODO use event delegation - this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) { - // don't handle click events on children, eg. checkboxes - if ( this == event.target ) - toggler.apply($(this).next()); - }).add( $("a", this) ).hoverClass(); - - if (!settings.prerendered) { - // handle closed ones first - this.filter(":has(>ul:hidden)") - .addClass(CLASSES.expandable) - .replaceClass(CLASSES.last, CLASSES.lastExpandable); - - // handle open ones - this.not(":has(>ul:hidden)") - .addClass(CLASSES.collapsable) - .replaceClass(CLASSES.last, CLASSES.lastCollapsable); - - // create hitarea if not present - var hitarea = this.find("div." + CLASSES.hitarea); - if (!hitarea.length) - hitarea = this.prepend("
          ").find("div." + CLASSES.hitarea); - hitarea.removeClass().addClass(CLASSES.hitarea).each(function() { - var classes = ""; - $.each($(this).parent().attr("class").split(" "), function() { - classes += this + "-hitarea "; - }); - $(this).addClass( classes ); - }) - } - - // apply event to hitarea - this.find("div." + CLASSES.hitarea).click( toggler ); - }, - treeview: function(settings) { - - settings = $.extend({ - cookieId: "treeview" - }, settings); - - if ( settings.toggle ) { - var callback = settings.toggle; - settings.toggle = function() { - return callback.apply($(this).parent()[0], arguments); - }; - } - - // factory for treecontroller - function treeController(tree, control) { - // factory for click handlers - function handler(filter) { - return function() { - // reuse toggle event handler, applying the elements to toggle - // start searching for all hitareas - toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() { - // for plain toggle, no filter is provided, otherwise we need to check the parent element - return filter ? $(this).parent("." + filter).length : true; - }) ); - return false; - }; - } - // click on first element to collapse tree - $("a:eq(0)", control).click( handler(CLASSES.collapsable) ); - // click on second to expand tree - $("a:eq(1)", control).click( handler(CLASSES.expandable) ); - // click on third to toggle tree - $("a:eq(2)", control).click( handler() ); - } - - // handle toggle event - function toggler() { - $(this) - .parent() - // swap classes for hitarea - .find(">.hitarea") - .swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) - .swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ) - .end() - // swap classes for parent li - .swapClass( CLASSES.collapsable, CLASSES.expandable ) - .swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) - // find child lists - .find( ">ul" ) - // toggle them - .heightToggle( settings.animated, settings.toggle ); - if ( settings.unique ) { - $(this).parent() - .siblings() - // swap classes for hitarea - .find(">.hitarea") - .replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) - .replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ) - .end() - .replaceClass( CLASSES.collapsable, CLASSES.expandable ) - .replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) - .find( ">ul" ) - .heightHide( settings.animated, settings.toggle ); - } - } - this.data("toggler", toggler); - - function serialize() { - function binary(arg) { - return arg ? 1 : 0; - } - var data = []; - branches.each(function(i, e) { - data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0; - }); - $.cookie(settings.cookieId, data.join(""), settings.cookieOptions ); - } - - function deserialize() { - var stored = $.cookie(settings.cookieId); - if ( stored ) { - var data = stored.split(""); - branches.each(function(i, e) { - $(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ](); - }); - } - } - - // add treeview class to activate styles - this.addClass("treeview"); - - // prepare branches and find all tree items with child lists - var branches = this.find("li").prepareBranches(settings); - - switch(settings.persist) { - case "cookie": - var toggleCallback = settings.toggle; - settings.toggle = function() { - serialize(); - if (toggleCallback) { - toggleCallback.apply(this, arguments); - } - }; - deserialize(); - break; - case "location": - var current = this.find("a").filter(function() { - return this.href.toLowerCase() == location.href.toLowerCase(); - }); - if ( current.length ) { - // TODO update the open/closed classes - var items = current.addClass("selected").parents("ul, li").add( current.next() ).show(); - if (settings.prerendered) { - // if prerendered is on, replicate the basic class swapping - items.filter("li") - .swapClass( CLASSES.collapsable, CLASSES.expandable ) - .swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) - .find(">.hitarea") - .swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) - .swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ); - } - } - break; - } - - branches.applyClasses(settings, toggler); - - // if control option is set, create the treecontroller and show it - if ( settings.control ) { - treeController(this, settings.control); - $(settings.control).show(); - } - - return this; - } - }); - - // classes used by the plugin - // need to be styled via external stylesheet, see first example - $.treeview = {}; - var CLASSES = ($.treeview.classes = { - open: "open", - closed: "closed", - expandable: "expandable", - expandableHitarea: "expandable-hitarea", - lastExpandableHitarea: "lastExpandable-hitarea", - collapsable: "collapsable", - collapsableHitarea: "collapsable-hitarea", - lastCollapsableHitarea: "lastCollapsable-hitarea", - lastCollapsable: "lastCollapsable", - lastExpandable: "lastExpandable", - last: "last", - hitarea: "hitarea" - }); - -})(jQuery); \ No newline at end of file + // classes used by the plugin + // need to be styled via external stylesheet, see first example + $.treeview = {}; + var CLASSES = ($.treeview.classes = { + open: "open", + closed: "closed", + expandable: "expandable", + expandableHitarea: "expandable-hitarea", + lastExpandableHitarea: "lastExpandable-hitarea", + collapsable: "collapsable", + collapsableHitarea: "collapsable-hitarea", + lastCollapsableHitarea: "lastCollapsable-hitarea", + lastCollapsable: "lastCollapsable", + lastExpandable: "lastExpandable", + last: "last", + hitarea: "hitarea", + }); +})(jQuery); diff --git a/r2redit/src/lib/jquery.uri.js b/r2redit/src/lib/jquery.uri.js index d0d5d2d..fb6c426 100644 --- a/r2redit/src/lib/jquery.uri.js +++ b/r2redit/src/lib/jquery.uri.js @@ -1,6 +1,6 @@ /* * $ URIs @VERSION - * + * * Copyright (c) 2008,2009 Jeni Tennison * Licensed under the MIT (MIT-LICENSE.txt) * @@ -19,12 +19,10 @@ * @description rdfQuery is a jQuery plugin. The only fields and methods listed here are those that come as part of the rdfQuery library. */ (function ($) { - - var - mem = {}, - uriRegex = /^(([a-z][\-a-z0-9+\.]*):)?(\/\/([^\/?#]+))?([^?#]*)?(\?([^#]*))?(#(.*))?$/i, + var mem = {}, + uriRegex = + /^(([a-z][\-a-z0-9+\.]*):)?(\/\/([^\/?#]+))?([^?#]*)?(\?([^#]*))?(#(.*))?$/i, docURI, - parseURI = function (u) { var m = u.match(uriRegex); if (m === null) { @@ -33,27 +31,31 @@ return { scheme: m[1] ? m[2].toLowerCase() : undefined, authority: m[3] ? m[4] : undefined, - path: m[5] || '', + path: m[5] || "", query: m[6] ? m[7] : undefined, - fragment: m[8] ? m[9] : undefined + fragment: m[8] ? m[9] : undefined, }; }, - removeDotSegments = function (u) { - var r = '', m = []; + var r = "", + m = []; if (/\./.test(u)) { - while (u !== undefined && u !== '') { - if (u === '.' || u === '..') { - u = ''; - } else if (/^\.\.\//.test(u)) { // starts with ../ + while (u !== undefined && u !== "") { + if (u === "." || u === "..") { + u = ""; + } else if (/^\.\.\//.test(u)) { + // starts with ../ u = u.substring(3); - } else if (/^\.\//.test(u)) { // starts with ./ + } else if (/^\.\//.test(u)) { + // starts with ./ u = u.substring(2); - } else if (/^\/\.(\/|$)/.test(u)) { // starts with /./ or consists of /. - u = '/' + u.substring(3); - } else if (/^\/\.\.(\/|$)/.test(u)) { // starts with /../ or consists of /.. - u = '/' + u.substring(4); - r = r.replace(/\/?[^\/]+$/, ''); + } else if (/^\/\.(\/|$)/.test(u)) { + // starts with /./ or consists of /. + u = "/" + u.substring(3); + } else if (/^\/\.\.(\/|$)/.test(u)) { + // starts with /../ or consists of /.. + u = "/" + u.substring(4); + r = r.replace(/\/?[^\/]+$/, ""); } else { m = u.match(/^(\/?[^\/]*)(\/.*)?$/); u = m[2]; @@ -65,12 +67,11 @@ return u; } }, - merge = function (b, r) { - if (b.authority !== '' && (b.path === undefined || b.path === '')) { - return '/' + r; + if (b.authority !== "" && (b.path === undefined || b.path === "")) { + return "/" + r; } else { - return b.path.replace(/[^\/]+$/, '') + r; + return b.path.replace(/[^\/]+$/, "") + r; } }; @@ -84,12 +85,12 @@ */ $.uri = function (relative, base) { var uri; - relative = relative || ''; + relative = relative || ""; if (mem[relative]) { return mem[relative]; } base = base || $.uri.base(); - if (typeof base === 'string') { + if (typeof base === "string") { base = $.uri.absolute(base); } uri = new $.uri.fn.init(relative, base); @@ -127,7 +128,7 @@ * @type String */ fragment: undefined, - + init: function (relative, base) { var r = {}; base = base || {}; @@ -138,7 +139,7 @@ this.path = removeDotSegments(this.path); } else { this.authority = base.authority; - if (this.path === '') { + if (this.path === "") { this.path = base.path; if (this.query === undefined) { this.query = base.query; @@ -152,11 +153,14 @@ } } if (this.scheme === undefined) { - throw "Malformed URI: URI is not an absolute URI and no base supplied: " + relative; + throw ( + "Malformed URI: URI is not an absolute URI and no base supplied: " + + relative + ); } return this; }, - + /** * Resolves a relative URI relative to this URI * @param {String} relative @@ -165,24 +169,31 @@ resolve: function (relative) { return $.uri(relative, this); }, - + /** * Creates a relative URI giving the path from this URI to the absolute URI passed as a parameter * @param {String|jQuery.uri} absolute * @returns String */ relative: function (absolute) { - var aPath, bPath, i = 0, j, resultPath = [], result = ''; - if (typeof absolute === 'string') { + var aPath, + bPath, + i = 0, + j, + resultPath = [], + result = ""; + if (typeof absolute === "string") { absolute = $.uri(absolute, {}); } - if (absolute.scheme !== this.scheme || - absolute.authority !== this.authority) { + if ( + absolute.scheme !== this.scheme || + absolute.authority !== this.authority + ) { return absolute.toString(); } if (absolute.path !== this.path) { - aPath = absolute.path.split('/'); - bPath = this.path.split('/'); + aPath = absolute.path.split("/"); + bPath = this.path.split("/"); if (aPath[1] !== bPath[1]) { result = absolute.path; } else { @@ -191,45 +202,60 @@ } j = i; for (; i < bPath.length - 1; i += 1) { - resultPath.push('..'); + resultPath.push(".."); } for (; j < aPath.length; j += 1) { resultPath.push(aPath[j]); } - result = resultPath.join('/'); + result = resultPath.join("/"); } - result = absolute.query === undefined ? result : result + '?' + absolute.query; - result = absolute.fragment === undefined ? result : result + '#' + absolute.fragment; + result = + absolute.query === undefined ? result : result + "?" + absolute.query; + result = + absolute.fragment === undefined + ? result + : result + "#" + absolute.fragment; return result; } if (absolute.query !== undefined && absolute.query !== this.query) { - return '?' + absolute.query + (absolute.fragment === undefined ? '' : '#' + absolute.fragment); + return ( + "?" + + absolute.query + + (absolute.fragment === undefined ? "" : "#" + absolute.fragment) + ); } - if (absolute.fragment !== undefined && absolute.fragment !== this.fragment) { - return '#' + absolute.fragment; + if ( + absolute.fragment !== undefined && + absolute.fragment !== this.fragment + ) { + return "#" + absolute.fragment; } - return ''; + return ""; }, - + /** * Returns the URI as an absolute string * @returns String */ toString: function () { - var result = ''; + var result = ""; if (this._string) { return this._string; } else { - result = this.scheme === undefined ? result : (result + this.scheme + ':'); - result = this.authority === undefined ? result : (result + '//' + this.authority); + result = + this.scheme === undefined ? result : result + this.scheme + ":"; + result = + this.authority === undefined + ? result + : result + "//" + this.authority; result = result + this.path; - result = this.query === undefined ? result : (result + '?' + this.query); - result = this.fragment === undefined ? result : (result + '#' + this.fragment); + result = this.query === undefined ? result : result + "?" + this.query; + result = + this.fragment === undefined ? result : result + "#" + this.fragment; this._string = result; return result; } - } - + }, }; $.uri.fn.init.prototype = $.uri.fn; @@ -251,7 +277,7 @@ $.uri.resolve = function (relative, base) { return $.uri(relative, base); }; - + /** * Creates a string giving the relative path from a base URI to an absolute URI * @param {String} absolute @@ -261,7 +287,7 @@ $.uri.relative = function (absolute, base) { return $.uri(base, {}).relative(absolute); }; - + /** * Returns the base URI of the page * @returns {jQuery.uri} @@ -269,7 +295,7 @@ $.uri.base = function () { return $(document).base(); }; - + /** * Returns the base URI in scope for the first selected element * @methodOf jQuery# @@ -278,10 +304,11 @@ * @example baseURI = $('img').base(); */ $.fn.base = function () { - var base = $(this).parents().andSelf().find('base').attr('href'), + var base = $(this).parents().andSelf().find("base").attr("href"), doc = $(this)[0].ownerDocument || document, - docURI = $.uri.absolute(doc.location === null ? document.location.href : doc.location.href); + docURI = $.uri.absolute( + doc.location === null ? document.location.href : doc.location.href, + ); return base === undefined ? docURI : $.uri(base, docURI); }; - })(jQuery); diff --git a/r2redit/src/lib/jquery.xmlns.js b/r2redit/src/lib/jquery.xmlns.js index eeab544..3747d77 100644 --- a/r2redit/src/lib/jquery.xmlns.js +++ b/r2redit/src/lib/jquery.xmlns.js @@ -1,6 +1,6 @@ /* * jQuery CURIE @VERSION - * + * * Copyright (c) 2008,2009 Jeni Tennison * Licensed under the MIT (MIT-LICENSE.txt) * @@ -18,64 +18,73 @@ /*global jQuery */ (function ($) { - - var - xmlNs = 'http://www.w3.org/XML/1998/namespace', - xmlnsNs = 'http://www.w3.org/2000/xmlns/', - + var xmlNs = "http://www.w3.org/XML/1998/namespace", + xmlnsNs = "http://www.w3.org/2000/xmlns/", xmlnsRegex = /\sxmlns(?::([^ =]+))?\s*=\s*(?:"([^"]*)"|'([^']*)')/g, - - ncNameChar = '[-A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u10000-\uEFFFF\.0-9\u00B7\u0300-\u036F\u203F-\u2040]', - ncNameStartChar = '[\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u0131\u0134-\u013E\u0141-\u0148\u014A-\u017E\u0180-\u01C3\u01CD-\u01F0\u01F4-\u01F5\u01FA-\u0217\u0250-\u02A8\u02BB-\u02C1\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03D6\u03DA\u03DC\u03DE\u03E0\u03E2-\u03F3\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E-\u0481\u0490-\u04C4\u04C7-\u04C8\u04CB-\u04CC\u04D0-\u04EB\u04EE-\u04F5\u04F8-\u04F9\u0531-\u0556\u0559\u0561-\u0586\u05D0-\u05EA\u05F0-\u05F2\u0621-\u063A\u0641-\u064A\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D3\u06D5\u06E5-\u06E6\u0905-\u0939\u093D\u0958-\u0961\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8B\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AE0\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B36-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB5\u0BB7-\u0BB9\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CDE\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D60-\u0D61\u0E01-\u0E2E\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EAE\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0F40-\u0F47\u0F49-\u0F69\u10A0-\u10C5\u10D0-\u10F6\u1100\u1102-\u1103\u1105-\u1107\u1109\u110B-\u110C\u110E-\u1112\u113C\u113E\u1140\u114C\u114E\u1150\u1154-\u1155\u1159\u115F-\u1161\u1163\u1165\u1167\u1169\u116D-\u116E\u1172-\u1173\u1175\u119E\u11A8\u11AB\u11AE-\u11AF\u11B7-\u11B8\u11BA\u11BC-\u11C2\u11EB\u11F0\u11F9\u1E00-\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u212E\u2180-\u2182\u3041-\u3094\u30A1-\u30FA\u3105-\u312C\uAC00-\uD7A3\u4E00-\u9FA5\u3007\u3021-\u3029_]', - ncNameRegex = new RegExp('^' + ncNameStartChar + ncNameChar + '*$'); - + ncNameChar = + "[-A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u10000-\uEFFFF.0-9\u00B7\u0300-\u036F\u203F-\u2040]", + ncNameStartChar = + "[\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u0131\u0134-\u013E\u0141-\u0148\u014A-\u017E\u0180-\u01C3\u01CD-\u01F0\u01F4-\u01F5\u01FA-\u0217\u0250-\u02A8\u02BB-\u02C1\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03D6\u03DA\u03DC\u03DE\u03E0\u03E2-\u03F3\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E-\u0481\u0490-\u04C4\u04C7-\u04C8\u04CB-\u04CC\u04D0-\u04EB\u04EE-\u04F5\u04F8-\u04F9\u0531-\u0556\u0559\u0561-\u0586\u05D0-\u05EA\u05F0-\u05F2\u0621-\u063A\u0641-\u064A\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D3\u06D5\u06E5-\u06E6\u0905-\u0939\u093D\u0958-\u0961\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8B\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AE0\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B36-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB5\u0BB7-\u0BB9\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CDE\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D60-\u0D61\u0E01-\u0E2E\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EAE\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0F40-\u0F47\u0F49-\u0F69\u10A0-\u10C5\u10D0-\u10F6\u1100\u1102-\u1103\u1105-\u1107\u1109\u110B-\u110C\u110E-\u1112\u113C\u113E\u1140\u114C\u114E\u1150\u1154-\u1155\u1159\u115F-\u1161\u1163\u1165\u1167\u1169\u116D-\u116E\u1172-\u1173\u1175\u119E\u11A8\u11AB\u11AE-\u11AF\u11B7-\u11B8\u11BA\u11BC-\u11C2\u11EB\u11F0\u11F9\u1E00-\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u212E\u2180-\u2182\u3041-\u3094\u30A1-\u30FA\u3105-\u312C\uAC00-\uD7A3\u4E00-\u9FA5\u3007\u3021-\u3029_]", + ncNameRegex = new RegExp("^" + ncNameStartChar + ncNameChar + "*$"); -/** - * Returns the namespaces declared in the scope of the first selected element, or - * adds a namespace declaration to all selected elements. Pass in no parameters - * to return all namespaces bindings on the first selected element. If only - * the prefix parameter is specified, this method will return the namespace - * URI that is bound to the specified prefix on the first element in the selection - * If the prefix and uri parameters are both specified, this method will - * add the binding of the specified prefix and namespace URI to all elements - * in the selection. - * @methodOf jQuery# - * @name jQuery#xmlns - * @param {String} [prefix] Restricts the namespaces returned to only the namespace with the specified namespace prefix. - * @param {String|jQuery.uri} [uri] Adds a namespace declaration to the selected elements that maps the specified prefix to the specified namespace. - * @param {Object} [inherited] A map of inherited namespace bindings. - * @returns {Object|jQuery.uri|jQuery} - * @example - * // Retrieve all of the namespace bindings on the HTML document element - * var nsMap = $('html').xmlns(); - * @example - * // Retrieve the namespace URI mapped to the 'dc' prefix on the HTML document element - * var dcNamespace = $('html').xmlns('dc'); - * @example - * // Create a namespace declaration that binds the 'dc' prefix to the URI 'http://purl.org/dc/elements/1.1/' - * $('html').xmlns('dc', 'http://purl.org/dc/elements/1.1/'); - */ + /** + * Returns the namespaces declared in the scope of the first selected element, or + * adds a namespace declaration to all selected elements. Pass in no parameters + * to return all namespaces bindings on the first selected element. If only + * the prefix parameter is specified, this method will return the namespace + * URI that is bound to the specified prefix on the first element in the selection + * If the prefix and uri parameters are both specified, this method will + * add the binding of the specified prefix and namespace URI to all elements + * in the selection. + * @methodOf jQuery# + * @name jQuery#xmlns + * @param {String} [prefix] Restricts the namespaces returned to only the namespace with the specified namespace prefix. + * @param {String|jQuery.uri} [uri] Adds a namespace declaration to the selected elements that maps the specified prefix to the specified namespace. + * @param {Object} [inherited] A map of inherited namespace bindings. + * @returns {Object|jQuery.uri|jQuery} + * @example + * // Retrieve all of the namespace bindings on the HTML document element + * var nsMap = $('html').xmlns(); + * @example + * // Retrieve the namespace URI mapped to the 'dc' prefix on the HTML document element + * var dcNamespace = $('html').xmlns('dc'); + * @example + * // Create a namespace declaration that binds the 'dc' prefix to the URI 'http://purl.org/dc/elements/1.1/' + * $('html').xmlns('dc', 'http://purl.org/dc/elements/1.1/'); + */ $.fn.xmlns = function (prefix, uri, inherited) { - var - elem = this.eq(0), - ns = elem.data('xmlns'), - e = elem[0], a, p, i, - decl = prefix ? 'xmlns:' + prefix : 'xmlns', + var elem = this.eq(0), + ns = elem.data("xmlns"), + e = elem[0], + a, + p, + i, + decl = prefix ? "xmlns:" + prefix : "xmlns", value, - tag, found = false; + tag, + found = false; if (uri === undefined) { - if (prefix === undefined) { // get the in-scope declarations on the first element + if (prefix === undefined) { + // get the in-scope declarations on the first element if (!ns) { ns = { -// xml: $.uri(xmlNs) + // xml: $.uri(xmlNs) }; if (e.attributes && e.attributes.getNamedItemNS) { for (i = 0; i < e.attributes.length; i += 1) { a = e.attributes[i]; if (/^xmlns(:(.+))?$/.test(a.nodeName)) { - prefix = /^xmlns(:(.+))?$/.exec(a.nodeName)[2] || ''; + prefix = /^xmlns(:(.+))?$/.exec(a.nodeName)[2] || ""; value = a.nodeValue; - if (prefix === '' || (value !== '' && value !== xmlNs && value !== xmlnsNs && ncNameRegex.test(prefix) && prefix !== 'xml' && prefix !== 'xmlns')) { + if ( + prefix === "" || + (value !== "" && + value !== xmlNs && + value !== xmlnsNs && + ncNameRegex.test(prefix) && + prefix !== "xml" && + prefix !== "xmlns") + ) { ns[prefix] = $.uri(a.nodeValue); found = true; } @@ -85,9 +94,17 @@ tag = /<[^>]+>/.exec(e.outerHTML); a = xmlnsRegex.exec(tag); while (a !== null) { - prefix = a[1] || ''; + prefix = a[1] || ""; value = a[2] || a[3]; - if (prefix === '' || (value !== '' && value !== xmlNs && value !== xmlnsNs && ncNameRegex.test(prefix) && prefix !== 'xml' && prefix !== 'xmlns')) { + if ( + prefix === "" || + (value !== "" && + value !== xmlNs && + value !== xmlnsNs && + ncNameRegex.test(prefix) && + prefix !== "xml" && + prefix !== "xmlns") + ) { ns[prefix] = $.uri(a[2] || a[3]); found = true; } @@ -95,67 +112,74 @@ } xmlnsRegex.lastIndex = 0; } - inherited = inherited || (e.parentNode.nodeType === 1 ? elem.parent().xmlns() : {}); + inherited = + inherited || + (e.parentNode.nodeType === 1 ? elem.parent().xmlns() : {}); ns = found ? $.extend({}, inherited, ns) : inherited; - elem.data('xmlns', ns); + elem.data("xmlns", ns); } return ns; - } else if (typeof prefix === 'object') { // set the prefix mappings defined in the object + } else if (typeof prefix === "object") { + // set the prefix mappings defined in the object for (p in prefix) { - if (typeof prefix[p] === 'string' && ncNameRegex.test(p)) { + if (typeof prefix[p] === "string" && ncNameRegex.test(p)) { this.xmlns(p, prefix[p]); } } - this.find('*').andSelf().removeData('xmlns'); + this.find("*").andSelf().removeData("xmlns"); return this; - } else { // get the in-scope declaration associated with this prefix on the first element + } else { + // get the in-scope declaration associated with this prefix on the first element if (!ns) { ns = elem.xmlns(); } return ns[prefix]; } - } else { // set - this.find('*').andSelf().removeData('xmlns'); + } else { + // set + this.find("*").andSelf().removeData("xmlns"); return this.attr(decl, uri); } }; -/** - * Removes one or more XML namespace bindings from the selected elements. - * @methodOf jQuery# - * @name jQuery#removeXmlns - * @param {String|Object|String[]} prefix The prefix(es) of the XML namespace bindings that are to be removed from the selected elements. - * @returns {jQuery} The original jQuery object. - * @example - * // Remove the foaf namespace declaration from the body element: - * $('body').removeXmlns('foaf'); - * @example - * // Remove the foo and bar namespace declarations from all h2 elements - * $('h2').removeXmlns(['foo', 'bar']); - * @example - * // Remove the foo and bar namespace declarations from all h2 elements - * var namespaces = { foo : 'http://www.example.org/foo', bar : 'http://www.example.org/bar' }; - * $('h2').removeXmlns(namespaces); - */ + /** + * Removes one or more XML namespace bindings from the selected elements. + * @methodOf jQuery# + * @name jQuery#removeXmlns + * @param {String|Object|String[]} prefix The prefix(es) of the XML namespace bindings that are to be removed from the selected elements. + * @returns {jQuery} The original jQuery object. + * @example + * // Remove the foaf namespace declaration from the body element: + * $('body').removeXmlns('foaf'); + * @example + * // Remove the foo and bar namespace declarations from all h2 elements + * $('h2').removeXmlns(['foo', 'bar']); + * @example + * // Remove the foo and bar namespace declarations from all h2 elements + * var namespaces = { foo : 'http://www.example.org/foo', bar : 'http://www.example.org/bar' }; + * $('h2').removeXmlns(namespaces); + */ $.fn.removeXmlns = function (prefix) { var decl, p, i; - if (typeof prefix === 'object') { - if (prefix.length === undefined) { // assume an object representing namespaces + if (typeof prefix === "object") { + if (prefix.length === undefined) { + // assume an object representing namespaces for (p in prefix) { - if (typeof prefix[p] === 'string') { + if (typeof prefix[p] === "string") { this.removeXmlns(p); } } - } else { // it's an array + } else { + // it's an array for (i = 0; i < prefix.length; i += 1) { this.removeXmlns(prefix[i]); } } } else { - decl = prefix ? 'xmlns:' + prefix : 'xmlns'; + decl = prefix ? "xmlns:" + prefix : "xmlns"; this.removeAttr(decl); } - this.find('*').andSelf().removeData('xmlns'); + this.find("*").andSelf().removeData("xmlns"); return this; }; @@ -168,22 +192,21 @@ name = /<([^ >]+)/.exec(this[0].outerHTML)[1].toLowerCase(); } } - if (name === '?xml:namespace') { + if (name === "?xml:namespace") { // there's a prefix on the name, but we can't get at it throw "XMLinHTML: Unable to get the prefix to resolve the name of this element"; } m = /^(([^:]+):)?([^:]+)$/.exec(name); - prefix = m[2] || ''; + prefix = m[2] || ""; namespace = this.xmlns(prefix); - if (namespace === undefined && prefix !== '') { + if (namespace === undefined && prefix !== "") { throw "MalformedQName: The prefix " + prefix + " is not declared"; } return { namespace: namespace, localPart: m[3], prefix: prefix, - name: name + name: name, }; }; - })(jQuery); diff --git a/r2redit/src/standalone.html b/r2redit/src/standalone.html index b2d69d5..768d5f1 100644 --- a/r2redit/src/standalone.html +++ b/r2redit/src/standalone.html @@ -1,79 +1,85 @@ - + - - -R2Redit - - - + + + R2Redit + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - + body { + padding: 50px; + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + } + + + + -
          -
          
          -
          +          $.r2rEditor($("#container"), {
          +            title: "All mappings for data source PharmGKB",
          +            sourceUrl: url,
          +            serialize: true,
          +            basePath: "",
          +            onCommit: function (data) {
          +              $("#result").text(data);
          +            },
          +          });
          +        });
          +      })(jQuery);
          +    
          +    
          +
          
          +  
           
          diff --git a/r2redit/src/testmappings/ABA-to-Wiki.r2r.ttl b/r2redit/src/testmappings/ABA-to-Wiki.r2r.ttl
          index 80619e9..6b9bb72 100644
          --- a/r2redit/src/testmappings/ABA-to-Wiki.r2r.ttl
          +++ b/r2redit/src/testmappings/ABA-to-Wiki.r2r.ttl
          @@ -38,14 +38,14 @@ mp:Entrezgeneid
              r2r:sourcePattern 	"?SUBJ aba:entrezgeneid ?x";
              r2r:targetPattern	"?SUBJ smwprop:EntrezGeneId ?'x'^^xsd:int";	###MER: actually we must translate from int to string here
              .
          -   
          +
           mp:Genename
              a r2r:PropertyMapping;
              r2r:mappingRef    	mp:Gene;
              r2r:sourcePattern 	"?SUBJ aba:genename ?x";
              r2r:targetPattern	"?SUBJ smwprop:Label ?'x'^^xsd:string";
              .
          -   
          +
           mp:Genesymbol
              a r2r:PropertyMapping;
              r2r:mappingRef    	mp:Gene;
          @@ -59,7 +59,7 @@ mp:Mgimarkeraccessionid
              r2r:sourcePattern 	"?SUBJ aba:mgimarkeraccessionid ?x";
              r2r:targetPattern	"?SUBJ smwprop:MgiMarkerAccessionId ?'x'^^xsd:string";
              .
          -   
          +
           ###
           # GeneAlias
           ###
          @@ -68,4 +68,4 @@ mp:Genealias
              r2r:mappingRef    	mp:Gene;
              r2r:sourcePattern	"?SUBJ aba:gene-aliases ?x . ?x aba:aliassymbol ?s";
              r2r:targetPattern	"?SUBJ smwprop:AlternativeLabel ?'s'^^xsd:string";
          -   .
          \ No newline at end of file
          +   .
          diff --git a/r2redit/src/testmappings/KEGG-GENES-to-Wiki.r2r.ttl b/r2redit/src/testmappings/KEGG-GENES-to-Wiki.r2r.ttl
          index 78dcbda..265e0d2 100644
          --- a/r2redit/src/testmappings/KEGG-GENES-to-Wiki.r2r.ttl
          +++ b/r2redit/src/testmappings/KEGG-GENES-to-Wiki.r2r.ttl
          @@ -6,7 +6,7 @@
           @prefix owl:  .
           @prefix rdfs:  .
           @prefix mp:  .
          -   
          +
           ###
           # Gene
           ###
          @@ -116,7 +116,7 @@ mp:GeneLinkOMIM
              r2r:transformation "?id = regexToList('OMIM:(.+)', ?x)";
              r2r:targetPattern
              		"?SUBJ smwprop:OMIMId ?'id'^^xsd:string";
          -   . 
          +   .
           mp:GeneLinkIMGT
              a r2r:PropertyMapping;
              r2r:mappingRef    mp:Gene;
          @@ -168,7 +168,7 @@ mp:Pathway
              r2r:sourcePattern 	"?SUBJ a genes:pathway";
              r2r:targetPattern	"?SUBJ a smwcat:Pathway";
              .
          -   
          +
           # Properties of Pathway
           mp:PathwayID
              a r2r:PropertyMapping;
          @@ -182,4 +182,4 @@ mp:PathwayLabel
              r2r:mappingRef    	mp:Pathway;
              r2r:sourcePattern 	"?SUBJ rdfs:label ?x";
              r2r:targetPattern	"?SUBJ smwprop:Label ?'x'^^xsd:string";
          -   .
          \ No newline at end of file
          +   .
          diff --git a/r2redit/src/testmappings/KEGG-Pathway-to-Wiki.r2r.ttl b/r2redit/src/testmappings/KEGG-Pathway-to-Wiki.r2r.ttl
          index 77ebb8b..43eee57 100644
          --- a/r2redit/src/testmappings/KEGG-Pathway-to-Wiki.r2r.ttl
          +++ b/r2redit/src/testmappings/KEGG-Pathway-to-Wiki.r2r.ttl
          @@ -19,7 +19,7 @@ mp:Pathway
              r2r:sourcePattern 	"?SUBJ a pathway:pathway";
              r2r:targetPattern	"?SUBJ a smwcat:Pathway";
              .
          -   
          +
           # Properties of Pathway
           mp:PathwayID
              a r2r:PropertyMapping;
          @@ -34,7 +34,7 @@ mp:PathwayLabel
              r2r:sourcePattern 	"?SUBJ rdfs:label ?x";
              r2r:targetPattern	"?SUBJ smwprop:Label ?x";
              .
          -   
          +
           mp:PathwayDescription
              a r2r:PropertyMapping;
              r2r:mappingRef    	mp:Pathway;
          @@ -48,7 +48,7 @@ mp:PathwayHasDisease
              r2r:sourcePattern 	"?SUBJ pathway:hasDisease ?x";
              r2r:targetPattern	"?SUBJ smwprop:IsDisruptedBy ?x . ?x smwprop:Disrupts ?SUBJ";
              .
          -   
          +
           mp:PathwayHasDrug
              a r2r:PropertyMapping;
              r2r:mappingRef    	mp:Pathway;
          @@ -90,7 +90,7 @@ mp:DiseaseLabel
              r2r:sourcePattern 	"?SUBJ rdfs:label ?x";
              r2r:targetPattern	"?SUBJ smwprop:Label ?'x'^^xsd:string";
              .
          -   
          +
           
           ###
           # Drug
          @@ -119,7 +119,7 @@ mp:DrugLabel
              r2r:sourcePattern 	"?SUBJ rdfs:label ?x";
              r2r:targetPattern	"?SUBJ smwprop:Label ?'x'^^xsd:string";
              .
          -   
          +
           ###
           # Gene
           ###
          @@ -138,4 +138,4 @@ mp:GeneID
              r2r:mappingRef    	mp:Gene;
              r2r:sourcePattern 	"?SUBJ pathway:id ?x";
              r2r:targetPattern	"?SUBJ smwprop:KeggGeneId ?'x'^^xsd:string";
          -   .
          \ No newline at end of file
          +   .
          diff --git a/r2redit/src/testmappings/PharmGKB-to-Wiki.r2r.ttl b/r2redit/src/testmappings/PharmGKB-to-Wiki.r2r.ttl
          index 61f9d85..db35bdc 100644
          --- a/r2redit/src/testmappings/PharmGKB-to-Wiki.r2r.ttl
          +++ b/r2redit/src/testmappings/PharmGKB-to-Wiki.r2r.ttl
          @@ -25,7 +25,7 @@ mp:Pathway
              r2r:sourcePattern 	"?SUBJ a pharmgkb:PharmGKB_Pathways";
              r2r:targetPattern	"?SUBJ a smwcat:Pathway";
              .
          -   
          +
           # Properties of Pathway
           mp:PathwayID
              a r2r:PropertyMapping;
          @@ -40,7 +40,7 @@ mp:PathwayLabel
              r2r:sourcePattern 	"?SUBJ pharmgkb:Name ?x";
              r2r:targetPattern	"?SUBJ smwprop:Label ?'x'^^xsd:string";
              .
          -   
          +
           mp:PathwayHasDisease
              a r2r:PropertyMapping;
              r2r:mappingRef    	mp:Pathway;
          @@ -49,7 +49,7 @@ mp:PathwayHasDisease
              						?rel pharmgkb:c2b2r_Related_Diseases ?x""";
              r2r:targetPattern	"?SUBJ smwprop:IsDisruptedBy ?x";
              .
          -   
          +
           mp:PathwayHasDrug
              a r2r:PropertyMapping;
              r2r:mappingRef    	mp:Pathway;
          @@ -88,7 +88,7 @@ mp:DiseaseID
              r2r:sourcePattern 	"?SUBJ pharmgkb:PharmGKB_Accession_Id ?x";
              r2r:targetPattern	"?SUBJ smwprop:PharmGKBId ?'x'^^xsd:string";
              .
          -   
          +
           mp:DiseaseMeSHID
              a r2r:PropertyMapping;
              r2r:mappingRef    	mp:Disease;
          @@ -102,7 +102,7 @@ mp:DiseaseLabel
              r2r:sourcePattern 	"?SUBJ pharmgkb:Name ?x";
              r2r:targetPattern	"?SUBJ smwprop:Label ?'x'^^xsd:string";
              .
          -   
          +
           # FIXME doesn't work
           mp:DiseaseAlternativeLabel
              a r2r:PropertyMapping;
          @@ -111,7 +111,7 @@ mp:DiseaseAlternativeLabel
              r2r:transformation 	"""?labels = itRegexToList('"(.+?)"', ?x)""";
              r2r:targetPattern	"?SUBJ smwprop:AlternativeLabel ?'labels'^^xsd:string";
              .
          -   
          +
           mp:DiseaseHasPathway
              a r2r:PropertyMapping;
              r2r:mappingRef    	mp:Disease;
          @@ -120,7 +120,7 @@ mp:DiseaseHasPathway
              						?rel pharmgkb:Related_Pathways ?x""";
              r2r:targetPattern	"?SUBJ smwprop:Disrupts ?x";
              .
          -   
          +
           mp:DiseaseHasDrug
              a r2r:PropertyMapping;
              r2r:mappingRef    	mp:Disease;
          @@ -193,7 +193,7 @@ mp:DrugHasPathway
              						?rel pharmgkb:Related_Pathways ?x""";
              r2r:targetPattern	"?SUBJ smwprop:Targets ?x";
              .
          -   
          +
           mp:DrugHasDisease
              a r2r:PropertyMapping;
              r2r:mappingRef    	mp:Drug;
          @@ -291,4 +291,4 @@ mp:GeneEnsemblID
              r2r:targetPattern	"?SUBJ smwprop:EnsemblId  ?'x'^^xsd:string";
              .
           
          -# skipped: Has_Variant_Annotation, Is_GenoTyped, Is_VIP, PD, PK
          \ No newline at end of file
          +# skipped: Has_Variant_Annotation, Is_GenoTyped, Is_VIP, PD, PK
          diff --git a/r2redit/src/testmappings/Uniprot-to-Wiki.r2r.ttl b/r2redit/src/testmappings/Uniprot-to-Wiki.r2r.ttl
          index 25c3c90..100ef65 100644
          --- a/r2redit/src/testmappings/Uniprot-to-Wiki.r2r.ttl
          +++ b/r2redit/src/testmappings/Uniprot-to-Wiki.r2r.ttl
          @@ -18,13 +18,13 @@ mp:Gene
              r2r:sourcePattern 	"?SUBJ a uniprot:Gene";
              r2r:targetPattern	"?SUBJ a smwcat:Gene";
              .
          -   
          +
           mp:GeneName
              a r2r:PropertyMapping;
              r2r:mappingRef    mp:Gene;
              r2r:sourcePattern      "?SUBJ skos:prefLabel ?o";
              r2r:targetPattern	"?SUBJ smwprop:GeneSymbol ?'o'^^xsd:string";
          -   .   
          +   .
           
           # Uniprot:Protein (encodedBy uniprot:Gene) -> organism -> commonName => aba:Gene -> organism
           #mp:Organism
          @@ -59,7 +59,7 @@ mp:UniprotId
              r2r:transformation "?id = regexToList('http://purl.uniprot.org/uniprot/(.+)', ?protein)";
              r2r:targetPattern 	"?SUBJ smwprop:UniprotId ?'id'^^xsd:string";
              .
          -   
          +
           # Uniprot:Tissue => aba:Structure
           #mp:Structure
           #   a r2r:ClassMapping;
          @@ -74,7 +74,7 @@ mp:UniprotId
           #   r2r:sourcePattern	"?SUBJ rdfs:label ?label .";
           #   r2r:targetPattern	"?SUBJ smwprop:Structurename ?'label'^^xsd:string";
           #   .
          -   
          +
           # Uniprot:Protein (encodedBy uniprot:Gene) -> uniprot:isolatedFrom => aba:GeneExpression
           #mp:GeneExpression
           #   a r2r:ClassMapping;
          @@ -92,4 +92,4 @@ mp:KeggGeneId
              r2r:sourcePattern	"?protein uniprot:encodedBy ?SUBJ . ?protein rdfs:seeAlso ?dbentry . ?dbentry uniprot:database 'KEGG'";
              r2r:transformation "?id = regexToList('http://purl.uniprot.org/kegg/(.+)', ?dbentry)";
              r2r:targetPattern 	"?SUBJ smwprop:KeggGeneId ?'id'^^xsd:string";
          -   .
          \ No newline at end of file
          +   .
          diff --git a/r2rgui/README b/r2rgui/README
          index 8455ff8..e147fb1 100644
          --- a/r2rgui/README
          +++ b/r2rgui/README
          @@ -1,5 +1,4 @@
          -R2R Graphical User Interface
          -----------------------------
          +## R2R Graphical User Interface
           
           Introduction:
           
          diff --git a/r2rgui/app/controllers/Application.scala b/r2rgui/app/controllers/Application.scala
          index e44eee3..2fc8136 100644
          --- a/r2rgui/app/controllers/Application.scala
          +++ b/r2rgui/app/controllers/Application.scala
          @@ -7,8 +7,8 @@ import models.{FilePaths, Executor}
           import java.io.File
           
           object Application extends Controller {
          -  
          +
             def index = Action {
               Ok(views.html.index())
             }
          -}
          \ No newline at end of file
          +}
          diff --git a/r2rgui/app/views/fileDialog.scala.html b/r2rgui/app/views/fileDialog.scala.html
          index 314bd6b..1d9a953 100644
          --- a/r2rgui/app/views/fileDialog.scala.html
          +++ b/r2rgui/app/views/fileDialog.scala.html
          @@ -1,60 +1,54 @@
          -@* A file selection dialog.
          - *
          - * @param path The path to which the selected file will be uploaded to.
          - *
          - * @param message The message which is displayed for supported source and mapping files respectively
          - *
          - *@
          -@(path: String, message: String)
          +@* A file selection dialog. * * @param path The path to which the selected file
          +will be uploaded to. * * @param message The message which is displayed for
          +supported source and mapping files respectively * *@ @(path: String, message:
          +String)
           
           
          - + - + - +
          - @message - @message
          File
          - +
          \ No newline at end of file + diff --git a/r2rgui/app/views/fileView.scala.html b/r2rgui/app/views/fileView.scala.html index d52eee3..4d4c2fe 100644 --- a/r2rgui/app/views/fileView.scala.html +++ b/r2rgui/app/views/fileView.scala.html @@ -1,12 +1,17 @@ -@* A text area that displays a file. - * - * @param id The id of the text area - * @param path The file which should be displayed. - * @param readonly Determines if this text area is readonly - *@ -@(id: String, file: String, readonly: Boolean) +@* A text area that displays a file. * * @param id The id of the text area * +@param path The file which should be displayed. * @param readonly Determines if +this text area is readonly *@ @(id: String, file: String, readonly: Boolean) - \ No newline at end of file +} diff --git a/r2rgui/app/views/index.scala.html b/r2rgui/app/views/index.scala.html index 9942937..08d64c6 100644 --- a/r2rgui/app/views/index.scala.html +++ b/r2rgui/app/views/index.scala.html @@ -1,47 +1,59 @@ -@() +@() @main() { -@main() { +

          R2R Framework

          -

          R2R Framework

          +

          + Data is represented on the + Web of Linked Data + using terms from a wide range of different vocabularies. The + R2R Framework translates Web data that is + represented using terms from different vocabularies into a single target + vocabulary. Vocabulary mappings are expressed using the + R2R Mapping Language. The language provides for simple transformations as well as for more + complex structural transformations and property value transformations such as + normalizing different units of measurement or complex string manipulations. +

          -

          - Data is represented on the Web of Linked Data using terms from a wide range of different vocabularies. - The R2R Framework translates Web data that is represented using terms from different vocabularies into a single target vocabulary. - Vocabulary mappings are expressed using the R2R Mapping Language. - The language provides for simple transformations as well as for more complex structural transformations and property value transformations such as normalizing different units of measurement or complex string manipulations. -

          +
          + + + + + + +
          -
          - - - - - - +
          + +
          + @fileView(id = "input", file = FilePaths.inputFile, readonly = true)
          - -
          - -
          - @fileView(id = "input", file = FilePaths.inputFile, readonly = true) -
          -
          - @fileView(id = "mapping", file = FilePaths.mappingFile, readonly = false) -
          -
          - @fileView(id = "output", file = FilePaths.outputFile, readonly = true) -
          +
          + @fileView(id = "mapping", file = FilePaths.mappingFile, readonly = false) +
          +
          + @fileView(id = "output", file = FilePaths.outputFile, readonly = true)
          +
          - + - -} \ No newline at end of file + +} diff --git a/r2rgui/app/views/sparqlInputDialog.scala.html b/r2rgui/app/views/sparqlInputDialog.scala.html index 47f86e1..160c792 100644 --- a/r2rgui/app/views/sparqlInputDialog.scala.html +++ b/r2rgui/app/views/sparqlInputDialog.scala.html @@ -1,5 +1,4 @@ -@* A dialog to specify SPARQL input sources. *@ -@() +@* A dialog to specify SPARQL input sources. *@ @()
          @@ -7,35 +6,43 @@ Endpoint URI - + - + + Graph - + SPARQL Pattern - + - - + @@ -44,15 +51,15 @@ \ No newline at end of file + diff --git a/r2rgui/app/views/sparqlOutputDialog.scala.html b/r2rgui/app/views/sparqlOutputDialog.scala.html index 56313f2..296d214 100644 --- a/r2rgui/app/views/sparqlOutputDialog.scala.html +++ b/r2rgui/app/views/sparqlOutputDialog.scala.html @@ -1,5 +1,4 @@ -@* A dialog to specify SPARQL outputs. *@ -@() +@* A dialog to specify SPARQL outputs. *@ @()
          @@ -7,24 +6,32 @@ Endpoint URI - + - + Graph - + - + @@ -33,15 +40,15 @@ \ No newline at end of file + diff --git a/r2rgui/build.sbt b/r2rgui/build.sbt index d4bbd85..e58cd0c 100644 --- a/r2rgui/build.sbt +++ b/r2rgui/build.sbt @@ -16,9 +16,3 @@ play.Project.playScalaSettings com.github.play2war.plugin.Play2WarPlugin.play2WarSettings com.github.play2war.plugin.Play2WarKeys.servletVersion := "3.0" - - - - - - diff --git a/r2rgui/conf/application.conf b/r2rgui/conf/application.conf index 564df5c..ad80134 100644 --- a/r2rgui/conf/application.conf +++ b/r2rgui/conf/application.conf @@ -19,7 +19,7 @@ application.context=/r2r/ # global=Global # Database configuration -# ~~~~~ +# ~~~~~ # You can declare as many datasources as you want. # By convention, the default datasource is named `default` # @@ -45,4 +45,3 @@ logger.play=INFO # Logger provided to your application: logger.application=DEBUG - diff --git a/r2rgui/example/mappings.ttl b/r2rgui/example/mappings.ttl index 4157e75..28dbad6 100644 --- a/r2rgui/example/mappings.ttl +++ b/r2rgui/example/mappings.ttl @@ -2,4 +2,4 @@ @prefix target: . @prefix rdfs: . -source:mapProp rdfs:subPropertyOf target:mapProp . \ No newline at end of file +source:mapProp rdfs:subPropertyOf target:mapProp . diff --git a/r2rgui/example/source.nq b/r2rgui/example/source.nq index 572e0ab..7c6678f 100644 --- a/r2rgui/example/source.nq +++ b/r2rgui/example/source.nq @@ -6,4 +6,4 @@ "mintNotMapped" . #added for Silk SourceDataset restrictions . - . \ No newline at end of file + . diff --git a/r2rgui/example/source.nt b/r2rgui/example/source.nt index 4fae8cd..3e37a9a 100644 --- a/r2rgui/example/source.nt +++ b/r2rgui/example/source.nt @@ -6,4 +6,4 @@ "mintNotMapped" . #added for Silk SourceDataset restrictions . - . \ No newline at end of file + . diff --git a/r2rgui/logs/application.log b/r2rgui/logs/application.log index 6af3b99..0c760bc 100644 --- a/r2rgui/logs/application.log +++ b/r2rgui/logs/application.log @@ -1,3 +1,2 @@ -2014-05-09 15:39:02,488 - [INFO] - from play in pool-4-thread-2 +2014-05-09 15:39:02,488 - [INFO] - from play in pool-4-thread-2 Listening for HTTP on /0:0:0:0:0:0:0:0:9000 - diff --git a/r2rgui/project/plugins.sbt b/r2rgui/project/plugins.sbt index 95c9259..5c30b9b 100644 --- a/r2rgui/project/plugins.sbt +++ b/r2rgui/project/plugins.sbt @@ -1,7 +1,7 @@ logLevel := Level.Warn -// The Typesafe repository +// The Typesafe repository resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" // Use the Play sbt plugin for Play projects diff --git a/r2rgui/public/javascripts/jquery-1.8.3.min.js b/r2rgui/public/javascripts/jquery-1.8.3.min.js index 83589da..8c1a203 100644 --- a/r2rgui/public/javascripts/jquery-1.8.3.min.js +++ b/r2rgui/public/javascripts/jquery-1.8.3.min.js @@ -1,2 +1,5563 @@ -/*! jQuery v1.8.3 jquery.com | jquery.org/license */ -(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
          a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
          t
          ",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
          ",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
          ",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

          ",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
          ","
          "],thead:[1,"","
          "],tr:[2,"","
          "],td:[3,"","
          "],col:[2,"","
          "],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
          ","
          "]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
          ").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function (e, t) { + function _(e) { + var t = (M[e] = {}); + return ( + v.each(e.split(y), function (e, n) { + t[n] = !0; + }), + t + ); + } + function H(e, n, r) { + if (r === t && e.nodeType === 1) { + var i = "data-" + n.replace(P, "-$1").toLowerCase(); + r = e.getAttribute(i); + if (typeof r == "string") { + try { + r = + r === "true" + ? !0 + : r === "false" + ? !1 + : r === "null" + ? null + : +r + "" === r + ? +r + : D.test(r) + ? v.parseJSON(r) + : r; + } catch (s) {} + v.data(e, n, r); + } else r = t; + } + return r; + } + function B(e) { + var t; + for (t in e) { + if (t === "data" && v.isEmptyObject(e[t])) continue; + if (t !== "toJSON") return !1; + } + return !0; + } + function et() { + return !1; + } + function tt() { + return !0; + } + function ut(e) { + return !e || !e.parentNode || e.parentNode.nodeType === 11; + } + function at(e, t) { + do e = e[t]; + while (e && e.nodeType !== 1); + return e; + } + function ft(e, t, n) { + t = t || 0; + if (v.isFunction(t)) + return v.grep(e, function (e, r) { + var i = !!t.call(e, r, e); + return i === n; + }); + if (t.nodeType) + return v.grep(e, function (e, r) { + return (e === t) === n; + }); + if (typeof t == "string") { + var r = v.grep(e, function (e) { + return e.nodeType === 1; + }); + if (it.test(t)) return v.filter(t, r, !n); + t = v.filter(t, r); + } + return v.grep(e, function (e, r) { + return v.inArray(e, t) >= 0 === n; + }); + } + function lt(e) { + var t = ct.split("|"), + n = e.createDocumentFragment(); + if (n.createElement) while (t.length) n.createElement(t.pop()); + return n; + } + function Lt(e, t) { + return ( + e.getElementsByTagName(t)[0] || + e.appendChild(e.ownerDocument.createElement(t)) + ); + } + function At(e, t) { + if (t.nodeType !== 1 || !v.hasData(e)) return; + var n, + r, + i, + s = v._data(e), + o = v._data(t, s), + u = s.events; + if (u) { + delete o.handle, (o.events = {}); + for (n in u) + for (r = 0, i = u[n].length; r < i; r++) v.event.add(t, n, u[n][r]); + } + o.data && (o.data = v.extend({}, o.data)); + } + function Ot(e, t) { + var n; + if (t.nodeType !== 1) return; + t.clearAttributes && t.clearAttributes(), + t.mergeAttributes && t.mergeAttributes(e), + (n = t.nodeName.toLowerCase()), + n === "object" + ? (t.parentNode && (t.outerHTML = e.outerHTML), + v.support.html5Clone && + e.innerHTML && + !v.trim(t.innerHTML) && + (t.innerHTML = e.innerHTML)) + : n === "input" && Et.test(e.type) + ? ((t.defaultChecked = t.checked = e.checked), + t.value !== e.value && (t.value = e.value)) + : n === "option" + ? (t.selected = e.defaultSelected) + : n === "input" || n === "textarea" + ? (t.defaultValue = e.defaultValue) + : n === "script" && t.text !== e.text && (t.text = e.text), + t.removeAttribute(v.expando); + } + function Mt(e) { + return typeof e.getElementsByTagName != "undefined" + ? e.getElementsByTagName("*") + : typeof e.querySelectorAll != "undefined" + ? e.querySelectorAll("*") + : []; + } + function _t(e) { + Et.test(e.type) && (e.defaultChecked = e.checked); + } + function Qt(e, t) { + if (t in e) return t; + var n = t.charAt(0).toUpperCase() + t.slice(1), + r = t, + i = Jt.length; + while (i--) { + t = Jt[i] + n; + if (t in e) return t; + } + return r; + } + function Gt(e, t) { + return ( + (e = t || e), + v.css(e, "display") === "none" || !v.contains(e.ownerDocument, e) + ); + } + function Yt(e, t) { + var n, + r, + i = [], + s = 0, + o = e.length; + for (; s < o; s++) { + n = e[s]; + if (!n.style) continue; + (i[s] = v._data(n, "olddisplay")), + t + ? (!i[s] && n.style.display === "none" && (n.style.display = ""), + n.style.display === "" && + Gt(n) && + (i[s] = v._data(n, "olddisplay", nn(n.nodeName)))) + : ((r = Dt(n, "display")), + !i[s] && r !== "none" && v._data(n, "olddisplay", r)); + } + for (s = 0; s < o; s++) { + n = e[s]; + if (!n.style) continue; + if (!t || n.style.display === "none" || n.style.display === "") + n.style.display = t ? i[s] || "" : "none"; + } + return e; + } + function Zt(e, t, n) { + var r = Rt.exec(t); + return r ? Math.max(0, r[1] - (n || 0)) + (r[2] || "px") : t; + } + function en(e, t, n, r) { + var i = n === (r ? "border" : "content") ? 4 : t === "width" ? 1 : 0, + s = 0; + for (; i < 4; i += 2) + n === "margin" && (s += v.css(e, n + $t[i], !0)), + r + ? (n === "content" && + (s -= parseFloat(Dt(e, "padding" + $t[i])) || 0), + n !== "margin" && + (s -= parseFloat(Dt(e, "border" + $t[i] + "Width")) || 0)) + : ((s += parseFloat(Dt(e, "padding" + $t[i])) || 0), + n !== "padding" && + (s += parseFloat(Dt(e, "border" + $t[i] + "Width")) || 0)); + return s; + } + function tn(e, t, n) { + var r = t === "width" ? e.offsetWidth : e.offsetHeight, + i = !0, + s = v.support.boxSizing && v.css(e, "boxSizing") === "border-box"; + if (r <= 0 || r == null) { + r = Dt(e, t); + if (r < 0 || r == null) r = e.style[t]; + if (Ut.test(r)) return r; + (i = s && (v.support.boxSizingReliable || r === e.style[t])), + (r = parseFloat(r) || 0); + } + return r + en(e, t, n || (s ? "border" : "content"), i) + "px"; + } + function nn(e) { + if (Wt[e]) return Wt[e]; + var t = v("<" + e + ">").appendTo(i.body), + n = t.css("display"); + t.remove(); + if (n === "none" || n === "") { + Pt = i.body.appendChild( + Pt || + v.extend(i.createElement("iframe"), { + frameBorder: 0, + width: 0, + height: 0, + }), + ); + if (!Ht || !Pt.createElement) + (Ht = (Pt.contentWindow || Pt.contentDocument).document), + Ht.write(""), + Ht.close(); + (t = Ht.body.appendChild(Ht.createElement(e))), + (n = Dt(t, "display")), + i.body.removeChild(Pt); + } + return (Wt[e] = n), n; + } + function fn(e, t, n, r) { + var i; + if (v.isArray(t)) + v.each(t, function (t, i) { + n || sn.test(e) + ? r(e, i) + : fn(e + "[" + (typeof i == "object" ? t : "") + "]", i, n, r); + }); + else if (!n && v.type(t) === "object") + for (i in t) fn(e + "[" + i + "]", t[i], n, r); + else r(e, t); + } + function Cn(e) { + return function (t, n) { + typeof t != "string" && ((n = t), (t = "*")); + var r, + i, + s, + o = t.toLowerCase().split(y), + u = 0, + a = o.length; + if (v.isFunction(n)) + for (; u < a; u++) + (r = o[u]), + (s = /^\+/.test(r)), + s && (r = r.substr(1) || "*"), + (i = e[r] = e[r] || []), + i[s ? "unshift" : "push"](n); + }; + } + function kn(e, n, r, i, s, o) { + (s = s || n.dataTypes[0]), (o = o || {}), (o[s] = !0); + var u, + a = e[s], + f = 0, + l = a ? a.length : 0, + c = e === Sn; + for (; f < l && (c || !u); f++) + (u = a[f](n, r, i)), + typeof u == "string" && + (!c || o[u] + ? (u = t) + : (n.dataTypes.unshift(u), (u = kn(e, n, r, i, u, o)))); + return (c || !u) && !o["*"] && (u = kn(e, n, r, i, "*", o)), u; + } + function Ln(e, n) { + var r, + i, + s = v.ajaxSettings.flatOptions || {}; + for (r in n) n[r] !== t && ((s[r] ? e : i || (i = {}))[r] = n[r]); + i && v.extend(!0, e, i); + } + function An(e, n, r) { + var i, + s, + o, + u, + a = e.contents, + f = e.dataTypes, + l = e.responseFields; + for (s in l) s in r && (n[l[s]] = r[s]); + while (f[0] === "*") + f.shift(), + i === t && (i = e.mimeType || n.getResponseHeader("content-type")); + if (i) + for (s in a) + if (a[s] && a[s].test(i)) { + f.unshift(s); + break; + } + if (f[0] in r) o = f[0]; + else { + for (s in r) { + if (!f[0] || e.converters[s + " " + f[0]]) { + o = s; + break; + } + u || (u = s); + } + o = o || u; + } + if (o) return o !== f[0] && f.unshift(o), r[o]; + } + function On(e, t) { + var n, + r, + i, + s, + o = e.dataTypes.slice(), + u = o[0], + a = {}, + f = 0; + e.dataFilter && (t = e.dataFilter(t, e.dataType)); + if (o[1]) for (n in e.converters) a[n.toLowerCase()] = e.converters[n]; + for (; (i = o[++f]); ) + if (i !== "*") { + if (u !== "*" && u !== i) { + n = a[u + " " + i] || a["* " + i]; + if (!n) + for (r in a) { + s = r.split(" "); + if (s[1] === i) { + n = a[u + " " + s[0]] || a["* " + s[0]]; + if (n) { + n === !0 + ? (n = a[r]) + : a[r] !== !0 && ((i = s[0]), o.splice(f--, 0, i)); + break; + } + } + } + if (n !== !0) + if (n && e["throws"]) t = n(t); + else + try { + t = n(t); + } catch (l) { + return { + state: "parsererror", + error: n ? l : "No conversion from " + u + " to " + i, + }; + } + } + u = i; + } + return { state: "success", data: t }; + } + function Fn() { + try { + return new e.XMLHttpRequest(); + } catch (t) {} + } + function In() { + try { + return new e.ActiveXObject("Microsoft.XMLHTTP"); + } catch (t) {} + } + function $n() { + return ( + setTimeout(function () { + qn = t; + }, 0), + (qn = v.now()) + ); + } + function Jn(e, t) { + v.each(t, function (t, n) { + var r = (Vn[t] || []).concat(Vn["*"]), + i = 0, + s = r.length; + for (; i < s; i++) if (r[i].call(e, t, n)) return; + }); + } + function Kn(e, t, n) { + var r, + i = 0, + s = 0, + o = Xn.length, + u = v.Deferred().always(function () { + delete a.elem; + }), + a = function () { + var t = qn || $n(), + n = Math.max(0, f.startTime + f.duration - t), + r = n / f.duration || 0, + i = 1 - r, + s = 0, + o = f.tweens.length; + for (; s < o; s++) f.tweens[s].run(i); + return ( + u.notifyWith(e, [f, i, n]), + i < 1 && o ? n : (u.resolveWith(e, [f]), !1) + ); + }, + f = u.promise({ + elem: e, + props: v.extend({}, t), + opts: v.extend(!0, { specialEasing: {} }, n), + originalProperties: t, + originalOptions: n, + startTime: qn || $n(), + duration: n.duration, + tweens: [], + createTween: function (t, n, r) { + var i = v.Tween( + e, + f.opts, + t, + n, + f.opts.specialEasing[t] || f.opts.easing, + ); + return f.tweens.push(i), i; + }, + stop: function (t) { + var n = 0, + r = t ? f.tweens.length : 0; + for (; n < r; n++) f.tweens[n].run(1); + return t ? u.resolveWith(e, [f, t]) : u.rejectWith(e, [f, t]), this; + }, + }), + l = f.props; + Qn(l, f.opts.specialEasing); + for (; i < o; i++) { + r = Xn[i].call(f, e, l, f.opts); + if (r) return r; + } + return ( + Jn(f, l), + v.isFunction(f.opts.start) && f.opts.start.call(e, f), + v.fx.timer(v.extend(a, { anim: f, queue: f.opts.queue, elem: e })), + f + .progress(f.opts.progress) + .done(f.opts.done, f.opts.complete) + .fail(f.opts.fail) + .always(f.opts.always) + ); + } + function Qn(e, t) { + var n, r, i, s, o; + for (n in e) { + (r = v.camelCase(n)), + (i = t[r]), + (s = e[n]), + v.isArray(s) && ((i = s[1]), (s = e[n] = s[0])), + n !== r && ((e[r] = s), delete e[n]), + (o = v.cssHooks[r]); + if (o && "expand" in o) { + (s = o.expand(s)), delete e[r]; + for (n in s) n in e || ((e[n] = s[n]), (t[n] = i)); + } else t[r] = i; + } + } + function Gn(e, t, n) { + var r, + i, + s, + o, + u, + a, + f, + l, + c, + h = this, + p = e.style, + d = {}, + m = [], + g = e.nodeType && Gt(e); + n.queue || + ((l = v._queueHooks(e, "fx")), + l.unqueued == null && + ((l.unqueued = 0), + (c = l.empty.fire), + (l.empty.fire = function () { + l.unqueued || c(); + })), + l.unqueued++, + h.always(function () { + h.always(function () { + l.unqueued--, v.queue(e, "fx").length || l.empty.fire(); + }); + })), + e.nodeType === 1 && + ("height" in t || "width" in t) && + ((n.overflow = [p.overflow, p.overflowX, p.overflowY]), + v.css(e, "display") === "inline" && + v.css(e, "float") === "none" && + (!v.support.inlineBlockNeedsLayout || nn(e.nodeName) === "inline" + ? (p.display = "inline-block") + : (p.zoom = 1))), + n.overflow && + ((p.overflow = "hidden"), + v.support.shrinkWrapBlocks || + h.done(function () { + (p.overflow = n.overflow[0]), + (p.overflowX = n.overflow[1]), + (p.overflowY = n.overflow[2]); + })); + for (r in t) { + s = t[r]; + if (Un.exec(s)) { + delete t[r], (a = a || s === "toggle"); + if (s === (g ? "hide" : "show")) continue; + m.push(r); + } + } + o = m.length; + if (o) { + (u = v._data(e, "fxshow") || v._data(e, "fxshow", {})), + "hidden" in u && (g = u.hidden), + a && (u.hidden = !g), + g + ? v(e).show() + : h.done(function () { + v(e).hide(); + }), + h.done(function () { + var t; + v.removeData(e, "fxshow", !0); + for (t in d) v.style(e, t, d[t]); + }); + for (r = 0; r < o; r++) + (i = m[r]), + (f = h.createTween(i, g ? u[i] : 0)), + (d[i] = u[i] || v.style(e, i)), + i in u || + ((u[i] = f.start), + g && + ((f.end = f.start), + (f.start = i === "width" || i === "height" ? 1 : 0))); + } + } + function Yn(e, t, n, r, i) { + return new Yn.prototype.init(e, t, n, r, i); + } + function Zn(e, t) { + var n, + r = { height: e }, + i = 0; + t = t ? 1 : 0; + for (; i < 4; i += 2 - t) + (n = $t[i]), (r["margin" + n] = r["padding" + n] = e); + return t && (r.opacity = r.width = e), r; + } + function tr(e) { + return v.isWindow(e) + ? e + : e.nodeType === 9 + ? e.defaultView || e.parentWindow + : !1; + } + var n, + r, + i = e.document, + s = e.location, + o = e.navigator, + u = e.jQuery, + a = e.$, + f = Array.prototype.push, + l = Array.prototype.slice, + c = Array.prototype.indexOf, + h = Object.prototype.toString, + p = Object.prototype.hasOwnProperty, + d = String.prototype.trim, + v = function (e, t) { + return new v.fn.init(e, t, n); + }, + m = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, + g = /\S/, + y = /\s+/, + b = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + w = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + E = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + S = /^[\],:{}\s]*$/, + x = /(?:^|:|,)(?:\s*\[)+/g, + T = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + N = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, + C = /^-ms-/, + k = /-([\da-z])/gi, + L = function (e, t) { + return (t + "").toUpperCase(); + }, + A = function () { + i.addEventListener + ? (i.removeEventListener("DOMContentLoaded", A, !1), v.ready()) + : i.readyState === "complete" && + (i.detachEvent("onreadystatechange", A), v.ready()); + }, + O = {}; + (v.fn = v.prototype = + { + constructor: v, + init: function (e, n, r) { + var s, o, u, a; + if (!e) return this; + if (e.nodeType) + return (this.context = this[0] = e), (this.length = 1), this; + if (typeof e == "string") { + e.charAt(0) === "<" && e.charAt(e.length - 1) === ">" && e.length >= 3 + ? (s = [null, e, null]) + : (s = w.exec(e)); + if (s && (s[1] || !n)) { + if (s[1]) + return ( + (n = n instanceof v ? n[0] : n), + (a = n && n.nodeType ? n.ownerDocument || n : i), + (e = v.parseHTML(s[1], a, !0)), + E.test(s[1]) && v.isPlainObject(n) && this.attr.call(e, n, !0), + v.merge(this, e) + ); + o = i.getElementById(s[2]); + if (o && o.parentNode) { + if (o.id !== s[2]) return r.find(e); + (this.length = 1), (this[0] = o); + } + return (this.context = i), (this.selector = e), this; + } + return !n || n.jquery + ? (n || r).find(e) + : this.constructor(n).find(e); + } + return v.isFunction(e) + ? r.ready(e) + : (e.selector !== t && + ((this.selector = e.selector), (this.context = e.context)), + v.makeArray(e, this)); + }, + selector: "", + jquery: "1.8.3", + length: 0, + size: function () { + return this.length; + }, + toArray: function () { + return l.call(this); + }, + get: function (e) { + return e == null + ? this.toArray() + : e < 0 + ? this[this.length + e] + : this[e]; + }, + pushStack: function (e, t, n) { + var r = v.merge(this.constructor(), e); + return ( + (r.prevObject = this), + (r.context = this.context), + t === "find" + ? (r.selector = this.selector + (this.selector ? " " : "") + n) + : t && (r.selector = this.selector + "." + t + "(" + n + ")"), + r + ); + }, + each: function (e, t) { + return v.each(this, e, t); + }, + ready: function (e) { + return v.ready.promise().done(e), this; + }, + eq: function (e) { + return (e = +e), e === -1 ? this.slice(e) : this.slice(e, e + 1); + }, + first: function () { + return this.eq(0); + }, + last: function () { + return this.eq(-1); + }, + slice: function () { + return this.pushStack( + l.apply(this, arguments), + "slice", + l.call(arguments).join(","), + ); + }, + map: function (e) { + return this.pushStack( + v.map(this, function (t, n) { + return e.call(t, n, t); + }), + ); + }, + end: function () { + return this.prevObject || this.constructor(null); + }, + push: f, + sort: [].sort, + splice: [].splice, + }), + (v.fn.init.prototype = v.fn), + (v.extend = v.fn.extend = + function () { + var e, + n, + r, + i, + s, + o, + u = arguments[0] || {}, + a = 1, + f = arguments.length, + l = !1; + typeof u == "boolean" && ((l = u), (u = arguments[1] || {}), (a = 2)), + typeof u != "object" && !v.isFunction(u) && (u = {}), + f === a && ((u = this), --a); + for (; a < f; a++) + if ((e = arguments[a]) != null) + for (n in e) { + (r = u[n]), (i = e[n]); + if (u === i) continue; + l && i && (v.isPlainObject(i) || (s = v.isArray(i))) + ? (s + ? ((s = !1), (o = r && v.isArray(r) ? r : [])) + : (o = r && v.isPlainObject(r) ? r : {}), + (u[n] = v.extend(l, o, i))) + : i !== t && (u[n] = i); + } + return u; + }), + v.extend({ + noConflict: function (t) { + return e.$ === v && (e.$ = a), t && e.jQuery === v && (e.jQuery = u), v; + }, + isReady: !1, + readyWait: 1, + holdReady: function (e) { + e ? v.readyWait++ : v.ready(!0); + }, + ready: function (e) { + if (e === !0 ? --v.readyWait : v.isReady) return; + if (!i.body) return setTimeout(v.ready, 1); + v.isReady = !0; + if (e !== !0 && --v.readyWait > 0) return; + r.resolveWith(i, [v]), + v.fn.trigger && v(i).trigger("ready").off("ready"); + }, + isFunction: function (e) { + return v.type(e) === "function"; + }, + isArray: + Array.isArray || + function (e) { + return v.type(e) === "array"; + }, + isWindow: function (e) { + return e != null && e == e.window; + }, + isNumeric: function (e) { + return !isNaN(parseFloat(e)) && isFinite(e); + }, + type: function (e) { + return e == null ? String(e) : O[h.call(e)] || "object"; + }, + isPlainObject: function (e) { + if (!e || v.type(e) !== "object" || e.nodeType || v.isWindow(e)) + return !1; + try { + if ( + e.constructor && + !p.call(e, "constructor") && + !p.call(e.constructor.prototype, "isPrototypeOf") + ) + return !1; + } catch (n) { + return !1; + } + var r; + for (r in e); + return r === t || p.call(e, r); + }, + isEmptyObject: function (e) { + var t; + for (t in e) return !1; + return !0; + }, + error: function (e) { + throw new Error(e); + }, + parseHTML: function (e, t, n) { + var r; + return !e || typeof e != "string" + ? null + : (typeof t == "boolean" && ((n = t), (t = 0)), + (t = t || i), + (r = E.exec(e)) + ? [t.createElement(r[1])] + : ((r = v.buildFragment([e], t, n ? null : [])), + v.merge( + [], + (r.cacheable ? v.clone(r.fragment) : r.fragment).childNodes, + ))); + }, + parseJSON: function (t) { + if (!t || typeof t != "string") return null; + t = v.trim(t); + if (e.JSON && e.JSON.parse) return e.JSON.parse(t); + if (S.test(t.replace(T, "@").replace(N, "]").replace(x, ""))) + return new Function("return " + t)(); + v.error("Invalid JSON: " + t); + }, + parseXML: function (n) { + var r, i; + if (!n || typeof n != "string") return null; + try { + e.DOMParser + ? ((i = new DOMParser()), (r = i.parseFromString(n, "text/xml"))) + : ((r = new ActiveXObject("Microsoft.XMLDOM")), + (r.async = "false"), + r.loadXML(n)); + } catch (s) { + r = t; + } + return ( + (!r || + !r.documentElement || + r.getElementsByTagName("parsererror").length) && + v.error("Invalid XML: " + n), + r + ); + }, + noop: function () {}, + globalEval: function (t) { + t && + g.test(t) && + ( + e.execScript || + function (t) { + e.eval.call(e, t); + } + )(t); + }, + camelCase: function (e) { + return e.replace(C, "ms-").replace(k, L); + }, + nodeName: function (e, t) { + return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase(); + }, + each: function (e, n, r) { + var i, + s = 0, + o = e.length, + u = o === t || v.isFunction(e); + if (r) { + if (u) { + for (i in e) if (n.apply(e[i], r) === !1) break; + } else for (; s < o; ) if (n.apply(e[s++], r) === !1) break; + } else if (u) { + for (i in e) if (n.call(e[i], i, e[i]) === !1) break; + } else for (; s < o; ) if (n.call(e[s], s, e[s++]) === !1) break; + return e; + }, + trim: + d && !d.call("\ufeff\u00a0") + ? function (e) { + return e == null ? "" : d.call(e); + } + : function (e) { + return e == null ? "" : (e + "").replace(b, ""); + }, + makeArray: function (e, t) { + var n, + r = t || []; + return ( + e != null && + ((n = v.type(e)), + e.length == null || + n === "string" || + n === "function" || + n === "regexp" || + v.isWindow(e) + ? f.call(r, e) + : v.merge(r, e)), + r + ); + }, + inArray: function (e, t, n) { + var r; + if (t) { + if (c) return c.call(t, e, n); + (r = t.length), (n = n ? (n < 0 ? Math.max(0, r + n) : n) : 0); + for (; n < r; n++) if (n in t && t[n] === e) return n; + } + return -1; + }, + merge: function (e, n) { + var r = n.length, + i = e.length, + s = 0; + if (typeof r == "number") for (; s < r; s++) e[i++] = n[s]; + else while (n[s] !== t) e[i++] = n[s++]; + return (e.length = i), e; + }, + grep: function (e, t, n) { + var r, + i = [], + s = 0, + o = e.length; + n = !!n; + for (; s < o; s++) (r = !!t(e[s], s)), n !== r && i.push(e[s]); + return i; + }, + map: function (e, n, r) { + var i, + s, + o = [], + u = 0, + a = e.length, + f = + e instanceof v || + (a !== t && + typeof a == "number" && + ((a > 0 && e[0] && e[a - 1]) || a === 0 || v.isArray(e))); + if (f) + for (; u < a; u++) + (i = n(e[u], u, r)), i != null && (o[o.length] = i); + else for (s in e) (i = n(e[s], s, r)), i != null && (o[o.length] = i); + return o.concat.apply([], o); + }, + guid: 1, + proxy: function (e, n) { + var r, i, s; + return ( + typeof n == "string" && ((r = e[n]), (n = e), (e = r)), + v.isFunction(e) + ? ((i = l.call(arguments, 2)), + (s = function () { + return e.apply(n, i.concat(l.call(arguments))); + }), + (s.guid = e.guid = e.guid || v.guid++), + s) + : t + ); + }, + access: function (e, n, r, i, s, o, u) { + var a, + f = r == null, + l = 0, + c = e.length; + if (r && typeof r == "object") { + for (l in r) v.access(e, n, l, r[l], 1, o, i); + s = 1; + } else if (i !== t) { + (a = u === t && v.isFunction(i)), + f && + (a + ? ((a = n), + (n = function (e, t, n) { + return a.call(v(e), n); + })) + : (n.call(e, i), (n = null))); + if (n) + for (; l < c; l++) + n(e[l], r, a ? i.call(e[l], l, n(e[l], r)) : i, u); + s = 1; + } + return s ? e : f ? n.call(e) : c ? n(e[0], r) : o; + }, + now: function () { + return new Date().getTime(); + }, + }), + (v.ready.promise = function (t) { + if (!r) { + r = v.Deferred(); + if (i.readyState === "complete") setTimeout(v.ready, 1); + else if (i.addEventListener) + i.addEventListener("DOMContentLoaded", A, !1), + e.addEventListener("load", v.ready, !1); + else { + i.attachEvent("onreadystatechange", A), + e.attachEvent("onload", v.ready); + var n = !1; + try { + n = e.frameElement == null && i.documentElement; + } catch (s) {} + n && + n.doScroll && + (function o() { + if (!v.isReady) { + try { + n.doScroll("left"); + } catch (e) { + return setTimeout(o, 50); + } + v.ready(); + } + })(); + } + } + return r.promise(t); + }), + v.each( + "Boolean Number String Function Array Date RegExp Object".split(" "), + function (e, t) { + O["[object " + t + "]"] = t.toLowerCase(); + }, + ), + (n = v(i)); + var M = {}; + (v.Callbacks = function (e) { + e = typeof e == "string" ? M[e] || _(e) : v.extend({}, e); + var n, + r, + i, + s, + o, + u, + a = [], + f = !e.once && [], + l = function (t) { + (n = e.memory && t), + (r = !0), + (u = s || 0), + (s = 0), + (o = a.length), + (i = !0); + for (; a && u < o; u++) + if (a[u].apply(t[0], t[1]) === !1 && e.stopOnFalse) { + n = !1; + break; + } + (i = !1), + a && (f ? f.length && l(f.shift()) : n ? (a = []) : c.disable()); + }, + c = { + add: function () { + if (a) { + var t = a.length; + (function r(t) { + v.each(t, function (t, n) { + var i = v.type(n); + i === "function" + ? (!e.unique || !c.has(n)) && a.push(n) + : n && n.length && i !== "string" && r(n); + }); + })(arguments), + i ? (o = a.length) : n && ((s = t), l(n)); + } + return this; + }, + remove: function () { + return ( + a && + v.each(arguments, function (e, t) { + var n; + while ((n = v.inArray(t, a, n)) > -1) + a.splice(n, 1), i && (n <= o && o--, n <= u && u--); + }), + this + ); + }, + has: function (e) { + return v.inArray(e, a) > -1; + }, + empty: function () { + return (a = []), this; + }, + disable: function () { + return (a = f = n = t), this; + }, + disabled: function () { + return !a; + }, + lock: function () { + return (f = t), n || c.disable(), this; + }, + locked: function () { + return !f; + }, + fireWith: function (e, t) { + return ( + (t = t || []), + (t = [e, t.slice ? t.slice() : t]), + a && (!r || f) && (i ? f.push(t) : l(t)), + this + ); + }, + fire: function () { + return c.fireWith(this, arguments), this; + }, + fired: function () { + return !!r; + }, + }; + return c; + }), + v.extend({ + Deferred: function (e) { + var t = [ + ["resolve", "done", v.Callbacks("once memory"), "resolved"], + ["reject", "fail", v.Callbacks("once memory"), "rejected"], + ["notify", "progress", v.Callbacks("memory")], + ], + n = "pending", + r = { + state: function () { + return n; + }, + always: function () { + return i.done(arguments).fail(arguments), this; + }, + then: function () { + var e = arguments; + return v + .Deferred(function (n) { + v.each(t, function (t, r) { + var s = r[0], + o = e[t]; + i[r[1]]( + v.isFunction(o) + ? function () { + var e = o.apply(this, arguments); + e && v.isFunction(e.promise) + ? e + .promise() + .done(n.resolve) + .fail(n.reject) + .progress(n.notify) + : n[s + "With"](this === i ? n : this, [e]); + } + : n[s], + ); + }), + (e = null); + }) + .promise(); + }, + promise: function (e) { + return e != null ? v.extend(e, r) : r; + }, + }, + i = {}; + return ( + (r.pipe = r.then), + v.each(t, function (e, s) { + var o = s[2], + u = s[3]; + (r[s[1]] = o.add), + u && + o.add( + function () { + n = u; + }, + t[e ^ 1][2].disable, + t[2][2].lock, + ), + (i[s[0]] = o.fire), + (i[s[0] + "With"] = o.fireWith); + }), + r.promise(i), + e && e.call(i, i), + i + ); + }, + when: function (e) { + var t = 0, + n = l.call(arguments), + r = n.length, + i = r !== 1 || (e && v.isFunction(e.promise)) ? r : 0, + s = i === 1 ? e : v.Deferred(), + o = function (e, t, n) { + return function (r) { + (t[e] = this), + (n[e] = arguments.length > 1 ? l.call(arguments) : r), + n === u ? s.notifyWith(t, n) : --i || s.resolveWith(t, n); + }; + }, + u, + a, + f; + if (r > 1) { + (u = new Array(r)), (a = new Array(r)), (f = new Array(r)); + for (; t < r; t++) + n[t] && v.isFunction(n[t].promise) + ? n[t] + .promise() + .done(o(t, f, n)) + .fail(s.reject) + .progress(o(t, a, u)) + : --i; + } + return i || s.resolveWith(f, n), s.promise(); + }, + }), + (v.support = (function () { + var t, + n, + r, + s, + o, + u, + a, + f, + l, + c, + h, + p = i.createElement("div"); + p.setAttribute("className", "t"), + (p.innerHTML = + "
          a"), + (n = p.getElementsByTagName("*")), + (r = p.getElementsByTagName("a")[0]); + if (!n || !r || !n.length) return {}; + (s = i.createElement("select")), + (o = s.appendChild(i.createElement("option"))), + (u = p.getElementsByTagName("input")[0]), + (r.style.cssText = "top:1px;float:left;opacity:.5"), + (t = { + leadingWhitespace: p.firstChild.nodeType === 3, + tbody: !p.getElementsByTagName("tbody").length, + htmlSerialize: !!p.getElementsByTagName("link").length, + style: /top/.test(r.getAttribute("style")), + hrefNormalized: r.getAttribute("href") === "/a", + opacity: /^0.5/.test(r.style.opacity), + cssFloat: !!r.style.cssFloat, + checkOn: u.value === "on", + optSelected: o.selected, + getSetAttribute: p.className !== "t", + enctype: !!i.createElement("form").enctype, + html5Clone: + i.createElement("nav").cloneNode(!0).outerHTML !== "<:nav>", + boxModel: i.compatMode === "CSS1Compat", + submitBubbles: !0, + changeBubbles: !0, + focusinBubbles: !1, + deleteExpando: !0, + noCloneEvent: !0, + inlineBlockNeedsLayout: !1, + shrinkWrapBlocks: !1, + reliableMarginRight: !0, + boxSizingReliable: !0, + pixelPosition: !1, + }), + (u.checked = !0), + (t.noCloneChecked = u.cloneNode(!0).checked), + (s.disabled = !0), + (t.optDisabled = !o.disabled); + try { + delete p.test; + } catch (d) { + t.deleteExpando = !1; + } + !p.addEventListener && + p.attachEvent && + p.fireEvent && + (p.attachEvent( + "onclick", + (h = function () { + t.noCloneEvent = !1; + }), + ), + p.cloneNode(!0).fireEvent("onclick"), + p.detachEvent("onclick", h)), + (u = i.createElement("input")), + (u.value = "t"), + u.setAttribute("type", "radio"), + (t.radioValue = u.value === "t"), + u.setAttribute("checked", "checked"), + u.setAttribute("name", "t"), + p.appendChild(u), + (a = i.createDocumentFragment()), + a.appendChild(p.lastChild), + (t.checkClone = a.cloneNode(!0).cloneNode(!0).lastChild.checked), + (t.appendChecked = u.checked), + a.removeChild(u), + a.appendChild(p); + if (p.attachEvent) + for (l in { submit: !0, change: !0, focusin: !0 }) + (f = "on" + l), + (c = f in p), + c || + (p.setAttribute(f, "return;"), (c = typeof p[f] == "function")), + (t[l + "Bubbles"] = c); + return ( + v(function () { + var n, + r, + s, + o, + u = "padding:0;margin:0;border:0;display:block;overflow:hidden;", + a = i.getElementsByTagName("body")[0]; + if (!a) return; + (n = i.createElement("div")), + (n.style.cssText = + "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"), + a.insertBefore(n, a.firstChild), + (r = i.createElement("div")), + n.appendChild(r), + (r.innerHTML = "
          t
          "), + (s = r.getElementsByTagName("td")), + (s[0].style.cssText = "padding:0;margin:0;border:0;display:none"), + (c = s[0].offsetHeight === 0), + (s[0].style.display = ""), + (s[1].style.display = "none"), + (t.reliableHiddenOffsets = c && s[0].offsetHeight === 0), + (r.innerHTML = ""), + (r.style.cssText = + "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"), + (t.boxSizing = r.offsetWidth === 4), + (t.doesNotIncludeMarginInBodyOffset = a.offsetTop !== 1), + e.getComputedStyle && + ((t.pixelPosition = + (e.getComputedStyle(r, null) || {}).top !== "1%"), + (t.boxSizingReliable = + (e.getComputedStyle(r, null) || { width: "4px" }).width === + "4px"), + (o = i.createElement("div")), + (o.style.cssText = r.style.cssText = u), + (o.style.marginRight = o.style.width = "0"), + (r.style.width = "1px"), + r.appendChild(o), + (t.reliableMarginRight = !parseFloat( + (e.getComputedStyle(o, null) || {}).marginRight, + ))), + typeof r.style.zoom != "undefined" && + ((r.innerHTML = ""), + (r.style.cssText = + u + "width:1px;padding:1px;display:inline;zoom:1"), + (t.inlineBlockNeedsLayout = r.offsetWidth === 3), + (r.style.display = "block"), + (r.style.overflow = "visible"), + (r.innerHTML = "
          "), + (r.firstChild.style.width = "5px"), + (t.shrinkWrapBlocks = r.offsetWidth !== 3), + (n.style.zoom = 1)), + a.removeChild(n), + (n = r = s = o = null); + }), + a.removeChild(p), + (n = r = s = o = u = a = p = null), + t + ); + })()); + var D = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + P = /([A-Z])/g; + v.extend({ + cache: {}, + deletedIds: [], + uuid: 0, + expando: "jQuery" + (v.fn.jquery + Math.random()).replace(/\D/g, ""), + noData: { + embed: !0, + object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + applet: !0, + }, + hasData: function (e) { + return ( + (e = e.nodeType ? v.cache[e[v.expando]] : e[v.expando]), !!e && !B(e) + ); + }, + data: function (e, n, r, i) { + if (!v.acceptData(e)) return; + var s, + o, + u = v.expando, + a = typeof n == "string", + f = e.nodeType, + l = f ? v.cache : e, + c = f ? e[u] : e[u] && u; + if ((!c || !l[c] || (!i && !l[c].data)) && a && r === t) return; + c || (f ? (e[u] = c = v.deletedIds.pop() || v.guid++) : (c = u)), + l[c] || ((l[c] = {}), f || (l[c].toJSON = v.noop)); + if (typeof n == "object" || typeof n == "function") + i ? (l[c] = v.extend(l[c], n)) : (l[c].data = v.extend(l[c].data, n)); + return ( + (s = l[c]), + i || (s.data || (s.data = {}), (s = s.data)), + r !== t && (s[v.camelCase(n)] = r), + a ? ((o = s[n]), o == null && (o = s[v.camelCase(n)])) : (o = s), + o + ); + }, + removeData: function (e, t, n) { + if (!v.acceptData(e)) return; + var r, + i, + s, + o = e.nodeType, + u = o ? v.cache : e, + a = o ? e[v.expando] : v.expando; + if (!u[a]) return; + if (t) { + r = n ? u[a] : u[a].data; + if (r) { + v.isArray(t) || + (t in r + ? (t = [t]) + : ((t = v.camelCase(t)), + t in r ? (t = [t]) : (t = t.split(" ")))); + for (i = 0, s = t.length; i < s; i++) delete r[t[i]]; + if (!(n ? B : v.isEmptyObject)(r)) return; + } + } + if (!n) { + delete u[a].data; + if (!B(u[a])) return; + } + o + ? v.cleanData([e], !0) + : v.support.deleteExpando || u != u.window + ? delete u[a] + : (u[a] = null); + }, + _data: function (e, t, n) { + return v.data(e, t, n, !0); + }, + acceptData: function (e) { + var t = e.nodeName && v.noData[e.nodeName.toLowerCase()]; + return !t || (t !== !0 && e.getAttribute("classid") === t); + }, + }), + v.fn.extend({ + data: function (e, n) { + var r, + i, + s, + o, + u, + a = this[0], + f = 0, + l = null; + if (e === t) { + if (this.length) { + l = v.data(a); + if (a.nodeType === 1 && !v._data(a, "parsedAttrs")) { + s = a.attributes; + for (u = s.length; f < u; f++) + (o = s[f].name), + o.indexOf("data-") || + ((o = v.camelCase(o.substring(5))), H(a, o, l[o])); + v._data(a, "parsedAttrs", !0); + } + } + return l; + } + return typeof e == "object" + ? this.each(function () { + v.data(this, e); + }) + : ((r = e.split(".", 2)), + (r[1] = r[1] ? "." + r[1] : ""), + (i = r[1] + "!"), + v.access( + this, + function (n) { + if (n === t) + return ( + (l = this.triggerHandler("getData" + i, [r[0]])), + l === t && a && ((l = v.data(a, e)), (l = H(a, e, l))), + l === t && r[1] ? this.data(r[0]) : l + ); + (r[1] = n), + this.each(function () { + var t = v(this); + t.triggerHandler("setData" + i, r), + v.data(this, e, n), + t.triggerHandler("changeData" + i, r); + }); + }, + null, + n, + arguments.length > 1, + null, + !1, + )); + }, + removeData: function (e) { + return this.each(function () { + v.removeData(this, e); + }); + }, + }), + v.extend({ + queue: function (e, t, n) { + var r; + if (e) + return ( + (t = (t || "fx") + "queue"), + (r = v._data(e, t)), + n && + (!r || v.isArray(n) + ? (r = v._data(e, t, v.makeArray(n))) + : r.push(n)), + r || [] + ); + }, + dequeue: function (e, t) { + t = t || "fx"; + var n = v.queue(e, t), + r = n.length, + i = n.shift(), + s = v._queueHooks(e, t), + o = function () { + v.dequeue(e, t); + }; + i === "inprogress" && ((i = n.shift()), r--), + i && + (t === "fx" && n.unshift("inprogress"), + delete s.stop, + i.call(e, o, s)), + !r && s && s.empty.fire(); + }, + _queueHooks: function (e, t) { + var n = t + "queueHooks"; + return ( + v._data(e, n) || + v._data(e, n, { + empty: v.Callbacks("once memory").add(function () { + v.removeData(e, t + "queue", !0), v.removeData(e, n, !0); + }), + }) + ); + }, + }), + v.fn.extend({ + queue: function (e, n) { + var r = 2; + return ( + typeof e != "string" && ((n = e), (e = "fx"), r--), + arguments.length < r + ? v.queue(this[0], e) + : n === t + ? this + : this.each(function () { + var t = v.queue(this, e, n); + v._queueHooks(this, e), + e === "fx" && t[0] !== "inprogress" && v.dequeue(this, e); + }) + ); + }, + dequeue: function (e) { + return this.each(function () { + v.dequeue(this, e); + }); + }, + delay: function (e, t) { + return ( + (e = v.fx ? v.fx.speeds[e] || e : e), + (t = t || "fx"), + this.queue(t, function (t, n) { + var r = setTimeout(t, e); + n.stop = function () { + clearTimeout(r); + }; + }) + ); + }, + clearQueue: function (e) { + return this.queue(e || "fx", []); + }, + promise: function (e, n) { + var r, + i = 1, + s = v.Deferred(), + o = this, + u = this.length, + a = function () { + --i || s.resolveWith(o, [o]); + }; + typeof e != "string" && ((n = e), (e = t)), (e = e || "fx"); + while (u--) + (r = v._data(o[u], e + "queueHooks")), + r && r.empty && (i++, r.empty.add(a)); + return a(), s.promise(n); + }, + }); + var j, + F, + I, + q = /[\t\r\n]/g, + R = /\r/g, + U = /^(?:button|input)$/i, + z = /^(?:button|input|object|select|textarea)$/i, + W = /^a(?:rea|)$/i, + X = + /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + V = v.support.getSetAttribute; + v.fn.extend({ + attr: function (e, t) { + return v.access(this, v.attr, e, t, arguments.length > 1); + }, + removeAttr: function (e) { + return this.each(function () { + v.removeAttr(this, e); + }); + }, + prop: function (e, t) { + return v.access(this, v.prop, e, t, arguments.length > 1); + }, + removeProp: function (e) { + return ( + (e = v.propFix[e] || e), + this.each(function () { + try { + (this[e] = t), delete this[e]; + } catch (n) {} + }) + ); + }, + addClass: function (e) { + var t, n, r, i, s, o, u; + if (v.isFunction(e)) + return this.each(function (t) { + v(this).addClass(e.call(this, t, this.className)); + }); + if (e && typeof e == "string") { + t = e.split(y); + for (n = 0, r = this.length; n < r; n++) { + i = this[n]; + if (i.nodeType === 1) + if (!i.className && t.length === 1) i.className = e; + else { + s = " " + i.className + " "; + for (o = 0, u = t.length; o < u; o++) + s.indexOf(" " + t[o] + " ") < 0 && (s += t[o] + " "); + i.className = v.trim(s); + } + } + } + return this; + }, + removeClass: function (e) { + var n, r, i, s, o, u, a; + if (v.isFunction(e)) + return this.each(function (t) { + v(this).removeClass(e.call(this, t, this.className)); + }); + if ((e && typeof e == "string") || e === t) { + n = (e || "").split(y); + for (u = 0, a = this.length; u < a; u++) { + i = this[u]; + if (i.nodeType === 1 && i.className) { + r = (" " + i.className + " ").replace(q, " "); + for (s = 0, o = n.length; s < o; s++) + while (r.indexOf(" " + n[s] + " ") >= 0) + r = r.replace(" " + n[s] + " ", " "); + i.className = e ? v.trim(r) : ""; + } + } + } + return this; + }, + toggleClass: function (e, t) { + var n = typeof e, + r = typeof t == "boolean"; + return v.isFunction(e) + ? this.each(function (n) { + v(this).toggleClass(e.call(this, n, this.className, t), t); + }) + : this.each(function () { + if (n === "string") { + var i, + s = 0, + o = v(this), + u = t, + a = e.split(y); + while ((i = a[s++])) + (u = r ? u : !o.hasClass(i)), + o[u ? "addClass" : "removeClass"](i); + } else if (n === "undefined" || n === "boolean") + this.className && v._data(this, "__className__", this.className), + (this.className = + this.className || e === !1 + ? "" + : v._data(this, "__className__") || ""); + }); + }, + hasClass: function (e) { + var t = " " + e + " ", + n = 0, + r = this.length; + for (; n < r; n++) + if ( + this[n].nodeType === 1 && + (" " + this[n].className + " ").replace(q, " ").indexOf(t) >= 0 + ) + return !0; + return !1; + }, + val: function (e) { + var n, + r, + i, + s = this[0]; + if (!arguments.length) { + if (s) + return ( + (n = v.valHooks[s.type] || v.valHooks[s.nodeName.toLowerCase()]), + n && "get" in n && (r = n.get(s, "value")) !== t + ? r + : ((r = s.value), + typeof r == "string" ? r.replace(R, "") : r == null ? "" : r) + ); + return; + } + return ( + (i = v.isFunction(e)), + this.each(function (r) { + var s, + o = v(this); + if (this.nodeType !== 1) return; + i ? (s = e.call(this, r, o.val())) : (s = e), + s == null + ? (s = "") + : typeof s == "number" + ? (s += "") + : v.isArray(s) && + (s = v.map(s, function (e) { + return e == null ? "" : e + ""; + })), + (n = + v.valHooks[this.type] || v.valHooks[this.nodeName.toLowerCase()]); + if (!n || !("set" in n) || n.set(this, s, "value") === t) + this.value = s; + }) + ); + }, + }), + v.extend({ + valHooks: { + option: { + get: function (e) { + var t = e.attributes.value; + return !t || t.specified ? e.value : e.text; + }, + }, + select: { + get: function (e) { + var t, + n, + r = e.options, + i = e.selectedIndex, + s = e.type === "select-one" || i < 0, + o = s ? null : [], + u = s ? i + 1 : r.length, + a = i < 0 ? u : s ? i : 0; + for (; a < u; a++) { + n = r[a]; + if ( + (n.selected || a === i) && + (v.support.optDisabled + ? !n.disabled + : n.getAttribute("disabled") === null) && + (!n.parentNode.disabled || + !v.nodeName(n.parentNode, "optgroup")) + ) { + t = v(n).val(); + if (s) return t; + o.push(t); + } + } + return o; + }, + set: function (e, t) { + var n = v.makeArray(t); + return ( + v(e) + .find("option") + .each(function () { + this.selected = v.inArray(v(this).val(), n) >= 0; + }), + n.length || (e.selectedIndex = -1), + n + ); + }, + }, + }, + attrFn: {}, + attr: function (e, n, r, i) { + var s, + o, + u, + a = e.nodeType; + if (!e || a === 3 || a === 8 || a === 2) return; + if (i && v.isFunction(v.fn[n])) return v(e)[n](r); + if (typeof e.getAttribute == "undefined") return v.prop(e, n, r); + (u = a !== 1 || !v.isXMLDoc(e)), + u && + ((n = n.toLowerCase()), + (o = v.attrHooks[n] || (X.test(n) ? F : j))); + if (r !== t) { + if (r === null) { + v.removeAttr(e, n); + return; + } + return o && "set" in o && u && (s = o.set(e, r, n)) !== t + ? s + : (e.setAttribute(n, r + ""), r); + } + return o && "get" in o && u && (s = o.get(e, n)) !== null + ? s + : ((s = e.getAttribute(n)), s === null ? t : s); + }, + removeAttr: function (e, t) { + var n, + r, + i, + s, + o = 0; + if (t && e.nodeType === 1) { + r = t.split(y); + for (; o < r.length; o++) + (i = r[o]), + i && + ((n = v.propFix[i] || i), + (s = X.test(i)), + s || v.attr(e, i, ""), + e.removeAttribute(V ? i : n), + s && n in e && (e[n] = !1)); + } + }, + attrHooks: { + type: { + set: function (e, t) { + if (U.test(e.nodeName) && e.parentNode) + v.error("type property can't be changed"); + else if ( + !v.support.radioValue && + t === "radio" && + v.nodeName(e, "input") + ) { + var n = e.value; + return e.setAttribute("type", t), n && (e.value = n), t; + } + }, + }, + value: { + get: function (e, t) { + return j && v.nodeName(e, "button") + ? j.get(e, t) + : t in e + ? e.value + : null; + }, + set: function (e, t, n) { + if (j && v.nodeName(e, "button")) return j.set(e, t, n); + e.value = t; + }, + }, + }, + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + for: "htmlFor", + class: "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable", + }, + prop: function (e, n, r) { + var i, + s, + o, + u = e.nodeType; + if (!e || u === 3 || u === 8 || u === 2) return; + return ( + (o = u !== 1 || !v.isXMLDoc(e)), + o && ((n = v.propFix[n] || n), (s = v.propHooks[n])), + r !== t + ? s && "set" in s && (i = s.set(e, r, n)) !== t + ? i + : (e[n] = r) + : s && "get" in s && (i = s.get(e, n)) !== null + ? i + : e[n] + ); + }, + propHooks: { + tabIndex: { + get: function (e) { + var n = e.getAttributeNode("tabindex"); + return n && n.specified + ? parseInt(n.value, 10) + : z.test(e.nodeName) || (W.test(e.nodeName) && e.href) + ? 0 + : t; + }, + }, + }, + }), + (F = { + get: function (e, n) { + var r, + i = v.prop(e, n); + return i === !0 || + (typeof i != "boolean" && + (r = e.getAttributeNode(n)) && + r.nodeValue !== !1) + ? n.toLowerCase() + : t; + }, + set: function (e, t, n) { + var r; + return ( + t === !1 + ? v.removeAttr(e, n) + : ((r = v.propFix[n] || n), + r in e && (e[r] = !0), + e.setAttribute(n, n.toLowerCase())), + n + ); + }, + }), + V || + ((I = { name: !0, id: !0, coords: !0 }), + (j = v.valHooks.button = + { + get: function (e, n) { + var r; + return ( + (r = e.getAttributeNode(n)), + r && (I[n] ? r.value !== "" : r.specified) ? r.value : t + ); + }, + set: function (e, t, n) { + var r = e.getAttributeNode(n); + return ( + r || ((r = i.createAttribute(n)), e.setAttributeNode(r)), + (r.value = t + "") + ); + }, + }), + v.each(["width", "height"], function (e, t) { + v.attrHooks[t] = v.extend(v.attrHooks[t], { + set: function (e, n) { + if (n === "") return e.setAttribute(t, "auto"), n; + }, + }); + }), + (v.attrHooks.contenteditable = { + get: j.get, + set: function (e, t, n) { + t === "" && (t = "false"), j.set(e, t, n); + }, + })), + v.support.hrefNormalized || + v.each(["href", "src", "width", "height"], function (e, n) { + v.attrHooks[n] = v.extend(v.attrHooks[n], { + get: function (e) { + var r = e.getAttribute(n, 2); + return r === null ? t : r; + }, + }); + }), + v.support.style || + (v.attrHooks.style = { + get: function (e) { + return e.style.cssText.toLowerCase() || t; + }, + set: function (e, t) { + return (e.style.cssText = t + ""); + }, + }), + v.support.optSelected || + (v.propHooks.selected = v.extend(v.propHooks.selected, { + get: function (e) { + var t = e.parentNode; + return ( + t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex), + null + ); + }, + })), + v.support.enctype || (v.propFix.enctype = "encoding"), + v.support.checkOn || + v.each(["radio", "checkbox"], function () { + v.valHooks[this] = { + get: function (e) { + return e.getAttribute("value") === null ? "on" : e.value; + }, + }; + }), + v.each(["radio", "checkbox"], function () { + v.valHooks[this] = v.extend(v.valHooks[this], { + set: function (e, t) { + if (v.isArray(t)) return (e.checked = v.inArray(v(e).val(), t) >= 0); + }, + }); + }); + var $ = /^(?:textarea|input|select)$/i, + J = /^([^\.]*|)(?:\.(.+)|)$/, + K = /(?:^|\s)hover(\.\S+|)\b/, + Q = /^key/, + G = /^(?:mouse|contextmenu)|click/, + Y = /^(?:focusinfocus|focusoutblur)$/, + Z = function (e) { + return v.event.special.hover + ? e + : e.replace(K, "mouseenter$1 mouseleave$1"); + }; + (v.event = { + add: function (e, n, r, i, s) { + var o, u, a, f, l, c, h, p, d, m, g; + if (e.nodeType === 3 || e.nodeType === 8 || !n || !r || !(o = v._data(e))) + return; + r.handler && ((d = r), (r = d.handler), (s = d.selector)), + r.guid || (r.guid = v.guid++), + (a = o.events), + a || (o.events = a = {}), + (u = o.handle), + u || + ((o.handle = u = + function (e) { + return typeof v == "undefined" || + (!!e && v.event.triggered === e.type) + ? t + : v.event.dispatch.apply(u.elem, arguments); + }), + (u.elem = e)), + (n = v.trim(Z(n)).split(" ")); + for (f = 0; f < n.length; f++) { + (l = J.exec(n[f]) || []), + (c = l[1]), + (h = (l[2] || "").split(".").sort()), + (g = v.event.special[c] || {}), + (c = (s ? g.delegateType : g.bindType) || c), + (g = v.event.special[c] || {}), + (p = v.extend( + { + type: c, + origType: l[1], + data: i, + handler: r, + guid: r.guid, + selector: s, + needsContext: s && v.expr.match.needsContext.test(s), + namespace: h.join("."), + }, + d, + )), + (m = a[c]); + if (!m) { + (m = a[c] = []), (m.delegateCount = 0); + if (!g.setup || g.setup.call(e, i, h, u) === !1) + e.addEventListener + ? e.addEventListener(c, u, !1) + : e.attachEvent && e.attachEvent("on" + c, u); + } + g.add && + (g.add.call(e, p), p.handler.guid || (p.handler.guid = r.guid)), + s ? m.splice(m.delegateCount++, 0, p) : m.push(p), + (v.event.global[c] = !0); + } + e = null; + }, + global: {}, + remove: function (e, t, n, r, i) { + var s, + o, + u, + a, + f, + l, + c, + h, + p, + d, + m, + g = v.hasData(e) && v._data(e); + if (!g || !(h = g.events)) return; + t = v.trim(Z(t || "")).split(" "); + for (s = 0; s < t.length; s++) { + (o = J.exec(t[s]) || []), (u = a = o[1]), (f = o[2]); + if (!u) { + for (u in h) v.event.remove(e, u + t[s], n, r, !0); + continue; + } + (p = v.event.special[u] || {}), + (u = (r ? p.delegateType : p.bindType) || u), + (d = h[u] || []), + (l = d.length), + (f = f + ? new RegExp( + "(^|\\.)" + + f.split(".").sort().join("\\.(?:.*\\.|)") + + "(\\.|$)", + ) + : null); + for (c = 0; c < d.length; c++) + (m = d[c]), + (i || a === m.origType) && + (!n || n.guid === m.guid) && + (!f || f.test(m.namespace)) && + (!r || r === m.selector || (r === "**" && m.selector)) && + (d.splice(c--, 1), + m.selector && d.delegateCount--, + p.remove && p.remove.call(e, m)); + d.length === 0 && + l !== d.length && + ((!p.teardown || p.teardown.call(e, f, g.handle) === !1) && + v.removeEvent(e, u, g.handle), + delete h[u]); + } + v.isEmptyObject(h) && (delete g.handle, v.removeData(e, "events", !0)); + }, + customEvent: { getData: !0, setData: !0, changeData: !0 }, + trigger: function (n, r, s, o) { + if (!s || (s.nodeType !== 3 && s.nodeType !== 8)) { + var u, + a, + f, + l, + c, + h, + p, + d, + m, + g, + y = n.type || n, + b = []; + if (Y.test(y + v.event.triggered)) return; + y.indexOf("!") >= 0 && ((y = y.slice(0, -1)), (a = !0)), + y.indexOf(".") >= 0 && + ((b = y.split(".")), (y = b.shift()), b.sort()); + if ((!s || v.event.customEvent[y]) && !v.event.global[y]) return; + (n = + typeof n == "object" + ? n[v.expando] + ? n + : new v.Event(y, n) + : new v.Event(y)), + (n.type = y), + (n.isTrigger = !0), + (n.exclusive = a), + (n.namespace = b.join(".")), + (n.namespace_re = n.namespace + ? new RegExp("(^|\\.)" + b.join("\\.(?:.*\\.|)") + "(\\.|$)") + : null), + (h = y.indexOf(":") < 0 ? "on" + y : ""); + if (!s) { + u = v.cache; + for (f in u) + u[f].events && + u[f].events[y] && + v.event.trigger(n, r, u[f].handle.elem, !0); + return; + } + (n.result = t), + n.target || (n.target = s), + (r = r != null ? v.makeArray(r) : []), + r.unshift(n), + (p = v.event.special[y] || {}); + if (p.trigger && p.trigger.apply(s, r) === !1) return; + m = [[s, p.bindType || y]]; + if (!o && !p.noBubble && !v.isWindow(s)) { + (g = p.delegateType || y), (l = Y.test(g + y) ? s : s.parentNode); + for (c = s; l; l = l.parentNode) m.push([l, g]), (c = l); + c === (s.ownerDocument || i) && + m.push([c.defaultView || c.parentWindow || e, g]); + } + for (f = 0; f < m.length && !n.isPropagationStopped(); f++) + (l = m[f][0]), + (n.type = m[f][1]), + (d = (v._data(l, "events") || {})[n.type] && v._data(l, "handle")), + d && d.apply(l, r), + (d = h && l[h]), + d && + v.acceptData(l) && + d.apply && + d.apply(l, r) === !1 && + n.preventDefault(); + return ( + (n.type = y), + !o && + !n.isDefaultPrevented() && + (!p._default || p._default.apply(s.ownerDocument, r) === !1) && + (y !== "click" || !v.nodeName(s, "a")) && + v.acceptData(s) && + h && + s[y] && + ((y !== "focus" && y !== "blur") || n.target.offsetWidth !== 0) && + !v.isWindow(s) && + ((c = s[h]), + c && (s[h] = null), + (v.event.triggered = y), + s[y](), + (v.event.triggered = t), + c && (s[h] = c)), + n.result + ); + } + return; + }, + dispatch: function (n) { + n = v.event.fix(n || e.event); + var r, + i, + s, + o, + u, + a, + f, + c, + h, + p, + d = (v._data(this, "events") || {})[n.type] || [], + m = d.delegateCount, + g = l.call(arguments), + y = !n.exclusive && !n.namespace, + b = v.event.special[n.type] || {}, + w = []; + (g[0] = n), (n.delegateTarget = this); + if (b.preDispatch && b.preDispatch.call(this, n) === !1) return; + if (m && (!n.button || n.type !== "click")) + for (s = n.target; s != this; s = s.parentNode || this) + if (s.disabled !== !0 || n.type !== "click") { + (u = {}), (f = []); + for (r = 0; r < m; r++) + (c = d[r]), + (h = c.selector), + u[h] === t && + (u[h] = c.needsContext + ? v(h, this).index(s) >= 0 + : v.find(h, this, null, [s]).length), + u[h] && f.push(c); + f.length && w.push({ elem: s, matches: f }); + } + d.length > m && w.push({ elem: this, matches: d.slice(m) }); + for (r = 0; r < w.length && !n.isPropagationStopped(); r++) { + (a = w[r]), (n.currentTarget = a.elem); + for ( + i = 0; + i < a.matches.length && !n.isImmediatePropagationStopped(); + i++ + ) { + c = a.matches[i]; + if ( + y || + (!n.namespace && !c.namespace) || + (n.namespace_re && n.namespace_re.test(c.namespace)) + ) + (n.data = c.data), + (n.handleObj = c), + (o = ( + (v.event.special[c.origType] || {}).handle || c.handler + ).apply(a.elem, g)), + o !== t && + ((n.result = o), + o === !1 && (n.preventDefault(), n.stopPropagation())); + } + } + return b.postDispatch && b.postDispatch.call(this, n), n.result; + }, + props: + "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split( + " ", + ), + fixHooks: {}, + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function (e, t) { + return ( + e.which == null && + (e.which = t.charCode != null ? t.charCode : t.keyCode), + e + ); + }, + }, + mouseHooks: { + props: + "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split( + " ", + ), + filter: function (e, n) { + var r, + s, + o, + u = n.button, + a = n.fromElement; + return ( + e.pageX == null && + n.clientX != null && + ((r = e.target.ownerDocument || i), + (s = r.documentElement), + (o = r.body), + (e.pageX = + n.clientX + + ((s && s.scrollLeft) || (o && o.scrollLeft) || 0) - + ((s && s.clientLeft) || (o && o.clientLeft) || 0)), + (e.pageY = + n.clientY + + ((s && s.scrollTop) || (o && o.scrollTop) || 0) - + ((s && s.clientTop) || (o && o.clientTop) || 0))), + !e.relatedTarget && + a && + (e.relatedTarget = a === e.target ? n.toElement : a), + !e.which && + u !== t && + (e.which = u & 1 ? 1 : u & 2 ? 3 : u & 4 ? 2 : 0), + e + ); + }, + }, + fix: function (e) { + if (e[v.expando]) return e; + var t, + n, + r = e, + s = v.event.fixHooks[e.type] || {}, + o = s.props ? this.props.concat(s.props) : this.props; + e = v.Event(r); + for (t = o.length; t; ) (n = o[--t]), (e[n] = r[n]); + return ( + e.target || (e.target = r.srcElement || i), + e.target.nodeType === 3 && (e.target = e.target.parentNode), + (e.metaKey = !!e.metaKey), + s.filter ? s.filter(e, r) : e + ); + }, + special: { + load: { noBubble: !0 }, + focus: { delegateType: "focusin" }, + blur: { delegateType: "focusout" }, + beforeunload: { + setup: function (e, t, n) { + v.isWindow(this) && (this.onbeforeunload = n); + }, + teardown: function (e, t) { + this.onbeforeunload === t && (this.onbeforeunload = null); + }, + }, + }, + simulate: function (e, t, n, r) { + var i = v.extend(new v.Event(), n, { + type: e, + isSimulated: !0, + originalEvent: {}, + }); + r ? v.event.trigger(i, null, t) : v.event.dispatch.call(t, i), + i.isDefaultPrevented() && n.preventDefault(); + }, + }), + (v.event.handle = v.event.dispatch), + (v.removeEvent = i.removeEventListener + ? function (e, t, n) { + e.removeEventListener && e.removeEventListener(t, n, !1); + } + : function (e, t, n) { + var r = "on" + t; + e.detachEvent && + (typeof e[r] == "undefined" && (e[r] = null), e.detachEvent(r, n)); + }), + (v.Event = function (e, t) { + if (!(this instanceof v.Event)) return new v.Event(e, t); + e && e.type + ? ((this.originalEvent = e), + (this.type = e.type), + (this.isDefaultPrevented = + e.defaultPrevented || + e.returnValue === !1 || + (e.getPreventDefault && e.getPreventDefault()) + ? tt + : et)) + : (this.type = e), + t && v.extend(this, t), + (this.timeStamp = (e && e.timeStamp) || v.now()), + (this[v.expando] = !0); + }), + (v.Event.prototype = { + preventDefault: function () { + this.isDefaultPrevented = tt; + var e = this.originalEvent; + if (!e) return; + e.preventDefault ? e.preventDefault() : (e.returnValue = !1); + }, + stopPropagation: function () { + this.isPropagationStopped = tt; + var e = this.originalEvent; + if (!e) return; + e.stopPropagation && e.stopPropagation(), (e.cancelBubble = !0); + }, + stopImmediatePropagation: function () { + (this.isImmediatePropagationStopped = tt), this.stopPropagation(); + }, + isDefaultPrevented: et, + isPropagationStopped: et, + isImmediatePropagationStopped: et, + }), + v.each( + { mouseenter: "mouseover", mouseleave: "mouseout" }, + function (e, t) { + v.event.special[e] = { + delegateType: t, + bindType: t, + handle: function (e) { + var n, + r = this, + i = e.relatedTarget, + s = e.handleObj, + o = s.selector; + if (!i || (i !== r && !v.contains(r, i))) + (e.type = s.origType), + (n = s.handler.apply(this, arguments)), + (e.type = t); + return n; + }, + }; + }, + ), + v.support.submitBubbles || + (v.event.special.submit = { + setup: function () { + if (v.nodeName(this, "form")) return !1; + v.event.add(this, "click._submit keypress._submit", function (e) { + var n = e.target, + r = + v.nodeName(n, "input") || v.nodeName(n, "button") ? n.form : t; + r && + !v._data(r, "_submit_attached") && + (v.event.add(r, "submit._submit", function (e) { + e._submit_bubble = !0; + }), + v._data(r, "_submit_attached", !0)); + }); + }, + postDispatch: function (e) { + e._submit_bubble && + (delete e._submit_bubble, + this.parentNode && + !e.isTrigger && + v.event.simulate("submit", this.parentNode, e, !0)); + }, + teardown: function () { + if (v.nodeName(this, "form")) return !1; + v.event.remove(this, "._submit"); + }, + }), + v.support.changeBubbles || + (v.event.special.change = { + setup: function () { + if ($.test(this.nodeName)) { + if (this.type === "checkbox" || this.type === "radio") + v.event.add(this, "propertychange._change", function (e) { + e.originalEvent.propertyName === "checked" && + (this._just_changed = !0); + }), + v.event.add(this, "click._change", function (e) { + this._just_changed && + !e.isTrigger && + (this._just_changed = !1), + v.event.simulate("change", this, e, !0); + }); + return !1; + } + v.event.add(this, "beforeactivate._change", function (e) { + var t = e.target; + $.test(t.nodeName) && + !v._data(t, "_change_attached") && + (v.event.add(t, "change._change", function (e) { + this.parentNode && + !e.isSimulated && + !e.isTrigger && + v.event.simulate("change", this.parentNode, e, !0); + }), + v._data(t, "_change_attached", !0)); + }); + }, + handle: function (e) { + var t = e.target; + if ( + this !== t || + e.isSimulated || + e.isTrigger || + (t.type !== "radio" && t.type !== "checkbox") + ) + return e.handleObj.handler.apply(this, arguments); + }, + teardown: function () { + return v.event.remove(this, "._change"), !$.test(this.nodeName); + }, + }), + v.support.focusinBubbles || + v.each({ focus: "focusin", blur: "focusout" }, function (e, t) { + var n = 0, + r = function (e) { + v.event.simulate(t, e.target, v.event.fix(e), !0); + }; + v.event.special[t] = { + setup: function () { + n++ === 0 && i.addEventListener(e, r, !0); + }, + teardown: function () { + --n === 0 && i.removeEventListener(e, r, !0); + }, + }; + }), + v.fn.extend({ + on: function (e, n, r, i, s) { + var o, u; + if (typeof e == "object") { + typeof n != "string" && ((r = r || n), (n = t)); + for (u in e) this.on(u, n, r, e[u], s); + return this; + } + r == null && i == null + ? ((i = n), (r = n = t)) + : i == null && + (typeof n == "string" + ? ((i = r), (r = t)) + : ((i = r), (r = n), (n = t))); + if (i === !1) i = et; + else if (!i) return this; + return ( + s === 1 && + ((o = i), + (i = function (e) { + return v().off(e), o.apply(this, arguments); + }), + (i.guid = o.guid || (o.guid = v.guid++))), + this.each(function () { + v.event.add(this, e, i, r, n); + }) + ); + }, + one: function (e, t, n, r) { + return this.on(e, t, n, r, 1); + }, + off: function (e, n, r) { + var i, s; + if (e && e.preventDefault && e.handleObj) + return ( + (i = e.handleObj), + v(e.delegateTarget).off( + i.namespace ? i.origType + "." + i.namespace : i.origType, + i.selector, + i.handler, + ), + this + ); + if (typeof e == "object") { + for (s in e) this.off(s, n, e[s]); + return this; + } + if (n === !1 || typeof n == "function") (r = n), (n = t); + return ( + r === !1 && (r = et), + this.each(function () { + v.event.remove(this, e, r, n); + }) + ); + }, + bind: function (e, t, n) { + return this.on(e, null, t, n); + }, + unbind: function (e, t) { + return this.off(e, null, t); + }, + live: function (e, t, n) { + return v(this.context).on(e, this.selector, t, n), this; + }, + die: function (e, t) { + return v(this.context).off(e, this.selector || "**", t), this; + }, + delegate: function (e, t, n, r) { + return this.on(t, e, n, r); + }, + undelegate: function (e, t, n) { + return arguments.length === 1 + ? this.off(e, "**") + : this.off(t, e || "**", n); + }, + trigger: function (e, t) { + return this.each(function () { + v.event.trigger(e, t, this); + }); + }, + triggerHandler: function (e, t) { + if (this[0]) return v.event.trigger(e, t, this[0], !0); + }, + toggle: function (e) { + var t = arguments, + n = e.guid || v.guid++, + r = 0, + i = function (n) { + var i = (v._data(this, "lastToggle" + e.guid) || 0) % r; + return ( + v._data(this, "lastToggle" + e.guid, i + 1), + n.preventDefault(), + t[i].apply(this, arguments) || !1 + ); + }; + i.guid = n; + while (r < t.length) t[r++].guid = n; + return this.click(i); + }, + hover: function (e, t) { + return this.mouseenter(e).mouseleave(t || e); + }, + }), + v.each( + "blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split( + " ", + ), + function (e, t) { + (v.fn[t] = function (e, n) { + return ( + n == null && ((n = e), (e = null)), + arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t) + ); + }), + Q.test(t) && (v.event.fixHooks[t] = v.event.keyHooks), + G.test(t) && (v.event.fixHooks[t] = v.event.mouseHooks); + }, + ), + (function (e, t) { + function nt(e, t, n, r) { + (n = n || []), (t = t || g); + var i, + s, + a, + f, + l = t.nodeType; + if (!e || typeof e != "string") return n; + if (l !== 1 && l !== 9) return []; + a = o(t); + if (!a && !r) + if ((i = R.exec(e))) + if ((f = i[1])) { + if (l === 9) { + s = t.getElementById(f); + if (!s || !s.parentNode) return n; + if (s.id === f) return n.push(s), n; + } else if ( + t.ownerDocument && + (s = t.ownerDocument.getElementById(f)) && + u(t, s) && + s.id === f + ) + return n.push(s), n; + } else { + if (i[2]) + return S.apply(n, x.call(t.getElementsByTagName(e), 0)), n; + if ((f = i[3]) && Z && t.getElementsByClassName) + return S.apply(n, x.call(t.getElementsByClassName(f), 0)), n; + } + return vt(e.replace(j, "$1"), t, n, r, a); + } + function rt(e) { + return function (t) { + var n = t.nodeName.toLowerCase(); + return n === "input" && t.type === e; + }; + } + function it(e) { + return function (t) { + var n = t.nodeName.toLowerCase(); + return (n === "input" || n === "button") && t.type === e; + }; + } + function st(e) { + return N(function (t) { + return ( + (t = +t), + N(function (n, r) { + var i, + s = e([], n.length, t), + o = s.length; + while (o--) n[(i = s[o])] && (n[i] = !(r[i] = n[i])); + }) + ); + }); + } + function ot(e, t, n) { + if (e === t) return n; + var r = e.nextSibling; + while (r) { + if (r === t) return -1; + r = r.nextSibling; + } + return 1; + } + function ut(e, t) { + var n, + r, + s, + o, + u, + a, + f, + l = L[d][e + " "]; + if (l) return t ? 0 : l.slice(0); + (u = e), (a = []), (f = i.preFilter); + while (u) { + if (!n || (r = F.exec(u))) + r && (u = u.slice(r[0].length) || u), a.push((s = [])); + n = !1; + if ((r = I.exec(u))) + s.push((n = new m(r.shift()))), + (u = u.slice(n.length)), + (n.type = r[0].replace(j, " ")); + for (o in i.filter) + (r = J[o].exec(u)) && + (!f[o] || (r = f[o](r))) && + (s.push((n = new m(r.shift()))), + (u = u.slice(n.length)), + (n.type = o), + (n.matches = r)); + if (!n) break; + } + return t ? u.length : u ? nt.error(e) : L(e, a).slice(0); + } + function at(e, t, r) { + var i = t.dir, + s = r && t.dir === "parentNode", + o = w++; + return t.first + ? function (t, n, r) { + while ((t = t[i])) if (s || t.nodeType === 1) return e(t, n, r); + } + : function (t, r, u) { + if (!u) { + var a, + f = b + " " + o + " ", + l = f + n; + while ((t = t[i])) + if (s || t.nodeType === 1) { + if ((a = t[d]) === l) return t.sizset; + if (typeof a == "string" && a.indexOf(f) === 0) { + if (t.sizset) return t; + } else { + t[d] = l; + if (e(t, r, u)) return (t.sizset = !0), t; + t.sizset = !1; + } + } + } else + while ((t = t[i])) + if (s || t.nodeType === 1) if (e(t, r, u)) return t; + }; + } + function ft(e) { + return e.length > 1 + ? function (t, n, r) { + var i = e.length; + while (i--) if (!e[i](t, n, r)) return !1; + return !0; + } + : e[0]; + } + function lt(e, t, n, r, i) { + var s, + o = [], + u = 0, + a = e.length, + f = t != null; + for (; u < a; u++) + if ((s = e[u])) if (!n || n(s, r, i)) o.push(s), f && t.push(u); + return o; + } + function ct(e, t, n, r, i, s) { + return ( + r && !r[d] && (r = ct(r)), + i && !i[d] && (i = ct(i, s)), + N(function (s, o, u, a) { + var f, + l, + c, + h = [], + p = [], + d = o.length, + v = s || dt(t || "*", u.nodeType ? [u] : u, []), + m = e && (s || !t) ? lt(v, h, e, u, a) : v, + g = n ? (i || (s ? e : d || r) ? [] : o) : m; + n && n(m, g, u, a); + if (r) { + (f = lt(g, p)), r(f, [], u, a), (l = f.length); + while (l--) if ((c = f[l])) g[p[l]] = !(m[p[l]] = c); + } + if (s) { + if (i || e) { + if (i) { + (f = []), (l = g.length); + while (l--) (c = g[l]) && f.push((m[l] = c)); + i(null, (g = []), f, a); + } + l = g.length; + while (l--) + (c = g[l]) && + (f = i ? T.call(s, c) : h[l]) > -1 && + (s[f] = !(o[f] = c)); + } + } else + (g = lt(g === o ? g.splice(d, g.length) : g)), + i ? i(null, o, g, a) : S.apply(o, g); + }) + ); + } + function ht(e) { + var t, + n, + r, + s = e.length, + o = i.relative[e[0].type], + u = o || i.relative[" "], + a = o ? 1 : 0, + f = at( + function (e) { + return e === t; + }, + u, + !0, + ), + l = at( + function (e) { + return T.call(t, e) > -1; + }, + u, + !0, + ), + h = [ + function (e, n, r) { + return ( + (!o && (r || n !== c)) || + ((t = n).nodeType ? f(e, n, r) : l(e, n, r)) + ); + }, + ]; + for (; a < s; a++) + if ((n = i.relative[e[a].type])) h = [at(ft(h), n)]; + else { + n = i.filter[e[a].type].apply(null, e[a].matches); + if (n[d]) { + r = ++a; + for (; r < s; r++) if (i.relative[e[r].type]) break; + return ct( + a > 1 && ft(h), + a > 1 && + e + .slice(0, a - 1) + .join("") + .replace(j, "$1"), + n, + a < r && ht(e.slice(a, r)), + r < s && ht((e = e.slice(r))), + r < s && e.join(""), + ); + } + h.push(n); + } + return ft(h); + } + function pt(e, t) { + var r = t.length > 0, + s = e.length > 0, + o = function (u, a, f, l, h) { + var p, + d, + v, + m = [], + y = 0, + w = "0", + x = u && [], + T = h != null, + N = c, + C = u || (s && i.find.TAG("*", (h && a.parentNode) || a)), + k = (b += N == null ? 1 : Math.E); + T && ((c = a !== g && a), (n = o.el)); + for (; (p = C[w]) != null; w++) { + if (s && p) { + for (d = 0; (v = e[d]); d++) + if (v(p, a, f)) { + l.push(p); + break; + } + T && ((b = k), (n = ++o.el)); + } + r && ((p = !v && p) && y--, u && x.push(p)); + } + y += w; + if (r && w !== y) { + for (d = 0; (v = t[d]); d++) v(x, m, a, f); + if (u) { + if (y > 0) while (w--) !x[w] && !m[w] && (m[w] = E.call(l)); + m = lt(m); + } + S.apply(l, m), + T && !u && m.length > 0 && y + t.length > 1 && nt.uniqueSort(l); + } + return T && ((b = k), (c = N)), x; + }; + return (o.el = 0), r ? N(o) : o; + } + function dt(e, t, n) { + var r = 0, + i = t.length; + for (; r < i; r++) nt(e, t[r], n); + return n; + } + function vt(e, t, n, r, s) { + var o, + u, + f, + l, + c, + h = ut(e), + p = h.length; + if (!r && h.length === 1) { + u = h[0] = h[0].slice(0); + if ( + u.length > 2 && + (f = u[0]).type === "ID" && + t.nodeType === 9 && + !s && + i.relative[u[1].type] + ) { + t = i.find.ID(f.matches[0].replace($, ""), t, s)[0]; + if (!t) return n; + e = e.slice(u.shift().length); + } + for (o = J.POS.test(e) ? -1 : u.length - 1; o >= 0; o--) { + f = u[o]; + if (i.relative[(l = f.type)]) break; + if ((c = i.find[l])) + if ( + (r = c( + f.matches[0].replace($, ""), + (z.test(u[0].type) && t.parentNode) || t, + s, + )) + ) { + u.splice(o, 1), (e = r.length && u.join("")); + if (!e) return S.apply(n, x.call(r, 0)), n; + break; + } + } + } + return a(e, h)(r, t, s, n, z.test(e)), n; + } + function mt() {} + var n, + r, + i, + s, + o, + u, + a, + f, + l, + c, + h = !0, + p = "undefined", + d = ("sizcache" + Math.random()).replace(".", ""), + m = String, + g = e.document, + y = g.documentElement, + b = 0, + w = 0, + E = [].pop, + S = [].push, + x = [].slice, + T = + [].indexOf || + function (e) { + var t = 0, + n = this.length; + for (; t < n; t++) if (this[t] === e) return t; + return -1; + }, + N = function (e, t) { + return (e[d] = t == null || t), e; + }, + C = function () { + var e = {}, + t = []; + return N(function (n, r) { + return ( + t.push(n) > i.cacheLength && delete e[t.shift()], (e[n + " "] = r) + ); + }, e); + }, + k = C(), + L = C(), + A = C(), + O = "[\\x20\\t\\r\\n\\f]", + M = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", + _ = M.replace("w", "w#"), + D = "([*^$|!~]?=)", + P = + "\\[" + + O + + "*(" + + M + + ")" + + O + + "*(?:" + + D + + O + + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + + _ + + ")|)|)" + + O + + "*\\]", + H = + ":(" + + M + + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + + P + + ")|[^:]|\\\\.)*|.*))\\)|)", + B = + ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + O + + "*((?:-\\d)?\\d*)" + + O + + "*\\)|)(?=[^-]|$)", + j = new RegExp("^" + O + "+|((?:^|[^\\\\])(?:\\\\.)*)" + O + "+$", "g"), + F = new RegExp("^" + O + "*," + O + "*"), + I = new RegExp("^" + O + "*([\\x20\\t\\r\\n\\f>+~])" + O + "*"), + q = new RegExp(H), + R = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, + U = /^:not/, + z = /[\x20\t\r\n\f]*[+~]/, + W = /:not\($/, + X = /h\d/i, + V = /input|select|textarea|button/i, + $ = /\\(?!\\)/g, + J = { + ID: new RegExp("^#(" + M + ")"), + CLASS: new RegExp("^\\.(" + M + ")"), + NAME: new RegExp("^\\[name=['\"]?(" + M + ")['\"]?\\]"), + TAG: new RegExp("^(" + M.replace("w", "w*") + ")"), + ATTR: new RegExp("^" + P), + PSEUDO: new RegExp("^" + H), + POS: new RegExp(B, "i"), + CHILD: new RegExp( + "^:(only|nth|first|last)-child(?:\\(" + + O + + "*(even|odd|(([+-]|)(\\d*)n|)" + + O + + "*(?:([+-]|)" + + O + + "*(\\d+)|))" + + O + + "*\\)|)", + "i", + ), + needsContext: new RegExp("^" + O + "*[>+~]|" + B, "i"), + }, + K = function (e) { + var t = g.createElement("div"); + try { + return e(t); + } catch (n) { + return !1; + } finally { + t = null; + } + }, + Q = K(function (e) { + return ( + e.appendChild(g.createComment("")), + !e.getElementsByTagName("*").length + ); + }), + G = K(function (e) { + return ( + (e.innerHTML = ""), + e.firstChild && + typeof e.firstChild.getAttribute !== p && + e.firstChild.getAttribute("href") === "#" + ); + }), + Y = K(function (e) { + e.innerHTML = ""; + var t = typeof e.lastChild.getAttribute("multiple"); + return t !== "boolean" && t !== "string"; + }), + Z = K(function (e) { + return ( + (e.innerHTML = + ""), + !e.getElementsByClassName || !e.getElementsByClassName("e").length + ? !1 + : ((e.lastChild.className = "e"), + e.getElementsByClassName("e").length === 2) + ); + }), + et = K(function (e) { + (e.id = d + 0), + (e.innerHTML = + "
          "), + y.insertBefore(e, y.firstChild); + var t = + g.getElementsByName && + g.getElementsByName(d).length === + 2 + g.getElementsByName(d + 0).length; + return (r = !g.getElementById(d)), y.removeChild(e), t; + }); + try { + x.call(y.childNodes, 0)[0].nodeType; + } catch (tt) { + x = function (e) { + var t, + n = []; + for (; (t = this[e]); e++) n.push(t); + return n; + }; + } + (nt.matches = function (e, t) { + return nt(e, null, null, t); + }), + (nt.matchesSelector = function (e, t) { + return nt(t, null, null, [e]).length > 0; + }), + (s = nt.getText = + function (e) { + var t, + n = "", + r = 0, + i = e.nodeType; + if (i) { + if (i === 1 || i === 9 || i === 11) { + if (typeof e.textContent == "string") return e.textContent; + for (e = e.firstChild; e; e = e.nextSibling) n += s(e); + } else if (i === 3 || i === 4) return e.nodeValue; + } else for (; (t = e[r]); r++) n += s(t); + return n; + }), + (o = nt.isXML = + function (e) { + var t = e && (e.ownerDocument || e).documentElement; + return t ? t.nodeName !== "HTML" : !1; + }), + (u = nt.contains = + y.contains + ? function (e, t) { + var n = e.nodeType === 9 ? e.documentElement : e, + r = t && t.parentNode; + return ( + e === r || + !!(r && r.nodeType === 1 && n.contains && n.contains(r)) + ); + } + : y.compareDocumentPosition + ? function (e, t) { + return t && !!(e.compareDocumentPosition(t) & 16); + } + : function (e, t) { + while ((t = t.parentNode)) if (t === e) return !0; + return !1; + }), + (nt.attr = function (e, t) { + var n, + r = o(e); + return ( + r || (t = t.toLowerCase()), + (n = i.attrHandle[t]) + ? n(e) + : r || Y + ? e.getAttribute(t) + : ((n = e.getAttributeNode(t)), + n + ? typeof e[t] == "boolean" + ? e[t] + ? t + : null + : n.specified + ? n.value + : null + : null) + ); + }), + (i = nt.selectors = + { + cacheLength: 50, + createPseudo: N, + match: J, + attrHandle: G + ? {} + : { + href: function (e) { + return e.getAttribute("href", 2); + }, + type: function (e) { + return e.getAttribute("type"); + }, + }, + find: { + ID: r + ? function (e, t, n) { + if (typeof t.getElementById !== p && !n) { + var r = t.getElementById(e); + return r && r.parentNode ? [r] : []; + } + } + : function (e, n, r) { + if (typeof n.getElementById !== p && !r) { + var i = n.getElementById(e); + return i + ? i.id === e || + (typeof i.getAttributeNode !== p && + i.getAttributeNode("id").value === e) + ? [i] + : t + : []; + } + }, + TAG: Q + ? function (e, t) { + if (typeof t.getElementsByTagName !== p) + return t.getElementsByTagName(e); + } + : function (e, t) { + var n = t.getElementsByTagName(e); + if (e === "*") { + var r, + i = [], + s = 0; + for (; (r = n[s]); s++) r.nodeType === 1 && i.push(r); + return i; + } + return n; + }, + NAME: + et && + function (e, t) { + if (typeof t.getElementsByName !== p) + return t.getElementsByName(name); + }, + CLASS: + Z && + function (e, t, n) { + if (typeof t.getElementsByClassName !== p && !n) + return t.getElementsByClassName(e); + }, + }, + relative: { + ">": { dir: "parentNode", first: !0 }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: !0 }, + "~": { dir: "previousSibling" }, + }, + preFilter: { + ATTR: function (e) { + return ( + (e[1] = e[1].replace($, "")), + (e[3] = (e[4] || e[5] || "").replace($, "")), + e[2] === "~=" && (e[3] = " " + e[3] + " "), + e.slice(0, 4) + ); + }, + CHILD: function (e) { + return ( + (e[1] = e[1].toLowerCase()), + e[1] === "nth" + ? (e[2] || nt.error(e[0]), + (e[3] = +(e[3] + ? e[4] + (e[5] || 1) + : 2 * (e[2] === "even" || e[2] === "odd"))), + (e[4] = +(e[6] + e[7] || e[2] === "odd"))) + : e[2] && nt.error(e[0]), + e + ); + }, + PSEUDO: function (e) { + var t, n; + if (J.CHILD.test(e[0])) return null; + if (e[3]) e[2] = e[3]; + else if ((t = e[4])) + q.test(t) && + (n = ut(t, !0)) && + (n = t.indexOf(")", t.length - n) - t.length) && + ((t = t.slice(0, n)), (e[0] = e[0].slice(0, n))), + (e[2] = t); + return e.slice(0, 3); + }, + }, + filter: { + ID: r + ? function (e) { + return ( + (e = e.replace($, "")), + function (t) { + return t.getAttribute("id") === e; + } + ); + } + : function (e) { + return ( + (e = e.replace($, "")), + function (t) { + var n = + typeof t.getAttributeNode !== p && + t.getAttributeNode("id"); + return n && n.value === e; + } + ); + }, + TAG: function (e) { + return e === "*" + ? function () { + return !0; + } + : ((e = e.replace($, "").toLowerCase()), + function (t) { + return t.nodeName && t.nodeName.toLowerCase() === e; + }); + }, + CLASS: function (e) { + var t = k[d][e + " "]; + return ( + t || + ((t = new RegExp("(^|" + O + ")" + e + "(" + O + "|$)")) && + k(e, function (e) { + return t.test( + e.className || + (typeof e.getAttribute !== p && + e.getAttribute("class")) || + "", + ); + })) + ); + }, + ATTR: function (e, t, n) { + return function (r, i) { + var s = nt.attr(r, e); + return s == null + ? t === "!=" + : t + ? ((s += ""), + t === "=" + ? s === n + : t === "!=" + ? s !== n + : t === "^=" + ? n && s.indexOf(n) === 0 + : t === "*=" + ? n && s.indexOf(n) > -1 + : t === "$=" + ? n && s.substr(s.length - n.length) === n + : t === "~=" + ? (" " + s + " ").indexOf(n) > -1 + : t === "|=" + ? s === n || + s.substr(0, n.length + 1) === n + "-" + : !1) + : !0; + }; + }, + CHILD: function (e, t, n, r) { + return e === "nth" + ? function (e) { + var t, + i, + s = e.parentNode; + if (n === 1 && r === 0) return !0; + if (s) { + i = 0; + for (t = s.firstChild; t; t = t.nextSibling) + if (t.nodeType === 1) { + i++; + if (e === t) break; + } + } + return (i -= r), i === n || (i % n === 0 && i / n >= 0); + } + : function (t) { + var n = t; + switch (e) { + case "only": + case "first": + while ((n = n.previousSibling)) + if (n.nodeType === 1) return !1; + if (e === "first") return !0; + n = t; + case "last": + while ((n = n.nextSibling)) + if (n.nodeType === 1) return !1; + return !0; + } + }; + }, + PSEUDO: function (e, t) { + var n, + r = + i.pseudos[e] || + i.setFilters[e.toLowerCase()] || + nt.error("unsupported pseudo: " + e); + return r[d] + ? r(t) + : r.length > 1 + ? ((n = [e, e, "", t]), + i.setFilters.hasOwnProperty(e.toLowerCase()) + ? N(function (e, n) { + var i, + s = r(e, t), + o = s.length; + while (o--) + (i = T.call(e, s[o])), (e[i] = !(n[i] = s[o])); + }) + : function (e) { + return r(e, 0, n); + }) + : r; + }, + }, + pseudos: { + not: N(function (e) { + var t = [], + n = [], + r = a(e.replace(j, "$1")); + return r[d] + ? N(function (e, t, n, i) { + var s, + o = r(e, null, i, []), + u = e.length; + while (u--) if ((s = o[u])) e[u] = !(t[u] = s); + }) + : function (e, i, s) { + return (t[0] = e), r(t, null, s, n), !n.pop(); + }; + }), + has: N(function (e) { + return function (t) { + return nt(e, t).length > 0; + }; + }), + contains: N(function (e) { + return function (t) { + return (t.textContent || t.innerText || s(t)).indexOf(e) > -1; + }; + }), + enabled: function (e) { + return e.disabled === !1; + }, + disabled: function (e) { + return e.disabled === !0; + }, + checked: function (e) { + var t = e.nodeName.toLowerCase(); + return ( + (t === "input" && !!e.checked) || + (t === "option" && !!e.selected) + ); + }, + selected: function (e) { + return ( + e.parentNode && e.parentNode.selectedIndex, e.selected === !0 + ); + }, + parent: function (e) { + return !i.pseudos.empty(e); + }, + empty: function (e) { + var t; + e = e.firstChild; + while (e) { + if (e.nodeName > "@" || (t = e.nodeType) === 3 || t === 4) + return !1; + e = e.nextSibling; + } + return !0; + }, + header: function (e) { + return X.test(e.nodeName); + }, + text: function (e) { + var t, n; + return ( + e.nodeName.toLowerCase() === "input" && + (t = e.type) === "text" && + ((n = e.getAttribute("type")) == null || + n.toLowerCase() === t) + ); + }, + radio: rt("radio"), + checkbox: rt("checkbox"), + file: rt("file"), + password: rt("password"), + image: rt("image"), + submit: it("submit"), + reset: it("reset"), + button: function (e) { + var t = e.nodeName.toLowerCase(); + return (t === "input" && e.type === "button") || t === "button"; + }, + input: function (e) { + return V.test(e.nodeName); + }, + focus: function (e) { + var t = e.ownerDocument; + return ( + e === t.activeElement && + (!t.hasFocus || t.hasFocus()) && + !!(e.type || e.href || ~e.tabIndex) + ); + }, + active: function (e) { + return e === e.ownerDocument.activeElement; + }, + first: st(function () { + return [0]; + }), + last: st(function (e, t) { + return [t - 1]; + }), + eq: st(function (e, t, n) { + return [n < 0 ? n + t : n]; + }), + even: st(function (e, t) { + for (var n = 0; n < t; n += 2) e.push(n); + return e; + }), + odd: st(function (e, t) { + for (var n = 1; n < t; n += 2) e.push(n); + return e; + }), + lt: st(function (e, t, n) { + for (var r = n < 0 ? n + t : n; --r >= 0; ) e.push(r); + return e; + }), + gt: st(function (e, t, n) { + for (var r = n < 0 ? n + t : n; ++r < t; ) e.push(r); + return e; + }), + }, + }), + (f = y.compareDocumentPosition + ? function (e, t) { + return e === t + ? ((l = !0), 0) + : ( + !e.compareDocumentPosition || !t.compareDocumentPosition + ? e.compareDocumentPosition + : e.compareDocumentPosition(t) & 4 + ) + ? -1 + : 1; + } + : function (e, t) { + if (e === t) return (l = !0), 0; + if (e.sourceIndex && t.sourceIndex) + return e.sourceIndex - t.sourceIndex; + var n, + r, + i = [], + s = [], + o = e.parentNode, + u = t.parentNode, + a = o; + if (o === u) return ot(e, t); + if (!o) return -1; + if (!u) return 1; + while (a) i.unshift(a), (a = a.parentNode); + a = u; + while (a) s.unshift(a), (a = a.parentNode); + (n = i.length), (r = s.length); + for (var f = 0; f < n && f < r; f++) + if (i[f] !== s[f]) return ot(i[f], s[f]); + return f === n ? ot(e, s[f], -1) : ot(i[f], t, 1); + }), + [0, 0].sort(f), + (h = !l), + (nt.uniqueSort = function (e) { + var t, + n = [], + r = 1, + i = 0; + (l = h), e.sort(f); + if (l) { + for (; (t = e[r]); r++) t === e[r - 1] && (i = n.push(r)); + while (i--) e.splice(n[i], 1); + } + return e; + }), + (nt.error = function (e) { + throw new Error("Syntax error, unrecognized expression: " + e); + }), + (a = nt.compile = + function (e, t) { + var n, + r = [], + i = [], + s = A[d][e + " "]; + if (!s) { + t || (t = ut(e)), (n = t.length); + while (n--) (s = ht(t[n])), s[d] ? r.push(s) : i.push(s); + s = A(e, pt(i, r)); + } + return s; + }), + g.querySelectorAll && + (function () { + var e, + t = vt, + n = /'|\\/g, + r = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + i = [":focus"], + s = [":active"], + u = + y.matchesSelector || + y.mozMatchesSelector || + y.webkitMatchesSelector || + y.oMatchesSelector || + y.msMatchesSelector; + K(function (e) { + (e.innerHTML = ""), + e.querySelectorAll("[selected]").length || + i.push( + "\\[" + + O + + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)", + ), + e.querySelectorAll(":checked").length || i.push(":checked"); + }), + K(function (e) { + (e.innerHTML = "

          "), + e.querySelectorAll("[test^='']").length && + i.push("[*^$]=" + O + "*(?:\"\"|'')"), + (e.innerHTML = ""), + e.querySelectorAll(":enabled").length || + i.push(":enabled", ":disabled"); + }), + (i = new RegExp(i.join("|"))), + (vt = function (e, r, s, o, u) { + if (!o && !u && !i.test(e)) { + var a, + f, + l = !0, + c = d, + h = r, + p = r.nodeType === 9 && e; + if ( + r.nodeType === 1 && + r.nodeName.toLowerCase() !== "object" + ) { + (a = ut(e)), + (l = r.getAttribute("id")) + ? (c = l.replace(n, "\\$&")) + : r.setAttribute("id", c), + (c = "[id='" + c + "'] "), + (f = a.length); + while (f--) a[f] = c + a[f].join(""); + (h = (z.test(e) && r.parentNode) || r), (p = a.join(",")); + } + if (p) + try { + return S.apply(s, x.call(h.querySelectorAll(p), 0)), s; + } catch (v) { + } finally { + l || r.removeAttribute("id"); + } + } + return t(e, r, s, o, u); + }), + u && + (K(function (t) { + e = u.call(t, "div"); + try { + u.call(t, "[test!='']:sizzle"), s.push("!=", H); + } catch (n) {} + }), + (s = new RegExp(s.join("|"))), + (nt.matchesSelector = function (t, n) { + n = n.replace(r, "='$1']"); + if (!o(t) && !s.test(n) && !i.test(n)) + try { + var a = u.call(t, n); + if (a || e || (t.document && t.document.nodeType !== 11)) + return a; + } catch (f) {} + return nt(n, null, null, [t]).length > 0; + })); + })(), + (i.pseudos.nth = i.pseudos.eq), + (i.filters = mt.prototype = i.pseudos), + (i.setFilters = new mt()), + (nt.attr = v.attr), + (v.find = nt), + (v.expr = nt.selectors), + (v.expr[":"] = v.expr.pseudos), + (v.unique = nt.uniqueSort), + (v.text = nt.getText), + (v.isXMLDoc = nt.isXML), + (v.contains = nt.contains); + })(e); + var nt = /Until$/, + rt = /^(?:parents|prev(?:Until|All))/, + it = /^.[^:#\[\.,]*$/, + st = v.expr.match.needsContext, + ot = { children: !0, contents: !0, next: !0, prev: !0 }; + v.fn.extend({ + find: function (e) { + var t, + n, + r, + i, + s, + o, + u = this; + if (typeof e != "string") + return v(e).filter(function () { + for (t = 0, n = u.length; t < n; t++) + if (v.contains(u[t], this)) return !0; + }); + o = this.pushStack("", "find", e); + for (t = 0, n = this.length; t < n; t++) { + (r = o.length), v.find(e, this[t], o); + if (t > 0) + for (i = r; i < o.length; i++) + for (s = 0; s < r; s++) + if (o[s] === o[i]) { + o.splice(i--, 1); + break; + } + } + return o; + }, + has: function (e) { + var t, + n = v(e, this), + r = n.length; + return this.filter(function () { + for (t = 0; t < r; t++) if (v.contains(this, n[t])) return !0; + }); + }, + not: function (e) { + return this.pushStack(ft(this, e, !1), "not", e); + }, + filter: function (e) { + return this.pushStack(ft(this, e, !0), "filter", e); + }, + is: function (e) { + return ( + !!e && + (typeof e == "string" + ? st.test(e) + ? v(e, this.context).index(this[0]) >= 0 + : v.filter(e, this).length > 0 + : this.filter(e).length > 0) + ); + }, + closest: function (e, t) { + var n, + r = 0, + i = this.length, + s = [], + o = st.test(e) || typeof e != "string" ? v(e, t || this.context) : 0; + for (; r < i; r++) { + n = this[r]; + while (n && n.ownerDocument && n !== t && n.nodeType !== 11) { + if (o ? o.index(n) > -1 : v.find.matchesSelector(n, e)) { + s.push(n); + break; + } + n = n.parentNode; + } + } + return ( + (s = s.length > 1 ? v.unique(s) : s), this.pushStack(s, "closest", e) + ); + }, + index: function (e) { + return e + ? typeof e == "string" + ? v.inArray(this[0], v(e)) + : v.inArray(e.jquery ? e[0] : e, this) + : this[0] && this[0].parentNode + ? this.prevAll().length + : -1; + }, + add: function (e, t) { + var n = + typeof e == "string" + ? v(e, t) + : v.makeArray(e && e.nodeType ? [e] : e), + r = v.merge(this.get(), n); + return this.pushStack(ut(n[0]) || ut(r[0]) ? r : v.unique(r)); + }, + addBack: function (e) { + return this.add(e == null ? this.prevObject : this.prevObject.filter(e)); + }, + }), + (v.fn.andSelf = v.fn.addBack), + v.each( + { + parent: function (e) { + var t = e.parentNode; + return t && t.nodeType !== 11 ? t : null; + }, + parents: function (e) { + return v.dir(e, "parentNode"); + }, + parentsUntil: function (e, t, n) { + return v.dir(e, "parentNode", n); + }, + next: function (e) { + return at(e, "nextSibling"); + }, + prev: function (e) { + return at(e, "previousSibling"); + }, + nextAll: function (e) { + return v.dir(e, "nextSibling"); + }, + prevAll: function (e) { + return v.dir(e, "previousSibling"); + }, + nextUntil: function (e, t, n) { + return v.dir(e, "nextSibling", n); + }, + prevUntil: function (e, t, n) { + return v.dir(e, "previousSibling", n); + }, + siblings: function (e) { + return v.sibling((e.parentNode || {}).firstChild, e); + }, + children: function (e) { + return v.sibling(e.firstChild); + }, + contents: function (e) { + return v.nodeName(e, "iframe") + ? e.contentDocument || e.contentWindow.document + : v.merge([], e.childNodes); + }, + }, + function (e, t) { + v.fn[e] = function (n, r) { + var i = v.map(this, t, n); + return ( + nt.test(e) || (r = n), + r && typeof r == "string" && (i = v.filter(r, i)), + (i = this.length > 1 && !ot[e] ? v.unique(i) : i), + this.length > 1 && rt.test(e) && (i = i.reverse()), + this.pushStack(i, e, l.call(arguments).join(",")) + ); + }; + }, + ), + v.extend({ + filter: function (e, t, n) { + return ( + n && (e = ":not(" + e + ")"), + t.length === 1 + ? v.find.matchesSelector(t[0], e) + ? [t[0]] + : [] + : v.find.matches(e, t) + ); + }, + dir: function (e, n, r) { + var i = [], + s = e[n]; + while ( + s && + s.nodeType !== 9 && + (r === t || s.nodeType !== 1 || !v(s).is(r)) + ) + s.nodeType === 1 && i.push(s), (s = s[n]); + return i; + }, + sibling: function (e, t) { + var n = []; + for (; e; e = e.nextSibling) e.nodeType === 1 && e !== t && n.push(e); + return n; + }, + }); + var ct = + "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + ht = / jQuery\d+="(?:null|\d+)"/g, + pt = /^\s+/, + dt = + /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + vt = /<([\w:]+)/, + mt = /]", "i"), + Et = /^(?:checkbox|radio)$/, + St = /checked\s*(?:[^=]|=\s*.checked.)/i, + xt = /\/(java|ecma)script/i, + Tt = /^\s*\s*$/g, + Nt = { + option: [1, ""], + legend: [1, "
          ", "
          "], + thead: [1, "", "
          "], + tr: [2, "", "
          "], + td: [3, "", "
          "], + col: [2, "", "
          "], + area: [1, "", ""], + _default: [0, "", ""], + }, + Ct = lt(i), + kt = Ct.appendChild(i.createElement("div")); + (Nt.optgroup = Nt.option), + (Nt.tbody = Nt.tfoot = Nt.colgroup = Nt.caption = Nt.thead), + (Nt.th = Nt.td), + v.support.htmlSerialize || (Nt._default = [1, "X
          ", "
          "]), + v.fn.extend({ + text: function (e) { + return v.access( + this, + function (e) { + return e === t + ? v.text(this) + : this.empty().append( + ((this[0] && this[0].ownerDocument) || i).createTextNode(e), + ); + }, + null, + e, + arguments.length, + ); + }, + wrapAll: function (e) { + if (v.isFunction(e)) + return this.each(function (t) { + v(this).wrapAll(e.call(this, t)); + }); + if (this[0]) { + var t = v(e, this[0].ownerDocument).eq(0).clone(!0); + this[0].parentNode && t.insertBefore(this[0]), + t + .map(function () { + var e = this; + while (e.firstChild && e.firstChild.nodeType === 1) + e = e.firstChild; + return e; + }) + .append(this); + } + return this; + }, + wrapInner: function (e) { + return v.isFunction(e) + ? this.each(function (t) { + v(this).wrapInner(e.call(this, t)); + }) + : this.each(function () { + var t = v(this), + n = t.contents(); + n.length ? n.wrapAll(e) : t.append(e); + }); + }, + wrap: function (e) { + var t = v.isFunction(e); + return this.each(function (n) { + v(this).wrapAll(t ? e.call(this, n) : e); + }); + }, + unwrap: function () { + return this.parent() + .each(function () { + v.nodeName(this, "body") || v(this).replaceWith(this.childNodes); + }) + .end(); + }, + append: function () { + return this.domManip(arguments, !0, function (e) { + (this.nodeType === 1 || this.nodeType === 11) && this.appendChild(e); + }); + }, + prepend: function () { + return this.domManip(arguments, !0, function (e) { + (this.nodeType === 1 || this.nodeType === 11) && + this.insertBefore(e, this.firstChild); + }); + }, + before: function () { + if (!ut(this[0])) + return this.domManip(arguments, !1, function (e) { + this.parentNode.insertBefore(e, this); + }); + if (arguments.length) { + var e = v.clean(arguments); + return this.pushStack(v.merge(e, this), "before", this.selector); + } + }, + after: function () { + if (!ut(this[0])) + return this.domManip(arguments, !1, function (e) { + this.parentNode.insertBefore(e, this.nextSibling); + }); + if (arguments.length) { + var e = v.clean(arguments); + return this.pushStack(v.merge(this, e), "after", this.selector); + } + }, + remove: function (e, t) { + var n, + r = 0; + for (; (n = this[r]) != null; r++) + if (!e || v.filter(e, [n]).length) + !t && + n.nodeType === 1 && + (v.cleanData(n.getElementsByTagName("*")), v.cleanData([n])), + n.parentNode && n.parentNode.removeChild(n); + return this; + }, + empty: function () { + var e, + t = 0; + for (; (e = this[t]) != null; t++) { + e.nodeType === 1 && v.cleanData(e.getElementsByTagName("*")); + while (e.firstChild) e.removeChild(e.firstChild); + } + return this; + }, + clone: function (e, t) { + return ( + (e = e == null ? !1 : e), + (t = t == null ? e : t), + this.map(function () { + return v.clone(this, e, t); + }) + ); + }, + html: function (e) { + return v.access( + this, + function (e) { + var n = this[0] || {}, + r = 0, + i = this.length; + if (e === t) + return n.nodeType === 1 ? n.innerHTML.replace(ht, "") : t; + if ( + typeof e == "string" && + !yt.test(e) && + (v.support.htmlSerialize || !wt.test(e)) && + (v.support.leadingWhitespace || !pt.test(e)) && + !Nt[(vt.exec(e) || ["", ""])[1].toLowerCase()] + ) { + e = e.replace(dt, "<$1>"); + try { + for (; r < i; r++) + (n = this[r] || {}), + n.nodeType === 1 && + (v.cleanData(n.getElementsByTagName("*")), + (n.innerHTML = e)); + n = 0; + } catch (s) {} + } + n && this.empty().append(e); + }, + null, + e, + arguments.length, + ); + }, + replaceWith: function (e) { + return ut(this[0]) + ? this.length + ? this.pushStack(v(v.isFunction(e) ? e() : e), "replaceWith", e) + : this + : v.isFunction(e) + ? this.each(function (t) { + var n = v(this), + r = n.html(); + n.replaceWith(e.call(this, t, r)); + }) + : (typeof e != "string" && (e = v(e).detach()), + this.each(function () { + var t = this.nextSibling, + n = this.parentNode; + v(this).remove(), t ? v(t).before(e) : v(n).append(e); + })); + }, + detach: function (e) { + return this.remove(e, !0); + }, + domManip: function (e, n, r) { + e = [].concat.apply([], e); + var i, + s, + o, + u, + a = 0, + f = e[0], + l = [], + c = this.length; + if ( + !v.support.checkClone && + c > 1 && + typeof f == "string" && + St.test(f) + ) + return this.each(function () { + v(this).domManip(e, n, r); + }); + if (v.isFunction(f)) + return this.each(function (i) { + var s = v(this); + (e[0] = f.call(this, i, n ? s.html() : t)), s.domManip(e, n, r); + }); + if (this[0]) { + (i = v.buildFragment(e, this, l)), + (o = i.fragment), + (s = o.firstChild), + o.childNodes.length === 1 && (o = s); + if (s) { + n = n && v.nodeName(s, "tr"); + for (u = i.cacheable || c - 1; a < c; a++) + r.call( + n && v.nodeName(this[a], "table") + ? Lt(this[a], "tbody") + : this[a], + a === u ? o : v.clone(o, !0, !0), + ); + } + (o = s = null), + l.length && + v.each(l, function (e, t) { + t.src + ? v.ajax + ? v.ajax({ + url: t.src, + type: "GET", + dataType: "script", + async: !1, + global: !1, + throws: !0, + }) + : v.error("no ajax") + : v.globalEval( + (t.text || t.textContent || t.innerHTML || "").replace( + Tt, + "", + ), + ), + t.parentNode && t.parentNode.removeChild(t); + }); + } + return this; + }, + }), + (v.buildFragment = function (e, n, r) { + var s, + o, + u, + a = e[0]; + return ( + (n = n || i), + (n = (!n.nodeType && n[0]) || n), + (n = n.ownerDocument || n), + e.length === 1 && + typeof a == "string" && + a.length < 512 && + n === i && + a.charAt(0) === "<" && + !bt.test(a) && + (v.support.checkClone || !St.test(a)) && + (v.support.html5Clone || !wt.test(a)) && + ((o = !0), (s = v.fragments[a]), (u = s !== t)), + s || + ((s = n.createDocumentFragment()), + v.clean(e, n, s, r), + o && (v.fragments[a] = u && s)), + { fragment: s, cacheable: o } + ); + }), + (v.fragments = {}), + v.each( + { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith", + }, + function (e, t) { + v.fn[e] = function (n) { + var r, + i = 0, + s = [], + o = v(n), + u = o.length, + a = this.length === 1 && this[0].parentNode; + if ( + (a == null || + (a && a.nodeType === 11 && a.childNodes.length === 1)) && + u === 1 + ) + return o[t](this[0]), this; + for (; i < u; i++) + (r = (i > 0 ? this.clone(!0) : this).get()), + v(o[i])[t](r), + (s = s.concat(r)); + return this.pushStack(s, e, o.selector); + }; + }, + ), + v.extend({ + clone: function (e, t, n) { + var r, i, s, o; + v.support.html5Clone || + v.isXMLDoc(e) || + !wt.test("<" + e.nodeName + ">") + ? (o = e.cloneNode(!0)) + : ((kt.innerHTML = e.outerHTML), kt.removeChild((o = kt.firstChild))); + if ( + (!v.support.noCloneEvent || !v.support.noCloneChecked) && + (e.nodeType === 1 || e.nodeType === 11) && + !v.isXMLDoc(e) + ) { + Ot(e, o), (r = Mt(e)), (i = Mt(o)); + for (s = 0; r[s]; ++s) i[s] && Ot(r[s], i[s]); + } + if (t) { + At(e, o); + if (n) { + (r = Mt(e)), (i = Mt(o)); + for (s = 0; r[s]; ++s) At(r[s], i[s]); + } + } + return (r = i = null), o; + }, + clean: function (e, t, n, r) { + var s, + o, + u, + a, + f, + l, + c, + h, + p, + d, + m, + g, + y = t === i && Ct, + b = []; + if (!t || typeof t.createDocumentFragment == "undefined") t = i; + for (s = 0; (u = e[s]) != null; s++) { + typeof u == "number" && (u += ""); + if (!u) continue; + if (typeof u == "string") + if (!gt.test(u)) u = t.createTextNode(u); + else { + (y = y || lt(t)), + (c = t.createElement("div")), + y.appendChild(c), + (u = u.replace(dt, "<$1>")), + (a = (vt.exec(u) || ["", ""])[1].toLowerCase()), + (f = Nt[a] || Nt._default), + (l = f[0]), + (c.innerHTML = f[1] + u + f[2]); + while (l--) c = c.lastChild; + if (!v.support.tbody) { + (h = mt.test(u)), + (p = + a === "table" && !h + ? c.firstChild && c.firstChild.childNodes + : f[1] === "" && !h + ? c.childNodes + : []); + for (o = p.length - 1; o >= 0; --o) + v.nodeName(p[o], "tbody") && + !p[o].childNodes.length && + p[o].parentNode.removeChild(p[o]); + } + !v.support.leadingWhitespace && + pt.test(u) && + c.insertBefore(t.createTextNode(pt.exec(u)[0]), c.firstChild), + (u = c.childNodes), + c.parentNode.removeChild(c); + } + u.nodeType ? b.push(u) : v.merge(b, u); + } + c && (u = c = y = null); + if (!v.support.appendChecked) + for (s = 0; (u = b[s]) != null; s++) + v.nodeName(u, "input") + ? _t(u) + : typeof u.getElementsByTagName != "undefined" && + v.grep(u.getElementsByTagName("input"), _t); + if (n) { + m = function (e) { + if (!e.type || xt.test(e.type)) + return r + ? r.push(e.parentNode ? e.parentNode.removeChild(e) : e) + : n.appendChild(e); + }; + for (s = 0; (u = b[s]) != null; s++) + if (!v.nodeName(u, "script") || !m(u)) + n.appendChild(u), + typeof u.getElementsByTagName != "undefined" && + ((g = v.grep( + v.merge([], u.getElementsByTagName("script")), + m, + )), + b.splice.apply(b, [s + 1, 0].concat(g)), + (s += g.length)); + } + return b; + }, + cleanData: function (e, t) { + var n, + r, + i, + s, + o = 0, + u = v.expando, + a = v.cache, + f = v.support.deleteExpando, + l = v.event.special; + for (; (i = e[o]) != null; o++) + if (t || v.acceptData(i)) { + (r = i[u]), (n = r && a[r]); + if (n) { + if (n.events) + for (s in n.events) + l[s] ? v.event.remove(i, s) : v.removeEvent(i, s, n.handle); + a[r] && + (delete a[r], + f + ? delete i[u] + : i.removeAttribute + ? i.removeAttribute(u) + : (i[u] = null), + v.deletedIds.push(r)); + } + } + }, + }), + (function () { + var e, t; + (v.uaMatch = function (e) { + e = e.toLowerCase(); + var t = + /(chrome)[ \/]([\w.]+)/.exec(e) || + /(webkit)[ \/]([\w.]+)/.exec(e) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e) || + /(msie) ([\w.]+)/.exec(e) || + (e.indexOf("compatible") < 0 && + /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)) || + []; + return { browser: t[1] || "", version: t[2] || "0" }; + }), + (e = v.uaMatch(o.userAgent)), + (t = {}), + e.browser && ((t[e.browser] = !0), (t.version = e.version)), + t.chrome ? (t.webkit = !0) : t.webkit && (t.safari = !0), + (v.browser = t), + (v.sub = function () { + function e(t, n) { + return new e.fn.init(t, n); + } + v.extend(!0, e, this), + (e.superclass = this), + (e.fn = e.prototype = this()), + (e.fn.constructor = e), + (e.sub = this.sub), + (e.fn.init = function (r, i) { + return ( + i && i instanceof v && !(i instanceof e) && (i = e(i)), + v.fn.init.call(this, r, i, t) + ); + }), + (e.fn.init.prototype = e.fn); + var t = e(i); + return e; + }); + })(); + var Dt, + Pt, + Ht, + Bt = /alpha\([^)]*\)/i, + jt = /opacity=([^)]*)/, + Ft = /^(top|right|bottom|left)$/, + It = /^(none|table(?!-c[ea]).+)/, + qt = /^margin/, + Rt = new RegExp("^(" + m + ")(.*)$", "i"), + Ut = new RegExp("^(" + m + ")(?!px)[a-z%]+$", "i"), + zt = new RegExp("^([-+])=(" + m + ")", "i"), + Wt = { BODY: "block" }, + Xt = { position: "absolute", visibility: "hidden", display: "block" }, + Vt = { letterSpacing: 0, fontWeight: 400 }, + $t = ["Top", "Right", "Bottom", "Left"], + Jt = ["Webkit", "O", "Moz", "ms"], + Kt = v.fn.toggle; + v.fn.extend({ + css: function (e, n) { + return v.access( + this, + function (e, n, r) { + return r !== t ? v.style(e, n, r) : v.css(e, n); + }, + e, + n, + arguments.length > 1, + ); + }, + show: function () { + return Yt(this, !0); + }, + hide: function () { + return Yt(this); + }, + toggle: function (e, t) { + var n = typeof e == "boolean"; + return v.isFunction(e) && v.isFunction(t) + ? Kt.apply(this, arguments) + : this.each(function () { + (n ? e : Gt(this)) ? v(this).show() : v(this).hide(); + }); + }, + }), + v.extend({ + cssHooks: { + opacity: { + get: function (e, t) { + if (t) { + var n = Dt(e, "opacity"); + return n === "" ? "1" : n; + } + }, + }, + }, + cssNumber: { + fillOpacity: !0, + fontWeight: !0, + lineHeight: !0, + opacity: !0, + orphans: !0, + widows: !0, + zIndex: !0, + zoom: !0, + }, + cssProps: { float: v.support.cssFloat ? "cssFloat" : "styleFloat" }, + style: function (e, n, r, i) { + if (!e || e.nodeType === 3 || e.nodeType === 8 || !e.style) return; + var s, + o, + u, + a = v.camelCase(n), + f = e.style; + (n = v.cssProps[a] || (v.cssProps[a] = Qt(f, a))), + (u = v.cssHooks[n] || v.cssHooks[a]); + if (r === t) + return u && "get" in u && (s = u.get(e, !1, i)) !== t ? s : f[n]; + (o = typeof r), + o === "string" && + (s = zt.exec(r)) && + ((r = (s[1] + 1) * s[2] + parseFloat(v.css(e, n))), (o = "number")); + if (r == null || (o === "number" && isNaN(r))) return; + o === "number" && !v.cssNumber[a] && (r += "px"); + if (!u || !("set" in u) || (r = u.set(e, r, i)) !== t) + try { + f[n] = r; + } catch (l) {} + }, + css: function (e, n, r, i) { + var s, + o, + u, + a = v.camelCase(n); + return ( + (n = v.cssProps[a] || (v.cssProps[a] = Qt(e.style, a))), + (u = v.cssHooks[n] || v.cssHooks[a]), + u && "get" in u && (s = u.get(e, !0, i)), + s === t && (s = Dt(e, n)), + s === "normal" && n in Vt && (s = Vt[n]), + r || i !== t + ? ((o = parseFloat(s)), r || v.isNumeric(o) ? o || 0 : s) + : s + ); + }, + swap: function (e, t, n) { + var r, + i, + s = {}; + for (i in t) (s[i] = e.style[i]), (e.style[i] = t[i]); + r = n.call(e); + for (i in t) e.style[i] = s[i]; + return r; + }, + }), + e.getComputedStyle + ? (Dt = function (t, n) { + var r, + i, + s, + o, + u = e.getComputedStyle(t, null), + a = t.style; + return ( + u && + ((r = u.getPropertyValue(n) || u[n]), + r === "" && + !v.contains(t.ownerDocument, t) && + (r = v.style(t, n)), + Ut.test(r) && + qt.test(n) && + ((i = a.width), + (s = a.minWidth), + (o = a.maxWidth), + (a.minWidth = a.maxWidth = a.width = r), + (r = u.width), + (a.width = i), + (a.minWidth = s), + (a.maxWidth = o))), + r + ); + }) + : i.documentElement.currentStyle && + (Dt = function (e, t) { + var n, + r, + i = e.currentStyle && e.currentStyle[t], + s = e.style; + return ( + i == null && s && s[t] && (i = s[t]), + Ut.test(i) && + !Ft.test(t) && + ((n = s.left), + (r = e.runtimeStyle && e.runtimeStyle.left), + r && (e.runtimeStyle.left = e.currentStyle.left), + (s.left = t === "fontSize" ? "1em" : i), + (i = s.pixelLeft + "px"), + (s.left = n), + r && (e.runtimeStyle.left = r)), + i === "" ? "auto" : i + ); + }), + v.each(["height", "width"], function (e, t) { + v.cssHooks[t] = { + get: function (e, n, r) { + if (n) + return e.offsetWidth === 0 && It.test(Dt(e, "display")) + ? v.swap(e, Xt, function () { + return tn(e, t, r); + }) + : tn(e, t, r); + }, + set: function (e, n, r) { + return Zt( + e, + n, + r + ? en( + e, + t, + r, + v.support.boxSizing && v.css(e, "boxSizing") === "border-box", + ) + : 0, + ); + }, + }; + }), + v.support.opacity || + (v.cssHooks.opacity = { + get: function (e, t) { + return jt.test( + (t && e.currentStyle ? e.currentStyle.filter : e.style.filter) || + "", + ) + ? 0.01 * parseFloat(RegExp.$1) + "" + : t + ? "1" + : ""; + }, + set: function (e, t) { + var n = e.style, + r = e.currentStyle, + i = v.isNumeric(t) ? "alpha(opacity=" + t * 100 + ")" : "", + s = (r && r.filter) || n.filter || ""; + n.zoom = 1; + if (t >= 1 && v.trim(s.replace(Bt, "")) === "" && n.removeAttribute) { + n.removeAttribute("filter"); + if (r && !r.filter) return; + } + n.filter = Bt.test(s) ? s.replace(Bt, i) : s + " " + i; + }, + }), + v(function () { + v.support.reliableMarginRight || + (v.cssHooks.marginRight = { + get: function (e, t) { + return v.swap(e, { display: "inline-block" }, function () { + if (t) return Dt(e, "marginRight"); + }); + }, + }), + !v.support.pixelPosition && + v.fn.position && + v.each(["top", "left"], function (e, t) { + v.cssHooks[t] = { + get: function (e, n) { + if (n) { + var r = Dt(e, t); + return Ut.test(r) ? v(e).position()[t] + "px" : r; + } + }, + }; + }); + }), + v.expr && + v.expr.filters && + ((v.expr.filters.hidden = function (e) { + return ( + (e.offsetWidth === 0 && e.offsetHeight === 0) || + (!v.support.reliableHiddenOffsets && + ((e.style && e.style.display) || Dt(e, "display")) === "none") + ); + }), + (v.expr.filters.visible = function (e) { + return !v.expr.filters.hidden(e); + })), + v.each({ margin: "", padding: "", border: "Width" }, function (e, t) { + (v.cssHooks[e + t] = { + expand: function (n) { + var r, + i = typeof n == "string" ? n.split(" ") : [n], + s = {}; + for (r = 0; r < 4; r++) s[e + $t[r] + t] = i[r] || i[r - 2] || i[0]; + return s; + }, + }), + qt.test(e) || (v.cssHooks[e + t].set = Zt); + }); + var rn = /%20/g, + sn = /\[\]$/, + on = /\r?\n/g, + un = + /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, + an = /^(?:select|textarea)/i; + v.fn.extend({ + serialize: function () { + return v.param(this.serializeArray()); + }, + serializeArray: function () { + return this.map(function () { + return this.elements ? v.makeArray(this.elements) : this; + }) + .filter(function () { + return ( + this.name && + !this.disabled && + (this.checked || an.test(this.nodeName) || un.test(this.type)) + ); + }) + .map(function (e, t) { + var n = v(this).val(); + return n == null + ? null + : v.isArray(n) + ? v.map(n, function (e, n) { + return { name: t.name, value: e.replace(on, "\r\n") }; + }) + : { name: t.name, value: n.replace(on, "\r\n") }; + }) + .get(); + }, + }), + (v.param = function (e, n) { + var r, + i = [], + s = function (e, t) { + (t = v.isFunction(t) ? t() : t == null ? "" : t), + (i[i.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t)); + }; + n === t && (n = v.ajaxSettings && v.ajaxSettings.traditional); + if (v.isArray(e) || (e.jquery && !v.isPlainObject(e))) + v.each(e, function () { + s(this.name, this.value); + }); + else for (r in e) fn(r, e[r], n, s); + return i.join("&").replace(rn, "+"); + }); + var ln, + cn, + hn = /#.*$/, + pn = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm, + dn = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, + vn = /^(?:GET|HEAD)$/, + mn = /^\/\//, + gn = /\?/, + yn = /)<[^<]*)*<\/script>/gi, + bn = /([?&])_=[^&]*/, + wn = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + En = v.fn.load, + Sn = {}, + xn = {}, + Tn = ["*/"] + ["*"]; + try { + cn = s.href; + } catch (Nn) { + (cn = i.createElement("a")), (cn.href = ""), (cn = cn.href); + } + (ln = wn.exec(cn.toLowerCase()) || []), + (v.fn.load = function (e, n, r) { + if (typeof e != "string" && En) return En.apply(this, arguments); + if (!this.length) return this; + var i, + s, + o, + u = this, + a = e.indexOf(" "); + return ( + a >= 0 && ((i = e.slice(a, e.length)), (e = e.slice(0, a))), + v.isFunction(n) + ? ((r = n), (n = t)) + : n && typeof n == "object" && (s = "POST"), + v + .ajax({ + url: e, + type: s, + dataType: "html", + data: n, + complete: function (e, t) { + r && u.each(r, o || [e.responseText, t, e]); + }, + }) + .done(function (e) { + (o = arguments), + u.html(i ? v("
          ").append(e.replace(yn, "")).find(i) : e); + }), + this + ); + }), + v.each( + "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( + " ", + ), + function (e, t) { + v.fn[t] = function (e) { + return this.on(t, e); + }; + }, + ), + v.each(["get", "post"], function (e, n) { + v[n] = function (e, r, i, s) { + return ( + v.isFunction(r) && ((s = s || i), (i = r), (r = t)), + v.ajax({ type: n, url: e, data: r, success: i, dataType: s }) + ); + }; + }), + v.extend({ + getScript: function (e, n) { + return v.get(e, t, n, "script"); + }, + getJSON: function (e, t, n) { + return v.get(e, t, n, "json"); + }, + ajaxSetup: function (e, t) { + return ( + t ? Ln(e, v.ajaxSettings) : ((t = e), (e = v.ajaxSettings)), + Ln(e, t), + e + ); + }, + ajaxSettings: { + url: cn, + isLocal: dn.test(ln[1]), + global: !0, + type: "GET", + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + processData: !0, + async: !0, + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + text: "text/plain", + json: "application/json, text/javascript", + "*": Tn, + }, + contents: { xml: /xml/, html: /html/, json: /json/ }, + responseFields: { xml: "responseXML", text: "responseText" }, + converters: { + "* text": e.String, + "text html": !0, + "text json": v.parseJSON, + "text xml": v.parseXML, + }, + flatOptions: { context: !0, url: !0 }, + }, + ajaxPrefilter: Cn(Sn), + ajaxTransport: Cn(xn), + ajax: function (e, n) { + function T(e, n, s, a) { + var l, + y, + b, + w, + S, + T = n; + if (E === 2) return; + (E = 2), + u && clearTimeout(u), + (o = t), + (i = a || ""), + (x.readyState = e > 0 ? 4 : 0), + s && (w = An(c, x, s)); + if ((e >= 200 && e < 300) || e === 304) + c.ifModified && + ((S = x.getResponseHeader("Last-Modified")), + S && (v.lastModified[r] = S), + (S = x.getResponseHeader("Etag")), + S && (v.etag[r] = S)), + e === 304 + ? ((T = "notmodified"), (l = !0)) + : ((l = On(c, w)), + (T = l.state), + (y = l.data), + (b = l.error), + (l = !b)); + else { + b = T; + if (!T || e) (T = "error"), e < 0 && (e = 0); + } + (x.status = e), + (x.statusText = (n || T) + ""), + l ? d.resolveWith(h, [y, T, x]) : d.rejectWith(h, [x, T, b]), + x.statusCode(g), + (g = t), + f && + p.trigger("ajax" + (l ? "Success" : "Error"), [x, c, l ? y : b]), + m.fireWith(h, [x, T]), + f && + (p.trigger("ajaxComplete", [x, c]), + --v.active || v.event.trigger("ajaxStop")); + } + typeof e == "object" && ((n = e), (e = t)), (n = n || {}); + var r, + i, + s, + o, + u, + a, + f, + l, + c = v.ajaxSetup({}, n), + h = c.context || c, + p = h !== c && (h.nodeType || h instanceof v) ? v(h) : v.event, + d = v.Deferred(), + m = v.Callbacks("once memory"), + g = c.statusCode || {}, + b = {}, + w = {}, + E = 0, + S = "canceled", + x = { + readyState: 0, + setRequestHeader: function (e, t) { + if (!E) { + var n = e.toLowerCase(); + (e = w[n] = w[n] || e), (b[e] = t); + } + return this; + }, + getAllResponseHeaders: function () { + return E === 2 ? i : null; + }, + getResponseHeader: function (e) { + var n; + if (E === 2) { + if (!s) { + s = {}; + while ((n = pn.exec(i))) s[n[1].toLowerCase()] = n[2]; + } + n = s[e.toLowerCase()]; + } + return n === t ? null : n; + }, + overrideMimeType: function (e) { + return E || (c.mimeType = e), this; + }, + abort: function (e) { + return (e = e || S), o && o.abort(e), T(0, e), this; + }, + }; + d.promise(x), + (x.success = x.done), + (x.error = x.fail), + (x.complete = m.add), + (x.statusCode = function (e) { + if (e) { + var t; + if (E < 2) for (t in e) g[t] = [g[t], e[t]]; + else (t = e[x.status]), x.always(t); + } + return this; + }), + (c.url = ((e || c.url) + "") + .replace(hn, "") + .replace(mn, ln[1] + "//")), + (c.dataTypes = v + .trim(c.dataType || "*") + .toLowerCase() + .split(y)), + c.crossDomain == null && + ((a = wn.exec(c.url.toLowerCase())), + (c.crossDomain = !( + !a || + (a[1] === ln[1] && + a[2] === ln[2] && + (a[3] || (a[1] === "http:" ? 80 : 443)) == + (ln[3] || (ln[1] === "http:" ? 80 : 443))) + ))), + c.data && + c.processData && + typeof c.data != "string" && + (c.data = v.param(c.data, c.traditional)), + kn(Sn, c, n, x); + if (E === 2) return x; + (f = c.global), + (c.type = c.type.toUpperCase()), + (c.hasContent = !vn.test(c.type)), + f && v.active++ === 0 && v.event.trigger("ajaxStart"); + if (!c.hasContent) { + c.data && + ((c.url += (gn.test(c.url) ? "&" : "?") + c.data), delete c.data), + (r = c.url); + if (c.cache === !1) { + var N = v.now(), + C = c.url.replace(bn, "$1_=" + N); + c.url = + C + (C === c.url ? (gn.test(c.url) ? "&" : "?") + "_=" + N : ""); + } + } + ((c.data && c.hasContent && c.contentType !== !1) || n.contentType) && + x.setRequestHeader("Content-Type", c.contentType), + c.ifModified && + ((r = r || c.url), + v.lastModified[r] && + x.setRequestHeader("If-Modified-Since", v.lastModified[r]), + v.etag[r] && x.setRequestHeader("If-None-Match", v.etag[r])), + x.setRequestHeader( + "Accept", + c.dataTypes[0] && c.accepts[c.dataTypes[0]] + ? c.accepts[c.dataTypes[0]] + + (c.dataTypes[0] !== "*" ? ", " + Tn + "; q=0.01" : "") + : c.accepts["*"], + ); + for (l in c.headers) x.setRequestHeader(l, c.headers[l]); + if (!c.beforeSend || (c.beforeSend.call(h, x, c) !== !1 && E !== 2)) { + S = "abort"; + for (l in { success: 1, error: 1, complete: 1 }) x[l](c[l]); + o = kn(xn, c, n, x); + if (!o) T(-1, "No Transport"); + else { + (x.readyState = 1), + f && p.trigger("ajaxSend", [x, c]), + c.async && + c.timeout > 0 && + (u = setTimeout(function () { + x.abort("timeout"); + }, c.timeout)); + try { + (E = 1), o.send(b, T); + } catch (k) { + if (!(E < 2)) throw k; + T(-1, k); + } + } + return x; + } + return x.abort(); + }, + active: 0, + lastModified: {}, + etag: {}, + }); + var Mn = [], + _n = /\?/, + Dn = /(=)\?(?=&|$)|\?\?/, + Pn = v.now(); + v.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function () { + var e = Mn.pop() || v.expando + "_" + Pn++; + return (this[e] = !0), e; + }, + }), + v.ajaxPrefilter("json jsonp", function (n, r, i) { + var s, + o, + u, + a = n.data, + f = n.url, + l = n.jsonp !== !1, + c = l && Dn.test(f), + h = + l && + !c && + typeof a == "string" && + !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && + Dn.test(a); + if (n.dataTypes[0] === "jsonp" || c || h) + return ( + (s = n.jsonpCallback = + v.isFunction(n.jsonpCallback) + ? n.jsonpCallback() + : n.jsonpCallback), + (o = e[s]), + c + ? (n.url = f.replace(Dn, "$1" + s)) + : h + ? (n.data = a.replace(Dn, "$1" + s)) + : l && (n.url += (_n.test(f) ? "&" : "?") + n.jsonp + "=" + s), + (n.converters["script json"] = function () { + return u || v.error(s + " was not called"), u[0]; + }), + (n.dataTypes[0] = "json"), + (e[s] = function () { + u = arguments; + }), + i.always(function () { + (e[s] = o), + n[s] && ((n.jsonpCallback = r.jsonpCallback), Mn.push(s)), + u && v.isFunction(o) && o(u[0]), + (u = o = t); + }), + "script" + ); + }), + v.ajaxSetup({ + accepts: { + script: + "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript", + }, + contents: { script: /javascript|ecmascript/ }, + converters: { + "text script": function (e) { + return v.globalEval(e), e; + }, + }, + }), + v.ajaxPrefilter("script", function (e) { + e.cache === t && (e.cache = !1), + e.crossDomain && ((e.type = "GET"), (e.global = !1)); + }), + v.ajaxTransport("script", function (e) { + if (e.crossDomain) { + var n, + r = i.head || i.getElementsByTagName("head")[0] || i.documentElement; + return { + send: function (s, o) { + (n = i.createElement("script")), + (n.async = "async"), + e.scriptCharset && (n.charset = e.scriptCharset), + (n.src = e.url), + (n.onload = n.onreadystatechange = + function (e, i) { + if ( + i || + !n.readyState || + /loaded|complete/.test(n.readyState) + ) + (n.onload = n.onreadystatechange = null), + r && n.parentNode && r.removeChild(n), + (n = t), + i || o(200, "success"); + }), + r.insertBefore(n, r.firstChild); + }, + abort: function () { + n && n.onload(0, 1); + }, + }; + } + }); + var Hn, + Bn = e.ActiveXObject + ? function () { + for (var e in Hn) Hn[e](0, 1); + } + : !1, + jn = 0; + (v.ajaxSettings.xhr = e.ActiveXObject + ? function () { + return (!this.isLocal && Fn()) || In(); + } + : Fn), + (function (e) { + v.extend(v.support, { ajax: !!e, cors: !!e && "withCredentials" in e }); + })(v.ajaxSettings.xhr()), + v.support.ajax && + v.ajaxTransport(function (n) { + if (!n.crossDomain || v.support.cors) { + var r; + return { + send: function (i, s) { + var o, + u, + a = n.xhr(); + n.username + ? a.open(n.type, n.url, n.async, n.username, n.password) + : a.open(n.type, n.url, n.async); + if (n.xhrFields) for (u in n.xhrFields) a[u] = n.xhrFields[u]; + n.mimeType && + a.overrideMimeType && + a.overrideMimeType(n.mimeType), + !n.crossDomain && + !i["X-Requested-With"] && + (i["X-Requested-With"] = "XMLHttpRequest"); + try { + for (u in i) a.setRequestHeader(u, i[u]); + } catch (f) {} + a.send((n.hasContent && n.data) || null), + (r = function (e, i) { + var u, f, l, c, h; + try { + if (r && (i || a.readyState === 4)) { + (r = t), + o && + ((a.onreadystatechange = v.noop), Bn && delete Hn[o]); + if (i) a.readyState !== 4 && a.abort(); + else { + (u = a.status), + (l = a.getAllResponseHeaders()), + (c = {}), + (h = a.responseXML), + h && h.documentElement && (c.xml = h); + try { + c.text = a.responseText; + } catch (p) {} + try { + f = a.statusText; + } catch (p) { + f = ""; + } + !u && n.isLocal && !n.crossDomain + ? (u = c.text ? 200 : 404) + : u === 1223 && (u = 204); + } + } + } catch (d) { + i || s(-1, d); + } + c && s(u, f, c, l); + }), + n.async + ? a.readyState === 4 + ? setTimeout(r, 0) + : ((o = ++jn), + Bn && (Hn || ((Hn = {}), v(e).unload(Bn)), (Hn[o] = r)), + (a.onreadystatechange = r)) + : r(); + }, + abort: function () { + r && r(0, 1); + }, + }; + } + }); + var qn, + Rn, + Un = /^(?:toggle|show|hide)$/, + zn = new RegExp("^(?:([-+])=|)(" + m + ")([a-z%]*)$", "i"), + Wn = /queueHooks$/, + Xn = [Gn], + Vn = { + "*": [ + function (e, t) { + var n, + r, + i = this.createTween(e, t), + s = zn.exec(t), + o = i.cur(), + u = +o || 0, + a = 1, + f = 20; + if (s) { + (n = +s[2]), (r = s[3] || (v.cssNumber[e] ? "" : "px")); + if (r !== "px" && u) { + u = v.css(i.elem, e, !0) || n || 1; + do (a = a || ".5"), (u /= a), v.style(i.elem, e, u + r); + while (a !== (a = i.cur() / o) && a !== 1 && --f); + } + (i.unit = r), + (i.start = u), + (i.end = s[1] ? u + (s[1] + 1) * n : n); + } + return i; + }, + ], + }; + (v.Animation = v.extend(Kn, { + tweener: function (e, t) { + v.isFunction(e) ? ((t = e), (e = ["*"])) : (e = e.split(" ")); + var n, + r = 0, + i = e.length; + for (; r < i; r++) (n = e[r]), (Vn[n] = Vn[n] || []), Vn[n].unshift(t); + }, + prefilter: function (e, t) { + t ? Xn.unshift(e) : Xn.push(e); + }, + })), + (v.Tween = Yn), + (Yn.prototype = { + constructor: Yn, + init: function (e, t, n, r, i, s) { + (this.elem = e), + (this.prop = n), + (this.easing = i || "swing"), + (this.options = t), + (this.start = this.now = this.cur()), + (this.end = r), + (this.unit = s || (v.cssNumber[n] ? "" : "px")); + }, + cur: function () { + var e = Yn.propHooks[this.prop]; + return e && e.get ? e.get(this) : Yn.propHooks._default.get(this); + }, + run: function (e) { + var t, + n = Yn.propHooks[this.prop]; + return ( + this.options.duration + ? (this.pos = t = + v.easing[this.easing]( + e, + this.options.duration * e, + 0, + 1, + this.options.duration, + )) + : (this.pos = t = e), + (this.now = (this.end - this.start) * t + this.start), + this.options.step && + this.options.step.call(this.elem, this.now, this), + n && n.set ? n.set(this) : Yn.propHooks._default.set(this), + this + ); + }, + }), + (Yn.prototype.init.prototype = Yn.prototype), + (Yn.propHooks = { + _default: { + get: function (e) { + var t; + return e.elem[e.prop] == null || + (!!e.elem.style && e.elem.style[e.prop] != null) + ? ((t = v.css(e.elem, e.prop, !1, "")), !t || t === "auto" ? 0 : t) + : e.elem[e.prop]; + }, + set: function (e) { + v.fx.step[e.prop] + ? v.fx.step[e.prop](e) + : e.elem.style && + (e.elem.style[v.cssProps[e.prop]] != null || v.cssHooks[e.prop]) + ? v.style(e.elem, e.prop, e.now + e.unit) + : (e.elem[e.prop] = e.now); + }, + }, + }), + (Yn.propHooks.scrollTop = Yn.propHooks.scrollLeft = + { + set: function (e) { + e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now); + }, + }), + v.each(["toggle", "show", "hide"], function (e, t) { + var n = v.fn[t]; + v.fn[t] = function (r, i, s) { + return r == null || + typeof r == "boolean" || + (!e && v.isFunction(r) && v.isFunction(i)) + ? n.apply(this, arguments) + : this.animate(Zn(t, !0), r, i, s); + }; + }), + v.fn.extend({ + fadeTo: function (e, t, n, r) { + return this.filter(Gt) + .css("opacity", 0) + .show() + .end() + .animate({ opacity: t }, e, n, r); + }, + animate: function (e, t, n, r) { + var i = v.isEmptyObject(e), + s = v.speed(t, n, r), + o = function () { + var t = Kn(this, v.extend({}, e), s); + i && t.stop(!0); + }; + return i || s.queue === !1 ? this.each(o) : this.queue(s.queue, o); + }, + stop: function (e, n, r) { + var i = function (e) { + var t = e.stop; + delete e.stop, t(r); + }; + return ( + typeof e != "string" && ((r = n), (n = e), (e = t)), + n && e !== !1 && this.queue(e || "fx", []), + this.each(function () { + var t = !0, + n = e != null && e + "queueHooks", + s = v.timers, + o = v._data(this); + if (n) o[n] && o[n].stop && i(o[n]); + else for (n in o) o[n] && o[n].stop && Wn.test(n) && i(o[n]); + for (n = s.length; n--; ) + s[n].elem === this && + (e == null || s[n].queue === e) && + (s[n].anim.stop(r), (t = !1), s.splice(n, 1)); + (t || !r) && v.dequeue(this, e); + }) + ); + }, + }), + v.each( + { + slideDown: Zn("show"), + slideUp: Zn("hide"), + slideToggle: Zn("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" }, + }, + function (e, t) { + v.fn[e] = function (e, n, r) { + return this.animate(t, e, n, r); + }; + }, + ), + (v.speed = function (e, t, n) { + var r = + e && typeof e == "object" + ? v.extend({}, e) + : { + complete: n || (!n && t) || (v.isFunction(e) && e), + duration: e, + easing: (n && t) || (t && !v.isFunction(t) && t), + }; + r.duration = v.fx.off + ? 0 + : typeof r.duration == "number" + ? r.duration + : r.duration in v.fx.speeds + ? v.fx.speeds[r.duration] + : v.fx.speeds._default; + if (r.queue == null || r.queue === !0) r.queue = "fx"; + return ( + (r.old = r.complete), + (r.complete = function () { + v.isFunction(r.old) && r.old.call(this), + r.queue && v.dequeue(this, r.queue); + }), + r + ); + }), + (v.easing = { + linear: function (e) { + return e; + }, + swing: function (e) { + return 0.5 - Math.cos(e * Math.PI) / 2; + }, + }), + (v.timers = []), + (v.fx = Yn.prototype.init), + (v.fx.tick = function () { + var e, + n = v.timers, + r = 0; + qn = v.now(); + for (; r < n.length; r++) + (e = n[r]), !e() && n[r] === e && n.splice(r--, 1); + n.length || v.fx.stop(), (qn = t); + }), + (v.fx.timer = function (e) { + e() && + v.timers.push(e) && + !Rn && + (Rn = setInterval(v.fx.tick, v.fx.interval)); + }), + (v.fx.interval = 13), + (v.fx.stop = function () { + clearInterval(Rn), (Rn = null); + }), + (v.fx.speeds = { slow: 600, fast: 200, _default: 400 }), + (v.fx.step = {}), + v.expr && + v.expr.filters && + (v.expr.filters.animated = function (e) { + return v.grep(v.timers, function (t) { + return e === t.elem; + }).length; + }); + var er = /^(?:body|html)$/i; + (v.fn.offset = function (e) { + if (arguments.length) + return e === t + ? this + : this.each(function (t) { + v.offset.setOffset(this, e, t); + }); + var n, + r, + i, + s, + o, + u, + a, + f = { top: 0, left: 0 }, + l = this[0], + c = l && l.ownerDocument; + if (!c) return; + return (r = c.body) === l + ? v.offset.bodyOffset(l) + : ((n = c.documentElement), + v.contains(n, l) + ? (typeof l.getBoundingClientRect != "undefined" && + (f = l.getBoundingClientRect()), + (i = tr(c)), + (s = n.clientTop || r.clientTop || 0), + (o = n.clientLeft || r.clientLeft || 0), + (u = i.pageYOffset || n.scrollTop), + (a = i.pageXOffset || n.scrollLeft), + { top: f.top + u - s, left: f.left + a - o }) + : f); + }), + (v.offset = { + bodyOffset: function (e) { + var t = e.offsetTop, + n = e.offsetLeft; + return ( + v.support.doesNotIncludeMarginInBodyOffset && + ((t += parseFloat(v.css(e, "marginTop")) || 0), + (n += parseFloat(v.css(e, "marginLeft")) || 0)), + { top: t, left: n } + ); + }, + setOffset: function (e, t, n) { + var r = v.css(e, "position"); + r === "static" && (e.style.position = "relative"); + var i = v(e), + s = i.offset(), + o = v.css(e, "top"), + u = v.css(e, "left"), + a = + (r === "absolute" || r === "fixed") && + v.inArray("auto", [o, u]) > -1, + f = {}, + l = {}, + c, + h; + a + ? ((l = i.position()), (c = l.top), (h = l.left)) + : ((c = parseFloat(o) || 0), (h = parseFloat(u) || 0)), + v.isFunction(t) && (t = t.call(e, n, s)), + t.top != null && (f.top = t.top - s.top + c), + t.left != null && (f.left = t.left - s.left + h), + "using" in t ? t.using.call(e, f) : i.css(f); + }, + }), + v.fn.extend({ + position: function () { + if (!this[0]) return; + var e = this[0], + t = this.offsetParent(), + n = this.offset(), + r = er.test(t[0].nodeName) ? { top: 0, left: 0 } : t.offset(); + return ( + (n.top -= parseFloat(v.css(e, "marginTop")) || 0), + (n.left -= parseFloat(v.css(e, "marginLeft")) || 0), + (r.top += parseFloat(v.css(t[0], "borderTopWidth")) || 0), + (r.left += parseFloat(v.css(t[0], "borderLeftWidth")) || 0), + { top: n.top - r.top, left: n.left - r.left } + ); + }, + offsetParent: function () { + return this.map(function () { + var e = this.offsetParent || i.body; + while (e && !er.test(e.nodeName) && v.css(e, "position") === "static") + e = e.offsetParent; + return e || i.body; + }); + }, + }), + v.each( + { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, + function (e, n) { + var r = /Y/.test(n); + v.fn[e] = function (i) { + return v.access( + this, + function (e, i, s) { + var o = tr(e); + if (s === t) + return o + ? n in o + ? o[n] + : o.document.documentElement[i] + : e[i]; + o + ? o.scrollTo( + r ? v(o).scrollLeft() : s, + r ? s : v(o).scrollTop(), + ) + : (e[i] = s); + }, + e, + i, + arguments.length, + null, + ); + }; + }, + ), + v.each({ Height: "height", Width: "width" }, function (e, n) { + v.each( + { padding: "inner" + e, content: n, "": "outer" + e }, + function (r, i) { + v.fn[i] = function (i, s) { + var o = arguments.length && (r || typeof i != "boolean"), + u = r || (i === !0 || s === !0 ? "margin" : "border"); + return v.access( + this, + function (n, r, i) { + var s; + return v.isWindow(n) + ? n.document.documentElement["client" + e] + : n.nodeType === 9 + ? ((s = n.documentElement), + Math.max( + n.body["scroll" + e], + s["scroll" + e], + n.body["offset" + e], + s["offset" + e], + s["client" + e], + )) + : i === t + ? v.css(n, r, i, u) + : v.style(n, r, i, u); + }, + n, + o ? i : t, + o, + null, + ); + }; + }, + ); + }), + (e.jQuery = e.$ = v), + typeof define == "function" && + define.amd && + define.amd.jQuery && + define("jquery", [], function () { + return v; + }); +})(window); diff --git a/r2rgui/public/javascripts/jquery-ui-1.9.2.custom.min.js b/r2rgui/public/javascripts/jquery-ui-1.9.2.custom.min.js index 9b3b84d..dd745b3 100644 --- a/r2rgui/public/javascripts/jquery-ui-1.9.2.custom.min.js +++ b/r2rgui/public/javascripts/jquery-ui-1.9.2.custom.min.js @@ -1,6 +1,11594 @@ /*! jQuery UI - v1.9.2 - 2012-11-23 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js -* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */ + * http://jqueryui.com + * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js + * Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */ -(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return"area"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!=="map"?!1:(o=e("img[usemap=#"+i+"]")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,"visibility")==="hidden"}).length}var n=0,r=/^ui-id-\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css("position");if(i==="absolute"||i==="relative"||i==="fixed"){s=parseInt(r.css("zIndex"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var i=r==="Width"?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?o["inner"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?o["outer"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+"px")})}}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\+\-]\d+%?/,f=/^\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e("
          "),o=s.children()[0];return e("body").append(s),r=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),i=n==="scroll"||n==="auto"&&t.width0?"right":"center",vertical:u<0?"top":o>0?"bottom":"middle"};lr(i(o),i(u))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,c=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)a&&(v<0||v0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)10&&i<11,t.innerHTML="",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(" "),s=r.at.split(" ");return i.length===1&&(i[1]=i[0]),/^\d/.test(i[0])&&(i[0]="+"+i[0]),/^\d/.test(i[1])&&(i[1]="+"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]="center":(s[1]=s[0],s[0]="center")),n.call(this,e.extend(r,{at:s[0]+i[0]+" "+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e,t){var n=0,r={},i={};r.height=r.paddingTop=r.paddingBottom=r.borderTopWidth=r.borderBottomWidth="hide",i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.9.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.accordionId="ui-accordion-"+(this.element.attr("id")||++n),r=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset"),this.headers=this.element.find(r.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this._hoverable(this.headers),this._focusable(this.headers),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(),!r.collapsible&&(r.active===!1||r.active==null)&&(r.active=0),r.active<0&&(r.active+=this.headers.length),this.active=this._findActive(r.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top"),this.active.next().addClass("ui-accordion-content-active").show(),this._createIcons(),this.refresh(),this.element.attr("role","tablist"),this.headers.attr("role","tab").each(function(n){var r=e(this),i=r.attr("id"),s=r.next(),o=s.attr("id");i||(i=t+"-header-"+n,r.attr("id",i)),o||(o=t+"-panel-"+n,s.attr("id",o)),r.attr("aria-controls",o),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._on(this.headers,{keydown:"_keydown"}),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._setupEvents(r.event)},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this.options.heightStyle!=="content"&&e.css("height","")},_setOption:function(e,t){if(e==="active"){this._activate(t);return}e==="event"&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),e==="collapsible"&&!t&&this.options.active===!1&&this._activate(0),e==="icons"&&(this._destroyIcons(),t&&this._createIcons()),e==="disabled"&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)},_keydown:function(t){if(t.altKey||t.ctrlKey)return;var n=e.ui.keyCode,r=this.headers.length,i=this.headers.index(t.target),s=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:s=this.headers[(i+1)%r];break;case n.LEFT:case n.UP:s=this.headers[(i-1+r)%r];break;case n.SPACE:case n.ENTER:this._eventHandler(t);break;case n.HOME:s=this.headers[0];break;case n.END:s=this.headers[r-1]}s&&(e(t.target).attr("tabIndex",-1),e(s).attr("tabIndex",0),s.focus(),t.preventDefault())},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t,n,r=this.options.heightStyle,i=this.element.parent();r==="fill"?(e.support.minHeight||(n=i.css("overflow"),i.css("overflow","hidden")),t=i.height(),this.element.siblings(":visible").each(function(){var n=e(this),r=n.css("position");if(r==="absolute"||r==="fixed")return;t-=n.outerHeight(!0)}),n&&i.css("overflow",n),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):r==="auto"&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var n=this._findActive(t)[0];if(n===this.active[0])return;n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return typeof t=="number"?this.headers.eq(t):e()},_setupEvents:function(t){var n={};if(!t)return;e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._on(this.headers,n)},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i[0]===r[0],o=s&&n.collapsible,u=o?e():i.next(),a=r.next(),f={oldHeader:r,oldPanel:a,newHeader:o?e():i,newPanel:u};t.preventDefault();if(s&&!n.collapsible||this._trigger("beforeActivate",t,f)===!1)return;n.active=o?!1:this.headers.index(i),this.active=s?e():i,this._toggle(f),r.removeClass("ui-accordion-header-active ui-state-active"),n.icons&&r.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header),s||(i.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),n.icons&&i.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader),i.next().addClass("ui-accordion-content-active"))},_toggle:function(t){var n=t.newPanel,r=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=r,this.options.animate?this._animate(n,r,t):(r.hide(),n.show(),this._toggleComplete(t)),r.attr({"aria-expanded":"false","aria-hidden":"true"}),r.prev().attr("aria-selected","false"),n.length&&r.length?r.prev().attr("tabIndex",-1):n.length&&this.headers.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),n.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(e,t,n){var s,o,u,a=this,f=0,l=e.length&&(!t.length||e.index()",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,n,r;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(i){if(this.element.prop("readOnly")){t=!0,r=!0,n=!0;return}t=!1,r=!1,n=!1;var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:t=!0,this._move("previousPage",i);break;case s.PAGE_DOWN:t=!0,this._move("nextPage",i);break;case s.UP:t=!0,this._keyEvent("previous",i);break;case s.DOWN:t=!0,this._keyEvent("next",i);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));break;case s.TAB:this.menu.active&&this.menu.select(i);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(i),i.preventDefault());break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t){t=!1,r.preventDefault();return}if(n)return;var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move("previousPage",r);break;case i.PAGE_DOWN:this._move("nextPage",r);break;case i.UP:this._keyEvent("previous",r);break;case i.DOWN:this._keyEvent("next",r)}},input:function(e){if(r){r=!1,e.preventDefault();return}this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e("
          '+"";var z=N?'":"";for(var W=0;W<7;W++){var X=(W+T)%7;z+="=5?' class="ui-datepicker-week-end"':"")+">"+''+L[X]+""}U+=z+"";var V=this._getDaysInMonth(d,p);d==e.selectedYear&&p==e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,V));var J=(this._getFirstDayOfMonth(d,p)-T+7)%7,K=Math.ceil((J+V)/7),Q=f?this.maxRows>K?this.maxRows:K:K;this.maxRows=Q;var G=this._daylightSavingAdjust(new Date(d,p,1-J));for(var Y=0;Y";var Z=N?'":"";for(var W=0;W<7;W++){var et=M?M.apply(e.input?e.input[0]:null,[G]):[!0,""],tt=G.getMonth()!=p,nt=tt&&!D||!et[0]||c&&Gh;Z+='",G.setDate(G.getDate()+1),G=this._daylightSavingAdjust(G)}U+=Z+""}p++,p>11&&(p=0,d++),U+="
          '+this._get(e,"weekHeader")+"
          '+this._get(e,"calculateWeek")(G)+""+(tt&&!_?" ":nt?''+G.getDate()+"":''+G.getDate()+"")+"
          "+(f?"
          "+(o[0]>0&&I==o[1]-1?'
          ':""):""),F+=U}B+=F}return B+=x+($.ui.ie6&&!e.inline?'':""),e._keyEvent=!1,B},_generateMonthYearHeader:function(e,t,n,r,i,s,o,u){var a=this._get(e,"changeMonth"),f=this._get(e,"changeYear"),l=this._get(e,"showMonthAfterYear"),c='
          ',h="";if(s||!a)h+=''+o[t]+"";else{var p=r&&r.getFullYear()==n,d=i&&i.getFullYear()==n;h+='"}l||(c+=h+(s||!a||!f?" ":""));if(!e.yearshtml){e.yearshtml="";if(s||!f)c+=''+n+"";else{var m=this._get(e,"yearRange").split(":"),g=(new Date).getFullYear(),y=function(e){var t=e.match(/c[+-].*/)?n+parseInt(e.substring(1),10):e.match(/[+-].*/)?g+parseInt(e,10):parseInt(e,10);return isNaN(t)?g:t},b=y(m[0]),w=Math.max(b,y(m[1]||""));b=r?Math.max(b,r.getFullYear()):b,w=i?Math.min(w,i.getFullYear()):w,e.yearshtml+='",c+=e.yearshtml,e.yearshtml=null}}return c+=this._get(e,"yearSuffix"),l&&(c+=(s||!a||!f?" ":"")+h),c+="
          ",c},_adjustInstDate:function(e,t,n){var r=e.drawYear+(n=="Y"?t:0),i=e.drawMonth+(n=="M"?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+(n=="D"?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(r,i,s)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),(n=="M"||n=="Y")&&this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),i=n&&tr?r:i,i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return(new Date(e,t,1)).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(n,r+(t<0?t:i[0]*i[1]),1));return t<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max");return(!n||t.getTime()>=n.getTime())&&(!r||t.getTime()<=r.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var i=t?typeof t=="object"?t:this._daylightSavingAdjust(new Date(r,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=Array.prototype.slice.call(arguments,1);return typeof e!="string"||e!="isDisabled"&&e!="getDate"&&e!="widget"?e=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){typeof e=="string"?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.9.2",window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(e,t){var n="ui-dialog ui-widget ui-widget-content ui-corner-all ",r={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.9.2",options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var n=e(this).css(t).offset().top;n<0&&e(this).css("top",t.top-n)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var t=this,r=this.options,i=r.title||" ",s,o,u,a,f;s=(this.uiDialog=e("
          ")).addClass(n+r.dialogClass).css({display:"none",outline:0,zIndex:r.zIndex}).attr("tabIndex",-1).keydown(function(n){r.closeOnEscape&&!n.isDefaultPrevented()&&n.keyCode&&n.keyCode===e.ui.keyCode.ESCAPE&&(t.close(n),n.preventDefault())}).mousedown(function(e){t.moveToTop(!1,e)}).appendTo("body"),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(s),o=(this.uiDialogTitlebar=e("
          ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").bind("mousedown",function(){s.focus()}).prependTo(s),u=e("").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(e){e.preventDefault(),t.close(e)}).appendTo(o),(this.uiDialogTitlebarCloseText=e("")).addClass("ui-icon ui-icon-closethick").text(r.closeText).appendTo(u),a=e("").uniqueId().addClass("ui-dialog-title").html(i).prependTo(o),f=(this.uiDialogButtonPane=e("
          ")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),(this.uiButtonSet=e("
          ")).addClass("ui-dialog-buttonset").appendTo(f),s.attr({role:"dialog","aria-labelledby":a.attr("id")}),o.find("*").add(o).disableSelection(),this._hoverable(u),this._focusable(u),r.draggable&&e.fn.draggable&&this._makeDraggable(),r.resizable&&e.fn.resizable&&this._makeResizable(),this._createButtons(r.buttons),this._isOpen=!1,e.fn.bgiframe&&s.bgiframe(),this._on(s,{keydown:function(t){if(!r.modal||t.keyCode!==e.ui.keyCode.TAB)return;var n=e(":tabbable",s),i=n.filter(":first"),o=n.filter(":last");if(t.target===o[0]&&!t.shiftKey)return i.focus(1),!1;if(t.target===i[0]&&t.shiftKey)return o.focus(1),!1}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var e,t=this.oldPosition;this.overlay&&this.overlay.destroy(),this.uiDialog.hide(),this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(t){var n=this,r,i;if(!this._isOpen)return;if(!1===this._trigger("beforeClose",t))return;return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)}):(this.uiDialog.hide(),this._trigger("close",t)),e.ui.dialog.overlay.resize(),this.options.modal&&(r=0,e(".ui-dialog").each(function(){this!==n.uiDialog[0]&&(i=e(this).css("z-index"),isNaN(i)||(r=Math.max(r,i)))}),e.ui.dialog.maxZ=r),this},isOpen:function(){return this._isOpen},moveToTop:function(t,n){var r=this.options,i;return r.modal&&!t||!r.stack&&!r.modal?this._trigger("focus",n):(r.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=r.zIndex),this.overlay&&(e.ui.dialog.maxZ+=1,e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ,this.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ)),i={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},e.ui.dialog.maxZ+=1,this.uiDialog.css("z-index",e.ui.dialog.maxZ),this.element.attr(i),this._trigger("focus",n),this)},open:function(){if(this._isOpen)return;var t,n=this.options,r=this.uiDialog;return this._size(),this._position(n.position),r.show(n.show),this.overlay=n.modal?new e.ui.dialog.overlay(this):null,this.moveToTop(!0),t=this.element.find(":tabbable"),t.length||(t=this.uiDialogButtonPane.find(":tabbable"),t.length||(t=r)),t.eq(0).focus(),this._isOpen=!0,this._trigger("open"),this},_createButtons:function(t){var n=this,r=!1;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),typeof t=="object"&&t!==null&&e.each(t,function(){return!(r=!0)}),r?(e.each(t,function(t,r){var i,s;r=e.isFunction(r)?{click:r,text:t}:r,r=e.extend({type:"button"},r),s=r.click,r.click=function(){s.apply(n.element[0],arguments)},i=e("",r).appendTo(n.uiButtonSet),e.fn.button&&i.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function r(e){return{position:e.position,offset:e.offset}}var t=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,i){e(this).addClass("ui-dialog-dragging"),t._trigger("dragStart",n,r(i))},drag:function(e,n){t._trigger("drag",e,r(n))},stop:function(i,s){n.position=[s.position.left-t.document.scrollLeft(),s.position.top-t.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),t._trigger("dragStop",i,r(s)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(n){function u(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}n=n===t?this.options.resizable:n;var r=this,i=this.options,s=this.uiDialog.css("position"),o=typeof n=="string"?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:o,start:function(t,n){e(this).addClass("ui-dialog-resizing"),r._trigger("resizeStart",t,u(n))},resize:function(e,t){r._trigger("resize",e,u(t))},stop:function(t,n){e(this).removeClass("ui-dialog-resizing"),i.height=e(this).height(),i.width=e(this).width(),r._trigger("resizeStop",t,u(n)),e.ui.dialog.overlay.resize()}}).css("position",s).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var n=[],r=[0,0],i;if(t){if(typeof t=="string"||typeof t=="object"&&"0"in t)n=t.split?t.split(" "):[t[0],t[1]],n.length===1&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(r[e]=n[e],n[e]=t)}),t={my:n[0]+(r[0]<0?r[0]:"+"+r[0])+" "+n[1]+(r[1]<0?r[1]:"+"+r[1]),at:n.join(" ")};t=e.extend({},e.ui.dialog.prototype.options.position,t)}else t=e.ui.dialog.prototype.options.position;i=this.uiDialog.is(":visible"),i||this.uiDialog.show(),this.uiDialog.position(t),i||this.uiDialog.hide()},_setOptions:function(t){var n=this,s={},o=!1;e.each(t,function(e,t){n._setOption(e,t),e in r&&(o=!0),e in i&&(s[e]=t)}),o&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,r){var i,s,o=this.uiDialog;switch(t){case"buttons":this._createButtons(r);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+r);break;case"dialogClass":o.removeClass(this.options.dialogClass).addClass(n+r);break;case"disabled":r?o.addClass("ui-dialog-disabled"):o.removeClass("ui-dialog-disabled");break;case"draggable":i=o.is(":data(draggable)"),i&&!r&&o.draggable("destroy"),!i&&r&&this._makeDraggable();break;case"position":this._position(r);break;case"resizable":s=o.is(":data(resizable)"),s&&!r&&o.resizable("destroy"),s&&typeof r=="string"&&o.resizable("option","handles",r),!s&&r!==!1&&this._makeResizable(r);break;case"title":e(".ui-dialog-title",this.uiDialogTitlebar).html(""+(r||" "))}this._super(t,r)},_size:function(){var t,n,r,i=this.options,s=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),n=Math.max(0,i.minHeight-t),i.height==="auto"?e.support.minHeight?this.element.css({minHeight:n,height:"auto"}):(this.uiDialog.show(),r=this.element.css("height","auto").height(),s||this.uiDialog.hide(),this.element.height(Math.max(r,n))):this.element.height(Math.max(i.height-t,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(t){this.instances.length===0&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(t){if(e(t.target).zIndex()").addClass("ui-widget-overlay");return e(document).bind("keydown.dialog-overlay",function(r){var i=e.ui.dialog.overlay.instances;i.length!==0&&i[i.length-1]===n&&t.options.closeOnEscape&&!r.isDefaultPrevented()&&r.keyCode&&r.keyCode===e.ui.keyCode.ESCAPE&&(t.close(r),r.preventDefault())}),n.appendTo(document.body).css({width:this.width(),height:this.height()}),e.fn.bgiframe&&n.bgiframe(),this.instances.push(n),n},destroy:function(t){var n=e.inArray(t,this.instances),r=0;n!==-1&&this.oldInstances.push(this.instances.splice(n,1)[0]),this.instances.length===0&&e([document,window]).unbind(".dialog-overlay"),t.height(0).width(0).remove(),e.each(this.instances,function(){r=Math.max(r,this.css("z-index"))}),this.maxZ=r},height:function(){var t,n;return e.ui.ie?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),n=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),t
          ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute");if(!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);var r=this.element[0],i=!1;while(r&&(r=r.parentNode))r==document&&(i=!0);if(!i&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!n||this.options.revert=="valid"&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var s=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var n=!this.options.handle||!e(this.options.handle,this.element).length?!0:!1;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),n},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):n.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo(n.appendTo=="parent"?this.element[0].parentNode:n.appendTo),r[0]!=this.element[0]&&!/(fixed|absolute)/.test(r.css("position"))&&r.css("position","absolute"),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[t.containment=="document"?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t.containment=="document"?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(t.containment=="document"?0:e(window).scrollLeft())+e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(t.containment=="document"?0:e(window).scrollTop())+(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)&&t.containment.constructor!=Array){var n=e(t.containment),r=n[0];if(!r)return;var i=n.offset(),s=e(r).css("overflow")!="hidden";this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(s?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}else t.containment.constructor==Array&&(this.containment=t.containment)},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var a=this.relative_container.offset();u=[this.containment[0]+a.left,this.containment[1]+a.top,this.containment[2]+a.left,this.containment[3]+a.top]}else u=this.containment;t.pageX-this.offset.click.leftu[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)}if(n.grid){var f=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;o=u?f-this.offset.click.topu[3]?f-this.offset.click.topu[2]?l-this.offset.click.left=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;if(!(c-s=l&&o<=c||u>=l&&u<=c||oc)&&(i>=a&&i<=f||s>=a&&s<=f||if);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var r=e.ui.ddmanager.droppables[t.options.scope]||[],i=n?n.type:null,s=(t.currentItem||t.element).find(":data(droppable)").andSelf();e:for(var o=0;oe?0:r.max")[0],c,h=t.each;l.style.cssText="background-color:rgba(1,1,1,.5)",f.rgba=l.style.backgroundColor.indexOf("rgba")>-1,h(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),o.fn=t.extend(o.prototype,{parse:function(r,i,s,a){if(r===n)return this._rgba=[null,null,null,null],this;if(r.jquery||r.nodeType)r=t(r).css(i),i=n;var f=this,l=t.type(r),v=this._rgba=[];i!==n&&(r=[r,i,s,a],l="array");if(l==="string")return this.parse(d(r)||c._default);if(l==="array")return h(u.rgba.props,function(e,t){v[t.idx]=p(r[t.idx],t)}),this;if(l==="object")return r instanceof o?h(u,function(e,t){r[t.cache]&&(f[t.cache]=r[t.cache].slice())}):h(u,function(t,n){var i=n.cache;h(n.props,function(e,t){if(!f[i]&&n.to){if(e==="alpha"||r[e]==null)return;f[i]=n.to(f._rgba)}f[i][t.idx]=p(r[e],t,!0)}),f[i]&&e.inArray(null,f[i].slice(0,3))<0&&(f[i][3]=1,n.from&&(f._rgba=n.from(f[i])))}),this},is:function(e){var t=o(e),n=!0,r=this;return h(u,function(e,i){var s,o=t[i.cache];return o&&(s=r[i.cache]||i.to&&i.to(r._rgba)||[],h(i.props,function(e,t){if(o[t.idx]!=null)return n=o[t.idx]===s[t.idx],n})),n}),n},_space:function(){var e=[],t=this;return h(u,function(n,r){t[r.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var n=o(e),r=n._space(),i=u[r],s=this.alpha()===0?o("transparent"):this,f=s[i.cache]||i.to(s._rgba),l=f.slice();return n=n[i.cache],h(i.props,function(e,r){var i=r.idx,s=f[i],o=n[i],u=a[r.type]||{};if(o===null)return;s===null?l[i]=o:(u.mod&&(o-s>u.mod/2?s+=u.mod:s-o>u.mod/2&&(s-=u.mod)),l[i]=p((o-s)*t+s,r))}),this[r](l)},blend:function(e){if(this._rgba[3]===1)return this;var n=this._rgba.slice(),r=n.pop(),i=o(e)._rgba;return o(t.map(n,function(e,t){return(1-r)*i[t]+r*e}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(e,t){return e==null?t>2?1:0:e});return n[3]===1&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(e,t){return e==null&&(e=t>2?1:0),t&&t<3&&(e=Math.round(e*100)+"%"),e});return n[3]===1&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),r=n.pop();return e&&n.push(~~(r*255)),"#"+t.map(n,function(e){return e=(e||0).toString(16),e.length===1?"0"+e:e}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,u.hsla.to=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=e[3],s=Math.max(t,n,r),o=Math.min(t,n,r),u=s-o,a=s+o,f=a*.5,l,c;return o===s?l=0:t===s?l=60*(n-r)/u+360:n===s?l=60*(r-t)/u+120:l=60*(t-n)/u+240,f===0||f===1?c=f:f<=.5?c=u/a:c=u/(2-a),[Math.round(l)%360,c,f,i==null?1:i]},u.hsla.from=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],i=e[3],s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;return[Math.round(v(o,s,t+1/3)*255),Math.round(v(o,s,t)*255),Math.round(v(o,s,t-1/3)*255),i]},h(u,function(e,r){var s=r.props,u=r.cache,a=r.to,f=r.from;o.fn[e]=function(e){a&&!this[u]&&(this[u]=a(this._rgba));if(e===n)return this[u].slice();var r,i=t.type(e),l=i==="array"||i==="object"?e:arguments,c=this[u].slice();return h(s,function(e,t){var n=l[i==="object"?e:t.idx];n==null&&(n=c[t.idx]),c[t.idx]=p(n,t)}),f?(r=o(f(c)),r[u]=c,r):o(c)},h(s,function(n,r){if(o.fn[n])return;o.fn[n]=function(s){var o=t.type(s),u=n==="alpha"?this._hsla?"hsla":"rgba":e,a=this[u](),f=a[r.idx],l;return o==="undefined"?f:(o==="function"&&(s=s.call(this,f),o=t.type(s)),s==null&&r.empty?this:(o==="string"&&(l=i.exec(s),l&&(s=f+parseFloat(l[2])*(l[1]==="+"?1:-1))),a[r.idx]=s,this[u](a)))}})}),h(r,function(e,n){t.cssHooks[n]={set:function(e,r){var i,s,u="";if(t.type(r)!=="string"||(i=d(r))){r=o(i||r);if(!f.rgba&&r._rgba[3]!==1){s=n==="backgroundColor"?e.parentNode:e;while((u===""||u==="transparent")&&s&&s.style)try{u=t.css(s,"backgroundColor"),s=s.parentNode}catch(a){}r=r.blend(u&&u!=="transparent"?u:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(l){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=o(e.elem,n),e.end=o(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}}),t.cssHooks.borderColor={expand:function(e){var t={};return h(["Top","Right","Bottom","Left"],function(n,r){t["border"+r+"Color"]=e}),t}},c=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(){var t=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,n={},r,i;if(t&&t.length&&t[0]&&t[t[0]]){i=t.length;while(i--)r=t[i],typeof t[r]=="string"&&(n[e.camelCase(r)]=t[r])}else for(r in t)typeof t[r]=="string"&&(n[r]=t[r]);return n}function s(t,n){var i={},s,o;for(s in n)o=n[s],t[s]!==o&&!r[s]&&(e.fx.step[s]||!isNaN(parseFloat(o)))&&(i[s]=o);return i}var n=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){if(e.end!=="none"&&!e.setAttr||e.pos===1&&!e.setAttr)jQuery.style(e.elem,n,e.end),e.setAttr=!0}}),e.effects.animateClass=function(t,r,o,u){var a=e.speed(r,o,u);return this.queue(function(){var r=e(this),o=r.attr("class")||"",u,f=a.children?r.find("*").andSelf():r;f=f.map(function(){var t=e(this);return{el:t,start:i.call(this)}}),u=function(){e.each(n,function(e,n){t[n]&&r[n+"Class"](t[n])})},u(),f=f.map(function(){return this.end=i.call(this.el[0]),this.diff=s(this.start,this.end),this}),r.attr("class",o),f=f.map(function(){var t=this,n=e.Deferred(),r=jQuery.extend({},a,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,r),n.promise()}),e.when.apply(e,f.get()).done(function(){u(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),a.complete.call(r[0])})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{add:t},n,r,i):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{remove:t},n,r,i):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(n,r,i,s,o){return typeof r=="boolean"||r===t?i?e.effects.animateClass.call(this,r?{add:n}:{remove:n},i,s,o):this._toggleClass(n,r):e.effects.animateClass.call(this,{toggle:n},r,i,s)},switchClass:function(t,n,r,i,s){return e.effects.animateClass.call(this,{add:n,remove:t},r,i,s)}})}(),function(){function i(t,n,r,i){e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},n==null&&(n={}),e.isFunction(n)&&(i=n,r=null,n={});if(typeof n=="number"||e.fx.speeds[n])i=r,r=n,n={};return e.isFunction(r)&&(i=r,r=null),n&&e.extend(t,n),r=r||n.duration,t.duration=e.fx.off?0:typeof r=="number"?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,t.complete=i||n.complete,t}function s(t){return!t||typeof t=="number"||e.fx.speeds[t]?!0:typeof t=="string"&&!e.effects.effect[t]?n&&e.effects[t]?!1:!0:!1}e.extend(e.effects,{version:"1.9.2",save:function(e,t){for(var n=0;n
          ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:t.width(),height:t.height()},s=document.activeElement;try{s.id}catch(o){s=document.body}return t.wrap(r),(t[0]===s||e.contains(t[0],s))&&e(s).focus(),r=t.parent(),t.css("position")==="static"?(r.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,r){n[r]=t.css(r),isNaN(parseInt(n[r],10))&&(n[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(i),r.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t},setTransition:function(t,n,r,i){return i=i||{},e.each(n,function(e,n){var s=t.cssUnit(n);s[0]>0&&(i[n]=s[0]*r+s[1])}),i}}),e.fn.extend({effect:function(){function a(n){function u(){e.isFunction(i)&&i.call(r[0]),e.isFunction(n)&&n()}var r=e(this),i=t.complete,s=t.mode;(r.is(":hidden")?s==="hide":s==="show")?u():o.call(r[0],t,u)}var t=i.apply(this,arguments),r=t.mode,s=t.queue,o=e.effects.effect[t.effect],u=!o&&n&&e.effects[t.effect];return e.fx.off||!o&&!u?r?this[r](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)}):o?s===!1?this.each(a):this.queue(s||"fx",a):u.call(this,{options:t,duration:t.duration,callback:t.complete,mode:t.mode})},_show:e.fn.show,show:function(e){if(s(e))return this._show.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="show",this.effect.call(this,t)},_hide:e.fn.hide,hide:function(e){if(s(e))return this._hide.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(s(t)||typeof t=="boolean"||e.isFunction(t))return this.__toggle.apply(this,arguments);var n=i.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)},cssUnit:function(t){var n=this.css(t),r=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(r=[parseFloat(n),t])}),r}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return e===0||e===1?e:-Math.pow(2,8*(e-1))*Math.sin(((e-1)*80-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){var t,n=4;while(e<((t=Math.pow(2,--n))-1)/11);return 1/Math.pow(4,3-n)-7.5625*Math.pow((t*3-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(e*2)/2:1-n(e*-2+2)/2}})}()}(jQuery);(function(e,t){var n=/up|down|vertical/,r=/up|left|vertical|horizontal/;e.effects.effect.blind=function(t,i){var s=e(this),o=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(s,t.mode||"hide"),a=t.direction||"up",f=n.test(a),l=f?"height":"width",c=f?"top":"left",h=r.test(a),p={},d=u==="show",v,m,g;s.parent().is(".ui-effects-wrapper")?e.effects.save(s.parent(),o):e.effects.save(s,o),s.show(),v=e.effects.createWrapper(s).css({overflow:"hidden"}),m=v[l](),g=parseFloat(v.css(c))||0,p[l]=d?m:0,h||(s.css(f?"bottom":"right",0).css(f?"top":"left","auto").css({position:"absolute"}),p[c]=d?g:m+g),d&&(v.css(l,0),h||v.css(c,g+m)),v.animate(p,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){u==="hide"&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}})}})(jQuery);(function(e,t){e.effects.effect.bounce=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=s==="hide",u=s==="show",a=t.direction||"up",f=t.distance,l=t.times||5,c=l*2+(u||o?1:0),h=t.duration/c,p=t.easing,d=a==="up"||a==="down"?"top":"left",v=a==="up"||a==="left",m,g,y,b=r.queue(),w=b.length;(u||o)&&i.push("opacity"),e.effects.save(r,i),r.show(),e.effects.createWrapper(r),f||(f=r[d==="top"?"outerHeight":"outerWidth"]()/3),u&&(y={opacity:1},y[d]=0,r.css("opacity",0).css(d,v?-f*2:f*2).animate(y,h,p)),o&&(f/=Math.pow(2,l-1)),y={},y[d]=0;for(m=0;m1&&b.splice.apply(b,[1,0].concat(b.splice(w,c+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.clip=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"vertical",a=u==="vertical",f=a?"height":"width",l=a?"top":"left",c={},h,p,d;e.effects.save(r,i),r.show(),h=e.effects.createWrapper(r).css({overflow:"hidden"}),p=r[0].tagName==="IMG"?h:r,d=p[f](),o&&(p.css(f,0),p.css(l,d/2)),c[f]=o?d:0,c[l]=o?0:d/2,p.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){o||r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.drop=function(t,n){var r=e(this),i=["position","top","bottom","left","right","opacity","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left"?"pos":"neg",l={opacity:o?1:0},c;e.effects.save(r,i),r.show(),e.effects.createWrapper(r),c=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0)/2,o&&r.css("opacity",0).css(a,f==="pos"?-c:c),l[a]=(o?f==="pos"?"+=":"-=":f==="pos"?"-=":"+=")+c,r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.explode=function(t,n){function y(){c.push(this),c.length===r*i&&b()}function b(){s.css({visibility:"visible"}),e(c).remove(),u||s.hide(),n()}var r=t.pieces?Math.round(Math.sqrt(t.pieces)):3,i=r,s=e(this),o=e.effects.setMode(s,t.mode||"hide"),u=o==="show",a=s.show().css("visibility","hidden").offset(),f=Math.ceil(s.outerWidth()/i),l=Math.ceil(s.outerHeight()/r),c=[],h,p,d,v,m,g;for(h=0;h
          ").css({position:"absolute",visibility:"visible",left:-p*f,top:-h*l}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f,height:l,left:d+(u?m*f:0),top:v+(u?g*l:0),opacity:u?0:1}).animate({left:d+(u?0:m*f),top:v+(u?0:g*l),opacity:u?1:0},t.duration||500,t.easing,y)}}})(jQuery);(function(e,t){e.effects.effect.fade=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"toggle");r.animate({opacity:i},{queue:!1,duration:t.duration,easing:t.easing,complete:n})}})(jQuery);(function(e,t){e.effects.effect.fold=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=s==="hide",a=t.size||15,f=/([0-9]+)%/.exec(a),l=!!t.horizFirst,c=o!==l,h=c?["width","height"]:["height","width"],p=t.duration/2,d,v,m={},g={};e.effects.save(r,i),r.show(),d=e.effects.createWrapper(r).css({overflow:"hidden"}),v=c?[d.width(),d.height()]:[d.height(),d.width()],f&&(a=parseInt(f[1],10)/100*v[u?0:1]),o&&d.css(l?{height:0,width:a}:{height:a,width:0}),m[h[0]]=o?v[0]:a,g[h[1]]=o?v[1]:0,d.animate(m,p,t.easing).animate(g,p,t.easing,function(){u&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()})}})(jQuery);(function(e,t){e.effects.effect.highlight=function(t,n){var r=e(this),i=["backgroundImage","backgroundColor","opacity"],s=e.effects.setMode(r,t.mode||"show"),o={backgroundColor:r.css("backgroundColor")};s==="hide"&&(o.opacity=0),e.effects.save(r,i),r.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),n()}})}})(jQuery);(function(e,t){e.effects.effect.pulsate=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"show"),s=i==="show",o=i==="hide",u=s||i==="hide",a=(t.times||5)*2+(u?1:0),f=t.duration/a,l=0,c=r.queue(),h=c.length,p;if(s||!r.is(":visible"))r.css("opacity",0).show(),l=1;for(p=1;p1&&c.splice.apply(c,[1,0].concat(c.splice(h,a+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.puff=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"hide"),s=i==="hide",o=parseInt(t.percent,10)||150,u=o/100,a={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:i,complete:n,percent:s?o:100,from:s?a:{height:a.height*u,width:a.width*u,outerHeight:a.outerHeight*u,outerWidth:a.outerWidth*u}}),r.effect(t)},e.effects.effect.scale=function(t,n){var r=e(this),i=e.extend(!0,{},t),s=e.effects.setMode(r,t.mode||"effect"),o=parseInt(t.percent,10)||(parseInt(t.percent,10)===0?0:s==="hide"?0:100),u=t.direction||"both",a=t.origin,f={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},l={y:u!=="horizontal"?o/100:1,x:u!=="vertical"?o/100:1};i.effect="size",i.queue=!1,i.complete=n,s!=="effect"&&(i.origin=a||["middle","center"],i.restore=!0),i.from=t.from||(s==="show"?{height:0,width:0,outerHeight:0,outerWidth:0}:f),i.to={height:f.height*l.y,width:f.width*l.x,outerHeight:f.outerHeight*l.y,outerWidth:f.outerWidth*l.x},i.fade&&(s==="show"&&(i.from.opacity=0,i.to.opacity=1),s==="hide"&&(i.from.opacity=1,i.to.opacity=0)),r.effect(i)},e.effects.effect.size=function(t,n){var r,i,s,o=e(this),u=["position","top","bottom","left","right","width","height","overflow","opacity"],a=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],l=["fontSize"],c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),d=t.restore||p!=="effect",v=t.scale||"both",m=t.origin||["middle","center"],g=o.css("position"),y=d?u:a,b={height:0,width:0,outerHeight:0,outerWidth:0};p==="show"&&o.show(),r={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},t.mode==="toggle"&&p==="show"?(o.from=t.to||b,o.to=t.from||r):(o.from=t.from||(p==="show"?b:r),o.to=t.to||(p==="hide"?b:r)),s={from:{y:o.from.height/r.height,x:o.from.width/r.width},to:{y:o.to.height/r.height,x:o.to.width/r.width}};if(v==="box"||v==="both")s.from.y!==s.to.y&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,s.from.y,o.from),o.to=e.effects.setTransition(o,c,s.to.y,o.to)),s.from.x!==s.to.x&&(y=y.concat(h),o.from=e.effects.setTransition(o,h,s.from.x,o.from),o.to=e.effects.setTransition(o,h,s.to.x,o.to));(v==="content"||v==="both")&&s.from.y!==s.to.y&&(y=y.concat(l).concat(f),o.from=e.effects.setTransition(o,l,s.from.y,o.from),o.to=e.effects.setTransition(o,l,s.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(i=e.effects.getBaseline(m,r),o.from.top=(r.outerHeight-o.outerHeight())*i.y,o.from.left=(r.outerWidth-o.outerWidth())*i.x,o.to.top=(r.outerHeight-o.to.outerHeight)*i.y,o.to.left=(r.outerWidth-o.to.outerWidth)*i.x),o.css(o.from);if(v==="content"||v==="both")c=c.concat(["marginTop","marginBottom"]).concat(l),h=h.concat(["marginLeft","marginRight"]),f=u.concat(c).concat(h),o.find("*[width]").each(function(){var n=e(this),r={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};d&&e.effects.save(n,f),n.from={height:r.height*s.from.y,width:r.width*s.from.x,outerHeight:r.outerHeight*s.from.y,outerWidth:r.outerWidth*s.from.x},n.to={height:r.height*s.to.y,width:r.width*s.to.x,outerHeight:r.height*s.to.y,outerWidth:r.width*s.to.x},s.from.y!==s.to.y&&(n.from=e.effects.setTransition(n,c,s.from.y,n.from),n.to=e.effects.setTransition(n,c,s.to.y,n.to)),s.from.x!==s.to.x&&(n.from=e.effects.setTransition(n,h,s.from.x,n.from),n.to=e.effects.setTransition(n,h,s.to.x,n.to)),n.css(n.from),n.animate(n.to,t.duration,t.easing,function(){d&&e.effects.restore(n,f)})});o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){o.to.opacity===0&&o.css("opacity",o.from.opacity),p==="hide"&&o.hide(),e.effects.restore(o,y),d||(g==="static"?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,n){var r=parseInt(n,10),i=e?o.to.left:o.to.top;return n==="auto"?i+"px":r+i+"px"})})),e.effects.removeWrapper(o),n()}})}})(jQuery);(function(e,t){e.effects.effect.shake=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=t.direction||"left",u=t.distance||20,a=t.times||3,f=a*2+1,l=Math.round(t.duration/f),c=o==="up"||o==="down"?"top":"left",h=o==="up"||o==="left",p={},d={},v={},m,g=r.queue(),y=g.length;e.effects.save(r,i),r.show(),e.effects.createWrapper(r),p[c]=(h?"-=":"+=")+u,d[c]=(h?"+=":"-=")+u*2,v[c]=(h?"-=":"+=")+u*2,r.animate(p,l,t.easing);for(m=1;m1&&g.splice.apply(g,[1,0].concat(g.splice(y,f+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.slide=function(t,n){var r=e(this),i=["position","top","bottom","left","right","width","height"],s=e.effects.setMode(r,t.mode||"show"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left",l,c={};e.effects.save(r,i),r.show(),l=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(r).css({overflow:"hidden"}),o&&r.css(a,f?isNaN(l)?"-"+l:-l:l),c[a]=(o?f?"+=":"-=":f?"-=":"+=")+l,r.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.transfer=function(t,n){var r=e(this),i=e(t.to),s=i.css("position")==="fixed",o=e("body"),u=s?o.scrollTop():0,a=s?o.scrollLeft():0,f=i.offset(),l={top:f.top-u,left:f.left-a,height:i.innerHeight(),width:i.innerWidth()},c=r.offset(),h=e('
          ').appendTo(document.body).addClass(t.className).css({top:c.top-u,left:c.left-a,height:r.innerHeight(),width:r.innerWidth(),position:s?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){h.remove(),n()})}})(jQuery);(function(e,t){var n=!1;e.widget("ui.menu",{version:"1.9.2",defaultElement:"
            ",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var r=e(t.target).closest(".ui-menu-item");!n&&r.not(".ui-state-disabled").length&&(n=!0,this.select(t),r.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var n=e(t.currentTarget);n.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,n)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),n=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function a(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,r,i,s,o,u=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:u=!1,r=this.previousFilter||"",i=String.fromCharCode(t.keyCode),s=!1,clearTimeout(this.filterTimer),i===r?s=!0:i=r+i,o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())}),n=s&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(i=String.fromCharCode(t.keyCode),o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}u&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n=this.options.icons.submenu,r=this.element.find(this.options.menus);r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),r=t.prev("a"),i=e("").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);r.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",r.attr("id"))}),t=r.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-—–\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(e,t){var n,r;this.blur(e,e&&e.type==="focus"),this._scrollIntoView(t),this.active=t.first(),r=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&e.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=t.children(".ui-menu"),n.length&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,r,i,s,o,u;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,r=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-n-r,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),u=t.height(),i<0?this.activeMenu.scrollTop(s+i):i+u>o&&this.activeMenu.scrollTop(s+i-o+u))},blur:function(e,t){t||clearTimeout(this.timer);if(!this.active)return;this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active})},_startOpening:function(e){clearTimeout(this.timer);if(e.attr("aria-hidden")!=="true")return;this.timer=this._delay(function(){this._close(),this._open(e)},this.delay)},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var r=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element),this._close(r),this.blur(t),this.activeMenu=r},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var r;this.active&&(e==="first"||e==="last"?r=this.active[e==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):r=this.active[e+"All"](".ui-menu-item").eq(0));if(!r||!r.length||!this.active)r=this.activeMenu.children(".ui-menu-item")[t]();this.focus(n,r)},nextPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isLastItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r-i<0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())},previousPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isFirstItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r+i>0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())},_hasScroll:function(){return this.element.outerHeight()
          ").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return e===t?this._value():(this._setOption("value",e),this)},_setOption:function(e,t){e==="value"&&(this.options.value=t,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),this._super(e,t)},_value:function(){var e=this.options.value;return typeof e!="number"&&(e=0),Math.min(this.options.max,Math.max(this.min,e))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var e=this.value(),t=this._percentage();this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),this.valueDiv.toggle(e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.attr("aria-valuenow",e)}})})(jQuery);(function(e,t){e.widget("ui.resizable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var t=this,n=this.options;this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e('
          ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=n.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var r=this.handles.split(",");this.handles={};for(var i=0;i
          ');u.css({zIndex:n.zIndex}),"se"==s&&u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(u)}}this._renderAxis=function(t){t=t||this.element;for(var n in this.handles){this.handles[n].constructor==String&&(this.handles[n]=e(this.handles[n],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var r=e(this.handles[n],this.element),i=0;i=/sw|ne|nw|se|n|s/.test(n)?r.outerHeight():r.outerWidth();var s=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");t.css(s,i),this._proportionallyResize()}if(!e(this.handles[n]).length)continue}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className)var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);t.axis=e&&e[1]?e[1]:"se"}}),n.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(n.disabled)return;e(this).removeClass("ui-resizable-autohide"),t._handles.show()}).mouseleave(function(){if(n.disabled)return;t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(this.element);var n=this.element;this.originalElement.css({position:n.css("position"),width:n.outerWidth(),height:n.outerHeight(),top:n.css("top"),left:n.css("left")}).insertAfter(n),n.remove()}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var n=!1;for(var r in this.handles)e(this.handles[r])[0]==t.target&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var r=this.options,i=this.element.position(),s=this.element;this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(s.is(".ui-draggable")||/absolute/.test(s.css("position")))&&s.css({position:"absolute",top:i.top,left:i.left}),this._renderProxy();var o=n(this.helper.css("left")),u=n(this.helper.css("top"));r.containment&&(o+=e(r.containment).scrollLeft()||0,u+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:o,top:u},this.size=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalPosition={left:o,top:u},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof r.aspectRatio=="number"?r.aspectRatio:this.originalSize.width/this.originalSize.height||1;var a=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor",a=="auto"?this.axis+"-resize":a),s.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(e){var t=this.helper,n=this.options,r={},i=this,s=this.originalMousePosition,o=this.axis,u=e.pageX-s.left||0,a=e.pageY-s.top||0,f=this._change[o];if(!f)return!1;var l=f.apply(this,[e,u,a]);this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey)l=this._updateRatio(l,e);return l=this._respectSize(l,e),this._propagate("resize",e),t.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",e,this.ui()),!1},_mouseStop:function(t){this.resizing=!1;var n=this.options,r=this;if(this._helper){var i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),o=s&&e.ui.hasScroll(i[0],"left")?0:r.sizeDiff.height,u=s?0:r.sizeDiff.width,a={width:r.helper.width()-u,height:r.helper.height()-o},f=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,l=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;n.animate||this.element.css(e.extend(a,{top:l,left:f})),r.helper.height(r.size.height),r.helper.width(r.size.width),this._helper&&!n.animate&&this._proportionallyResize()}return e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t=this.options,n,i,s,o,u;u={minWidth:r(t.minWidth)?t.minWidth:0,maxWidth:r(t.maxWidth)?t.maxWidth:Infinity,minHeight:r(t.minHeight)?t.minHeight:0,maxHeight:r(t.maxHeight)?t.maxHeight:Infinity};if(this._aspectRatio||e)n=u.minHeight*this.aspectRatio,s=u.minWidth/this.aspectRatio,i=u.maxHeight*this.aspectRatio,o=u.maxWidth/this.aspectRatio,n>u.minWidth&&(u.minWidth=n),s>u.minHeight&&(u.minHeight=s),ie.width,l=r(e.height)&&i.minHeight&&i.minHeight>e.height;f&&(e.width=i.minWidth),l&&(e.height=i.minHeight),u&&(e.width=i.maxWidth),a&&(e.height=i.maxHeight);var c=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,p=/sw|nw|w/.test(o),d=/nw|ne|n/.test(o);f&&p&&(e.left=c-i.minWidth),u&&p&&(e.left=c-i.maxWidth),l&&d&&(e.top=h-i.minHeight),a&&d&&(e.top=h-i.maxHeight);var v=!e.width&&!e.height;return v&&!e.left&&e.top?e.top=null:v&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){var t=this.options;if(!this._proportionallyResizeElements.length)return;var n=this.helper||this.element;for(var r=0;r
          ');var r=e.ui.ie6?1:0,i=e.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+i,height:this.element.outerHeight()+i,position:"absolute",left:this.elementOffset.left-r+"px",top:this.elementOffset.top-r+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,t,n){return{width:this.originalSize.width+t}},w:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{top:s.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},sw:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,r]))},ne:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},nw:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,r]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),t!="resize"&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","alsoResize",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=function(t){e(t).each(function(){var t=e(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};typeof i.alsoResize=="object"&&!i.alsoResize.parentNode?i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)}):s(i.alsoResize)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.originalSize,o=r.originalPosition,u={height:r.size.height-s.height||0,width:r.size.width-s.width||0,top:r.position.top-o.top||0,left:r.position.left-o.left||0},a=function(t,r){e(t).each(function(){var t=e(this),i=e(this).data("resizable-alsoresize"),s={},o=r&&r.length?r:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(u[t]||0);n&&n>=0&&(s[t]=n||null)}),t.css(s)})};typeof i.alsoResize=="object"&&!i.alsoResize.nodeType?e.each(i.alsoResize,function(e,t){a(e,t)}):a(i.alsoResize)},stop:function(t,n){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),u=o&&e.ui.hasScroll(s[0],"left")?0:r.sizeDiff.height,a=o?0:r.sizeDiff.width,f={width:r.size.width-a,height:r.size.height-u},l=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,c=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;r.element.animate(e.extend(f,c&&l?{top:c,left:l}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var n={width:parseInt(r.element.css("width"),10),height:parseInt(r.element.css("height"),10),top:parseInt(r.element.css("top"),10),left:parseInt(r.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),r._updateCache(n),r._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(t,r){var i=e(this).data("resizable"),s=i.options,o=i.element,u=s.containment,a=u instanceof e?u.get(0):/parent/.test(u)?o.parent().get(0):u;if(!a)return;i.containerElement=e(a);if(/document/.test(u)||u==document)i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var f=e(a),l=[];e(["Top","Right","Left","Bottom"]).each(function(e,t){l[e]=n(f.css("padding"+t))}),i.containerOffset=f.offset(),i.containerPosition=f.position(),i.containerSize={height:f.innerHeight()-l[3],width:f.innerWidth()-l[1]};var c=i.containerOffset,h=i.containerSize.height,p=i.containerSize.width,d=e.ui.hasScroll(a,"left")?a.scrollWidth:p,v=e.ui.hasScroll(a)?a.scrollHeight:h;i.parentData={element:a,left:c.left,top:c.top,width:d,height:v}}},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.containerSize,o=r.containerOffset,u=r.size,a=r.position,f=r._aspectRatio||t.shiftKey,l={top:0,left:0},c=r.containerElement;c[0]!=document&&/static/.test(c.css("position"))&&(l=o),a.left<(r._helper?o.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-o.left:r.position.left-l.left),f&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=i.helper?o.left:0),a.top<(r._helper?o.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-o.top:r.position.top),f&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?o.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top;var h=Math.abs((r._helper?r.offset.left-l.left:r.offset.left-l.left)+r.sizeDiff.width),p=Math.abs((r._helper?r.offset.top-l.top:r.offset.top-o.top)+r.sizeDiff.height),d=r.containerElement.get(0)==r.element.parent().get(0),v=/relative|absolute/.test(r.containerElement.css("position"));d&&v&&(h-=r.parentData.left),h+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-h,f&&(r.size.height=r.size.width/r.aspectRatio)),p+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-p,f&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.position,o=r.containerOffset,u=r.containerPosition,a=r.containerElement,f=e(r.helper),l=f.offset(),c=f.outerWidth()-r.sizeDiff.width,h=f.outerHeight()-r.sizeDiff.height;r._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h}),r._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h})}}),e.ui.plugin.add("resizable","ghost",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size;r.ghost=r.originalElement.clone(),r.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:""),r.ghost.appendTo(r.helper)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.ghost.css({position:"relative",height:r.size.height,width:r.size.width})},stop:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.helper&&r.helper.get(0).removeChild(r.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size,o=r.originalSize,u=r.originalPosition,a=r.axis,f=i._aspectRatio||t.shiftKey;i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var l=Math.round((s.width-o.width)/(i.grid[0]||1))*(i.grid[0]||1),c=Math.round((s.height-o.height)/(i.grid[1]||1))*(i.grid[1]||1);/^(se|s|e)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c):/^(ne)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c):/^(sw)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.left=u.left-l):(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c,r.position.left=u.left-l)}});var n=function(e){return parseInt(e,10)||0},r=function(e){return!isNaN(parseInt(e,10))}})(jQuery);(function(e,t){e.widget("ui.selectable",e.ui.mouse,{version:"1.9.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;this.element.addClass("ui-selectable"),this.dragged=!1;var n;this.refresh=function(){n=e(t.options.filter,t.element[0]),n.addClass("ui-selectee"),n.each(function(){var t=e(this),n=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:n.left,top:n.top,right:n.left+t.outerWidth(),bottom:n.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=n.addClass("ui-selectee"),this._mouseInit(),this.helper=e("
          ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var n=this;this.opos=[t.pageX,t.pageY];if(this.options.disabled)return;var r=this.options;this.selectees=e(r.filter,this.element[0]),this._trigger("start",t),e(r.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),r.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var r=e.data(this,"selectable-item");r.startselected=!0,!t.metaKey&&!t.ctrlKey&&(r.$element.removeClass("ui-selected"),r.selected=!1,r.$element.addClass("ui-unselecting"),r.unselecting=!0,n._trigger("unselecting",t,{unselecting:r.element}))}),e(t.target).parents().andSelf().each(function(){var r=e.data(this,"selectable-item");if(r){var i=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected");return r.$element.removeClass(i?"ui-unselecting":"ui-selected").addClass(i?"ui-selecting":"ui-unselecting"),r.unselecting=!i,r.selecting=i,r.selected=i,i?n._trigger("selecting",t,{selecting:r.element}):n._trigger("unselecting",t,{unselecting:r.element}),!1}})},_mouseDrag:function(t){var n=this;this.dragged=!0;if(this.options.disabled)return;var r=this.options,i=this.opos[0],s=this.opos[1],o=t.pageX,u=t.pageY;if(i>o){var a=o;o=i,i=a}if(s>u){var a=u;u=s,s=a}return this.helper.css({left:i,top:s,width:o-i,height:u-s}),this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!a||a.element==n.element[0])return;var f=!1;r.tolerance=="touch"?f=!(a.left>o||a.rightu||a.bottomi&&a.rights&&a.bottom
          ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(i.range==="min"||i.range==="max"?" ui-slider-range-"+i.range:""))),r=i.values&&i.values.length||1;for(t=s.length;tn&&(i=n,s=e(this),o=t)}),c.range===!0&&this.values(1)===c.min&&(o+=1,s=e(this.handles[o])),u=this._start(t,o),u===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,s.addClass("ui-state-active").focus(),a=s.offset(),f=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=f?{left:0,top:0}:{left:t.pageX-a.left-s.width()/2,top:t.pageY-a.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,r,i,s;return this.orientation==="horizontal"?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),r=n/t,r>1&&(r=1),r<0&&(r=0),this.orientation==="vertical"&&(r=1-r),i=this._valueMax()-this._valueMin(),s=this._valueMin()+r*i,this._trimAlignValue(s)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var r,i,s;this.options.values&&this.options.values.length?(r=this.values(t?0:1),this.options.values.length===2&&this.options.range===!0&&(t===0&&n>r||t===1&&n1){this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),this._change(null,t);return}if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();r=this.options.values,i=arguments[0];for(s=0;s=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;return Math.abs(n)*2>=t&&(r+=n>0?t:-t),parseFloat(r.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,n,r,i,s,o=this.options.range,u=this.options,a=this,f=this._animateOff?!1:u.animate,l={};this.options.values&&this.options.values.length?this.handles.each(function(r){n=(a.values(r)-a._valueMin())/(a._valueMax()-a._valueMin())*100,l[a.orientation==="horizontal"?"left":"bottom"]=n+"%",e(this).stop(1,1)[f?"animate":"css"](l,u.animate),a.options.range===!0&&(a.orientation==="horizontal"?(r===0&&a.range.stop(1,1)[f?"animate":"css"]({left:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:u.animate})):(r===0&&a.range.stop(1,1)[f?"animate":"css"]({bottom:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:u.animate}))),t=n}):(r=this.value(),i=this._valueMin(),s=this._valueMax(),n=s!==i?(r-i)/(s-i)*100:0,l[this.orientation==="horizontal"?"left":"bottom"]=n+"%",this.handle.stop(1,1)[f?"animate":"css"](l,u.animate),o==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[f?"animate":"css"]({width:n+"%"},u.animate),o==="max"&&this.orientation==="horizontal"&&this.range[f?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:u.animate}),o==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[f?"animate":"css"]({height:n+"%"},u.animate),o==="max"&&this.orientation==="vertical"&&this.range[f?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:u.animate}))}})})(jQuery);(function(e,t){e.widget("ui.sortable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?e.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){t==="disabled"?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(t);var i=null,s=e(t.target).parents().each(function(){if(e.data(this,r.widgetName+"-item")==r)return i=e(this),!1});e.data(t.target,r.widgetName+"-item")==r&&(i=e(t.target));if(!i)return!1;if(this.options.handle&&!n){var o=!1;e(this.options.handle,i).find("*").andSelf().each(function(){this==t.target&&(o=!0)});if(!o)return!1}return this.currentItem=i,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,n,r){var i=this.options;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),i.containment&&this._setContainment(),i.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",i.cursor)),i.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",i.opacity)),i.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",i.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!r)for(var s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var n=this.options,r=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;i--){var s=this.items[i],o=s.item[0],u=this._intersectsWithPointer(s);if(!u)continue;if(s.instance!==this.currentContainer)continue;if(o!=this.currentItem[0]&&this.placeholder[u==1?"next":"prev"]()[0]!=o&&!e.contains(this.placeholder[0],o)&&(this.options.type=="semi-dynamic"?!e.contains(this.element[0],o):!0)){this.direction=u==1?"down":"up";if(this.options.tolerance!="pointer"&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(!t)return;e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var r=this,i=this.placeholder.offset();this.reverting=!0,e(this.helper).animate({left:i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1},cancel:function(){if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,s=e.left,o=s+e.width,u=e.top,a=u+e.height,f=this.offset.click.top,l=this.offset.click.left,c=r+f>u&&r+fs&&t+le[this.floating?"width":"height"]?c:s0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return e!=0&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n=[],r=[],i=this._connectWith();if(i&&t)for(var s=i.length-1;s>=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&r.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a])}}r.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var s=r.length-1;s>=0;s--)r[s][0].each(function(){n.push(this)});return e(n)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&(r.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a))}}for(var s=r.length-1;s>=0;s--){var f=r[s][1],l=r[s][0];for(var u=0,c=l.length;u=0;n--){var r=this.items[n];if(r.instance!=this.currentContainer&&this.currentContainer&&r.item[0]!=this.currentItem[0])continue;var i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;t||(r.width=i.outerWidth(),r.height=i.outerHeight());var s=i.offset();r.left=s.left,r.top=s.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var n=this.containers.length-1;n>=0;n--){var s=this.containers[n].element.offset();this.containers[n].containerCache.left=s.left,this.containers[n].containerCache.top=s.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight()}return this},_createPlaceholder:function(t){t=t||this;var n=t.options;if(!n.placeholder||n.placeholder.constructor==String){var r=n.placeholder;n.placeholder={element:function(){var n=e(document.createElement(t.currentItem[0].nodeName)).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(n.style.visibility="hidden"),n},update:function(e,i){if(r&&!n.forcePlaceholderSize)return;i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10))}}}t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var n=null,r=null;for(var i=this.containers.length-1;i>=0;i--){if(e.contains(this.currentItem[0],this.containers[i].element[0]))continue;if(this._intersectsWith(this.containers[i].containerCache)){if(n&&e.contains(this.containers[i].element[0],n.element[0]))continue;n=this.containers[i],r=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0)}if(!n)return;if(this.containers.length===1)this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1;else{var s=1e4,o=null,u=this.containers[r].floating?"left":"top",a=this.containers[r].floating?"width":"height",f=this.positionAbs[u]+this.offset.click[u];for(var l=this.items.length-1;l>=0;l--){if(!e.contains(this.containers[r].element[0],this.items[l].item[0]))continue;if(this.items[l].item[0]==this.currentItem[0])continue;var c=this.items[l].item.offset()[u],h=!1;Math.abs(c-f)>Math.abs(c+this.items[l][a]-f)&&(h=!0,c+=this.items[l][a]),Math.abs(c-f)this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top));if(n.grid){var u=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1];o=this.containment?u-this.offset.click.topthis.containment[3]?u-this.offset.click.topthis.containment[2]?a-this.offset.click.left=0;i--)n||r.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);this._storedCursor&&e("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!n){this._trigger("beforeStop",t,this._uiHash());for(var i=0;i",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},n=this.element;return e.each(["min","max","step"],function(e,r){var i=n.attr(r);i!==undefined&&i.length&&(t[r]=i)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e)},mousewheel:function(e,t){if(!t)return;if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()},"mousedown .ui-spinner-button":function(t){function r(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),r.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,r.call(this)});if(this._start(t)===!1)return;this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(!e(t.currentTarget).hasClass("ui-state-active"))return;if(this._start(t)===!1)return!1;this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(e.height()*.5)&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var n=this.options,r=e.ui.keyCode;switch(t.keyCode){case r.UP:return this._repeat(null,1,t),!0;case r.DOWN:return this._repeat(null,-1,t),!0;case r.PAGE_UP:return this._repeat(null,n.page,t),!0;case r.PAGE_DOWN:return this._repeat(null,-n.page,t),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""},_start:function(e){return!this.spinning&&this._trigger("start",e)===!1?!1:(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter));if(!this.spinning||this._trigger("spin",t,{value:n})!==!1)this._value(n),this.counter++},_increment:function(t){var n=this.options.incremental;return n?e.isFunction(n)?n(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return this.options.min!==null&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return n===-1?0:t.length-n-1},_adjustValue:function(e){var t,n,r=this.options;return t=r.min!==null?r.min:0,n=e-t,n=Math.round(n/r.step)*r.step,e=t+n,e=parseFloat(e.toFixed(this._precision())),r.max!==null&&e>r.max?r.max:r.min!==null&&e1&&e.href.replace(r,"")===location.href.replace(r,"").replace(/\s/g,"%20")}var n=0,r=/#.*$/;e.widget("ui.tabs",{version:"1.9.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var t=this,n=this.options,r=n.active,i=location.hash.substring(1);this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",n.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs();if(r===null){i&&this.tabs.each(function(t,n){if(e(n).attr("aria-controls")===i)return r=t,!1}),r===null&&(r=this.tabs.index(this.tabs.filter(".ui-tabs-active")));if(r===null||r===-1)r=this.tabs.length?0:!1}r!==!1&&(r=this.tabs.index(this.tabs.eq(r)),r===-1&&(r=n.collapsible?!1:0)),n.active=r,!n.collapsible&&n.active===!1&&this.anchors.length&&(n.active=0),e.isArray(n.disabled)&&(n.disabled=e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(this.options.active):this.active=e(),this._refresh(),this.active.length&&this.load(n.active)},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var n=e(this.document[0].activeElement).closest("li"),r=this.tabs.index(n),i=!0;if(this._handlePageNav(t))return;switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:r++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:i=!1,r--;break;case e.ui.keyCode.END:r=this.anchors.length-1;break;case e.ui.keyCode.HOME:r=0;break;case e.ui.keyCode.SPACE:t.preventDefault(),clearTimeout(this.activating),this._activate(r);return;case e.ui.keyCode.ENTER:t.preventDefault(),clearTimeout(this.activating),this._activate(r===this.options.active?!1:r);return;default:return}t.preventDefault(),clearTimeout(this.activating),r=this._focusNextTab(r,i),t.ctrlKey||(n.attr("aria-selected","false"),this.tabs.eq(r).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",r)},this.delay))},_panelKeydown:function(t){if(this._handlePageNav(t))return;t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,!1)),!0;if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,!0)),!0},_findNextTab:function(t,n){function i(){return t>r&&(t=0),t<0&&(t=r),t}var r=this.tabs.length-1;while(e.inArray(i(),this.options.disabled)!==-1)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){if(e==="active"){this._activate(t);return}if(e==="disabled"){this._setupDisabled(t);return}this._super(e,t),e==="collapsible"&&(this.element.toggleClass("ui-tabs-collapsible",t),!t&&this.options.active===!1&&this._activate(0)),e==="event"&&this._setupEvents(t),e==="heightStyle"&&this._setupHeightStyle(t)},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),t.active===!1||!this.anchors.length?(t.active=!1,this.active=e()):this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(n,r){var i,o,u,a=e(r).uniqueId().attr("id"),f=e(r).closest("li"),l=f.attr("aria-controls");s(r)?(i=r.hash,o=t.element.find(t._sanitizeSelector(i))):(u=t._tabId(f),i="#"+u,o=t.element.find(i),o.length||(o=t._createPanel(u),o.insertAfter(t.panels[n-1]||t.tablist)),o.attr("aria-live","polite")),o.length&&(t.panels=t.panels.add(o)),l&&f.data("ui-tabs-aria-controls",l),f.attr({"aria-controls":i.substring(1),"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("
          ").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var n=0,r;r=this.tabs[n];n++)t===!0||e.inArray(n,t)!==-1?e(r).addClass("ui-state-disabled").attr("aria-disabled","true"):e(r).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var n={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,r,i=this.element.parent();t==="fill"?(e.support.minHeight||(r=i.css("overflow"),i.css("overflow","hidden")),n=i.height(),this.element.siblings(":visible").each(function(){var t=e(this),r=t.css("position");if(r==="absolute"||r==="fixed")return;n-=t.outerHeight(!0)}),r&&i.css("overflow",r),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):t==="auto"&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i.closest("li"),o=s[0]===r[0],u=o&&n.collapsible,a=u?e():this._getPanelForTab(s),f=r.length?this._getPanelForTab(r):e(),l={oldTab:r,oldPanel:f,newTab:u?e():s,newPanel:a};t.preventDefault();if(s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||o&&!n.collapsible||this._trigger("beforeActivate",t,l)===!1)return;n.active=u?!1:this.tabs.index(s),this.active=o?e():s,this.xhr&&this.xhr.abort(),!f.length&&!a.length&&e.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,l)},_toggle:function(t,n){function o(){r.running=!1,r._trigger("activate",t,n)}function u(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),i.length&&r.options.show?r._show(i,r.options.show,o):(i.show(),o())}var r=this,i=n.newPanel,s=n.oldPanel;this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s.hide(),u()),s.attr({"aria-expanded":"false","aria-hidden":"true"}),n.oldTab.attr("aria-selected","false"),i.length&&s.length?n.oldTab.attr("tabIndex",-1):i.length&&this.tabs.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}),n.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var n,r=this._findActive(t);if(r[0]===this.active[0])return;r.length||(r=this.active),n=r.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return typeof e=="string"&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n):t.removeAttr("aria-controls")}),this.panels.show(),this.options.heightStyle!=="content"&&this.panels.css("height","")},enable:function(n){var r=this.options.disabled;if(r===!1)return;n===t?r=!1:(n=this._getIndex(n),e.isArray(r)?r=e.map(r,function(e){return e!==n?e:null}):r=e.map(this.tabs,function(e,t){return t!==n?t:null})),this._setupDisabled(r)},disable:function(n){var r=this.options.disabled;if(r===!0)return;if(n===t)r=!0;else{n=this._getIndex(n);if(e.inArray(n,r)!==-1)return;e.isArray(r)?r=e.merge([n],r).sort():r=[n]}this._setupDisabled(r)},load:function(t,n){t=this._getIndex(t);var r=this,i=this.tabs.eq(t),o=i.find(".ui-tabs-anchor"),u=this._getPanelForTab(i),a={tab:i,panel:u};if(s(o[0]))return;this.xhr=e.ajax(this._ajaxSettings(o,n,a)),this.xhr&&this.xhr.statusText!=="canceled"&&(i.addClass("ui-tabs-loading"),u.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){u.html(e),r._trigger("load",n,a)},1)}).complete(function(e,t){setTimeout(function(){t==="abort"&&r.panels.stop(!1,!0),i.removeClass("ui-tabs-loading"),u.removeAttr("aria-busy"),e===r.xhr&&delete r.xhr},1)}))},_ajaxSettings:function(t,n,r){var i=this;return{url:t.attr("href"),beforeSend:function(t,s){return i._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:s},r))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}}),e.uiBackCompat!==!1&&(e.ui.tabs.prototype._ui=function(e,t){return{tab:e,panel:t,index:this.anchors.index(e)}},e.widget("ui.tabs",e.ui.tabs,{url:function(e,t){this.anchors.eq(e).attr("href",t)}}),e.widget("ui.tabs",e.ui.tabs,{options:{ajaxOptions:null,cache:!1},_create:function(){this._super();var t=this;this._on({tabsbeforeload:function(n,r){if(e.data(r.tab[0],"cache.tabs")){n.preventDefault();return}r.jqXHR.success(function(){t.options.cache&&e.data(r.tab[0],"cache.tabs",!0)})}})},_ajaxSettings:function(t,n,r){var i=this.options.ajaxOptions;return e.extend({},i,{error:function(e,t){try{i.error(e,t,r.tab.closest("li").index(),r.tab[0])}catch(n){}}},this._superApply(arguments))},_setOption:function(e,t){e==="cache"&&t===!1&&this.anchors.removeData("cache.tabs"),this._super(e,t)},_destroy:function(){this.anchors.removeData("cache.tabs"),this._super()},url:function(e){this.anchors.eq(e).removeData("cache.tabs"),this._superApply(arguments)}}),e.widget("ui.tabs",e.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),e.widget("ui.tabs",e.ui.tabs,{options:{spinner:"Loading…"},_create:function(){this._super(),this._on({tabsbeforeload:function(e,t){if(e.target!==this.element[0]||!this.options.spinner)return;var n=t.tab.find("span"),r=n.html();n.html(this.options.spinner),t.jqXHR.complete(function(){n.html(r)})}})}}),e.widget("ui.tabs",e.ui.tabs,{options:{enable:null,disable:null},enable:function(t){var n=this.options,r;if(t&&n.disabled===!0||e.isArray(n.disabled)&&e.inArray(t,n.disabled)!==-1)r=!0;this._superApply(arguments),r&&this._trigger("enable",null,this._ui(this.anchors[t],this.panels[t]))},disable:function(t){var n=this.options,r;if(t&&n.disabled===!1||e.isArray(n.disabled)&&e.inArray(t,n.disabled)===-1)r=!0;this._superApply(arguments),r&&this._trigger("disable",null,this._ui(this.anchors[t],this.panels[t]))}}),e.widget("ui.tabs",e.ui.tabs,{options:{add:null,remove:null,tabTemplate:"
        • #{label}
        • "},add:function(n,r,i){i===t&&(i=this.anchors.length);var s,o,u=this.options,a=e(u.tabTemplate.replace(/#\{href\}/g,n).replace(/#\{label\}/g,r)),f=n.indexOf("#")?this._tabId(a):n.replace("#","");return a.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",!0),a.attr("aria-controls",f),s=i>=this.tabs.length,o=this.element.find("#"+f),o.length||(o=this._createPanel(f),s?i>0?o.insertAfter(this.panels.eq(-1)):o.appendTo(this.element):o.insertBefore(this.panels[i])),o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(),s?a.appendTo(this.tablist):a.insertBefore(this.tabs[i]),u.disabled=e.map(u.disabled,function(e){return e>=i?++e:e}),this.refresh(),this.tabs.length===1&&u.active===!1&&this.option("active",0),this._trigger("add",null,this._ui(this.anchors[i],this.panels[i])),this},remove:function(t){t=this._getIndex(t);var n=this.options,r=this.tabs.eq(t).remove(),i=this._getPanelForTab(r).remove();return r.hasClass("ui-tabs-active")&&this.anchors.length>2&&this._activate(t+(t+1=t?--e:e}),this.refresh(),this._trigger("remove",null,this._ui(r.find("a")[0],i[0])),this}}),e.widget("ui.tabs",e.ui.tabs,{length:function(){return this.anchors.length}}),e.widget("ui.tabs",e.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(t){var n=t.is("li")?t.find("a[href]"):t;return n=n[0],e(n).closest("li").attr("aria-controls")||n.title&&n.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+i()}}),e.widget("ui.tabs",e.ui.tabs,{options:{panelTemplate:"
          "},_createPanel:function(t){return e(this.options.panelTemplate).attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)}}),e.widget("ui.tabs",e.ui.tabs,{_create:function(){var e=this.options;e.active===null&&e.selected!==t&&(e.active=e.selected===-1?!1:e.selected),this._super(),e.selected=e.active,e.selected===!1&&(e.selected=-1)},_setOption:function(e,t){if(e!=="selected")return this._super(e,t);var n=this.options;this._super("active",t===-1?!1:t),n.selected=n.active,n.selected===!1&&(n.selected=-1)},_eventHandler:function(){this._superApply(arguments),this.options.selected=this.options.active,this.options.selected===!1&&(this.options.selected=-1)}}),e.widget("ui.tabs",e.ui.tabs,{options:{show:null,select:null},_create:function(){this._super(),this.options.active!==!1&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(e,t,n){var r,i,s=this._superApply(arguments);return s?(e==="beforeActivate"?(r=n.newTab.length?n.newTab:n.oldTab,i=n.newPanel.length?n.newPanel:n.oldPanel,s=this._super("select",t,{tab:r.find(".ui-tabs-anchor")[0],panel:i[0],index:r.closest("li").index()})):e==="activate"&&n.newTab.length&&(s=this._super("show",t,{tab:n.newTab.find(".ui-tabs-anchor")[0],panel:n.newPanel[0],index:n.newTab.closest("li").index()})),s):!1}}),e.widget("ui.tabs",e.ui.tabs,{select:function(e){e=this._getIndex(e);if(e===-1){if(!this.options.collapsible||this.options.selected===-1)return;e=this.options.selected}this.anchors.eq(e).trigger(this.options.event+this.eventNamespace)}}),function(){var t=0;e.widget("ui.tabs",e.ui.tabs,{options:{cookie:null},_create:function(){var e=this.options,t;e.active==null&&e.cookie&&(t=parseInt(this._cookie(),10),t===-1&&(t=!1),e.active=t),this._super()},_cookie:function(n){var r=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++t)];return arguments.length&&(r.push(n===!1?-1:n),r.push(this.options.cookie)),e.cookie.apply(null,r)},_refresh:function(){this._super(),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_eventHandler:function(){this._superApply(arguments),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super(),this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),e.widget("ui.tabs",e.ui.tabs,{_trigger:function(t,n,r){var i=e.extend({},r);return t==="load"&&(i.panel=i.panel[0],i.tab=i.tab.find(".ui-tabs-anchor")[0]),this._super(t,n,i)}}),e.widget("ui.tabs",e.ui.tabs,{options:{fx:null},_getFx:function(){var t,n,r=this.options.fx;return r&&(e.isArray(r)?(t=r[0],n=r[1]):t=n=r),r?{show:n,hide:t}:null},_toggle:function(e,t){function o(){n.running=!1,n._trigger("activate",e,t)}function u(){t.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&s.show?r.animate(s.show,s.show.duration,function(){o()}):(r.show(),o())}var n=this,r=t.newPanel,i=t.oldPanel,s=this._getFx();if(!s)return this._super(e,t);n.running=!0,i.length&&s.hide?i.animate(s.hide,s.hide.duration,function(){t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),i.hide(),u())}}))})(jQuery);(function(e){function n(t,n){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(r.join(" ")))}function r(t){var n=t.data("ui-tooltip-id"),r=(t.attr("aria-describedby")||"").split(/\s+/),i=e.inArray(n,r);i!==-1&&r.splice(i,1),t.removeData("ui-tooltip-id"),r=e.trim(r.join(" ")),r?t.attr("aria-describedby",r):t.removeAttr("aria-describedby")}var t=0;e.widget("ui.tooltip",{version:"1.9.2",options:{content:function(){return e(this).attr("title")},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,n){var r=this;if(t==="disabled"){this[n?"_disable":"_enable"](),this.options[t]=n;return}this._super(t,n),t==="content"&&e.each(this.tooltips,function(e,t){r._updateContent(t)})},_disable:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0)}),this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var n=this,r=e(t?t.target:this.element).closest(this.options.items);if(!r.length||r.data("ui-tooltip-id"))return;r.attr("title")&&r.data("ui-tooltip-title",r.attr("title")),r.data("ui-tooltip-open",!0),t&&t.type==="mouseover"&&r.parents().each(function(){var t=e(this),r;t.data("ui-tooltip-open")&&(r=e.Event("blur"),r.target=r.currentTarget=this,n.close(r,!0)),t.attr("title")&&(t.uniqueId(),n.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._updateContent(r,t)},_updateContent:function(e,t){var n,r=this.options.content,i=this,s=t?t.type:null;if(typeof r=="string")return this._open(t,e,r);n=r.call(e[0],function(n){if(!e.data("ui-tooltip-open"))return;i._delay(function(){t&&(t.type=s),this._open(t,e,n)})}),n&&this._open(t,e,n)},_open:function(t,r,i){function f(e){a.of=e;if(s.is(":hidden"))return;s.position(a)}var s,o,u,a=e.extend({},this.options.position);if(!i)return;s=this._find(r);if(s.length){s.find(".ui-tooltip-content").html(i);return}r.is("[title]")&&(t&&t.type==="mouseover"?r.attr("title",""):r.removeAttr("title")),s=this._tooltip(r),n(r,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:f}),f(t)):s.position(e.extend({of:r},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(u=setInterval(function(){s.is(":visible")&&(f(a.of),clearInterval(u))},e.fx.interval)),this._trigger("open",t,{tooltip:s}),o={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var n=e.Event(t);n.currentTarget=r[0],this.close(n,!0)}},remove:function(){this._removeTooltip(s)}};if(!t||t.type==="mouseover")o.mouseleave="close";if(!t||t.type==="focusin")o.focusout="close";this._on(!0,r,o)},close:function(t){var n=this,i=e(t?t.currentTarget:this.element),s=this._find(i);if(this.closing)return;i.data("ui-tooltip-title")&&i.attr("title",i.data("ui-tooltip-title")),r(i),s.stop(!0),this._hide(s,this.options.hide,function(){n._removeTooltip(e(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&t.type==="mouseleave"&&e.each(this.parents,function(t,r){e(r.element).attr("title",r.title),delete n.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:s}),this.closing=!1},_tooltip:function(n){var r="ui-tooltip-"+t++,i=e("
          ").attr({id:r,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("
          ").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),e.fn.bgiframe&&i.bgiframe(),this.tooltips[r]=n,i},_find:function(t){var n=t.data("ui-tooltip-id");return n?e("#"+n):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0),e("#"+n).remove(),r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})})(jQuery); \ No newline at end of file +(function (e, t) { + function i(t, n) { + var r, + i, + o, + u = t.nodeName.toLowerCase(); + return "area" === u + ? ((r = t.parentNode), + (i = r.name), + !t.href || !i || r.nodeName.toLowerCase() !== "map" + ? !1 + : ((o = e("img[usemap=#" + i + "]")[0]), !!o && s(o))) + : (/input|select|textarea|button|object/.test(u) + ? !t.disabled + : "a" === u + ? t.href || n + : n) && s(t); + } + function s(t) { + return ( + e.expr.filters.visible(t) && + !e(t) + .parents() + .andSelf() + .filter(function () { + return e.css(this, "visibility") === "hidden"; + }).length + ); + } + var n = 0, + r = /^ui-id-\d+$/; + e.ui = e.ui || {}; + if (e.ui.version) return; + e.extend(e.ui, { + version: "1.9.2", + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38, + }, + }), + e.fn.extend({ + _focus: e.fn.focus, + focus: function (t, n) { + return typeof t == "number" + ? this.each(function () { + var r = this; + setTimeout(function () { + e(r).focus(), n && n.call(r); + }, t); + }) + : this._focus.apply(this, arguments); + }, + scrollParent: function () { + var t; + return ( + (e.ui.ie && /(static|relative)/.test(this.css("position"))) || + /absolute/.test(this.css("position")) + ? (t = this.parents() + .filter(function () { + return ( + /(relative|absolute|fixed)/.test(e.css(this, "position")) && + /(auto|scroll)/.test( + e.css(this, "overflow") + + e.css(this, "overflow-y") + + e.css(this, "overflow-x"), + ) + ); + }) + .eq(0)) + : (t = this.parents() + .filter(function () { + return /(auto|scroll)/.test( + e.css(this, "overflow") + + e.css(this, "overflow-y") + + e.css(this, "overflow-x"), + ); + }) + .eq(0)), + /fixed/.test(this.css("position")) || !t.length ? e(document) : t + ); + }, + zIndex: function (n) { + if (n !== t) return this.css("zIndex", n); + if (this.length) { + var r = e(this[0]), + i, + s; + while (r.length && r[0] !== document) { + i = r.css("position"); + if (i === "absolute" || i === "relative" || i === "fixed") { + s = parseInt(r.css("zIndex"), 10); + if (!isNaN(s) && s !== 0) return s; + } + r = r.parent(); + } + } + return 0; + }, + uniqueId: function () { + return this.each(function () { + this.id || (this.id = "ui-id-" + ++n); + }); + }, + removeUniqueId: function () { + return this.each(function () { + r.test(this.id) && e(this).removeAttr("id"); + }); + }, + }), + e.extend(e.expr[":"], { + data: e.expr.createPseudo + ? e.expr.createPseudo(function (t) { + return function (n) { + return !!e.data(n, t); + }; + }) + : function (t, n, r) { + return !!e.data(t, r[3]); + }, + focusable: function (t) { + return i(t, !isNaN(e.attr(t, "tabindex"))); + }, + tabbable: function (t) { + var n = e.attr(t, "tabindex"), + r = isNaN(n); + return (r || n >= 0) && i(t, !r); + }, + }), + e(function () { + var t = document.body, + n = t.appendChild((n = document.createElement("div"))); + n.offsetHeight, + e.extend(n.style, { + minHeight: "100px", + height: "auto", + padding: 0, + borderWidth: 0, + }), + (e.support.minHeight = n.offsetHeight === 100), + (e.support.selectstart = "onselectstart" in n), + (t.removeChild(n).style.display = "none"); + }), + e("").outerWidth(1).jquery || + e.each(["Width", "Height"], function (n, r) { + function u(t, n, r, s) { + return ( + e.each(i, function () { + (n -= parseFloat(e.css(t, "padding" + this)) || 0), + r && + (n -= parseFloat(e.css(t, "border" + this + "Width")) || 0), + s && (n -= parseFloat(e.css(t, "margin" + this)) || 0); + }), + n + ); + } + var i = r === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], + s = r.toLowerCase(), + o = { + innerWidth: e.fn.innerWidth, + innerHeight: e.fn.innerHeight, + outerWidth: e.fn.outerWidth, + outerHeight: e.fn.outerHeight, + }; + (e.fn["inner" + r] = function (n) { + return n === t + ? o["inner" + r].call(this) + : this.each(function () { + e(this).css(s, u(this, n) + "px"); + }); + }), + (e.fn["outer" + r] = function (t, n) { + return typeof t != "number" + ? o["outer" + r].call(this, t) + : this.each(function () { + e(this).css(s, u(this, t, !0, n) + "px"); + }); + }); + }), + e("").data("a-b", "a").removeData("a-b").data("a-b") && + (e.fn.removeData = (function (t) { + return function (n) { + return arguments.length ? t.call(this, e.camelCase(n)) : t.call(this); + }; + })(e.fn.removeData)), + (function () { + var t = /msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase()) || []; + (e.ui.ie = t.length ? !0 : !1), (e.ui.ie6 = parseFloat(t[1], 10) === 6); + })(), + e.fn.extend({ + disableSelection: function () { + return this.bind( + (e.support.selectstart ? "selectstart" : "mousedown") + + ".ui-disableSelection", + function (e) { + e.preventDefault(); + }, + ); + }, + enableSelection: function () { + return this.unbind(".ui-disableSelection"); + }, + }), + e.extend(e.ui, { + plugin: { + add: function (t, n, r) { + var i, + s = e.ui[t].prototype; + for (i in r) + (s.plugins[i] = s.plugins[i] || []), s.plugins[i].push([n, r[i]]); + }, + call: function (e, t, n) { + var r, + i = e.plugins[t]; + if ( + !i || + !e.element[0].parentNode || + e.element[0].parentNode.nodeType === 11 + ) + return; + for (r = 0; r < i.length; r++) + e.options[i[r][0]] && i[r][1].apply(e.element, n); + }, + }, + contains: e.contains, + hasScroll: function (t, n) { + if (e(t).css("overflow") === "hidden") return !1; + var r = n && n === "left" ? "scrollLeft" : "scrollTop", + i = !1; + return t[r] > 0 ? !0 : ((t[r] = 1), (i = t[r] > 0), (t[r] = 0), i); + }, + isOverAxis: function (e, t, n) { + return e > t && e < t + n; + }, + isOver: function (t, n, r, i, s, o) { + return e.ui.isOverAxis(t, r, s) && e.ui.isOverAxis(n, i, o); + }, + }); +})(jQuery); +(function (e, t) { + var n = 0, + r = Array.prototype.slice, + i = e.cleanData; + (e.cleanData = function (t) { + for (var n = 0, r; (r = t[n]) != null; n++) + try { + e(r).triggerHandler("remove"); + } catch (s) {} + i(t); + }), + (e.widget = function (t, n, r) { + var i, + s, + o, + u, + a = t.split(".")[0]; + (t = t.split(".")[1]), + (i = a + "-" + t), + r || ((r = n), (n = e.Widget)), + (e.expr[":"][i.toLowerCase()] = function (t) { + return !!e.data(t, i); + }), + (e[a] = e[a] || {}), + (s = e[a][t]), + (o = e[a][t] = + function (e, t) { + if (!this._createWidget) return new o(e, t); + arguments.length && this._createWidget(e, t); + }), + e.extend(o, s, { + version: r.version, + _proto: e.extend({}, r), + _childConstructors: [], + }), + (u = new n()), + (u.options = e.widget.extend({}, u.options)), + e.each(r, function (t, i) { + e.isFunction(i) && + (r[t] = (function () { + var e = function () { + return n.prototype[t].apply(this, arguments); + }, + r = function (e) { + return n.prototype[t].apply(this, e); + }; + return function () { + var t = this._super, + n = this._superApply, + s; + return ( + (this._super = e), + (this._superApply = r), + (s = i.apply(this, arguments)), + (this._super = t), + (this._superApply = n), + s + ); + }; + })()); + }), + (o.prototype = e.widget.extend( + u, + { widgetEventPrefix: s ? u.widgetEventPrefix : t }, + r, + { + constructor: o, + namespace: a, + widgetName: t, + widgetBaseClass: i, + widgetFullName: i, + }, + )), + s + ? (e.each(s._childConstructors, function (t, n) { + var r = n.prototype; + e.widget(r.namespace + "." + r.widgetName, o, n._proto); + }), + delete s._childConstructors) + : n._childConstructors.push(o), + e.widget.bridge(t, o); + }), + (e.widget.extend = function (n) { + var i = r.call(arguments, 1), + s = 0, + o = i.length, + u, + a; + for (; s < o; s++) + for (u in i[s]) + (a = i[s][u]), + i[s].hasOwnProperty(u) && + a !== t && + (e.isPlainObject(a) + ? (n[u] = e.isPlainObject(n[u]) + ? e.widget.extend({}, n[u], a) + : e.widget.extend({}, a)) + : (n[u] = a)); + return n; + }), + (e.widget.bridge = function (n, i) { + var s = i.prototype.widgetFullName || n; + e.fn[n] = function (o) { + var u = typeof o == "string", + a = r.call(arguments, 1), + f = this; + return ( + (o = !u && a.length ? e.widget.extend.apply(null, [o].concat(a)) : o), + u + ? this.each(function () { + var r, + i = e.data(this, s); + if (!i) + return e.error( + "cannot call methods on " + + n + + " prior to initialization; " + + "attempted to call method '" + + o + + "'", + ); + if (!e.isFunction(i[o]) || o.charAt(0) === "_") + return e.error( + "no such method '" + o + "' for " + n + " widget instance", + ); + r = i[o].apply(i, a); + if (r !== i && r !== t) + return (f = r && r.jquery ? f.pushStack(r.get()) : r), !1; + }) + : this.each(function () { + var t = e.data(this, s); + t ? t.option(o || {})._init() : e.data(this, s, new i(o, this)); + }), + f + ); + }; + }), + (e.Widget = function () {}), + (e.Widget._childConstructors = []), + (e.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
          ", + options: { disabled: !1, create: null }, + _createWidget: function (t, r) { + (r = e(r || this.defaultElement || this)[0]), + (this.element = e(r)), + (this.uuid = n++), + (this.eventNamespace = "." + this.widgetName + this.uuid), + (this.options = e.widget.extend( + {}, + this.options, + this._getCreateOptions(), + t, + )), + (this.bindings = e()), + (this.hoverable = e()), + (this.focusable = e()), + r !== this && + (e.data(r, this.widgetName, this), + e.data(r, this.widgetFullName, this), + this._on(!0, this.element, { + remove: function (e) { + e.target === r && this.destroy(); + }, + }), + (this.document = e(r.style ? r.ownerDocument : r.document || r)), + (this.window = e( + this.document[0].defaultView || this.document[0].parentWindow, + ))), + this._create(), + this._trigger("create", null, this._getCreateEventData()), + this._init(); + }, + _getCreateOptions: e.noop, + _getCreateEventData: e.noop, + _create: e.noop, + _init: e.noop, + destroy: function () { + this._destroy(), + this.element + .unbind(this.eventNamespace) + .removeData(this.widgetName) + .removeData(this.widgetFullName) + .removeData(e.camelCase(this.widgetFullName)), + this.widget() + .unbind(this.eventNamespace) + .removeAttr("aria-disabled") + .removeClass( + this.widgetFullName + "-disabled " + "ui-state-disabled", + ), + this.bindings.unbind(this.eventNamespace), + this.hoverable.removeClass("ui-state-hover"), + this.focusable.removeClass("ui-state-focus"); + }, + _destroy: e.noop, + widget: function () { + return this.element; + }, + option: function (n, r) { + var i = n, + s, + o, + u; + if (arguments.length === 0) return e.widget.extend({}, this.options); + if (typeof n == "string") { + (i = {}), (s = n.split(".")), (n = s.shift()); + if (s.length) { + o = i[n] = e.widget.extend({}, this.options[n]); + for (u = 0; u < s.length - 1; u++) + (o[s[u]] = o[s[u]] || {}), (o = o[s[u]]); + n = s.pop(); + if (r === t) return o[n] === t ? null : o[n]; + o[n] = r; + } else { + if (r === t) return this.options[n] === t ? null : this.options[n]; + i[n] = r; + } + } + return this._setOptions(i), this; + }, + _setOptions: function (e) { + var t; + for (t in e) this._setOption(t, e[t]); + return this; + }, + _setOption: function (e, t) { + return ( + (this.options[e] = t), + e === "disabled" && + (this.widget() + .toggleClass( + this.widgetFullName + "-disabled ui-state-disabled", + !!t, + ) + .attr("aria-disabled", t), + this.hoverable.removeClass("ui-state-hover"), + this.focusable.removeClass("ui-state-focus")), + this + ); + }, + enable: function () { + return this._setOption("disabled", !1); + }, + disable: function () { + return this._setOption("disabled", !0); + }, + _on: function (t, n, r) { + var i, + s = this; + typeof t != "boolean" && ((r = n), (n = t), (t = !1)), + r + ? ((n = i = e(n)), (this.bindings = this.bindings.add(n))) + : ((r = n), (n = this.element), (i = this.widget())), + e.each(r, function (r, o) { + function u() { + if ( + !t && + (s.options.disabled === !0 || + e(this).hasClass("ui-state-disabled")) + ) + return; + return (typeof o == "string" ? s[o] : o).apply(s, arguments); + } + typeof o != "string" && + (u.guid = o.guid = o.guid || u.guid || e.guid++); + var a = r.match(/^(\w+)\s*(.*)$/), + f = a[1] + s.eventNamespace, + l = a[2]; + l ? i.delegate(l, f, u) : n.bind(f, u); + }); + }, + _off: function (e, t) { + (t = + (t || "").split(" ").join(this.eventNamespace + " ") + + this.eventNamespace), + e.unbind(t).undelegate(t); + }, + _delay: function (e, t) { + function n() { + return (typeof e == "string" ? r[e] : e).apply(r, arguments); + } + var r = this; + return setTimeout(n, t || 0); + }, + _hoverable: function (t) { + (this.hoverable = this.hoverable.add(t)), + this._on(t, { + mouseenter: function (t) { + e(t.currentTarget).addClass("ui-state-hover"); + }, + mouseleave: function (t) { + e(t.currentTarget).removeClass("ui-state-hover"); + }, + }); + }, + _focusable: function (t) { + (this.focusable = this.focusable.add(t)), + this._on(t, { + focusin: function (t) { + e(t.currentTarget).addClass("ui-state-focus"); + }, + focusout: function (t) { + e(t.currentTarget).removeClass("ui-state-focus"); + }, + }); + }, + _trigger: function (t, n, r) { + var i, + s, + o = this.options[t]; + (r = r || {}), + (n = e.Event(n)), + (n.type = ( + t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t + ).toLowerCase()), + (n.target = this.element[0]), + (s = n.originalEvent); + if (s) for (i in s) i in n || (n[i] = s[i]); + return ( + this.element.trigger(n, r), + !( + (e.isFunction(o) && + o.apply(this.element[0], [n].concat(r)) === !1) || + n.isDefaultPrevented() + ) + ); + }, + }), + e.each({ show: "fadeIn", hide: "fadeOut" }, function (t, n) { + e.Widget.prototype["_" + t] = function (r, i, s) { + typeof i == "string" && (i = { effect: i }); + var o, + u = i ? (i === !0 || typeof i == "number" ? n : i.effect || n) : t; + (i = i || {}), + typeof i == "number" && (i = { duration: i }), + (o = !e.isEmptyObject(i)), + (i.complete = s), + i.delay && r.delay(i.delay), + o && + e.effects && + (e.effects.effect[u] || (e.uiBackCompat !== !1 && e.effects[u])) + ? r[t](i) + : u !== t && r[u] + ? r[u](i.duration, i.easing, s) + : r.queue(function (n) { + e(this)[t](), s && s.call(r[0]), n(); + }); + }; + }), + e.uiBackCompat !== !1 && + (e.Widget.prototype._getCreateOptions = function () { + return e.metadata && e.metadata.get(this.element[0])[this.widgetName]; + }); +})(jQuery); +(function (e, t) { + var n = !1; + e(document).mouseup(function (e) { + n = !1; + }), + e.widget("ui.mouse", { + version: "1.9.2", + options: { + cancel: "input,textarea,button,select,option", + distance: 1, + delay: 0, + }, + _mouseInit: function () { + var t = this; + this.element + .bind("mousedown." + this.widgetName, function (e) { + return t._mouseDown(e); + }) + .bind("click." + this.widgetName, function (n) { + if (!0 === e.data(n.target, t.widgetName + ".preventClickEvent")) + return ( + e.removeData(n.target, t.widgetName + ".preventClickEvent"), + n.stopImmediatePropagation(), + !1 + ); + }), + (this.started = !1); + }, + _mouseDestroy: function () { + this.element.unbind("." + this.widgetName), + this._mouseMoveDelegate && + e(document) + .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); + }, + _mouseDown: function (t) { + if (n) return; + this._mouseStarted && this._mouseUp(t), (this._mouseDownEvent = t); + var r = this, + i = t.which === 1, + s = + typeof this.options.cancel == "string" && t.target.nodeName + ? e(t.target).closest(this.options.cancel).length + : !1; + if (!i || s || !this._mouseCapture(t)) return !0; + (this.mouseDelayMet = !this.options.delay), + this.mouseDelayMet || + (this._mouseDelayTimer = setTimeout(function () { + r.mouseDelayMet = !0; + }, this.options.delay)); + if (this._mouseDistanceMet(t) && this._mouseDelayMet(t)) { + this._mouseStarted = this._mouseStart(t) !== !1; + if (!this._mouseStarted) return t.preventDefault(), !0; + } + return ( + !0 === e.data(t.target, this.widgetName + ".preventClickEvent") && + e.removeData(t.target, this.widgetName + ".preventClickEvent"), + (this._mouseMoveDelegate = function (e) { + return r._mouseMove(e); + }), + (this._mouseUpDelegate = function (e) { + return r._mouseUp(e); + }), + e(document) + .bind("mousemove." + this.widgetName, this._mouseMoveDelegate) + .bind("mouseup." + this.widgetName, this._mouseUpDelegate), + t.preventDefault(), + (n = !0), + !0 + ); + }, + _mouseMove: function (t) { + return !e.ui.ie || document.documentMode >= 9 || !!t.button + ? this._mouseStarted + ? (this._mouseDrag(t), t.preventDefault()) + : (this._mouseDistanceMet(t) && + this._mouseDelayMet(t) && + ((this._mouseStarted = + this._mouseStart(this._mouseDownEvent, t) !== !1), + this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), + !this._mouseStarted) + : this._mouseUp(t); + }, + _mouseUp: function (t) { + return ( + e(document) + .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup." + this.widgetName, this._mouseUpDelegate), + this._mouseStarted && + ((this._mouseStarted = !1), + t.target === this._mouseDownEvent.target && + e.data(t.target, this.widgetName + ".preventClickEvent", !0), + this._mouseStop(t)), + !1 + ); + }, + _mouseDistanceMet: function (e) { + return ( + Math.max( + Math.abs(this._mouseDownEvent.pageX - e.pageX), + Math.abs(this._mouseDownEvent.pageY - e.pageY), + ) >= this.options.distance + ); + }, + _mouseDelayMet: function (e) { + return this.mouseDelayMet; + }, + _mouseStart: function (e) {}, + _mouseDrag: function (e) {}, + _mouseStop: function (e) {}, + _mouseCapture: function (e) { + return !0; + }, + }); +})(jQuery); +(function (e, t) { + function h(e, t, n) { + return [ + parseInt(e[0], 10) * (l.test(e[0]) ? t / 100 : 1), + parseInt(e[1], 10) * (l.test(e[1]) ? n / 100 : 1), + ]; + } + function p(t, n) { + return parseInt(e.css(t, n), 10) || 0; + } + e.ui = e.ui || {}; + var n, + r = Math.max, + i = Math.abs, + s = Math.round, + o = /left|center|right/, + u = /top|center|bottom/, + a = /[\+\-]\d+%?/, + f = /^\w+/, + l = /%$/, + c = e.fn.position; + (e.position = { + scrollbarWidth: function () { + if (n !== t) return n; + var r, + i, + s = e( + "
          ", + ), + o = s.children()[0]; + return ( + e("body").append(s), + (r = o.offsetWidth), + s.css("overflow", "scroll"), + (i = o.offsetWidth), + r === i && (i = s[0].clientWidth), + s.remove(), + (n = r - i) + ); + }, + getScrollInfo: function (t) { + var n = t.isWindow ? "" : t.element.css("overflow-x"), + r = t.isWindow ? "" : t.element.css("overflow-y"), + i = + n === "scroll" || + (n === "auto" && t.width < t.element[0].scrollWidth), + s = + r === "scroll" || + (r === "auto" && t.height < t.element[0].scrollHeight); + return { + width: i ? e.position.scrollbarWidth() : 0, + height: s ? e.position.scrollbarWidth() : 0, + }; + }, + getWithinInfo: function (t) { + var n = e(t || window), + r = e.isWindow(n[0]); + return { + element: n, + isWindow: r, + offset: n.offset() || { left: 0, top: 0 }, + scrollLeft: n.scrollLeft(), + scrollTop: n.scrollTop(), + width: r ? n.width() : n.outerWidth(), + height: r ? n.height() : n.outerHeight(), + }; + }, + }), + (e.fn.position = function (t) { + if (!t || !t.of) return c.apply(this, arguments); + t = e.extend({}, t); + var n, + l, + d, + v, + m, + g = e(t.of), + y = e.position.getWithinInfo(t.within), + b = e.position.getScrollInfo(y), + w = g[0], + E = (t.collision || "flip").split(" "), + S = {}; + return ( + w.nodeType === 9 + ? ((l = g.width()), (d = g.height()), (v = { top: 0, left: 0 })) + : e.isWindow(w) + ? ((l = g.width()), + (d = g.height()), + (v = { top: g.scrollTop(), left: g.scrollLeft() })) + : w.preventDefault + ? ((t.at = "left top"), + (l = d = 0), + (v = { top: w.pageY, left: w.pageX })) + : ((l = g.outerWidth()), (d = g.outerHeight()), (v = g.offset())), + (m = e.extend({}, v)), + e.each(["my", "at"], function () { + var e = (t[this] || "").split(" "), + n, + r; + e.length === 1 && + (e = o.test(e[0]) + ? e.concat(["center"]) + : u.test(e[0]) + ? ["center"].concat(e) + : ["center", "center"]), + (e[0] = o.test(e[0]) ? e[0] : "center"), + (e[1] = u.test(e[1]) ? e[1] : "center"), + (n = a.exec(e[0])), + (r = a.exec(e[1])), + (S[this] = [n ? n[0] : 0, r ? r[0] : 0]), + (t[this] = [f.exec(e[0])[0], f.exec(e[1])[0]]); + }), + E.length === 1 && (E[1] = E[0]), + t.at[0] === "right" + ? (m.left += l) + : t.at[0] === "center" && (m.left += l / 2), + t.at[1] === "bottom" + ? (m.top += d) + : t.at[1] === "center" && (m.top += d / 2), + (n = h(S.at, l, d)), + (m.left += n[0]), + (m.top += n[1]), + this.each(function () { + var o, + u, + a = e(this), + f = a.outerWidth(), + c = a.outerHeight(), + w = p(this, "marginLeft"), + x = p(this, "marginTop"), + T = f + w + p(this, "marginRight") + b.width, + N = c + x + p(this, "marginBottom") + b.height, + C = e.extend({}, m), + k = h(S.my, a.outerWidth(), a.outerHeight()); + t.my[0] === "right" + ? (C.left -= f) + : t.my[0] === "center" && (C.left -= f / 2), + t.my[1] === "bottom" + ? (C.top -= c) + : t.my[1] === "center" && (C.top -= c / 2), + (C.left += k[0]), + (C.top += k[1]), + e.support.offsetFractions || + ((C.left = s(C.left)), (C.top = s(C.top))), + (o = { marginLeft: w, marginTop: x }), + e.each(["left", "top"], function (r, i) { + e.ui.position[E[r]] && + e.ui.position[E[r]][i](C, { + targetWidth: l, + targetHeight: d, + elemWidth: f, + elemHeight: c, + collisionPosition: o, + collisionWidth: T, + collisionHeight: N, + offset: [n[0] + k[0], n[1] + k[1]], + my: t.my, + at: t.at, + within: y, + elem: a, + }); + }), + e.fn.bgiframe && a.bgiframe(), + t.using && + (u = function (e) { + var n = v.left - C.left, + s = n + l - f, + o = v.top - C.top, + u = o + d - c, + h = { + target: { + element: g, + left: v.left, + top: v.top, + width: l, + height: d, + }, + element: { + element: a, + left: C.left, + top: C.top, + width: f, + height: c, + }, + horizontal: s < 0 ? "left" : n > 0 ? "right" : "center", + vertical: u < 0 ? "top" : o > 0 ? "bottom" : "middle", + }; + l < f && i(n + s) < l && (h.horizontal = "center"), + d < c && i(o + u) < d && (h.vertical = "middle"), + r(i(n), i(s)) > r(i(o), i(u)) + ? (h.important = "horizontal") + : (h.important = "vertical"), + t.using.call(this, e, h); + }), + a.offset(e.extend(C, { using: u })); + }) + ); + }), + (e.ui.position = { + fit: { + left: function (e, t) { + var n = t.within, + i = n.isWindow ? n.scrollLeft : n.offset.left, + s = n.width, + o = e.left - t.collisionPosition.marginLeft, + u = i - o, + a = o + t.collisionWidth - s - i, + f; + t.collisionWidth > s + ? u > 0 && a <= 0 + ? ((f = e.left + u + t.collisionWidth - s - i), (e.left += u - f)) + : a > 0 && u <= 0 + ? (e.left = i) + : u > a + ? (e.left = i + s - t.collisionWidth) + : (e.left = i) + : u > 0 + ? (e.left += u) + : a > 0 + ? (e.left -= a) + : (e.left = r(e.left - o, e.left)); + }, + top: function (e, t) { + var n = t.within, + i = n.isWindow ? n.scrollTop : n.offset.top, + s = t.within.height, + o = e.top - t.collisionPosition.marginTop, + u = i - o, + a = o + t.collisionHeight - s - i, + f; + t.collisionHeight > s + ? u > 0 && a <= 0 + ? ((f = e.top + u + t.collisionHeight - s - i), (e.top += u - f)) + : a > 0 && u <= 0 + ? (e.top = i) + : u > a + ? (e.top = i + s - t.collisionHeight) + : (e.top = i) + : u > 0 + ? (e.top += u) + : a > 0 + ? (e.top -= a) + : (e.top = r(e.top - o, e.top)); + }, + }, + flip: { + left: function (e, t) { + var n = t.within, + r = n.offset.left + n.scrollLeft, + s = n.width, + o = n.isWindow ? n.scrollLeft : n.offset.left, + u = e.left - t.collisionPosition.marginLeft, + a = u - o, + f = u + t.collisionWidth - s - o, + l = + t.my[0] === "left" + ? -t.elemWidth + : t.my[0] === "right" + ? t.elemWidth + : 0, + c = + t.at[0] === "left" + ? t.targetWidth + : t.at[0] === "right" + ? -t.targetWidth + : 0, + h = -2 * t.offset[0], + p, + d; + if (a < 0) { + p = e.left + l + c + h + t.collisionWidth - s - r; + if (p < 0 || p < i(a)) e.left += l + c + h; + } else if (f > 0) { + d = e.left - t.collisionPosition.marginLeft + l + c + h - o; + if (d > 0 || i(d) < f) e.left += l + c + h; + } + }, + top: function (e, t) { + var n = t.within, + r = n.offset.top + n.scrollTop, + s = n.height, + o = n.isWindow ? n.scrollTop : n.offset.top, + u = e.top - t.collisionPosition.marginTop, + a = u - o, + f = u + t.collisionHeight - s - o, + l = t.my[1] === "top", + c = l ? -t.elemHeight : t.my[1] === "bottom" ? t.elemHeight : 0, + h = + t.at[1] === "top" + ? t.targetHeight + : t.at[1] === "bottom" + ? -t.targetHeight + : 0, + p = -2 * t.offset[1], + d, + v; + a < 0 + ? ((v = e.top + c + h + p + t.collisionHeight - s - r), + e.top + c + h + p > a && + (v < 0 || v < i(a)) && + (e.top += c + h + p)) + : f > 0 && + ((d = e.top - t.collisionPosition.marginTop + c + h + p - o), + e.top + c + h + p > f && + (d > 0 || i(d) < f) && + (e.top += c + h + p)); + }, + }, + flipfit: { + left: function () { + e.ui.position.flip.left.apply(this, arguments), + e.ui.position.fit.left.apply(this, arguments); + }, + top: function () { + e.ui.position.flip.top.apply(this, arguments), + e.ui.position.fit.top.apply(this, arguments); + }, + }, + }), + (function () { + var t, + n, + r, + i, + s, + o = document.getElementsByTagName("body")[0], + u = document.createElement("div"); + (t = document.createElement(o ? "div" : "body")), + (r = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0, + background: "none", + }), + o && + e.extend(r, { + position: "absolute", + left: "-1000px", + top: "-1000px", + }); + for (s in r) t.style[s] = r[s]; + t.appendChild(u), + (n = o || document.documentElement), + n.insertBefore(t, n.firstChild), + (u.style.cssText = "position: absolute; left: 10.7432222px;"), + (i = e(u).offset().left), + (e.support.offsetFractions = i > 10 && i < 11), + (t.innerHTML = ""), + n.removeChild(t); + })(), + e.uiBackCompat !== !1 && + (function (e) { + var n = e.fn.position; + e.fn.position = function (r) { + if (!r || !r.offset) return n.call(this, r); + var i = r.offset.split(" "), + s = r.at.split(" "); + return ( + i.length === 1 && (i[1] = i[0]), + /^\d/.test(i[0]) && (i[0] = "+" + i[0]), + /^\d/.test(i[1]) && (i[1] = "+" + i[1]), + s.length === 1 && + (/left|center|right/.test(s[0]) + ? (s[1] = "center") + : ((s[1] = s[0]), (s[0] = "center"))), + n.call( + this, + e.extend(r, { at: s[0] + i[0] + " " + s[1] + i[1], offset: t }), + ) + ); + }; + })(jQuery); +})(jQuery); +(function (e, t) { + var n = 0, + r = {}, + i = {}; + (r.height = + r.paddingTop = + r.paddingBottom = + r.borderTopWidth = + r.borderBottomWidth = + "hide"), + (i.height = + i.paddingTop = + i.paddingBottom = + i.borderTopWidth = + i.borderBottomWidth = + "show"), + e.widget("ui.accordion", { + version: "1.9.2", + options: { + active: 0, + animate: {}, + collapsible: !1, + event: "click", + header: "> li > :first-child,> :not(li):even", + heightStyle: "auto", + icons: { + activeHeader: "ui-icon-triangle-1-s", + header: "ui-icon-triangle-1-e", + }, + activate: null, + beforeActivate: null, + }, + _create: function () { + var t = (this.accordionId = + "ui-accordion-" + (this.element.attr("id") || ++n)), + r = this.options; + (this.prevShow = this.prevHide = e()), + this.element.addClass("ui-accordion ui-widget ui-helper-reset"), + (this.headers = this.element + .find(r.header) + .addClass( + "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all", + )), + this._hoverable(this.headers), + this._focusable(this.headers), + this.headers + .next() + .addClass( + "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom", + ) + .hide(), + !r.collapsible && + (r.active === !1 || r.active == null) && + (r.active = 0), + r.active < 0 && (r.active += this.headers.length), + (this.active = this._findActive(r.active) + .addClass("ui-accordion-header-active ui-state-active") + .toggleClass("ui-corner-all ui-corner-top")), + this.active.next().addClass("ui-accordion-content-active").show(), + this._createIcons(), + this.refresh(), + this.element.attr("role", "tablist"), + this.headers + .attr("role", "tab") + .each(function (n) { + var r = e(this), + i = r.attr("id"), + s = r.next(), + o = s.attr("id"); + i || ((i = t + "-header-" + n), r.attr("id", i)), + o || ((o = t + "-panel-" + n), s.attr("id", o)), + r.attr("aria-controls", o), + s.attr("aria-labelledby", i); + }) + .next() + .attr("role", "tabpanel"), + this.headers + .not(this.active) + .attr({ "aria-selected": "false", tabIndex: -1 }) + .next() + .attr({ "aria-expanded": "false", "aria-hidden": "true" }) + .hide(), + this.active.length + ? this.active + .attr({ "aria-selected": "true", tabIndex: 0 }) + .next() + .attr({ "aria-expanded": "true", "aria-hidden": "false" }) + : this.headers.eq(0).attr("tabIndex", 0), + this._on(this.headers, { keydown: "_keydown" }), + this._on(this.headers.next(), { keydown: "_panelKeyDown" }), + this._setupEvents(r.event); + }, + _getCreateEventData: function () { + return { + header: this.active, + content: this.active.length ? this.active.next() : e(), + }; + }, + _createIcons: function () { + var t = this.options.icons; + t && + (e("") + .addClass("ui-accordion-header-icon ui-icon " + t.header) + .prependTo(this.headers), + this.active + .children(".ui-accordion-header-icon") + .removeClass(t.header) + .addClass(t.activeHeader), + this.headers.addClass("ui-accordion-icons")); + }, + _destroyIcons: function () { + this.headers + .removeClass("ui-accordion-icons") + .children(".ui-accordion-header-icon") + .remove(); + }, + _destroy: function () { + var e; + this.element + .removeClass("ui-accordion ui-widget ui-helper-reset") + .removeAttr("role"), + this.headers + .removeClass( + "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top", + ) + .removeAttr("role") + .removeAttr("aria-selected") + .removeAttr("aria-controls") + .removeAttr("tabIndex") + .each(function () { + /^ui-accordion/.test(this.id) && this.removeAttribute("id"); + }), + this._destroyIcons(), + (e = this.headers + .next() + .css("display", "") + .removeAttr("role") + .removeAttr("aria-expanded") + .removeAttr("aria-hidden") + .removeAttr("aria-labelledby") + .removeClass( + "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled", + ) + .each(function () { + /^ui-accordion/.test(this.id) && this.removeAttribute("id"); + })), + this.options.heightStyle !== "content" && e.css("height", ""); + }, + _setOption: function (e, t) { + if (e === "active") { + this._activate(t); + return; + } + e === "event" && + (this.options.event && this._off(this.headers, this.options.event), + this._setupEvents(t)), + this._super(e, t), + e === "collapsible" && + !t && + this.options.active === !1 && + this._activate(0), + e === "icons" && (this._destroyIcons(), t && this._createIcons()), + e === "disabled" && + this.headers + .add(this.headers.next()) + .toggleClass("ui-state-disabled", !!t); + }, + _keydown: function (t) { + if (t.altKey || t.ctrlKey) return; + var n = e.ui.keyCode, + r = this.headers.length, + i = this.headers.index(t.target), + s = !1; + switch (t.keyCode) { + case n.RIGHT: + case n.DOWN: + s = this.headers[(i + 1) % r]; + break; + case n.LEFT: + case n.UP: + s = this.headers[(i - 1 + r) % r]; + break; + case n.SPACE: + case n.ENTER: + this._eventHandler(t); + break; + case n.HOME: + s = this.headers[0]; + break; + case n.END: + s = this.headers[r - 1]; + } + s && + (e(t.target).attr("tabIndex", -1), + e(s).attr("tabIndex", 0), + s.focus(), + t.preventDefault()); + }, + _panelKeyDown: function (t) { + t.keyCode === e.ui.keyCode.UP && + t.ctrlKey && + e(t.currentTarget).prev().focus(); + }, + refresh: function () { + var t, + n, + r = this.options.heightStyle, + i = this.element.parent(); + r === "fill" + ? (e.support.minHeight || + ((n = i.css("overflow")), i.css("overflow", "hidden")), + (t = i.height()), + this.element.siblings(":visible").each(function () { + var n = e(this), + r = n.css("position"); + if (r === "absolute" || r === "fixed") return; + t -= n.outerHeight(!0); + }), + n && i.css("overflow", n), + this.headers.each(function () { + t -= e(this).outerHeight(!0); + }), + this.headers + .next() + .each(function () { + e(this).height( + Math.max(0, t - e(this).innerHeight() + e(this).height()), + ); + }) + .css("overflow", "auto")) + : r === "auto" && + ((t = 0), + this.headers + .next() + .each(function () { + t = Math.max(t, e(this).css("height", "").height()); + }) + .height(t)); + }, + _activate: function (t) { + var n = this._findActive(t)[0]; + if (n === this.active[0]) return; + (n = n || this.active[0]), + this._eventHandler({ + target: n, + currentTarget: n, + preventDefault: e.noop, + }); + }, + _findActive: function (t) { + return typeof t == "number" ? this.headers.eq(t) : e(); + }, + _setupEvents: function (t) { + var n = {}; + if (!t) return; + e.each(t.split(" "), function (e, t) { + n[t] = "_eventHandler"; + }), + this._on(this.headers, n); + }, + _eventHandler: function (t) { + var n = this.options, + r = this.active, + i = e(t.currentTarget), + s = i[0] === r[0], + o = s && n.collapsible, + u = o ? e() : i.next(), + a = r.next(), + f = { + oldHeader: r, + oldPanel: a, + newHeader: o ? e() : i, + newPanel: u, + }; + t.preventDefault(); + if ( + (s && !n.collapsible) || + this._trigger("beforeActivate", t, f) === !1 + ) + return; + (n.active = o ? !1 : this.headers.index(i)), + (this.active = s ? e() : i), + this._toggle(f), + r.removeClass("ui-accordion-header-active ui-state-active"), + n.icons && + r + .children(".ui-accordion-header-icon") + .removeClass(n.icons.activeHeader) + .addClass(n.icons.header), + s || + (i + .removeClass("ui-corner-all") + .addClass( + "ui-accordion-header-active ui-state-active ui-corner-top", + ), + n.icons && + i + .children(".ui-accordion-header-icon") + .removeClass(n.icons.header) + .addClass(n.icons.activeHeader), + i.next().addClass("ui-accordion-content-active")); + }, + _toggle: function (t) { + var n = t.newPanel, + r = this.prevShow.length ? this.prevShow : t.oldPanel; + this.prevShow.add(this.prevHide).stop(!0, !0), + (this.prevShow = n), + (this.prevHide = r), + this.options.animate + ? this._animate(n, r, t) + : (r.hide(), n.show(), this._toggleComplete(t)), + r.attr({ "aria-expanded": "false", "aria-hidden": "true" }), + r.prev().attr("aria-selected", "false"), + n.length && r.length + ? r.prev().attr("tabIndex", -1) + : n.length && + this.headers + .filter(function () { + return e(this).attr("tabIndex") === 0; + }) + .attr("tabIndex", -1), + n + .attr({ "aria-expanded": "true", "aria-hidden": "false" }) + .prev() + .attr({ "aria-selected": "true", tabIndex: 0 }); + }, + _animate: function (e, t, n) { + var s, + o, + u, + a = this, + f = 0, + l = e.length && (!t.length || e.index() < t.index()), + c = this.options.animate || {}, + h = (l && c.down) || c, + p = function () { + a._toggleComplete(n); + }; + typeof h == "number" && (u = h), + typeof h == "string" && (o = h), + (o = o || h.easing || c.easing), + (u = u || h.duration || c.duration); + if (!t.length) return e.animate(i, u, o, p); + if (!e.length) return t.animate(r, u, o, p); + (s = e.show().outerHeight()), + t.animate(r, { + duration: u, + easing: o, + step: function (e, t) { + t.now = Math.round(e); + }, + }), + e.hide().animate(i, { + duration: u, + easing: o, + complete: p, + step: function (e, n) { + (n.now = Math.round(e)), + n.prop !== "height" + ? (f += n.now) + : a.options.heightStyle !== "content" && + ((n.now = Math.round(s - t.outerHeight() - f)), (f = 0)); + }, + }); + }, + _toggleComplete: function (e) { + var t = e.oldPanel; + t + .removeClass("ui-accordion-content-active") + .prev() + .removeClass("ui-corner-top") + .addClass("ui-corner-all"), + t.length && (t.parent()[0].className = t.parent()[0].className), + this._trigger("activate", null, e); + }, + }), + e.uiBackCompat !== !1 && + ((function (e, t) { + e.extend(t.options, { + navigation: !1, + navigationFilter: function () { + return this.href.toLowerCase() === location.href.toLowerCase(); + }, + }); + var n = t._create; + t._create = function () { + if (this.options.navigation) { + var t = this, + r = this.element.find(this.options.header), + i = r.next(), + s = r.add(i).find("a").filter(this.options.navigationFilter)[0]; + s && + r.add(i).each(function (n) { + if (e.contains(this, s)) + return (t.options.active = Math.floor(n / 2)), !1; + }); + } + n.call(this); + }; + })(jQuery, jQuery.ui.accordion.prototype), + (function (e, t) { + e.extend(t.options, { + heightStyle: null, + autoHeight: !0, + clearStyle: !1, + fillSpace: !1, + }); + var n = t._create, + r = t._setOption; + e.extend(t, { + _create: function () { + (this.options.heightStyle = + this.options.heightStyle || this._mergeHeightStyle()), + n.call(this); + }, + _setOption: function (e) { + if (e === "autoHeight" || e === "clearStyle" || e === "fillSpace") + this.options.heightStyle = this._mergeHeightStyle(); + r.apply(this, arguments); + }, + _mergeHeightStyle: function () { + var e = this.options; + if (e.fillSpace) return "fill"; + if (e.clearStyle) return "content"; + if (e.autoHeight) return "auto"; + }, + }); + })(jQuery, jQuery.ui.accordion.prototype), + (function (e, t) { + e.extend(t.options.icons, { + activeHeader: null, + headerSelected: "ui-icon-triangle-1-s", + }); + var n = t._createIcons; + t._createIcons = function () { + this.options.icons && + (this.options.icons.activeHeader = + this.options.icons.activeHeader || + this.options.icons.headerSelected), + n.call(this); + }; + })(jQuery, jQuery.ui.accordion.prototype), + (function (e, t) { + t.activate = t._activate; + var n = t._findActive; + t._findActive = function (e) { + return ( + e === -1 && (e = !1), + e && + typeof e != "number" && + ((e = this.headers.index(this.headers.filter(e))), + e === -1 && (e = !1)), + n.call(this, e) + ); + }; + })(jQuery, jQuery.ui.accordion.prototype), + (jQuery.ui.accordion.prototype.resize = + jQuery.ui.accordion.prototype.refresh), + (function (e, t) { + e.extend(t.options, { change: null, changestart: null }); + var n = t._trigger; + t._trigger = function (e, t, r) { + var i = n.apply(this, arguments); + return i + ? (e === "beforeActivate" + ? (i = n.call(this, "changestart", t, { + oldHeader: r.oldHeader, + oldContent: r.oldPanel, + newHeader: r.newHeader, + newContent: r.newPanel, + })) + : e === "activate" && + (i = n.call(this, "change", t, { + oldHeader: r.oldHeader, + oldContent: r.oldPanel, + newHeader: r.newHeader, + newContent: r.newPanel, + })), + i) + : !1; + }; + })(jQuery, jQuery.ui.accordion.prototype), + (function (e, t) { + e.extend(t.options, { animate: null, animated: "slide" }); + var n = t._create; + t._create = function () { + var e = this.options; + e.animate === null && + (e.animated + ? e.animated === "slide" + ? (e.animate = 300) + : e.animated === "bounceslide" + ? (e.animate = { + duration: 200, + down: { easing: "easeOutBounce", duration: 1e3 }, + }) + : (e.animate = e.animated) + : (e.animate = !1)), + n.call(this); + }; + })(jQuery, jQuery.ui.accordion.prototype)); +})(jQuery); +(function (e, t) { + var n = 0; + e.widget("ui.autocomplete", { + version: "1.9.2", + defaultElement: "", + options: { + appendTo: "body", + autoFocus: !1, + delay: 300, + minLength: 1, + position: { my: "left top", at: "left bottom", collision: "none" }, + source: null, + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null, + }, + pending: 0, + _create: function () { + var t, n, r; + (this.isMultiLine = this._isMultiLine()), + (this.valueMethod = + this.element[this.element.is("input,textarea") ? "val" : "text"]), + (this.isNewMenu = !0), + this.element + .addClass("ui-autocomplete-input") + .attr("autocomplete", "off"), + this._on(this.element, { + keydown: function (i) { + if (this.element.prop("readOnly")) { + (t = !0), (r = !0), (n = !0); + return; + } + (t = !1), (r = !1), (n = !1); + var s = e.ui.keyCode; + switch (i.keyCode) { + case s.PAGE_UP: + (t = !0), this._move("previousPage", i); + break; + case s.PAGE_DOWN: + (t = !0), this._move("nextPage", i); + break; + case s.UP: + (t = !0), this._keyEvent("previous", i); + break; + case s.DOWN: + (t = !0), this._keyEvent("next", i); + break; + case s.ENTER: + case s.NUMPAD_ENTER: + this.menu.active && + ((t = !0), i.preventDefault(), this.menu.select(i)); + break; + case s.TAB: + this.menu.active && this.menu.select(i); + break; + case s.ESCAPE: + this.menu.element.is(":visible") && + (this._value(this.term), this.close(i), i.preventDefault()); + break; + default: + (n = !0), this._searchTimeout(i); + } + }, + keypress: function (r) { + if (t) { + (t = !1), r.preventDefault(); + return; + } + if (n) return; + var i = e.ui.keyCode; + switch (r.keyCode) { + case i.PAGE_UP: + this._move("previousPage", r); + break; + case i.PAGE_DOWN: + this._move("nextPage", r); + break; + case i.UP: + this._keyEvent("previous", r); + break; + case i.DOWN: + this._keyEvent("next", r); + } + }, + input: function (e) { + if (r) { + (r = !1), e.preventDefault(); + return; + } + this._searchTimeout(e); + }, + focus: function () { + (this.selectedItem = null), (this.previous = this._value()); + }, + blur: function (e) { + if (this.cancelBlur) { + delete this.cancelBlur; + return; + } + clearTimeout(this.searching), this.close(e), this._change(e); + }, + }), + this._initSource(), + (this.menu = e("
          " + + (o[0] > 0 && I == o[1] - 1 + ? '
          ' + : "") + : "")), + (F += U); + } + B += F; + } + return ( + (B += + x + + ($.ui.ie6 && !e.inline + ? '' + : "")), + (e._keyEvent = !1), + B + ); + }, + _generateMonthYearHeader: function (e, t, n, r, i, s, o, u) { + var a = this._get(e, "changeMonth"), + f = this._get(e, "changeYear"), + l = this._get(e, "showMonthAfterYear"), + c = '
          ', + h = ""; + if (s || !a) h += '' + o[t] + ""; + else { + var p = r && r.getFullYear() == n, + d = i && i.getFullYear() == n; + h += + '"; + } + l || (c += h + (s || !a || !f ? " " : "")); + if (!e.yearshtml) { + e.yearshtml = ""; + if (s || !f) c += '' + n + ""; + else { + var m = this._get(e, "yearRange").split(":"), + g = new Date().getFullYear(), + y = function (e) { + var t = e.match(/c[+-].*/) + ? n + parseInt(e.substring(1), 10) + : e.match(/[+-].*/) + ? g + parseInt(e, 10) + : parseInt(e, 10); + return isNaN(t) ? g : t; + }, + b = y(m[0]), + w = Math.max(b, y(m[1] || "")); + (b = r ? Math.max(b, r.getFullYear()) : b), + (w = i ? Math.min(w, i.getFullYear()) : w), + (e.yearshtml += + '"), + (c += e.yearshtml), + (e.yearshtml = null); + } + } + return ( + (c += this._get(e, "yearSuffix")), + l && (c += (s || !a || !f ? " " : "") + h), + (c += "
          "), + c + ); + }, + _adjustInstDate: function (e, t, n) { + var r = e.drawYear + (n == "Y" ? t : 0), + i = e.drawMonth + (n == "M" ? t : 0), + s = + Math.min(e.selectedDay, this._getDaysInMonth(r, i)) + + (n == "D" ? t : 0), + o = this._restrictMinMax( + e, + this._daylightSavingAdjust(new Date(r, i, s)), + ); + (e.selectedDay = o.getDate()), + (e.drawMonth = e.selectedMonth = o.getMonth()), + (e.drawYear = e.selectedYear = o.getFullYear()), + (n == "M" || n == "Y") && this._notifyChange(e); + }, + _restrictMinMax: function (e, t) { + var n = this._getMinMaxDate(e, "min"), + r = this._getMinMaxDate(e, "max"), + i = n && t < n ? n : t; + return (i = r && i > r ? r : i), i; + }, + _notifyChange: function (e) { + var t = this._get(e, "onChangeMonthYear"); + t && + t.apply(e.input ? e.input[0] : null, [ + e.selectedYear, + e.selectedMonth + 1, + e, + ]); + }, + _getNumberOfMonths: function (e) { + var t = this._get(e, "numberOfMonths"); + return t == null ? [1, 1] : typeof t == "number" ? [1, t] : t; + }, + _getMinMaxDate: function (e, t) { + return this._determineDate(e, this._get(e, t + "Date"), null); + }, + _getDaysInMonth: function (e, t) { + return 32 - this._daylightSavingAdjust(new Date(e, t, 32)).getDate(); + }, + _getFirstDayOfMonth: function (e, t) { + return new Date(e, t, 1).getDay(); + }, + _canAdjustMonth: function (e, t, n, r) { + var i = this._getNumberOfMonths(e), + s = this._daylightSavingAdjust( + new Date(n, r + (t < 0 ? t : i[0] * i[1]), 1), + ); + return ( + t < 0 && s.setDate(this._getDaysInMonth(s.getFullYear(), s.getMonth())), + this._isInRange(e, s) + ); + }, + _isInRange: function (e, t) { + var n = this._getMinMaxDate(e, "min"), + r = this._getMinMaxDate(e, "max"); + return ( + (!n || t.getTime() >= n.getTime()) && (!r || t.getTime() <= r.getTime()) + ); + }, + _getFormatConfig: function (e) { + var t = this._get(e, "shortYearCutoff"); + return ( + (t = + typeof t != "string" + ? t + : (new Date().getFullYear() % 100) + parseInt(t, 10)), + { + shortYearCutoff: t, + dayNamesShort: this._get(e, "dayNamesShort"), + dayNames: this._get(e, "dayNames"), + monthNamesShort: this._get(e, "monthNamesShort"), + monthNames: this._get(e, "monthNames"), + } + ); + }, + _formatDate: function (e, t, n, r) { + t || + ((e.currentDay = e.selectedDay), + (e.currentMonth = e.selectedMonth), + (e.currentYear = e.selectedYear)); + var i = t + ? typeof t == "object" + ? t + : this._daylightSavingAdjust(new Date(r, n, t)) + : this._daylightSavingAdjust( + new Date(e.currentYear, e.currentMonth, e.currentDay), + ); + return this.formatDate( + this._get(e, "dateFormat"), + i, + this._getFormatConfig(e), + ); + }, + }), + ($.fn.datepicker = function (e) { + if (!this.length) return this; + $.datepicker.initialized || + ($(document) + .mousedown($.datepicker._checkExternalClick) + .find(document.body) + .append($.datepicker.dpDiv), + ($.datepicker.initialized = !0)); + var t = Array.prototype.slice.call(arguments, 1); + return typeof e != "string" || + (e != "isDisabled" && e != "getDate" && e != "widget") + ? e == "option" && + arguments.length == 2 && + typeof arguments[1] == "string" + ? $.datepicker["_" + e + "Datepicker"].apply( + $.datepicker, + [this[0]].concat(t), + ) + : this.each(function () { + typeof e == "string" + ? $.datepicker["_" + e + "Datepicker"].apply( + $.datepicker, + [this].concat(t), + ) + : $.datepicker._attachDatepicker(this, e); + }) + : $.datepicker["_" + e + "Datepicker"].apply( + $.datepicker, + [this[0]].concat(t), + ); + }), + ($.datepicker = new Datepicker()), + ($.datepicker.initialized = !1), + ($.datepicker.uuid = new Date().getTime()), + ($.datepicker.version = "1.9.2"), + (window["DP_jQuery_" + dpuuid] = $); +})(jQuery); +(function (e, t) { + var n = "ui-dialog ui-widget ui-widget-content ui-corner-all ", + r = { + buttons: !0, + height: !0, + maxHeight: !0, + maxWidth: !0, + minHeight: !0, + minWidth: !0, + width: !0, + }, + i = { maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0 }; + e.widget("ui.dialog", { + version: "1.9.2", + options: { + autoOpen: !0, + buttons: {}, + closeOnEscape: !0, + closeText: "close", + dialogClass: "", + draggable: !0, + hide: null, + height: "auto", + maxHeight: !1, + maxWidth: !1, + minHeight: 150, + minWidth: 150, + modal: !1, + position: { + my: "center", + at: "center", + of: window, + collision: "fit", + using: function (t) { + var n = e(this).css(t).offset().top; + n < 0 && e(this).css("top", t.top - n); + }, + }, + resizable: !0, + show: null, + stack: !0, + title: "", + width: 300, + zIndex: 1e3, + }, + _create: function () { + (this.originalTitle = this.element.attr("title")), + typeof this.originalTitle != "string" && (this.originalTitle = ""), + (this.oldPosition = { + parent: this.element.parent(), + index: this.element.parent().children().index(this.element), + }), + (this.options.title = this.options.title || this.originalTitle); + var t = this, + r = this.options, + i = r.title || " ", + s, + o, + u, + a, + f; + (s = (this.uiDialog = e("
          ")) + .addClass(n + r.dialogClass) + .css({ display: "none", outline: 0, zIndex: r.zIndex }) + .attr("tabIndex", -1) + .keydown(function (n) { + r.closeOnEscape && + !n.isDefaultPrevented() && + n.keyCode && + n.keyCode === e.ui.keyCode.ESCAPE && + (t.close(n), n.preventDefault()); + }) + .mousedown(function (e) { + t.moveToTop(!1, e); + }) + .appendTo("body")), + this.element + .show() + .removeAttr("title") + .addClass("ui-dialog-content ui-widget-content") + .appendTo(s), + (o = (this.uiDialogTitlebar = e("
          ")) + .addClass( + "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix", + ) + .bind("mousedown", function () { + s.focus(); + }) + .prependTo(s)), + (u = e("") + .addClass("ui-dialog-titlebar-close ui-corner-all") + .attr("role", "button") + .click(function (e) { + e.preventDefault(), t.close(e); + }) + .appendTo(o)), + (this.uiDialogTitlebarCloseText = e("")) + .addClass("ui-icon ui-icon-closethick") + .text(r.closeText) + .appendTo(u), + (a = e("") + .uniqueId() + .addClass("ui-dialog-title") + .html(i) + .prependTo(o)), + (f = (this.uiDialogButtonPane = e("
          ")).addClass( + "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix", + )), + (this.uiButtonSet = e("
          ")) + .addClass("ui-dialog-buttonset") + .appendTo(f), + s.attr({ role: "dialog", "aria-labelledby": a.attr("id") }), + o.find("*").add(o).disableSelection(), + this._hoverable(u), + this._focusable(u), + r.draggable && e.fn.draggable && this._makeDraggable(), + r.resizable && e.fn.resizable && this._makeResizable(), + this._createButtons(r.buttons), + (this._isOpen = !1), + e.fn.bgiframe && s.bgiframe(), + this._on(s, { + keydown: function (t) { + if (!r.modal || t.keyCode !== e.ui.keyCode.TAB) return; + var n = e(":tabbable", s), + i = n.filter(":first"), + o = n.filter(":last"); + if (t.target === o[0] && !t.shiftKey) return i.focus(1), !1; + if (t.target === i[0] && t.shiftKey) return o.focus(1), !1; + }, + }); + }, + _init: function () { + this.options.autoOpen && this.open(); + }, + _destroy: function () { + var e, + t = this.oldPosition; + this.overlay && this.overlay.destroy(), + this.uiDialog.hide(), + this.element + .removeClass("ui-dialog-content ui-widget-content") + .hide() + .appendTo("body"), + this.uiDialog.remove(), + this.originalTitle && this.element.attr("title", this.originalTitle), + (e = t.parent.children().eq(t.index)), + e.length && e[0] !== this.element[0] + ? e.before(this.element) + : t.parent.append(this.element); + }, + widget: function () { + return this.uiDialog; + }, + close: function (t) { + var n = this, + r, + i; + if (!this._isOpen) return; + if (!1 === this._trigger("beforeClose", t)) return; + return ( + (this._isOpen = !1), + this.overlay && this.overlay.destroy(), + this.options.hide + ? this._hide(this.uiDialog, this.options.hide, function () { + n._trigger("close", t); + }) + : (this.uiDialog.hide(), this._trigger("close", t)), + e.ui.dialog.overlay.resize(), + this.options.modal && + ((r = 0), + e(".ui-dialog").each(function () { + this !== n.uiDialog[0] && + ((i = e(this).css("z-index")), isNaN(i) || (r = Math.max(r, i))); + }), + (e.ui.dialog.maxZ = r)), + this + ); + }, + isOpen: function () { + return this._isOpen; + }, + moveToTop: function (t, n) { + var r = this.options, + i; + return (r.modal && !t) || (!r.stack && !r.modal) + ? this._trigger("focus", n) + : (r.zIndex > e.ui.dialog.maxZ && (e.ui.dialog.maxZ = r.zIndex), + this.overlay && + ((e.ui.dialog.maxZ += 1), + (e.ui.dialog.overlay.maxZ = e.ui.dialog.maxZ), + this.overlay.$el.css("z-index", e.ui.dialog.overlay.maxZ)), + (i = { + scrollTop: this.element.scrollTop(), + scrollLeft: this.element.scrollLeft(), + }), + (e.ui.dialog.maxZ += 1), + this.uiDialog.css("z-index", e.ui.dialog.maxZ), + this.element.attr(i), + this._trigger("focus", n), + this); + }, + open: function () { + if (this._isOpen) return; + var t, + n = this.options, + r = this.uiDialog; + return ( + this._size(), + this._position(n.position), + r.show(n.show), + (this.overlay = n.modal ? new e.ui.dialog.overlay(this) : null), + this.moveToTop(!0), + (t = this.element.find(":tabbable")), + t.length || + ((t = this.uiDialogButtonPane.find(":tabbable")), + t.length || (t = r)), + t.eq(0).focus(), + (this._isOpen = !0), + this._trigger("open"), + this + ); + }, + _createButtons: function (t) { + var n = this, + r = !1; + this.uiDialogButtonPane.remove(), + this.uiButtonSet.empty(), + typeof t == "object" && + t !== null && + e.each(t, function () { + return !(r = !0); + }), + r + ? (e.each(t, function (t, r) { + var i, s; + (r = e.isFunction(r) ? { click: r, text: t } : r), + (r = e.extend({ type: "button" }, r)), + (s = r.click), + (r.click = function () { + s.apply(n.element[0], arguments); + }), + (i = e("", r).appendTo(n.uiButtonSet)), + e.fn.button && i.button(); + }), + this.uiDialog.addClass("ui-dialog-buttons"), + this.uiDialogButtonPane.appendTo(this.uiDialog)) + : this.uiDialog.removeClass("ui-dialog-buttons"); + }, + _makeDraggable: function () { + function r(e) { + return { position: e.position, offset: e.offset }; + } + var t = this, + n = this.options; + this.uiDialog.draggable({ + cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", + handle: ".ui-dialog-titlebar", + containment: "document", + start: function (n, i) { + e(this).addClass("ui-dialog-dragging"), + t._trigger("dragStart", n, r(i)); + }, + drag: function (e, n) { + t._trigger("drag", e, r(n)); + }, + stop: function (i, s) { + (n.position = [ + s.position.left - t.document.scrollLeft(), + s.position.top - t.document.scrollTop(), + ]), + e(this).removeClass("ui-dialog-dragging"), + t._trigger("dragStop", i, r(s)), + e.ui.dialog.overlay.resize(); + }, + }); + }, + _makeResizable: function (n) { + function u(e) { + return { + originalPosition: e.originalPosition, + originalSize: e.originalSize, + position: e.position, + size: e.size, + }; + } + n = n === t ? this.options.resizable : n; + var r = this, + i = this.options, + s = this.uiDialog.css("position"), + o = typeof n == "string" ? n : "n,e,s,w,se,sw,ne,nw"; + this.uiDialog + .resizable({ + cancel: ".ui-dialog-content", + containment: "document", + alsoResize: this.element, + maxWidth: i.maxWidth, + maxHeight: i.maxHeight, + minWidth: i.minWidth, + minHeight: this._minHeight(), + handles: o, + start: function (t, n) { + e(this).addClass("ui-dialog-resizing"), + r._trigger("resizeStart", t, u(n)); + }, + resize: function (e, t) { + r._trigger("resize", e, u(t)); + }, + stop: function (t, n) { + e(this).removeClass("ui-dialog-resizing"), + (i.height = e(this).height()), + (i.width = e(this).width()), + r._trigger("resizeStop", t, u(n)), + e.ui.dialog.overlay.resize(); + }, + }) + .css("position", s) + .find(".ui-resizable-se") + .addClass("ui-icon ui-icon-grip-diagonal-se"); + }, + _minHeight: function () { + var e = this.options; + return e.height === "auto" + ? e.minHeight + : Math.min(e.minHeight, e.height); + }, + _position: function (t) { + var n = [], + r = [0, 0], + i; + if (t) { + if (typeof t == "string" || (typeof t == "object" && "0" in t)) + (n = t.split ? t.split(" ") : [t[0], t[1]]), + n.length === 1 && (n[1] = n[0]), + e.each(["left", "top"], function (e, t) { + +n[e] === n[e] && ((r[e] = n[e]), (n[e] = t)); + }), + (t = { + my: + n[0] + + (r[0] < 0 ? r[0] : "+" + r[0]) + + " " + + n[1] + + (r[1] < 0 ? r[1] : "+" + r[1]), + at: n.join(" "), + }); + t = e.extend({}, e.ui.dialog.prototype.options.position, t); + } else t = e.ui.dialog.prototype.options.position; + (i = this.uiDialog.is(":visible")), + i || this.uiDialog.show(), + this.uiDialog.position(t), + i || this.uiDialog.hide(); + }, + _setOptions: function (t) { + var n = this, + s = {}, + o = !1; + e.each(t, function (e, t) { + n._setOption(e, t), e in r && (o = !0), e in i && (s[e] = t); + }), + o && this._size(), + this.uiDialog.is(":data(resizable)") && + this.uiDialog.resizable("option", s); + }, + _setOption: function (t, r) { + var i, + s, + o = this.uiDialog; + switch (t) { + case "buttons": + this._createButtons(r); + break; + case "closeText": + this.uiDialogTitlebarCloseText.text("" + r); + break; + case "dialogClass": + o.removeClass(this.options.dialogClass).addClass(n + r); + break; + case "disabled": + r + ? o.addClass("ui-dialog-disabled") + : o.removeClass("ui-dialog-disabled"); + break; + case "draggable": + (i = o.is(":data(draggable)")), + i && !r && o.draggable("destroy"), + !i && r && this._makeDraggable(); + break; + case "position": + this._position(r); + break; + case "resizable": + (s = o.is(":data(resizable)")), + s && !r && o.resizable("destroy"), + s && typeof r == "string" && o.resizable("option", "handles", r), + !s && r !== !1 && this._makeResizable(r); + break; + case "title": + e(".ui-dialog-title", this.uiDialogTitlebar).html( + "" + (r || " "), + ); + } + this._super(t, r); + }, + _size: function () { + var t, + n, + r, + i = this.options, + s = this.uiDialog.is(":visible"); + this.element.show().css({ width: "auto", minHeight: 0, height: 0 }), + i.minWidth > i.width && (i.width = i.minWidth), + (t = this.uiDialog + .css({ height: "auto", width: i.width }) + .outerHeight()), + (n = Math.max(0, i.minHeight - t)), + i.height === "auto" + ? e.support.minHeight + ? this.element.css({ minHeight: n, height: "auto" }) + : (this.uiDialog.show(), + (r = this.element.css("height", "auto").height()), + s || this.uiDialog.hide(), + this.element.height(Math.max(r, n))) + : this.element.height(Math.max(i.height - t, 0)), + this.uiDialog.is(":data(resizable)") && + this.uiDialog.resizable("option", "minHeight", this._minHeight()); + }, + }), + e.extend(e.ui.dialog, { + uuid: 0, + maxZ: 0, + getTitleId: function (e) { + var t = e.attr("id"); + return t || ((this.uuid += 1), (t = this.uuid)), "ui-dialog-title-" + t; + }, + overlay: function (t) { + this.$el = e.ui.dialog.overlay.create(t); + }, + }), + e.extend(e.ui.dialog.overlay, { + instances: [], + oldInstances: [], + maxZ: 0, + events: e + .map( + "focus,mousedown,mouseup,keydown,keypress,click".split(","), + function (e) { + return e + ".dialog-overlay"; + }, + ) + .join(" "), + create: function (t) { + this.instances.length === 0 && + (setTimeout(function () { + e.ui.dialog.overlay.instances.length && + e(document).bind(e.ui.dialog.overlay.events, function (t) { + if (e(t.target).zIndex() < e.ui.dialog.overlay.maxZ) return !1; + }); + }, 1), + e(window).bind("resize.dialog-overlay", e.ui.dialog.overlay.resize)); + var n = + this.oldInstances.pop() || e("
          ").addClass("ui-widget-overlay"); + return ( + e(document).bind("keydown.dialog-overlay", function (r) { + var i = e.ui.dialog.overlay.instances; + i.length !== 0 && + i[i.length - 1] === n && + t.options.closeOnEscape && + !r.isDefaultPrevented() && + r.keyCode && + r.keyCode === e.ui.keyCode.ESCAPE && + (t.close(r), r.preventDefault()); + }), + n + .appendTo(document.body) + .css({ width: this.width(), height: this.height() }), + e.fn.bgiframe && n.bgiframe(), + this.instances.push(n), + n + ); + }, + destroy: function (t) { + var n = e.inArray(t, this.instances), + r = 0; + n !== -1 && this.oldInstances.push(this.instances.splice(n, 1)[0]), + this.instances.length === 0 && + e([document, window]).unbind(".dialog-overlay"), + t.height(0).width(0).remove(), + e.each(this.instances, function () { + r = Math.max(r, this.css("z-index")); + }), + (this.maxZ = r); + }, + height: function () { + var t, n; + return e.ui.ie + ? ((t = Math.max( + document.documentElement.scrollHeight, + document.body.scrollHeight, + )), + (n = Math.max( + document.documentElement.offsetHeight, + document.body.offsetHeight, + )), + t < n ? e(window).height() + "px" : t + "px") + : e(document).height() + "px"; + }, + width: function () { + var t, n; + return e.ui.ie + ? ((t = Math.max( + document.documentElement.scrollWidth, + document.body.scrollWidth, + )), + (n = Math.max( + document.documentElement.offsetWidth, + document.body.offsetWidth, + )), + t < n ? e(window).width() + "px" : t + "px") + : e(document).width() + "px"; + }, + resize: function () { + var t = e([]); + e.each(e.ui.dialog.overlay.instances, function () { + t = t.add(this); + }), + t.css({ width: 0, height: 0 }).css({ + width: e.ui.dialog.overlay.width(), + height: e.ui.dialog.overlay.height(), + }); + }, + }), + e.extend(e.ui.dialog.overlay.prototype, { + destroy: function () { + e.ui.dialog.overlay.destroy(this.$el); + }, + }); +})(jQuery); +(function (e, t) { + e.widget("ui.draggable", e.ui.mouse, { + version: "1.9.2", + widgetEventPrefix: "drag", + options: { + addClasses: !0, + appendTo: "parent", + axis: !1, + connectToSortable: !1, + containment: !1, + cursor: "auto", + cursorAt: !1, + grid: !1, + handle: !1, + helper: "original", + iframeFix: !1, + opacity: !1, + refreshPositions: !1, + revert: !1, + revertDuration: 500, + scope: "default", + scroll: !0, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: !1, + snapMode: "both", + snapTolerance: 20, + stack: !1, + zIndex: !1, + }, + _create: function () { + this.options.helper == "original" && + !/^(?:r|a|f)/.test(this.element.css("position")) && + (this.element[0].style.position = "relative"), + this.options.addClasses && this.element.addClass("ui-draggable"), + this.options.disabled && this.element.addClass("ui-draggable-disabled"), + this._mouseInit(); + }, + _destroy: function () { + this.element.removeClass( + "ui-draggable ui-draggable-dragging ui-draggable-disabled", + ), + this._mouseDestroy(); + }, + _mouseCapture: function (t) { + var n = this.options; + return this.helper || n.disabled || e(t.target).is(".ui-resizable-handle") + ? !1 + : ((this.handle = this._getHandle(t)), + this.handle + ? (e(n.iframeFix === !0 ? "iframe" : n.iframeFix).each(function () { + e( + '
          ', + ) + .css({ + width: this.offsetWidth + "px", + height: this.offsetHeight + "px", + position: "absolute", + opacity: "0.001", + zIndex: 1e3, + }) + .css(e(this).offset()) + .appendTo("body"); + }), + !0) + : !1); + }, + _mouseStart: function (t) { + var n = this.options; + return ( + (this.helper = this._createHelper(t)), + this.helper.addClass("ui-draggable-dragging"), + this._cacheHelperProportions(), + e.ui.ddmanager && (e.ui.ddmanager.current = this), + this._cacheMargins(), + (this.cssPosition = this.helper.css("position")), + (this.scrollParent = this.helper.scrollParent()), + (this.offset = this.positionAbs = this.element.offset()), + (this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left, + }), + e.extend(this.offset, { + click: { + left: t.pageX - this.offset.left, + top: t.pageY - this.offset.top, + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset(), + }), + (this.originalPosition = this.position = this._generatePosition(t)), + (this.originalPageX = t.pageX), + (this.originalPageY = t.pageY), + n.cursorAt && this._adjustOffsetFromHelper(n.cursorAt), + n.containment && this._setContainment(), + this._trigger("start", t) === !1 + ? (this._clear(), !1) + : (this._cacheHelperProportions(), + e.ui.ddmanager && + !n.dropBehaviour && + e.ui.ddmanager.prepareOffsets(this, t), + this._mouseDrag(t, !0), + e.ui.ddmanager && e.ui.ddmanager.dragStart(this, t), + !0) + ); + }, + _mouseDrag: function (t, n) { + (this.position = this._generatePosition(t)), + (this.positionAbs = this._convertPositionTo("absolute")); + if (!n) { + var r = this._uiHash(); + if (this._trigger("drag", t, r) === !1) return this._mouseUp({}), !1; + this.position = r.position; + } + if (!this.options.axis || this.options.axis != "y") + this.helper[0].style.left = this.position.left + "px"; + if (!this.options.axis || this.options.axis != "x") + this.helper[0].style.top = this.position.top + "px"; + return e.ui.ddmanager && e.ui.ddmanager.drag(this, t), !1; + }, + _mouseStop: function (t) { + var n = !1; + e.ui.ddmanager && + !this.options.dropBehaviour && + (n = e.ui.ddmanager.drop(this, t)), + this.dropped && ((n = this.dropped), (this.dropped = !1)); + var r = this.element[0], + i = !1; + while (r && (r = r.parentNode)) r == document && (i = !0); + if (!i && this.options.helper === "original") return !1; + if ( + (this.options.revert == "invalid" && !n) || + (this.options.revert == "valid" && n) || + this.options.revert === !0 || + (e.isFunction(this.options.revert) && + this.options.revert.call(this.element, n)) + ) { + var s = this; + e(this.helper).animate( + this.originalPosition, + parseInt(this.options.revertDuration, 10), + function () { + s._trigger("stop", t) !== !1 && s._clear(); + }, + ); + } else this._trigger("stop", t) !== !1 && this._clear(); + return !1; + }, + _mouseUp: function (t) { + return ( + e("div.ui-draggable-iframeFix").each(function () { + this.parentNode.removeChild(this); + }), + e.ui.ddmanager && e.ui.ddmanager.dragStop(this, t), + e.ui.mouse.prototype._mouseUp.call(this, t) + ); + }, + cancel: function () { + return ( + this.helper.is(".ui-draggable-dragging") + ? this._mouseUp({}) + : this._clear(), + this + ); + }, + _getHandle: function (t) { + var n = + !this.options.handle || !e(this.options.handle, this.element).length + ? !0 + : !1; + return ( + e(this.options.handle, this.element) + .find("*") + .andSelf() + .each(function () { + this == t.target && (n = !0); + }), + n + ); + }, + _createHelper: function (t) { + var n = this.options, + r = e.isFunction(n.helper) + ? e(n.helper.apply(this.element[0], [t])) + : n.helper == "clone" + ? this.element.clone().removeAttr("id") + : this.element; + return ( + r.parents("body").length || + r.appendTo( + n.appendTo == "parent" ? this.element[0].parentNode : n.appendTo, + ), + r[0] != this.element[0] && + !/(fixed|absolute)/.test(r.css("position")) && + r.css("position", "absolute"), + r + ); + }, + _adjustOffsetFromHelper: function (t) { + typeof t == "string" && (t = t.split(" ")), + e.isArray(t) && (t = { left: +t[0], top: +t[1] || 0 }), + "left" in t && (this.offset.click.left = t.left + this.margins.left), + "right" in t && + (this.offset.click.left = + this.helperProportions.width - t.right + this.margins.left), + "top" in t && (this.offset.click.top = t.top + this.margins.top), + "bottom" in t && + (this.offset.click.top = + this.helperProportions.height - t.bottom + this.margins.top); + }, + _getParentOffset: function () { + this.offsetParent = this.helper.offsetParent(); + var t = this.offsetParent.offset(); + this.cssPosition == "absolute" && + this.scrollParent[0] != document && + e.contains(this.scrollParent[0], this.offsetParent[0]) && + ((t.left += this.scrollParent.scrollLeft()), + (t.top += this.scrollParent.scrollTop())); + if ( + this.offsetParent[0] == document.body || + (this.offsetParent[0].tagName && + this.offsetParent[0].tagName.toLowerCase() == "html" && + e.ui.ie) + ) + t = { top: 0, left: 0 }; + return { + top: + t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), + left: + t.left + + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0), + }; + }, + _getRelativeOffset: function () { + if (this.cssPosition == "relative") { + var e = this.element.position(); + return { + top: + e.top - + (parseInt(this.helper.css("top"), 10) || 0) + + this.scrollParent.scrollTop(), + left: + e.left - + (parseInt(this.helper.css("left"), 10) || 0) + + this.scrollParent.scrollLeft(), + }; + } + return { top: 0, left: 0 }; + }, + _cacheMargins: function () { + this.margins = { + left: parseInt(this.element.css("marginLeft"), 10) || 0, + top: parseInt(this.element.css("marginTop"), 10) || 0, + right: parseInt(this.element.css("marginRight"), 10) || 0, + bottom: parseInt(this.element.css("marginBottom"), 10) || 0, + }; + }, + _cacheHelperProportions: function () { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight(), + }; + }, + _setContainment: function () { + var t = this.options; + t.containment == "parent" && (t.containment = this.helper[0].parentNode); + if (t.containment == "document" || t.containment == "window") + this.containment = [ + t.containment == "document" + ? 0 + : e(window).scrollLeft() - + this.offset.relative.left - + this.offset.parent.left, + t.containment == "document" + ? 0 + : e(window).scrollTop() - + this.offset.relative.top - + this.offset.parent.top, + (t.containment == "document" ? 0 : e(window).scrollLeft()) + + e(t.containment == "document" ? document : window).width() - + this.helperProportions.width - + this.margins.left, + (t.containment == "document" ? 0 : e(window).scrollTop()) + + (e(t.containment == "document" ? document : window).height() || + document.body.parentNode.scrollHeight) - + this.helperProportions.height - + this.margins.top, + ]; + if ( + !/^(document|window|parent)$/.test(t.containment) && + t.containment.constructor != Array + ) { + var n = e(t.containment), + r = n[0]; + if (!r) return; + var i = n.offset(), + s = e(r).css("overflow") != "hidden"; + (this.containment = [ + (parseInt(e(r).css("borderLeftWidth"), 10) || 0) + + (parseInt(e(r).css("paddingLeft"), 10) || 0), + (parseInt(e(r).css("borderTopWidth"), 10) || 0) + + (parseInt(e(r).css("paddingTop"), 10) || 0), + (s ? Math.max(r.scrollWidth, r.offsetWidth) : r.offsetWidth) - + (parseInt(e(r).css("borderLeftWidth"), 10) || 0) - + (parseInt(e(r).css("paddingRight"), 10) || 0) - + this.helperProportions.width - + this.margins.left - + this.margins.right, + (s ? Math.max(r.scrollHeight, r.offsetHeight) : r.offsetHeight) - + (parseInt(e(r).css("borderTopWidth"), 10) || 0) - + (parseInt(e(r).css("paddingBottom"), 10) || 0) - + this.helperProportions.height - + this.margins.top - + this.margins.bottom, + ]), + (this.relative_container = n); + } else + t.containment.constructor == Array && + (this.containment = t.containment); + }, + _convertPositionTo: function (t, n) { + n || (n = this.position); + var r = t == "absolute" ? 1 : -1, + i = this.options, + s = + this.cssPosition != "absolute" || + (this.scrollParent[0] != document && + !!e.contains(this.scrollParent[0], this.offsetParent[0])) + ? this.scrollParent + : this.offsetParent, + o = /(html|body)/i.test(s[0].tagName); + return { + top: + n.top + + this.offset.relative.top * r + + this.offset.parent.top * r - + (this.cssPosition == "fixed" + ? -this.scrollParent.scrollTop() + : o + ? 0 + : s.scrollTop()) * + r, + left: + n.left + + this.offset.relative.left * r + + this.offset.parent.left * r - + (this.cssPosition == "fixed" + ? -this.scrollParent.scrollLeft() + : o + ? 0 + : s.scrollLeft()) * + r, + }; + }, + _generatePosition: function (t) { + var n = this.options, + r = + this.cssPosition != "absolute" || + (this.scrollParent[0] != document && + !!e.contains(this.scrollParent[0], this.offsetParent[0])) + ? this.scrollParent + : this.offsetParent, + i = /(html|body)/i.test(r[0].tagName), + s = t.pageX, + o = t.pageY; + if (this.originalPosition) { + var u; + if (this.containment) { + if (this.relative_container) { + var a = this.relative_container.offset(); + u = [ + this.containment[0] + a.left, + this.containment[1] + a.top, + this.containment[2] + a.left, + this.containment[3] + a.top, + ]; + } else u = this.containment; + t.pageX - this.offset.click.left < u[0] && + (s = u[0] + this.offset.click.left), + t.pageY - this.offset.click.top < u[1] && + (o = u[1] + this.offset.click.top), + t.pageX - this.offset.click.left > u[2] && + (s = u[2] + this.offset.click.left), + t.pageY - this.offset.click.top > u[3] && + (o = u[3] + this.offset.click.top); + } + if (n.grid) { + var f = n.grid[1] + ? this.originalPageY + + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1] + : this.originalPageY; + o = u + ? f - this.offset.click.top < u[1] || + f - this.offset.click.top > u[3] + ? f - this.offset.click.top < u[1] + ? f + n.grid[1] + : f - n.grid[1] + : f + : f; + var l = n.grid[0] + ? this.originalPageX + + Math.round((s - this.originalPageX) / n.grid[0]) * n.grid[0] + : this.originalPageX; + s = u + ? l - this.offset.click.left < u[0] || + l - this.offset.click.left > u[2] + ? l - this.offset.click.left < u[0] + ? l + n.grid[0] + : l - n.grid[0] + : l + : l; + } + } + return { + top: + o - + this.offset.click.top - + this.offset.relative.top - + this.offset.parent.top + + (this.cssPosition == "fixed" + ? -this.scrollParent.scrollTop() + : i + ? 0 + : r.scrollTop()), + left: + s - + this.offset.click.left - + this.offset.relative.left - + this.offset.parent.left + + (this.cssPosition == "fixed" + ? -this.scrollParent.scrollLeft() + : i + ? 0 + : r.scrollLeft()), + }; + }, + _clear: function () { + this.helper.removeClass("ui-draggable-dragging"), + this.helper[0] != this.element[0] && + !this.cancelHelperRemoval && + this.helper.remove(), + (this.helper = null), + (this.cancelHelperRemoval = !1); + }, + _trigger: function (t, n, r) { + return ( + (r = r || this._uiHash()), + e.ui.plugin.call(this, t, [n, r]), + t == "drag" && (this.positionAbs = this._convertPositionTo("absolute")), + e.Widget.prototype._trigger.call(this, t, n, r) + ); + }, + plugins: {}, + _uiHash: function (e) { + return { + helper: this.helper, + position: this.position, + originalPosition: this.originalPosition, + offset: this.positionAbs, + }; + }, + }), + e.ui.plugin.add("draggable", "connectToSortable", { + start: function (t, n) { + var r = e(this).data("draggable"), + i = r.options, + s = e.extend({}, n, { item: r.element }); + (r.sortables = []), + e(i.connectToSortable).each(function () { + var n = e.data(this, "sortable"); + n && + !n.options.disabled && + (r.sortables.push({ + instance: n, + shouldRevert: n.options.revert, + }), + n.refreshPositions(), + n._trigger("activate", t, s)); + }); + }, + stop: function (t, n) { + var r = e(this).data("draggable"), + i = e.extend({}, n, { item: r.element }); + e.each(r.sortables, function () { + this.instance.isOver + ? ((this.instance.isOver = 0), + (r.cancelHelperRemoval = !0), + (this.instance.cancelHelperRemoval = !1), + this.shouldRevert && (this.instance.options.revert = !0), + this.instance._mouseStop(t), + (this.instance.options.helper = this.instance.options._helper), + r.options.helper == "original" && + this.instance.currentItem.css({ top: "auto", left: "auto" })) + : ((this.instance.cancelHelperRemoval = !1), + this.instance._trigger("deactivate", t, i)); + }); + }, + drag: function (t, n) { + var r = e(this).data("draggable"), + i = this, + s = function (t) { + var n = this.offset.click.top, + r = this.offset.click.left, + i = this.positionAbs.top, + s = this.positionAbs.left, + o = t.height, + u = t.width, + a = t.top, + f = t.left; + return e.ui.isOver(i + n, s + r, a, f, o, u); + }; + e.each(r.sortables, function (s) { + var o = !1, + u = this; + (this.instance.positionAbs = r.positionAbs), + (this.instance.helperProportions = r.helperProportions), + (this.instance.offset.click = r.offset.click), + this.instance._intersectsWith(this.instance.containerCache) && + ((o = !0), + e.each(r.sortables, function () { + return ( + (this.instance.positionAbs = r.positionAbs), + (this.instance.helperProportions = r.helperProportions), + (this.instance.offset.click = r.offset.click), + this != u && + this.instance._intersectsWith( + this.instance.containerCache, + ) && + e.ui.contains( + u.instance.element[0], + this.instance.element[0], + ) && + (o = !1), + o + ); + })), + o + ? (this.instance.isOver || + ((this.instance.isOver = 1), + (this.instance.currentItem = e(i) + .clone() + .removeAttr("id") + .appendTo(this.instance.element) + .data("sortable-item", !0)), + (this.instance.options._helper = + this.instance.options.helper), + (this.instance.options.helper = function () { + return n.helper[0]; + }), + (t.target = this.instance.currentItem[0]), + this.instance._mouseCapture(t, !0), + this.instance._mouseStart(t, !0, !0), + (this.instance.offset.click.top = r.offset.click.top), + (this.instance.offset.click.left = r.offset.click.left), + (this.instance.offset.parent.left -= + r.offset.parent.left - this.instance.offset.parent.left), + (this.instance.offset.parent.top -= + r.offset.parent.top - this.instance.offset.parent.top), + r._trigger("toSortable", t), + (r.dropped = this.instance.element), + (r.currentItem = r.element), + (this.instance.fromOutside = r)), + this.instance.currentItem && this.instance._mouseDrag(t)) + : this.instance.isOver && + ((this.instance.isOver = 0), + (this.instance.cancelHelperRemoval = !0), + (this.instance.options.revert = !1), + this.instance._trigger( + "out", + t, + this.instance._uiHash(this.instance), + ), + this.instance._mouseStop(t, !0), + (this.instance.options.helper = this.instance.options._helper), + this.instance.currentItem.remove(), + this.instance.placeholder && this.instance.placeholder.remove(), + r._trigger("fromSortable", t), + (r.dropped = !1)); + }); + }, + }), + e.ui.plugin.add("draggable", "cursor", { + start: function (t, n) { + var r = e("body"), + i = e(this).data("draggable").options; + r.css("cursor") && (i._cursor = r.css("cursor")), + r.css("cursor", i.cursor); + }, + stop: function (t, n) { + var r = e(this).data("draggable").options; + r._cursor && e("body").css("cursor", r._cursor); + }, + }), + e.ui.plugin.add("draggable", "opacity", { + start: function (t, n) { + var r = e(n.helper), + i = e(this).data("draggable").options; + r.css("opacity") && (i._opacity = r.css("opacity")), + r.css("opacity", i.opacity); + }, + stop: function (t, n) { + var r = e(this).data("draggable").options; + r._opacity && e(n.helper).css("opacity", r._opacity); + }, + }), + e.ui.plugin.add("draggable", "scroll", { + start: function (t, n) { + var r = e(this).data("draggable"); + r.scrollParent[0] != document && + r.scrollParent[0].tagName != "HTML" && + (r.overflowOffset = r.scrollParent.offset()); + }, + drag: function (t, n) { + var r = e(this).data("draggable"), + i = r.options, + s = !1; + if ( + r.scrollParent[0] != document && + r.scrollParent[0].tagName != "HTML" + ) { + if (!i.axis || i.axis != "x") + r.overflowOffset.top + r.scrollParent[0].offsetHeight - t.pageY < + i.scrollSensitivity + ? (r.scrollParent[0].scrollTop = s = + r.scrollParent[0].scrollTop + i.scrollSpeed) + : t.pageY - r.overflowOffset.top < i.scrollSensitivity && + (r.scrollParent[0].scrollTop = s = + r.scrollParent[0].scrollTop - i.scrollSpeed); + if (!i.axis || i.axis != "y") + r.overflowOffset.left + r.scrollParent[0].offsetWidth - t.pageX < + i.scrollSensitivity + ? (r.scrollParent[0].scrollLeft = s = + r.scrollParent[0].scrollLeft + i.scrollSpeed) + : t.pageX - r.overflowOffset.left < i.scrollSensitivity && + (r.scrollParent[0].scrollLeft = s = + r.scrollParent[0].scrollLeft - i.scrollSpeed); + } else { + if (!i.axis || i.axis != "x") + t.pageY - e(document).scrollTop() < i.scrollSensitivity + ? (s = e(document).scrollTop( + e(document).scrollTop() - i.scrollSpeed, + )) + : e(window).height() - (t.pageY - e(document).scrollTop()) < + i.scrollSensitivity && + (s = e(document).scrollTop( + e(document).scrollTop() + i.scrollSpeed, + )); + if (!i.axis || i.axis != "y") + t.pageX - e(document).scrollLeft() < i.scrollSensitivity + ? (s = e(document).scrollLeft( + e(document).scrollLeft() - i.scrollSpeed, + )) + : e(window).width() - (t.pageX - e(document).scrollLeft()) < + i.scrollSensitivity && + (s = e(document).scrollLeft( + e(document).scrollLeft() + i.scrollSpeed, + )); + } + s !== !1 && + e.ui.ddmanager && + !i.dropBehaviour && + e.ui.ddmanager.prepareOffsets(r, t); + }, + }), + e.ui.plugin.add("draggable", "snap", { + start: function (t, n) { + var r = e(this).data("draggable"), + i = r.options; + (r.snapElements = []), + e( + i.snap.constructor != String + ? i.snap.items || ":data(draggable)" + : i.snap, + ).each(function () { + var t = e(this), + n = t.offset(); + this != r.element[0] && + r.snapElements.push({ + item: this, + width: t.outerWidth(), + height: t.outerHeight(), + top: n.top, + left: n.left, + }); + }); + }, + drag: function (t, n) { + var r = e(this).data("draggable"), + i = r.options, + s = i.snapTolerance, + o = n.offset.left, + u = o + r.helperProportions.width, + a = n.offset.top, + f = a + r.helperProportions.height; + for (var l = r.snapElements.length - 1; l >= 0; l--) { + var c = r.snapElements[l].left, + h = c + r.snapElements[l].width, + p = r.snapElements[l].top, + d = p + r.snapElements[l].height; + if ( + !( + (c - s < o && o < h + s && p - s < a && a < d + s) || + (c - s < o && o < h + s && p - s < f && f < d + s) || + (c - s < u && u < h + s && p - s < a && a < d + s) || + (c - s < u && u < h + s && p - s < f && f < d + s) + ) + ) { + r.snapElements[l].snapping && + r.options.snap.release && + r.options.snap.release.call( + r.element, + t, + e.extend(r._uiHash(), { snapItem: r.snapElements[l].item }), + ), + (r.snapElements[l].snapping = !1); + continue; + } + if (i.snapMode != "inner") { + var v = Math.abs(p - f) <= s, + m = Math.abs(d - a) <= s, + g = Math.abs(c - u) <= s, + y = Math.abs(h - o) <= s; + v && + (n.position.top = + r._convertPositionTo("relative", { + top: p - r.helperProportions.height, + left: 0, + }).top - r.margins.top), + m && + (n.position.top = + r._convertPositionTo("relative", { top: d, left: 0 }).top - + r.margins.top), + g && + (n.position.left = + r._convertPositionTo("relative", { + top: 0, + left: c - r.helperProportions.width, + }).left - r.margins.left), + y && + (n.position.left = + r._convertPositionTo("relative", { top: 0, left: h }).left - + r.margins.left); + } + var b = v || m || g || y; + if (i.snapMode != "outer") { + var v = Math.abs(p - a) <= s, + m = Math.abs(d - f) <= s, + g = Math.abs(c - o) <= s, + y = Math.abs(h - u) <= s; + v && + (n.position.top = + r._convertPositionTo("relative", { top: p, left: 0 }).top - + r.margins.top), + m && + (n.position.top = + r._convertPositionTo("relative", { + top: d - r.helperProportions.height, + left: 0, + }).top - r.margins.top), + g && + (n.position.left = + r._convertPositionTo("relative", { top: 0, left: c }).left - + r.margins.left), + y && + (n.position.left = + r._convertPositionTo("relative", { + top: 0, + left: h - r.helperProportions.width, + }).left - r.margins.left); + } + !r.snapElements[l].snapping && + (v || m || g || y || b) && + r.options.snap.snap && + r.options.snap.snap.call( + r.element, + t, + e.extend(r._uiHash(), { snapItem: r.snapElements[l].item }), + ), + (r.snapElements[l].snapping = v || m || g || y || b); + } + }, + }), + e.ui.plugin.add("draggable", "stack", { + start: function (t, n) { + var r = e(this).data("draggable").options, + i = e.makeArray(e(r.stack)).sort(function (t, n) { + return ( + (parseInt(e(t).css("zIndex"), 10) || 0) - + (parseInt(e(n).css("zIndex"), 10) || 0) + ); + }); + if (!i.length) return; + var s = parseInt(i[0].style.zIndex) || 0; + e(i).each(function (e) { + this.style.zIndex = s + e; + }), + (this[0].style.zIndex = s + i.length); + }, + }), + e.ui.plugin.add("draggable", "zIndex", { + start: function (t, n) { + var r = e(n.helper), + i = e(this).data("draggable").options; + r.css("zIndex") && (i._zIndex = r.css("zIndex")), + r.css("zIndex", i.zIndex); + }, + stop: function (t, n) { + var r = e(this).data("draggable").options; + r._zIndex && e(n.helper).css("zIndex", r._zIndex); + }, + }); +})(jQuery); +(function (e, t) { + e.widget("ui.droppable", { + version: "1.9.2", + widgetEventPrefix: "drop", + options: { + accept: "*", + activeClass: !1, + addClasses: !0, + greedy: !1, + hoverClass: !1, + scope: "default", + tolerance: "intersect", + }, + _create: function () { + var t = this.options, + n = t.accept; + (this.isover = 0), + (this.isout = 1), + (this.accept = e.isFunction(n) + ? n + : function (e) { + return e.is(n); + }), + (this.proportions = { + width: this.element[0].offsetWidth, + height: this.element[0].offsetHeight, + }), + (e.ui.ddmanager.droppables[t.scope] = + e.ui.ddmanager.droppables[t.scope] || []), + e.ui.ddmanager.droppables[t.scope].push(this), + t.addClasses && this.element.addClass("ui-droppable"); + }, + _destroy: function () { + var t = e.ui.ddmanager.droppables[this.options.scope]; + for (var n = 0; n < t.length; n++) t[n] == this && t.splice(n, 1); + this.element.removeClass("ui-droppable ui-droppable-disabled"); + }, + _setOption: function (t, n) { + t == "accept" && + (this.accept = e.isFunction(n) + ? n + : function (e) { + return e.is(n); + }), + e.Widget.prototype._setOption.apply(this, arguments); + }, + _activate: function (t) { + var n = e.ui.ddmanager.current; + this.options.activeClass && + this.element.addClass(this.options.activeClass), + n && this._trigger("activate", t, this.ui(n)); + }, + _deactivate: function (t) { + var n = e.ui.ddmanager.current; + this.options.activeClass && + this.element.removeClass(this.options.activeClass), + n && this._trigger("deactivate", t, this.ui(n)); + }, + _over: function (t) { + var n = e.ui.ddmanager.current; + if (!n || (n.currentItem || n.element)[0] == this.element[0]) return; + this.accept.call(this.element[0], n.currentItem || n.element) && + (this.options.hoverClass && + this.element.addClass(this.options.hoverClass), + this._trigger("over", t, this.ui(n))); + }, + _out: function (t) { + var n = e.ui.ddmanager.current; + if (!n || (n.currentItem || n.element)[0] == this.element[0]) return; + this.accept.call(this.element[0], n.currentItem || n.element) && + (this.options.hoverClass && + this.element.removeClass(this.options.hoverClass), + this._trigger("out", t, this.ui(n))); + }, + _drop: function (t, n) { + var r = n || e.ui.ddmanager.current; + if (!r || (r.currentItem || r.element)[0] == this.element[0]) return !1; + var i = !1; + return ( + this.element + .find(":data(droppable)") + .not(".ui-draggable-dragging") + .each(function () { + var t = e.data(this, "droppable"); + if ( + t.options.greedy && + !t.options.disabled && + t.options.scope == r.options.scope && + t.accept.call(t.element[0], r.currentItem || r.element) && + e.ui.intersect( + r, + e.extend(t, { offset: t.element.offset() }), + t.options.tolerance, + ) + ) + return (i = !0), !1; + }), + i + ? !1 + : this.accept.call(this.element[0], r.currentItem || r.element) + ? (this.options.activeClass && + this.element.removeClass(this.options.activeClass), + this.options.hoverClass && + this.element.removeClass(this.options.hoverClass), + this._trigger("drop", t, this.ui(r)), + this.element) + : !1 + ); + }, + ui: function (e) { + return { + draggable: e.currentItem || e.element, + helper: e.helper, + position: e.position, + offset: e.positionAbs, + }; + }, + }), + (e.ui.intersect = function (t, n, r) { + if (!n.offset) return !1; + var i = (t.positionAbs || t.position.absolute).left, + s = i + t.helperProportions.width, + o = (t.positionAbs || t.position.absolute).top, + u = o + t.helperProportions.height, + a = n.offset.left, + f = a + n.proportions.width, + l = n.offset.top, + c = l + n.proportions.height; + switch (r) { + case "fit": + return a <= i && s <= f && l <= o && u <= c; + case "intersect": + return ( + a < i + t.helperProportions.width / 2 && + s - t.helperProportions.width / 2 < f && + l < o + t.helperProportions.height / 2 && + u - t.helperProportions.height / 2 < c + ); + case "pointer": + var h = + (t.positionAbs || t.position.absolute).left + + (t.clickOffset || t.offset.click).left, + p = + (t.positionAbs || t.position.absolute).top + + (t.clickOffset || t.offset.click).top, + d = e.ui.isOver( + p, + h, + l, + a, + n.proportions.height, + n.proportions.width, + ); + return d; + case "touch": + return ( + ((o >= l && o <= c) || (u >= l && u <= c) || (o < l && u > c)) && + ((i >= a && i <= f) || (s >= a && s <= f) || (i < a && s > f)) + ); + default: + return !1; + } + }), + (e.ui.ddmanager = { + current: null, + droppables: { default: [] }, + prepareOffsets: function (t, n) { + var r = e.ui.ddmanager.droppables[t.options.scope] || [], + i = n ? n.type : null, + s = (t.currentItem || t.element).find(":data(droppable)").andSelf(); + e: for (var o = 0; o < r.length; o++) { + if ( + r[o].options.disabled || + (t && + !r[o].accept.call(r[o].element[0], t.currentItem || t.element)) + ) + continue; + for (var u = 0; u < s.length; u++) + if (s[u] == r[o].element[0]) { + r[o].proportions.height = 0; + continue e; + } + r[o].visible = r[o].element.css("display") != "none"; + if (!r[o].visible) continue; + i == "mousedown" && r[o]._activate.call(r[o], n), + (r[o].offset = r[o].element.offset()), + (r[o].proportions = { + width: r[o].element[0].offsetWidth, + height: r[o].element[0].offsetHeight, + }); + } + }, + drop: function (t, n) { + var r = !1; + return ( + e.each(e.ui.ddmanager.droppables[t.options.scope] || [], function () { + if (!this.options) return; + !this.options.disabled && + this.visible && + e.ui.intersect(t, this, this.options.tolerance) && + (r = this._drop.call(this, n) || r), + !this.options.disabled && + this.visible && + this.accept.call(this.element[0], t.currentItem || t.element) && + ((this.isout = 1), + (this.isover = 0), + this._deactivate.call(this, n)); + }), + r + ); + }, + dragStart: function (t, n) { + t.element.parentsUntil("body").bind("scroll.droppable", function () { + t.options.refreshPositions || e.ui.ddmanager.prepareOffsets(t, n); + }); + }, + drag: function (t, n) { + t.options.refreshPositions && e.ui.ddmanager.prepareOffsets(t, n), + e.each(e.ui.ddmanager.droppables[t.options.scope] || [], function () { + if (this.options.disabled || this.greedyChild || !this.visible) + return; + var r = e.ui.intersect(t, this, this.options.tolerance), + i = + !r && this.isover == 1 + ? "isout" + : r && this.isover == 0 + ? "isover" + : null; + if (!i) return; + var s; + if (this.options.greedy) { + var o = this.options.scope, + u = this.element + .parents(":data(droppable)") + .filter(function () { + return e.data(this, "droppable").options.scope === o; + }); + u.length && + ((s = e.data(u[0], "droppable")), + (s.greedyChild = i == "isover" ? 1 : 0)); + } + s && + i == "isover" && + ((s.isover = 0), (s.isout = 1), s._out.call(s, n)), + (this[i] = 1), + (this[i == "isout" ? "isover" : "isout"] = 0), + this[i == "isover" ? "_over" : "_out"].call(this, n), + s && + i == "isout" && + ((s.isout = 0), (s.isover = 1), s._over.call(s, n)); + }); + }, + dragStop: function (t, n) { + t.element.parentsUntil("body").unbind("scroll.droppable"), + t.options.refreshPositions || e.ui.ddmanager.prepareOffsets(t, n); + }, + }); +})(jQuery); +jQuery.effects || + (function (e, t) { + var n = e.uiBackCompat !== !1, + r = "ui-effects-"; + (e.effects = { effect: {} }), + (function (t, n) { + function p(e, t, n) { + var r = a[t.type] || {}; + return e == null + ? n || !t.def + ? null + : t.def + : ((e = r.floor ? ~~e : parseFloat(e)), + isNaN(e) + ? t.def + : r.mod + ? (e + r.mod) % r.mod + : 0 > e + ? 0 + : r.max < e + ? r.max + : e); + } + function d(e) { + var n = o(), + r = (n._rgba = []); + return ( + (e = e.toLowerCase()), + h(s, function (t, i) { + var s, + o = i.re.exec(e), + a = o && i.parse(o), + f = i.space || "rgba"; + if (a) + return ( + (s = n[f](a)), + (n[u[f].cache] = s[u[f].cache]), + (r = n._rgba = s._rgba), + !1 + ); + }), + r.length + ? (r.join() === "0,0,0,0" && t.extend(r, c.transparent), n) + : c[e] + ); + } + function v(e, t, n) { + return ( + (n = (n + 1) % 1), + n * 6 < 1 + ? e + (t - e) * n * 6 + : n * 2 < 1 + ? t + : n * 3 < 2 + ? e + (t - e) * (2 / 3 - n) * 6 + : e + ); + } + var r = + "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split( + " ", + ), + i = /^([\-+])=\s*(\d+\.?\d*)/, + s = [ + { + re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + parse: function (e) { + return [e[1], e[2], e[3], e[4]]; + }, + }, + { + re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + parse: function (e) { + return [e[1] * 2.55, e[2] * 2.55, e[3] * 2.55, e[4]]; + }, + }, + { + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, + parse: function (e) { + return [ + parseInt(e[1], 16), + parseInt(e[2], 16), + parseInt(e[3], 16), + ]; + }, + }, + { + re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, + parse: function (e) { + return [ + parseInt(e[1] + e[1], 16), + parseInt(e[2] + e[2], 16), + parseInt(e[3] + e[3], 16), + ]; + }, + }, + { + re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + space: "hsla", + parse: function (e) { + return [e[1], e[2] / 100, e[3] / 100, e[4]]; + }, + }, + ], + o = (t.Color = function (e, n, r, i) { + return new t.Color.fn.parse(e, n, r, i); + }), + u = { + rgba: { + props: { + red: { idx: 0, type: "byte" }, + green: { idx: 1, type: "byte" }, + blue: { idx: 2, type: "byte" }, + }, + }, + hsla: { + props: { + hue: { idx: 0, type: "degrees" }, + saturation: { idx: 1, type: "percent" }, + lightness: { idx: 2, type: "percent" }, + }, + }, + }, + a = { + byte: { floor: !0, max: 255 }, + percent: { max: 1 }, + degrees: { mod: 360, floor: !0 }, + }, + f = (o.support = {}), + l = t("

          ")[0], + c, + h = t.each; + (l.style.cssText = "background-color:rgba(1,1,1,.5)"), + (f.rgba = l.style.backgroundColor.indexOf("rgba") > -1), + h(u, function (e, t) { + (t.cache = "_" + e), + (t.props.alpha = { idx: 3, type: "percent", def: 1 }); + }), + (o.fn = t.extend(o.prototype, { + parse: function (r, i, s, a) { + if (r === n) return (this._rgba = [null, null, null, null]), this; + if (r.jquery || r.nodeType) (r = t(r).css(i)), (i = n); + var f = this, + l = t.type(r), + v = (this._rgba = []); + i !== n && ((r = [r, i, s, a]), (l = "array")); + if (l === "string") return this.parse(d(r) || c._default); + if (l === "array") + return ( + h(u.rgba.props, function (e, t) { + v[t.idx] = p(r[t.idx], t); + }), + this + ); + if (l === "object") + return ( + r instanceof o + ? h(u, function (e, t) { + r[t.cache] && (f[t.cache] = r[t.cache].slice()); + }) + : h(u, function (t, n) { + var i = n.cache; + h(n.props, function (e, t) { + if (!f[i] && n.to) { + if (e === "alpha" || r[e] == null) return; + f[i] = n.to(f._rgba); + } + f[i][t.idx] = p(r[e], t, !0); + }), + f[i] && + e.inArray(null, f[i].slice(0, 3)) < 0 && + ((f[i][3] = 1), n.from && (f._rgba = n.from(f[i]))); + }), + this + ); + }, + is: function (e) { + var t = o(e), + n = !0, + r = this; + return ( + h(u, function (e, i) { + var s, + o = t[i.cache]; + return ( + o && + ((s = r[i.cache] || (i.to && i.to(r._rgba)) || []), + h(i.props, function (e, t) { + if (o[t.idx] != null) + return (n = o[t.idx] === s[t.idx]), n; + })), + n + ); + }), + n + ); + }, + _space: function () { + var e = [], + t = this; + return ( + h(u, function (n, r) { + t[r.cache] && e.push(n); + }), + e.pop() + ); + }, + transition: function (e, t) { + var n = o(e), + r = n._space(), + i = u[r], + s = this.alpha() === 0 ? o("transparent") : this, + f = s[i.cache] || i.to(s._rgba), + l = f.slice(); + return ( + (n = n[i.cache]), + h(i.props, function (e, r) { + var i = r.idx, + s = f[i], + o = n[i], + u = a[r.type] || {}; + if (o === null) return; + s === null + ? (l[i] = o) + : (u.mod && + (o - s > u.mod / 2 + ? (s += u.mod) + : s - o > u.mod / 2 && (s -= u.mod)), + (l[i] = p((o - s) * t + s, r))); + }), + this[r](l) + ); + }, + blend: function (e) { + if (this._rgba[3] === 1) return this; + var n = this._rgba.slice(), + r = n.pop(), + i = o(e)._rgba; + return o( + t.map(n, function (e, t) { + return (1 - r) * i[t] + r * e; + }), + ); + }, + toRgbaString: function () { + var e = "rgba(", + n = t.map(this._rgba, function (e, t) { + return e == null ? (t > 2 ? 1 : 0) : e; + }); + return n[3] === 1 && (n.pop(), (e = "rgb(")), e + n.join() + ")"; + }, + toHslaString: function () { + var e = "hsla(", + n = t.map(this.hsla(), function (e, t) { + return ( + e == null && (e = t > 2 ? 1 : 0), + t && t < 3 && (e = Math.round(e * 100) + "%"), + e + ); + }); + return n[3] === 1 && (n.pop(), (e = "hsl(")), e + n.join() + ")"; + }, + toHexString: function (e) { + var n = this._rgba.slice(), + r = n.pop(); + return ( + e && n.push(~~(r * 255)), + "#" + + t + .map(n, function (e) { + return ( + (e = (e || 0).toString(16)), + e.length === 1 ? "0" + e : e + ); + }) + .join("") + ); + }, + toString: function () { + return this._rgba[3] === 0 ? "transparent" : this.toRgbaString(); + }, + })), + (o.fn.parse.prototype = o.fn), + (u.hsla.to = function (e) { + if (e[0] == null || e[1] == null || e[2] == null) + return [null, null, null, e[3]]; + var t = e[0] / 255, + n = e[1] / 255, + r = e[2] / 255, + i = e[3], + s = Math.max(t, n, r), + o = Math.min(t, n, r), + u = s - o, + a = s + o, + f = a * 0.5, + l, + c; + return ( + o === s + ? (l = 0) + : t === s + ? (l = (60 * (n - r)) / u + 360) + : n === s + ? (l = (60 * (r - t)) / u + 120) + : (l = (60 * (t - n)) / u + 240), + f === 0 || f === 1 + ? (c = f) + : f <= 0.5 + ? (c = u / a) + : (c = u / (2 - a)), + [Math.round(l) % 360, c, f, i == null ? 1 : i] + ); + }), + (u.hsla.from = function (e) { + if (e[0] == null || e[1] == null || e[2] == null) + return [null, null, null, e[3]]; + var t = e[0] / 360, + n = e[1], + r = e[2], + i = e[3], + s = r <= 0.5 ? r * (1 + n) : r + n - r * n, + o = 2 * r - s; + return [ + Math.round(v(o, s, t + 1 / 3) * 255), + Math.round(v(o, s, t) * 255), + Math.round(v(o, s, t - 1 / 3) * 255), + i, + ]; + }), + h(u, function (e, r) { + var s = r.props, + u = r.cache, + a = r.to, + f = r.from; + (o.fn[e] = function (e) { + a && !this[u] && (this[u] = a(this._rgba)); + if (e === n) return this[u].slice(); + var r, + i = t.type(e), + l = i === "array" || i === "object" ? e : arguments, + c = this[u].slice(); + return ( + h(s, function (e, t) { + var n = l[i === "object" ? e : t.idx]; + n == null && (n = c[t.idx]), (c[t.idx] = p(n, t)); + }), + f ? ((r = o(f(c))), (r[u] = c), r) : o(c) + ); + }), + h(s, function (n, r) { + if (o.fn[n]) return; + o.fn[n] = function (s) { + var o = t.type(s), + u = n === "alpha" ? (this._hsla ? "hsla" : "rgba") : e, + a = this[u](), + f = a[r.idx], + l; + return o === "undefined" + ? f + : (o === "function" && + ((s = s.call(this, f)), (o = t.type(s))), + s == null && r.empty + ? this + : (o === "string" && + ((l = i.exec(s)), + l && + (s = + f + + parseFloat(l[2]) * (l[1] === "+" ? 1 : -1))), + (a[r.idx] = s), + this[u](a))); + }; + }); + }), + h(r, function (e, n) { + (t.cssHooks[n] = { + set: function (e, r) { + var i, + s, + u = ""; + if (t.type(r) !== "string" || (i = d(r))) { + r = o(i || r); + if (!f.rgba && r._rgba[3] !== 1) { + s = n === "backgroundColor" ? e.parentNode : e; + while ((u === "" || u === "transparent") && s && s.style) + try { + (u = t.css(s, "backgroundColor")), (s = s.parentNode); + } catch (a) {} + r = r.blend(u && u !== "transparent" ? u : "_default"); + } + r = r.toRgbaString(); + } + try { + e.style[n] = r; + } catch (l) {} + }, + }), + (t.fx.step[n] = function (e) { + e.colorInit || + ((e.start = o(e.elem, n)), + (e.end = o(e.end)), + (e.colorInit = !0)), + t.cssHooks[n].set(e.elem, e.start.transition(e.end, e.pos)); + }); + }), + (t.cssHooks.borderColor = { + expand: function (e) { + var t = {}; + return ( + h(["Top", "Right", "Bottom", "Left"], function (n, r) { + t["border" + r + "Color"] = e; + }), + t + ); + }, + }), + (c = t.Color.names = + { + aqua: "#00ffff", + black: "#000000", + blue: "#0000ff", + fuchsia: "#ff00ff", + gray: "#808080", + green: "#008000", + lime: "#00ff00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + purple: "#800080", + red: "#ff0000", + silver: "#c0c0c0", + teal: "#008080", + white: "#ffffff", + yellow: "#ffff00", + transparent: [null, null, null, 0], + _default: "#ffffff", + }); + })(jQuery), + (function () { + function i() { + var t = this.ownerDocument.defaultView + ? this.ownerDocument.defaultView.getComputedStyle(this, null) + : this.currentStyle, + n = {}, + r, + i; + if (t && t.length && t[0] && t[t[0]]) { + i = t.length; + while (i--) + (r = t[i]), typeof t[r] == "string" && (n[e.camelCase(r)] = t[r]); + } else for (r in t) typeof t[r] == "string" && (n[r] = t[r]); + return n; + } + function s(t, n) { + var i = {}, + s, + o; + for (s in n) + (o = n[s]), + t[s] !== o && + !r[s] && + (e.fx.step[s] || !isNaN(parseFloat(o))) && + (i[s] = o); + return i; + } + var n = ["add", "remove", "toggle"], + r = { + border: 1, + borderBottom: 1, + borderColor: 1, + borderLeft: 1, + borderRight: 1, + borderTop: 1, + borderWidth: 1, + margin: 1, + padding: 1, + }; + e.each( + [ + "borderLeftStyle", + "borderRightStyle", + "borderBottomStyle", + "borderTopStyle", + ], + function (t, n) { + e.fx.step[n] = function (e) { + if ( + (e.end !== "none" && !e.setAttr) || + (e.pos === 1 && !e.setAttr) + ) + jQuery.style(e.elem, n, e.end), (e.setAttr = !0); + }; + }, + ), + (e.effects.animateClass = function (t, r, o, u) { + var a = e.speed(r, o, u); + return this.queue(function () { + var r = e(this), + o = r.attr("class") || "", + u, + f = a.children ? r.find("*").andSelf() : r; + (f = f.map(function () { + var t = e(this); + return { el: t, start: i.call(this) }; + })), + (u = function () { + e.each(n, function (e, n) { + t[n] && r[n + "Class"](t[n]); + }); + }), + u(), + (f = f.map(function () { + return ( + (this.end = i.call(this.el[0])), + (this.diff = s(this.start, this.end)), + this + ); + })), + r.attr("class", o), + (f = f.map(function () { + var t = this, + n = e.Deferred(), + r = jQuery.extend({}, a, { + queue: !1, + complete: function () { + n.resolve(t); + }, + }); + return this.el.animate(this.diff, r), n.promise(); + })), + e.when.apply(e, f.get()).done(function () { + u(), + e.each(arguments, function () { + var t = this.el; + e.each(this.diff, function (e) { + t.css(e, ""); + }); + }), + a.complete.call(r[0]); + }); + }); + }), + e.fn.extend({ + _addClass: e.fn.addClass, + addClass: function (t, n, r, i) { + return n + ? e.effects.animateClass.call(this, { add: t }, n, r, i) + : this._addClass(t); + }, + _removeClass: e.fn.removeClass, + removeClass: function (t, n, r, i) { + return n + ? e.effects.animateClass.call(this, { remove: t }, n, r, i) + : this._removeClass(t); + }, + _toggleClass: e.fn.toggleClass, + toggleClass: function (n, r, i, s, o) { + return typeof r == "boolean" || r === t + ? i + ? e.effects.animateClass.call( + this, + r ? { add: n } : { remove: n }, + i, + s, + o, + ) + : this._toggleClass(n, r) + : e.effects.animateClass.call(this, { toggle: n }, r, i, s); + }, + switchClass: function (t, n, r, i, s) { + return e.effects.animateClass.call( + this, + { add: n, remove: t }, + r, + i, + s, + ); + }, + }); + })(), + (function () { + function i(t, n, r, i) { + e.isPlainObject(t) && ((n = t), (t = t.effect)), + (t = { effect: t }), + n == null && (n = {}), + e.isFunction(n) && ((i = n), (r = null), (n = {})); + if (typeof n == "number" || e.fx.speeds[n]) + (i = r), (r = n), (n = {}); + return ( + e.isFunction(r) && ((i = r), (r = null)), + n && e.extend(t, n), + (r = r || n.duration), + (t.duration = e.fx.off + ? 0 + : typeof r == "number" + ? r + : r in e.fx.speeds + ? e.fx.speeds[r] + : e.fx.speeds._default), + (t.complete = i || n.complete), + t + ); + } + function s(t) { + return !t || typeof t == "number" || e.fx.speeds[t] + ? !0 + : typeof t == "string" && !e.effects.effect[t] + ? n && e.effects[t] + ? !1 + : !0 + : !1; + } + e.extend(e.effects, { + version: "1.9.2", + save: function (e, t) { + for (var n = 0; n < t.length; n++) + t[n] !== null && e.data(r + t[n], e[0].style[t[n]]); + }, + restore: function (e, n) { + var i, s; + for (s = 0; s < n.length; s++) + n[s] !== null && + ((i = e.data(r + n[s])), i === t && (i = ""), e.css(n[s], i)); + }, + setMode: function (e, t) { + return t === "toggle" && (t = e.is(":hidden") ? "show" : "hide"), t; + }, + getBaseline: function (e, t) { + var n, r; + switch (e[0]) { + case "top": + n = 0; + break; + case "middle": + n = 0.5; + break; + case "bottom": + n = 1; + break; + default: + n = e[0] / t.height; + } + switch (e[1]) { + case "left": + r = 0; + break; + case "center": + r = 0.5; + break; + case "right": + r = 1; + break; + default: + r = e[1] / t.width; + } + return { x: r, y: n }; + }, + createWrapper: function (t) { + if (t.parent().is(".ui-effects-wrapper")) return t.parent(); + var n = { + width: t.outerWidth(!0), + height: t.outerHeight(!0), + float: t.css("float"), + }, + r = e("

          ").addClass("ui-effects-wrapper").css({ + fontSize: "100%", + background: "transparent", + border: "none", + margin: 0, + padding: 0, + }), + i = { width: t.width(), height: t.height() }, + s = document.activeElement; + try { + s.id; + } catch (o) { + s = document.body; + } + return ( + t.wrap(r), + (t[0] === s || e.contains(t[0], s)) && e(s).focus(), + (r = t.parent()), + t.css("position") === "static" + ? (r.css({ position: "relative" }), + t.css({ position: "relative" })) + : (e.extend(n, { + position: t.css("position"), + zIndex: t.css("z-index"), + }), + e.each(["top", "left", "bottom", "right"], function (e, r) { + (n[r] = t.css(r)), + isNaN(parseInt(n[r], 10)) && (n[r] = "auto"); + }), + t.css({ + position: "relative", + top: 0, + left: 0, + right: "auto", + bottom: "auto", + })), + t.css(i), + r.css(n).show() + ); + }, + removeWrapper: function (t) { + var n = document.activeElement; + return ( + t.parent().is(".ui-effects-wrapper") && + (t.parent().replaceWith(t), + (t[0] === n || e.contains(t[0], n)) && e(n).focus()), + t + ); + }, + setTransition: function (t, n, r, i) { + return ( + (i = i || {}), + e.each(n, function (e, n) { + var s = t.cssUnit(n); + s[0] > 0 && (i[n] = s[0] * r + s[1]); + }), + i + ); + }, + }), + e.fn.extend({ + effect: function () { + function a(n) { + function u() { + e.isFunction(i) && i.call(r[0]), e.isFunction(n) && n(); + } + var r = e(this), + i = t.complete, + s = t.mode; + (r.is(":hidden") ? s === "hide" : s === "show") + ? u() + : o.call(r[0], t, u); + } + var t = i.apply(this, arguments), + r = t.mode, + s = t.queue, + o = e.effects.effect[t.effect], + u = !o && n && e.effects[t.effect]; + return e.fx.off || (!o && !u) + ? r + ? this[r](t.duration, t.complete) + : this.each(function () { + t.complete && t.complete.call(this); + }) + : o + ? s === !1 + ? this.each(a) + : this.queue(s || "fx", a) + : u.call(this, { + options: t, + duration: t.duration, + callback: t.complete, + mode: t.mode, + }); + }, + _show: e.fn.show, + show: function (e) { + if (s(e)) return this._show.apply(this, arguments); + var t = i.apply(this, arguments); + return (t.mode = "show"), this.effect.call(this, t); + }, + _hide: e.fn.hide, + hide: function (e) { + if (s(e)) return this._hide.apply(this, arguments); + var t = i.apply(this, arguments); + return (t.mode = "hide"), this.effect.call(this, t); + }, + __toggle: e.fn.toggle, + toggle: function (t) { + if (s(t) || typeof t == "boolean" || e.isFunction(t)) + return this.__toggle.apply(this, arguments); + var n = i.apply(this, arguments); + return (n.mode = "toggle"), this.effect.call(this, n); + }, + cssUnit: function (t) { + var n = this.css(t), + r = []; + return ( + e.each(["em", "px", "%", "pt"], function (e, t) { + n.indexOf(t) > 0 && (r = [parseFloat(n), t]); + }), + r + ); + }, + }); + })(), + (function () { + var t = {}; + e.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (e, n) { + t[n] = function (t) { + return Math.pow(t, e + 2); + }; + }), + e.extend(t, { + Sine: function (e) { + return 1 - Math.cos((e * Math.PI) / 2); + }, + Circ: function (e) { + return 1 - Math.sqrt(1 - e * e); + }, + Elastic: function (e) { + return e === 0 || e === 1 + ? e + : -Math.pow(2, 8 * (e - 1)) * + Math.sin((((e - 1) * 80 - 7.5) * Math.PI) / 15); + }, + Back: function (e) { + return e * e * (3 * e - 2); + }, + Bounce: function (e) { + var t, + n = 4; + while (e < ((t = Math.pow(2, --n)) - 1) / 11); + return ( + 1 / Math.pow(4, 3 - n) - + 7.5625 * Math.pow((t * 3 - 2) / 22 - e, 2) + ); + }, + }), + e.each(t, function (t, n) { + (e.easing["easeIn" + t] = n), + (e.easing["easeOut" + t] = function (e) { + return 1 - n(1 - e); + }), + (e.easing["easeInOut" + t] = function (e) { + return e < 0.5 ? n(e * 2) / 2 : 1 - n(e * -2 + 2) / 2; + }); + }); + })(); + })(jQuery); +(function (e, t) { + var n = /up|down|vertical/, + r = /up|left|vertical|horizontal/; + e.effects.effect.blind = function (t, i) { + var s = e(this), + o = ["position", "top", "bottom", "left", "right", "height", "width"], + u = e.effects.setMode(s, t.mode || "hide"), + a = t.direction || "up", + f = n.test(a), + l = f ? "height" : "width", + c = f ? "top" : "left", + h = r.test(a), + p = {}, + d = u === "show", + v, + m, + g; + s.parent().is(".ui-effects-wrapper") + ? e.effects.save(s.parent(), o) + : e.effects.save(s, o), + s.show(), + (v = e.effects.createWrapper(s).css({ overflow: "hidden" })), + (m = v[l]()), + (g = parseFloat(v.css(c)) || 0), + (p[l] = d ? m : 0), + h || + (s + .css(f ? "bottom" : "right", 0) + .css(f ? "top" : "left", "auto") + .css({ position: "absolute" }), + (p[c] = d ? g : m + g)), + d && (v.css(l, 0), h || v.css(c, g + m)), + v.animate(p, { + duration: t.duration, + easing: t.easing, + queue: !1, + complete: function () { + u === "hide" && s.hide(), + e.effects.restore(s, o), + e.effects.removeWrapper(s), + i(); + }, + }); + }; +})(jQuery); +(function (e, t) { + e.effects.effect.bounce = function (t, n) { + var r = e(this), + i = ["position", "top", "bottom", "left", "right", "height", "width"], + s = e.effects.setMode(r, t.mode || "effect"), + o = s === "hide", + u = s === "show", + a = t.direction || "up", + f = t.distance, + l = t.times || 5, + c = l * 2 + (u || o ? 1 : 0), + h = t.duration / c, + p = t.easing, + d = a === "up" || a === "down" ? "top" : "left", + v = a === "up" || a === "left", + m, + g, + y, + b = r.queue(), + w = b.length; + (u || o) && i.push("opacity"), + e.effects.save(r, i), + r.show(), + e.effects.createWrapper(r), + f || (f = r[d === "top" ? "outerHeight" : "outerWidth"]() / 3), + u && + ((y = { opacity: 1 }), + (y[d] = 0), + r + .css("opacity", 0) + .css(d, v ? -f * 2 : f * 2) + .animate(y, h, p)), + o && (f /= Math.pow(2, l - 1)), + (y = {}), + (y[d] = 0); + for (m = 0; m < l; m++) + (g = {}), + (g[d] = (v ? "-=" : "+=") + f), + r.animate(g, h, p).animate(y, h, p), + (f = o ? f * 2 : f / 2); + o && + ((g = { opacity: 0 }), + (g[d] = (v ? "-=" : "+=") + f), + r.animate(g, h, p)), + r.queue(function () { + o && r.hide(), e.effects.restore(r, i), e.effects.removeWrapper(r), n(); + }), + w > 1 && b.splice.apply(b, [1, 0].concat(b.splice(w, c + 1))), + r.dequeue(); + }; +})(jQuery); +(function (e, t) { + e.effects.effect.clip = function (t, n) { + var r = e(this), + i = ["position", "top", "bottom", "left", "right", "height", "width"], + s = e.effects.setMode(r, t.mode || "hide"), + o = s === "show", + u = t.direction || "vertical", + a = u === "vertical", + f = a ? "height" : "width", + l = a ? "top" : "left", + c = {}, + h, + p, + d; + e.effects.save(r, i), + r.show(), + (h = e.effects.createWrapper(r).css({ overflow: "hidden" })), + (p = r[0].tagName === "IMG" ? h : r), + (d = p[f]()), + o && (p.css(f, 0), p.css(l, d / 2)), + (c[f] = o ? d : 0), + (c[l] = o ? 0 : d / 2), + p.animate(c, { + queue: !1, + duration: t.duration, + easing: t.easing, + complete: function () { + o || r.hide(), + e.effects.restore(r, i), + e.effects.removeWrapper(r), + n(); + }, + }); + }; +})(jQuery); +(function (e, t) { + e.effects.effect.drop = function (t, n) { + var r = e(this), + i = [ + "position", + "top", + "bottom", + "left", + "right", + "opacity", + "height", + "width", + ], + s = e.effects.setMode(r, t.mode || "hide"), + o = s === "show", + u = t.direction || "left", + a = u === "up" || u === "down" ? "top" : "left", + f = u === "up" || u === "left" ? "pos" : "neg", + l = { opacity: o ? 1 : 0 }, + c; + e.effects.save(r, i), + r.show(), + e.effects.createWrapper(r), + (c = t.distance || r[a === "top" ? "outerHeight" : "outerWidth"](!0) / 2), + o && r.css("opacity", 0).css(a, f === "pos" ? -c : c), + (l[a] = + (o ? (f === "pos" ? "+=" : "-=") : f === "pos" ? "-=" : "+=") + c), + r.animate(l, { + queue: !1, + duration: t.duration, + easing: t.easing, + complete: function () { + s === "hide" && r.hide(), + e.effects.restore(r, i), + e.effects.removeWrapper(r), + n(); + }, + }); + }; +})(jQuery); +(function (e, t) { + e.effects.effect.explode = function (t, n) { + function y() { + c.push(this), c.length === r * i && b(); + } + function b() { + s.css({ visibility: "visible" }), e(c).remove(), u || s.hide(), n(); + } + var r = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3, + i = r, + s = e(this), + o = e.effects.setMode(s, t.mode || "hide"), + u = o === "show", + a = s.show().css("visibility", "hidden").offset(), + f = Math.ceil(s.outerWidth() / i), + l = Math.ceil(s.outerHeight() / r), + c = [], + h, + p, + d, + v, + m, + g; + for (h = 0; h < r; h++) { + (v = a.top + h * l), (g = h - (r - 1) / 2); + for (p = 0; p < i; p++) + (d = a.left + p * f), + (m = p - (i - 1) / 2), + s + .clone() + .appendTo("body") + .wrap("
          ") + .css({ + position: "absolute", + visibility: "visible", + left: -p * f, + top: -h * l, + }) + .parent() + .addClass("ui-effects-explode") + .css({ + position: "absolute", + overflow: "hidden", + width: f, + height: l, + left: d + (u ? m * f : 0), + top: v + (u ? g * l : 0), + opacity: u ? 0 : 1, + }) + .animate( + { + left: d + (u ? 0 : m * f), + top: v + (u ? 0 : g * l), + opacity: u ? 1 : 0, + }, + t.duration || 500, + t.easing, + y, + ); + } + }; +})(jQuery); +(function (e, t) { + e.effects.effect.fade = function (t, n) { + var r = e(this), + i = e.effects.setMode(r, t.mode || "toggle"); + r.animate( + { opacity: i }, + { queue: !1, duration: t.duration, easing: t.easing, complete: n }, + ); + }; +})(jQuery); +(function (e, t) { + e.effects.effect.fold = function (t, n) { + var r = e(this), + i = ["position", "top", "bottom", "left", "right", "height", "width"], + s = e.effects.setMode(r, t.mode || "hide"), + o = s === "show", + u = s === "hide", + a = t.size || 15, + f = /([0-9]+)%/.exec(a), + l = !!t.horizFirst, + c = o !== l, + h = c ? ["width", "height"] : ["height", "width"], + p = t.duration / 2, + d, + v, + m = {}, + g = {}; + e.effects.save(r, i), + r.show(), + (d = e.effects.createWrapper(r).css({ overflow: "hidden" })), + (v = c ? [d.width(), d.height()] : [d.height(), d.width()]), + f && (a = (parseInt(f[1], 10) / 100) * v[u ? 0 : 1]), + o && d.css(l ? { height: 0, width: a } : { height: a, width: 0 }), + (m[h[0]] = o ? v[0] : a), + (g[h[1]] = o ? v[1] : 0), + d.animate(m, p, t.easing).animate(g, p, t.easing, function () { + u && r.hide(), e.effects.restore(r, i), e.effects.removeWrapper(r), n(); + }); + }; +})(jQuery); +(function (e, t) { + e.effects.effect.highlight = function (t, n) { + var r = e(this), + i = ["backgroundImage", "backgroundColor", "opacity"], + s = e.effects.setMode(r, t.mode || "show"), + o = { backgroundColor: r.css("backgroundColor") }; + s === "hide" && (o.opacity = 0), + e.effects.save(r, i), + r + .show() + .css({ backgroundImage: "none", backgroundColor: t.color || "#ffff99" }) + .animate(o, { + queue: !1, + duration: t.duration, + easing: t.easing, + complete: function () { + s === "hide" && r.hide(), e.effects.restore(r, i), n(); + }, + }); + }; +})(jQuery); +(function (e, t) { + e.effects.effect.pulsate = function (t, n) { + var r = e(this), + i = e.effects.setMode(r, t.mode || "show"), + s = i === "show", + o = i === "hide", + u = s || i === "hide", + a = (t.times || 5) * 2 + (u ? 1 : 0), + f = t.duration / a, + l = 0, + c = r.queue(), + h = c.length, + p; + if (s || !r.is(":visible")) r.css("opacity", 0).show(), (l = 1); + for (p = 1; p < a; p++) r.animate({ opacity: l }, f, t.easing), (l = 1 - l); + r.animate({ opacity: l }, f, t.easing), + r.queue(function () { + o && r.hide(), n(); + }), + h > 1 && c.splice.apply(c, [1, 0].concat(c.splice(h, a + 1))), + r.dequeue(); + }; +})(jQuery); +(function (e, t) { + (e.effects.effect.puff = function (t, n) { + var r = e(this), + i = e.effects.setMode(r, t.mode || "hide"), + s = i === "hide", + o = parseInt(t.percent, 10) || 150, + u = o / 100, + a = { + height: r.height(), + width: r.width(), + outerHeight: r.outerHeight(), + outerWidth: r.outerWidth(), + }; + e.extend(t, { + effect: "scale", + queue: !1, + fade: !0, + mode: i, + complete: n, + percent: s ? o : 100, + from: s + ? a + : { + height: a.height * u, + width: a.width * u, + outerHeight: a.outerHeight * u, + outerWidth: a.outerWidth * u, + }, + }), + r.effect(t); + }), + (e.effects.effect.scale = function (t, n) { + var r = e(this), + i = e.extend(!0, {}, t), + s = e.effects.setMode(r, t.mode || "effect"), + o = + parseInt(t.percent, 10) || + (parseInt(t.percent, 10) === 0 ? 0 : s === "hide" ? 0 : 100), + u = t.direction || "both", + a = t.origin, + f = { + height: r.height(), + width: r.width(), + outerHeight: r.outerHeight(), + outerWidth: r.outerWidth(), + }, + l = { + y: u !== "horizontal" ? o / 100 : 1, + x: u !== "vertical" ? o / 100 : 1, + }; + (i.effect = "size"), + (i.queue = !1), + (i.complete = n), + s !== "effect" && + ((i.origin = a || ["middle", "center"]), (i.restore = !0)), + (i.from = + t.from || + (s === "show" + ? { height: 0, width: 0, outerHeight: 0, outerWidth: 0 } + : f)), + (i.to = { + height: f.height * l.y, + width: f.width * l.x, + outerHeight: f.outerHeight * l.y, + outerWidth: f.outerWidth * l.x, + }), + i.fade && + (s === "show" && ((i.from.opacity = 0), (i.to.opacity = 1)), + s === "hide" && ((i.from.opacity = 1), (i.to.opacity = 0))), + r.effect(i); + }), + (e.effects.effect.size = function (t, n) { + var r, + i, + s, + o = e(this), + u = [ + "position", + "top", + "bottom", + "left", + "right", + "width", + "height", + "overflow", + "opacity", + ], + a = [ + "position", + "top", + "bottom", + "left", + "right", + "overflow", + "opacity", + ], + f = ["width", "height", "overflow"], + l = ["fontSize"], + c = [ + "borderTopWidth", + "borderBottomWidth", + "paddingTop", + "paddingBottom", + ], + h = [ + "borderLeftWidth", + "borderRightWidth", + "paddingLeft", + "paddingRight", + ], + p = e.effects.setMode(o, t.mode || "effect"), + d = t.restore || p !== "effect", + v = t.scale || "both", + m = t.origin || ["middle", "center"], + g = o.css("position"), + y = d ? u : a, + b = { height: 0, width: 0, outerHeight: 0, outerWidth: 0 }; + p === "show" && o.show(), + (r = { + height: o.height(), + width: o.width(), + outerHeight: o.outerHeight(), + outerWidth: o.outerWidth(), + }), + t.mode === "toggle" && p === "show" + ? ((o.from = t.to || b), (o.to = t.from || r)) + : ((o.from = t.from || (p === "show" ? b : r)), + (o.to = t.to || (p === "hide" ? b : r))), + (s = { + from: { y: o.from.height / r.height, x: o.from.width / r.width }, + to: { y: o.to.height / r.height, x: o.to.width / r.width }, + }); + if (v === "box" || v === "both") + s.from.y !== s.to.y && + ((y = y.concat(c)), + (o.from = e.effects.setTransition(o, c, s.from.y, o.from)), + (o.to = e.effects.setTransition(o, c, s.to.y, o.to))), + s.from.x !== s.to.x && + ((y = y.concat(h)), + (o.from = e.effects.setTransition(o, h, s.from.x, o.from)), + (o.to = e.effects.setTransition(o, h, s.to.x, o.to))); + (v === "content" || v === "both") && + s.from.y !== s.to.y && + ((y = y.concat(l).concat(f)), + (o.from = e.effects.setTransition(o, l, s.from.y, o.from)), + (o.to = e.effects.setTransition(o, l, s.to.y, o.to))), + e.effects.save(o, y), + o.show(), + e.effects.createWrapper(o), + o.css("overflow", "hidden").css(o.from), + m && + ((i = e.effects.getBaseline(m, r)), + (o.from.top = (r.outerHeight - o.outerHeight()) * i.y), + (o.from.left = (r.outerWidth - o.outerWidth()) * i.x), + (o.to.top = (r.outerHeight - o.to.outerHeight) * i.y), + (o.to.left = (r.outerWidth - o.to.outerWidth) * i.x)), + o.css(o.from); + if (v === "content" || v === "both") + (c = c.concat(["marginTop", "marginBottom"]).concat(l)), + (h = h.concat(["marginLeft", "marginRight"])), + (f = u.concat(c).concat(h)), + o.find("*[width]").each(function () { + var n = e(this), + r = { + height: n.height(), + width: n.width(), + outerHeight: n.outerHeight(), + outerWidth: n.outerWidth(), + }; + d && e.effects.save(n, f), + (n.from = { + height: r.height * s.from.y, + width: r.width * s.from.x, + outerHeight: r.outerHeight * s.from.y, + outerWidth: r.outerWidth * s.from.x, + }), + (n.to = { + height: r.height * s.to.y, + width: r.width * s.to.x, + outerHeight: r.height * s.to.y, + outerWidth: r.width * s.to.x, + }), + s.from.y !== s.to.y && + ((n.from = e.effects.setTransition(n, c, s.from.y, n.from)), + (n.to = e.effects.setTransition(n, c, s.to.y, n.to))), + s.from.x !== s.to.x && + ((n.from = e.effects.setTransition(n, h, s.from.x, n.from)), + (n.to = e.effects.setTransition(n, h, s.to.x, n.to))), + n.css(n.from), + n.animate(n.to, t.duration, t.easing, function () { + d && e.effects.restore(n, f); + }); + }); + o.animate(o.to, { + queue: !1, + duration: t.duration, + easing: t.easing, + complete: function () { + o.to.opacity === 0 && o.css("opacity", o.from.opacity), + p === "hide" && o.hide(), + e.effects.restore(o, y), + d || + (g === "static" + ? o.css({ + position: "relative", + top: o.to.top, + left: o.to.left, + }) + : e.each(["top", "left"], function (e, t) { + o.css(t, function (t, n) { + var r = parseInt(n, 10), + i = e ? o.to.left : o.to.top; + return n === "auto" ? i + "px" : r + i + "px"; + }); + })), + e.effects.removeWrapper(o), + n(); + }, + }); + }); +})(jQuery); +(function (e, t) { + e.effects.effect.shake = function (t, n) { + var r = e(this), + i = ["position", "top", "bottom", "left", "right", "height", "width"], + s = e.effects.setMode(r, t.mode || "effect"), + o = t.direction || "left", + u = t.distance || 20, + a = t.times || 3, + f = a * 2 + 1, + l = Math.round(t.duration / f), + c = o === "up" || o === "down" ? "top" : "left", + h = o === "up" || o === "left", + p = {}, + d = {}, + v = {}, + m, + g = r.queue(), + y = g.length; + e.effects.save(r, i), + r.show(), + e.effects.createWrapper(r), + (p[c] = (h ? "-=" : "+=") + u), + (d[c] = (h ? "+=" : "-=") + u * 2), + (v[c] = (h ? "-=" : "+=") + u * 2), + r.animate(p, l, t.easing); + for (m = 1; m < a; m++) r.animate(d, l, t.easing).animate(v, l, t.easing); + r + .animate(d, l, t.easing) + .animate(p, l / 2, t.easing) + .queue(function () { + s === "hide" && r.hide(), + e.effects.restore(r, i), + e.effects.removeWrapper(r), + n(); + }), + y > 1 && g.splice.apply(g, [1, 0].concat(g.splice(y, f + 1))), + r.dequeue(); + }; +})(jQuery); +(function (e, t) { + e.effects.effect.slide = function (t, n) { + var r = e(this), + i = ["position", "top", "bottom", "left", "right", "width", "height"], + s = e.effects.setMode(r, t.mode || "show"), + o = s === "show", + u = t.direction || "left", + a = u === "up" || u === "down" ? "top" : "left", + f = u === "up" || u === "left", + l, + c = {}; + e.effects.save(r, i), + r.show(), + (l = t.distance || r[a === "top" ? "outerHeight" : "outerWidth"](!0)), + e.effects.createWrapper(r).css({ overflow: "hidden" }), + o && r.css(a, f ? (isNaN(l) ? "-" + l : -l) : l), + (c[a] = (o ? (f ? "+=" : "-=") : f ? "-=" : "+=") + l), + r.animate(c, { + queue: !1, + duration: t.duration, + easing: t.easing, + complete: function () { + s === "hide" && r.hide(), + e.effects.restore(r, i), + e.effects.removeWrapper(r), + n(); + }, + }); + }; +})(jQuery); +(function (e, t) { + e.effects.effect.transfer = function (t, n) { + var r = e(this), + i = e(t.to), + s = i.css("position") === "fixed", + o = e("body"), + u = s ? o.scrollTop() : 0, + a = s ? o.scrollLeft() : 0, + f = i.offset(), + l = { + top: f.top - u, + left: f.left - a, + height: i.innerHeight(), + width: i.innerWidth(), + }, + c = r.offset(), + h = e('
          ') + .appendTo(document.body) + .addClass(t.className) + .css({ + top: c.top - u, + left: c.left - a, + height: r.innerHeight(), + width: r.innerWidth(), + position: s ? "fixed" : "absolute", + }) + .animate(l, t.duration, t.easing, function () { + h.remove(), n(); + }); + }; +})(jQuery); +(function (e, t) { + var n = !1; + e.widget("ui.menu", { + version: "1.9.2", + defaultElement: "
            ", + delay: 300, + options: { + icons: { submenu: "ui-icon-carat-1-e" }, + menus: "ul", + position: { my: "left top", at: "right top" }, + role: "menu", + blur: null, + focus: null, + select: null, + }, + _create: function () { + (this.activeMenu = this.element), + this.element + .uniqueId() + .addClass("ui-menu ui-widget ui-widget-content ui-corner-all") + .toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length) + .attr({ role: this.options.role, tabIndex: 0 }) + .bind( + "click" + this.eventNamespace, + e.proxy(function (e) { + this.options.disabled && e.preventDefault(); + }, this), + ), + this.options.disabled && + this.element + .addClass("ui-state-disabled") + .attr("aria-disabled", "true"), + this._on({ + "mousedown .ui-menu-item > a": function (e) { + e.preventDefault(); + }, + "click .ui-state-disabled > a": function (e) { + e.preventDefault(); + }, + "click .ui-menu-item:has(a)": function (t) { + var r = e(t.target).closest(".ui-menu-item"); + !n && + r.not(".ui-state-disabled").length && + ((n = !0), + this.select(t), + r.has(".ui-menu").length + ? this.expand(t) + : this.element.is(":focus") || + (this.element.trigger("focus", [!0]), + this.active && + this.active.parents(".ui-menu").length === 1 && + clearTimeout(this.timer))); + }, + "mouseenter .ui-menu-item": function (t) { + var n = e(t.currentTarget); + n + .siblings() + .children(".ui-state-active") + .removeClass("ui-state-active"), + this.focus(t, n); + }, + mouseleave: "collapseAll", + "mouseleave .ui-menu": "collapseAll", + focus: function (e, t) { + var n = this.active || this.element.children(".ui-menu-item").eq(0); + t || this.focus(e, n); + }, + blur: function (t) { + this._delay(function () { + e.contains(this.element[0], this.document[0].activeElement) || + this.collapseAll(t); + }); + }, + keydown: "_keydown", + }), + this.refresh(), + this._on(this.document, { + click: function (t) { + e(t.target).closest(".ui-menu").length || this.collapseAll(t), + (n = !1); + }, + }); + }, + _destroy: function () { + this.element + .removeAttr("aria-activedescendant") + .find(".ui-menu") + .andSelf() + .removeClass( + "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons", + ) + .removeAttr("role") + .removeAttr("tabIndex") + .removeAttr("aria-labelledby") + .removeAttr("aria-expanded") + .removeAttr("aria-hidden") + .removeAttr("aria-disabled") + .removeUniqueId() + .show(), + this.element + .find(".ui-menu-item") + .removeClass("ui-menu-item") + .removeAttr("role") + .removeAttr("aria-disabled") + .children("a") + .removeUniqueId() + .removeClass("ui-corner-all ui-state-hover") + .removeAttr("tabIndex") + .removeAttr("role") + .removeAttr("aria-haspopup") + .children() + .each(function () { + var t = e(this); + t.data("ui-menu-submenu-carat") && t.remove(); + }), + this.element + .find(".ui-menu-divider") + .removeClass("ui-menu-divider ui-widget-content"); + }, + _keydown: function (t) { + function a(e) { + return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); + } + var n, + r, + i, + s, + o, + u = !0; + switch (t.keyCode) { + case e.ui.keyCode.PAGE_UP: + this.previousPage(t); + break; + case e.ui.keyCode.PAGE_DOWN: + this.nextPage(t); + break; + case e.ui.keyCode.HOME: + this._move("first", "first", t); + break; + case e.ui.keyCode.END: + this._move("last", "last", t); + break; + case e.ui.keyCode.UP: + this.previous(t); + break; + case e.ui.keyCode.DOWN: + this.next(t); + break; + case e.ui.keyCode.LEFT: + this.collapse(t); + break; + case e.ui.keyCode.RIGHT: + this.active && + !this.active.is(".ui-state-disabled") && + this.expand(t); + break; + case e.ui.keyCode.ENTER: + case e.ui.keyCode.SPACE: + this._activate(t); + break; + case e.ui.keyCode.ESCAPE: + this.collapse(t); + break; + default: + (u = !1), + (r = this.previousFilter || ""), + (i = String.fromCharCode(t.keyCode)), + (s = !1), + clearTimeout(this.filterTimer), + i === r ? (s = !0) : (i = r + i), + (o = new RegExp("^" + a(i), "i")), + (n = this.activeMenu.children(".ui-menu-item").filter(function () { + return o.test(e(this).children("a").text()); + })), + (n = + s && n.index(this.active.next()) !== -1 + ? this.active.nextAll(".ui-menu-item") + : n), + n.length || + ((i = String.fromCharCode(t.keyCode)), + (o = new RegExp("^" + a(i), "i")), + (n = this.activeMenu + .children(".ui-menu-item") + .filter(function () { + return o.test(e(this).children("a").text()); + }))), + n.length + ? (this.focus(t, n), + n.length > 1 + ? ((this.previousFilter = i), + (this.filterTimer = this._delay(function () { + delete this.previousFilter; + }, 1e3))) + : delete this.previousFilter) + : delete this.previousFilter; + } + u && t.preventDefault(); + }, + _activate: function (e) { + this.active.is(".ui-state-disabled") || + (this.active.children("a[aria-haspopup='true']").length + ? this.expand(e) + : this.select(e)); + }, + refresh: function () { + var t, + n = this.options.icons.submenu, + r = this.element.find(this.options.menus); + r + .filter(":not(.ui-menu)") + .addClass("ui-menu ui-widget ui-widget-content ui-corner-all") + .hide() + .attr({ + role: this.options.role, + "aria-hidden": "true", + "aria-expanded": "false", + }) + .each(function () { + var t = e(this), + r = t.prev("a"), + i = e("") + .addClass("ui-menu-icon ui-icon " + n) + .data("ui-menu-submenu-carat", !0); + r.attr("aria-haspopup", "true").prepend(i), + t.attr("aria-labelledby", r.attr("id")); + }), + (t = r.add(this.element)), + t + .children(":not(.ui-menu-item):has(a)") + .addClass("ui-menu-item") + .attr("role", "presentation") + .children("a") + .uniqueId() + .addClass("ui-corner-all") + .attr({ tabIndex: -1, role: this._itemRole() }), + t.children(":not(.ui-menu-item)").each(function () { + var t = e(this); + /[^\-—–\s]/.test(t.text()) || + t.addClass("ui-widget-content ui-menu-divider"); + }), + t.children(".ui-state-disabled").attr("aria-disabled", "true"), + this.active && + !e.contains(this.element[0], this.active[0]) && + this.blur(); + }, + _itemRole: function () { + return { menu: "menuitem", listbox: "option" }[this.options.role]; + }, + focus: function (e, t) { + var n, r; + this.blur(e, e && e.type === "focus"), + this._scrollIntoView(t), + (this.active = t.first()), + (r = this.active.children("a").addClass("ui-state-focus")), + this.options.role && + this.element.attr("aria-activedescendant", r.attr("id")), + this.active + .parent() + .closest(".ui-menu-item") + .children("a:first") + .addClass("ui-state-active"), + e && e.type === "keydown" + ? this._close() + : (this.timer = this._delay(function () { + this._close(); + }, this.delay)), + (n = t.children(".ui-menu")), + n.length && /^mouse/.test(e.type) && this._startOpening(n), + (this.activeMenu = t.parent()), + this._trigger("focus", e, { item: t }); + }, + _scrollIntoView: function (t) { + var n, r, i, s, o, u; + this._hasScroll() && + ((n = parseFloat(e.css(this.activeMenu[0], "borderTopWidth")) || 0), + (r = parseFloat(e.css(this.activeMenu[0], "paddingTop")) || 0), + (i = t.offset().top - this.activeMenu.offset().top - n - r), + (s = this.activeMenu.scrollTop()), + (o = this.activeMenu.height()), + (u = t.height()), + i < 0 + ? this.activeMenu.scrollTop(s + i) + : i + u > o && this.activeMenu.scrollTop(s + i - o + u)); + }, + blur: function (e, t) { + t || clearTimeout(this.timer); + if (!this.active) return; + this.active.children("a").removeClass("ui-state-focus"), + (this.active = null), + this._trigger("blur", e, { item: this.active }); + }, + _startOpening: function (e) { + clearTimeout(this.timer); + if (e.attr("aria-hidden") !== "true") return; + this.timer = this._delay(function () { + this._close(), this._open(e); + }, this.delay); + }, + _open: function (t) { + var n = e.extend({ of: this.active }, this.options.position); + clearTimeout(this.timer), + this.element + .find(".ui-menu") + .not(t.parents(".ui-menu")) + .hide() + .attr("aria-hidden", "true"), + t + .show() + .removeAttr("aria-hidden") + .attr("aria-expanded", "true") + .position(n); + }, + collapseAll: function (t, n) { + clearTimeout(this.timer), + (this.timer = this._delay(function () { + var r = n + ? this.element + : e(t && t.target).closest(this.element.find(".ui-menu")); + r.length || (r = this.element), + this._close(r), + this.blur(t), + (this.activeMenu = r); + }, this.delay)); + }, + _close: function (e) { + e || (e = this.active ? this.active.parent() : this.element), + e + .find(".ui-menu") + .hide() + .attr("aria-hidden", "true") + .attr("aria-expanded", "false") + .end() + .find("a.ui-state-active") + .removeClass("ui-state-active"); + }, + collapse: function (e) { + var t = + this.active && + this.active.parent().closest(".ui-menu-item", this.element); + t && t.length && (this._close(), this.focus(e, t)); + }, + expand: function (e) { + var t = + this.active && + this.active.children(".ui-menu ").children(".ui-menu-item").first(); + t && + t.length && + (this._open(t.parent()), + this._delay(function () { + this.focus(e, t); + })); + }, + next: function (e) { + this._move("next", "first", e); + }, + previous: function (e) { + this._move("prev", "last", e); + }, + isFirstItem: function () { + return this.active && !this.active.prevAll(".ui-menu-item").length; + }, + isLastItem: function () { + return this.active && !this.active.nextAll(".ui-menu-item").length; + }, + _move: function (e, t, n) { + var r; + this.active && + (e === "first" || e === "last" + ? (r = + this.active[e === "first" ? "prevAll" : "nextAll"]( + ".ui-menu-item", + ).eq(-1)) + : (r = this.active[e + "All"](".ui-menu-item").eq(0))); + if (!r || !r.length || !this.active) + r = this.activeMenu.children(".ui-menu-item")[t](); + this.focus(n, r); + }, + nextPage: function (t) { + var n, r, i; + if (!this.active) { + this.next(t); + return; + } + if (this.isLastItem()) return; + this._hasScroll() + ? ((r = this.active.offset().top), + (i = this.element.height()), + this.active.nextAll(".ui-menu-item").each(function () { + return (n = e(this)), n.offset().top - r - i < 0; + }), + this.focus(t, n)) + : this.focus( + t, + this.activeMenu + .children(".ui-menu-item") + [this.active ? "last" : "first"](), + ); + }, + previousPage: function (t) { + var n, r, i; + if (!this.active) { + this.next(t); + return; + } + if (this.isFirstItem()) return; + this._hasScroll() + ? ((r = this.active.offset().top), + (i = this.element.height()), + this.active.prevAll(".ui-menu-item").each(function () { + return (n = e(this)), n.offset().top - r + i > 0; + }), + this.focus(t, n)) + : this.focus(t, this.activeMenu.children(".ui-menu-item").first()); + }, + _hasScroll: function () { + return this.element.outerHeight() < this.element.prop("scrollHeight"); + }, + select: function (t) { + this.active = this.active || e(t.target).closest(".ui-menu-item"); + var n = { item: this.active }; + this.active.has(".ui-menu").length || this.collapseAll(t, !0), + this._trigger("select", t, n); + }, + }); +})(jQuery); +(function (e, t) { + e.widget("ui.progressbar", { + version: "1.9.2", + options: { value: 0, max: 100 }, + min: 0, + _create: function () { + this.element + .addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all") + .attr({ + role: "progressbar", + "aria-valuemin": this.min, + "aria-valuemax": this.options.max, + "aria-valuenow": this._value(), + }), + (this.valueDiv = e( + "
            ", + ).appendTo(this.element)), + (this.oldValue = this._value()), + this._refreshValue(); + }, + _destroy: function () { + this.element + .removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all") + .removeAttr("role") + .removeAttr("aria-valuemin") + .removeAttr("aria-valuemax") + .removeAttr("aria-valuenow"), + this.valueDiv.remove(); + }, + value: function (e) { + return e === t ? this._value() : (this._setOption("value", e), this); + }, + _setOption: function (e, t) { + e === "value" && + ((this.options.value = t), + this._refreshValue(), + this._value() === this.options.max && this._trigger("complete")), + this._super(e, t); + }, + _value: function () { + var e = this.options.value; + return ( + typeof e != "number" && (e = 0), + Math.min(this.options.max, Math.max(this.min, e)) + ); + }, + _percentage: function () { + return (100 * this._value()) / this.options.max; + }, + _refreshValue: function () { + var e = this.value(), + t = this._percentage(); + this.oldValue !== e && ((this.oldValue = e), this._trigger("change")), + this.valueDiv + .toggle(e > this.min) + .toggleClass("ui-corner-right", e === this.options.max) + .width(t.toFixed(0) + "%"), + this.element.attr("aria-valuenow", e); + }, + }); +})(jQuery); +(function (e, t) { + e.widget("ui.resizable", e.ui.mouse, { + version: "1.9.2", + widgetEventPrefix: "resize", + options: { + alsoResize: !1, + animate: !1, + animateDuration: "slow", + animateEasing: "swing", + aspectRatio: !1, + autoHide: !1, + containment: !1, + ghost: !1, + grid: !1, + handles: "e,s,se", + helper: !1, + maxHeight: null, + maxWidth: null, + minHeight: 10, + minWidth: 10, + zIndex: 1e3, + }, + _create: function () { + var t = this, + n = this.options; + this.element.addClass("ui-resizable"), + e.extend(this, { + _aspectRatio: !!n.aspectRatio, + aspectRatio: n.aspectRatio, + originalElement: this.element, + _proportionallyResizeElements: [], + _helper: + n.helper || n.ghost || n.animate + ? n.helper || "ui-resizable-helper" + : null, + }), + this.element[0].nodeName.match( + /canvas|textarea|input|select|button|img/i, + ) && + (this.element.wrap( + e('
            ').css({ + position: this.element.css("position"), + width: this.element.outerWidth(), + height: this.element.outerHeight(), + top: this.element.css("top"), + left: this.element.css("left"), + }), + ), + (this.element = this.element + .parent() + .data("resizable", this.element.data("resizable"))), + (this.elementIsWrapper = !0), + this.element.css({ + marginLeft: this.originalElement.css("marginLeft"), + marginTop: this.originalElement.css("marginTop"), + marginRight: this.originalElement.css("marginRight"), + marginBottom: this.originalElement.css("marginBottom"), + }), + this.originalElement.css({ + marginLeft: 0, + marginTop: 0, + marginRight: 0, + marginBottom: 0, + }), + (this.originalResizeStyle = this.originalElement.css("resize")), + this.originalElement.css("resize", "none"), + this._proportionallyResizeElements.push( + this.originalElement.css({ + position: "static", + zoom: 1, + display: "block", + }), + ), + this.originalElement.css({ + margin: this.originalElement.css("margin"), + }), + this._proportionallyResize()), + (this.handles = + n.handles || + (e(".ui-resizable-handle", this.element).length + ? { + n: ".ui-resizable-n", + e: ".ui-resizable-e", + s: ".ui-resizable-s", + w: ".ui-resizable-w", + se: ".ui-resizable-se", + sw: ".ui-resizable-sw", + ne: ".ui-resizable-ne", + nw: ".ui-resizable-nw", + } + : "e,s,se")); + if (this.handles.constructor == String) { + this.handles == "all" && (this.handles = "n,e,s,w,se,sw,ne,nw"); + var r = this.handles.split(","); + this.handles = {}; + for (var i = 0; i < r.length; i++) { + var s = e.trim(r[i]), + o = "ui-resizable-" + s, + u = e('
            '); + u.css({ zIndex: n.zIndex }), + "se" == s && u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), + (this.handles[s] = ".ui-resizable-" + s), + this.element.append(u); + } + } + (this._renderAxis = function (t) { + t = t || this.element; + for (var n in this.handles) { + this.handles[n].constructor == String && + (this.handles[n] = e(this.handles[n], this.element).show()); + if ( + this.elementIsWrapper && + this.originalElement[0].nodeName.match( + /textarea|input|select|button/i, + ) + ) { + var r = e(this.handles[n], this.element), + i = 0; + i = /sw|ne|nw|se|n|s/.test(n) ? r.outerHeight() : r.outerWidth(); + var s = [ + "padding", + /ne|nw|n/.test(n) + ? "Top" + : /se|sw|s/.test(n) + ? "Bottom" + : /^e$/.test(n) + ? "Right" + : "Left", + ].join(""); + t.css(s, i), this._proportionallyResize(); + } + if (!e(this.handles[n]).length) continue; + } + }), + this._renderAxis(this.element), + (this._handles = e( + ".ui-resizable-handle", + this.element, + ).disableSelection()), + this._handles.mouseover(function () { + if (!t.resizing) { + if (this.className) + var e = this.className.match( + /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i, + ); + t.axis = e && e[1] ? e[1] : "se"; + } + }), + n.autoHide && + (this._handles.hide(), + e(this.element) + .addClass("ui-resizable-autohide") + .mouseenter(function () { + if (n.disabled) return; + e(this).removeClass("ui-resizable-autohide"), t._handles.show(); + }) + .mouseleave(function () { + if (n.disabled) return; + t.resizing || + (e(this).addClass("ui-resizable-autohide"), t._handles.hide()); + })), + this._mouseInit(); + }, + _destroy: function () { + this._mouseDestroy(); + var t = function (t) { + e(t) + .removeClass( + "ui-resizable ui-resizable-disabled ui-resizable-resizing", + ) + .removeData("resizable") + .removeData("ui-resizable") + .unbind(".resizable") + .find(".ui-resizable-handle") + .remove(); + }; + if (this.elementIsWrapper) { + t(this.element); + var n = this.element; + this.originalElement + .css({ + position: n.css("position"), + width: n.outerWidth(), + height: n.outerHeight(), + top: n.css("top"), + left: n.css("left"), + }) + .insertAfter(n), + n.remove(); + } + return ( + this.originalElement.css("resize", this.originalResizeStyle), + t(this.originalElement), + this + ); + }, + _mouseCapture: function (t) { + var n = !1; + for (var r in this.handles) e(this.handles[r])[0] == t.target && (n = !0); + return !this.options.disabled && n; + }, + _mouseStart: function (t) { + var r = this.options, + i = this.element.position(), + s = this.element; + (this.resizing = !0), + (this.documentScroll = { + top: e(document).scrollTop(), + left: e(document).scrollLeft(), + }), + (s.is(".ui-draggable") || /absolute/.test(s.css("position"))) && + s.css({ position: "absolute", top: i.top, left: i.left }), + this._renderProxy(); + var o = n(this.helper.css("left")), + u = n(this.helper.css("top")); + r.containment && + ((o += e(r.containment).scrollLeft() || 0), + (u += e(r.containment).scrollTop() || 0)), + (this.offset = this.helper.offset()), + (this.position = { left: o, top: u }), + (this.size = this._helper + ? { width: s.outerWidth(), height: s.outerHeight() } + : { width: s.width(), height: s.height() }), + (this.originalSize = this._helper + ? { width: s.outerWidth(), height: s.outerHeight() } + : { width: s.width(), height: s.height() }), + (this.originalPosition = { left: o, top: u }), + (this.sizeDiff = { + width: s.outerWidth() - s.width(), + height: s.outerHeight() - s.height(), + }), + (this.originalMousePosition = { left: t.pageX, top: t.pageY }), + (this.aspectRatio = + typeof r.aspectRatio == "number" + ? r.aspectRatio + : this.originalSize.width / this.originalSize.height || 1); + var a = e(".ui-resizable-" + this.axis).css("cursor"); + return ( + e("body").css("cursor", a == "auto" ? this.axis + "-resize" : a), + s.addClass("ui-resizable-resizing"), + this._propagate("start", t), + !0 + ); + }, + _mouseDrag: function (e) { + var t = this.helper, + n = this.options, + r = {}, + i = this, + s = this.originalMousePosition, + o = this.axis, + u = e.pageX - s.left || 0, + a = e.pageY - s.top || 0, + f = this._change[o]; + if (!f) return !1; + var l = f.apply(this, [e, u, a]); + this._updateVirtualBoundaries(e.shiftKey); + if (this._aspectRatio || e.shiftKey) l = this._updateRatio(l, e); + return ( + (l = this._respectSize(l, e)), + this._propagate("resize", e), + t.css({ + top: this.position.top + "px", + left: this.position.left + "px", + width: this.size.width + "px", + height: this.size.height + "px", + }), + !this._helper && + this._proportionallyResizeElements.length && + this._proportionallyResize(), + this._updateCache(l), + this._trigger("resize", e, this.ui()), + !1 + ); + }, + _mouseStop: function (t) { + this.resizing = !1; + var n = this.options, + r = this; + if (this._helper) { + var i = this._proportionallyResizeElements, + s = i.length && /textarea/i.test(i[0].nodeName), + o = s && e.ui.hasScroll(i[0], "left") ? 0 : r.sizeDiff.height, + u = s ? 0 : r.sizeDiff.width, + a = { width: r.helper.width() - u, height: r.helper.height() - o }, + f = + parseInt(r.element.css("left"), 10) + + (r.position.left - r.originalPosition.left) || null, + l = + parseInt(r.element.css("top"), 10) + + (r.position.top - r.originalPosition.top) || null; + n.animate || this.element.css(e.extend(a, { top: l, left: f })), + r.helper.height(r.size.height), + r.helper.width(r.size.width), + this._helper && !n.animate && this._proportionallyResize(); + } + return ( + e("body").css("cursor", "auto"), + this.element.removeClass("ui-resizable-resizing"), + this._propagate("stop", t), + this._helper && this.helper.remove(), + !1 + ); + }, + _updateVirtualBoundaries: function (e) { + var t = this.options, + n, + i, + s, + o, + u; + u = { + minWidth: r(t.minWidth) ? t.minWidth : 0, + maxWidth: r(t.maxWidth) ? t.maxWidth : Infinity, + minHeight: r(t.minHeight) ? t.minHeight : 0, + maxHeight: r(t.maxHeight) ? t.maxHeight : Infinity, + }; + if (this._aspectRatio || e) + (n = u.minHeight * this.aspectRatio), + (s = u.minWidth / this.aspectRatio), + (i = u.maxHeight * this.aspectRatio), + (o = u.maxWidth / this.aspectRatio), + n > u.minWidth && (u.minWidth = n), + s > u.minHeight && (u.minHeight = s), + i < u.maxWidth && (u.maxWidth = i), + o < u.maxHeight && (u.maxHeight = o); + this._vBoundaries = u; + }, + _updateCache: function (e) { + var t = this.options; + (this.offset = this.helper.offset()), + r(e.left) && (this.position.left = e.left), + r(e.top) && (this.position.top = e.top), + r(e.height) && (this.size.height = e.height), + r(e.width) && (this.size.width = e.width); + }, + _updateRatio: function (e, t) { + var n = this.options, + i = this.position, + s = this.size, + o = this.axis; + return ( + r(e.height) + ? (e.width = e.height * this.aspectRatio) + : r(e.width) && (e.height = e.width / this.aspectRatio), + o == "sw" && ((e.left = i.left + (s.width - e.width)), (e.top = null)), + o == "nw" && + ((e.top = i.top + (s.height - e.height)), + (e.left = i.left + (s.width - e.width))), + e + ); + }, + _respectSize: function (e, t) { + var n = this.helper, + i = this._vBoundaries, + s = this._aspectRatio || t.shiftKey, + o = this.axis, + u = r(e.width) && i.maxWidth && i.maxWidth < e.width, + a = r(e.height) && i.maxHeight && i.maxHeight < e.height, + f = r(e.width) && i.minWidth && i.minWidth > e.width, + l = r(e.height) && i.minHeight && i.minHeight > e.height; + f && (e.width = i.minWidth), + l && (e.height = i.minHeight), + u && (e.width = i.maxWidth), + a && (e.height = i.maxHeight); + var c = this.originalPosition.left + this.originalSize.width, + h = this.position.top + this.size.height, + p = /sw|nw|w/.test(o), + d = /nw|ne|n/.test(o); + f && p && (e.left = c - i.minWidth), + u && p && (e.left = c - i.maxWidth), + l && d && (e.top = h - i.minHeight), + a && d && (e.top = h - i.maxHeight); + var v = !e.width && !e.height; + return ( + v && !e.left && e.top + ? (e.top = null) + : v && !e.top && e.left && (e.left = null), + e + ); + }, + _proportionallyResize: function () { + var t = this.options; + if (!this._proportionallyResizeElements.length) return; + var n = this.helper || this.element; + for (var r = 0; r < this._proportionallyResizeElements.length; r++) { + var i = this._proportionallyResizeElements[r]; + if (!this.borderDif) { + var s = [ + i.css("borderTopWidth"), + i.css("borderRightWidth"), + i.css("borderBottomWidth"), + i.css("borderLeftWidth"), + ], + o = [ + i.css("paddingTop"), + i.css("paddingRight"), + i.css("paddingBottom"), + i.css("paddingLeft"), + ]; + this.borderDif = e.map(s, function (e, t) { + var n = parseInt(e, 10) || 0, + r = parseInt(o[t], 10) || 0; + return n + r; + }); + } + i.css({ + height: n.height() - this.borderDif[0] - this.borderDif[2] || 0, + width: n.width() - this.borderDif[1] - this.borderDif[3] || 0, + }); + } + }, + _renderProxy: function () { + var t = this.element, + n = this.options; + this.elementOffset = t.offset(); + if (this._helper) { + this.helper = this.helper || e('
            '); + var r = e.ui.ie6 ? 1 : 0, + i = e.ui.ie6 ? 2 : -1; + this.helper.addClass(this._helper).css({ + width: this.element.outerWidth() + i, + height: this.element.outerHeight() + i, + position: "absolute", + left: this.elementOffset.left - r + "px", + top: this.elementOffset.top - r + "px", + zIndex: ++n.zIndex, + }), + this.helper.appendTo("body").disableSelection(); + } else this.helper = this.element; + }, + _change: { + e: function (e, t, n) { + return { width: this.originalSize.width + t }; + }, + w: function (e, t, n) { + var r = this.options, + i = this.originalSize, + s = this.originalPosition; + return { left: s.left + t, width: i.width - t }; + }, + n: function (e, t, n) { + var r = this.options, + i = this.originalSize, + s = this.originalPosition; + return { top: s.top + n, height: i.height - n }; + }, + s: function (e, t, n) { + return { height: this.originalSize.height + n }; + }, + se: function (t, n, r) { + return e.extend( + this._change.s.apply(this, arguments), + this._change.e.apply(this, [t, n, r]), + ); + }, + sw: function (t, n, r) { + return e.extend( + this._change.s.apply(this, arguments), + this._change.w.apply(this, [t, n, r]), + ); + }, + ne: function (t, n, r) { + return e.extend( + this._change.n.apply(this, arguments), + this._change.e.apply(this, [t, n, r]), + ); + }, + nw: function (t, n, r) { + return e.extend( + this._change.n.apply(this, arguments), + this._change.w.apply(this, [t, n, r]), + ); + }, + }, + _propagate: function (t, n) { + e.ui.plugin.call(this, t, [n, this.ui()]), + t != "resize" && this._trigger(t, n, this.ui()); + }, + plugins: {}, + ui: function () { + return { + originalElement: this.originalElement, + element: this.element, + helper: this.helper, + position: this.position, + size: this.size, + originalSize: this.originalSize, + originalPosition: this.originalPosition, + }; + }, + }), + e.ui.plugin.add("resizable", "alsoResize", { + start: function (t, n) { + var r = e(this).data("resizable"), + i = r.options, + s = function (t) { + e(t).each(function () { + var t = e(this); + t.data("resizable-alsoresize", { + width: parseInt(t.width(), 10), + height: parseInt(t.height(), 10), + left: parseInt(t.css("left"), 10), + top: parseInt(t.css("top"), 10), + }); + }); + }; + typeof i.alsoResize == "object" && !i.alsoResize.parentNode + ? i.alsoResize.length + ? ((i.alsoResize = i.alsoResize[0]), s(i.alsoResize)) + : e.each(i.alsoResize, function (e) { + s(e); + }) + : s(i.alsoResize); + }, + resize: function (t, n) { + var r = e(this).data("resizable"), + i = r.options, + s = r.originalSize, + o = r.originalPosition, + u = { + height: r.size.height - s.height || 0, + width: r.size.width - s.width || 0, + top: r.position.top - o.top || 0, + left: r.position.left - o.left || 0, + }, + a = function (t, r) { + e(t).each(function () { + var t = e(this), + i = e(this).data("resizable-alsoresize"), + s = {}, + o = + r && r.length + ? r + : t.parents(n.originalElement[0]).length + ? ["width", "height"] + : ["width", "height", "top", "left"]; + e.each(o, function (e, t) { + var n = (i[t] || 0) + (u[t] || 0); + n && n >= 0 && (s[t] = n || null); + }), + t.css(s); + }); + }; + typeof i.alsoResize == "object" && !i.alsoResize.nodeType + ? e.each(i.alsoResize, function (e, t) { + a(e, t); + }) + : a(i.alsoResize); + }, + stop: function (t, n) { + e(this).removeData("resizable-alsoresize"); + }, + }), + e.ui.plugin.add("resizable", "animate", { + stop: function (t, n) { + var r = e(this).data("resizable"), + i = r.options, + s = r._proportionallyResizeElements, + o = s.length && /textarea/i.test(s[0].nodeName), + u = o && e.ui.hasScroll(s[0], "left") ? 0 : r.sizeDiff.height, + a = o ? 0 : r.sizeDiff.width, + f = { width: r.size.width - a, height: r.size.height - u }, + l = + parseInt(r.element.css("left"), 10) + + (r.position.left - r.originalPosition.left) || null, + c = + parseInt(r.element.css("top"), 10) + + (r.position.top - r.originalPosition.top) || null; + r.element.animate(e.extend(f, c && l ? { top: c, left: l } : {}), { + duration: i.animateDuration, + easing: i.animateEasing, + step: function () { + var n = { + width: parseInt(r.element.css("width"), 10), + height: parseInt(r.element.css("height"), 10), + top: parseInt(r.element.css("top"), 10), + left: parseInt(r.element.css("left"), 10), + }; + s && s.length && e(s[0]).css({ width: n.width, height: n.height }), + r._updateCache(n), + r._propagate("resize", t); + }, + }); + }, + }), + e.ui.plugin.add("resizable", "containment", { + start: function (t, r) { + var i = e(this).data("resizable"), + s = i.options, + o = i.element, + u = s.containment, + a = + u instanceof e + ? u.get(0) + : /parent/.test(u) + ? o.parent().get(0) + : u; + if (!a) return; + i.containerElement = e(a); + if (/document/.test(u) || u == document) + (i.containerOffset = { left: 0, top: 0 }), + (i.containerPosition = { left: 0, top: 0 }), + (i.parentData = { + element: e(document), + left: 0, + top: 0, + width: e(document).width(), + height: + e(document).height() || document.body.parentNode.scrollHeight, + }); + else { + var f = e(a), + l = []; + e(["Top", "Right", "Left", "Bottom"]).each(function (e, t) { + l[e] = n(f.css("padding" + t)); + }), + (i.containerOffset = f.offset()), + (i.containerPosition = f.position()), + (i.containerSize = { + height: f.innerHeight() - l[3], + width: f.innerWidth() - l[1], + }); + var c = i.containerOffset, + h = i.containerSize.height, + p = i.containerSize.width, + d = e.ui.hasScroll(a, "left") ? a.scrollWidth : p, + v = e.ui.hasScroll(a) ? a.scrollHeight : h; + i.parentData = { + element: a, + left: c.left, + top: c.top, + width: d, + height: v, + }; + } + }, + resize: function (t, n) { + var r = e(this).data("resizable"), + i = r.options, + s = r.containerSize, + o = r.containerOffset, + u = r.size, + a = r.position, + f = r._aspectRatio || t.shiftKey, + l = { top: 0, left: 0 }, + c = r.containerElement; + c[0] != document && /static/.test(c.css("position")) && (l = o), + a.left < (r._helper ? o.left : 0) && + ((r.size.width = + r.size.width + + (r._helper + ? r.position.left - o.left + : r.position.left - l.left)), + f && (r.size.height = r.size.width / r.aspectRatio), + (r.position.left = i.helper ? o.left : 0)), + a.top < (r._helper ? o.top : 0) && + ((r.size.height = + r.size.height + + (r._helper ? r.position.top - o.top : r.position.top)), + f && (r.size.width = r.size.height * r.aspectRatio), + (r.position.top = r._helper ? o.top : 0)), + (r.offset.left = r.parentData.left + r.position.left), + (r.offset.top = r.parentData.top + r.position.top); + var h = Math.abs( + (r._helper ? r.offset.left - l.left : r.offset.left - l.left) + + r.sizeDiff.width, + ), + p = Math.abs( + (r._helper ? r.offset.top - l.top : r.offset.top - o.top) + + r.sizeDiff.height, + ), + d = r.containerElement.get(0) == r.element.parent().get(0), + v = /relative|absolute/.test(r.containerElement.css("position")); + d && v && (h -= r.parentData.left), + h + r.size.width >= r.parentData.width && + ((r.size.width = r.parentData.width - h), + f && (r.size.height = r.size.width / r.aspectRatio)), + p + r.size.height >= r.parentData.height && + ((r.size.height = r.parentData.height - p), + f && (r.size.width = r.size.height * r.aspectRatio)); + }, + stop: function (t, n) { + var r = e(this).data("resizable"), + i = r.options, + s = r.position, + o = r.containerOffset, + u = r.containerPosition, + a = r.containerElement, + f = e(r.helper), + l = f.offset(), + c = f.outerWidth() - r.sizeDiff.width, + h = f.outerHeight() - r.sizeDiff.height; + r._helper && + !i.animate && + /relative/.test(a.css("position")) && + e(this).css({ left: l.left - u.left - o.left, width: c, height: h }), + r._helper && + !i.animate && + /static/.test(a.css("position")) && + e(this).css({ + left: l.left - u.left - o.left, + width: c, + height: h, + }); + }, + }), + e.ui.plugin.add("resizable", "ghost", { + start: function (t, n) { + var r = e(this).data("resizable"), + i = r.options, + s = r.size; + (r.ghost = r.originalElement.clone()), + r.ghost + .css({ + opacity: 0.25, + display: "block", + position: "relative", + height: s.height, + width: s.width, + margin: 0, + left: 0, + top: 0, + }) + .addClass("ui-resizable-ghost") + .addClass(typeof i.ghost == "string" ? i.ghost : ""), + r.ghost.appendTo(r.helper); + }, + resize: function (t, n) { + var r = e(this).data("resizable"), + i = r.options; + r.ghost && + r.ghost.css({ + position: "relative", + height: r.size.height, + width: r.size.width, + }); + }, + stop: function (t, n) { + var r = e(this).data("resizable"), + i = r.options; + r.ghost && r.helper && r.helper.get(0).removeChild(r.ghost.get(0)); + }, + }), + e.ui.plugin.add("resizable", "grid", { + resize: function (t, n) { + var r = e(this).data("resizable"), + i = r.options, + s = r.size, + o = r.originalSize, + u = r.originalPosition, + a = r.axis, + f = i._aspectRatio || t.shiftKey; + i.grid = typeof i.grid == "number" ? [i.grid, i.grid] : i.grid; + var l = + Math.round((s.width - o.width) / (i.grid[0] || 1)) * + (i.grid[0] || 1), + c = + Math.round((s.height - o.height) / (i.grid[1] || 1)) * + (i.grid[1] || 1); + /^(se|s|e)$/.test(a) + ? ((r.size.width = o.width + l), (r.size.height = o.height + c)) + : /^(ne)$/.test(a) + ? ((r.size.width = o.width + l), + (r.size.height = o.height + c), + (r.position.top = u.top - c)) + : /^(sw)$/.test(a) + ? ((r.size.width = o.width + l), + (r.size.height = o.height + c), + (r.position.left = u.left - l)) + : ((r.size.width = o.width + l), + (r.size.height = o.height + c), + (r.position.top = u.top - c), + (r.position.left = u.left - l)); + }, + }); + var n = function (e) { + return parseInt(e, 10) || 0; + }, + r = function (e) { + return !isNaN(parseInt(e, 10)); + }; +})(jQuery); +(function (e, t) { + e.widget("ui.selectable", e.ui.mouse, { + version: "1.9.2", + options: { + appendTo: "body", + autoRefresh: !0, + distance: 0, + filter: "*", + tolerance: "touch", + }, + _create: function () { + var t = this; + this.element.addClass("ui-selectable"), (this.dragged = !1); + var n; + (this.refresh = function () { + (n = e(t.options.filter, t.element[0])), + n.addClass("ui-selectee"), + n.each(function () { + var t = e(this), + n = t.offset(); + e.data(this, "selectable-item", { + element: this, + $element: t, + left: n.left, + top: n.top, + right: n.left + t.outerWidth(), + bottom: n.top + t.outerHeight(), + startselected: !1, + selected: t.hasClass("ui-selected"), + selecting: t.hasClass("ui-selecting"), + unselecting: t.hasClass("ui-unselecting"), + }); + }); + }), + this.refresh(), + (this.selectees = n.addClass("ui-selectee")), + this._mouseInit(), + (this.helper = e("
            ")); + }, + _destroy: function () { + this.selectees.removeClass("ui-selectee").removeData("selectable-item"), + this.element.removeClass("ui-selectable ui-selectable-disabled"), + this._mouseDestroy(); + }, + _mouseStart: function (t) { + var n = this; + this.opos = [t.pageX, t.pageY]; + if (this.options.disabled) return; + var r = this.options; + (this.selectees = e(r.filter, this.element[0])), + this._trigger("start", t), + e(r.appendTo).append(this.helper), + this.helper.css({ + left: t.clientX, + top: t.clientY, + width: 0, + height: 0, + }), + r.autoRefresh && this.refresh(), + this.selectees.filter(".ui-selected").each(function () { + var r = e.data(this, "selectable-item"); + (r.startselected = !0), + !t.metaKey && + !t.ctrlKey && + (r.$element.removeClass("ui-selected"), + (r.selected = !1), + r.$element.addClass("ui-unselecting"), + (r.unselecting = !0), + n._trigger("unselecting", t, { unselecting: r.element })); + }), + e(t.target) + .parents() + .andSelf() + .each(function () { + var r = e.data(this, "selectable-item"); + if (r) { + var i = + (!t.metaKey && !t.ctrlKey) || + !r.$element.hasClass("ui-selected"); + return ( + r.$element + .removeClass(i ? "ui-unselecting" : "ui-selected") + .addClass(i ? "ui-selecting" : "ui-unselecting"), + (r.unselecting = !i), + (r.selecting = i), + (r.selected = i), + i + ? n._trigger("selecting", t, { selecting: r.element }) + : n._trigger("unselecting", t, { unselecting: r.element }), + !1 + ); + } + }); + }, + _mouseDrag: function (t) { + var n = this; + this.dragged = !0; + if (this.options.disabled) return; + var r = this.options, + i = this.opos[0], + s = this.opos[1], + o = t.pageX, + u = t.pageY; + if (i > o) { + var a = o; + (o = i), (i = a); + } + if (s > u) { + var a = u; + (u = s), (s = a); + } + return ( + this.helper.css({ left: i, top: s, width: o - i, height: u - s }), + this.selectees.each(function () { + var a = e.data(this, "selectable-item"); + if (!a || a.element == n.element[0]) return; + var f = !1; + r.tolerance == "touch" + ? (f = !(a.left > o || a.right < i || a.top > u || a.bottom < s)) + : r.tolerance == "fit" && + (f = a.left > i && a.right < o && a.top > s && a.bottom < u), + f + ? (a.selected && + (a.$element.removeClass("ui-selected"), (a.selected = !1)), + a.unselecting && + (a.$element.removeClass("ui-unselecting"), + (a.unselecting = !1)), + a.selecting || + (a.$element.addClass("ui-selecting"), + (a.selecting = !0), + n._trigger("selecting", t, { selecting: a.element }))) + : (a.selecting && + ((t.metaKey || t.ctrlKey) && a.startselected + ? (a.$element.removeClass("ui-selecting"), + (a.selecting = !1), + a.$element.addClass("ui-selected"), + (a.selected = !0)) + : (a.$element.removeClass("ui-selecting"), + (a.selecting = !1), + a.startselected && + (a.$element.addClass("ui-unselecting"), + (a.unselecting = !0)), + n._trigger("unselecting", t, { + unselecting: a.element, + }))), + a.selected && + !t.metaKey && + !t.ctrlKey && + !a.startselected && + (a.$element.removeClass("ui-selected"), + (a.selected = !1), + a.$element.addClass("ui-unselecting"), + (a.unselecting = !0), + n._trigger("unselecting", t, { unselecting: a.element }))); + }), + !1 + ); + }, + _mouseStop: function (t) { + var n = this; + this.dragged = !1; + var r = this.options; + return ( + e(".ui-unselecting", this.element[0]).each(function () { + var r = e.data(this, "selectable-item"); + r.$element.removeClass("ui-unselecting"), + (r.unselecting = !1), + (r.startselected = !1), + n._trigger("unselected", t, { unselected: r.element }); + }), + e(".ui-selecting", this.element[0]).each(function () { + var r = e.data(this, "selectable-item"); + r.$element.removeClass("ui-selecting").addClass("ui-selected"), + (r.selecting = !1), + (r.selected = !0), + (r.startselected = !0), + n._trigger("selected", t, { selected: r.element }); + }), + this._trigger("stop", t), + this.helper.remove(), + !1 + ); + }, + }); +})(jQuery); +(function (e, t) { + var n = 5; + e.widget("ui.slider", e.ui.mouse, { + version: "1.9.2", + widgetEventPrefix: "slide", + options: { + animate: !1, + distance: 0, + max: 100, + min: 0, + orientation: "horizontal", + range: !1, + step: 1, + value: 0, + values: null, + }, + _create: function () { + var t, + r, + i = this.options, + s = this.element + .find(".ui-slider-handle") + .addClass("ui-state-default ui-corner-all"), + o = + "", + u = []; + (this._keySliding = !1), + (this._mouseSliding = !1), + (this._animateOff = !0), + (this._handleIndex = null), + this._detectOrientation(), + this._mouseInit(), + this.element.addClass( + "ui-slider ui-slider-" + + this.orientation + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all" + + (i.disabled ? " ui-slider-disabled ui-disabled" : ""), + ), + (this.range = e([])), + i.range && + (i.range === !0 && + (i.values || (i.values = [this._valueMin(), this._valueMin()]), + i.values.length && + i.values.length !== 2 && + (i.values = [i.values[0], i.values[0]])), + (this.range = e("
            ") + .appendTo(this.element) + .addClass( + "ui-slider-range ui-widget-header" + + (i.range === "min" || i.range === "max" + ? " ui-slider-range-" + i.range + : ""), + ))), + (r = (i.values && i.values.length) || 1); + for (t = s.length; t < r; t++) u.push(o); + (this.handles = s.add(e(u.join("")).appendTo(this.element))), + (this.handle = this.handles.eq(0)), + this.handles + .add(this.range) + .filter("a") + .click(function (e) { + e.preventDefault(); + }) + .mouseenter(function () { + i.disabled || e(this).addClass("ui-state-hover"); + }) + .mouseleave(function () { + e(this).removeClass("ui-state-hover"); + }) + .focus(function () { + i.disabled + ? e(this).blur() + : (e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"), + e(this).addClass("ui-state-focus")); + }) + .blur(function () { + e(this).removeClass("ui-state-focus"); + }), + this.handles.each(function (t) { + e(this).data("ui-slider-handle-index", t); + }), + this._on(this.handles, { + keydown: function (t) { + var r, + i, + s, + o, + u = e(t.target).data("ui-slider-handle-index"); + switch (t.keyCode) { + case e.ui.keyCode.HOME: + case e.ui.keyCode.END: + case e.ui.keyCode.PAGE_UP: + case e.ui.keyCode.PAGE_DOWN: + case e.ui.keyCode.UP: + case e.ui.keyCode.RIGHT: + case e.ui.keyCode.DOWN: + case e.ui.keyCode.LEFT: + t.preventDefault(); + if (!this._keySliding) { + (this._keySliding = !0), + e(t.target).addClass("ui-state-active"), + (r = this._start(t, u)); + if (r === !1) return; + } + } + (o = this.options.step), + this.options.values && this.options.values.length + ? (i = s = this.values(u)) + : (i = s = this.value()); + switch (t.keyCode) { + case e.ui.keyCode.HOME: + s = this._valueMin(); + break; + case e.ui.keyCode.END: + s = this._valueMax(); + break; + case e.ui.keyCode.PAGE_UP: + s = this._trimAlignValue( + i + (this._valueMax() - this._valueMin()) / n, + ); + break; + case e.ui.keyCode.PAGE_DOWN: + s = this._trimAlignValue( + i - (this._valueMax() - this._valueMin()) / n, + ); + break; + case e.ui.keyCode.UP: + case e.ui.keyCode.RIGHT: + if (i === this._valueMax()) return; + s = this._trimAlignValue(i + o); + break; + case e.ui.keyCode.DOWN: + case e.ui.keyCode.LEFT: + if (i === this._valueMin()) return; + s = this._trimAlignValue(i - o); + } + this._slide(t, u, s); + }, + keyup: function (t) { + var n = e(t.target).data("ui-slider-handle-index"); + this._keySliding && + ((this._keySliding = !1), + this._stop(t, n), + this._change(t, n), + e(t.target).removeClass("ui-state-active")); + }, + }), + this._refreshValue(), + (this._animateOff = !1); + }, + _destroy: function () { + this.handles.remove(), + this.range.remove(), + this.element.removeClass( + "ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all", + ), + this._mouseDestroy(); + }, + _mouseCapture: function (t) { + var n, + r, + i, + s, + o, + u, + a, + f, + l = this, + c = this.options; + return c.disabled + ? !1 + : ((this.elementSize = { + width: this.element.outerWidth(), + height: this.element.outerHeight(), + }), + (this.elementOffset = this.element.offset()), + (n = { x: t.pageX, y: t.pageY }), + (r = this._normValueFromMouse(n)), + (i = this._valueMax() - this._valueMin() + 1), + this.handles.each(function (t) { + var n = Math.abs(r - l.values(t)); + i > n && ((i = n), (s = e(this)), (o = t)); + }), + c.range === !0 && + this.values(1) === c.min && + ((o += 1), (s = e(this.handles[o]))), + (u = this._start(t, o)), + u === !1 + ? !1 + : ((this._mouseSliding = !0), + (this._handleIndex = o), + s.addClass("ui-state-active").focus(), + (a = s.offset()), + (f = !e(t.target).parents().andSelf().is(".ui-slider-handle")), + (this._clickOffset = f + ? { left: 0, top: 0 } + : { + left: t.pageX - a.left - s.width() / 2, + top: + t.pageY - + a.top - + s.height() / 2 - + (parseInt(s.css("borderTopWidth"), 10) || 0) - + (parseInt(s.css("borderBottomWidth"), 10) || 0) + + (parseInt(s.css("marginTop"), 10) || 0), + }), + this.handles.hasClass("ui-state-hover") || this._slide(t, o, r), + (this._animateOff = !0), + !0)); + }, + _mouseStart: function () { + return !0; + }, + _mouseDrag: function (e) { + var t = { x: e.pageX, y: e.pageY }, + n = this._normValueFromMouse(t); + return this._slide(e, this._handleIndex, n), !1; + }, + _mouseStop: function (e) { + return ( + this.handles.removeClass("ui-state-active"), + (this._mouseSliding = !1), + this._stop(e, this._handleIndex), + this._change(e, this._handleIndex), + (this._handleIndex = null), + (this._clickOffset = null), + (this._animateOff = !1), + !1 + ); + }, + _detectOrientation: function () { + this.orientation = + this.options.orientation === "vertical" ? "vertical" : "horizontal"; + }, + _normValueFromMouse: function (e) { + var t, n, r, i, s; + return ( + this.orientation === "horizontal" + ? ((t = this.elementSize.width), + (n = + e.x - + this.elementOffset.left - + (this._clickOffset ? this._clickOffset.left : 0))) + : ((t = this.elementSize.height), + (n = + e.y - + this.elementOffset.top - + (this._clickOffset ? this._clickOffset.top : 0))), + (r = n / t), + r > 1 && (r = 1), + r < 0 && (r = 0), + this.orientation === "vertical" && (r = 1 - r), + (i = this._valueMax() - this._valueMin()), + (s = this._valueMin() + r * i), + this._trimAlignValue(s) + ); + }, + _start: function (e, t) { + var n = { handle: this.handles[t], value: this.value() }; + return ( + this.options.values && + this.options.values.length && + ((n.value = this.values(t)), (n.values = this.values())), + this._trigger("start", e, n) + ); + }, + _slide: function (e, t, n) { + var r, i, s; + this.options.values && this.options.values.length + ? ((r = this.values(t ? 0 : 1)), + this.options.values.length === 2 && + this.options.range === !0 && + ((t === 0 && n > r) || (t === 1 && n < r)) && + (n = r), + n !== this.values(t) && + ((i = this.values()), + (i[t] = n), + (s = this._trigger("slide", e, { + handle: this.handles[t], + value: n, + values: i, + })), + (r = this.values(t ? 0 : 1)), + s !== !1 && this.values(t, n, !0))) + : n !== this.value() && + ((s = this._trigger("slide", e, { + handle: this.handles[t], + value: n, + })), + s !== !1 && this.value(n)); + }, + _stop: function (e, t) { + var n = { handle: this.handles[t], value: this.value() }; + this.options.values && + this.options.values.length && + ((n.value = this.values(t)), (n.values = this.values())), + this._trigger("stop", e, n); + }, + _change: function (e, t) { + if (!this._keySliding && !this._mouseSliding) { + var n = { handle: this.handles[t], value: this.value() }; + this.options.values && + this.options.values.length && + ((n.value = this.values(t)), (n.values = this.values())), + this._trigger("change", e, n); + } + }, + value: function (e) { + if (arguments.length) { + (this.options.value = this._trimAlignValue(e)), + this._refreshValue(), + this._change(null, 0); + return; + } + return this._value(); + }, + values: function (t, n) { + var r, i, s; + if (arguments.length > 1) { + (this.options.values[t] = this._trimAlignValue(n)), + this._refreshValue(), + this._change(null, t); + return; + } + if (!arguments.length) return this._values(); + if (!e.isArray(arguments[0])) + return this.options.values && this.options.values.length + ? this._values(t) + : this.value(); + (r = this.options.values), (i = arguments[0]); + for (s = 0; s < r.length; s += 1) + (r[s] = this._trimAlignValue(i[s])), this._change(null, s); + this._refreshValue(); + }, + _setOption: function (t, n) { + var r, + i = 0; + e.isArray(this.options.values) && (i = this.options.values.length), + e.Widget.prototype._setOption.apply(this, arguments); + switch (t) { + case "disabled": + n + ? (this.handles.filter(".ui-state-focus").blur(), + this.handles.removeClass("ui-state-hover"), + this.handles.prop("disabled", !0), + this.element.addClass("ui-disabled")) + : (this.handles.prop("disabled", !1), + this.element.removeClass("ui-disabled")); + break; + case "orientation": + this._detectOrientation(), + this.element + .removeClass("ui-slider-horizontal ui-slider-vertical") + .addClass("ui-slider-" + this.orientation), + this._refreshValue(); + break; + case "value": + (this._animateOff = !0), + this._refreshValue(), + this._change(null, 0), + (this._animateOff = !1); + break; + case "values": + (this._animateOff = !0), this._refreshValue(); + for (r = 0; r < i; r += 1) this._change(null, r); + this._animateOff = !1; + break; + case "min": + case "max": + (this._animateOff = !0), + this._refreshValue(), + (this._animateOff = !1); + } + }, + _value: function () { + var e = this.options.value; + return (e = this._trimAlignValue(e)), e; + }, + _values: function (e) { + var t, n, r; + if (arguments.length) + return (t = this.options.values[e]), (t = this._trimAlignValue(t)), t; + n = this.options.values.slice(); + for (r = 0; r < n.length; r += 1) n[r] = this._trimAlignValue(n[r]); + return n; + }, + _trimAlignValue: function (e) { + if (e <= this._valueMin()) return this._valueMin(); + if (e >= this._valueMax()) return this._valueMax(); + var t = this.options.step > 0 ? this.options.step : 1, + n = (e - this._valueMin()) % t, + r = e - n; + return ( + Math.abs(n) * 2 >= t && (r += n > 0 ? t : -t), parseFloat(r.toFixed(5)) + ); + }, + _valueMin: function () { + return this.options.min; + }, + _valueMax: function () { + return this.options.max; + }, + _refreshValue: function () { + var t, + n, + r, + i, + s, + o = this.options.range, + u = this.options, + a = this, + f = this._animateOff ? !1 : u.animate, + l = {}; + this.options.values && this.options.values.length + ? this.handles.each(function (r) { + (n = + ((a.values(r) - a._valueMin()) / + (a._valueMax() - a._valueMin())) * + 100), + (l[a.orientation === "horizontal" ? "left" : "bottom"] = n + "%"), + e(this).stop(1, 1)[f ? "animate" : "css"](l, u.animate), + a.options.range === !0 && + (a.orientation === "horizontal" + ? (r === 0 && + a.range + .stop(1, 1) + [f ? "animate" : "css"]({ left: n + "%" }, u.animate), + r === 1 && + a.range[f ? "animate" : "css"]( + { width: n - t + "%" }, + { queue: !1, duration: u.animate }, + )) + : (r === 0 && + a.range + .stop(1, 1) + [f ? "animate" : "css"]({ bottom: n + "%" }, u.animate), + r === 1 && + a.range[f ? "animate" : "css"]( + { height: n - t + "%" }, + { queue: !1, duration: u.animate }, + ))), + (t = n); + }) + : ((r = this.value()), + (i = this._valueMin()), + (s = this._valueMax()), + (n = s !== i ? ((r - i) / (s - i)) * 100 : 0), + (l[this.orientation === "horizontal" ? "left" : "bottom"] = n + "%"), + this.handle.stop(1, 1)[f ? "animate" : "css"](l, u.animate), + o === "min" && + this.orientation === "horizontal" && + this.range + .stop(1, 1) + [f ? "animate" : "css"]({ width: n + "%" }, u.animate), + o === "max" && + this.orientation === "horizontal" && + this.range[f ? "animate" : "css"]( + { width: 100 - n + "%" }, + { queue: !1, duration: u.animate }, + ), + o === "min" && + this.orientation === "vertical" && + this.range + .stop(1, 1) + [f ? "animate" : "css"]({ height: n + "%" }, u.animate), + o === "max" && + this.orientation === "vertical" && + this.range[f ? "animate" : "css"]( + { height: 100 - n + "%" }, + { queue: !1, duration: u.animate }, + )); + }, + }); +})(jQuery); +(function (e, t) { + e.widget("ui.sortable", e.ui.mouse, { + version: "1.9.2", + widgetEventPrefix: "sort", + ready: !1, + options: { + appendTo: "parent", + axis: !1, + connectWith: !1, + containment: !1, + cursor: "auto", + cursorAt: !1, + dropOnEmpty: !0, + forcePlaceholderSize: !1, + forceHelperSize: !1, + grid: !1, + handle: !1, + helper: "original", + items: "> *", + opacity: !1, + placeholder: !1, + revert: !1, + scroll: !0, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1e3, + }, + _create: function () { + var e = this.options; + (this.containerCache = {}), + this.element.addClass("ui-sortable"), + this.refresh(), + (this.floating = this.items.length + ? e.axis === "x" || + /left|right/.test(this.items[0].item.css("float")) || + /inline|table-cell/.test(this.items[0].item.css("display")) + : !1), + (this.offset = this.element.offset()), + this._mouseInit(), + (this.ready = !0); + }, + _destroy: function () { + this.element.removeClass("ui-sortable ui-sortable-disabled"), + this._mouseDestroy(); + for (var e = this.items.length - 1; e >= 0; e--) + this.items[e].item.removeData(this.widgetName + "-item"); + return this; + }, + _setOption: function (t, n) { + t === "disabled" + ? ((this.options[t] = n), + this.widget().toggleClass("ui-sortable-disabled", !!n)) + : e.Widget.prototype._setOption.apply(this, arguments); + }, + _mouseCapture: function (t, n) { + var r = this; + if (this.reverting) return !1; + if (this.options.disabled || this.options.type == "static") return !1; + this._refreshItems(t); + var i = null, + s = e(t.target) + .parents() + .each(function () { + if (e.data(this, r.widgetName + "-item") == r) + return (i = e(this)), !1; + }); + e.data(t.target, r.widgetName + "-item") == r && (i = e(t.target)); + if (!i) return !1; + if (this.options.handle && !n) { + var o = !1; + e(this.options.handle, i) + .find("*") + .andSelf() + .each(function () { + this == t.target && (o = !0); + }); + if (!o) return !1; + } + return (this.currentItem = i), this._removeCurrentsFromItems(), !0; + }, + _mouseStart: function (t, n, r) { + var i = this.options; + (this.currentContainer = this), + this.refreshPositions(), + (this.helper = this._createHelper(t)), + this._cacheHelperProportions(), + this._cacheMargins(), + (this.scrollParent = this.helper.scrollParent()), + (this.offset = this.currentItem.offset()), + (this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left, + }), + e.extend(this.offset, { + click: { + left: t.pageX - this.offset.left, + top: t.pageY - this.offset.top, + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset(), + }), + this.helper.css("position", "absolute"), + (this.cssPosition = this.helper.css("position")), + (this.originalPosition = this._generatePosition(t)), + (this.originalPageX = t.pageX), + (this.originalPageY = t.pageY), + i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt), + (this.domPosition = { + prev: this.currentItem.prev()[0], + parent: this.currentItem.parent()[0], + }), + this.helper[0] != this.currentItem[0] && this.currentItem.hide(), + this._createPlaceholder(), + i.containment && this._setContainment(), + i.cursor && + (e("body").css("cursor") && + (this._storedCursor = e("body").css("cursor")), + e("body").css("cursor", i.cursor)), + i.opacity && + (this.helper.css("opacity") && + (this._storedOpacity = this.helper.css("opacity")), + this.helper.css("opacity", i.opacity)), + i.zIndex && + (this.helper.css("zIndex") && + (this._storedZIndex = this.helper.css("zIndex")), + this.helper.css("zIndex", i.zIndex)), + this.scrollParent[0] != document && + this.scrollParent[0].tagName != "HTML" && + (this.overflowOffset = this.scrollParent.offset()), + this._trigger("start", t, this._uiHash()), + this._preserveHelperProportions || this._cacheHelperProportions(); + if (!r) + for (var s = this.containers.length - 1; s >= 0; s--) + this.containers[s]._trigger("activate", t, this._uiHash(this)); + return ( + e.ui.ddmanager && (e.ui.ddmanager.current = this), + e.ui.ddmanager && + !i.dropBehaviour && + e.ui.ddmanager.prepareOffsets(this, t), + (this.dragging = !0), + this.helper.addClass("ui-sortable-helper"), + this._mouseDrag(t), + !0 + ); + }, + _mouseDrag: function (t) { + (this.position = this._generatePosition(t)), + (this.positionAbs = this._convertPositionTo("absolute")), + this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs); + if (this.options.scroll) { + var n = this.options, + r = !1; + this.scrollParent[0] != document && + this.scrollParent[0].tagName != "HTML" + ? (this.overflowOffset.top + + this.scrollParent[0].offsetHeight - + t.pageY < + n.scrollSensitivity + ? (this.scrollParent[0].scrollTop = r = + this.scrollParent[0].scrollTop + n.scrollSpeed) + : t.pageY - this.overflowOffset.top < n.scrollSensitivity && + (this.scrollParent[0].scrollTop = r = + this.scrollParent[0].scrollTop - n.scrollSpeed), + this.overflowOffset.left + + this.scrollParent[0].offsetWidth - + t.pageX < + n.scrollSensitivity + ? (this.scrollParent[0].scrollLeft = r = + this.scrollParent[0].scrollLeft + n.scrollSpeed) + : t.pageX - this.overflowOffset.left < n.scrollSensitivity && + (this.scrollParent[0].scrollLeft = r = + this.scrollParent[0].scrollLeft - n.scrollSpeed)) + : (t.pageY - e(document).scrollTop() < n.scrollSensitivity + ? (r = e(document).scrollTop( + e(document).scrollTop() - n.scrollSpeed, + )) + : e(window).height() - (t.pageY - e(document).scrollTop()) < + n.scrollSensitivity && + (r = e(document).scrollTop( + e(document).scrollTop() + n.scrollSpeed, + )), + t.pageX - e(document).scrollLeft() < n.scrollSensitivity + ? (r = e(document).scrollLeft( + e(document).scrollLeft() - n.scrollSpeed, + )) + : e(window).width() - (t.pageX - e(document).scrollLeft()) < + n.scrollSensitivity && + (r = e(document).scrollLeft( + e(document).scrollLeft() + n.scrollSpeed, + ))), + r !== !1 && + e.ui.ddmanager && + !n.dropBehaviour && + e.ui.ddmanager.prepareOffsets(this, t); + } + this.positionAbs = this._convertPositionTo("absolute"); + if (!this.options.axis || this.options.axis != "y") + this.helper[0].style.left = this.position.left + "px"; + if (!this.options.axis || this.options.axis != "x") + this.helper[0].style.top = this.position.top + "px"; + for (var i = this.items.length - 1; i >= 0; i--) { + var s = this.items[i], + o = s.item[0], + u = this._intersectsWithPointer(s); + if (!u) continue; + if (s.instance !== this.currentContainer) continue; + if ( + o != this.currentItem[0] && + this.placeholder[u == 1 ? "next" : "prev"]()[0] != o && + !e.contains(this.placeholder[0], o) && + (this.options.type == "semi-dynamic" + ? !e.contains(this.element[0], o) + : !0) + ) { + this.direction = u == 1 ? "down" : "up"; + if ( + this.options.tolerance != "pointer" && + !this._intersectsWithSides(s) + ) + break; + this._rearrange(t, s), this._trigger("change", t, this._uiHash()); + break; + } + } + return ( + this._contactContainers(t), + e.ui.ddmanager && e.ui.ddmanager.drag(this, t), + this._trigger("sort", t, this._uiHash()), + (this.lastPositionAbs = this.positionAbs), + !1 + ); + }, + _mouseStop: function (t, n) { + if (!t) return; + e.ui.ddmanager && + !this.options.dropBehaviour && + e.ui.ddmanager.drop(this, t); + if (this.options.revert) { + var r = this, + i = this.placeholder.offset(); + (this.reverting = !0), + e(this.helper).animate( + { + left: + i.left - + this.offset.parent.left - + this.margins.left + + (this.offsetParent[0] == document.body + ? 0 + : this.offsetParent[0].scrollLeft), + top: + i.top - + this.offset.parent.top - + this.margins.top + + (this.offsetParent[0] == document.body + ? 0 + : this.offsetParent[0].scrollTop), + }, + parseInt(this.options.revert, 10) || 500, + function () { + r._clear(t); + }, + ); + } else this._clear(t, n); + return !1; + }, + cancel: function () { + if (this.dragging) { + this._mouseUp({ target: null }), + this.options.helper == "original" + ? this.currentItem + .css(this._storedCSS) + .removeClass("ui-sortable-helper") + : this.currentItem.show(); + for (var t = this.containers.length - 1; t >= 0; t--) + this.containers[t]._trigger("deactivate", null, this._uiHash(this)), + this.containers[t].containerCache.over && + (this.containers[t]._trigger("out", null, this._uiHash(this)), + (this.containers[t].containerCache.over = 0)); + } + return ( + this.placeholder && + (this.placeholder[0].parentNode && + this.placeholder[0].parentNode.removeChild(this.placeholder[0]), + this.options.helper != "original" && + this.helper && + this.helper[0].parentNode && + this.helper.remove(), + e.extend(this, { + helper: null, + dragging: !1, + reverting: !1, + _noFinalSort: null, + }), + this.domPosition.prev + ? e(this.domPosition.prev).after(this.currentItem) + : e(this.domPosition.parent).prepend(this.currentItem)), + this + ); + }, + serialize: function (t) { + var n = this._getItemsAsjQuery(t && t.connected), + r = []; + return ( + (t = t || {}), + e(n).each(function () { + var n = (e(t.item || this).attr(t.attribute || "id") || "").match( + t.expression || /(.+)[-=_](.+)/, + ); + n && + r.push( + (t.key || n[1] + "[]") + + "=" + + (t.key && t.expression ? n[1] : n[2]), + ); + }), + !r.length && t.key && r.push(t.key + "="), + r.join("&") + ); + }, + toArray: function (t) { + var n = this._getItemsAsjQuery(t && t.connected), + r = []; + return ( + (t = t || {}), + n.each(function () { + r.push(e(t.item || this).attr(t.attribute || "id") || ""); + }), + r + ); + }, + _intersectsWith: function (e) { + var t = this.positionAbs.left, + n = t + this.helperProportions.width, + r = this.positionAbs.top, + i = r + this.helperProportions.height, + s = e.left, + o = s + e.width, + u = e.top, + a = u + e.height, + f = this.offset.click.top, + l = this.offset.click.left, + c = r + f > u && r + f < a && t + l > s && t + l < o; + return this.options.tolerance == "pointer" || + this.options.forcePointerForContainers || + (this.options.tolerance != "pointer" && + this.helperProportions[this.floating ? "width" : "height"] > + e[this.floating ? "width" : "height"]) + ? c + : s < t + this.helperProportions.width / 2 && + n - this.helperProportions.width / 2 < o && + u < r + this.helperProportions.height / 2 && + i - this.helperProportions.height / 2 < a; + }, + _intersectsWithPointer: function (t) { + var n = + this.options.axis === "x" || + e.ui.isOverAxis( + this.positionAbs.top + this.offset.click.top, + t.top, + t.height, + ), + r = + this.options.axis === "y" || + e.ui.isOverAxis( + this.positionAbs.left + this.offset.click.left, + t.left, + t.width, + ), + i = n && r, + s = this._getDragVerticalDirection(), + o = this._getDragHorizontalDirection(); + return i + ? this.floating + ? (o && o == "right") || s == "down" + ? 2 + : 1 + : s && (s == "down" ? 2 : 1) + : !1; + }, + _intersectsWithSides: function (t) { + var n = e.ui.isOverAxis( + this.positionAbs.top + this.offset.click.top, + t.top + t.height / 2, + t.height, + ), + r = e.ui.isOverAxis( + this.positionAbs.left + this.offset.click.left, + t.left + t.width / 2, + t.width, + ), + i = this._getDragVerticalDirection(), + s = this._getDragHorizontalDirection(); + return this.floating && s + ? (s == "right" && r) || (s == "left" && !r) + : i && ((i == "down" && n) || (i == "up" && !n)); + }, + _getDragVerticalDirection: function () { + var e = this.positionAbs.top - this.lastPositionAbs.top; + return e != 0 && (e > 0 ? "down" : "up"); + }, + _getDragHorizontalDirection: function () { + var e = this.positionAbs.left - this.lastPositionAbs.left; + return e != 0 && (e > 0 ? "right" : "left"); + }, + refresh: function (e) { + return this._refreshItems(e), this.refreshPositions(), this; + }, + _connectWith: function () { + var e = this.options; + return e.connectWith.constructor == String + ? [e.connectWith] + : e.connectWith; + }, + _getItemsAsjQuery: function (t) { + var n = [], + r = [], + i = this._connectWith(); + if (i && t) + for (var s = i.length - 1; s >= 0; s--) { + var o = e(i[s]); + for (var u = o.length - 1; u >= 0; u--) { + var a = e.data(o[u], this.widgetName); + a && + a != this && + !a.options.disabled && + r.push([ + e.isFunction(a.options.items) + ? a.options.items.call(a.element) + : e(a.options.items, a.element) + .not(".ui-sortable-helper") + .not(".ui-sortable-placeholder"), + a, + ]); + } + } + r.push([ + e.isFunction(this.options.items) + ? this.options.items.call(this.element, null, { + options: this.options, + item: this.currentItem, + }) + : e(this.options.items, this.element) + .not(".ui-sortable-helper") + .not(".ui-sortable-placeholder"), + this, + ]); + for (var s = r.length - 1; s >= 0; s--) + r[s][0].each(function () { + n.push(this); + }); + return e(n); + }, + _removeCurrentsFromItems: function () { + var t = this.currentItem.find(":data(" + this.widgetName + "-item)"); + this.items = e.grep(this.items, function (e) { + for (var n = 0; n < t.length; n++) if (t[n] == e.item[0]) return !1; + return !0; + }); + }, + _refreshItems: function (t) { + (this.items = []), (this.containers = [this]); + var n = this.items, + r = [ + [ + e.isFunction(this.options.items) + ? this.options.items.call(this.element[0], t, { + item: this.currentItem, + }) + : e(this.options.items, this.element), + this, + ], + ], + i = this._connectWith(); + if (i && this.ready) + for (var s = i.length - 1; s >= 0; s--) { + var o = e(i[s]); + for (var u = o.length - 1; u >= 0; u--) { + var a = e.data(o[u], this.widgetName); + a && + a != this && + !a.options.disabled && + (r.push([ + e.isFunction(a.options.items) + ? a.options.items.call(a.element[0], t, { + item: this.currentItem, + }) + : e(a.options.items, a.element), + a, + ]), + this.containers.push(a)); + } + } + for (var s = r.length - 1; s >= 0; s--) { + var f = r[s][1], + l = r[s][0]; + for (var u = 0, c = l.length; u < c; u++) { + var h = e(l[u]); + h.data(this.widgetName + "-item", f), + n.push({ + item: h, + instance: f, + width: 0, + height: 0, + left: 0, + top: 0, + }); + } + } + }, + refreshPositions: function (t) { + this.offsetParent && + this.helper && + (this.offset.parent = this._getParentOffset()); + for (var n = this.items.length - 1; n >= 0; n--) { + var r = this.items[n]; + if ( + r.instance != this.currentContainer && + this.currentContainer && + r.item[0] != this.currentItem[0] + ) + continue; + var i = this.options.toleranceElement + ? e(this.options.toleranceElement, r.item) + : r.item; + t || ((r.width = i.outerWidth()), (r.height = i.outerHeight())); + var s = i.offset(); + (r.left = s.left), (r.top = s.top); + } + if (this.options.custom && this.options.custom.refreshContainers) + this.options.custom.refreshContainers.call(this); + else + for (var n = this.containers.length - 1; n >= 0; n--) { + var s = this.containers[n].element.offset(); + (this.containers[n].containerCache.left = s.left), + (this.containers[n].containerCache.top = s.top), + (this.containers[n].containerCache.width = + this.containers[n].element.outerWidth()), + (this.containers[n].containerCache.height = + this.containers[n].element.outerHeight()); + } + return this; + }, + _createPlaceholder: function (t) { + t = t || this; + var n = t.options; + if (!n.placeholder || n.placeholder.constructor == String) { + var r = n.placeholder; + n.placeholder = { + element: function () { + var n = e(document.createElement(t.currentItem[0].nodeName)) + .addClass( + r || t.currentItem[0].className + " ui-sortable-placeholder", + ) + .removeClass("ui-sortable-helper")[0]; + return r || (n.style.visibility = "hidden"), n; + }, + update: function (e, i) { + if (r && !n.forcePlaceholderSize) return; + i.height() || + i.height( + t.currentItem.innerHeight() - + parseInt(t.currentItem.css("paddingTop") || 0, 10) - + parseInt(t.currentItem.css("paddingBottom") || 0, 10), + ), + i.width() || + i.width( + t.currentItem.innerWidth() - + parseInt(t.currentItem.css("paddingLeft") || 0, 10) - + parseInt(t.currentItem.css("paddingRight") || 0, 10), + ); + }, + }; + } + (t.placeholder = e(n.placeholder.element.call(t.element, t.currentItem))), + t.currentItem.after(t.placeholder), + n.placeholder.update(t, t.placeholder); + }, + _contactContainers: function (t) { + var n = null, + r = null; + for (var i = this.containers.length - 1; i >= 0; i--) { + if (e.contains(this.currentItem[0], this.containers[i].element[0])) + continue; + if (this._intersectsWith(this.containers[i].containerCache)) { + if (n && e.contains(this.containers[i].element[0], n.element[0])) + continue; + (n = this.containers[i]), (r = i); + } else + this.containers[i].containerCache.over && + (this.containers[i]._trigger("out", t, this._uiHash(this)), + (this.containers[i].containerCache.over = 0)); + } + if (!n) return; + if (this.containers.length === 1) + this.containers[r]._trigger("over", t, this._uiHash(this)), + (this.containers[r].containerCache.over = 1); + else { + var s = 1e4, + o = null, + u = this.containers[r].floating ? "left" : "top", + a = this.containers[r].floating ? "width" : "height", + f = this.positionAbs[u] + this.offset.click[u]; + for (var l = this.items.length - 1; l >= 0; l--) { + if (!e.contains(this.containers[r].element[0], this.items[l].item[0])) + continue; + if (this.items[l].item[0] == this.currentItem[0]) continue; + var c = this.items[l].item.offset()[u], + h = !1; + Math.abs(c - f) > Math.abs(c + this.items[l][a] - f) && + ((h = !0), (c += this.items[l][a])), + Math.abs(c - f) < s && + ((s = Math.abs(c - f)), + (o = this.items[l]), + (this.direction = h ? "up" : "down")); + } + if (!o && !this.options.dropOnEmpty) return; + (this.currentContainer = this.containers[r]), + o + ? this._rearrange(t, o, null, !0) + : this._rearrange(t, null, this.containers[r].element, !0), + this._trigger("change", t, this._uiHash()), + this.containers[r]._trigger("change", t, this._uiHash(this)), + this.options.placeholder.update( + this.currentContainer, + this.placeholder, + ), + this.containers[r]._trigger("over", t, this._uiHash(this)), + (this.containers[r].containerCache.over = 1); + } + }, + _createHelper: function (t) { + var n = this.options, + r = e.isFunction(n.helper) + ? e(n.helper.apply(this.element[0], [t, this.currentItem])) + : n.helper == "clone" + ? this.currentItem.clone() + : this.currentItem; + return ( + r.parents("body").length || + e( + n.appendTo != "parent" + ? n.appendTo + : this.currentItem[0].parentNode, + )[0].appendChild(r[0]), + r[0] == this.currentItem[0] && + (this._storedCSS = { + width: this.currentItem[0].style.width, + height: this.currentItem[0].style.height, + position: this.currentItem.css("position"), + top: this.currentItem.css("top"), + left: this.currentItem.css("left"), + }), + (r[0].style.width == "" || n.forceHelperSize) && + r.width(this.currentItem.width()), + (r[0].style.height == "" || n.forceHelperSize) && + r.height(this.currentItem.height()), + r + ); + }, + _adjustOffsetFromHelper: function (t) { + typeof t == "string" && (t = t.split(" ")), + e.isArray(t) && (t = { left: +t[0], top: +t[1] || 0 }), + "left" in t && (this.offset.click.left = t.left + this.margins.left), + "right" in t && + (this.offset.click.left = + this.helperProportions.width - t.right + this.margins.left), + "top" in t && (this.offset.click.top = t.top + this.margins.top), + "bottom" in t && + (this.offset.click.top = + this.helperProportions.height - t.bottom + this.margins.top); + }, + _getParentOffset: function () { + this.offsetParent = this.helper.offsetParent(); + var t = this.offsetParent.offset(); + this.cssPosition == "absolute" && + this.scrollParent[0] != document && + e.contains(this.scrollParent[0], this.offsetParent[0]) && + ((t.left += this.scrollParent.scrollLeft()), + (t.top += this.scrollParent.scrollTop())); + if ( + this.offsetParent[0] == document.body || + (this.offsetParent[0].tagName && + this.offsetParent[0].tagName.toLowerCase() == "html" && + e.ui.ie) + ) + t = { top: 0, left: 0 }; + return { + top: + t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), + left: + t.left + + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0), + }; + }, + _getRelativeOffset: function () { + if (this.cssPosition == "relative") { + var e = this.currentItem.position(); + return { + top: + e.top - + (parseInt(this.helper.css("top"), 10) || 0) + + this.scrollParent.scrollTop(), + left: + e.left - + (parseInt(this.helper.css("left"), 10) || 0) + + this.scrollParent.scrollLeft(), + }; + } + return { top: 0, left: 0 }; + }, + _cacheMargins: function () { + this.margins = { + left: parseInt(this.currentItem.css("marginLeft"), 10) || 0, + top: parseInt(this.currentItem.css("marginTop"), 10) || 0, + }; + }, + _cacheHelperProportions: function () { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight(), + }; + }, + _setContainment: function () { + var t = this.options; + t.containment == "parent" && (t.containment = this.helper[0].parentNode); + if (t.containment == "document" || t.containment == "window") + this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + e(t.containment == "document" ? document : window).width() - + this.helperProportions.width - + this.margins.left, + (e(t.containment == "document" ? document : window).height() || + document.body.parentNode.scrollHeight) - + this.helperProportions.height - + this.margins.top, + ]; + if (!/^(document|window|parent)$/.test(t.containment)) { + var n = e(t.containment)[0], + r = e(t.containment).offset(), + i = e(n).css("overflow") != "hidden"; + this.containment = [ + r.left + + (parseInt(e(n).css("borderLeftWidth"), 10) || 0) + + (parseInt(e(n).css("paddingLeft"), 10) || 0) - + this.margins.left, + r.top + + (parseInt(e(n).css("borderTopWidth"), 10) || 0) + + (parseInt(e(n).css("paddingTop"), 10) || 0) - + this.margins.top, + r.left + + (i ? Math.max(n.scrollWidth, n.offsetWidth) : n.offsetWidth) - + (parseInt(e(n).css("borderLeftWidth"), 10) || 0) - + (parseInt(e(n).css("paddingRight"), 10) || 0) - + this.helperProportions.width - + this.margins.left, + r.top + + (i ? Math.max(n.scrollHeight, n.offsetHeight) : n.offsetHeight) - + (parseInt(e(n).css("borderTopWidth"), 10) || 0) - + (parseInt(e(n).css("paddingBottom"), 10) || 0) - + this.helperProportions.height - + this.margins.top, + ]; + } + }, + _convertPositionTo: function (t, n) { + n || (n = this.position); + var r = t == "absolute" ? 1 : -1, + i = this.options, + s = + this.cssPosition != "absolute" || + (this.scrollParent[0] != document && + !!e.contains(this.scrollParent[0], this.offsetParent[0])) + ? this.scrollParent + : this.offsetParent, + o = /(html|body)/i.test(s[0].tagName); + return { + top: + n.top + + this.offset.relative.top * r + + this.offset.parent.top * r - + (this.cssPosition == "fixed" + ? -this.scrollParent.scrollTop() + : o + ? 0 + : s.scrollTop()) * + r, + left: + n.left + + this.offset.relative.left * r + + this.offset.parent.left * r - + (this.cssPosition == "fixed" + ? -this.scrollParent.scrollLeft() + : o + ? 0 + : s.scrollLeft()) * + r, + }; + }, + _generatePosition: function (t) { + var n = this.options, + r = + this.cssPosition != "absolute" || + (this.scrollParent[0] != document && + !!e.contains(this.scrollParent[0], this.offsetParent[0])) + ? this.scrollParent + : this.offsetParent, + i = /(html|body)/i.test(r[0].tagName); + this.cssPosition == "relative" && + (this.scrollParent[0] == document || + this.scrollParent[0] == this.offsetParent[0]) && + (this.offset.relative = this._getRelativeOffset()); + var s = t.pageX, + o = t.pageY; + if (this.originalPosition) { + this.containment && + (t.pageX - this.offset.click.left < this.containment[0] && + (s = this.containment[0] + this.offset.click.left), + t.pageY - this.offset.click.top < this.containment[1] && + (o = this.containment[1] + this.offset.click.top), + t.pageX - this.offset.click.left > this.containment[2] && + (s = this.containment[2] + this.offset.click.left), + t.pageY - this.offset.click.top > this.containment[3] && + (o = this.containment[3] + this.offset.click.top)); + if (n.grid) { + var u = + this.originalPageY + + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1]; + o = this.containment + ? u - this.offset.click.top < this.containment[1] || + u - this.offset.click.top > this.containment[3] + ? u - this.offset.click.top < this.containment[1] + ? u + n.grid[1] + : u - n.grid[1] + : u + : u; + var a = + this.originalPageX + + Math.round((s - this.originalPageX) / n.grid[0]) * n.grid[0]; + s = this.containment + ? a - this.offset.click.left < this.containment[0] || + a - this.offset.click.left > this.containment[2] + ? a - this.offset.click.left < this.containment[0] + ? a + n.grid[0] + : a - n.grid[0] + : a + : a; + } + } + return { + top: + o - + this.offset.click.top - + this.offset.relative.top - + this.offset.parent.top + + (this.cssPosition == "fixed" + ? -this.scrollParent.scrollTop() + : i + ? 0 + : r.scrollTop()), + left: + s - + this.offset.click.left - + this.offset.relative.left - + this.offset.parent.left + + (this.cssPosition == "fixed" + ? -this.scrollParent.scrollLeft() + : i + ? 0 + : r.scrollLeft()), + }; + }, + _rearrange: function (e, t, n, r) { + n + ? n[0].appendChild(this.placeholder[0]) + : t.item[0].parentNode.insertBefore( + this.placeholder[0], + this.direction == "down" ? t.item[0] : t.item[0].nextSibling, + ), + (this.counter = this.counter ? ++this.counter : 1); + var i = this.counter; + this._delay(function () { + i == this.counter && this.refreshPositions(!r); + }); + }, + _clear: function (t, n) { + this.reverting = !1; + var r = []; + !this._noFinalSort && + this.currentItem.parent().length && + this.placeholder.before(this.currentItem), + (this._noFinalSort = null); + if (this.helper[0] == this.currentItem[0]) { + for (var i in this._storedCSS) + if (this._storedCSS[i] == "auto" || this._storedCSS[i] == "static") + this._storedCSS[i] = ""; + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else this.currentItem.show(); + this.fromOutside && + !n && + r.push(function (e) { + this._trigger("receive", e, this._uiHash(this.fromOutside)); + }), + (this.fromOutside || + this.domPosition.prev != + this.currentItem.prev().not(".ui-sortable-helper")[0] || + this.domPosition.parent != this.currentItem.parent()[0]) && + !n && + r.push(function (e) { + this._trigger("update", e, this._uiHash()); + }), + this !== this.currentContainer && + (n || + (r.push(function (e) { + this._trigger("remove", e, this._uiHash()); + }), + r.push( + function (e) { + return function (t) { + e._trigger("receive", t, this._uiHash(this)); + }; + }.call(this, this.currentContainer), + ), + r.push( + function (e) { + return function (t) { + e._trigger("update", t, this._uiHash(this)); + }; + }.call(this, this.currentContainer), + ))); + for (var i = this.containers.length - 1; i >= 0; i--) + n || + r.push( + function (e) { + return function (t) { + e._trigger("deactivate", t, this._uiHash(this)); + }; + }.call(this, this.containers[i]), + ), + this.containers[i].containerCache.over && + (r.push( + function (e) { + return function (t) { + e._trigger("out", t, this._uiHash(this)); + }; + }.call(this, this.containers[i]), + ), + (this.containers[i].containerCache.over = 0)); + this._storedCursor && e("body").css("cursor", this._storedCursor), + this._storedOpacity && this.helper.css("opacity", this._storedOpacity), + this._storedZIndex && + this.helper.css( + "zIndex", + this._storedZIndex == "auto" ? "" : this._storedZIndex, + ), + (this.dragging = !1); + if (this.cancelHelperRemoval) { + if (!n) { + this._trigger("beforeStop", t, this._uiHash()); + for (var i = 0; i < r.length; i++) r[i].call(this, t); + this._trigger("stop", t, this._uiHash()); + } + return (this.fromOutside = !1), !1; + } + n || this._trigger("beforeStop", t, this._uiHash()), + this.placeholder[0].parentNode.removeChild(this.placeholder[0]), + this.helper[0] != this.currentItem[0] && this.helper.remove(), + (this.helper = null); + if (!n) { + for (var i = 0; i < r.length; i++) r[i].call(this, t); + this._trigger("stop", t, this._uiHash()); + } + return (this.fromOutside = !1), !0; + }, + _trigger: function () { + e.Widget.prototype._trigger.apply(this, arguments) === !1 && + this.cancel(); + }, + _uiHash: function (t) { + var n = t || this; + return { + helper: n.helper, + placeholder: n.placeholder || e([]), + position: n.position, + originalPosition: n.originalPosition, + offset: n.positionAbs, + item: n.currentItem, + sender: t ? t.element : null, + }; + }, + }); +})(jQuery); +(function (e) { + function t(e) { + return function () { + var t = this.element.val(); + e.apply(this, arguments), + this._refresh(), + t !== this.element.val() && this._trigger("change"); + }; + } + e.widget("ui.spinner", { + version: "1.9.2", + defaultElement: "", + widgetEventPrefix: "spin", + options: { + culture: null, + icons: { down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n" }, + incremental: !0, + max: null, + min: null, + numberFormat: null, + page: 10, + step: 1, + change: null, + spin: null, + start: null, + stop: null, + }, + _create: function () { + this._setOption("max", this.options.max), + this._setOption("min", this.options.min), + this._setOption("step", this.options.step), + this._value(this.element.val(), !0), + this._draw(), + this._on(this._events), + this._refresh(), + this._on(this.window, { + beforeunload: function () { + this.element.removeAttr("autocomplete"); + }, + }); + }, + _getCreateOptions: function () { + var t = {}, + n = this.element; + return ( + e.each(["min", "max", "step"], function (e, r) { + var i = n.attr(r); + i !== undefined && i.length && (t[r] = i); + }), + t + ); + }, + _events: { + keydown: function (e) { + this._start(e) && this._keydown(e) && e.preventDefault(); + }, + keyup: "_stop", + focus: function () { + this.previous = this.element.val(); + }, + blur: function (e) { + if (this.cancelBlur) { + delete this.cancelBlur; + return; + } + this._refresh(), + this.previous !== this.element.val() && this._trigger("change", e); + }, + mousewheel: function (e, t) { + if (!t) return; + if (!this.spinning && !this._start(e)) return !1; + this._spin((t > 0 ? 1 : -1) * this.options.step, e), + clearTimeout(this.mousewheelTimer), + (this.mousewheelTimer = this._delay(function () { + this.spinning && this._stop(e); + }, 100)), + e.preventDefault(); + }, + "mousedown .ui-spinner-button": function (t) { + function r() { + var e = this.element[0] === this.document[0].activeElement; + e || + (this.element.focus(), + (this.previous = n), + this._delay(function () { + this.previous = n; + })); + } + var n; + (n = + this.element[0] === this.document[0].activeElement + ? this.previous + : this.element.val()), + t.preventDefault(), + r.call(this), + (this.cancelBlur = !0), + this._delay(function () { + delete this.cancelBlur, r.call(this); + }); + if (this._start(t) === !1) return; + this._repeat( + null, + e(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, + t, + ); + }, + "mouseup .ui-spinner-button": "_stop", + "mouseenter .ui-spinner-button": function (t) { + if (!e(t.currentTarget).hasClass("ui-state-active")) return; + if (this._start(t) === !1) return !1; + this._repeat( + null, + e(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, + t, + ); + }, + "mouseleave .ui-spinner-button": "_stop", + }, + _draw: function () { + var e = (this.uiSpinner = this.element + .addClass("ui-spinner-input") + .attr("autocomplete", "off") + .wrap(this._uiSpinnerHtml()) + .parent() + .append(this._buttonHtml())); + this.element.attr("role", "spinbutton"), + (this.buttons = e + .find(".ui-spinner-button") + .attr("tabIndex", -1) + .button() + .removeClass("ui-corner-all")), + this.buttons.height() > Math.ceil(e.height() * 0.5) && + e.height() > 0 && + e.height(e.height()), + this.options.disabled && this.disable(); + }, + _keydown: function (t) { + var n = this.options, + r = e.ui.keyCode; + switch (t.keyCode) { + case r.UP: + return this._repeat(null, 1, t), !0; + case r.DOWN: + return this._repeat(null, -1, t), !0; + case r.PAGE_UP: + return this._repeat(null, n.page, t), !0; + case r.PAGE_DOWN: + return this._repeat(null, -n.page, t), !0; + } + return !1; + }, + _uiSpinnerHtml: function () { + return ""; + }, + _buttonHtml: function () { + return ( + "" + + "" + + "" + + "" + + "" + ); + }, + _start: function (e) { + return !this.spinning && this._trigger("start", e) === !1 + ? !1 + : (this.counter || (this.counter = 1), (this.spinning = !0), !0); + }, + _repeat: function (e, t, n) { + (e = e || 500), + clearTimeout(this.timer), + (this.timer = this._delay(function () { + this._repeat(40, t, n); + }, e)), + this._spin(t * this.options.step, n); + }, + _spin: function (e, t) { + var n = this.value() || 0; + this.counter || (this.counter = 1), + (n = this._adjustValue(n + e * this._increment(this.counter))); + if (!this.spinning || this._trigger("spin", t, { value: n }) !== !1) + this._value(n), this.counter++; + }, + _increment: function (t) { + var n = this.options.incremental; + return n + ? e.isFunction(n) + ? n(t) + : Math.floor((t * t * t) / 5e4 - (t * t) / 500 + (17 * t) / 200 + 1) + : 1; + }, + _precision: function () { + var e = this._precisionOf(this.options.step); + return ( + this.options.min !== null && + (e = Math.max(e, this._precisionOf(this.options.min))), + e + ); + }, + _precisionOf: function (e) { + var t = e.toString(), + n = t.indexOf("."); + return n === -1 ? 0 : t.length - n - 1; + }, + _adjustValue: function (e) { + var t, + n, + r = this.options; + return ( + (t = r.min !== null ? r.min : 0), + (n = e - t), + (n = Math.round(n / r.step) * r.step), + (e = t + n), + (e = parseFloat(e.toFixed(this._precision()))), + r.max !== null && e > r.max + ? r.max + : r.min !== null && e < r.min + ? r.min + : e + ); + }, + _stop: function (e) { + if (!this.spinning) return; + clearTimeout(this.timer), + clearTimeout(this.mousewheelTimer), + (this.counter = 0), + (this.spinning = !1), + this._trigger("stop", e); + }, + _setOption: function (e, t) { + if (e === "culture" || e === "numberFormat") { + var n = this._parse(this.element.val()); + (this.options[e] = t), this.element.val(this._format(n)); + return; + } + (e === "max" || e === "min" || e === "step") && + typeof t == "string" && + (t = this._parse(t)), + this._super(e, t), + e === "disabled" && + (t + ? (this.element.prop("disabled", !0), + this.buttons.button("disable")) + : (this.element.prop("disabled", !1), + this.buttons.button("enable"))); + }, + _setOptions: t(function (e) { + this._super(e), this._value(this.element.val()); + }), + _parse: function (e) { + return ( + typeof e == "string" && + e !== "" && + (e = + window.Globalize && this.options.numberFormat + ? Globalize.parseFloat(e, 10, this.options.culture) + : +e), + e === "" || isNaN(e) ? null : e + ); + }, + _format: function (e) { + return e === "" + ? "" + : window.Globalize && this.options.numberFormat + ? Globalize.format(e, this.options.numberFormat, this.options.culture) + : e; + }, + _refresh: function () { + this.element.attr({ + "aria-valuemin": this.options.min, + "aria-valuemax": this.options.max, + "aria-valuenow": this._parse(this.element.val()), + }); + }, + _value: function (e, t) { + var n; + e !== "" && + ((n = this._parse(e)), + n !== null && (t || (n = this._adjustValue(n)), (e = this._format(n)))), + this.element.val(e), + this._refresh(); + }, + _destroy: function () { + this.element + .removeClass("ui-spinner-input") + .prop("disabled", !1) + .removeAttr("autocomplete") + .removeAttr("role") + .removeAttr("aria-valuemin") + .removeAttr("aria-valuemax") + .removeAttr("aria-valuenow"), + this.uiSpinner.replaceWith(this.element); + }, + stepUp: t(function (e) { + this._stepUp(e); + }), + _stepUp: function (e) { + this._spin((e || 1) * this.options.step); + }, + stepDown: t(function (e) { + this._stepDown(e); + }), + _stepDown: function (e) { + this._spin((e || 1) * -this.options.step); + }, + pageUp: t(function (e) { + this._stepUp((e || 1) * this.options.page); + }), + pageDown: t(function (e) { + this._stepDown((e || 1) * this.options.page); + }), + value: function (e) { + if (!arguments.length) return this._parse(this.element.val()); + t(this._value).call(this, e); + }, + widget: function () { + return this.uiSpinner; + }, + }); +})(jQuery); +(function (e, t) { + function i() { + return ++n; + } + function s(e) { + return ( + e.hash.length > 1 && + e.href.replace(r, "") === + location.href.replace(r, "").replace(/\s/g, "%20") + ); + } + var n = 0, + r = /#.*$/; + e.widget("ui.tabs", { + version: "1.9.2", + delay: 300, + options: { + active: null, + collapsible: !1, + event: "click", + heightStyle: "content", + hide: null, + show: null, + activate: null, + beforeActivate: null, + beforeLoad: null, + load: null, + }, + _create: function () { + var t = this, + n = this.options, + r = n.active, + i = location.hash.substring(1); + (this.running = !1), + this.element + .addClass("ui-tabs ui-widget ui-widget-content ui-corner-all") + .toggleClass("ui-tabs-collapsible", n.collapsible) + .delegate( + ".ui-tabs-nav > li", + "mousedown" + this.eventNamespace, + function (t) { + e(this).is(".ui-state-disabled") && t.preventDefault(); + }, + ) + .delegate( + ".ui-tabs-anchor", + "focus" + this.eventNamespace, + function () { + e(this).closest("li").is(".ui-state-disabled") && this.blur(); + }, + ), + this._processTabs(); + if (r === null) { + i && + this.tabs.each(function (t, n) { + if (e(n).attr("aria-controls") === i) return (r = t), !1; + }), + r === null && + (r = this.tabs.index(this.tabs.filter(".ui-tabs-active"))); + if (r === null || r === -1) r = this.tabs.length ? 0 : !1; + } + r !== !1 && + ((r = this.tabs.index(this.tabs.eq(r))), + r === -1 && (r = n.collapsible ? !1 : 0)), + (n.active = r), + !n.collapsible && + n.active === !1 && + this.anchors.length && + (n.active = 0), + e.isArray(n.disabled) && + (n.disabled = e + .unique( + n.disabled.concat( + e.map(this.tabs.filter(".ui-state-disabled"), function (e) { + return t.tabs.index(e); + }), + ), + ) + .sort()), + this.options.active !== !1 && this.anchors.length + ? (this.active = this._findActive(this.options.active)) + : (this.active = e()), + this._refresh(), + this.active.length && this.load(n.active); + }, + _getCreateEventData: function () { + return { + tab: this.active, + panel: this.active.length ? this._getPanelForTab(this.active) : e(), + }; + }, + _tabKeydown: function (t) { + var n = e(this.document[0].activeElement).closest("li"), + r = this.tabs.index(n), + i = !0; + if (this._handlePageNav(t)) return; + switch (t.keyCode) { + case e.ui.keyCode.RIGHT: + case e.ui.keyCode.DOWN: + r++; + break; + case e.ui.keyCode.UP: + case e.ui.keyCode.LEFT: + (i = !1), r--; + break; + case e.ui.keyCode.END: + r = this.anchors.length - 1; + break; + case e.ui.keyCode.HOME: + r = 0; + break; + case e.ui.keyCode.SPACE: + t.preventDefault(), clearTimeout(this.activating), this._activate(r); + return; + case e.ui.keyCode.ENTER: + t.preventDefault(), + clearTimeout(this.activating), + this._activate(r === this.options.active ? !1 : r); + return; + default: + return; + } + t.preventDefault(), + clearTimeout(this.activating), + (r = this._focusNextTab(r, i)), + t.ctrlKey || + (n.attr("aria-selected", "false"), + this.tabs.eq(r).attr("aria-selected", "true"), + (this.activating = this._delay(function () { + this.option("active", r); + }, this.delay))); + }, + _panelKeydown: function (t) { + if (this._handlePageNav(t)) return; + t.ctrlKey && + t.keyCode === e.ui.keyCode.UP && + (t.preventDefault(), this.active.focus()); + }, + _handlePageNav: function (t) { + if (t.altKey && t.keyCode === e.ui.keyCode.PAGE_UP) + return ( + this._activate(this._focusNextTab(this.options.active - 1, !1)), !0 + ); + if (t.altKey && t.keyCode === e.ui.keyCode.PAGE_DOWN) + return ( + this._activate(this._focusNextTab(this.options.active + 1, !0)), !0 + ); + }, + _findNextTab: function (t, n) { + function i() { + return t > r && (t = 0), t < 0 && (t = r), t; + } + var r = this.tabs.length - 1; + while (e.inArray(i(), this.options.disabled) !== -1) + t = n ? t + 1 : t - 1; + return t; + }, + _focusNextTab: function (e, t) { + return (e = this._findNextTab(e, t)), this.tabs.eq(e).focus(), e; + }, + _setOption: function (e, t) { + if (e === "active") { + this._activate(t); + return; + } + if (e === "disabled") { + this._setupDisabled(t); + return; + } + this._super(e, t), + e === "collapsible" && + (this.element.toggleClass("ui-tabs-collapsible", t), + !t && this.options.active === !1 && this._activate(0)), + e === "event" && this._setupEvents(t), + e === "heightStyle" && this._setupHeightStyle(t); + }, + _tabId: function (e) { + return e.attr("aria-controls") || "ui-tabs-" + i(); + }, + _sanitizeSelector: function (e) { + return e ? e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : ""; + }, + refresh: function () { + var t = this.options, + n = this.tablist.children(":has(a[href])"); + (t.disabled = e.map(n.filter(".ui-state-disabled"), function (e) { + return n.index(e); + })), + this._processTabs(), + t.active === !1 || !this.anchors.length + ? ((t.active = !1), (this.active = e())) + : this.active.length && !e.contains(this.tablist[0], this.active[0]) + ? this.tabs.length === t.disabled.length + ? ((t.active = !1), (this.active = e())) + : this._activate(this._findNextTab(Math.max(0, t.active - 1), !1)) + : (t.active = this.tabs.index(this.active)), + this._refresh(); + }, + _refresh: function () { + this._setupDisabled(this.options.disabled), + this._setupEvents(this.options.event), + this._setupHeightStyle(this.options.heightStyle), + this.tabs + .not(this.active) + .attr({ "aria-selected": "false", tabIndex: -1 }), + this.panels + .not(this._getPanelForTab(this.active)) + .hide() + .attr({ "aria-expanded": "false", "aria-hidden": "true" }), + this.active.length + ? (this.active + .addClass("ui-tabs-active ui-state-active") + .attr({ "aria-selected": "true", tabIndex: 0 }), + this._getPanelForTab(this.active) + .show() + .attr({ "aria-expanded": "true", "aria-hidden": "false" })) + : this.tabs.eq(0).attr("tabIndex", 0); + }, + _processTabs: function () { + var t = this; + (this.tablist = this._getList() + .addClass( + "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all", + ) + .attr("role", "tablist")), + (this.tabs = this.tablist + .find("> li:has(a[href])") + .addClass("ui-state-default ui-corner-top") + .attr({ role: "tab", tabIndex: -1 })), + (this.anchors = this.tabs + .map(function () { + return e("a", this)[0]; + }) + .addClass("ui-tabs-anchor") + .attr({ role: "presentation", tabIndex: -1 })), + (this.panels = e()), + this.anchors.each(function (n, r) { + var i, + o, + u, + a = e(r).uniqueId().attr("id"), + f = e(r).closest("li"), + l = f.attr("aria-controls"); + s(r) + ? ((i = r.hash), (o = t.element.find(t._sanitizeSelector(i)))) + : ((u = t._tabId(f)), + (i = "#" + u), + (o = t.element.find(i)), + o.length || + ((o = t._createPanel(u)), + o.insertAfter(t.panels[n - 1] || t.tablist)), + o.attr("aria-live", "polite")), + o.length && (t.panels = t.panels.add(o)), + l && f.data("ui-tabs-aria-controls", l), + f.attr({ "aria-controls": i.substring(1), "aria-labelledby": a }), + o.attr("aria-labelledby", a); + }), + this.panels + .addClass("ui-tabs-panel ui-widget-content ui-corner-bottom") + .attr("role", "tabpanel"); + }, + _getList: function () { + return this.element.find("ol,ul").eq(0); + }, + _createPanel: function (t) { + return e("
            ") + .attr("id", t) + .addClass("ui-tabs-panel ui-widget-content ui-corner-bottom") + .data("ui-tabs-destroy", !0); + }, + _setupDisabled: function (t) { + e.isArray(t) && + (t.length ? t.length === this.anchors.length && (t = !0) : (t = !1)); + for (var n = 0, r; (r = this.tabs[n]); n++) + t === !0 || e.inArray(n, t) !== -1 + ? e(r).addClass("ui-state-disabled").attr("aria-disabled", "true") + : e(r).removeClass("ui-state-disabled").removeAttr("aria-disabled"); + this.options.disabled = t; + }, + _setupEvents: function (t) { + var n = { + click: function (e) { + e.preventDefault(); + }, + }; + t && + e.each(t.split(" "), function (e, t) { + n[t] = "_eventHandler"; + }), + this._off(this.anchors.add(this.tabs).add(this.panels)), + this._on(this.anchors, n), + this._on(this.tabs, { keydown: "_tabKeydown" }), + this._on(this.panels, { keydown: "_panelKeydown" }), + this._focusable(this.tabs), + this._hoverable(this.tabs); + }, + _setupHeightStyle: function (t) { + var n, + r, + i = this.element.parent(); + t === "fill" + ? (e.support.minHeight || + ((r = i.css("overflow")), i.css("overflow", "hidden")), + (n = i.height()), + this.element.siblings(":visible").each(function () { + var t = e(this), + r = t.css("position"); + if (r === "absolute" || r === "fixed") return; + n -= t.outerHeight(!0); + }), + r && i.css("overflow", r), + this.element + .children() + .not(this.panels) + .each(function () { + n -= e(this).outerHeight(!0); + }), + this.panels + .each(function () { + e(this).height( + Math.max(0, n - e(this).innerHeight() + e(this).height()), + ); + }) + .css("overflow", "auto")) + : t === "auto" && + ((n = 0), + this.panels + .each(function () { + n = Math.max(n, e(this).height("").height()); + }) + .height(n)); + }, + _eventHandler: function (t) { + var n = this.options, + r = this.active, + i = e(t.currentTarget), + s = i.closest("li"), + o = s[0] === r[0], + u = o && n.collapsible, + a = u ? e() : this._getPanelForTab(s), + f = r.length ? this._getPanelForTab(r) : e(), + l = { oldTab: r, oldPanel: f, newTab: u ? e() : s, newPanel: a }; + t.preventDefault(); + if ( + s.hasClass("ui-state-disabled") || + s.hasClass("ui-tabs-loading") || + this.running || + (o && !n.collapsible) || + this._trigger("beforeActivate", t, l) === !1 + ) + return; + (n.active = u ? !1 : this.tabs.index(s)), + (this.active = o ? e() : s), + this.xhr && this.xhr.abort(), + !f.length && + !a.length && + e.error("jQuery UI Tabs: Mismatching fragment identifier."), + a.length && this.load(this.tabs.index(s), t), + this._toggle(t, l); + }, + _toggle: function (t, n) { + function o() { + (r.running = !1), r._trigger("activate", t, n); + } + function u() { + n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"), + i.length && r.options.show + ? r._show(i, r.options.show, o) + : (i.show(), o()); + } + var r = this, + i = n.newPanel, + s = n.oldPanel; + (this.running = !0), + s.length && this.options.hide + ? this._hide(s, this.options.hide, function () { + n.oldTab + .closest("li") + .removeClass("ui-tabs-active ui-state-active"), + u(); + }) + : (n.oldTab + .closest("li") + .removeClass("ui-tabs-active ui-state-active"), + s.hide(), + u()), + s.attr({ "aria-expanded": "false", "aria-hidden": "true" }), + n.oldTab.attr("aria-selected", "false"), + i.length && s.length + ? n.oldTab.attr("tabIndex", -1) + : i.length && + this.tabs + .filter(function () { + return e(this).attr("tabIndex") === 0; + }) + .attr("tabIndex", -1), + i.attr({ "aria-expanded": "true", "aria-hidden": "false" }), + n.newTab.attr({ "aria-selected": "true", tabIndex: 0 }); + }, + _activate: function (t) { + var n, + r = this._findActive(t); + if (r[0] === this.active[0]) return; + r.length || (r = this.active), + (n = r.find(".ui-tabs-anchor")[0]), + this._eventHandler({ + target: n, + currentTarget: n, + preventDefault: e.noop, + }); + }, + _findActive: function (t) { + return t === !1 ? e() : this.tabs.eq(t); + }, + _getIndex: function (e) { + return ( + typeof e == "string" && + (e = this.anchors.index(this.anchors.filter("[href$='" + e + "']"))), + e + ); + }, + _destroy: function () { + this.xhr && this.xhr.abort(), + this.element.removeClass( + "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible", + ), + this.tablist + .removeClass( + "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all", + ) + .removeAttr("role"), + this.anchors + .removeClass("ui-tabs-anchor") + .removeAttr("role") + .removeAttr("tabIndex") + .removeData("href.tabs") + .removeData("load.tabs") + .removeUniqueId(), + this.tabs.add(this.panels).each(function () { + e.data(this, "ui-tabs-destroy") + ? e(this).remove() + : e(this) + .removeClass( + "ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel", + ) + .removeAttr("tabIndex") + .removeAttr("aria-live") + .removeAttr("aria-busy") + .removeAttr("aria-selected") + .removeAttr("aria-labelledby") + .removeAttr("aria-hidden") + .removeAttr("aria-expanded") + .removeAttr("role"); + }), + this.tabs.each(function () { + var t = e(this), + n = t.data("ui-tabs-aria-controls"); + n ? t.attr("aria-controls", n) : t.removeAttr("aria-controls"); + }), + this.panels.show(), + this.options.heightStyle !== "content" && this.panels.css("height", ""); + }, + enable: function (n) { + var r = this.options.disabled; + if (r === !1) return; + n === t + ? (r = !1) + : ((n = this._getIndex(n)), + e.isArray(r) + ? (r = e.map(r, function (e) { + return e !== n ? e : null; + })) + : (r = e.map(this.tabs, function (e, t) { + return t !== n ? t : null; + }))), + this._setupDisabled(r); + }, + disable: function (n) { + var r = this.options.disabled; + if (r === !0) return; + if (n === t) r = !0; + else { + n = this._getIndex(n); + if (e.inArray(n, r) !== -1) return; + e.isArray(r) ? (r = e.merge([n], r).sort()) : (r = [n]); + } + this._setupDisabled(r); + }, + load: function (t, n) { + t = this._getIndex(t); + var r = this, + i = this.tabs.eq(t), + o = i.find(".ui-tabs-anchor"), + u = this._getPanelForTab(i), + a = { tab: i, panel: u }; + if (s(o[0])) return; + (this.xhr = e.ajax(this._ajaxSettings(o, n, a))), + this.xhr && + this.xhr.statusText !== "canceled" && + (i.addClass("ui-tabs-loading"), + u.attr("aria-busy", "true"), + this.xhr + .success(function (e) { + setTimeout(function () { + u.html(e), r._trigger("load", n, a); + }, 1); + }) + .complete(function (e, t) { + setTimeout(function () { + t === "abort" && r.panels.stop(!1, !0), + i.removeClass("ui-tabs-loading"), + u.removeAttr("aria-busy"), + e === r.xhr && delete r.xhr; + }, 1); + })); + }, + _ajaxSettings: function (t, n, r) { + var i = this; + return { + url: t.attr("href"), + beforeSend: function (t, s) { + return i._trigger( + "beforeLoad", + n, + e.extend({ jqXHR: t, ajaxSettings: s }, r), + ); + }, + }; + }, + _getPanelForTab: function (t) { + var n = e(t).attr("aria-controls"); + return this.element.find(this._sanitizeSelector("#" + n)); + }, + }), + e.uiBackCompat !== !1 && + ((e.ui.tabs.prototype._ui = function (e, t) { + return { tab: e, panel: t, index: this.anchors.index(e) }; + }), + e.widget("ui.tabs", e.ui.tabs, { + url: function (e, t) { + this.anchors.eq(e).attr("href", t); + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + options: { ajaxOptions: null, cache: !1 }, + _create: function () { + this._super(); + var t = this; + this._on({ + tabsbeforeload: function (n, r) { + if (e.data(r.tab[0], "cache.tabs")) { + n.preventDefault(); + return; + } + r.jqXHR.success(function () { + t.options.cache && e.data(r.tab[0], "cache.tabs", !0); + }); + }, + }); + }, + _ajaxSettings: function (t, n, r) { + var i = this.options.ajaxOptions; + return e.extend( + {}, + i, + { + error: function (e, t) { + try { + i.error(e, t, r.tab.closest("li").index(), r.tab[0]); + } catch (n) {} + }, + }, + this._superApply(arguments), + ); + }, + _setOption: function (e, t) { + e === "cache" && t === !1 && this.anchors.removeData("cache.tabs"), + this._super(e, t); + }, + _destroy: function () { + this.anchors.removeData("cache.tabs"), this._super(); + }, + url: function (e) { + this.anchors.eq(e).removeData("cache.tabs"), + this._superApply(arguments); + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + abort: function () { + this.xhr && this.xhr.abort(); + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + options: { spinner: "Loading…" }, + _create: function () { + this._super(), + this._on({ + tabsbeforeload: function (e, t) { + if (e.target !== this.element[0] || !this.options.spinner) + return; + var n = t.tab.find("span"), + r = n.html(); + n.html(this.options.spinner), + t.jqXHR.complete(function () { + n.html(r); + }); + }, + }); + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + options: { enable: null, disable: null }, + enable: function (t) { + var n = this.options, + r; + if ( + (t && n.disabled === !0) || + (e.isArray(n.disabled) && e.inArray(t, n.disabled) !== -1) + ) + r = !0; + this._superApply(arguments), + r && + this._trigger( + "enable", + null, + this._ui(this.anchors[t], this.panels[t]), + ); + }, + disable: function (t) { + var n = this.options, + r; + if ( + (t && n.disabled === !1) || + (e.isArray(n.disabled) && e.inArray(t, n.disabled) === -1) + ) + r = !0; + this._superApply(arguments), + r && + this._trigger( + "disable", + null, + this._ui(this.anchors[t], this.panels[t]), + ); + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + options: { + add: null, + remove: null, + tabTemplate: "
          • #{label}
          • ", + }, + add: function (n, r, i) { + i === t && (i = this.anchors.length); + var s, + o, + u = this.options, + a = e( + u.tabTemplate.replace(/#\{href\}/g, n).replace(/#\{label\}/g, r), + ), + f = n.indexOf("#") ? this._tabId(a) : n.replace("#", ""); + return ( + a + .addClass("ui-state-default ui-corner-top") + .data("ui-tabs-destroy", !0), + a.attr("aria-controls", f), + (s = i >= this.tabs.length), + (o = this.element.find("#" + f)), + o.length || + ((o = this._createPanel(f)), + s + ? i > 0 + ? o.insertAfter(this.panels.eq(-1)) + : o.appendTo(this.element) + : o.insertBefore(this.panels[i])), + o + .addClass("ui-tabs-panel ui-widget-content ui-corner-bottom") + .hide(), + s ? a.appendTo(this.tablist) : a.insertBefore(this.tabs[i]), + (u.disabled = e.map(u.disabled, function (e) { + return e >= i ? ++e : e; + })), + this.refresh(), + this.tabs.length === 1 && + u.active === !1 && + this.option("active", 0), + this._trigger( + "add", + null, + this._ui(this.anchors[i], this.panels[i]), + ), + this + ); + }, + remove: function (t) { + t = this._getIndex(t); + var n = this.options, + r = this.tabs.eq(t).remove(), + i = this._getPanelForTab(r).remove(); + return ( + r.hasClass("ui-tabs-active") && + this.anchors.length > 2 && + this._activate(t + (t + 1 < this.anchors.length ? 1 : -1)), + (n.disabled = e.map( + e.grep(n.disabled, function (e) { + return e !== t; + }), + function (e) { + return e >= t ? --e : e; + }, + )), + this.refresh(), + this._trigger("remove", null, this._ui(r.find("a")[0], i[0])), + this + ); + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + length: function () { + return this.anchors.length; + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + options: { idPrefix: "ui-tabs-" }, + _tabId: function (t) { + var n = t.is("li") ? t.find("a[href]") : t; + return ( + (n = n[0]), + e(n).closest("li").attr("aria-controls") || + (n.title && + n.title + .replace(/\s/g, "_") + .replace(/[^\w\u00c0-\uFFFF\-]/g, "")) || + this.options.idPrefix + i() + ); + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + options: { panelTemplate: "
            " }, + _createPanel: function (t) { + return e(this.options.panelTemplate) + .attr("id", t) + .addClass("ui-tabs-panel ui-widget-content ui-corner-bottom") + .data("ui-tabs-destroy", !0); + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + _create: function () { + var e = this.options; + e.active === null && + e.selected !== t && + (e.active = e.selected === -1 ? !1 : e.selected), + this._super(), + (e.selected = e.active), + e.selected === !1 && (e.selected = -1); + }, + _setOption: function (e, t) { + if (e !== "selected") return this._super(e, t); + var n = this.options; + this._super("active", t === -1 ? !1 : t), + (n.selected = n.active), + n.selected === !1 && (n.selected = -1); + }, + _eventHandler: function () { + this._superApply(arguments), + (this.options.selected = this.options.active), + this.options.selected === !1 && (this.options.selected = -1); + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + options: { show: null, select: null }, + _create: function () { + this._super(), + this.options.active !== !1 && + this._trigger( + "show", + null, + this._ui( + this.active.find(".ui-tabs-anchor")[0], + this._getPanelForTab(this.active)[0], + ), + ); + }, + _trigger: function (e, t, n) { + var r, + i, + s = this._superApply(arguments); + return s + ? (e === "beforeActivate" + ? ((r = n.newTab.length ? n.newTab : n.oldTab), + (i = n.newPanel.length ? n.newPanel : n.oldPanel), + (s = this._super("select", t, { + tab: r.find(".ui-tabs-anchor")[0], + panel: i[0], + index: r.closest("li").index(), + }))) + : e === "activate" && + n.newTab.length && + (s = this._super("show", t, { + tab: n.newTab.find(".ui-tabs-anchor")[0], + panel: n.newPanel[0], + index: n.newTab.closest("li").index(), + })), + s) + : !1; + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + select: function (e) { + e = this._getIndex(e); + if (e === -1) { + if (!this.options.collapsible || this.options.selected === -1) + return; + e = this.options.selected; + } + this.anchors.eq(e).trigger(this.options.event + this.eventNamespace); + }, + }), + (function () { + var t = 0; + e.widget("ui.tabs", e.ui.tabs, { + options: { cookie: null }, + _create: function () { + var e = this.options, + t; + e.active == null && + e.cookie && + ((t = parseInt(this._cookie(), 10)), + t === -1 && (t = !1), + (e.active = t)), + this._super(); + }, + _cookie: function (n) { + var r = [ + this.cookie || + (this.cookie = this.options.cookie.name || "ui-tabs-" + ++t), + ]; + return ( + arguments.length && + (r.push(n === !1 ? -1 : n), r.push(this.options.cookie)), + e.cookie.apply(null, r) + ); + }, + _refresh: function () { + this._super(), + this.options.cookie && + this._cookie(this.options.active, this.options.cookie); + }, + _eventHandler: function () { + this._superApply(arguments), + this.options.cookie && + this._cookie(this.options.active, this.options.cookie); + }, + _destroy: function () { + this._super(), + this.options.cookie && this._cookie(null, this.options.cookie); + }, + }); + })(), + e.widget("ui.tabs", e.ui.tabs, { + _trigger: function (t, n, r) { + var i = e.extend({}, r); + return ( + t === "load" && + ((i.panel = i.panel[0]), + (i.tab = i.tab.find(".ui-tabs-anchor")[0])), + this._super(t, n, i) + ); + }, + }), + e.widget("ui.tabs", e.ui.tabs, { + options: { fx: null }, + _getFx: function () { + var t, + n, + r = this.options.fx; + return ( + r && (e.isArray(r) ? ((t = r[0]), (n = r[1])) : (t = n = r)), + r ? { show: n, hide: t } : null + ); + }, + _toggle: function (e, t) { + function o() { + (n.running = !1), n._trigger("activate", e, t); + } + function u() { + t.newTab.closest("li").addClass("ui-tabs-active ui-state-active"), + r.length && s.show + ? r.animate(s.show, s.show.duration, function () { + o(); + }) + : (r.show(), o()); + } + var n = this, + r = t.newPanel, + i = t.oldPanel, + s = this._getFx(); + if (!s) return this._super(e, t); + (n.running = !0), + i.length && s.hide + ? i.animate(s.hide, s.hide.duration, function () { + t.oldTab + .closest("li") + .removeClass("ui-tabs-active ui-state-active"), + u(); + }) + : (t.oldTab + .closest("li") + .removeClass("ui-tabs-active ui-state-active"), + i.hide(), + u()); + }, + })); +})(jQuery); +(function (e) { + function n(t, n) { + var r = (t.attr("aria-describedby") || "").split(/\s+/); + r.push(n), + t.data("ui-tooltip-id", n).attr("aria-describedby", e.trim(r.join(" "))); + } + function r(t) { + var n = t.data("ui-tooltip-id"), + r = (t.attr("aria-describedby") || "").split(/\s+/), + i = e.inArray(n, r); + i !== -1 && r.splice(i, 1), + t.removeData("ui-tooltip-id"), + (r = e.trim(r.join(" "))), + r ? t.attr("aria-describedby", r) : t.removeAttr("aria-describedby"); + } + var t = 0; + e.widget("ui.tooltip", { + version: "1.9.2", + options: { + content: function () { + return e(this).attr("title"); + }, + hide: !0, + items: "[title]:not([disabled])", + position: { + my: "left top+15", + at: "left bottom", + collision: "flipfit flip", + }, + show: !0, + tooltipClass: null, + track: !1, + close: null, + open: null, + }, + _create: function () { + this._on({ mouseover: "open", focusin: "open" }), + (this.tooltips = {}), + (this.parents = {}), + this.options.disabled && this._disable(); + }, + _setOption: function (t, n) { + var r = this; + if (t === "disabled") { + this[n ? "_disable" : "_enable"](), (this.options[t] = n); + return; + } + this._super(t, n), + t === "content" && + e.each(this.tooltips, function (e, t) { + r._updateContent(t); + }); + }, + _disable: function () { + var t = this; + e.each(this.tooltips, function (n, r) { + var i = e.Event("blur"); + (i.target = i.currentTarget = r[0]), t.close(i, !0); + }), + this.element + .find(this.options.items) + .andSelf() + .each(function () { + var t = e(this); + t.is("[title]") && + t.data("ui-tooltip-title", t.attr("title")).attr("title", ""); + }); + }, + _enable: function () { + this.element + .find(this.options.items) + .andSelf() + .each(function () { + var t = e(this); + t.data("ui-tooltip-title") && + t.attr("title", t.data("ui-tooltip-title")); + }); + }, + open: function (t) { + var n = this, + r = e(t ? t.target : this.element).closest(this.options.items); + if (!r.length || r.data("ui-tooltip-id")) return; + r.attr("title") && r.data("ui-tooltip-title", r.attr("title")), + r.data("ui-tooltip-open", !0), + t && + t.type === "mouseover" && + r.parents().each(function () { + var t = e(this), + r; + t.data("ui-tooltip-open") && + ((r = e.Event("blur")), + (r.target = r.currentTarget = this), + n.close(r, !0)), + t.attr("title") && + (t.uniqueId(), + (n.parents[this.id] = { + element: this, + title: t.attr("title"), + }), + t.attr("title", "")); + }), + this._updateContent(r, t); + }, + _updateContent: function (e, t) { + var n, + r = this.options.content, + i = this, + s = t ? t.type : null; + if (typeof r == "string") return this._open(t, e, r); + (n = r.call(e[0], function (n) { + if (!e.data("ui-tooltip-open")) return; + i._delay(function () { + t && (t.type = s), this._open(t, e, n); + }); + })), + n && this._open(t, e, n); + }, + _open: function (t, r, i) { + function f(e) { + a.of = e; + if (s.is(":hidden")) return; + s.position(a); + } + var s, + o, + u, + a = e.extend({}, this.options.position); + if (!i) return; + s = this._find(r); + if (s.length) { + s.find(".ui-tooltip-content").html(i); + return; + } + r.is("[title]") && + (t && t.type === "mouseover" + ? r.attr("title", "") + : r.removeAttr("title")), + (s = this._tooltip(r)), + n(r, s.attr("id")), + s.find(".ui-tooltip-content").html(i), + this.options.track && t && /^mouse/.test(t.type) + ? (this._on(this.document, { mousemove: f }), f(t)) + : s.position(e.extend({ of: r }, this.options.position)), + s.hide(), + this._show(s, this.options.show), + this.options.show && + this.options.show.delay && + (u = setInterval(function () { + s.is(":visible") && (f(a.of), clearInterval(u)); + }, e.fx.interval)), + this._trigger("open", t, { tooltip: s }), + (o = { + keyup: function (t) { + if (t.keyCode === e.ui.keyCode.ESCAPE) { + var n = e.Event(t); + (n.currentTarget = r[0]), this.close(n, !0); + } + }, + remove: function () { + this._removeTooltip(s); + }, + }); + if (!t || t.type === "mouseover") o.mouseleave = "close"; + if (!t || t.type === "focusin") o.focusout = "close"; + this._on(!0, r, o); + }, + close: function (t) { + var n = this, + i = e(t ? t.currentTarget : this.element), + s = this._find(i); + if (this.closing) return; + i.data("ui-tooltip-title") && i.attr("title", i.data("ui-tooltip-title")), + r(i), + s.stop(!0), + this._hide(s, this.options.hide, function () { + n._removeTooltip(e(this)); + }), + i.removeData("ui-tooltip-open"), + this._off(i, "mouseleave focusout keyup"), + i[0] !== this.element[0] && this._off(i, "remove"), + this._off(this.document, "mousemove"), + t && + t.type === "mouseleave" && + e.each(this.parents, function (t, r) { + e(r.element).attr("title", r.title), delete n.parents[t]; + }), + (this.closing = !0), + this._trigger("close", t, { tooltip: s }), + (this.closing = !1); + }, + _tooltip: function (n) { + var r = "ui-tooltip-" + t++, + i = e("
            ") + .attr({ id: r, role: "tooltip" }) + .addClass( + "ui-tooltip ui-widget ui-corner-all ui-widget-content " + + (this.options.tooltipClass || ""), + ); + return ( + e("
            ").addClass("ui-tooltip-content").appendTo(i), + i.appendTo(this.document[0].body), + e.fn.bgiframe && i.bgiframe(), + (this.tooltips[r] = n), + i + ); + }, + _find: function (t) { + var n = t.data("ui-tooltip-id"); + return n ? e("#" + n) : e(); + }, + _removeTooltip: function (e) { + e.remove(), delete this.tooltips[e.attr("id")]; + }, + _destroy: function () { + var t = this; + e.each(this.tooltips, function (n, r) { + var i = e.Event("blur"); + (i.target = i.currentTarget = r[0]), + t.close(i, !0), + e("#" + n).remove(), + r.data("ui-tooltip-title") && + (r.attr("title", r.data("ui-tooltip-title")), + r.removeData("ui-tooltip-title")); + }); + }, + }); +})(jQuery); diff --git a/r2rgui/public/javascripts/main.js b/r2rgui/public/javascripts/main.js index 921371a..1b88a7a 100644 --- a/r2rgui/public/javascripts/main.js +++ b/r2rgui/public/javascripts/main.js @@ -1,22 +1,24 @@ /** Initialization */ -$(function() { +$(function () { $("button[type!='radio'], input:submit, input:checkbox, a.button").button(); }); /** Gets the HTML from a specified path and displays it as a dialog. */ function showDialog(path) { - $.get(path, function(data) { - $('#dialogContainer').html(data); - }).fail(function(request) { alert(request.responseText); }) + $.get(path, function (data) { + $("#dialogContainer").html(data); + }).fail(function (request) { + alert(request.responseText); + }); } /** Commits the contents of the mapping text area. */ function updateMapping() { $.ajax({ url: "/api/mapping", - type: 'put', - contentType: 'text/plain', - data: $('#mapping').val(), - processData: false + type: "put", + contentType: "text/plain", + data: $("#mapping").val(), + processData: false, }); -} \ No newline at end of file +} diff --git a/r2rgui/public/stylesheets/jquery-ui-1.9.2.custom.min.css b/r2rgui/public/stylesheets/jquery-ui-1.9.2.custom.min.css index e964969..196f4e9 100644 --- a/r2rgui/public/stylesheets/jquery-ui-1.9.2.custom.min.css +++ b/r2rgui/public/stylesheets/jquery-ui-1.9.2.custom.min.css @@ -2,4 +2,1478 @@ * http://jqueryui.com * Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css * To view and modify this theme, visit http://jqueryui.com/themeroller/ -* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{zoom:1}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;zoom:1}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto;zoom:1}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}* html .ui-autocomplete{width:1px}.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0em}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-cover{position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;width:100%}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;zoom:1;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}* html .ui-tooltip{background-image:none}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-khtml-border-top-right-radius:4px;border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;-khtml-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;-khtml-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px} \ No newline at end of file +* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + zoom: 1; +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter: Alpha(Opacity=0); +} +.ui-state-disabled { + cursor: default !important; +} +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} +.ui-widget-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin-top: 2px; + padding: 0.5em 0.5em 0.5em 0.7em; + zoom: 1; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-noicons { + padding-left: 0.7em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: 0.5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; + zoom: 1; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +* html .ui-autocomplete { + width: 1px; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + margin-right: 0.1em; + cursor: pointer; + text-align: center; + zoom: 1; + overflow: visible; +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +.ui-button-icon-only { + width: 2.2em; +} +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} +.ui-button .ui-button-text { + display: block; + line-height: 1.4; +} +.ui-button-text-only .ui-button-text { + padding: 0.4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: 0.4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 0.4em 1em 0.4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 0.4em 2.1em 0.4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +input.ui-button { + padding: 0.4em 1em; +} +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: 0.5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: 0.5em; +} +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: 0.5em; +} +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -0.3em; +} +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: 0.2em 0.2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: 0.2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month-year { + width: 100%; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 49%; +} +.ui-datepicker table { + width: 100%; + font-size: 0.9em; + border-collapse: collapse; + margin: 0 0 0.4em; +} +.ui-datepicker th { + padding: 0.7em 0.3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: 0.2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: 0.7em 0 0 0; + padding: 0 0.2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: 0.5em 0.2em 0.4em; + cursor: pointer; + padding: 0.2em 0.6em 0.3em 0.6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto 0.4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0em; +} +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-datepicker-cover { + position: absolute; + z-index: -1; + filter: mask(); + top: -4px; + left: -4px; + width: 200px; + height: 200px; +} +.ui-dialog { + position: absolute; + top: 0; + left: 0; + padding: 0.2em; + width: 300px; + overflow: hidden; +} +.ui-dialog .ui-dialog-titlebar { + padding: 0.4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: 0.1em 16px 0.1em 0; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: 0.3em; + top: 50%; + width: 19px; + margin: -10px 0 0 0; + padding: 1px; + height: 18px; +} +.ui-dialog .ui-dialog-titlebar-close span { + display: block; + margin: 1px; +} +.ui-dialog .ui-dialog-titlebar-close:hover, +.ui-dialog .ui-dialog-titlebar-close:focus { + padding: 0; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: 0.5em 1em; + background: none; + overflow: auto; + zoom: 1; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin: 0.5em 0 0 0; + padding: 0.3em 1em 0.5em 0.4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: 0.5em 0.4em 0.5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 14px; + height: 14px; + right: 3px; + bottom: 3px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 2px; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + zoom: 1; + width: 100%; +} +.ui-menu .ui-menu-divider { + margin: 5px -2px 5px -2px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 2px 0.4em; + line-height: 1.5; + zoom: 1; + font-weight: normal; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} +.ui-menu .ui-state-disabled { + font-weight: normal; + margin: 0.4em 0 0.2em; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} +.ui-menu .ui-icon { + position: absolute; + top: 0.2em; + left: 0.2em; +} +.ui-menu .ui-menu-icon { + position: static; + float: right; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: 0.7em; + display: block; + border: 0; + background-position: 0 0; +} +.ui-slider-horizontal { + height: 0.8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -0.3em; + margin-left: -0.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} +.ui-slider-vertical { + width: 0.8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -0.3em; + margin-left: 0; + margin-bottom: -0.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + padding: 0; + margin: 0.2em 0; + vertical-align: middle; + margin-left: 0.4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: 0.5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} +.ui-spinner .ui-icon-triangle-1-s { + background-position: -65px -16px; +} +.ui-tabs { + position: relative; + padding: 0.2em; + zoom: 1; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: 0.2em 0.2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px 0.2em 0 0; + border-bottom: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav li a { + float: left; + padding: 0.5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, +.ui-tabs .ui-tabs-nav li.ui-state-disabled a, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { + cursor: text; +} +.ui-tabs .ui-tabs-nav li a, +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +* html .ui-tooltip { + background-image: none; +} +body .ui-tooltip { + border-width: 2px; +} +.ui-widget { + font-family: Verdana, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Verdana, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaa; + background: #fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; + color: #222; +} +.ui-widget-content a { + color: #222; +} +.ui-widget-header { + border: 1px solid #aaa; + background: #ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% + repeat-x; + color: #222; + font-weight: bold; +} +.ui-widget-header a { + color: #222; +} +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #d3d3d3; + background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% + repeat-x; + font-weight: normal; + color: #555; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #555; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #999; + background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% + repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited { + color: #212121; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #aaa; + background: #fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #212121; + text-decoration: none; +} +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fcefa1; + background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% + repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% + repeat-x; + color: #cd0a0a; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #cd0a0a; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #cd0a0a; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: 0.7; + filter: Alpha(Opacity=70); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: 0.35; + filter: Alpha(Opacity=35); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter: Alpha(Opacity=35); +} +.ui-icon { + width: 16px; + height: 16px; + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-widget-content .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-widget-header .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-state-default .ui-icon { + background-image: url(images/ui-icons_888888_256x240.png); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-active .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-highlight .ui-icon { + background-image: url(images/ui-icons_2e83ff_256x240.png); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url(images/ui-icons_cd0a0a_256x240.png); +} +.ui-icon-carat-1-n { + background-position: 0 0; +} +.ui-icon-carat-1-ne { + background-position: -16px 0; +} +.ui-icon-carat-1-e { + background-position: -32px 0; +} +.ui-icon-carat-1-se { + background-position: -48px 0; +} +.ui-icon-carat-1-s { + background-position: -64px 0; +} +.ui-icon-carat-1-sw { + background-position: -80px 0; +} +.ui-icon-carat-1-w { + background-position: -96px 0; +} +.ui-icon-carat-1-nw { + background-position: -112px 0; +} +.ui-icon-carat-2-n-s { + background-position: -128px 0; +} +.ui-icon-carat-2-e-w { + background-position: -144px 0; +} +.ui-icon-triangle-1-n { + background-position: 0 -16px; +} +.ui-icon-triangle-1-ne { + background-position: -16px -16px; +} +.ui-icon-triangle-1-e { + background-position: -32px -16px; +} +.ui-icon-triangle-1-se { + background-position: -48px -16px; +} +.ui-icon-triangle-1-s { + background-position: -64px -16px; +} +.ui-icon-triangle-1-sw { + background-position: -80px -16px; +} +.ui-icon-triangle-1-w { + background-position: -96px -16px; +} +.ui-icon-triangle-1-nw { + background-position: -112px -16px; +} +.ui-icon-triangle-2-n-s { + background-position: -128px -16px; +} +.ui-icon-triangle-2-e-w { + background-position: -144px -16px; +} +.ui-icon-arrow-1-n { + background-position: 0 -32px; +} +.ui-icon-arrow-1-ne { + background-position: -16px -32px; +} +.ui-icon-arrow-1-e { + background-position: -32px -32px; +} +.ui-icon-arrow-1-se { + background-position: -48px -32px; +} +.ui-icon-arrow-1-s { + background-position: -64px -32px; +} +.ui-icon-arrow-1-sw { + background-position: -80px -32px; +} +.ui-icon-arrow-1-w { + background-position: -96px -32px; +} +.ui-icon-arrow-1-nw { + background-position: -112px -32px; +} +.ui-icon-arrow-2-n-s { + background-position: -128px -32px; +} +.ui-icon-arrow-2-ne-sw { + background-position: -144px -32px; +} +.ui-icon-arrow-2-e-w { + background-position: -160px -32px; +} +.ui-icon-arrow-2-se-nw { + background-position: -176px -32px; +} +.ui-icon-arrowstop-1-n { + background-position: -192px -32px; +} +.ui-icon-arrowstop-1-e { + background-position: -208px -32px; +} +.ui-icon-arrowstop-1-s { + background-position: -224px -32px; +} +.ui-icon-arrowstop-1-w { + background-position: -240px -32px; +} +.ui-icon-arrowthick-1-n { + background-position: 0 -48px; +} +.ui-icon-arrowthick-1-ne { + background-position: -16px -48px; +} +.ui-icon-arrowthick-1-e { + background-position: -32px -48px; +} +.ui-icon-arrowthick-1-se { + background-position: -48px -48px; +} +.ui-icon-arrowthick-1-s { + background-position: -64px -48px; +} +.ui-icon-arrowthick-1-sw { + background-position: -80px -48px; +} +.ui-icon-arrowthick-1-w { + background-position: -96px -48px; +} +.ui-icon-arrowthick-1-nw { + background-position: -112px -48px; +} +.ui-icon-arrowthick-2-n-s { + background-position: -128px -48px; +} +.ui-icon-arrowthick-2-ne-sw { + background-position: -144px -48px; +} +.ui-icon-arrowthick-2-e-w { + background-position: -160px -48px; +} +.ui-icon-arrowthick-2-se-nw { + background-position: -176px -48px; +} +.ui-icon-arrowthickstop-1-n { + background-position: -192px -48px; +} +.ui-icon-arrowthickstop-1-e { + background-position: -208px -48px; +} +.ui-icon-arrowthickstop-1-s { + background-position: -224px -48px; +} +.ui-icon-arrowthickstop-1-w { + background-position: -240px -48px; +} +.ui-icon-arrowreturnthick-1-w { + background-position: 0 -64px; +} +.ui-icon-arrowreturnthick-1-n { + background-position: -16px -64px; +} +.ui-icon-arrowreturnthick-1-e { + background-position: -32px -64px; +} +.ui-icon-arrowreturnthick-1-s { + background-position: -48px -64px; +} +.ui-icon-arrowreturn-1-w { + background-position: -64px -64px; +} +.ui-icon-arrowreturn-1-n { + background-position: -80px -64px; +} +.ui-icon-arrowreturn-1-e { + background-position: -96px -64px; +} +.ui-icon-arrowreturn-1-s { + background-position: -112px -64px; +} +.ui-icon-arrowrefresh-1-w { + background-position: -128px -64px; +} +.ui-icon-arrowrefresh-1-n { + background-position: -144px -64px; +} +.ui-icon-arrowrefresh-1-e { + background-position: -160px -64px; +} +.ui-icon-arrowrefresh-1-s { + background-position: -176px -64px; +} +.ui-icon-arrow-4 { + background-position: 0 -80px; +} +.ui-icon-arrow-4-diag { + background-position: -16px -80px; +} +.ui-icon-extlink { + background-position: -32px -80px; +} +.ui-icon-newwin { + background-position: -48px -80px; +} +.ui-icon-refresh { + background-position: -64px -80px; +} +.ui-icon-shuffle { + background-position: -80px -80px; +} +.ui-icon-transfer-e-w { + background-position: -96px -80px; +} +.ui-icon-transferthick-e-w { + background-position: -112px -80px; +} +.ui-icon-folder-collapsed { + background-position: 0 -96px; +} +.ui-icon-folder-open { + background-position: -16px -96px; +} +.ui-icon-document { + background-position: -32px -96px; +} +.ui-icon-document-b { + background-position: -48px -96px; +} +.ui-icon-note { + background-position: -64px -96px; +} +.ui-icon-mail-closed { + background-position: -80px -96px; +} +.ui-icon-mail-open { + background-position: -96px -96px; +} +.ui-icon-suitcase { + background-position: -112px -96px; +} +.ui-icon-comment { + background-position: -128px -96px; +} +.ui-icon-person { + background-position: -144px -96px; +} +.ui-icon-print { + background-position: -160px -96px; +} +.ui-icon-trash { + background-position: -176px -96px; +} +.ui-icon-locked { + background-position: -192px -96px; +} +.ui-icon-unlocked { + background-position: -208px -96px; +} +.ui-icon-bookmark { + background-position: -224px -96px; +} +.ui-icon-tag { + background-position: -240px -96px; +} +.ui-icon-home { + background-position: 0 -112px; +} +.ui-icon-flag { + background-position: -16px -112px; +} +.ui-icon-calendar { + background-position: -32px -112px; +} +.ui-icon-cart { + background-position: -48px -112px; +} +.ui-icon-pencil { + background-position: -64px -112px; +} +.ui-icon-clock { + background-position: -80px -112px; +} +.ui-icon-disk { + background-position: -96px -112px; +} +.ui-icon-calculator { + background-position: -112px -112px; +} +.ui-icon-zoomin { + background-position: -128px -112px; +} +.ui-icon-zoomout { + background-position: -144px -112px; +} +.ui-icon-search { + background-position: -160px -112px; +} +.ui-icon-wrench { + background-position: -176px -112px; +} +.ui-icon-gear { + background-position: -192px -112px; +} +.ui-icon-heart { + background-position: -208px -112px; +} +.ui-icon-star { + background-position: -224px -112px; +} +.ui-icon-link { + background-position: -240px -112px; +} +.ui-icon-cancel { + background-position: 0 -128px; +} +.ui-icon-plus { + background-position: -16px -128px; +} +.ui-icon-plusthick { + background-position: -32px -128px; +} +.ui-icon-minus { + background-position: -48px -128px; +} +.ui-icon-minusthick { + background-position: -64px -128px; +} +.ui-icon-close { + background-position: -80px -128px; +} +.ui-icon-closethick { + background-position: -96px -128px; +} +.ui-icon-key { + background-position: -112px -128px; +} +.ui-icon-lightbulb { + background-position: -128px -128px; +} +.ui-icon-scissors { + background-position: -144px -128px; +} +.ui-icon-clipboard { + background-position: -160px -128px; +} +.ui-icon-copy { + background-position: -176px -128px; +} +.ui-icon-contact { + background-position: -192px -128px; +} +.ui-icon-image { + background-position: -208px -128px; +} +.ui-icon-video { + background-position: -224px -128px; +} +.ui-icon-script { + background-position: -240px -128px; +} +.ui-icon-alert { + background-position: 0 -144px; +} +.ui-icon-info { + background-position: -16px -144px; +} +.ui-icon-notice { + background-position: -32px -144px; +} +.ui-icon-help { + background-position: -48px -144px; +} +.ui-icon-check { + background-position: -64px -144px; +} +.ui-icon-bullet { + background-position: -80px -144px; +} +.ui-icon-radio-on { + background-position: -96px -144px; +} +.ui-icon-radio-off { + background-position: -112px -144px; +} +.ui-icon-pin-w { + background-position: -128px -144px; +} +.ui-icon-pin-s { + background-position: -144px -144px; +} +.ui-icon-play { + background-position: 0 -160px; +} +.ui-icon-pause { + background-position: -16px -160px; +} +.ui-icon-seek-next { + background-position: -32px -160px; +} +.ui-icon-seek-prev { + background-position: -48px -160px; +} +.ui-icon-seek-end { + background-position: -64px -160px; +} +.ui-icon-seek-start { + background-position: -80px -160px; +} +.ui-icon-seek-first { + background-position: -80px -160px; +} +.ui-icon-stop { + background-position: -96px -160px; +} +.ui-icon-eject { + background-position: -112px -160px; +} +.ui-icon-volume-off { + background-position: -128px -160px; +} +.ui-icon-volume-on { + background-position: -144px -160px; +} +.ui-icon-power { + background-position: 0 -176px; +} +.ui-icon-signal-diag { + background-position: -16px -176px; +} +.ui-icon-signal { + background-position: -32px -176px; +} +.ui-icon-battery-0 { + background-position: -48px -176px; +} +.ui-icon-battery-1 { + background-position: -64px -176px; +} +.ui-icon-battery-2 { + background-position: -80px -176px; +} +.ui-icon-battery-3 { + background-position: -96px -176px; +} +.ui-icon-circle-plus { + background-position: 0 -192px; +} +.ui-icon-circle-minus { + background-position: -16px -192px; +} +.ui-icon-circle-close { + background-position: -32px -192px; +} +.ui-icon-circle-triangle-e { + background-position: -48px -192px; +} +.ui-icon-circle-triangle-s { + background-position: -64px -192px; +} +.ui-icon-circle-triangle-w { + background-position: -80px -192px; +} +.ui-icon-circle-triangle-n { + background-position: -96px -192px; +} +.ui-icon-circle-arrow-e { + background-position: -112px -192px; +} +.ui-icon-circle-arrow-s { + background-position: -128px -192px; +} +.ui-icon-circle-arrow-w { + background-position: -144px -192px; +} +.ui-icon-circle-arrow-n { + background-position: -160px -192px; +} +.ui-icon-circle-zoomin { + background-position: -176px -192px; +} +.ui-icon-circle-zoomout { + background-position: -192px -192px; +} +.ui-icon-circle-check { + background-position: -208px -192px; +} +.ui-icon-circlesmall-plus { + background-position: 0 -208px; +} +.ui-icon-circlesmall-minus { + background-position: -16px -208px; +} +.ui-icon-circlesmall-close { + background-position: -32px -208px; +} +.ui-icon-squaresmall-plus { + background-position: -48px -208px; +} +.ui-icon-squaresmall-minus { + background-position: -64px -208px; +} +.ui-icon-squaresmall-close { + background-position: -80px -208px; +} +.ui-icon-grip-dotted-vertical { + background-position: 0 -224px; +} +.ui-icon-grip-dotted-horizontal { + background-position: -16px -224px; +} +.ui-icon-grip-solid-vertical { + background-position: -32px -224px; +} +.ui-icon-grip-solid-horizontal { + background-position: -48px -224px; +} +.ui-icon-gripsmall-diagonal-se { + background-position: -64px -224px; +} +.ui-icon-grip-diagonal-se { + background-position: -80px -224px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + -moz-border-radius-topleft: 4px; + -webkit-border-top-left-radius: 4px; + -khtml-border-top-left-radius: 4px; + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + -khtml-border-top-right-radius: 4px; + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + -moz-border-radius-bottomleft: 4px; + -webkit-border-bottom-left-radius: 4px; + -khtml-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + -khtml-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.ui-widget-overlay { + background: #aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: 0.3; + filter: Alpha(Opacity=30); +} +.ui-widget-shadow { + margin: -8px 0 0 -8px; + padding: 8px; + background: #aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: 0.3; + filter: Alpha(Opacity=30); + -moz-border-radius: 8px; + -khtml-border-radius: 8px; + -webkit-border-radius: 8px; + border-radius: 8px; +} diff --git a/r2rgui/public/stylesheets/main.css b/r2rgui/public/stylesheets/main.css index 1aecc18..1ad0bd4 100644 --- a/r2rgui/public/stylesheets/main.css +++ b/r2rgui/public/stylesheets/main.css @@ -1,13 +1,11 @@ -#buttons -{ +#buttons { padding-top: 20px; border-top: solid 1px #d7d6d6; padding-bottom: 20px; border-bottom: solid 1px #d7d6d6; } -#tabs -{ +#tabs { width: 95%; height: 100%; margin-top: 20px; diff --git a/src/main/java/com/avengerpenguin/r2r/BasicFunctionManager.java b/src/main/java/com/avengerpenguin/r2r/BasicFunctionManager.java index 829ff9f..81d1c27 100644 --- a/src/main/java/com/avengerpenguin/r2r/BasicFunctionManager.java +++ b/src/main/java/com/avengerpenguin/r2r/BasicFunctionManager.java @@ -31,9 +31,9 @@ /** * An implementation of FunctionManager that has all built-in functions * registered. - * + * * @author andreas - * + * */ public class BasicFunctionManager implements FunctionManager { private static Log log = LogFactory.getLog(BasicFunctionManager.class); @@ -70,7 +70,7 @@ public BasicFunctionManager() { functions.put("strlen", new StringLengthFunctionFactory()); functions.put("md5sum", new Md5sumFunctionFactory()); functions.put("sha1sum", new Sha1sumFunctionFactory()); - + // Xpath functions XPathFunctionFactory xpFunctionFactory = new XPathFunctionFactory(); for(Function function : xpFunctionFactory.listFunctions()) { diff --git a/src/main/java/com/avengerpenguin/r2r/Config.java b/src/main/java/com/avengerpenguin/r2r/Config.java index e74f65c..b2c5276 100644 --- a/src/main/java/com/avengerpenguin/r2r/Config.java +++ b/src/main/java/com/avengerpenguin/r2r/Config.java @@ -27,28 +27,28 @@ */ public class Config { static private Properties properties = new Properties(); - + static { try { - ResourceBundle rb = ResourceBundle.getBundle("r2r"); + ResourceBundle rb = ResourceBundle.getBundle("r2r"); for(String key: rb.keySet()) properties.setProperty(key, rb.getString(key)); } catch(MissingResourceException e) { // TODO: log and fill with default values - + } } - + static public String getProperty(String key) { - return properties.getProperty(key); + return properties.getProperty(key); } - + static public String getProperty(String key, String defaultValue) { String value = getProperty(key); - return value!=null ? value : defaultValue; + return value!=null ? value : defaultValue; } - + static public boolean rethrowActivated() { return getProperty("r2r.ExceptionHandling.rethrow", "true").equalsIgnoreCase("true"); } -} \ No newline at end of file +} diff --git a/src/main/java/com/avengerpenguin/r2r/ConstantArgument.java b/src/main/java/com/avengerpenguin/r2r/ConstantArgument.java index d338641..b57ac49 100755 --- a/src/main/java/com/avengerpenguin/r2r/ConstantArgument.java +++ b/src/main/java/com/avengerpenguin/r2r/ConstantArgument.java @@ -20,7 +20,7 @@ public class ConstantArgument implements Argument { private final ConstantType type; private final String value; - + public ConstantArgument(ConstantType type, String value) { this.type = type; this.value = value; @@ -36,4 +36,3 @@ public String getValue() { } - diff --git a/src/main/java/com/avengerpenguin/r2r/EnumeratingURIGenerator.java b/src/main/java/com/avengerpenguin/r2r/EnumeratingURIGenerator.java index eee8211..033a332 100644 --- a/src/main/java/com/avengerpenguin/r2r/EnumeratingURIGenerator.java +++ b/src/main/java/com/avengerpenguin/r2r/EnumeratingURIGenerator.java @@ -22,7 +22,7 @@ public class EnumeratingURIGenerator implements StringGenerator { private BigInteger nr; private String baseuri; - + public BigInteger getNr() { return nr; } @@ -32,7 +32,7 @@ public String getBaseuri() { } /** - * + * * @param uri a String/URI which is used as the prefix * @param start the integer to start with. This will be increased by one every time nextURI() is called. */ @@ -40,7 +40,7 @@ public EnumeratingURIGenerator(String uri, BigInteger start) { this.baseuri = uri; this.nr = start; } - + /** * Generate URIs by using uri as prefix and appending numbers starting with 1 * @param uri a String/URI which is used as the prefix @@ -49,7 +49,7 @@ public EnumeratingURIGenerator(String uri) { this.baseuri = uri; this.nr = BigInteger.ONE; } - + /** * return the next generated URI */ @@ -59,7 +59,7 @@ public String nextString() { old = nr; nr = old.add(BigInteger.ONE); } - + return baseuri + old.toString(); } diff --git a/src/main/java/com/avengerpenguin/r2r/FileOrURISource.java b/src/main/java/com/avengerpenguin/r2r/FileOrURISource.java index f5e8176..3bd7aa0 100644 --- a/src/main/java/com/avengerpenguin/r2r/FileOrURISource.java +++ b/src/main/java/com/avengerpenguin/r2r/FileOrURISource.java @@ -40,9 +40,9 @@ public class FileOrURISource implements ExportableSource { private Model model; - + /** - * + * * @param fileOrURI A file name or a URI. */ public FileOrURISource(String fileOrURI) throws NotFoundException { @@ -70,7 +70,7 @@ public FileOrURISource(File file) throws IOException { model = fileManager.loadModel(file.getCanonicalPath()); } } - + public QueryExecution executeQuery(String query) { return QueryExecutionFactory.create(query, model); } diff --git a/src/main/java/com/avengerpenguin/r2r/Function.java b/src/main/java/com/avengerpenguin/r2r/Function.java index b5abf85..5812709 100755 --- a/src/main/java/com/avengerpenguin/r2r/Function.java +++ b/src/main/java/com/avengerpenguin/r2r/Function.java @@ -27,14 +27,14 @@ */ public interface Function extends Serializable { /** - * Executes the function on a list of arguments, each represented by a list of Strings. + * Executes the function on a list of arguments, each represented by a list of Strings. * @param arguments * @param datatypeHint * @return The result list. If the function only returns one value, this will be a one element list. * @throws IllegalArgumentException */ public List execute(List> arguments, String datatypeHint) throws IllegalArgumentException; - + /** * get the URI of the function * @return The URI of the function diff --git a/src/main/java/com/avengerpenguin/r2r/FunctionExecution.java b/src/main/java/com/avengerpenguin/r2r/FunctionExecution.java index a4dd02f..25955e0 100755 --- a/src/main/java/com/avengerpenguin/r2r/FunctionExecution.java +++ b/src/main/java/com/avengerpenguin/r2r/FunctionExecution.java @@ -37,7 +37,7 @@ public class FunctionExecution implements Argument, Serializable { private Function function; private String variableName = null; private Set variableDependencies = null; - + public String getVariableName() { return variableName; } @@ -54,7 +54,7 @@ public List getArguments() { public Function getFunction() { return function; } - + public static FunctionExecution parseTransformation(String transformation, FunctionManager functionManager, FunctionMapper functionMapper) throws RecognitionException{ CharStream stream = new ANTLRStringStream(transformation); TransformationLexer lexer = new TransformationLexer(stream); @@ -63,7 +63,7 @@ public static FunctionExecution parseTransformation(String transformation, Funct parser.setFunctionManager(functionManager); parser.setFunctionMapping(functionMapper); FunctionExecution fe = null; - + TransformationParser.transform_return tr = parser.transform(); fe = tr.funcExec; fe.variableName = tr.variable; diff --git a/src/main/java/com/avengerpenguin/r2r/FunctionFactoryLoader.java b/src/main/java/com/avengerpenguin/r2r/FunctionFactoryLoader.java index 49be8e3..9588485 100644 --- a/src/main/java/com/avengerpenguin/r2r/FunctionFactoryLoader.java +++ b/src/main/java/com/avengerpenguin/r2r/FunctionFactoryLoader.java @@ -35,11 +35,11 @@ public class FunctionFactoryLoader { private Source repository; private static Log log = LogFactory.getLog(FunctionFactoryLoader.class); - + public FunctionFactoryLoader(Source functionRepository) { repository = functionRepository; } - + /** * tries to instantiate an FunctionFactory object. * It tries to load the class referenced by the TransformationFunction URI from the class path first. @@ -70,19 +70,19 @@ public FunctionFactory getFunctionFactory(String URI) throws MalformedURLExcepti log.debug("External Function <" + URI +"> did not specify a qualified class name for loading!"); return null; } - try { + try { // First try to load from class path functionFactory = loadFunctionFactory(qualifiedClassName, ClassLoader.getSystemClassLoader()); // If FunctionFactory has been loaded, return it if(functionFactory!=null) return functionFactory; - + if(!loadFromURLs) { if(log.isDebugEnabled()) log.debug("External Function <" + URI +"> could not be loaded from class path and loading by URL is disabled!"); return null; } - + // Now try the original code location it = funcRes.listProperties(model.getProperty(R2R.codeLocation)); if(it.hasNext()) @@ -92,7 +92,7 @@ public FunctionFactory getFunctionFactory(String URI) throws MalformedURLExcepti log.debug("External Function <" + URI +"> could not be loaded from class path and did not specify any further code location!"); return null; } - + final String cl = codeLocation; URLClassLoader loader = AccessController.doPrivileged(new PrivilegedAction() { public URLClassLoader run() { diff --git a/src/main/java/com/avengerpenguin/r2r/FunctionManager.java b/src/main/java/com/avengerpenguin/r2r/FunctionManager.java index 8899f27..bf387ee 100755 --- a/src/main/java/com/avengerpenguin/r2r/FunctionManager.java +++ b/src/main/java/com/avengerpenguin/r2r/FunctionManager.java @@ -18,21 +18,21 @@ package com.avengerpenguin.r2r; /** - * An Interface for the function manager component. A FunctionManager handles the built-in and externally loaded functions. + * An Interface for the function manager component. A FunctionManager handles the built-in and externally loaded functions. * @author andreas * */ public interface FunctionManager { /** - * This method returns a function object of a external function by URI. + * This method returns a function object of a external function by URI. */ public Function getFunctionByUri(String URI); - + /** * Checks if a certain function identified by its URI has been registered. */ public boolean containsFunctionByUri(String URI); - + /** * Registers a function factory */ diff --git a/src/main/java/com/avengerpenguin/r2r/FunctionMapper.java b/src/main/java/com/avengerpenguin/r2r/FunctionMapper.java index 96c7038..94627b1 100644 --- a/src/main/java/com/avengerpenguin/r2r/FunctionMapper.java +++ b/src/main/java/com/avengerpenguin/r2r/FunctionMapper.java @@ -26,11 +26,11 @@ */ public class FunctionMapper implements Serializable{ Map mappings = new HashMap(); - + public void setMapping(String functionName, String functionURI) { mappings.put(functionName, functionURI); } - + public String getFunctionUri(String functionName) { if(mappings.get(functionName)==null) return functionName; diff --git a/src/main/java/com/avengerpenguin/r2r/JenaModelOutput.java b/src/main/java/com/avengerpenguin/r2r/JenaModelOutput.java index 40d8525..a386acb 100644 --- a/src/main/java/com/avengerpenguin/r2r/JenaModelOutput.java +++ b/src/main/java/com/avengerpenguin/r2r/JenaModelOutput.java @@ -29,11 +29,11 @@ */ public class JenaModelOutput implements Output { private final Model model; - + public JenaModelOutput(Model model) { - this.model = model; + this.model = model; } - + public void close() throws IOException { model.close(); } diff --git a/src/main/java/com/avengerpenguin/r2r/JenaModelSource.java b/src/main/java/com/avengerpenguin/r2r/JenaModelSource.java index 51fe711..71c8c06 100644 --- a/src/main/java/com/avengerpenguin/r2r/JenaModelSource.java +++ b/src/main/java/com/avengerpenguin/r2r/JenaModelSource.java @@ -34,13 +34,13 @@ public class JenaModelSource implements ExportableSource { private Model model; /** - * + * * @param model The Jena Model */ public JenaModelSource(Model model) { this.model = model; } - + public QueryExecution executeQuery(String query) { return QueryExecutionFactory.create(query, model); } diff --git a/src/main/java/com/avengerpenguin/r2r/LoadingFunctionManager.java b/src/main/java/com/avengerpenguin/r2r/LoadingFunctionManager.java index 0a87457..03f63ff 100644 --- a/src/main/java/com/avengerpenguin/r2r/LoadingFunctionManager.java +++ b/src/main/java/com/avengerpenguin/r2r/LoadingFunctionManager.java @@ -35,11 +35,11 @@ public class LoadingFunctionManager implements FunctionManager { private Map functions = new HashMap(); private FunctionFactoryLoader ffLoader; private static FunctionManager basicFunctions = new BasicFunctionManager(); - + public LoadingFunctionManager(Source functionInfoRepository) { ffLoader = new FunctionFactoryLoader(functionInfoRepository); } - + public synchronized boolean containsFunctionByUri(String URI) { return functions.containsKey(URI) || basicFunctions.containsFunctionByUri(URI); } @@ -47,7 +47,7 @@ public synchronized boolean containsFunctionByUri(String URI) { public Function getFunctionByUri(String URI) { if(basicFunctions.containsFunctionByUri(URI)) return basicFunctions.getFunctionByUri(URI); - + // Try to load function if not present in this manager if(!functions.containsKey(URI)) { if(ffLoader==null) @@ -61,7 +61,7 @@ public Function getFunctionByUri(String URI) { functions.put(URI, ff); } } - else + else return null;// Could not load Function } catch(MalformedURLException e) { if(log.isDebugEnabled()) diff --git a/src/main/java/com/avengerpenguin/r2r/Mapper.java b/src/main/java/com/avengerpenguin/r2r/Mapper.java index 00ecd86..2ea2f0b 100644 --- a/src/main/java/com/avengerpenguin/r2r/Mapper.java +++ b/src/main/java/com/avengerpenguin/r2r/Mapper.java @@ -43,7 +43,7 @@ public class Mapper { private static Log log = LogFactory.getLog(Mapper.class); /** - * + * * maps a source dataset into a target dataset on the basis of the MappingsInfo objects and the concrete mappings objects. * @param source The {@link Source Source} object of the mapping processimpor * @param output The {@link Output Output} target of the mapping process @@ -56,7 +56,7 @@ public static void transform(Source source, Output output, List ma List contextMappings = new ArrayList(); for(String contextMapping: mappingsInfo.classRestrictionMappings) { Mapping mapping = mappings.get(contextMapping); - if(mapping!=null) + if(mapping!=null) contextMappings.add(mapping); else if(log.isDebugEnabled()) @@ -78,7 +78,7 @@ public static void transform(Source source, Output output, List ma } } } - + /** * maps a source dataset into a target dataset on the basis of the MappingsInfo objects and a repository where the needed mappings are stored. * @param source The {@link Source Source} object of the mapping process @@ -88,7 +88,7 @@ public static void transform(Source source, Output output, List ma */ public static void transform(Source source, Output output, List mappingsToExecute, MappingRepository repository) { SimpleMappingCache mappingCache = new SimpleMappingCache(repository); - + for(MappingsInfo mappingsInfo: mappingsToExecute) { List contextMappings = null; if(mappingsInfo.classRestrictionMappings!=null) @@ -119,7 +119,7 @@ public static void transform(Source source, Output output, List ma } } } - + /** * transforms a source dataset into an output dataset. The vocabulary definition must be supplied in imporRDF format. * @param source The {@link Source Source} object of the mapping process @@ -135,7 +135,7 @@ public static void transform(Source source, Output output, MappingRepository rep for(TargetVocabulary vocab: vocabs) transform(source, output, repository, vocab.getClassRestriction(), vocab.getEntities(), vocab.addMappingOfClassRestriction()); } - + /** * transforms a source dataset into an output dataset. The vocabulary definition must be supplied as R2R vocabulary definition string. * @param source The {@link Source Source} object of the mapping process @@ -148,7 +148,7 @@ public static void transform(Source source, Output output, MappingRepository rep for(TargetVocabulary vocab: vocabs) transform(source, output, repository, vocab.getClassRestriction(), vocab.getEntities(), vocab.addMappingOfClassRestriction()); } - + /** * transforms a source dataset into an output dataset. Pure Java version. * @param source The {@link Source Source} object of the mapping process @@ -156,14 +156,14 @@ public static void transform(Source source, Output output, MappingRepository rep * @param repository The {@link com.avengerpenguin.r2r.Repository repository} containing the mappings. * @param classRestriction an entity URI to restrict the instance set. This is usually a class URI. * @param entities the target entities of the vocabulary definition. - * @param addClassRestrictionMappings set to "true" if the target dataset should contain the entity specified by the classRestriction argument + * @param addClassRestrictionMappings set to "true" if the target dataset should contain the entity specified by the classRestriction argument */ public static void transform(Source source, Output output, MappingRepository repository, String classRestriction, Collection entities, boolean addClassRestrictionMappings) { MetadataRepository metaDataRepository = repository.getMetaDataRepository(); List mappingsInfos = metaDataRepository.getMappingURIsForVocabularyDefinition(classRestriction, entities, addClassRestrictionMappings); transform(source, output, mappingsInfos, repository); } - + /** * transforms a source dataset into an output dataset. Pure Java version. Without class restriction. * @param source @@ -174,10 +174,10 @@ public static void transform(Source source, Output output, MappingRepository rep public static void transform(Source source, Output output, MappingRepository repository, Collection entities) { transform(source,output,repository,null,entities, false); } - + /** * applies mapping discovery to all sources of the SourceManager given the (discovery) vocabulary definition and - * executes the discovered Mapping Chains + * executes the discovered Mapping Chains * @param sourceManager manages Source meta data and holds enough information to instantiate various Source objects * @param output Output object * @param discoveryVocabDefinition vocabulary definition for the mapping discovery @@ -190,7 +190,7 @@ public static void transform(SourceManager sourceManager, Output output, Mapping DatasetChecker datasetCheck = new SourceDatasetChecker(source); MappingDiscovery mappingDiscovery = new MappingDiscovery(datasetCheck, repository); Collection mappingChains = mappingDiscovery.getMappingChains(discoveryVocabDefinition, sourceDesc.getSourceDataset(), maxDepth); - + for(MappingChain mc: mappingChains) mc.execute(source, output, repository); } diff --git a/src/main/java/com/avengerpenguin/r2r/Mapping.java b/src/main/java/com/avengerpenguin/r2r/Mapping.java index 70be3b4..534b97c 100755 --- a/src/main/java/com/avengerpenguin/r2r/Mapping.java +++ b/src/main/java/com/avengerpenguin/r2r/Mapping.java @@ -68,9 +68,9 @@ public SourcePattern getSourcePattern() { private String parentMapping; private boolean classMapping; private static Log log = LogFactory.getLog(Mapping.class); - + public final static String blankNodePrefix = "anon\\"; - + public boolean isClassMapping() { return classMapping; } @@ -78,7 +78,7 @@ public boolean isClassMapping() { public String getUri() { return uri; } - + private Mapping(String uri) { targetPatterns = new ArrayList(); variableDependenciesOfTargetPatterns = new HashSet(); @@ -92,9 +92,9 @@ private Mapping(String uri) { datatypeHints = new HashMap(); this.uri = uri; } - + /** - * + * * @param uri URI of the created mapping * @param parentUri URI of the parent mapping * @param prefixDefinitions a String containing prefix definitions needed for the source and target patterns @@ -117,14 +117,14 @@ public static Mapping createMapping(String uri, String parentUri, List p // Transformation must be processed before target patterns (generated variables must be known) for(String transformation: transformations) mapping.addTransformation(transformation, functionManager); - + for(String targetPattern: targetPatterns) mapping.addTargetPattern(targetPattern); - + mapping.addSourcePattern(sourcePattern); - + mapping.classMapping = isClassMapping; - + String error = hasCorrectVariableDependencies(mapping); if(error.length()>0) { if(log.isDebugEnabled()) @@ -160,7 +160,7 @@ public static Mapping createMapping(String uri, String parentUri, List p ; return mapping; } - + /** * creates a mapping, where the list of source patterns are connected conjunctively * @param uri URI of the mapping @@ -175,8 +175,8 @@ public static Mapping createMapping(String uri, String parentUri, List p public static Mapping createMapping(String uri, String parentUri, List prefixDefinitions, List targetPatterns, List transformations, List sourcePatterns, boolean isClassMapping, List functionImports, FunctionManager functionManager) { return createMapping(uri, parentUri, prefixDefinitions, targetPatterns, transformations, conjunctiveCombineSourcePatterns(sourcePatterns), isClassMapping, functionImports, functionManager); } - - + + private static String conjunctiveCombineSourcePatterns(List sourcePatterns) { StringBuilder sb = new StringBuilder(); for(String sourcePattern: sourcePatterns) { @@ -186,20 +186,20 @@ private static String conjunctiveCombineSourcePatterns(List sourcePatter } return sb.toString(); } - + private void addTransformation(String transformation, FunctionManager functionManager) throws RecognitionException { FunctionExecution funcExec = FunctionExecution.parseTransformation(transformation, functionManager, functionMapper); variableDependenciesOfTransformations.addAll(funcExec.getVariableDependencies()); transformationGeneratedVariables.add(funcExec.getVariableName()); functions.add(funcExec); } - + private void addFunctionMapping(String importString) { String[] mapping = importString.split("=", 2); if(mapping.length>1) functionMapper.setMapping(mapping[0].trim(), mapping[1].trim()); } - + private void addPrefixDefinitions(String prefixDefs) { Map prefixes = MiniParsers.parsePrefixDefinitions(prefixDefs); for(Map.Entry prefix: prefixes.entrySet()) { @@ -209,7 +209,7 @@ private void addPrefixDefinitions(String prefixDefs) { } } } - + private void addTargetPattern(String targetPattern) throws RecognitionException { TargetPattern tp = TargetPattern.parseTargetPattern(targetPattern, prefixMapper, transformationGeneratedVariables); tp.setMapping(this); @@ -217,11 +217,11 @@ private void addTargetPattern(String targetPattern) throws RecognitionException variableDependenciesOfTargetPatterns.addAll(tp.getVariableDependencies()); targetPatterns.add(tp); } - + private void addSourcePattern(String sourcePattern) throws RecognitionException { this.sourcePattern = SourcePattern.parseSourcePattern(sourcePattern, prefixMapper); } - + // Execute a function, resolve all arguments first public List execFunction(FunctionExecution functionExecution, VariableResults varResults, String datatypeHint) { List arguments = functionExecution.getArguments(); @@ -247,7 +247,7 @@ public List execFunction(FunctionExecution functionExecution, VariableRe } else if(argument instanceof VariableArgument) { String varName = ((VariableArgument) argument).getVariableName(); - //Make the argument List unmodifiable to protect against "defect" functions + //Make the argument List unmodifiable to protect against "defect" functions realArguments.add(Collections.unmodifiableList(varResults.getResults(varName))); } else if(argument instanceof FunctionExecution) { @@ -259,7 +259,7 @@ else if(argument instanceof FunctionExecution) { realArguments.add(execFunction((FunctionExecution)argument, varResults, datatypeHint)); } } - + returnList = function.execute(realArguments, datatypeHint); ////////////////// Debug code -> // if(returnList.size()>1) { @@ -286,7 +286,7 @@ else if(argument instanceof FunctionExecution) { } return returnList; } - + // Execute all functions to generate all values needed by the target patterns private void executeAllFunctions(VariableResults varResults) { for(FunctionExecution funcExec: functions) { @@ -315,17 +315,17 @@ private void executeAllFunctions(VariableResults varResults) { public long executeMapping(Source in, Output out) { return executeMappingInOtherMappingContext(in, out, null, null); } - + public long executeMapping(Source in, Output out, Collection propertyUris) { return executeMappingInOtherMappingContext(in, out, null, propertyUris); } - + public long executeMappingInOtherMappingContext(Source in, Output out, Collection mappingContext) { return executeMappingInOtherMappingContext(in, out, mappingContext, null); } - + /** - * Execute this mapping against a source. The mapping is further restricted by ALL mapping restrictions in conjunction. + * Execute this mapping against a source. The mapping is further restricted by ALL mapping restrictions in conjunction. * @param in Input Source object * @param out Output object * @param mappingRestrictions the mapped instances have to conform to these restrictions @@ -336,7 +336,7 @@ public long executeMappingInOtherMappingContext(Source in, Output out, Collectio int results = 0;//TODO: return number of triples Model outputModel = out.getOutputModel(); ResultSet resultSet = null; - + String query = null; if(mappingRestrictions==null) query = buildQuery(); @@ -345,7 +345,7 @@ public long executeMappingInOtherMappingContext(Source in, Output out, Collectio QueryExecution qe = in.executeQuery(query); resultSet = qe.execSelect(); - + while(resultSet.hasNext()) { QuerySolution solution = resultSet.next(); VariableResults varResults = new VariableResults(solution); @@ -372,10 +372,10 @@ public long executeMappingInOtherMappingContext(Source in, Output out, Collectio } out.write(outputModel); qe.close(); - + return results; } - + public Set computeQueryVariableDependencies() { Set varDependencies = new HashSet(); varDependencies.addAll(variableDependenciesOfTargetPatterns); @@ -383,7 +383,7 @@ public Set computeQueryVariableDependencies() { varDependencies.removeAll(transformationGeneratedVariables); return varDependencies; } - + private String buildQueryWithContext(Collection contextMappings) { StringBuilder sb = new StringBuilder(); //Prefixes and maxVarLength @@ -396,7 +396,7 @@ private String buildQueryWithContext(Collection contextMappings) { if(contextMapping.sourcePattern.getMaxVarLength()>maxvarLength) maxvarLength = contextMapping.sourcePattern.getMaxVarLength(); } - + sb.append(createPrefixPartOfQuery(contextMappings, prefixDependencies)); sb.append("SELECT "); @@ -424,14 +424,14 @@ private String buildQueryWithContext(Collection contextMappings) { sb.append(" }"); return sb.toString(); } - + private String getVarnameOfLength(int length) { StringBuilder sb = new StringBuilder(); while(length-->0) sb.append("v"); return sb.toString(); } - + // Returns empty String if everything is OK, else it returns an error message private static String hasCorrectVariableDependencies(Mapping mapping) { StringBuilder error = new StringBuilder(); @@ -440,10 +440,10 @@ private static String hasCorrectVariableDependencies(Mapping mapping) { Set transformationVariablesDep = mapping.variableDependenciesOfTransformations; Set transformationGeneratedVariables= mapping.transformationGeneratedVariables; Set sourcePatternVariables = mapping.sourcePattern.getVariablesInPattern(); - + variablesForTargetPattern.addAll(transformationGeneratedVariables); variablesForTargetPattern.addAll(sourcePatternVariables); - + // Transformations depend on source pattern variables for(String var: transformationVariablesDep) if(!sourcePatternVariables.contains(var)) { @@ -451,7 +451,7 @@ private static String hasCorrectVariableDependencies(Mapping mapping) { error.append(var); error.append(" of the source pattern. "); } - + // Target Pattern depend on source pattern AND transformation variables for(String var: targetPatternVariablesDep) if(!variablesForTargetPattern.contains(var)) { @@ -459,10 +459,10 @@ private static String hasCorrectVariableDependencies(Mapping mapping) { error.append(var); error.append(". "); } - + return error.toString(); } - + /* * Create Prefix definitions for the query */ @@ -479,12 +479,12 @@ private String createPrefixPartOfQuery(Collection contextMappings, Coll break;//Prefix found, break! } } - + if(ns==null) { if(contextMappings==null) throw new RuntimeException("No prefix definition for prefix " + prefix + " in mapping <" + uri + "> found!"); else { - StringBuilder errorString = new StringBuilder(); + StringBuilder errorString = new StringBuilder(); errorString.append("No prefix definition for prefix ").append(prefix).append(" in mapping <" + uri + ">"); for(Mapping contextMapping: contextMappings) errorString.append(" or <").append(contextMapping.uri).append(">"); @@ -496,18 +496,18 @@ private String createPrefixPartOfQuery(Collection contextMappings, Coll } return sb.toString(); } - + private String buildQuery() { return buildQueryWithContext(null); } - + /* * Get the namespace URI of a prefix */ private String expandPrefix(String prefix) { return expandPrefix(prefix, null); } - + private String expandPrefix(String prefix, PrefixMapper contextPrefixMapper) { String ns = prefixMapper.resolvePrefix(prefix); if(ns==null && contextPrefixMapper!=null)//TODO: Refactor: eliminate redundant execution @@ -522,7 +522,7 @@ private String expandPrefix(String prefix, PrefixMapper contextPrefixMapper) { } return ns; } - + private static int blankNodeGroups = 0; private int getBlankNodeGroup() { @@ -530,14 +530,14 @@ private int getBlankNodeGroup() { return blankNodeGroups++; } } - + private void executeTargetPatterns(VariableResults varResults, Model out) { int group = getBlankNodeGroup(); for(TargetPattern targetPattern: targetPatterns) { targetPattern.addTargetTriplesToModel(out, varResults, group, null); } } - + /* * Only execute Target Patterns that contain the given Property */ @@ -550,7 +550,7 @@ private void executeTargetPatterns(VariableResults varResults, Model out, Collec } } } - + public void insertMappingMetaDataIntoJenaModel(Model model) { Resource mapping = model.createResource(uri); //Meta data properties @@ -558,16 +558,16 @@ public void insertMappingMetaDataIntoJenaModel(Model model) { Property dependsOnProperty = model.createProperty(R2R.dependsOn); Property mapsToClass = model.createProperty(R2R.mapsTo); Property mapsToProperty = model.createProperty(R2R.mapsTo); - + //parent mapping dependency if(this.parentMapping!=null) { Property mappingRef = model.createProperty(R2R.mappingRef); Resource parentMap = model.createResource(this.parentMapping); mapping.addProperty(mappingRef, parentMap); } - + createMapsToMetaData(model, mapping, mapsToClass, mapsToProperty); - + createDependsOnMetaData(model, mapping, dependsOnClass, dependsOnProperty); } @@ -576,11 +576,11 @@ private void createMapsToMetaData(Model model, Resource mapping, Property mapsToClass, Property mapsToProperty) { for(TargetPattern tp: targetPatterns) { for(String cl: tp.getClasses()) { - Resource classResource = model.createResource(cl); + Resource classResource = model.createResource(cl); mapping.addProperty(mapsToClass, classResource); } for(String prop: tp.getProperties()) { - Resource propResource = model.createResource(prop); + Resource propResource = model.createResource(prop); mapping.addProperty(mapsToProperty, propResource); } } @@ -589,15 +589,15 @@ private void createMapsToMetaData(Model model, Resource mapping, private void createDependsOnMetaData(Model model, Resource mapping, Property dependsOnClass, Property dependsOnProperty) { for(String cl: sourcePattern.getClasses()) { - Resource classResource = model.createResource(cl); + Resource classResource = model.createResource(cl); mapping.addProperty(dependsOnClass, classResource); } for(String prop: sourcePattern.getProperties()) { - Resource propResource = model.createResource(prop); + Resource propResource = model.createResource(prop); mapping.addProperty(dependsOnProperty, propResource); } } - + public Model getJenaModelWithMappingMetaData() { Model model = ModelFactory.createDefaultModel(); insertMappingMetaDataIntoJenaModel(model); @@ -615,7 +615,7 @@ public List getFunctions() { public PrefixMapper getPrefixMapper() { return prefixMapper; } - + // public Model getJenaModelWithExtendedMappingMetaData() { // Model model = getJenaModelWithMappingMetaData(); // Resource mapping = model.createResource(uri); diff --git a/src/main/java/com/avengerpenguin/r2r/MappingRepository.java b/src/main/java/com/avengerpenguin/r2r/MappingRepository.java index 5cc51d8..f3b9120 100644 --- a/src/main/java/com/avengerpenguin/r2r/MappingRepository.java +++ b/src/main/java/com/avengerpenguin/r2r/MappingRepository.java @@ -26,13 +26,13 @@ public interface MappingRepository { * @return the mapping object */ public Mapping getMappingOfUri(String mappingURI); - + /** * creates a Map of URI -> Mapping object pairs * @return URI -> Mapping Map */ public Map getMappings(); - + /** * Create a Meta Data Repository from the mappings of this repository * @return a Meta Data Repository diff --git a/src/main/java/com/avengerpenguin/r2r/MappingsInfo.java b/src/main/java/com/avengerpenguin/r2r/MappingsInfo.java index 55bb111..685c1dc 100644 --- a/src/main/java/com/avengerpenguin/r2r/MappingsInfo.java +++ b/src/main/java/com/avengerpenguin/r2r/MappingsInfo.java @@ -26,22 +26,22 @@ public class MappingsInfo { public final Collection classRestrictionMappings; public final Collection allMappings; - public final Map> restrictions; - + public final Map> restrictions; + public MappingsInfo(Collection contextMappings, Collection allMappings) { super(); this.classRestrictionMappings = contextMappings; this.allMappings = allMappings; - restrictions = null; + restrictions = null; } - + public MappingsInfo(Collection contextMappings, Collection allMappings, Map> restrictions) { super(); this.classRestrictionMappings = contextMappings; this.allMappings = allMappings; this.restrictions = restrictions; } - + /* * checks if a mapping is restricted to execute target patterns with a certain property */ @@ -50,7 +50,7 @@ public boolean isRestricted(String mappingUri) { return false; return restrictions.get(mappingUri)!=null; } - + /* * returns the restriction (URI String) of the specified mapping or null if not restricted */ diff --git a/src/main/java/com/avengerpenguin/r2r/MetadataRepository.java b/src/main/java/com/avengerpenguin/r2r/MetadataRepository.java index 8cfd75c..db50527 100644 --- a/src/main/java/com/avengerpenguin/r2r/MetadataRepository.java +++ b/src/main/java/com/avengerpenguin/r2r/MetadataRepository.java @@ -30,7 +30,7 @@ public interface MetadataRepository { * @return */ public List getMappingURIsForVocabularyDefinition(List entityUris); - + /** * Get all the mapping URIs from the meta data repository that generate one or more of the given entities. * All the mappings are being restricted by the first argument. @@ -40,13 +40,13 @@ public interface MetadataRepository { * @return MappingsInfo objects that contain information about which mappings and how they should be executed. */ public List getMappingURIsForVocabularyDefinition(String contextEntityUri, Collection propertyUris, boolean addClassRestrictionMappings); - + /** * Gets the mapping URIs for all mappings that map to the specified target element (mapping r2r:mapsTo targetElement) - * @param elementURI + * @param elementURI * @return */ public Set getMappingsOfTargetElement(String elementURI); - + public Map> getMappingMetaData(String mappingURI) ; } diff --git a/src/main/java/com/avengerpenguin/r2r/MultiFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/MultiFunctionFactory.java index 1871cc9..7a61b32 100644 --- a/src/main/java/com/avengerpenguin/r2r/MultiFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/MultiFunctionFactory.java @@ -24,9 +24,9 @@ /** * A factory which is able to create multiple functions. - * + * * @author maggi - * + * */ public abstract class MultiFunctionFactory implements FunctionFactory { @@ -42,7 +42,7 @@ public MultiFunctionFactory() { /** * Returns a function instance by name. - * + * * @param name * @return the function of null if there is no function for * this name. diff --git a/src/main/java/com/avengerpenguin/r2r/NGSourceManager.java b/src/main/java/com/avengerpenguin/r2r/NGSourceManager.java index 2eaeebe..11c63e6 100644 --- a/src/main/java/com/avengerpenguin/r2r/NGSourceManager.java +++ b/src/main/java/com/avengerpenguin/r2r/NGSourceManager.java @@ -28,12 +28,12 @@ public class NGSourceManager implements SourceManager { private Source sourceRepository; private String voidGraph = "http://www4.wiwiss.fu-berlin.de/bizer/r2r/voidGraph"; private String sparqlEndpoint; - + public NGSourceManager(String sparqlEndpoint) { sourceRepository = new SparqlEndpointSource(sparqlEndpoint); this.sparqlEndpoint = sparqlEndpoint; } - + public NGSourceManager(String sparqlEndpoint, String voidGraph) { this(sparqlEndpoint); this.voidGraph = voidGraph; @@ -50,7 +50,7 @@ public List getSourceDescriptions() { qe.close(); } } - + private List parseSourceDescriptions(ResultSet rs) { List sourceDescriptions = new ArrayList(); while(rs.hasNext()) { diff --git a/src/main/java/com/avengerpenguin/r2r/NTriplesOutput.java b/src/main/java/com/avengerpenguin/r2r/NTriplesOutput.java index d3841ec..6de1424 100644 --- a/src/main/java/com/avengerpenguin/r2r/NTriplesOutput.java +++ b/src/main/java/com/avengerpenguin/r2r/NTriplesOutput.java @@ -34,25 +34,25 @@ public class NTriplesOutput implements Output { private final OutputStream outputStream; private final Writer writer; - + public NTriplesOutput(String filename) throws IOException { super(); writer = new BufferedWriter(new FileWriter(filename)); outputStream = null; } - + public NTriplesOutput(OutputStream output) { super(); writer = null; outputStream = output; } - + public NTriplesOutput(Writer writer) { super(); this.writer = writer; outputStream = null; } - + public void close() throws IOException { if(writer!=null) { writer.flush(); diff --git a/src/main/java/com/avengerpenguin/r2r/Output.java b/src/main/java/com/avengerpenguin/r2r/Output.java index 65f8ab4..b9ce55a 100644 --- a/src/main/java/com/avengerpenguin/r2r/Output.java +++ b/src/main/java/com/avengerpenguin/r2r/Output.java @@ -32,15 +32,15 @@ public interface Output { * @param output the Jena Model object containing the mapped data. This was initially obtained by calling getOutputModel(). */ public void write(Model output); - + /** * Get a Jena Model from the output object to write to - * @return A Jena Model that will be used as target in the mapping process. After the mapping process this should be passed to the write method. + * @return A Jena Model that will be used as target in the mapping process. After the mapping process this should be passed to the write method. */ public Model getOutputModel(); - + /** - * shuts down the output object and does all the work needed after all the mapped data has been added + * shuts down the output object and does all the work needed after all the mapped data has been added */ public void close() throws IOException; } diff --git a/src/main/java/com/avengerpenguin/r2r/PrefixList.java b/src/main/java/com/avengerpenguin/r2r/PrefixList.java index acc4d8b..d1706a1 100644 --- a/src/main/java/com/avengerpenguin/r2r/PrefixList.java +++ b/src/main/java/com/avengerpenguin/r2r/PrefixList.java @@ -24,15 +24,15 @@ import java.util.Collection; /** - * Stores (namespace) prefixes in a way that prefixes that are prefixed by other prefixes in the List are removed. + * Stores (namespace) prefixes in a way that prefixes that are prefixed by other prefixes in the List are removed. * @author ced * */ public class PrefixList { private List prefixes; - + private PrefixList() {} - + public static PrefixList createPrefixList(Collection inputPrefixes) { List p = new ArrayList(); if(inputPrefixes instanceof ArrayList) @@ -64,7 +64,7 @@ public static PrefixList createPrefixList(Collection inputPrefixes) { pl.prefixes = p; return pl; } - + public String prefixedBy(String uri) { int index = Collections.binarySearch(prefixes, uri); if(index < 0) { @@ -80,11 +80,11 @@ public String prefixedBy(String uri) { else return prefixes.get(index); } - + public int size() { return prefixes.size(); } - + public static void main(String args[]) { ArrayList blah = new ArrayList(); blah.add("http://dbpedia.org/ontology/"); diff --git a/src/main/java/com/avengerpenguin/r2r/PrefixMapper.java b/src/main/java/com/avengerpenguin/r2r/PrefixMapper.java index b11ac3d..d45f9bb 100644 --- a/src/main/java/com/avengerpenguin/r2r/PrefixMapper.java +++ b/src/main/java/com/avengerpenguin/r2r/PrefixMapper.java @@ -23,19 +23,19 @@ public class PrefixMapper implements Serializable { private Map map; - + public PrefixMapper() { map = new HashMap(); } - + public synchronized void addPrefixes(PrefixMapper otherPrefixMapper) { map.putAll(otherPrefixMapper.map); } - + public synchronized void registerPrefix(String prefix, String namespace) { map.put(prefix, namespace); } - + public synchronized String resolvePrefix(String prefix) { return map.get(prefix); } diff --git a/src/main/java/com/avengerpenguin/r2r/R2R.java b/src/main/java/com/avengerpenguin/r2r/R2R.java index fcbadd1..ecc251a 100644 --- a/src/main/java/com/avengerpenguin/r2r/R2R.java +++ b/src/main/java/com/avengerpenguin/r2r/R2R.java @@ -25,14 +25,14 @@ public class R2R { //r2r namespace public final static String R2R = "http://www4.wiwiss.fu-berlin.de/bizer/r2r/"; - + //r2r class URIs public final static String ClassMapping = R2R + "ClassMapping"; public final static String PropertyMapping = R2R + "PropertyMapping"; public final static String Mapping = R2R + "Mapping"; public final static String ExternalFunction = R2R + "ExternalFunction"; public final static String MappingCollection = R2R + "MappingCollection"; - + public final static String partOfMappingCollection = R2R + "partOfMappingCollection"; public final static String sourcePattern = R2R + "sourcePattern"; public final static String targetPattern = R2R + "targetPattern"; @@ -44,7 +44,7 @@ public class R2R { public final static String dependsOn = R2R + "dependsOn"; public final static String classRestriction = R2R + "classRestriction"; public final static String classRestrictionAndTarget = R2R + "classRestrictionAndTargetEntity"; - + // Other Meta Data public final static String equivalenceMapping = R2R + "equivalenceMapping"; public final static String byVocabularyPublisher = R2R + "byVocabularyPublisher"; @@ -57,7 +57,7 @@ public class R2R { public final static String codeLocation = R2R + "codeLocation"; public final static String qualifiedClassName = R2R + "qualifiedClassName"; public final static String importFunction = R2R + "importFunction"; - - - + + + } diff --git a/src/main/java/com/avengerpenguin/r2r/R2RException.java b/src/main/java/com/avengerpenguin/r2r/R2RException.java index 3e647fe..e742c9e 100644 --- a/src/main/java/com/avengerpenguin/r2r/R2RException.java +++ b/src/main/java/com/avengerpenguin/r2r/R2RException.java @@ -36,7 +36,7 @@ public R2RException(Throwable cause) { } /** - * + * */ private static final long serialVersionUID = 1L; diff --git a/src/main/java/com/avengerpenguin/r2r/RDFXMLOutput.java b/src/main/java/com/avengerpenguin/r2r/RDFXMLOutput.java index ae28e4d..ebf9f3a 100644 --- a/src/main/java/com/avengerpenguin/r2r/RDFXMLOutput.java +++ b/src/main/java/com/avengerpenguin/r2r/RDFXMLOutput.java @@ -27,7 +27,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory; /** - * This implementation of the Output interface serializes the target dataset in RDF/XML format. The target dataset is build in-memory and is not written until the close() method is called. + * This implementation of the Output interface serializes the target dataset in RDF/XML format. The target dataset is build in-memory and is not written until the close() method is called. * @author andreas * */ @@ -35,28 +35,28 @@ public class RDFXMLOutput implements Output { private final OutputStream outputStream; private final Writer writer; private final Model outputModel; - + public RDFXMLOutput(String file) throws IOException { super(); writer = new BufferedWriter(new FileWriter(file)); outputStream = null; outputModel = ModelFactory.createDefaultModel(); } - + public RDFXMLOutput(OutputStream output) { super(); writer = null; outputStream = output; outputModel = ModelFactory.createDefaultModel(); } - + public RDFXMLOutput(Writer writer) { super(); this.writer = writer; outputStream = null; outputModel = ModelFactory.createDefaultModel(); } - + /** * writes the in-memory model and closes the output stream or writer. */ diff --git a/src/main/java/com/avengerpenguin/r2r/Repository.java b/src/main/java/com/avengerpenguin/r2r/Repository.java index 435b6cd..5756e00 100644 --- a/src/main/java/com/avengerpenguin/r2r/Repository.java +++ b/src/main/java/com/avengerpenguin/r2r/Repository.java @@ -48,7 +48,7 @@ /** * Repository that offers access to R2R mappings and functions to import non-R2R mappings. - * It implements both Mapping Repository and Metadata Repository capabilities + * It implements both Mapping Repository and Metadata Repository capabilities * @author andreas * */ @@ -56,7 +56,7 @@ public class Repository implements MappingRepository, MetadataRepository, Source private Source source; private FunctionManager functionManager; private static Log log = LogFactory.getLog(Repository.class); - + // load FunctionManager as defined in r2r.properties private FunctionManager loadFunctionManager(Source source) { String fm = Config.getProperty("r2r.FunctionManager", "com.avengerpenguin.r2r.BasicFunctionManager"); @@ -75,7 +75,7 @@ private FunctionManager loadFunctionManager(Source source) { constructorWithSource = true; } } - + if(constructorWithSource) return (FunctionManager)c.newInstance(source); else @@ -96,10 +96,10 @@ private FunctionManager loadFunctionManager(Source source) { log.debug(error); if(Config.rethrowActivated()) throw new R2RException(error, exception); - + return null; } - + /** * Create a Repository from a Source object * @param source A Source object @@ -108,10 +108,10 @@ public Repository(Source source) { this.source = source; functionManager = loadFunctionManager(source); }; - + //Factory methods: - + /** * create a repository based on a Jena model * @param model a Jena Model @@ -120,7 +120,7 @@ public Repository(Source source) { public static Repository createJenaModelRepository(Model model) { return new Repository(new JenaModelSource(model)); } - + /** * Create a repository created from a file or URI * @param fileOrUri a path to a file in the file system or a URI @@ -129,7 +129,7 @@ public static Repository createJenaModelRepository(Model model) { public static Repository createFileOrUriRepository(String fileOrUri) throws NotFoundException { return new Repository(new FileOrURISource(fileOrUri)); } - + /** * Create a repository that can be queried over a SPARQL endpoint * @param endpointURI The SPARQL endpoint URL String @@ -138,7 +138,7 @@ public static Repository createFileOrUriRepository(String fileOrUri) throws NotF public static Repository createSparqlEndpointRepository(String endpointURI) { return new Repository(new SparqlEndpointSource(endpointURI)); } - + /** * Create a repository that can be queried over a SPARQL endpoint * @param endpointURI The SPARQL endpoint URL String @@ -148,7 +148,7 @@ public static Repository createSparqlEndpointRepository(String endpointURI) { public static Repository createSparqlEndpointRepository(String endpointURI, String defaultGraph) { return new Repository(new SparqlEndpointSource(endpointURI, defaultGraph)); } - + /** * Create a repository that can be queried over a SPARQL endpoint * @param endpointURI The SPARQL endpoint URL String @@ -159,14 +159,14 @@ public static Repository createSparqlEndpointRepository(String endpointURI, Stri public static Repository createSparqlEndpointRepository(String endpointURI, String defaultGraph, List namedGraphURIs) { return new Repository(new SparqlEndpointSource(endpointURI, defaultGraph, namedGraphURIs)); } - + /** * fetch _all_ mappings from the repository * @return Java Map: mapping URI String -> Mapping object */ public Map getMappings() { Map mappings = new HashMap(); - List resources = getMappingResources(); + List resources = getMappingResources(); for(String resURI: resources) { Mapping mapping = getMappingOfUri(resURI); @@ -191,14 +191,14 @@ public Map validateMappings() { } return erroneousMappings; } - + /** - * create a Repository object that includes the meta data of this Repository + * create a Repository object that includes the meta data of this Repository * @return Mapping meta-data Repository */ public MetadataRepository getMetaDataRepository() { - Model resModel = ModelFactory.createDefaultModel(); - List resources = getMappingResources(); + Model resModel = ModelFactory.createDefaultModel(); + List resources = getMappingResources(); for(String resURI: resources) { Mapping mapping = getMappingOfUri(resURI); @@ -213,10 +213,10 @@ private List listMappingResourcesFromResultSet(ResultSet resultSet) { List resources = new ArrayList(); while(resultSet.hasNext()) resources.add(resultSet.next().get("s").toString()); - + return resources; } - + private List getMappingResources() { String query = "select distinct ?s where { ?s <" + R2R.targetPattern + "> ?o }"; QueryExecution qe = source.executeQuery(query); @@ -227,7 +227,7 @@ private List getMappingResources() { qe.close(); } } - + private List getPropertyValues(ResultSet resultSet) { List values = new ArrayList(); @@ -240,22 +240,22 @@ private List getPropertyValues(ResultSet resultSet) { } return values; } - + private String getPropertyValuesQuery(String property, String resourceURI) { return "select distinct ?o where { <" + resourceURI + "> <" + property + "> ?o }"; } - + /** * fetches a Mapping out of the Repository * @param mappingURI the mapping URI String - * @return a Mapping object corresponding to the supplied mapping URI or null + * @return a Mapping object corresponding to the supplied mapping URI or null */ public Mapping getMappingOfUri(String mappingURI) { List mappingTypes = getPropertyValuesForResource(mappingURI, RDF.type.getURI()); if(mappingTypes.size()==0) throw new RuntimeException("Unknown mapping type of resource <" + mappingURI + ">"); boolean isClassMapping = isClassMappingType(mappingTypes); - + List sp = getPropertyValuesForResource(mappingURI, R2R.sourcePattern); if(sp.size()!=1) { if(log.isDebugEnabled()) @@ -267,23 +267,23 @@ public Mapping getMappingOfUri(String mappingURI) { List transformations = getPropertyValuesForResource(mappingURI, R2R.transformation); List prefixDefinitions = getPropertyValuesForResource(mappingURI, R2R.prefixDefinitions); List functionImports = getPropertyValuesForResource(mappingURI, R2R.importFunction); - + String classRef = getReferencedClassMappingUri(mappingURI); - + if(classRef==null) { addPrefixesOfMappingCollection(mappingURI, prefixDefinitions); return Mapping.createMapping(mappingURI, null, prefixDefinitions, targetPatterns, transformations, sourcePattern, isClassMapping, functionImports, functionManager); } - + String parentMapping = classRef; List sourcePatterns = new ArrayList(); sourcePatterns.add(sourcePattern); boolean successful = mergeWithReferencedMappings(mappingURI, prefixDefinitions, classRef, sourcePatterns); if(!successful) return null; - + addPrefixesOfMappingCollection(mappingURI, prefixDefinitions); - + return Mapping.createMapping(mappingURI, parentMapping, prefixDefinitions, targetPatterns, transformations, sourcePatterns, isClassMapping, functionImports, functionManager); } @@ -314,7 +314,7 @@ private boolean mergeWithReferencedMappings(String mappingURI, List pref } else mappingPath.add(classRef); - + MappingData mapData = getMappingDataOfUri(classRef); if(mapData==null) return false; @@ -324,7 +324,7 @@ private boolean mergeWithReferencedMappings(String mappingURI, List pref } return true; } - + private MappingData getMappingDataOfUri(String mappingURI) { List sp = getPropertyValuesForResource(mappingURI, R2R.sourcePattern); if(sp.size()!=1) { @@ -338,7 +338,7 @@ private MappingData getMappingDataOfUri(String mappingURI) { return new MappingData(sourcePattern, prefixDefinitions); } - + private List getPropertyValuesForResource(String resourceURI, String property) { QueryExecution qe = source.executeQuery(getPropertyValuesQuery(property, resourceURI)); try { @@ -348,7 +348,7 @@ private List getPropertyValuesForResource(String resourceURI, String pro qe.close(); } } - + //Check if the type of the resource is a class mapping private boolean isClassMappingType(List types) { for(String type: types) { @@ -357,7 +357,7 @@ private boolean isClassMappingType(List types) { } return false; } - + private String getReferencedClassMappingUri(String mappingUri) { QueryExecution qe = source.executeQuery(getReferencedClassMappingUriQuery(mappingUri)); ResultSet resultSet = qe.execSelect(); @@ -370,22 +370,22 @@ private String getReferencedClassMappingUri(String mappingUri) { qe.close(); } } - + private String getReferencedClassMappingUriQuery(String mappingUri) { - return "Select ?classref where { <" + mappingUri + "> <" + R2R.mappingRef + "> ?classref }"; + return "Select ?classref where { <" + mappingUri + "> <" + R2R.mappingRef + "> ?classref }"; } - + private static class MappingData { String sourcePattern; List prefixDefinitions; - + public MappingData(String sourcePattern, List prefixDefinitions) { super(); this.sourcePattern = sourcePattern; this.prefixDefinitions = prefixDefinitions; } } - + /* * Get all the mapping URIs from the meta data repository that generate one or more of the given entities */ @@ -404,19 +404,19 @@ public List getMappingURIsForVocabularyDefinition(List ent */ public List getMappingURIsForVocabularyDefinition(String classRestrictionTermUri, Collection propertiesUris, boolean addClassRestrictionMappings) { List mappingInfos = new ArrayList(); - + Set classRestrictions = null; - if(classRestrictionTermUri!=null) + if(classRestrictionTermUri!=null) classRestrictions = getMappingsOfTargetElement(classRestrictionTermUri); else { classRestrictions = new HashSet(); classRestrictions.add(""); } - + Map> mappingsPerClassMapping = new HashMap>(); Map>> restrictionsPerClassMapping = new HashMap>>(); - - // This will only be executed if the class restriction mappings should be added + + // This will only be executed if the class restriction mappings should be added if(classRestrictionTermUri!=null) { for(String c: classRestrictions) { if(addClassRestrictionMappings) { @@ -425,11 +425,11 @@ public List getMappingURIsForVocabularyDefinition(String classRest } } } - + //Add Property/Other Mappings for(String propertyUri: propertiesUris) { Collection potentialPropertyMappings = getMappingsOfTargetElement(propertyUri); - + for(String potMapping: potentialPropertyMappings) { if(classRestrictionTermUri!=null) for(String c: classRestrictions) { @@ -442,7 +442,7 @@ public List getMappingURIsForVocabularyDefinition(String classRest } } } - + // Create Mappings Info objects for(String c: classRestrictions) { Set m = mappingsPerClassMapping.get(c); @@ -450,19 +450,19 @@ public List getMappingURIsForVocabularyDefinition(String classRest continue; Map> r = restrictionsPerClassMapping.get(c); - + Collection context = null; if(classRestrictionTermUri!=null) { context = new ArrayList(); context.add(c); } mappingInfos.add(new MappingsInfo(context, m, r)); - + } - + return mappingInfos; } - + private void addMappingsToClassMappingContext(String mapping, String classMapping, Map> mappingsPerClassMapping) { assert(mappingsPerClassMapping.containsKey(classMapping)); Set mappings = mappingsPerClassMapping.get(classMapping); @@ -472,7 +472,7 @@ private void addMappingsToClassMappingContext(String mapping, String classMappin mappings.add(mapping); mappingsPerClassMapping.put(classMapping, mappings); } - + private void addRestrictionToClassMappingContext(String propMapping, String property, String classMapping, Map>> restrictionsOfClassContexts) { assert(restrictionsOfClassContexts.containsKey(classMapping)); Map> restrictions = restrictionsOfClassContexts.get(classMapping); @@ -488,7 +488,7 @@ private void addRestrictionToClassMappingContext(String propMapping, String prop properties.add(property); } - + private void addRestrictionToMap(String mappingUri, String propertyUri, Map> resMap) { Collection restrictions = resMap.get(mappingUri); if(restrictions==null) { @@ -497,7 +497,7 @@ private void addRestrictionToMap(String mappingUri, String propertyUri, Map getMappingsOfTargetElement(String uri) { return mappings; } - + /* @@ -521,7 +521,7 @@ public Set getMappingsOfTargetElement(String uri) { */ // private boolean checkForMappingContainment(String propertyMapping, Set classMappings) { // String currentMapping = propertyMapping; -// +// // while(currentMapping!=null) { // String query = "Select ?mapping where { <" + currentMapping + "> <" + R2R.classMappingRef + "> ?mapping }"; // QueryExecution qe = source.executeQuery(query); @@ -541,9 +541,9 @@ public Set getMappingsOfTargetElement(String uri) { // } // return false; // } - - + + public QueryExecution executeQuery(String query) { return source.executeQuery(query); @@ -552,7 +552,7 @@ public QueryExecution executeQuery(String query) { public Model executeDescribeQuery(String query) { return source.executeDescribeQuery(query); } - + /** * reads in all mapping data found in a Source object. Also converts simple OWL and RDFS mappings into R2R format * @param source Source object containing mapping information @@ -563,12 +563,12 @@ public static Model importMappingDataFromSource(Source source, StringGenerator u importMappingDataFromSourceIntoModel(source, outputModel, uriGenerator); return outputModel; } - + public static Model importMappingDataFromFile(String filename, StringGenerator uriGenerator) { Source source = new FileOrURISource(filename); return importMappingDataFromSource(source, uriGenerator); } - + /** * write mapping data from Source object into the given Jena Model * @param source Source object @@ -579,16 +579,16 @@ public static void importMappingDataFromSourceIntoModel(Source source, Model out importRDFSMappingData(source, outputModel, uriGenerator); importOWLMappingData(source, outputModel, uriGenerator); } - + private static void copyR2RmappingData(Source source, Model outputModel) { - String query = "CONSTRUCT { ?s ?p ?o }" + + String query = "CONSTRUCT { ?s ?p ?o }" + "WHERE {" + "?s <" + R2R.sourcePattern + "> ?st ." + "?s ?p ?o ." + "}"; outputModel.add(source.executeConstructQuery(query)); } - + /** * imports rdfs:subClassOf and rdfs:subPropertyOf mappings from the Source * @param source the Source of the RDFS mappings @@ -599,7 +599,7 @@ public static void importRDFSMappingData(Source source, Model outputModel, Strin importAndConvertSubClassOfMappings(source, outputModel, uriGenerator); importAndConvertSubPropertyOfMappings(source, outputModel, uriGenerator); } - + /** * imports owl:equivalentClass and owl:equivalentProperty mappings from the Source * @param source the Source of the OWL mappings @@ -610,7 +610,7 @@ public static void importOWLMappingData(Source source, Model outputModel, String importAndConvertEquivalentClassMappings(source, outputModel, uriGenerator); importAndConvertEquivalentPropertyMappings(source, outputModel, uriGenerator); } - + private static void importAndConvertEquivalentPropertyMappings(Source source, Model outputModel, StringGenerator uriGenerator) { String query = "Select ?e1 ?e2 WHERE {" + "?e1 <" + OWL.equivalentProperty.getURI() + "> ?e2" + @@ -632,7 +632,7 @@ private static void importAndConvertEquivalentPropertyMappings(Source source, Mo } qe.close(); } - + private static void importAndConvertEquivalentClassMappings(Source source, Model outputModel, StringGenerator uriGenerator) { String query = "Select ?e1 ?e2 WHERE {" + "?e1 <" + OWL.equivalentClass.getURI() + "> ?e2" + @@ -654,7 +654,7 @@ private static void importAndConvertEquivalentClassMappings(Source source, Model } qe.close(); } - + private static void importAndConvertSubClassOfMappings(Source source, Model outputModel, StringGenerator uriGenerator) { String query = "Select ?from ?to WHERE {" + "?from <" + RDFS.subClassOf.getURI() + "> ?to" + @@ -674,7 +674,7 @@ private static void importAndConvertSubClassOfMappings(Source source, Model outp } qe.close(); } - + private static void importAndConvertSubPropertyOfMappings(Source source, Model outputModel, StringGenerator uriGenerator) { String query = "Select ?from ?to WHERE {" + "?from <" + RDFS.subPropertyOf.getURI() + "> ?to" + @@ -694,7 +694,7 @@ private static void importAndConvertSubPropertyOfMappings(Source source, Model o } qe.close(); } - + private static void addR2RMapping(String uri, String sourcePattern, String targetPattern, String mappingClass, Model outputModel, boolean equivalenceMapping) { Resource res = outputModel.getResource(uri); res.addProperty(RDF.type, outputModel.createResource(mappingClass)); diff --git a/src/main/java/com/avengerpenguin/r2r/SimpleMappingCache.java b/src/main/java/com/avengerpenguin/r2r/SimpleMappingCache.java index 106c086..43aae0e 100755 --- a/src/main/java/com/avengerpenguin/r2r/SimpleMappingCache.java +++ b/src/main/java/com/avengerpenguin/r2r/SimpleMappingCache.java @@ -23,16 +23,16 @@ public class SimpleMappingCache { private MappingRepository repository; private Map cache; - + public SimpleMappingCache(MappingRepository repository) { this.repository = repository; cache = new HashMap(); } - + public Mapping getMapping(String mappingURI) { if(cache.containsKey(mappingURI)) return cache.get(mappingURI); - + Mapping mapping = repository.getMappingOfUri(mappingURI); cache.put(mappingURI, mapping); return mapping; diff --git a/src/main/java/com/avengerpenguin/r2r/Source.java b/src/main/java/com/avengerpenguin/r2r/Source.java index 1e67c86..dd6497d 100644 --- a/src/main/java/com/avengerpenguin/r2r/Source.java +++ b/src/main/java/com/avengerpenguin/r2r/Source.java @@ -32,8 +32,8 @@ public interface Source { * @return Jena QueryExecution */ public QueryExecution executeQuery(String query); - + public Model executeDescribeQuery(String query); - + public Model executeConstructQuery(String query); } diff --git a/src/main/java/com/avengerpenguin/r2r/SourceDescription.java b/src/main/java/com/avengerpenguin/r2r/SourceDescription.java index 501145d..a21c831 100644 --- a/src/main/java/com/avengerpenguin/r2r/SourceDescription.java +++ b/src/main/java/com/avengerpenguin/r2r/SourceDescription.java @@ -21,7 +21,7 @@ public class SourceDescription { private String sourceDataset; private String sparqlEndpoint; private String defaultGraph; - + public SourceDescription(String sourceDataset, String sparqlEndpoint, String defaultGraph) { super(); diff --git a/src/main/java/com/avengerpenguin/r2r/SourceManager.java b/src/main/java/com/avengerpenguin/r2r/SourceManager.java index 118877f..721ec1a 100644 --- a/src/main/java/com/avengerpenguin/r2r/SourceManager.java +++ b/src/main/java/com/avengerpenguin/r2r/SourceManager.java @@ -25,7 +25,7 @@ public interface SourceManager { * @return List of source descriptions */ public List getSourceDescriptions(); - + /** * Instantiate a Source object given the source description * @param sd diff --git a/src/main/java/com/avengerpenguin/r2r/SourcePattern.java b/src/main/java/com/avengerpenguin/r2r/SourcePattern.java index cc37724..41dec6e 100755 --- a/src/main/java/com/avengerpenguin/r2r/SourcePattern.java +++ b/src/main/java/com/avengerpenguin/r2r/SourcePattern.java @@ -37,7 +37,7 @@ public class SourcePattern implements Serializable { private Set properties; private int maxVarLength; private Set variablesInPattern; - + public Set getVariablesInPattern() { return variablesInPattern; } @@ -74,7 +74,7 @@ public static SourcePattern parseSourcePattern(String sourcePattern, PrefixMappe return sp; } - + public static String rewriteSourcePattern(String sourcePattern, StringGenerator varGenerator) { CharStream stream = new ANTLRStringStream(sourcePattern); SourcePatternRewriterLexer lexer = new SourcePatternRewriterLexer(stream); diff --git a/src/main/java/com/avengerpenguin/r2r/SparqlEndpointSource.java b/src/main/java/com/avengerpenguin/r2r/SparqlEndpointSource.java index 30e5483..53529cf 100644 --- a/src/main/java/com/avengerpenguin/r2r/SparqlEndpointSource.java +++ b/src/main/java/com/avengerpenguin/r2r/SparqlEndpointSource.java @@ -34,9 +34,9 @@ public class SparqlEndpointSource implements Source { private String sparqlEndpointURI; private List defaultGraphs = null; private List namedGraphs = null; - + /** - * + * * @param endpointURI The URL of the SPARQL endpoint * @param defaultGraph default graph * @param namedGraphURIs a list of named graphs @@ -47,17 +47,17 @@ public SparqlEndpointSource(String endpointURI, String defaultGraph, List(); defaultGraphs.add(defaultGraph); } - + public QueryExecution executeQuery(String query) { return QueryExecutionFactory.sparqlService(sparqlEndpointURI, query, defaultGraphs, namedGraphs); } diff --git a/src/main/java/com/avengerpenguin/r2r/StringGenerator.java b/src/main/java/com/avengerpenguin/r2r/StringGenerator.java index b3094ab..b4097de 100644 --- a/src/main/java/com/avengerpenguin/r2r/StringGenerator.java +++ b/src/main/java/com/avengerpenguin/r2r/StringGenerator.java @@ -18,10 +18,10 @@ package com.avengerpenguin.r2r; /** - * An interface that specifies a generator for URIs. This is used to assign converted mappings a URI. + * An interface that specifies a generator for URIs. This is used to assign converted mappings a URI. * @author andreas * */ public interface StringGenerator { - public String nextString(); + public String nextString(); } diff --git a/src/main/java/com/avengerpenguin/r2r/TargetPattern.java b/src/main/java/com/avengerpenguin/r2r/TargetPattern.java index b0100e9..d28d2b2 100644 --- a/src/main/java/com/avengerpenguin/r2r/TargetPattern.java +++ b/src/main/java/com/avengerpenguin/r2r/TargetPattern.java @@ -60,7 +60,7 @@ public class TargetPattern implements Serializable { private Map hints; private static Log log = LogFactory.getLog(TargetPattern.class); private Mapping mapping = null; - + public Set getVariableDependencies() { return Collections.unmodifiableSet(variableDependencies); } @@ -68,11 +68,11 @@ public Set getVariableDependencies() { public TargetPattern(List path) { this.path = path; } - + public void setMapping(Mapping mapping) { this.mapping = mapping; } - + public List getPath() { return Collections.unmodifiableList(path); } @@ -81,14 +81,14 @@ public List getPath() { * Generate all triples given the variable results of the query and transformations * @param model The model to add the triples to * @param results A variable binding of the source pattern and the transformation results - * @param group A group identifier to use when generating blank nodes (in order to separate identifiers across result sets) + * @param group A group identifier to use when generating blank nodes (in order to separate identifiers across result sets) */ public void addTargetTriplesToModel(Model model, VariableResults results, int blankNodeGroup, String termURI) { for(Triple triple: path) { if(termURI==null || triple.getPropertyURI().equals(termURI) || (triple.getClassURI()!=null && triple.getClassURI().equals(termURI))) { List subjectVals = getSubjectValues(triple.getSubject(), results, model, blankNodeGroup); List verbVals = getVerbValues(triple.getVerb()); - + for(Resource subject: subjectVals) { for(String verb: verbVals) { Property property = model.createProperty(verb); @@ -98,7 +98,7 @@ public void addTargetTriplesToModel(Model model, VariableResults results, int bl } } } - + /* * TODO: could be nicer :) */ @@ -113,7 +113,7 @@ private void addObjectsToStatement(Resource subject, Property property, TripleEl if (iri.startsWith("_:")) { iriResource = model.createResource(new AnonId(blankNodeGroup + "_" + iri.substring(2))); } else { - iriResource = model.createResource(iri); + iriResource = model.createResource(iri); } subject.addProperty(property, iriResource); } @@ -207,23 +207,23 @@ private List getDataTypeVariableValues(TripleElement object, } return values; } - + private List getIriValuesOfTripleElement(TripleElement element, VariableResults results) { List iris = null; if(element.getType()== TripleElement.Type.IRI) { iris = new ArrayList(); iris.add(element.getValue(0)); } - else + else iris = results.getResults(element.getValue(0)); return iris; } - + private List getSubjectValues(TripleElement element, VariableResults results, Model model, int blankNodeGroup) { List subjects = new ArrayList(); TripleElement.Type type = element.getType(); - + if(type== TripleElement.Type.IRI) { String subjectVal = element.getValue(0); if(subjectVal.startsWith("_:")) @@ -248,7 +248,7 @@ private List getSubjectValues(TripleElement element, VariableResults r } return subjects; } - + private List convertIRIStringsToResources(List iriStrings, Model model) { List resources = new ArrayList(); for(String iri: iriStrings) { @@ -262,14 +262,14 @@ private List convertIRIStringsToResources(List iriStrings, Mod } return resources; } - + private List getVerbValues(TripleElement element) { //Can only be IRI List subjects = new ArrayList(); subjects.add(element.getValue(0)); return subjects; } - + public static TargetPattern parseTargetPattern(String targetPattern, PrefixMapper prefixMapper, Set generatedVars) throws RecognitionException{ CharStream stream = new ANTLRStringStream(targetPattern); TargetPatternLexer lexer = new TargetPatternLexer(stream); diff --git a/src/main/java/com/avengerpenguin/r2r/TargetVocabulary.java b/src/main/java/com/avengerpenguin/r2r/TargetVocabulary.java index 0902436..93539e1 100644 --- a/src/main/java/com/avengerpenguin/r2r/TargetVocabulary.java +++ b/src/main/java/com/avengerpenguin/r2r/TargetVocabulary.java @@ -27,8 +27,8 @@ public class TargetVocabulary { private final String classRestriction; private final Collection entities; - private final boolean addMappingOfClassRestriction; - + private final boolean addMappingOfClassRestriction; + public TargetVocabulary(String classRestriction, Collection entities, boolean addMappingOfClassRestriction) { this.classRestriction = classRestriction; this.entities = entities; diff --git a/src/main/java/com/avengerpenguin/r2r/Triple.java b/src/main/java/com/avengerpenguin/r2r/Triple.java index f2dba5b..95ed407 100644 --- a/src/main/java/com/avengerpenguin/r2r/Triple.java +++ b/src/main/java/com/avengerpenguin/r2r/Triple.java @@ -28,7 +28,7 @@ public class Triple implements Serializable { private TripleElement object; private String propertyURI; private String classURI; - + public Triple(TripleElement subject, TripleElement verb, TripleElement object, String propertyURI, String classURI) { super(); @@ -58,6 +58,6 @@ public TripleElement getVerb() { public TripleElement getObject() { return object; } - - + + } diff --git a/src/main/java/com/avengerpenguin/r2r/TripleElement.java b/src/main/java/com/avengerpenguin/r2r/TripleElement.java index 3ae97c4..404b26e 100644 --- a/src/main/java/com/avengerpenguin/r2r/TripleElement.java +++ b/src/main/java/com/avengerpenguin/r2r/TripleElement.java @@ -28,11 +28,11 @@ public class TripleElement implements Serializable { private Type type; private List values; - + public enum Type { IRI, VARIABLE, IRIVARIABLE, BOOLEAN, STRING, STRINGVARIABLE, LANGTAGSTRING, LANGTAGVARIABLE, DATATYPESTRING, DATATYPEVARIABLE, INTEGER, DOUBLE, DECIMAL, BLANKNODE } - + public TripleElement(Type type, String... values) { this.type = type; this.values = new ArrayList(); @@ -43,7 +43,7 @@ public TripleElement(Type type, String... values) { else this.values.add(null); } - + public Type getType() { return type; } @@ -51,7 +51,7 @@ public Type getType() { public String getValue(int index) { return values.get(index); } - + public List getValues() { return Collections.unmodifiableList(values); } diff --git a/src/main/java/com/avengerpenguin/r2r/TurtleOutput.java b/src/main/java/com/avengerpenguin/r2r/TurtleOutput.java index 192b6eb..c28a3ef 100644 --- a/src/main/java/com/avengerpenguin/r2r/TurtleOutput.java +++ b/src/main/java/com/avengerpenguin/r2r/TurtleOutput.java @@ -30,9 +30,9 @@ /** * This implementation of the Output interface serializes the target dataset in * TURTLE format. The mapped output is written immediately. - * + * * @author grindcrank - * + * */ public class TurtleOutput implements Output { private final OutputStream outputStream; diff --git a/src/main/java/com/avengerpenguin/r2r/VariableArgument.java b/src/main/java/com/avengerpenguin/r2r/VariableArgument.java index a17dbb2..2bace98 100755 --- a/src/main/java/com/avengerpenguin/r2r/VariableArgument.java +++ b/src/main/java/com/avengerpenguin/r2r/VariableArgument.java @@ -28,5 +28,5 @@ public VariableArgument(String variableName) { public String getVariableName() { return variableName; - } + } } diff --git a/src/main/java/com/avengerpenguin/r2r/VariableResults.java b/src/main/java/com/avengerpenguin/r2r/VariableResults.java index 6c04949..3745f15 100755 --- a/src/main/java/com/avengerpenguin/r2r/VariableResults.java +++ b/src/main/java/com/avengerpenguin/r2r/VariableResults.java @@ -32,12 +32,12 @@ public class VariableResults { private Map> variableValues; private QuerySolution querySolution; private Map blankNodes = null; - + VariableResults(QuerySolution qs) { variableValues = new HashMap>(); this.querySolution = qs; } - + public boolean addVariableResult(String varName, List results) { if(variableValues.get(varName)==null) { variableValues.put(varName, results); @@ -45,23 +45,23 @@ public boolean addVariableResult(String varName, List results) { } return false; } - + public RDFNode getRDFNode(String variable) { return querySolution.get(variable); } - + public List getResults(String varName) { return variableValues.get(varName); } - + public Resource getBlankNodeResource(String identifier, Model model) { if(blankNodes==null) blankNodes = new HashMap(); - + // If no identifier is given, always create a new blank node if(identifier==null) return model.createResource(); - + // For equivalent identifiers return equivalent blank nodes if(blankNodes.containsKey(identifier)) return blankNodes.get(identifier); diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/DatasetChecker.java b/src/main/java/com/avengerpenguin/r2r/discovery/DatasetChecker.java index 34e5bb5..eca7d15 100755 --- a/src/main/java/com/avengerpenguin/r2r/discovery/DatasetChecker.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/DatasetChecker.java @@ -19,8 +19,8 @@ public interface DatasetChecker { public boolean containsProperty(String uri); - + public boolean containsClass(String uri); - + public boolean containsTargetElement(String uri); } diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/DependencyGraph.java b/src/main/java/com/avengerpenguin/r2r/discovery/DependencyGraph.java index 0118005..37e3bfb 100644 --- a/src/main/java/com/avengerpenguin/r2r/discovery/DependencyGraph.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/DependencyGraph.java @@ -35,7 +35,7 @@ public class DependencyGraph { //TODO: Needs refactoring/rewrite! // The node with the mappings that produce the target vocabulary element - public static MappingRanker ranker = new ExampleRanker(); + public static MappingRanker ranker = new ExampleRanker(); private VocabularyNode root; private String targetDataset; private String sourceDataset; @@ -44,10 +44,10 @@ public class DependencyGraph { private String targetVocabularyTerm; Map targetClusters; // The clusters a mapping is member of (generates the target element & dataset combination) - Map> clustersOfMapping; + Map> clustersOfMapping; Set sourceSatisfiableMappings = null; MetaDataCatcher mappingMetadataCatcher; //TODO: remove from this class - + public DependencyGraph(VocabularyNode root, String targetVocabularyTerm, String sourceDataset, String targetDataset, Map allNodes, Set sourceNodes, MetaDataCatcher mdc) { super(); this.root = root; @@ -58,7 +58,7 @@ public DependencyGraph(VocabularyNode root, String targetVocabularyTerm, String this.targetDataset = targetDataset; this.targetVocabularyTerm = targetVocabularyTerm; } - + public String getTargetVocabularyTerm() { return targetVocabularyTerm; } @@ -70,13 +70,13 @@ public VocabularyNode getRoot() { public Set getSourceNodes() { return sourceNodes; } - + public Map getNodes() { return nodes; } /** - * marks nodes which are satisfiable beginning from the source nodes + * marks nodes which are satisfiable beginning from the source nodes */ public void assertSatisfiability() { LinkedList openQueue = new LinkedList(); @@ -96,7 +96,7 @@ public void assertSatisfiability() { } } } - + // The mapping can be directly run on the Source private boolean mappingIsSourceSatisfiable(MappingMetaData metaData) { for(String dependency: metaData.getValuesForProperty(R2R.dependsOn)) { @@ -105,7 +105,7 @@ private boolean mappingIsSourceSatisfiable(MappingMetaData metaData) { } return false; } - + /** * removes all the nodes in the tree that could not be satisfied */ @@ -117,11 +117,11 @@ public void removeUnsatisfiableNodesAndMappings() { iterator.remove(); else { // node is ok, but remove unsatisfiable mappings - node.getValue().removeUnsatisfiableMappings(); - } + node.getValue().removeUnsatisfiableMappings(); + } } } - + public void removeIrrelevantNodes() { LinkedList openQueue = new LinkedList(); // if root is unsatisfiable do nothing @@ -146,7 +146,7 @@ public void removeIrrelevantNodes() { } removeAllNodesNotInSet(relevantNodes); } - + /** * builds the best mapping composition(s) with a maximum depth * @param depth the maximum depth of the mapping composition @@ -155,106 +155,106 @@ public void removeIrrelevantNodes() { */ public MappingChain buildBestMappingComposition(int depth, DatasetChecker datasetChecker) { Set openQueue = getSourceClusters(); - + while(depth-- > 0) { Set nextOpenQueue = new HashSet(); - + Set mappings = getAllMappingsOfClusters(openQueue); for(String mapping: mappings) { double mappingScore = rateMapping(mapping); - + for(TargetMappingCluster cluster: clustersOfMapping.get(mapping)) { if(cluster.updateMapping(mapping, mappingScore)) nextOpenQueue.add(cluster); } } - + openQueue = nextOpenQueue; } - + MappingChainNode root = getBestMappingChain(datasetChecker); double score = 0.0; if(root!=null) score = root.getScore(); MappingChain mapChain = new MappingChain(root, sourceDataset, targetDataset, targetVocabularyTerm, score); - + return mapChain; } - + private Set getAllMappingsOfClusters(Set clusters) { Set mappings = new HashSet(); - + for(TargetMappingCluster cluster: clusters) { mappings.addAll(cluster.getDependendMappings()); } return mappings; } - + private MappingChainNode getBestMappingChain(DatasetChecker datasetChecker) { TargetMappingCluster rootCluster = getCluster(root.getTargetElement(), targetDataset); if(rootCluster==null) return null; - + String bestRootMapping = rootCluster.currentBestMapping; if(bestRootMapping==null) return null; else return buildMappingChain(rootCluster, root.getTargetElement(), datasetChecker, 0); } - + private MappingChainNode buildMappingChain(TargetMappingCluster cluster, String targetVocabularyTerm, DatasetChecker datasetChecker, int depth) { String mapping = cluster.currentBestMapping; MappingMetaData mappingMetedata = mappingMetadataCatcher.getMetaDataForMapping(mapping); Set dependencies = mappingMetedata.getValuesForProperty(R2R.dependsOn); String sourceDataset = null; - + if(!(mappingMetedata.getValuesForProperty(R2R.sourceDataset)==null)) sourceDataset = mappingMetedata.getValuesForProperty(R2R.sourceDataset).iterator().next(); - + MappingChainNode mChain = new MappingChainNode(mapping, targetVocabularyTerm, depth, cluster.currentBestScore); - + for(String termDep: dependencies) { TargetMappingCluster clusterDep = getCluster(termDep, sourceDataset); boolean isClass = datasetChecker.containsClass(termDep); // If cluster has no mapping then it must be a source node if(isSourceCluster(clusterDep)) mChain.setSourceDependency(termDep, isClass); - else + else mChain.setMappingDependency(termDep, buildMappingChain(clusterDep, termDep, datasetChecker, depth+1)); } - + return mChain; } - + private boolean isSourceCluster(TargetMappingCluster cluster) { return (cluster.getCurrentBestMapping()==null && cluster.currentBestScore > 0.5); } - + private double rateMapping(String mapping) { MappingMetaData metaData = mappingMetadataCatcher.getMetaDataForMapping(mapping); double score = ranker.rankMapping(metaData); - + Set dependencies = metaData.getValuesForProperty(R2R.dependsOn); Set sDs = metaData.getValuesForProperty(R2R.sourceDataset); - + String sourceDataset = null; if(sDs!=null) sourceDataset = sDs.iterator().next(); - + for(String dependency: dependencies) { TargetMappingCluster cluster = getCluster(dependency, sourceDataset); score *= cluster.getCurrentBestScore(); } return score; } - + public void createMappingClustersAndDependencies() { Map mappings = getAllMappingsFromNodes(); targetClusters = new HashMap(); clustersOfMapping = new HashMap>(); if(sourceSatisfiableMappings==null) setSourceSatisfiableMappings(); - + for(Map.Entry mapping: mappings.entrySet()) { MappingMetaData metaData = mapping.getValue(); Set sd = metaData.getValuesForProperty(R2R.sourceDataset); @@ -268,17 +268,17 @@ public void createMappingClustersAndDependencies() { targetCluster.updateMapping(null, 1.0); targetCluster.addDependendMapping(mapping.getKey()); } - + for(String targetElement: metaData.getValuesForProperty(R2R.mapsTo)) { if(!nodes.containsKey(targetElement)) continue; - + TargetMappingCluster targetCluster = getCluster(targetElement, targetDataset); addClusterToMapping(mapping.getKey(), targetCluster); } } } - + /** * Get the mapping URIs that can be directly run on the Source * @return @@ -288,7 +288,7 @@ public Set getSourceSatisfiableMappings() { setSourceSatisfiableMappings(); return sourceSatisfiableMappings; } - + /** * generate the Set that holds the source satisfiable mappings */ @@ -304,18 +304,18 @@ public void setSourceSatisfiableMappings() { } } } - + private Set getSourceClusters() { Set sourceClusters = new HashSet(); Set vNodes = getSourceNodes(); - + for(VocabularyNode sNode: vNodes) { setSourceCluster(sourceClusters, sNode, sourceDataset); - + if(sourceDataset!=null) setSourceCluster(sourceClusters, sNode, null); } - + return sourceClusters; } @@ -326,7 +326,7 @@ private void setSourceCluster(Set sourceClusters, cluster.currentBestScore = 1.0; sourceClusters.add(cluster); } - + public Map getTargetClusters() { return targetClusters; } @@ -343,17 +343,17 @@ private void addClusterToMapping(String mapping, TargetMappingCluster cluster) { } clusterSet.add(cluster); } - + private TargetMappingCluster getCluster(String vocabElementURI, String datasetURI) { TargetMappingCluster targetCluster = new TargetMappingCluster(vocabElementURI, datasetURI); if(targetClusters.get(targetCluster)==null) targetClusters.put(targetCluster, targetCluster); else targetCluster = targetClusters.get(targetCluster); - + return targetCluster; } - + private void removeAllNodesNotInSet(Set relevantNodes) { Iterator> iterator = nodes.entrySet().iterator(); while(iterator.hasNext()) { @@ -362,7 +362,7 @@ private void removeAllNodesNotInSet(Set relevantNodes) { iterator.remove(); } } - + public Map getAllMappingsFromNodes() { Map mappings = new HashMap(); for(VocabularyNode node: nodes.values()) { diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/DiscoveryTargetVocabulary.java b/src/main/java/com/avengerpenguin/r2r/discovery/DiscoveryTargetVocabulary.java index e861357..2812ca5 100755 --- a/src/main/java/com/avengerpenguin/r2r/discovery/DiscoveryTargetVocabulary.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/DiscoveryTargetVocabulary.java @@ -33,13 +33,13 @@ public class DiscoveryTargetVocabulary { // "Map" private final Map terms; - + public DiscoveryTargetVocabulary(Map vocabularyTerms, String dataset) { this.terms = vocabularyTerms; if(dataset!=null) setDataset(dataset); } - + private void setDataset(String dataset) { for(Map.Entry termDataset: terms.entrySet()) { if(termDataset.getValue()==null) @@ -50,7 +50,7 @@ private void setDataset(String dataset) { public Map getTermDatasetPairs() { return terms; } - + public static Collection parse(String vocabDefinition) { CharStream stream = new ANTLRStringStream(vocabDefinition); TargetVocabularyDiscoveryLexer lexer = new TargetVocabularyDiscoveryLexer(stream); @@ -65,5 +65,5 @@ public static Collection parse(String vocabDefinition } return tvs; } - + } diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/ExampleRanker.java b/src/main/java/com/avengerpenguin/r2r/discovery/ExampleRanker.java index 4252991..bce0876 100755 --- a/src/main/java/com/avengerpenguin/r2r/discovery/ExampleRanker.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/ExampleRanker.java @@ -26,16 +26,16 @@ public class ExampleRanker implements MappingRanker { public static final double mappingChainLengthWeight = 1.0; public static final double byPublisherWeight = 1.0; public static final double byDatasetMaintainerWeight = 1.0; - public static final double weightSum = mappingChainLengthWeight + byDatasetMaintainerWeight + byPublisherWeight; - + public static final double weightSum = mappingChainLengthWeight + byDatasetMaintainerWeight + byPublisherWeight; + public double rankMapping(MappingMetaData metaData) { String sourceDataset = getSingleValue(metaData, R2R.sourceDataset); String targetDataset = getSingleValue(metaData, R2R.targetDataset); String datasetP = getSingleValue(metaData, R2R.publishedWithDataset); String vocabularyP = getSingleValue(metaData, R2R.byVocabularyPublisher); - + double score = mappingChainLengthWeight*0.95; - + if(sourceDataset==null && targetDataset==null) { score+=byDatasetMaintainerWeight; if(vocabularyP!=null && vocabularyP.equalsIgnoreCase("true")) diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/MappingChain.java b/src/main/java/com/avengerpenguin/r2r/discovery/MappingChain.java index 5a56c5c..d45da48 100755 --- a/src/main/java/com/avengerpenguin/r2r/discovery/MappingChain.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/MappingChain.java @@ -30,7 +30,7 @@ public class MappingChain { private double score; public MappingChain(MappingChainNode root, String sourceDataset, - String targetDataset, String targetVocabularyTerm, + String targetDataset, String targetVocabularyTerm, double score) { super(); this.root = root; @@ -74,7 +74,7 @@ public long execute(Source in, Output out, MappingRepository repository) { else return 0; } - + public String toString() { StringBuilder output = new StringBuilder(); output.append(" MappingChain\n"); @@ -93,13 +93,13 @@ public String toString() { output.append(root.toString()); else output.append("This mapping chain is empty and not executable!"); - + return output.toString(); } - + /** - * checks if an executable mapping chain was found - * @return + * checks if an executable mapping chain was found + * @return */ public boolean isExecutable() { return root!=null; diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/MappingChainNode.java b/src/main/java/com/avengerpenguin/r2r/discovery/MappingChainNode.java index bf3f0a2..0bd2fd7 100755 --- a/src/main/java/com/avengerpenguin/r2r/discovery/MappingChainNode.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/MappingChainNode.java @@ -51,7 +51,7 @@ public Map getMappingDependencies() { public String getMappingURI() { return mappingURI; } - + public int getDepth() { return depth; } @@ -62,29 +62,29 @@ public double getScore() { public String getTargetVocabularyTerm() { return targetVocabularyTerm; } - + public void setMappingDependency(String targetVocabularyElement, MappingChainNode mappingChain) { mappingDependencies.put(targetVocabularyElement, mappingChain); } - + public void setSourceDependency(String targetVocabularyElement, boolean isClass) { sourceDependencies.put(targetVocabularyElement, isClass); } - + public long execute(Source in, Output out, MappingRepository repository) { long count = executeMappingRecursively(in, out, repository); return count; } - + private long executeMappingRecursively(Source in, Output outputModel, MappingRepository repository) { // If only source dependencies exist, execute mapping directly Mapping mapping = repository.getMappingOfUri(this.mappingURI); Collection term = new ArrayList(); term.add(targetVocabularyTerm); - + if(mappingDependencies.size()==0) return mapping.executeMapping(in, outputModel, term); - + Model inputModel = ModelFactory.createDefaultModel(); for(Map.Entry sourceDep: sourceDependencies.entrySet()) { if(sourceDep.getValue()) @@ -92,34 +92,34 @@ private long executeMappingRecursively(Source in, Output outputModel, MappingRep else getClassStatements(sourceDep.getKey(), in, inputModel); } - + long count = inputModel.size(); - + Output inputOutput = new JenaModelOutput(inputModel); for(Map.Entry mappingDep: mappingDependencies.entrySet()) { count += mappingDep.getValue().executeMappingRecursively(in, inputOutput, repository); } - + Source inputModelSource = new JenaModelSource(inputModel); count += mapping.executeMapping(inputModelSource, outputModel, term); - + return count; } - + private void getPropertyStatements(String property, Source in, Model out) { StringBuilder sb = new StringBuilder(); sb.append("CONSTRUCT { ?s <").append(property).append("> ?o } WHERE { ?s <"); sb.append(property).append("> ?o }"); out.add(in.executeConstructQuery(sb.toString())); } - + private void getClassStatements(String classURI, Source in, Model out) { StringBuilder sb = new StringBuilder(); sb.append("CONSTRUCT { ?s a <").append(classURI).append("> } WHERE { ?s a <"); sb.append(classURI).append("> }"); out.add(in.executeConstructQuery(sb.toString())); } - + public String toString() { StringBuilder output = new StringBuilder(); String indent = ""; diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/MappingDiscovery.java b/src/main/java/com/avengerpenguin/r2r/discovery/MappingDiscovery.java index 9d4ed83..e0f33d7 100755 --- a/src/main/java/com/avengerpenguin/r2r/discovery/MappingDiscovery.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/MappingDiscovery.java @@ -35,7 +35,7 @@ public class MappingDiscovery { private DatasetChecker datasetCheck; private MetadataRepository repository; private MetaDataCatcher metaDataCatcher; - + public MappingDiscovery(DatasetChecker datasetCheck, MetadataRepository repository) { super(); @@ -43,34 +43,34 @@ public MappingDiscovery(DatasetChecker datasetCheck, this.repository = repository; metaDataCatcher = new MetaDataCatcher(repository); } - + public DependencyGraph buildDependencyGraph(String targetVocabularyTerm, String sourceDataset, String targetDataset, int maxDepth) { Set sourceNodes = new HashSet(); - + // use as FIFO queue LinkedList openNodes = new LinkedList(); - + // Keeps track on which nodes have been added so far and stores their data Map nodes = new HashMap(); - + VocabularyNode root = initRootNode(targetVocabularyTerm); nodes.put(targetVocabularyTerm, root); openNodes.add(root); - + while(!openNodes.isEmpty()) { VocabularyNode node = openNodes.poll(); // calculate current depth from goal element and stop if max reach int depth = node.getDepth()+1; if(depth > maxDepth) break; - + expand(targetVocabularyTerm, node, sourceNodes, nodes, openNodes, depth); } - + return new DependencyGraph(root, targetVocabularyTerm, sourceDataset, targetDataset, nodes, sourceNodes, metaDataCatcher); } - + public MappingChain getMappingChain(String targetVocabularyElement, String sourceDataset, String targetDataset, int maxDepth) { DependencyGraph dGraph = buildDependencyGraph(targetVocabularyElement, sourceDataset, targetDataset, maxDepth); dGraph.assertSatisfiability(); @@ -79,7 +79,7 @@ public MappingChain getMappingChain(String targetVocabularyElement, String sourc dGraph.createMappingClustersAndDependencies(); return dGraph.buildBestMappingComposition(maxDepth, datasetCheck); } - + /** * Get all the mapping chains for the given target vocabulary definition * @param targetVocabDefinition The (discovery) target vocabulary definition string @@ -93,16 +93,16 @@ public Collection getMappingChains(String targetVocabDefinition, S for(DiscoveryTargetVocabulary dtv: vocabDefs) for(Map.Entry termDataset: dtv.getTermDatasetPairs().entrySet()) mappingChains.add(getMappingChain(termDataset.getKey(), sourceDataset, termDataset.getValue(), maxDepth)); - + return mappingChains; } - + private void expand(String vocabularyElement, VocabularyNode node, Set sourceNodes, Map nodes, LinkedList openNodes, int depth) { for(Map.Entry mappingData: node.getMappings().entrySet()) { // Look at dependencies of mappings of the node Set dependencies = mappingData.getValue().getValuesForProperty(R2R.dependsOn); - + for(String dependency: dependencies) { // add node for non-added dependency if(nodes.get(dependency)==null) { @@ -117,7 +117,7 @@ private void expand(String vocabularyElement, VocabularyNode node, Set depMappings = repository.getMappingsOfTargetElement(dependency); Map depMappingsMetadata = new HashMap(); - + for(String mapping: depMappings) { MappingMetaData mmd = metaDataCatcher.getMetaDataForMapping(mapping); Set dependencies = mmd.getValuesForProperty(R2R.dependsOn); if(dependencies!=null && (!dependencies.contains(vocabularyElement))) depMappingsMetadata.put(mapping, mmd); } - + return new VocabularyNode(dependency, depMappingsMetadata); } @@ -151,13 +151,13 @@ private VocabularyNode createSourceNode(String dependency) { private VocabularyNode initRootNode(String vocabularyElement) { Set rootMappings = repository.getMappingsOfTargetElement(vocabularyElement); Map rootMappingsMetadata = new HashMap(); - + for(String mapping: rootMappings) { MappingMetaData mmd = metaDataCatcher.getMetaDataForMapping(mapping); if(mmd.getValuesForProperty(R2R.dependsOn)!=null) rootMappingsMetadata.put(mapping, mmd); } - + VocabularyNode root = new VocabularyNode(vocabularyElement, rootMappingsMetadata); root.setDepth(0); return root; diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/MappingMetaData.java b/src/main/java/com/avengerpenguin/r2r/discovery/MappingMetaData.java index fa7d48d..fc30d3a 100755 --- a/src/main/java/com/avengerpenguin/r2r/discovery/MappingMetaData.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/MappingMetaData.java @@ -27,11 +27,11 @@ */ public class MappingMetaData { Map> metaData; - + public MappingMetaData(Map> data) { this.metaData = data; } - + /** * get the lexical values of the specified property * @param property the property URI diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/MappingRanker.java b/src/main/java/com/avengerpenguin/r2r/discovery/MappingRanker.java index 84482fc..aef82e1 100755 --- a/src/main/java/com/avengerpenguin/r2r/discovery/MappingRanker.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/MappingRanker.java @@ -18,5 +18,5 @@ package com.avengerpenguin.r2r.discovery; public interface MappingRanker { - public double rankMapping(MappingMetaData metaData); + public double rankMapping(MappingMetaData metaData); } diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/MetaDataCatcher.java b/src/main/java/com/avengerpenguin/r2r/discovery/MetaDataCatcher.java index f14421c..602b22f 100644 --- a/src/main/java/com/avengerpenguin/r2r/discovery/MetaDataCatcher.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/MetaDataCatcher.java @@ -26,12 +26,12 @@ public class MetaDataCatcher { ConcurrentMap metaData; MetadataRepository repository; - + public MetaDataCatcher(MetadataRepository repository) { this.repository = repository; metaData = new ConcurrentHashMap(); } - + public MappingMetaData getMetaDataForMapping(String mappingURI) { if(!metaData.containsKey(mappingURI)) metaData.putIfAbsent(mappingURI, new MappingMetaData(repository.getMappingMetaData(mappingURI))); diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/SourceDatasetChecker.java b/src/main/java/com/avengerpenguin/r2r/discovery/SourceDatasetChecker.java index 3301f86..a4ffa43 100755 --- a/src/main/java/com/avengerpenguin/r2r/discovery/SourceDatasetChecker.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/SourceDatasetChecker.java @@ -28,12 +28,12 @@ public class SourceDatasetChecker implements DatasetChecker { private final Source source; private final ConcurrentMap cache; - + public SourceDatasetChecker(Source source) { this.source = source; cache = new ConcurrentHashMap(); } - + public boolean containsClass(String uri) { Boolean existent = cache.get(uri); if(existent==null) { @@ -57,7 +57,7 @@ public boolean containsProperty(String uri) { } return existent; } - + public boolean containsTargetElement(String uri) { return containsProperty(uri) || containsClass(uri); } diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/TargetMappingCluster.java b/src/main/java/com/avengerpenguin/r2r/discovery/TargetMappingCluster.java index 48c7fdb..b1f0500 100644 --- a/src/main/java/com/avengerpenguin/r2r/discovery/TargetMappingCluster.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/TargetMappingCluster.java @@ -30,18 +30,18 @@ public Set getDependendMappings() { protected String datasetURI; protected String vocabElementURI; - + public TargetMappingCluster(String vocabElementURI, String datasetURI) { this.datasetURI = datasetURI; this.vocabElementURI = vocabElementURI; dependendMappings = new HashSet(); } - + @Override public int hashCode() { return vocabElementURI.hashCode() + (datasetURI==null ? 0 : datasetURI.hashCode()); } - + @Override public boolean equals(Object object) { if(object instanceof TargetMappingCluster) { @@ -60,18 +60,18 @@ else if(datasetURI==mc.datasetURI) // both null else return false; } - + public void addDependendMapping(String mapping) { dependendMappings.add(mapping); } - + @Override public String toString() { return vocabElementURI + datasetURI; } - + /** - * + * * @param mapping mapping URI * @param mappingScore score between 0 and 1 * @return true if the mapping is the new best mapping for this cluster diff --git a/src/main/java/com/avengerpenguin/r2r/discovery/VocabularyNode.java b/src/main/java/com/avengerpenguin/r2r/discovery/VocabularyNode.java index b89761d..29a334d 100644 --- a/src/main/java/com/avengerpenguin/r2r/discovery/VocabularyNode.java +++ b/src/main/java/com/avengerpenguin/r2r/discovery/VocabularyNode.java @@ -34,18 +34,18 @@ public class VocabularyNode { private boolean satisfiable = false; private int minDistanceToSourceDataset = Integer.MAX_VALUE; - + // which vocabulary nodes could use the results of this one private List consuments; - + // meta data of mappings that map to the target element private Map mappings; - + // For satisfiability checks private Map satisfiableMappings; private Set satisfiableDependencies; - + VocabularyNode(String targetElement, Map mappings) { this.targetElement = targetElement; consuments = new ArrayList(); @@ -53,7 +53,7 @@ public class VocabularyNode { satisfiableMappings = new HashMap(); satisfiableDependencies = new HashSet(); } - + /** * adds a satisfiable vocabulary dependency to this node AND then checks if this node is satisfiable * @param dependency the added vocabulary dependency @@ -63,10 +63,10 @@ public boolean addSatisfiableDependency(String dependency) { satisfiableDependencies.add(dependency); if(hasSatisfiableMappings()) satisfiable = true; - + return satisfiable; } - + private boolean hasSatisfiableMappings() { Iterator> iterator = mappings.entrySet().iterator(); while(iterator.hasNext()) { @@ -76,7 +76,7 @@ private boolean hasSatisfiableMappings() { } return false; } - + private int filterSatisfiableMappings() { int count = 0; @@ -92,7 +92,7 @@ private int filterSatisfiableMappings() { return count; } - + private boolean checkIfDependenciesAreSatisfiable(Set dependencies) { for(String dependency: dependencies) { if(!satisfiableDependencies.contains(dependency)) @@ -100,7 +100,7 @@ private boolean checkIfDependenciesAreSatisfiable(Set dependencies) { } return true; } - + public void removeUnsatisfiableMappings() { // all satisfiable mappings should be in satisfiableMappings at this point if(mappings!=null) { @@ -109,7 +109,7 @@ public void removeUnsatisfiableMappings() { } mappings = satisfiableMappings; } - + /** * returns a list of nodes that use the results of this node * @return @@ -129,7 +129,7 @@ public boolean isSatisfiable() { public void setSatisfiable(boolean satisfiable) { this.satisfiable = satisfiable; } - + public int getDepth() { return depth; } @@ -149,7 +149,7 @@ public void setMinDistanceToSourceDataset(int minDistanceToSourceDataset) { public int getMinDistanceToSourceDataset() { return minDistanceToSourceDataset; } - + public void addConsument(VocabularyNode node) { consuments.add(node); } diff --git a/src/main/java/com/avengerpenguin/r2r/examples/DiscoveryExample1.java b/src/main/java/com/avengerpenguin/r2r/examples/DiscoveryExample1.java index e192b06..c169c34 100644 --- a/src/main/java/com/avengerpenguin/r2r/examples/DiscoveryExample1.java +++ b/src/main/java/com/avengerpenguin/r2r/examples/DiscoveryExample1.java @@ -27,7 +27,7 @@ public static void main(String[] args) throws Exception { Source in = new FileOrURISource("example_data/discoveryExample1_input.n3"); Output out = new NTriplesOutput("discoveryExample1_output.nt"); Repository repository = new Repository(new FileOrURISource("example_data/DBpediaToX.ttl")); - + /* Generate mapping meta data repository, because no meta data is included in the repository * This will generate r2r:dependsOn and r2r:mapsTo properties */ @@ -36,12 +36,12 @@ public static void main(String[] args) throws Exception { // The DatasetChecker provides vocabulary term information for the source dataset DatasetChecker datasetCheck = new SourceDatasetChecker(in); MappingDiscovery discovery = new MappingDiscovery(datasetCheck, metaRepository); - + // The target vocabulary definition String vocabDef = "@prefix dbpedia: .\n" + "@prefix linkedmdb: .\n" + - "(dbpedia:runtime, dbpedia:Film, dbpedia:director)"; - + "(dbpedia:runtime, dbpedia:Film, dbpedia:director)"; + /* Start the discovery process for the given vocabulary definition * The arguments are: * 1. The vocabulary definition @@ -49,7 +49,7 @@ public static void main(String[] args) throws Exception { * 3. The search depth in the search graph. In our example 2 would actually be enough. */ Collection chains = discovery.getMappingChains(vocabDef, "http://mappings.dbpedia.org/r2r/linkedmdbVOID", 3); - + // Execute Mapping Chains and print out information for(MappingChain mc: chains) { System.out.println("\nExecuting: " + mc + "\n_________________________\n"); diff --git a/src/main/java/com/avengerpenguin/r2r/examples/Example1.java b/src/main/java/com/avengerpenguin/r2r/examples/Example1.java index 94fc039..4f64a3a 100644 --- a/src/main/java/com/avengerpenguin/r2r/examples/Example1.java +++ b/src/main/java/com/avengerpenguin/r2r/examples/Example1.java @@ -31,14 +31,14 @@ public class Example1 { public static void main(String[] args) throws Exception { // Configure the source, use local file Source in = new FileOrURISource("example_data/example1_data.ttl"); - + // Output to local file in RDF/XML format // Output out = new RDFXMLOutput("example2_output.xml"); Output out = new NTriplesOutput("example1_output.nt"); // Create an in-memory repository from a local file Repository mappingRepository = Repository.createFileOrUriRepository("example_data/mappings.ttl"); - + // Specify target dataset. Just generate any statement containing one of the properties String vocabulary = "@prefix foaf: ." + "@prefix dbpedia: ." + @@ -48,10 +48,10 @@ public static void main(String[] args) throws Exception { "dbpedia:birthDay," + "v:n" + ")"; - + // Transform: The output data is written to LabelToName_Output.nt Mapper.transform(in, out, mappingRepository, vocabulary); - + // Close the Output object to write the data to file out.close(); System.out.println("Finished."); diff --git a/src/main/java/com/avengerpenguin/r2r/examples/Example2.java b/src/main/java/com/avengerpenguin/r2r/examples/Example2.java index 3553760..56146dd 100644 --- a/src/main/java/com/avengerpenguin/r2r/examples/Example2.java +++ b/src/main/java/com/avengerpenguin/r2r/examples/Example2.java @@ -31,23 +31,23 @@ public class Example2 { public static void main(String[] args) throws Exception { // Configure the source, use local file Source in = new FileOrURISource("example_data/example2_data.ttl"); - + // Output to local file in RDF/XML format // Output out = new RDFXMLOutput("example2_output.xml"); Output out = new NTriplesOutput("example2_output.nt"); // Create an in-memory repository from a local file Repository mappingRepository = Repository.createFileOrUriRepository("example_data/mappings.ttl"); - + // Specify target dataset. Just generate any statement containing on of the properties String vocabulary = "@prefix dbpedia: ." + "(" + "dbpedia:meltingPoint" + ")"; - + // Transform: The output data is written to LabelToName_Output.nt Mapper.transform(in, out, mappingRepository, vocabulary); - + // Close the Output object to write the data to file out.close(); System.out.println("Finished."); diff --git a/src/main/java/com/avengerpenguin/r2r/examples/Example3.java b/src/main/java/com/avengerpenguin/r2r/examples/Example3.java index f982571..d5c4d7d 100644 --- a/src/main/java/com/avengerpenguin/r2r/examples/Example3.java +++ b/src/main/java/com/avengerpenguin/r2r/examples/Example3.java @@ -27,23 +27,23 @@ public class Example3 { public static void main(String[] argv) throws IOException { // Configure the source, use DBpedia's SPARQL endpoint Source in = new SparqlEndpointSource("http://dbpedia.org/sparql"); - + // Output to local file Output out = new NTriplesOutput("example3_output.nt"); - + // Create an in-memory repository from a local file Repository mappingRepository = Repository.createFileOrUriRepository("example_data/mappings.ttl"); - + // Specify target dataset. The '+' behind foaf:Person means to generate rdf:type statements String vocabulary = "@prefix foaf: " + "foaf:Person+(" + "foaf:name," + "" + ")"; - + // Transform: The output data is written to LabelToName_Output.nt Mapper.transform(in, out, mappingRepository, vocabulary); - + // Close the Output object to flush and close stream/printer out.close(); System.out.println("Finished."); diff --git a/src/main/java/com/avengerpenguin/r2r/examples/Example4.java b/src/main/java/com/avengerpenguin/r2r/examples/Example4.java index 946fa93..0a67a53 100644 --- a/src/main/java/com/avengerpenguin/r2r/examples/Example4.java +++ b/src/main/java/com/avengerpenguin/r2r/examples/Example4.java @@ -25,7 +25,7 @@ public class Example4 { public static void main(String[] args) throws Exception { // Configure the source, use local file Source in = new FileOrURISource("example_data/example4_data.nt"); - + // Output to local file in RDF/XML format // Output out = new RDFXMLOutput("example2_output.xml"); Output out = new NTriplesOutput("example4_output.nt"); @@ -37,9 +37,9 @@ public static void main(String[] args) throws Exception { */ Repository mappingRepository = Repository.createJenaModelRepository( Repository.importMappingDataFromFile( - "example_data/mappings.ttl", + "example_data/mappings.ttl", new EnumeratingURIGenerator("http://nodomain/convertedMapping"))); - + // Specify target dataset. Just generate any statement containing on of the properties String vocabulary = "@prefix foaf: ." + "@prefix dbpedia: ." + @@ -49,10 +49,10 @@ public static void main(String[] args) throws Exception { "dbpedia:starring," + "dbpedia:director" + ")"; - + // Transform: The output data is written to LabelToName_Output.nt Mapper.transform(in, out, mappingRepository, vocabulary); - + // Close the Output object to write the data to file out.close(); System.out.println("Finished."); diff --git a/src/main/java/com/avengerpenguin/r2r/functions/AddFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/AddFunctionFactory.java index 3b58a69..32c18c8 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/AddFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/AddFunctionFactory.java @@ -29,11 +29,11 @@ public class AddFunctionFactory implements FunctionFactory { private AddFunction function = null; - + public Function getInstance() { if(function==null) function = new AddFunction(); - + return function; } @@ -42,15 +42,15 @@ private static class AddFunction implements Function { public String getURI() { return "add"; } - + public List execute(List> arguments, String hint) { if(arguments.size()<1) throw new IllegalArgumentException("Add: No arguments supplied!"); - + List result = new ArrayList(); DataType type = HelperFunctions.getDataTypeInformationOfAllArguments(arguments); type = HelperFunctions.takeMostAppropriateDataTypeForAddLikeCalculations(type, hint); - + if(type==DataType.String) throw new IllegalArgumentException("Non-numerical argument for add-function"); if(type==DataType.Int) { diff --git a/src/main/java/com/avengerpenguin/r2r/functions/BooleanPickFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/BooleanPickFunctionFactory.java index 0b2766c..fe10951 100755 --- a/src/main/java/com/avengerpenguin/r2r/functions/BooleanPickFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/BooleanPickFunctionFactory.java @@ -29,11 +29,11 @@ public class BooleanPickFunctionFactory implements FunctionFactory { private BooleanPickFunction function = null; - + public Function getInstance() { if(function==null) function = new BooleanPickFunction(); - + return function; } @@ -42,20 +42,20 @@ private static class BooleanPickFunction implements Function { public String getURI() { return "booleanPick"; } - + public List execute(List> arguments, String hint) { if(arguments.size()<3) throw new IllegalArgumentException("booleanPick(): No arguments supplied!"); - + boolean boolValue = arguments.get(0).get(0).equalsIgnoreCase("true"); - + List result = new ArrayList(); if(boolValue) result = arguments.get(1); else result = arguments.get(2); - + return result; } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/CompareFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/CompareFunctionFactory.java index b2b6de4..6d31841 100755 --- a/src/main/java/com/avengerpenguin/r2r/functions/CompareFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/CompareFunctionFactory.java @@ -26,11 +26,11 @@ public class CompareFunctionFactory implements FunctionFactory { private CompareFunction function = null; - + public Function getInstance() { if(function==null) function = new CompareFunction(); - + return function; } @@ -39,23 +39,23 @@ private static class CompareFunction implements Function { public String getURI() { return "compare"; } - + public List execute(List> arguments, String hint) { if(arguments.size()<3) throw new IllegalArgumentException("compare: Not enough arguments supplied!"); - + String compareOp = arguments.get(0).get(0); List leftArg = arguments.get(1); List rightArg = arguments.get(2); List result = new ArrayList(); - + DataType leftArgType = HelperFunctions.getDataTypeInformationOfArgument(leftArg); DataType rightArgType = HelperFunctions.getDataTypeInformationOfArgument(rightArg); DataType workingType = HelperFunctions.pickMoreGeneralDataType(leftArgType, rightArgType); - + int compareResult; - + if(workingType==DataType.String) compareResult = leftArg.get(0).compareTo(rightArg.get(0)); else if(workingType==DataType.Integer) { @@ -69,11 +69,11 @@ else if(workingType==DataType.Integer) { } Boolean booleanResult = false; - + if(compareResult < 0) { if(compareOp.equals("<") || compareOp.equals("<=") || compareOp.equals("!=")) booleanResult = true; - } else if(compareResult == 0) { + } else if(compareResult == 0) { if(compareOp.equals("=") || compareOp.equals("<=") || compareOp.equals(">=")) booleanResult = true; } else @@ -81,7 +81,7 @@ else if(workingType==DataType.Integer) { booleanResult = true; result.add(booleanResult.toString()); - + return result; } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/ConcatFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/ConcatFunctionFactory.java index 76a614f..d2f57fe 100755 --- a/src/main/java/com/avengerpenguin/r2r/functions/ConcatFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/ConcatFunctionFactory.java @@ -26,20 +26,20 @@ public class ConcatFunctionFactory implements FunctionFactory { ConcatFunction function = null; - + public Function getInstance() { if(function==null) function = new ConcatFunction(); - + return function; } - + private static class ConcatFunction implements Function { - + public String getURI() { return "concat"; } - + public List execute(List> arguments, String hint) { StringBuilder concatString = new StringBuilder(); for(List list: arguments) { @@ -48,6 +48,6 @@ public List execute(List> arguments, String hint) { ArrayList r = new ArrayList(); r.add(concatString.toString()); return r; - } + } } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/DivideFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/DivideFunctionFactory.java index cbc9209..ca5313c 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/DivideFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/DivideFunctionFactory.java @@ -30,11 +30,11 @@ public class DivideFunctionFactory implements FunctionFactory { private DivideFunction function = null; - + public Function getInstance() { if(function==null) function = new DivideFunction(); - + return function; } @@ -43,15 +43,15 @@ private static class DivideFunction implements Function { public String getURI() { return "divide"; } - + public List execute(List> arguments, String hint) { if(arguments.size()<1) throw new IllegalArgumentException("Divide: No arguments supplied!"); - + List result = new ArrayList(); DataType type = HelperFunctions.getDataTypeInformationOfAllArguments(arguments); type = HelperFunctions.takeMostAppropriateDataTypeForDivideLikeCalculations(type, hint); - + boolean first = true; // Check for first argument // returned type is either String for fail, Decimal or Double (conversion happens later in the process) if(type==DataType.String) diff --git a/src/main/java/com/avengerpenguin/r2r/functions/GetByIndexFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/GetByIndexFunctionFactory.java index 11af560..de3661f 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/GetByIndexFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/GetByIndexFunctionFactory.java @@ -25,11 +25,11 @@ public class GetByIndexFunctionFactory implements FunctionFactory { private GetByIndexFunction function = null; - + public Function getInstance() { if(function==null) function = new GetByIndexFunction(); - + return function; } @@ -38,15 +38,15 @@ private static class GetByIndexFunction implements Function { public String getURI() { return "getByIndex"; } - + public List execute(List> arguments, String hint) { List list = new ArrayList(); Integer index = Integer.parseInt(arguments.get(1).get(0)); List argList = arguments.get(0); - + list.add(argList.get(index)); - + return list; - } + } } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/HelperFunctions.java b/src/main/java/com/avengerpenguin/r2r/functions/HelperFunctions.java index 5dc3305..56c83cd 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/HelperFunctions.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/HelperFunctions.java @@ -28,11 +28,11 @@ public class HelperFunctions { private static final Pattern nonDecimal = Pattern.compile("[^\\d+-\\.]"); private static final Pattern nonInteger = Pattern.compile("[^\\d+-]"); private static final Map dtMap = new HashMap(); - + static { // Map to a Java Type that can handle the XSD data type // DataType.Integer is a BigInteger - + dtMap.put("http://www.w3.org/2001/XMLSchema#decimal", DataType.Decimal); dtMap.put("http://www.w3.org/2001/XMLSchema#int", DataType.Int); dtMap.put("http://www.w3.org/2001/XMLSchema#long", DataType.Long); @@ -48,9 +48,9 @@ public class HelperFunctions { dtMap.put("http://www.w3.org/2001/XMLSchema#unsignedByte", DataType.Int); dtMap.put("http://www.w3.org/2001/XMLSchema#unsignedInt", DataType.Long); dtMap.put("http://www.w3.org/2001/XMLSchema#unsignedLong", DataType.Long); - dtMap.put("http://www.w3.org/2001/XMLSchema#unsignedShort", DataType.Int); + dtMap.put("http://www.w3.org/2001/XMLSchema#unsignedShort", DataType.Int); } - + /** * finds out the most general data type of the arguments * @param arguments all arguments of the Function @@ -58,7 +58,7 @@ public class HelperFunctions { */ public static DataType getDataTypeInformationOfAllArguments(List> arguments) { DataType returnType = DataType.Integer; - + for(List argument: arguments) { DataType t = getDataTypeInformationOfArgument(argument); if(t==DataType.String) @@ -70,7 +70,7 @@ else if(returnType!=DataType.Double && t==DataType.Decimal) } return returnType; } - + /** * finds out the most general data type of the arguments * @param arguments the Function arguments @@ -78,7 +78,7 @@ else if(returnType!=DataType.Double && t==DataType.Decimal) */ public static DataType getDataTypeInformationOfArgument(List arguments) { DataType returnType = DataType.Integer; - + for(String argument: arguments) { if(nonNumeric.matcher(argument).find()) return DataType.String; @@ -87,10 +87,10 @@ else if(nonDecimal.matcher(argument).find()) else if(returnType!=DataType.Double && nonInteger.matcher(argument).find()) returnType = DataType.Decimal; } - + return returnType; } - + /** * returns a data type that can handle the requested data type * @param hint the requested data type @@ -99,7 +99,7 @@ else if(returnType!=DataType.Double && nonInteger.matcher(argument).find()) public static DataType getWorkingDataTypeOfDataTypeString(String hint) { return dtMap.get(hint); } - + /** * gets the data type that can handle the values for the given arguments in consideration of the requested data type. * @param found the most general data type of the arguments @@ -110,7 +110,7 @@ public static DataType takeMostAppropriateDataTypeForAddLikeCalculations(DataTyp // Can't calculate with String, return DataType.String and fail if(found==DataType.String) return DataType.String; - + DataType hintDT = getWorkingDataTypeOfDataTypeString(hint); // No known hint given if(hintDT==null) { @@ -119,20 +119,20 @@ public static DataType takeMostAppropriateDataTypeForAddLikeCalculations(DataTyp else// For integral values, use long return DataType.Long; } - // The hint is known. Handling of non-integral types should always be possible, casting to the right type is done later + // The hint is known. Handling of non-integral types should always be possible, casting to the right type is done later else { // Type is integral, no need to compute with Decimal types if(found==DataType.Integer) return hintDT; - // Else take a non-integral data type that can hold the value + // Else take a non-integral data type that can hold the value if(hintDT==DataType.Double || hintDT==DataType.Int)// Ints fit into Doubles return DataType.Double; - else + else // else compute with decimal for bigger data types return DataType.Decimal; } } - + /** * gets the data type that can handle the values for the given arguments in consideration of the requested data type for divide-like calculations. For example: (2 / 3) should be computed as double values. * @param found @@ -145,7 +145,7 @@ public static DataType takeMostAppropriateDataTypeForDivideLikeCalculations(Data // Can't calculate with String, return DataType.String and fail if(found==DataType.String) return DataType.String; - + if(hintDT==null) // Hint not recognized, always calculate as decimal as most universal type return DataType.Decimal; @@ -160,12 +160,12 @@ else if(hintDT==DataType.Long || hintDT==DataType.Integer) return DataType.Double; } } - + public static String convertValueToDataType(String value, String datatype) { // No known data type to convert to, return unconverted value if(dtMap.get(datatype)==null) return value; - + datatype = datatype.substring(33); BigDecimal numericValue = new BigDecimal(value); @@ -177,7 +177,7 @@ else if(datatype.equals("long")) else if(datatype.equals("integer")) return numericValue.toBigInteger().toString(); else if(datatype.equals("byte")) - return "" + numericValue.byteValue(); + return "" + numericValue.byteValue(); else if(datatype.equals("negativeInteger")) return numericValue.toBigInteger().toString(); else if(datatype.equals("nonNegativeInteger")) @@ -196,11 +196,11 @@ else if(datatype.equals("unsignedLong")) return numericValue.toBigInteger().toString(); else if(datatype.equals("unsignedShort")) return numericValue.toBigInteger().toString(); - + // For the rest - float, double, decimal - do nothing, already correct return value; } - + public static DataType pickMoreGeneralDataType(DataType dt1, DataType dt2) { if(dt1==DataType.String || dt2==DataType.String) return DataType.String; @@ -209,7 +209,7 @@ else if(dt1==DataType.Integer && dt2==DataType.Integer) else return DataType.Double; } - + // The data types the calculations are done, Integer is a BigInteger public enum DataType { Int, Long, Integer, Decimal, Double, String diff --git a/src/main/java/com/avengerpenguin/r2r/functions/IdentityFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/IdentityFunctionFactory.java index c7c475e..a3d0797 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/IdentityFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/IdentityFunctionFactory.java @@ -25,22 +25,22 @@ public class IdentityFunctionFactory implements FunctionFactory { private IdentityFunction function = null; - + public Function getInstance() { if(function==null) function = new IdentityFunction(); - + return function; } private static class IdentityFunction implements Function { - + public String getURI() { return "identityFunction"; } - + public List execute(List> arguments, String hint) { return arguments.get(0); - } + } } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/IntegerFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/IntegerFunctionFactory.java index 9752bde..191ab4e 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/IntegerFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/IntegerFunctionFactory.java @@ -28,11 +28,11 @@ public class IntegerFunctionFactory implements FunctionFactory { private IntegerFunction function = null; - + public Function getInstance() { if(function==null) function = new IntegerFunction(); - + return function; } @@ -41,22 +41,22 @@ private static class IntegerFunction implements Function { public String getURI() { return "integer"; } - + public List execute(List> arguments, String hint) { if(arguments.size()<1) throw new IllegalArgumentException("integer(): No arguments supplied!"); - + List arg = arguments.get(0); List result = new ArrayList(); DataType type = HelperFunctions.getDataTypeInformationOfArgument(arg); - + if(type==DataType.String) throw new IllegalArgumentException("Non-numerical argument for integer-function"); else { BigInteger integerResult = new BigDecimal(arg.get(0)).toBigInteger(); result.add(integerResult.toString()); } - + return result; } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/IterateRegexToListFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/IterateRegexToListFunctionFactory.java index 5186f85..0a7539e 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/IterateRegexToListFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/IterateRegexToListFunctionFactory.java @@ -27,11 +27,11 @@ public class IterateRegexToListFunctionFactory implements FunctionFactory { private IterateRegexToListFunction function = null; - + public Function getInstance() { if(function==null) function = new IterateRegexToListFunction(); - + return function; } @@ -40,20 +40,20 @@ private static class IterateRegexToListFunction implements Function { public String getURI() { return "IterateRegexToList"; } - + public List execute(List> arguments, String hint) { if(arguments.size()!=2) throw new IllegalArgumentException("itRegexToList(): Not enough arguments supplied!"); - + String regex = arguments.get(0).get(0); String workString = arguments.get(1).get(0); List result = new ArrayList(); - + Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(workString); - + int groupCount = matcher.groupCount(); - + while(matcher.find()) { for(int i=1; i<=groupCount; i++) { result.add(matcher.group(i)); diff --git a/src/main/java/com/avengerpenguin/r2r/functions/JoinFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/JoinFunctionFactory.java index ec66b30..918ebc1 100755 --- a/src/main/java/com/avengerpenguin/r2r/functions/JoinFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/JoinFunctionFactory.java @@ -27,11 +27,11 @@ public class JoinFunctionFactory implements FunctionFactory { private JoinFunction function = null; - + public Function getInstance() { if(function==null) function = new JoinFunction(); - + return function; } @@ -40,7 +40,7 @@ private static class JoinFunction implements Function { public String getURI() { return "infixConcat"; } - + public List execute(List> arguments, String hint) { StringBuilder concatString = new StringBuilder(); String infix = arguments.get(0).get(0); @@ -52,6 +52,6 @@ public List execute(List> arguments, String hint) { ArrayList r = new ArrayList(); r.add(concatString.toString()); return r; - } + } } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/LengthFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/LengthFunctionFactory.java index 8d904b0..300c3f2 100755 --- a/src/main/java/com/avengerpenguin/r2r/functions/LengthFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/LengthFunctionFactory.java @@ -25,11 +25,11 @@ public class LengthFunctionFactory implements FunctionFactory { private Function function = null; - + public Function getInstance() { if(function==null) function = new LengthFunction(); - + return function; } @@ -38,15 +38,15 @@ private static class LengthFunction implements Function { public String getURI() { return "length"; } - + public List execute(List> arguments, String hint) { if(arguments.size()<1) throw new IllegalArgumentException("length(): No argument supplied!"); - + List arg = arguments.get(0); List result = new ArrayList(); result.add("" + arg.size()); - + return result; } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/ListConcatFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/ListConcatFunctionFactory.java index b216aee..e11710e 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/ListConcatFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/ListConcatFunctionFactory.java @@ -25,11 +25,11 @@ public class ListConcatFunctionFactory implements FunctionFactory { private ListConcatFunction function = null; - + public Function getInstance() { if(function==null) function = new ListConcatFunction(); - + return function; } @@ -38,14 +38,14 @@ private class ListConcatFunction implements Function { public String getURI() { return "listConcat"; } - + public List execute(List> arguments, String hint) { List resultList = new ArrayList(); - + for(List argumentlist: arguments) { resultList.addAll(argumentlist); } return resultList; - } + } } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/ListFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/ListFunctionFactory.java index dd970c5..f27faf9 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/ListFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/ListFunctionFactory.java @@ -27,11 +27,11 @@ public class ListFunctionFactory implements FunctionFactory { private ListFunction function = null; - + public Function getInstance() { if(function==null) function = new ListFunction(); - + return function; } @@ -40,16 +40,16 @@ private class ListFunction implements Function { public String getURI() { return "list"; } - + public List execute(List> arguments, String hint) { List list = new ArrayList(); - + for(List argumentlist: arguments) { for(String argument: argumentlist) { list.add(argument); } } return list; - } + } } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/ListJoinFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/ListJoinFunctionFactory.java index f04a48a..3da5da9 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/ListJoinFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/ListJoinFunctionFactory.java @@ -27,11 +27,11 @@ public class ListJoinFunctionFactory implements FunctionFactory { private ListJoinFunction function = null; - + public Function getInstance() { if(function==null) function = new ListJoinFunction(); - + return function; } @@ -40,7 +40,7 @@ private class ListJoinFunction implements Function { public String getURI() { return "infixListConcat"; } - + public List execute(List> arguments, String hint) { StringBuilder concatString = new StringBuilder(); String infix = arguments.get(0).get(0); @@ -55,6 +55,6 @@ public List execute(List> arguments, String hint) { ArrayList r = new ArrayList(); r.add(concatString.toString()); return r; - } + } } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/ModuloFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/ModuloFunctionFactory.java index b8d88c6..3498c90 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/ModuloFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/ModuloFunctionFactory.java @@ -28,11 +28,11 @@ public class ModuloFunctionFactory implements FunctionFactory { private ModuloFunction function = null; - + public Function getInstance() { if(function==null) function = new ModuloFunction(); - + return function; } @@ -41,17 +41,17 @@ private class ModuloFunction implements Function { public String getURI() { return "mod"; } - + public List execute(List> arguments, String hint) { if(arguments.size()!=2) throw new IllegalArgumentException("Modulo: Illegal number of arguments supplied!"); - + String arg1 = arguments.get(0).get(0); String arg2 = arguments.get(1).get(0); List result = new ArrayList(); DataType type = HelperFunctions.getDataTypeInformationOfAllArguments(arguments); type = HelperFunctions.takeMostAppropriateDataTypeForAddLikeCalculations(type, hint); - + if(type==DataType.String) throw new IllegalArgumentException("Non-numerical argument for modulo-function"); if(type==DataType.Int) { diff --git a/src/main/java/com/avengerpenguin/r2r/functions/MultiplyFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/MultiplyFunctionFactory.java index 29d13e8..dcb6ee4 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/MultiplyFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/MultiplyFunctionFactory.java @@ -29,11 +29,11 @@ public class MultiplyFunctionFactory implements FunctionFactory { private MultiplyFunction function = null; - + public Function getInstance() { if(function==null) function = new MultiplyFunction(); - + return function; } @@ -42,12 +42,12 @@ private static class MultiplyFunction implements Function { public String getURI() { return "multiply"; } - + public List execute(List> arguments, String hint) { List result = new ArrayList(); DataType type = HelperFunctions.getDataTypeInformationOfAllArguments(arguments); type = HelperFunctions.takeMostAppropriateDataTypeForAddLikeCalculations(type, hint); - + if(type==DataType.String) throw new IllegalArgumentException("Non-numerical argument for multiply-function"); else if(type==DataType.Integer) { diff --git a/src/main/java/com/avengerpenguin/r2r/functions/NegateFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/NegateFunctionFactory.java index 6b07421..bf7e1d6 100755 --- a/src/main/java/com/avengerpenguin/r2r/functions/NegateFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/NegateFunctionFactory.java @@ -29,11 +29,11 @@ public class NegateFunctionFactory implements FunctionFactory { private NegateFunction function = null; - + public Function getInstance() { if(function==null) function = new NegateFunction(); - + return function; } @@ -42,19 +42,19 @@ private class NegateFunction implements Function { public String getURI() { return "negate"; } - + public List execute(List> arguments, String hint) { List result = new ArrayList(); if(arguments.size()<1) throw new IllegalArgumentException("Not enough arguments!"); - + List argument = arguments.get(0); - + if(argument.size()<1) throw new IllegalArgumentException("Not enough arguments!"); - + DataType type = HelperFunctions.getDataTypeInformationOfArgument(argument); - + if(type==DataType.String) throw new IllegalArgumentException("Non-numerical argument for negate-function!"); if(type==DataType.Integer) { diff --git a/src/main/java/com/avengerpenguin/r2r/functions/ReplaceAllFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/ReplaceAllFunctionFactory.java index c11e6b0..80709c3 100755 --- a/src/main/java/com/avengerpenguin/r2r/functions/ReplaceAllFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/ReplaceAllFunctionFactory.java @@ -25,20 +25,20 @@ public class ReplaceAllFunctionFactory implements FunctionFactory { ReplaceAllFunction function = null; - + public Function getInstance() { if(function==null) function = new ReplaceAllFunction(); - + return function; } - + private static class ReplaceAllFunction implements Function { - + public String getURI() { return "replaceAll"; } - + public List execute(List> arguments, String hint) { if(arguments.size()<3 || arguments.get(0).size()<1 || arguments.get(1).size()<1 || arguments.get(2).size()<1) throw new IllegalArgumentException("replaceAll: Not enough arguments supplied!"); @@ -52,6 +52,6 @@ public List execute(List> arguments, String hint) { ArrayList r = new ArrayList(); r.add(outputString); return r; - } + } } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/SplitFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/SplitFunctionFactory.java index efc13df..e56abe3 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/SplitFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/SplitFunctionFactory.java @@ -26,11 +26,11 @@ public class SplitFunctionFactory implements FunctionFactory { private SplitFunction function = null; - + public Function getInstance() { if(function==null) function = new SplitFunction(); - + return function; } @@ -39,7 +39,7 @@ private class SplitFunction implements Function { public String getURI() { return "split"; } - + public List execute(List> arguments, String hint) { List resultList = new ArrayList(); String splitRegEx = arguments.get(0).get(0); @@ -49,6 +49,6 @@ public List execute(List> arguments, String hint) { resultList.add(split); } return resultList; - } + } } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/SubListByIndexFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/SubListByIndexFunctionFactory.java index c83c056..3bed34a 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/SubListByIndexFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/SubListByIndexFunctionFactory.java @@ -25,11 +25,11 @@ public class SubListByIndexFunctionFactory implements FunctionFactory { private SubListByIndexFunction function = null; - + public Function getInstance() { if(function==null) function = new SubListByIndexFunction(); - + return function; } @@ -38,16 +38,16 @@ private class SubListByIndexFunction implements Function { public String getURI() { return "subListByIndex"; } - + public List execute(List> arguments, String hint) { List resultList = new ArrayList(); List list = arguments.get(0); - + for(int i=1; i execute(List> arguments, String hint) { int from = Integer.parseInt(arguments.get(1).get(0)); int to = Integer.parseInt(arguments.get(2).get(0)); return arguments.get(0).subList(from, to); - } + } } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/SubtractFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/SubtractFunctionFactory.java index 309dc94..6f3ac5f 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/SubtractFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/SubtractFunctionFactory.java @@ -30,11 +30,11 @@ public class SubtractFunctionFactory implements FunctionFactory { private SubtractFunction function = null; - + public Function getInstance() { if(function==null) function = new SubtractFunction(); - + return function; } @@ -43,15 +43,15 @@ private static class SubtractFunction implements Function { public String getURI() { return "subtract"; } - + public List execute(List> arguments, String hint) { if(arguments.size()<1) throw new IllegalArgumentException("Not enough arguments!"); - + List result = new ArrayList(); DataType type = HelperFunctions.getDataTypeInformationOfAllArguments(arguments); type = HelperFunctions.takeMostAppropriateDataTypeForAddLikeCalculations(type, hint); - + boolean first = true;// check for the first argument if(type==DataType.String) throw new IllegalArgumentException("Non-numerical argument for subtract-function"); @@ -105,7 +105,7 @@ public List execute(List> arguments, String hint) { doubleResult -= Double.parseDouble(argument.get(0)); result.add(doubleResult.toString()); } - + return result; } } diff --git a/src/main/java/com/avengerpenguin/r2r/functions/package.html b/src/main/java/com/avengerpenguin/r2r/functions/package.html index f6e4587..cbccec2 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/package.html +++ b/src/main/java/com/avengerpenguin/r2r/functions/package.html @@ -1,2 +1,11 @@ -com.avengerpenguin.r2r.functions packageProvides implementations of functions that can be used in value transformations. \ No newline at end of file + + + + com.avengerpenguin.r2r.functions package + + + Provides implementations of functions that can be used in value + transformations. + + diff --git a/src/main/java/com/avengerpenguin/r2r/functions/xpath/XPathFunctionFactory.java b/src/main/java/com/avengerpenguin/r2r/functions/xpath/XPathFunctionFactory.java index e3f8f9e..e6ea5e0 100644 --- a/src/main/java/com/avengerpenguin/r2r/functions/xpath/XPathFunctionFactory.java +++ b/src/main/java/com/avengerpenguin/r2r/functions/xpath/XPathFunctionFactory.java @@ -45,7 +45,7 @@ public class XPathFunctionFactory extends MultiFunctionFactory { private static final String XPATH_PREFIX = "xpath:"; - + private static Logger log = LoggerFactory .getLogger(XPathFunctionFactory.class); @@ -555,9 +555,9 @@ public List execute(List> arguments, String hint) { /** * Tests for pattern matching. Attention! Unlike in the XPath doc, this one * is using Java regex for convenience purposes. - * + * * @author maggi - * + * */ protected static class MatchesFunction implements Function { diff --git a/src/main/java/com/avengerpenguin/r2r/package.html b/src/main/java/com/avengerpenguin/r2r/package.html index 50d6191..7d95373 100644 --- a/src/main/java/com/avengerpenguin/r2r/package.html +++ b/src/main/java/com/avengerpenguin/r2r/package.html @@ -1,4 +1,11 @@ -com.avengerpenguin.r2r packageProvides -Classes and Interfaces for handling mappings, repositories, vocabulary -target definitions and source and output of the mapping process. \ No newline at end of file + + + + com.avengerpenguin.r2r package + + + Provides Classes and Interfaces for handling mappings, repositories, + vocabulary target definitions and source and output of the mapping process. + + diff --git a/src/main/java/com/avengerpenguin/r2r/parser/MiniParsers.java b/src/main/java/com/avengerpenguin/r2r/parser/MiniParsers.java index c12cfdb..3c715a1 100755 --- a/src/main/java/com/avengerpenguin/r2r/parser/MiniParsers.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/MiniParsers.java @@ -56,7 +56,7 @@ private static String[] parsePrefixDefinition(String prefixDef) { data[1] = prefixDef.substring(startIndex+1, stopIndex); return data; } - + /** * parses a prefix definition string, containing several prefix definitions * @param prefixDefs a String with zero or more prefix definitions @@ -77,7 +77,7 @@ public static Map parsePrefixDefinitions(String prefixDefs) { } return prefixes; } - + public static Collection parsePlainTextVocabularyDefinition(String vocabDef) { CharStream stream = new ANTLRStringStream(vocabDef); TargetVocabularyLexer lexer = new TargetVocabularyLexer(stream); @@ -92,12 +92,12 @@ public static Collection parsePlainTextVocabularyDefinition(St } return tvs; } - + public static Collection parseRDFVocabularyDefinition(Model vocabDefModel) { Collection vocabDefs = new ArrayList(); HashSet classRestrictions = new HashSet(); HashSet classRestrictionsToMap = new HashSet(); - + // Get class restrictions String query = "Select ?cr where { ?s <" + R2R.classRestriction + "> ?cr }"; QueryExecution qe = QueryExecutionFactory.create(query, vocabDefModel); @@ -105,9 +105,9 @@ public static Collection parseRDFVocabularyDefinition(Model vo while(rs.hasNext()) classRestrictions.add(rs.next().get("cr").toString()); - + qe.close(); - + // Get class restrictions that should also be mapped query = "Select ?cr where { ?s <" + R2R.classRestrictionAndTarget + "> ?cr }"; rs = QueryExecutionFactory.create(query, vocabDefModel).execSelect(); @@ -116,14 +116,14 @@ public static Collection parseRDFVocabularyDefinition(Model vo classRestrictions.add(cr); classRestrictionsToMap.add(cr); } - + // Get target entities query = "Select ?entity where { ?s <" + R2R.targetProperty + "> ?entity }"; rs = QueryExecutionFactory.create(query, vocabDefModel).execSelect(); Collection entities = new HashSet(); while(rs.hasNext()) entities.add(rs.next().get("entity").toString()); - + if(classRestrictions.size()==0) vocabDefs.add(new TargetVocabulary(null, entities, false)); else { @@ -132,7 +132,7 @@ public static Collection parseRDFVocabularyDefinition(Model vo vocabDefs.add(new TargetVocabulary(classRestriction, entities, addMappingForCR)); } } - + return vocabDefs; } } diff --git a/src/main/java/com/avengerpenguin/r2r/parser/ParseException.java b/src/main/java/com/avengerpenguin/r2r/parser/ParseException.java index ec9bb60..1dce110 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/ParseException.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/ParseException.java @@ -27,5 +27,5 @@ public ParseException(String message, Throwable cause) { public ParseException(String message) { super(message); } - + } diff --git a/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternLexer.java b/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternLexer.java index cd301f1..e28f242 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternLexer.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternLexer.java @@ -129,14 +129,14 @@ public class SourcePatternLexer extends Lexer { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } @@ -144,7 +144,7 @@ public void reportError(RecognitionException re) { // delegates // delegators - public SourcePatternLexer() {;} + public SourcePatternLexer() {;} public SourcePatternLexer(CharStream input) { this(input, new RecognizerSharedState()); } @@ -162,7 +162,7 @@ public final void mT__78() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:26:7: ( '.' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:26:9: '.' { - match('.'); + match('.'); } @@ -182,7 +182,7 @@ public final void mT__79() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:27:7: ( '{' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:27:9: '{' { - match('{'); + match('{'); } @@ -202,7 +202,7 @@ public final void mT__80() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:28:7: ( '}' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:28:9: '}' { - match('}'); + match('}'); } @@ -222,7 +222,7 @@ public final void mT__81() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:29:7: ( '(' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:29:9: '(' { - match('('); + match('('); } @@ -242,7 +242,7 @@ public final void mT__82() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:30:7: ( ',' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:30:9: ',' { - match(','); + match(','); } @@ -262,7 +262,7 @@ public final void mT__83() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:31:7: ( ')' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:31:9: ')' { - match(')'); + match(')'); } @@ -282,7 +282,7 @@ public final void mT__84() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:32:7: ( ';' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:32:9: ';' { - match(';'); + match(';'); } @@ -302,7 +302,7 @@ public final void mT__85() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:33:7: ( 'a' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:33:9: 'a' { - match('a'); + match('a'); } @@ -322,7 +322,7 @@ public final void mT__86() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:34:7: ( '[' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:34:9: '[' { - match('['); + match('['); } @@ -342,7 +342,7 @@ public final void mT__87() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:35:7: ( ']' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:35:9: ']' { - match(']'); + match(']'); } @@ -362,7 +362,7 @@ public final void mT__88() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:36:7: ( '||' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:36:9: '||' { - match("||"); + match("||"); } @@ -383,7 +383,7 @@ public final void mT__89() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:37:7: ( '&&' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:37:9: '&&' { - match("&&"); + match("&&"); } @@ -404,7 +404,7 @@ public final void mT__90() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:38:7: ( '=' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:38:9: '=' { - match('='); + match('='); } @@ -424,7 +424,7 @@ public final void mT__91() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:39:7: ( '!=' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:39:9: '!=' { - match("!="); + match("!="); } @@ -445,7 +445,7 @@ public final void mT__92() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:40:7: ( '<' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:40:9: '<' { - match('<'); + match('<'); } @@ -465,7 +465,7 @@ public final void mT__93() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:41:7: ( '>' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:41:9: '>' { - match('>'); + match('>'); } @@ -485,7 +485,7 @@ public final void mT__94() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:42:7: ( '<=' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:42:9: '<=' { - match("<="); + match("<="); } @@ -506,7 +506,7 @@ public final void mT__95() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:43:7: ( '>=' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:43:9: '>=' { - match(">="); + match(">="); } @@ -527,7 +527,7 @@ public final void mT__96() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:44:7: ( '+' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:44:9: '+' { - match('+'); + match('+'); } @@ -547,7 +547,7 @@ public final void mT__97() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:45:7: ( '-' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:45:9: '-' { - match('-'); + match('-'); } @@ -567,7 +567,7 @@ public final void mT__98() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:46:7: ( '*' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:46:9: '*' { - match('*'); + match('*'); } @@ -587,7 +587,7 @@ public final void mT__99() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:47:7: ( '/' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:47:9: '/' { - match('/'); + match('/'); } @@ -607,7 +607,7 @@ public final void mT__100() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:48:8: ( '!' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:48:10: '!' { - match('!'); + match('!'); } @@ -627,7 +627,7 @@ public final void mT__101() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:49:8: ( '^^' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:49:10: '^^' { - match("^^"); + match("^^"); } @@ -648,11 +648,11 @@ public final void mGRAPH() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:388:7: ( G R A P H ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:388:9: G R A P H { - mG(); - mR(); - mA(); - mP(); - mH(); + mG(); + mR(); + mA(); + mP(); + mH(); } @@ -672,9 +672,9 @@ public final void mSTR() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:389:5: ( S T R ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:389:7: S T R { - mS(); - mT(); - mR(); + mS(); + mT(); + mR(); } @@ -694,11 +694,11 @@ public final void mISURI() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:390:7: ( I S U R I ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:390:9: I S U R I { - mI(); - mS(); - mU(); - mR(); - mI(); + mI(); + mS(); + mU(); + mR(); + mI(); } @@ -718,14 +718,14 @@ public final void mOPTIONAL() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:391:10: ( O P T I O N A L ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:391:12: O P T I O N A L { - mO(); - mP(); - mT(); - mI(); - mO(); - mN(); - mA(); - mL(); + mO(); + mP(); + mT(); + mI(); + mO(); + mN(); + mA(); + mL(); } @@ -745,10 +745,10 @@ public final void mLANG() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:392:6: ( L A N G ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:392:8: L A N G { - mL(); - mA(); - mN(); - mG(); + mL(); + mA(); + mN(); + mG(); } @@ -768,11 +768,11 @@ public final void mISIRI() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:393:7: ( I S I R I ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:393:9: I S I R I { - mI(); - mS(); - mI(); - mR(); - mI(); + mI(); + mS(); + mI(); + mR(); + mI(); } @@ -792,11 +792,11 @@ public final void mUNION() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:394:7: ( U N I O N ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:394:9: U N I O N { - mU(); - mN(); - mI(); - mO(); - mN(); + mU(); + mN(); + mI(); + mO(); + mN(); } @@ -816,17 +816,17 @@ public final void mLANGMATCHES() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:395:13: ( L A N G M A T C H E S ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:395:15: L A N G M A T C H E S { - mL(); - mA(); - mN(); - mG(); - mM(); - mA(); - mT(); - mC(); - mH(); - mE(); - mS(); + mL(); + mA(); + mN(); + mG(); + mM(); + mA(); + mT(); + mC(); + mH(); + mE(); + mS(); } @@ -846,15 +846,15 @@ public final void mISLITERAL() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:396:11: ( I S L I T E R A L ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:396:13: I S L I T E R A L { - mI(); - mS(); - mL(); - mI(); - mT(); - mE(); - mR(); - mA(); - mL(); + mI(); + mS(); + mL(); + mI(); + mT(); + mE(); + mR(); + mA(); + mL(); } @@ -874,13 +874,13 @@ public final void mISBLANK() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:397:9: ( I S B L A N K ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:397:11: I S B L A N K { - mI(); - mS(); - mB(); - mL(); - mA(); - mN(); - mK(); + mI(); + mS(); + mB(); + mL(); + mA(); + mN(); + mK(); } @@ -900,11 +900,11 @@ public final void mBOUND() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:398:7: ( B O U N D ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:398:9: B O U N D { - mB(); - mO(); - mU(); - mN(); - mD(); + mB(); + mO(); + mU(); + mN(); + mD(); } @@ -924,12 +924,12 @@ public final void mFILTER() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:399:8: ( F I L T E R ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:399:10: F I L T E R { - mF(); - mI(); - mL(); - mT(); - mE(); - mR(); + mF(); + mI(); + mL(); + mT(); + mE(); + mR(); } @@ -949,14 +949,14 @@ public final void mDATATYPE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:400:10: ( D A T A T Y P E ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:400:12: D A T A T Y P E { - mD(); - mA(); - mT(); - mA(); - mT(); - mY(); - mP(); - mE(); + mD(); + mA(); + mT(); + mA(); + mT(); + mY(); + mP(); + mE(); } @@ -976,11 +976,11 @@ public final void mREGEX() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:401:7: ( R E G E X ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:401:9: R E G E X { - mR(); - mE(); - mG(); - mE(); - mX(); + mR(); + mE(); + mG(); + mE(); + mX(); } @@ -1000,10 +1000,10 @@ public final void mTRUE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:402:6: ( T R U E ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:402:8: T R U E { - mT(); - mR(); - mU(); - mE(); + mT(); + mR(); + mU(); + mE(); } @@ -1023,14 +1023,14 @@ public final void mSAMETERM() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:403:10: ( S A M E T E R M ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:403:12: S A M E T E R M { - mS(); - mA(); - mM(); - mE(); - mT(); - mE(); - mR(); - mM(); + mS(); + mA(); + mM(); + mE(); + mT(); + mE(); + mR(); + mM(); } @@ -1050,11 +1050,11 @@ public final void mFALSE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:404:7: ( F A L S E ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:404:9: F A L S E { - mF(); - mA(); - mL(); - mS(); - mE(); + mF(); + mA(); + mL(); + mS(); + mE(); } @@ -1698,7 +1698,7 @@ public final void mIRI_REF() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:437:3: ( '<' (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* '>' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:437:5: '<' (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* '>' { - match('<'); + match('<'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:437:9: (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* loop1: do { @@ -1732,7 +1732,7 @@ public final void mIRI_REF() throws RecognitionException { } } while (true); - match('>'); + match('>'); } @@ -1763,14 +1763,14 @@ public final void mPNAME_NS() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:441:5: PN_PREFIX { - mPN_PREFIX(); + mPN_PREFIX(); } break; } - match(':'); + match(':'); } @@ -1790,8 +1790,8 @@ public final void mPNAME_LN() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:445:3: ( PNAME_NS PN_LOCAL ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:445:5: PNAME_NS PN_LOCAL { - mPNAME_NS(); - mPN_LOCAL(); + mPNAME_NS(); + mPN_LOCAL(); } @@ -1811,9 +1811,9 @@ public final void mBLANK_NODE_LABEL() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:449:3: ( '_:' PN_LOCAL ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:449:5: '_:' PN_LOCAL { - match("_:"); + match("_:"); - mPN_LOCAL(); + mPN_LOCAL(); } @@ -1833,8 +1833,8 @@ public final void mVAR1() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:453:3: ( '?' VARNAME ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:453:5: '?' VARNAME { - match('?'); - mVARNAME(); + match('?'); + mVARNAME(); } @@ -1854,8 +1854,8 @@ public final void mVAR2() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:457:3: ( '$' VARNAME ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:457:5: '$' VARNAME { - match('$'); - mVARNAME(); + match('$'); + mVARNAME(); } @@ -1875,7 +1875,7 @@ public final void mLANGTAG() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:461:3: ( '@' ( 'a' .. 'z' | 'A' .. 'Z' )+ ( '-' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ )* ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:461:5: '@' ( 'a' .. 'z' | 'A' .. 'Z' )+ ( '-' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ )* { - match('@'); + match('@'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:461:9: ( 'a' .. 'z' | 'A' .. 'Z' )+ int cnt3=0; loop3: @@ -1929,7 +1929,7 @@ public final void mLANGTAG() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:461:33: '-' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ { - match('-'); + match('-'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:461:37: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ int cnt4=0; loop4: @@ -2012,7 +2012,7 @@ public final void mINTEGER() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:465:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2078,7 +2078,7 @@ else if ( (LA10_0=='.') ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:469:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2092,7 +2092,7 @@ else if ( (LA10_0=='.') ) { cnt7++; } while (true); - match('.'); + match('.'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:469:21: ( '0' .. '9' )* loop8: do { @@ -2108,7 +2108,7 @@ else if ( (LA10_0=='.') ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:469:22: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2124,7 +2124,7 @@ else if ( (LA10_0=='.') ) { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:469:35: '.' ( '0' .. '9' )+ { - match('.'); + match('.'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:469:39: ( '0' .. '9' )+ int cnt9=0; loop9: @@ -2141,7 +2141,7 @@ else if ( (LA10_0=='.') ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:469:40: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2196,7 +2196,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:473:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2210,7 +2210,7 @@ public final void mDOUBLE() throws RecognitionException { cnt11++; } while (true); - match('.'); + match('.'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:473:21: ( '0' .. '9' )* loop12: do { @@ -2226,7 +2226,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:473:22: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2236,14 +2236,14 @@ public final void mDOUBLE() throws RecognitionException { } } while (true); - mEXPONENT(); + mEXPONENT(); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:474:5: '.' ( '0' .. '9' )+ EXPONENT { - match('.'); + match('.'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:474:9: ( '0' .. '9' )+ int cnt13=0; loop13: @@ -2260,7 +2260,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:474:10: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2274,7 +2274,7 @@ public final void mDOUBLE() throws RecognitionException { cnt13++; } while (true); - mEXPONENT(); + mEXPONENT(); } break; @@ -2297,7 +2297,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:475:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2311,7 +2311,7 @@ public final void mDOUBLE() throws RecognitionException { cnt14++; } while (true); - mEXPONENT(); + mEXPONENT(); } break; @@ -2333,8 +2333,8 @@ public final void mINTEGER_POSITIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:479:3: ( '+' INTEGER ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:479:5: '+' INTEGER { - match('+'); - mINTEGER(); + match('+'); + mINTEGER(); } @@ -2354,8 +2354,8 @@ public final void mDECIMAL_POSITIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:483:3: ( '+' DECIMAL ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:483:5: '+' DECIMAL { - match('+'); - mDECIMAL(); + match('+'); + mDECIMAL(); } @@ -2375,8 +2375,8 @@ public final void mDOUBLE_POSITIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:487:3: ( '+' DOUBLE ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:487:5: '+' DOUBLE { - match('+'); - mDOUBLE(); + match('+'); + mDOUBLE(); } @@ -2396,8 +2396,8 @@ public final void mINTEGER_NEGATIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:491:3: ( '-' INTEGER ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:491:5: '-' INTEGER { - match('-'); - mINTEGER(); + match('-'); + mINTEGER(); } @@ -2417,8 +2417,8 @@ public final void mDECIMAL_NEGATIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:495:3: ( '-' DECIMAL ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:495:5: '-' DECIMAL { - match('-'); - mDECIMAL(); + match('-'); + mDECIMAL(); } @@ -2438,8 +2438,8 @@ public final void mDOUBLE_NEGATIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:499:3: ( '-' DOUBLE ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:499:5: '-' DOUBLE { - match('-'); - mDOUBLE(); + match('-'); + mDOUBLE(); } @@ -2510,7 +2510,7 @@ public final void mEXPONENT() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:503:31: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2543,7 +2543,7 @@ public final void mSTRING_LITERAL1() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:507:3: ( '\\'' (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\\'' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:507:5: '\\'' (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\\'' { - match('\''); + match('\''); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:507:10: (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* loop18: do { @@ -2577,7 +2577,7 @@ else if ( (LA18_0=='\\') ) { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:507:58: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -2587,7 +2587,7 @@ else if ( (LA18_0=='\\') ) { } } while (true); - match('\''); + match('\''); } @@ -2607,7 +2607,7 @@ public final void mSTRING_LITERAL2() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:511:3: ( '\"' (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\"' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:511:5: '\"' (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\"' { - match('\"'); + match('\"'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:511:9: (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* loop19: do { @@ -2641,7 +2641,7 @@ else if ( (LA19_0=='\\') ) { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:511:57: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -2651,7 +2651,7 @@ else if ( (LA19_0=='\\') ) { } } while (true); - match('\"'); + match('\"'); } @@ -2671,7 +2671,7 @@ public final void mSTRING_LITERAL_LONG1() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:515:3: ( '\\'\\'\\'' ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* '\\'\\'\\'' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:515:5: '\\'\\'\\'' ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* '\\'\\'\\'' { - match("'''"); + match("'''"); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:515:14: ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* loop22: @@ -2724,14 +2724,14 @@ else if ( ((LA20_1>='\u0000' && LA20_1<='&')||(LA20_1>='(' && LA20_1<='\uFFFF')) case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:515:17: '\\'' { - match('\''); + match('\''); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:515:24: '\\'\\'' { - match("''"); + match("''"); } @@ -2774,7 +2774,7 @@ else if ( (LA21_0=='\\') ) { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:515:51: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -2790,7 +2790,7 @@ else if ( (LA21_0=='\\') ) { } } while (true); - match("'''"); + match("'''"); } @@ -2811,7 +2811,7 @@ public final void mSTRING_LITERAL_LONG2() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:519:3: ( '\"\"\"' ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* '\"\"\"' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:519:5: '\"\"\"' ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* '\"\"\"' { - match("\"\"\""); + match("\"\"\""); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:519:11: ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* loop25: @@ -2864,14 +2864,14 @@ else if ( ((LA23_1>='\u0000' && LA23_1<='!')||(LA23_1>='#' && LA23_1<='\uFFFF')) case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:519:14: '\"' { - match('\"'); + match('\"'); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:519:20: '\"\"' { - match("\"\""); + match("\"\""); } @@ -2914,7 +2914,7 @@ else if ( (LA24_0=='\\') ) { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:519:44: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -2930,7 +2930,7 @@ else if ( (LA24_0=='\\') ) { } } while (true); - match("\"\"\""); + match("\"\"\""); } @@ -2951,7 +2951,7 @@ public final void mECHAR() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:523:3: ( '\\\\' ( 't' | 'b' | 'n' | 'r' | 'f' | '\\\\' | '\"' | '\\'' ) ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:523:5: '\\\\' ( 't' | 'b' | 'n' | 'r' | 'f' | '\\\\' | '\"' | '\\'' ) { - match('\\'); + match('\\'); if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) { input.consume(); @@ -3118,7 +3118,7 @@ public final void mPN_PREFIX() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:557:3: ( PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:557:5: PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? { - mPN_CHARS_BASE(); + mPN_CHARS_BASE(); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:557:19: ( ( PN_CHARS | '.' )* PN_CHARS )? int alt28=2; int LA28_0 = input.LA(1); @@ -3172,7 +3172,7 @@ else if ( (LA27_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -3282,7 +3282,7 @@ else if ( (LA29_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -3330,7 +3330,7 @@ public final void mCOMMENT() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:574:9: ( '#' ( . )* ( '\\n' | '\\r' ) ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:574:11: '#' ( . )* ( '\\n' | '\\r' ) { - match('#'); + match('#'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:574:15: ( . )* loop31: do { @@ -3349,7 +3349,7 @@ else if ( ((LA31_0>='\u0000' && LA31_0<='\t')||(LA31_0>='\u000B' && LA31_0<='\f' case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:574:15: . { - matchAny(); + matchAny(); } break; @@ -3388,469 +3388,469 @@ public void mTokens() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:10: T__78 { - mT__78(); + mT__78(); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:16: T__79 { - mT__79(); + mT__79(); } break; case 3 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:22: T__80 { - mT__80(); + mT__80(); } break; case 4 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:28: T__81 { - mT__81(); + mT__81(); } break; case 5 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:34: T__82 { - mT__82(); + mT__82(); } break; case 6 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:40: T__83 { - mT__83(); + mT__83(); } break; case 7 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:46: T__84 { - mT__84(); + mT__84(); } break; case 8 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:52: T__85 { - mT__85(); + mT__85(); } break; case 9 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:58: T__86 { - mT__86(); + mT__86(); } break; case 10 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:64: T__87 { - mT__87(); + mT__87(); } break; case 11 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:70: T__88 { - mT__88(); + mT__88(); } break; case 12 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:76: T__89 { - mT__89(); + mT__89(); } break; case 13 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:82: T__90 { - mT__90(); + mT__90(); } break; case 14 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:88: T__91 { - mT__91(); + mT__91(); } break; case 15 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:94: T__92 { - mT__92(); + mT__92(); } break; case 16 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:100: T__93 { - mT__93(); + mT__93(); } break; case 17 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:106: T__94 { - mT__94(); + mT__94(); } break; case 18 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:112: T__95 { - mT__95(); + mT__95(); } break; case 19 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:118: T__96 { - mT__96(); + mT__96(); } break; case 20 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:124: T__97 { - mT__97(); + mT__97(); } break; case 21 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:130: T__98 { - mT__98(); + mT__98(); } break; case 22 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:136: T__99 { - mT__99(); + mT__99(); } break; case 23 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:142: T__100 { - mT__100(); + mT__100(); } break; case 24 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:149: T__101 { - mT__101(); + mT__101(); } break; case 25 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:156: GRAPH { - mGRAPH(); + mGRAPH(); } break; case 26 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:162: STR { - mSTR(); + mSTR(); } break; case 27 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:166: ISURI { - mISURI(); + mISURI(); } break; case 28 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:172: OPTIONAL { - mOPTIONAL(); + mOPTIONAL(); } break; case 29 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:181: LANG { - mLANG(); + mLANG(); } break; case 30 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:186: ISIRI { - mISIRI(); + mISIRI(); } break; case 31 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:192: UNION { - mUNION(); + mUNION(); } break; case 32 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:198: LANGMATCHES { - mLANGMATCHES(); + mLANGMATCHES(); } break; case 33 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:210: ISLITERAL { - mISLITERAL(); + mISLITERAL(); } break; case 34 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:220: ISBLANK { - mISBLANK(); + mISBLANK(); } break; case 35 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:228: BOUND { - mBOUND(); + mBOUND(); } break; case 36 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:234: FILTER { - mFILTER(); + mFILTER(); } break; case 37 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:241: DATATYPE { - mDATATYPE(); + mDATATYPE(); } break; case 38 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:250: REGEX { - mREGEX(); + mREGEX(); } break; case 39 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:256: TRUE { - mTRUE(); + mTRUE(); } break; case 40 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:261: SAMETERM { - mSAMETERM(); + mSAMETERM(); } break; case 41 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:270: FALSE { - mFALSE(); + mFALSE(); } break; case 42 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:276: IRI_REF { - mIRI_REF(); + mIRI_REF(); } break; case 43 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:284: PNAME_NS { - mPNAME_NS(); + mPNAME_NS(); } break; case 44 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:293: PNAME_LN { - mPNAME_LN(); + mPNAME_LN(); } break; case 45 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:302: BLANK_NODE_LABEL { - mBLANK_NODE_LABEL(); + mBLANK_NODE_LABEL(); } break; case 46 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:319: VAR1 { - mVAR1(); + mVAR1(); } break; case 47 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:324: VAR2 { - mVAR2(); + mVAR2(); } break; case 48 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:329: LANGTAG { - mLANGTAG(); + mLANGTAG(); } break; case 49 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:337: INTEGER { - mINTEGER(); + mINTEGER(); } break; case 50 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:345: DECIMAL { - mDECIMAL(); + mDECIMAL(); } break; case 51 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:353: DOUBLE { - mDOUBLE(); + mDOUBLE(); } break; case 52 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:360: INTEGER_POSITIVE { - mINTEGER_POSITIVE(); + mINTEGER_POSITIVE(); } break; case 53 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:377: DECIMAL_POSITIVE { - mDECIMAL_POSITIVE(); + mDECIMAL_POSITIVE(); } break; case 54 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:394: DOUBLE_POSITIVE { - mDOUBLE_POSITIVE(); + mDOUBLE_POSITIVE(); } break; case 55 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:410: INTEGER_NEGATIVE { - mINTEGER_NEGATIVE(); + mINTEGER_NEGATIVE(); } break; case 56 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:427: DECIMAL_NEGATIVE { - mDECIMAL_NEGATIVE(); + mDECIMAL_NEGATIVE(); } break; case 57 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:444: DOUBLE_NEGATIVE { - mDOUBLE_NEGATIVE(); + mDOUBLE_NEGATIVE(); } break; case 58 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:460: EXPONENT { - mEXPONENT(); + mEXPONENT(); } break; case 59 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:469: STRING_LITERAL1 { - mSTRING_LITERAL1(); + mSTRING_LITERAL1(); } break; case 60 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:485: STRING_LITERAL2 { - mSTRING_LITERAL2(); + mSTRING_LITERAL2(); } break; case 61 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:501: STRING_LITERAL_LONG1 { - mSTRING_LITERAL_LONG1(); + mSTRING_LITERAL_LONG1(); } break; case 62 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:522: STRING_LITERAL_LONG2 { - mSTRING_LITERAL_LONG2(); + mSTRING_LITERAL_LONG2(); } break; case 63 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:543: ECHAR { - mECHAR(); + mECHAR(); } break; case 64 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:549: WS { - mWS(); + mWS(); } break; case 65 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:552: VARNAME { - mVARNAME(); + mVARNAME(); } break; case 66 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:560: PN_PREFIX { - mPN_PREFIX(); + mPN_PREFIX(); } break; case 67 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:1:570: COMMENT { - mCOMMENT(); + mCOMMENT(); } break; @@ -4628,7 +4628,7 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc IntStream input = _input; int _s = s; switch ( s ) { - case 0 : + case 0 : int LA32_41 = input.LA(1); s = -1; @@ -4638,7 +4638,7 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc if ( s>=0 ) return s; break; - case 1 : + case 1 : int LA32_42 = input.LA(1); s = -1; @@ -4655,6 +4655,6 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc throw nvae; } } - -} \ No newline at end of file + +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternParser.java b/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternParser.java index ccfea0e..28c65bf 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternParser.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternParser.java @@ -18,7 +18,7 @@ // $ANTLR 3.2 Sep 23, 2009 12:02:23 /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g 2010-07-23 15:15:37 package com.avengerpenguin.r2r.parser; - + import java.util.Set; import java.util.HashSet; import java.util.Map; @@ -146,9 +146,9 @@ public SourcePatternParser(TokenStream input) { } public SourcePatternParser(TokenStream input, RecognizerSharedState state) { super(input, state); - + } - + public String[] getTokenNames() { return SourcePatternParser.tokenNames; } public String getGrammarFileName() { return "/home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g"; } @@ -159,24 +159,24 @@ public SourcePatternParser(TokenStream input, RecognizerSharedState state) { Set prefixes = new HashSet(); Set propertyDependencies = new HashSet(); Set classDependencies = new HashSet(); - + PrefixMapper prefixMapper; - + public void setPrefixMapper(PrefixMapper pm) { prefixMapper = pm; } - + public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } @@ -289,7 +289,7 @@ else if ( (LA2_0==FILTER) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:68:54: '.' { - match(input,78,FOLLOW_78_in_sourcePattern72); + match(input,78,FOLLOW_78_in_sourcePattern72); } break; @@ -327,8 +327,8 @@ else if ( (LA2_0==FILTER) ) { } } while (true); - match(input,EOF,FOLLOW_EOF_in_sourcePattern81); - + match(input,EOF,FOLLOW_EOF_in_sourcePattern81); + retval.usedPrefixes = prefixes; retval.classes = classDependencies; retval.properties = propertyDependencies; @@ -339,7 +339,7 @@ else if ( (LA2_0==FILTER) ) { if(!variables.contains("SUBJ")) throw new ParseException("No SUBJ variable present in source pattern!"); retval.vars = variables; - + } @@ -364,7 +364,7 @@ public final void wherePattern() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:84:3: ( '{' ( triplesBlock )? ( ( graphPatternNotTriples | filter ) ( '.' )? ( triplesBlock )? )* '}' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:84:5: '{' ( triplesBlock )? ( ( graphPatternNotTriples | filter ) ( '.' )? ( triplesBlock )? )* '}' { - match(input,79,FOLLOW_79_in_wherePattern100); + match(input,79,FOLLOW_79_in_wherePattern100); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:84:9: ( triplesBlock )? int alt6=2; int LA6_0 = input.LA(1); @@ -455,7 +455,7 @@ else if ( (LA7_0==FILTER) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:84:58: '.' { - match(input,78,FOLLOW_78_in_wherePattern114); + match(input,78,FOLLOW_78_in_wherePattern114); } break; @@ -493,7 +493,7 @@ else if ( (LA7_0==FILTER) ) { } } while (true); - match(input,80,FOLLOW_80_in_wherePattern123); + match(input,80,FOLLOW_80_in_wherePattern123); } @@ -516,7 +516,7 @@ public final void groupGraphPattern() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:88:3: ( '{' ( triplesBlock )? ( ( graphPatternNotTriples | filter ) ( '.' )? ( triplesBlock )? )* '}' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:88:5: '{' ( triplesBlock )? ( ( graphPatternNotTriples | filter ) ( '.' )? ( triplesBlock )? )* '}' { - match(input,79,FOLLOW_79_in_groupGraphPattern136); + match(input,79,FOLLOW_79_in_groupGraphPattern136); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:88:9: ( triplesBlock )? int alt11=2; int LA11_0 = input.LA(1); @@ -607,7 +607,7 @@ else if ( (LA12_0==FILTER) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:88:58: '.' { - match(input,78,FOLLOW_78_in_groupGraphPattern150); + match(input,78,FOLLOW_78_in_groupGraphPattern150); } break; @@ -645,7 +645,7 @@ else if ( (LA12_0==FILTER) ) { } } while (true); - match(input,80,FOLLOW_80_in_groupGraphPattern159); + match(input,80,FOLLOW_80_in_groupGraphPattern159); } @@ -684,7 +684,7 @@ public final void triplesBlock() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:92:26: '.' ( triplesBlock )? { - match(input,78,FOLLOW_78_in_triplesBlock178); + match(input,78,FOLLOW_78_in_triplesBlock178); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:92:30: ( triplesBlock )? int alt16=2; int LA16_0 = input.LA(1); @@ -812,8 +812,8 @@ public final void optionalGraphPattern() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:100:3: ( OPTIONAL groupGraphPattern ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:100:5: OPTIONAL groupGraphPattern { - inOptional++; - match(input,OPTIONAL,FOLLOW_OPTIONAL_in_optionalGraphPattern222); + inOptional++; + match(input,OPTIONAL,FOLLOW_OPTIONAL_in_optionalGraphPattern222); pushFollow(FOLLOW_groupGraphPattern_in_optionalGraphPattern224); groupGraphPattern(); @@ -842,7 +842,7 @@ public final void graphGraphPattern() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:104:3: ( GRAPH varOrIriRef groupGraphPattern ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:104:5: GRAPH varOrIriRef groupGraphPattern { - match(input,GRAPH,FOLLOW_GRAPH_in_graphGraphPattern241); + match(input,GRAPH,FOLLOW_GRAPH_in_graphGraphPattern241); pushFollow(FOLLOW_varOrIriRef_in_graphGraphPattern243); varOrIriRef(); @@ -895,7 +895,7 @@ public final void groupOrUnionGraphPattern() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:108:25: UNION groupGraphPattern { - match(input,UNION,FOLLOW_UNION_in_groupOrUnionGraphPattern264); + match(input,UNION,FOLLOW_UNION_in_groupOrUnionGraphPattern264); pushFollow(FOLLOW_groupGraphPattern_in_groupOrUnionGraphPattern266); groupGraphPattern(); @@ -932,7 +932,7 @@ public final void filter() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:112:3: ( FILTER constraint ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:112:5: FILTER constraint { - match(input,FILTER,FOLLOW_FILTER_in_filter282); + match(input,FILTER,FOLLOW_FILTER_in_filter282); pushFollow(FOLLOW_constraint_in_filter284); constraint(); @@ -1118,7 +1118,7 @@ else if ( (LA22_1==WS||LA22_1==83) ) { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:124:11: '(' expression ( ',' expression )* ')' { - match(input,81,FOLLOW_81_in_argList341); + match(input,81,FOLLOW_81_in_argList341); pushFollow(FOLLOW_expression_in_argList343); expression(); @@ -1139,7 +1139,7 @@ else if ( (LA22_1==WS||LA22_1==83) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:124:28: ',' expression { - match(input,82,FOLLOW_82_in_argList347); + match(input,82,FOLLOW_82_in_argList347); pushFollow(FOLLOW_expression_in_argList349); expression(); @@ -1154,7 +1154,7 @@ else if ( (LA22_1==WS||LA22_1==83) ) { } } while (true); - match(input,83,FOLLOW_83_in_argList354); + match(input,83,FOLLOW_83_in_argList354); } break; @@ -1323,7 +1323,7 @@ public final void propertyListNotEmpty() throws RecognitionException { classDependencies.add(object); } } - + // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:142:4: ( ';' (v= verb oList= objectList )? )* loop25: do { @@ -1339,7 +1339,7 @@ public final void propertyListNotEmpty() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:142:6: ';' (v= verb oList= objectList )? { - match(input,84,FOLLOW_84_in_propertyListNotEmpty411); + match(input,84,FOLLOW_84_in_propertyListNotEmpty411); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:142:10: (v= verb oList= objectList )? int alt24=2; int LA24_0 = input.LA(1); @@ -1369,7 +1369,7 @@ public final void propertyListNotEmpty() throws RecognitionException { classDependencies.add(object); } } - + } break; @@ -1477,7 +1477,7 @@ public final List objectList() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:162:7: ',' o= object { - match(input,82,FOLLOW_82_in_objectList496); + match(input,82,FOLLOW_82_in_objectList496); pushFollow(FOLLOW_object_in_objectList500); o=object(); @@ -1581,18 +1581,18 @@ else if ( (LA28_0==85) ) { propertyDependencies.add(iriRef2); value = iriRef2; } - + } break; case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:179:5: 'a' { - match(input,85,FOLLOW_85_in_verb562); + match(input,85,FOLLOW_85_in_verb562); if(inOptional==0) propertyDependencies.add("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"); - + } break; @@ -1674,13 +1674,13 @@ public final void blankNodePropertyList() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:191:3: ( '[' propertyListNotEmpty ']' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:191:5: '[' propertyListNotEmpty ']' { - match(input,86,FOLLOW_86_in_blankNodePropertyList600); + match(input,86,FOLLOW_86_in_blankNodePropertyList600); pushFollow(FOLLOW_propertyListNotEmpty_in_blankNodePropertyList602); propertyListNotEmpty(); state._fsp--; - match(input,87,FOLLOW_87_in_blankNodePropertyList604); + match(input,87,FOLLOW_87_in_blankNodePropertyList604); } @@ -1703,7 +1703,7 @@ public final void collection() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:195:3: ( '(' ( graphNode )+ ')' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:195:5: '(' ( graphNode )+ ')' { - match(input,81,FOLLOW_81_in_collection619); + match(input,81,FOLLOW_81_in_collection619); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:195:9: ( graphNode )+ int cnt30=0; loop30: @@ -1738,7 +1738,7 @@ public final void collection() throws RecognitionException { cnt30++; } while (true); - match(input,83,FOLLOW_83_in_collection624); + match(input,83,FOLLOW_83_in_collection624); } @@ -1854,7 +1854,7 @@ else if ( (LA31_3==WS||LA31_3==83) ) { state._fsp--; - value = null; + value = null; } break; @@ -1906,7 +1906,7 @@ else if ( ((LA32_0>=INTEGER && LA32_0<=BLANK_NODE_LABEL)||LA32_0==81||LA32_0==86 state._fsp--; - value = null; + value = null; } break; @@ -1918,7 +1918,7 @@ else if ( ((LA32_0>=INTEGER && LA32_0<=BLANK_NODE_LABEL)||LA32_0==81||LA32_0==86 state._fsp--; - value = graphTerm4; + value = graphTerm4; } break; @@ -1970,7 +1970,7 @@ else if ( ((LA33_0>=IRI_REF && LA33_0<=PNAME_LN)) ) { state._fsp--; - value = null; + value = null; } break; @@ -1982,7 +1982,7 @@ else if ( ((LA33_0>=IRI_REF && LA33_0<=PNAME_LN)) ) { state._fsp--; - value = iriRef5; + value = iriRef5; } break; @@ -2027,7 +2027,7 @@ else if ( (LA34_0==VAR2) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:214:5: VAR1 { - VAR16=(Token)match(input,VAR1,FOLLOW_VAR1_in_var729); + VAR16=(Token)match(input,VAR1,FOLLOW_VAR1_in_var729); variables.add((VAR16!=null?VAR16.getText():null).substring(1)); } @@ -2035,7 +2035,7 @@ else if ( (LA34_0==VAR2) ) { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:214:55: VAR2 { - VAR27=(Token)match(input,VAR2,FOLLOW_VAR2_in_var735); + VAR27=(Token)match(input,VAR2,FOLLOW_VAR2_in_var735); variables.add((VAR27!=null?VAR27.getText():null).substring(1)); } @@ -2121,13 +2121,13 @@ public final String graphTerm() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:218:5: iriRef { - value = null; + value = null; pushFollow(FOLLOW_iriRef_in_graphTerm761); iriRef8=iriRef(); state._fsp--; - value = iriRef8; + value = iriRef8; } break; @@ -2254,7 +2254,7 @@ public final void conditionalOrExpression() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:228:31: '||' conditionalAndExpression { - match(input,88,FOLLOW_88_in_conditionalOrExpression820); + match(input,88,FOLLOW_88_in_conditionalOrExpression820); pushFollow(FOLLOW_conditionalAndExpression_in_conditionalOrExpression822); conditionalAndExpression(); @@ -2311,7 +2311,7 @@ public final void conditionalAndExpression() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:232:20: '&&' valueLogical { - match(input,89,FOLLOW_89_in_conditionalAndExpression843); + match(input,89,FOLLOW_89_in_conditionalAndExpression843); pushFollow(FOLLOW_valueLogical_in_conditionalAndExpression845); valueLogical(); @@ -2419,7 +2419,7 @@ public final void relationalExpression() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:241:25: '=' numericExpression { - match(input,90,FOLLOW_90_in_relationalExpression906); + match(input,90,FOLLOW_90_in_relationalExpression906); pushFollow(FOLLOW_numericExpression_in_relationalExpression908); numericExpression(); @@ -2431,7 +2431,7 @@ public final void relationalExpression() throws RecognitionException { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:242:25: '!=' numericExpression { - match(input,91,FOLLOW_91_in_relationalExpression935); + match(input,91,FOLLOW_91_in_relationalExpression935); pushFollow(FOLLOW_numericExpression_in_relationalExpression937); numericExpression(); @@ -2443,7 +2443,7 @@ public final void relationalExpression() throws RecognitionException { case 3 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:243:25: '<' numericExpression { - match(input,92,FOLLOW_92_in_relationalExpression964); + match(input,92,FOLLOW_92_in_relationalExpression964); pushFollow(FOLLOW_numericExpression_in_relationalExpression966); numericExpression(); @@ -2455,7 +2455,7 @@ public final void relationalExpression() throws RecognitionException { case 4 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:244:25: '>' numericExpression { - match(input,93,FOLLOW_93_in_relationalExpression993); + match(input,93,FOLLOW_93_in_relationalExpression993); pushFollow(FOLLOW_numericExpression_in_relationalExpression995); numericExpression(); @@ -2467,7 +2467,7 @@ public final void relationalExpression() throws RecognitionException { case 5 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:245:25: '<=' numericExpression { - match(input,94,FOLLOW_94_in_relationalExpression1022); + match(input,94,FOLLOW_94_in_relationalExpression1022); pushFollow(FOLLOW_numericExpression_in_relationalExpression1024); numericExpression(); @@ -2479,7 +2479,7 @@ public final void relationalExpression() throws RecognitionException { case 6 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:246:25: '>=' numericExpression { - match(input,95,FOLLOW_95_in_relationalExpression1050); + match(input,95,FOLLOW_95_in_relationalExpression1050); pushFollow(FOLLOW_numericExpression_in_relationalExpression1052); numericExpression(); @@ -2581,7 +2581,7 @@ public final void additiveExpression() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:255:33: '+' multiplicativeExpression { - match(input,96,FOLLOW_96_in_additiveExpression1117); + match(input,96,FOLLOW_96_in_additiveExpression1117); pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1119); multiplicativeExpression(); @@ -2593,7 +2593,7 @@ public final void additiveExpression() throws RecognitionException { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:256:33: '-' multiplicativeExpression { - match(input,97,FOLLOW_97_in_additiveExpression1153); + match(input,97,FOLLOW_97_in_additiveExpression1153); pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1155); multiplicativeExpression(); @@ -2675,7 +2675,7 @@ else if ( (LA40_0==99) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:263:24: '*' unaryExpression { - match(input,98,FOLLOW_98_in_multiplicativeExpression1279); + match(input,98,FOLLOW_98_in_multiplicativeExpression1279); pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression1281); unaryExpression(); @@ -2687,7 +2687,7 @@ else if ( (LA40_0==99) ) { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:263:46: '/' unaryExpression { - match(input,99,FOLLOW_99_in_multiplicativeExpression1285); + match(input,99,FOLLOW_99_in_multiplicativeExpression1285); pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression1288); unaryExpression(); @@ -2785,7 +2785,7 @@ public final void unaryExpression() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:267:6: '!' primaryExpression { - match(input,100,FOLLOW_100_in_unaryExpression1309); + match(input,100,FOLLOW_100_in_unaryExpression1309); pushFollow(FOLLOW_primaryExpression_in_unaryExpression1311); primaryExpression(); @@ -2797,7 +2797,7 @@ public final void unaryExpression() throws RecognitionException { case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:268:6: '+' primaryExpression { - match(input,96,FOLLOW_96_in_unaryExpression1318); + match(input,96,FOLLOW_96_in_unaryExpression1318); pushFollow(FOLLOW_primaryExpression_in_unaryExpression1320); primaryExpression(); @@ -2809,7 +2809,7 @@ public final void unaryExpression() throws RecognitionException { case 3 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:269:6: '-' primaryExpression { - match(input,97,FOLLOW_97_in_unaryExpression1327); + match(input,97,FOLLOW_97_in_unaryExpression1327); pushFollow(FOLLOW_primaryExpression_in_unaryExpression1329); primaryExpression(); @@ -3015,13 +3015,13 @@ public final void brackettedExpression() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:284:4: ( '(' expression ')' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:284:6: '(' expression ')' { - match(input,81,FOLLOW_81_in_brackettedExpression1414); + match(input,81,FOLLOW_81_in_brackettedExpression1414); pushFollow(FOLLOW_expression_in_brackettedExpression1416); expression(); state._fsp--; - match(input,83,FOLLOW_83_in_brackettedExpression1418); + match(input,83,FOLLOW_83_in_brackettedExpression1418); } @@ -3110,152 +3110,152 @@ public final void builtInCall() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:288:6: STR '(' expression ')' { - match(input,STR,FOLLOW_STR_in_builtInCall1437); - match(input,81,FOLLOW_81_in_builtInCall1439); + match(input,STR,FOLLOW_STR_in_builtInCall1437); + match(input,81,FOLLOW_81_in_builtInCall1439); pushFollow(FOLLOW_expression_in_builtInCall1441); expression(); state._fsp--; - match(input,83,FOLLOW_83_in_builtInCall1443); + match(input,83,FOLLOW_83_in_builtInCall1443); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:289:6: LANG '(' expression ')' { - match(input,LANG,FOLLOW_LANG_in_builtInCall1450); - match(input,81,FOLLOW_81_in_builtInCall1452); + match(input,LANG,FOLLOW_LANG_in_builtInCall1450); + match(input,81,FOLLOW_81_in_builtInCall1452); pushFollow(FOLLOW_expression_in_builtInCall1454); expression(); state._fsp--; - match(input,83,FOLLOW_83_in_builtInCall1456); + match(input,83,FOLLOW_83_in_builtInCall1456); } break; case 3 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:290:6: LANGMATCHES '(' expression ',' expression ')' { - match(input,LANGMATCHES,FOLLOW_LANGMATCHES_in_builtInCall1463); - match(input,81,FOLLOW_81_in_builtInCall1465); + match(input,LANGMATCHES,FOLLOW_LANGMATCHES_in_builtInCall1463); + match(input,81,FOLLOW_81_in_builtInCall1465); pushFollow(FOLLOW_expression_in_builtInCall1467); expression(); state._fsp--; - match(input,82,FOLLOW_82_in_builtInCall1469); + match(input,82,FOLLOW_82_in_builtInCall1469); pushFollow(FOLLOW_expression_in_builtInCall1471); expression(); state._fsp--; - match(input,83,FOLLOW_83_in_builtInCall1473); + match(input,83,FOLLOW_83_in_builtInCall1473); } break; case 4 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:291:6: DATATYPE '(' expression ')' { - match(input,DATATYPE,FOLLOW_DATATYPE_in_builtInCall1480); - match(input,81,FOLLOW_81_in_builtInCall1482); + match(input,DATATYPE,FOLLOW_DATATYPE_in_builtInCall1480); + match(input,81,FOLLOW_81_in_builtInCall1482); pushFollow(FOLLOW_expression_in_builtInCall1484); expression(); state._fsp--; - match(input,83,FOLLOW_83_in_builtInCall1486); + match(input,83,FOLLOW_83_in_builtInCall1486); } break; case 5 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:292:6: BOUND '(' var ')' { - match(input,BOUND,FOLLOW_BOUND_in_builtInCall1493); - match(input,81,FOLLOW_81_in_builtInCall1495); + match(input,BOUND,FOLLOW_BOUND_in_builtInCall1493); + match(input,81,FOLLOW_81_in_builtInCall1495); pushFollow(FOLLOW_var_in_builtInCall1497); var(); state._fsp--; - match(input,83,FOLLOW_83_in_builtInCall1499); + match(input,83,FOLLOW_83_in_builtInCall1499); } break; case 6 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:293:6: SAMETERM '(' expression ',' expression ')' { - match(input,SAMETERM,FOLLOW_SAMETERM_in_builtInCall1506); - match(input,81,FOLLOW_81_in_builtInCall1508); + match(input,SAMETERM,FOLLOW_SAMETERM_in_builtInCall1506); + match(input,81,FOLLOW_81_in_builtInCall1508); pushFollow(FOLLOW_expression_in_builtInCall1510); expression(); state._fsp--; - match(input,82,FOLLOW_82_in_builtInCall1512); + match(input,82,FOLLOW_82_in_builtInCall1512); pushFollow(FOLLOW_expression_in_builtInCall1514); expression(); state._fsp--; - match(input,83,FOLLOW_83_in_builtInCall1516); + match(input,83,FOLLOW_83_in_builtInCall1516); } break; case 7 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:294:6: ISIRI '(' expression ')' { - match(input,ISIRI,FOLLOW_ISIRI_in_builtInCall1523); - match(input,81,FOLLOW_81_in_builtInCall1525); + match(input,ISIRI,FOLLOW_ISIRI_in_builtInCall1523); + match(input,81,FOLLOW_81_in_builtInCall1525); pushFollow(FOLLOW_expression_in_builtInCall1527); expression(); state._fsp--; - match(input,83,FOLLOW_83_in_builtInCall1529); + match(input,83,FOLLOW_83_in_builtInCall1529); } break; case 8 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:295:6: ISURI '(' expression ')' { - match(input,ISURI,FOLLOW_ISURI_in_builtInCall1536); - match(input,81,FOLLOW_81_in_builtInCall1538); + match(input,ISURI,FOLLOW_ISURI_in_builtInCall1536); + match(input,81,FOLLOW_81_in_builtInCall1538); pushFollow(FOLLOW_expression_in_builtInCall1540); expression(); state._fsp--; - match(input,83,FOLLOW_83_in_builtInCall1542); + match(input,83,FOLLOW_83_in_builtInCall1542); } break; case 9 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:296:6: ISBLANK '(' expression ')' { - match(input,ISBLANK,FOLLOW_ISBLANK_in_builtInCall1550); - match(input,81,FOLLOW_81_in_builtInCall1552); + match(input,ISBLANK,FOLLOW_ISBLANK_in_builtInCall1550); + match(input,81,FOLLOW_81_in_builtInCall1552); pushFollow(FOLLOW_expression_in_builtInCall1554); expression(); state._fsp--; - match(input,83,FOLLOW_83_in_builtInCall1556); + match(input,83,FOLLOW_83_in_builtInCall1556); } break; case 10 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:297:6: ISLITERAL '(' expression ')' { - match(input,ISLITERAL,FOLLOW_ISLITERAL_in_builtInCall1563); - match(input,81,FOLLOW_81_in_builtInCall1565); + match(input,ISLITERAL,FOLLOW_ISLITERAL_in_builtInCall1563); + match(input,81,FOLLOW_81_in_builtInCall1565); pushFollow(FOLLOW_expression_in_builtInCall1567); expression(); state._fsp--; - match(input,83,FOLLOW_83_in_builtInCall1569); + match(input,83,FOLLOW_83_in_builtInCall1569); } break; @@ -3291,14 +3291,14 @@ public final void regexExpression() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:302:4: ( REGEX '(' expression ',' expression ( ',' expression )? ')' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:302:6: REGEX '(' expression ',' expression ( ',' expression )? ')' { - match(input,REGEX,FOLLOW_REGEX_in_regexExpression1596); - match(input,81,FOLLOW_81_in_regexExpression1598); + match(input,REGEX,FOLLOW_REGEX_in_regexExpression1596); + match(input,81,FOLLOW_81_in_regexExpression1598); pushFollow(FOLLOW_expression_in_regexExpression1600); expression(); state._fsp--; - match(input,82,FOLLOW_82_in_regexExpression1602); + match(input,82,FOLLOW_82_in_regexExpression1602); pushFollow(FOLLOW_expression_in_regexExpression1604); expression(); @@ -3315,7 +3315,7 @@ public final void regexExpression() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:302:43: ',' expression { - match(input,82,FOLLOW_82_in_regexExpression1607); + match(input,82,FOLLOW_82_in_regexExpression1607); pushFollow(FOLLOW_expression_in_regexExpression1609); expression(); @@ -3327,7 +3327,7 @@ public final void regexExpression() throws RecognitionException { } - match(input,83,FOLLOW_83_in_regexExpression1613); + match(input,83,FOLLOW_83_in_regexExpression1613); } @@ -3418,7 +3418,7 @@ else if ( (LA46_0==101) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:310:14: LANGTAG { - match(input,LANGTAG,FOLLOW_LANGTAG_in_rdfLiteral1657); + match(input,LANGTAG,FOLLOW_LANGTAG_in_rdfLiteral1657); } break; @@ -3428,7 +3428,7 @@ else if ( (LA46_0==101) ) { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:310:24: ( '^^' iriRef ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:310:25: '^^' iriRef { - match(input,101,FOLLOW_101_in_rdfLiteral1662); + match(input,101,FOLLOW_101_in_rdfLiteral1662); pushFollow(FOLLOW_iriRef_in_rdfLiteral1664); iriRef(); @@ -3726,11 +3726,11 @@ else if ( (LA48_0==PNAME_LN) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:337:6: IRI_REF { - IRI_REF9=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_iriRef1848); - + IRI_REF9=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_iriRef1848); + String iri = (IRI_REF9!=null?IRI_REF9.getText():null); value = iri.substring(1, iri.length()-1); - + } break; @@ -3742,7 +3742,7 @@ else if ( (LA48_0==PNAME_LN) ) { state._fsp--; - + String qName = (prefixedName10!=null?input.toString(prefixedName10.start,prefixedName10.stop):null); String iri = PrintUtil.expandQname(qName); if(qName.equals(iri)) @@ -3756,12 +3756,12 @@ else if ( (LA48_0==PNAME_LN) ) { value = iri; else value = iri + prefixAndName[1]; - } + } } else { value = iri; } - + } break; @@ -3793,12 +3793,12 @@ public final SourcePatternParser.prefixedName_return prefixedName() throws Recog // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:366:4: (p= PNAME_LN ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:366:6: p= PNAME_LN { - p=(Token)match(input,PNAME_LN,FOLLOW_PNAME_LN_in_prefixedName1889); + p=(Token)match(input,PNAME_LN,FOLLOW_PNAME_LN_in_prefixedName1889); String qName = (p!=null?p.getText():null); String[] split = qName.split(":"); prefixes.add(split[0]); - + } @@ -3840,7 +3840,7 @@ else if ( (LA49_0==86) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:376:5: BLANK_NODE_LABEL { - match(input,BLANK_NODE_LABEL,FOLLOW_BLANK_NODE_LABEL_in_blankNode1915); + match(input,BLANK_NODE_LABEL,FOLLOW_BLANK_NODE_LABEL_in_blankNode1915); } break; @@ -3876,7 +3876,7 @@ public final void anon() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:380:3: ( '[' ( WS )* ']' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:380:5: '[' ( WS )* ']' { - match(input,86,FOLLOW_86_in_anon1936); + match(input,86,FOLLOW_86_in_anon1936); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:380:9: ( WS )* loop50: do { @@ -3892,7 +3892,7 @@ public final void anon() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:380:9: WS { - match(input,WS,FOLLOW_WS_in_anon1938); + match(input,WS,FOLLOW_WS_in_anon1938); } break; @@ -3902,7 +3902,7 @@ public final void anon() throws RecognitionException { } } while (true); - match(input,87,FOLLOW_87_in_anon1941); + match(input,87,FOLLOW_87_in_anon1941); } @@ -3925,7 +3925,7 @@ public final void nil() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:384:3: ( '(' ( WS )* ')' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:384:5: '(' ( WS )* ')' { - match(input,81,FOLLOW_81_in_nil1957); + match(input,81,FOLLOW_81_in_nil1957); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:384:9: ( WS )* loop51: do { @@ -3941,7 +3941,7 @@ public final void nil() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/SourcePattern.g:384:9: WS { - match(input,WS,FOLLOW_WS_in_nil1959); + match(input,WS,FOLLOW_WS_in_nil1959); } break; @@ -3951,7 +3951,7 @@ public final void nil() throws RecognitionException { } } while (true); - match(input,83,FOLLOW_83_in_nil1962); + match(input,83,FOLLOW_83_in_nil1962); } @@ -3969,7 +3969,7 @@ public final void nil() throws RecognitionException { // Delegated rules - + public static final BitSet FOLLOW_triplesBlock_in_sourcePattern60 = new BitSet(new long[]{0x00000000000000B0L,0x0000000000008000L}); public static final BitSet FOLLOW_graphPatternNotTriples_in_sourcePattern65 = new BitSet(new long[]{0x000000FFFFC003B0L,0x000000000042C000L}); @@ -4186,4 +4186,4 @@ public final void nil() throws RecognitionException { public static final BitSet FOLLOW_WS_in_nil1959 = new BitSet(new long[]{0x0000010000000000L,0x0000000000080000L}); public static final BitSet FOLLOW_83_in_nil1962 = new BitSet(new long[]{0x0000000000000002L}); -} \ No newline at end of file +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternRewriterLexer.java b/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternRewriterLexer.java index 5512719..8136096 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternRewriterLexer.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternRewriterLexer.java @@ -131,14 +131,14 @@ public class SourcePatternRewriterLexer extends Lexer { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } @@ -146,7 +146,7 @@ public void reportError(RecognitionException re) { // delegates // delegators - public SourcePatternRewriterLexer() {;} + public SourcePatternRewriterLexer() {;} public SourcePatternRewriterLexer(CharStream input) { this(input, new RecognizerSharedState()); } @@ -164,7 +164,7 @@ public final void mT__80() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:26:7: ( '.' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:26:9: '.' { - match('.'); + match('.'); } @@ -184,7 +184,7 @@ public final void mT__81() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:27:7: ( '{' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:27:9: '{' { - match('{'); + match('{'); } @@ -204,7 +204,7 @@ public final void mT__82() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:28:7: ( '}' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:28:9: '}' { - match('}'); + match('}'); } @@ -224,7 +224,7 @@ public final void mT__83() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:29:7: ( '(' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:29:9: '(' { - match('('); + match('('); } @@ -244,7 +244,7 @@ public final void mT__84() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:30:7: ( ',' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:30:9: ',' { - match(','); + match(','); } @@ -264,7 +264,7 @@ public final void mT__85() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:31:7: ( ')' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:31:9: ')' { - match(')'); + match(')'); } @@ -284,7 +284,7 @@ public final void mT__86() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:32:7: ( ';' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:32:9: ';' { - match(';'); + match(';'); } @@ -304,7 +304,7 @@ public final void mT__87() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:33:7: ( 'a' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:33:9: 'a' { - match('a'); + match('a'); } @@ -324,7 +324,7 @@ public final void mT__88() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:34:7: ( '[' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:34:9: '[' { - match('['); + match('['); } @@ -344,7 +344,7 @@ public final void mT__89() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:35:7: ( ']' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:35:9: ']' { - match(']'); + match(']'); } @@ -364,7 +364,7 @@ public final void mT__90() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:36:7: ( '||' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:36:9: '||' { - match("||"); + match("||"); } @@ -385,7 +385,7 @@ public final void mT__91() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:37:7: ( '&&' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:37:9: '&&' { - match("&&"); + match("&&"); } @@ -406,7 +406,7 @@ public final void mT__92() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:38:7: ( '=' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:38:9: '=' { - match('='); + match('='); } @@ -426,7 +426,7 @@ public final void mT__93() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:39:7: ( '!=' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:39:9: '!=' { - match("!="); + match("!="); } @@ -447,7 +447,7 @@ public final void mT__94() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:40:7: ( '<' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:40:9: '<' { - match('<'); + match('<'); } @@ -467,7 +467,7 @@ public final void mT__95() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:41:7: ( '>' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:41:9: '>' { - match('>'); + match('>'); } @@ -487,7 +487,7 @@ public final void mT__96() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:42:7: ( '<=' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:42:9: '<=' { - match("<="); + match("<="); } @@ -508,7 +508,7 @@ public final void mT__97() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:43:7: ( '>=' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:43:9: '>=' { - match(">="); + match(">="); } @@ -529,7 +529,7 @@ public final void mT__98() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:44:7: ( '+' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:44:9: '+' { - match('+'); + match('+'); } @@ -549,7 +549,7 @@ public final void mT__99() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:45:7: ( '-' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:45:9: '-' { - match('-'); + match('-'); } @@ -569,7 +569,7 @@ public final void mT__100() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:46:8: ( '*' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:46:10: '*' { - match('*'); + match('*'); } @@ -589,7 +589,7 @@ public final void mT__101() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:47:8: ( '/' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:47:10: '/' { - match('/'); + match('/'); } @@ -609,7 +609,7 @@ public final void mT__102() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:48:8: ( '!' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:48:10: '!' { - match('!'); + match('!'); } @@ -629,7 +629,7 @@ public final void mT__103() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:49:8: ( '^^' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:49:10: '^^' { - match("^^"); + match("^^"); } @@ -650,11 +650,11 @@ public final void mGRAPH() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:323:7: ( G R A P H ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:323:9: G R A P H { - mG(); - mR(); - mA(); - mP(); - mH(); + mG(); + mR(); + mA(); + mP(); + mH(); } @@ -674,9 +674,9 @@ public final void mSTR() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:324:5: ( S T R ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:324:7: S T R { - mS(); - mT(); - mR(); + mS(); + mT(); + mR(); } @@ -696,11 +696,11 @@ public final void mISURI() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:325:7: ( I S U R I ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:325:9: I S U R I { - mI(); - mS(); - mU(); - mR(); - mI(); + mI(); + mS(); + mU(); + mR(); + mI(); } @@ -720,14 +720,14 @@ public final void mOPTIONAL() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:326:10: ( O P T I O N A L ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:326:12: O P T I O N A L { - mO(); - mP(); - mT(); - mI(); - mO(); - mN(); - mA(); - mL(); + mO(); + mP(); + mT(); + mI(); + mO(); + mN(); + mA(); + mL(); } @@ -747,10 +747,10 @@ public final void mLANG() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:327:6: ( L A N G ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:327:8: L A N G { - mL(); - mA(); - mN(); - mG(); + mL(); + mA(); + mN(); + mG(); } @@ -770,11 +770,11 @@ public final void mISIRI() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:328:7: ( I S I R I ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:328:9: I S I R I { - mI(); - mS(); - mI(); - mR(); - mI(); + mI(); + mS(); + mI(); + mR(); + mI(); } @@ -794,11 +794,11 @@ public final void mUNION() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:329:7: ( U N I O N ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:329:9: U N I O N { - mU(); - mN(); - mI(); - mO(); - mN(); + mU(); + mN(); + mI(); + mO(); + mN(); } @@ -818,17 +818,17 @@ public final void mLANGMATCHES() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:330:13: ( L A N G M A T C H E S ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:330:15: L A N G M A T C H E S { - mL(); - mA(); - mN(); - mG(); - mM(); - mA(); - mT(); - mC(); - mH(); - mE(); - mS(); + mL(); + mA(); + mN(); + mG(); + mM(); + mA(); + mT(); + mC(); + mH(); + mE(); + mS(); } @@ -848,15 +848,15 @@ public final void mISLITERAL() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:331:11: ( I S L I T E R A L ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:331:13: I S L I T E R A L { - mI(); - mS(); - mL(); - mI(); - mT(); - mE(); - mR(); - mA(); - mL(); + mI(); + mS(); + mL(); + mI(); + mT(); + mE(); + mR(); + mA(); + mL(); } @@ -876,13 +876,13 @@ public final void mISBLANK() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:332:9: ( I S B L A N K ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:332:11: I S B L A N K { - mI(); - mS(); - mB(); - mL(); - mA(); - mN(); - mK(); + mI(); + mS(); + mB(); + mL(); + mA(); + mN(); + mK(); } @@ -902,11 +902,11 @@ public final void mBOUND() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:333:7: ( B O U N D ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:333:9: B O U N D { - mB(); - mO(); - mU(); - mN(); - mD(); + mB(); + mO(); + mU(); + mN(); + mD(); } @@ -926,12 +926,12 @@ public final void mFILTER() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:334:8: ( F I L T E R ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:334:10: F I L T E R { - mF(); - mI(); - mL(); - mT(); - mE(); - mR(); + mF(); + mI(); + mL(); + mT(); + mE(); + mR(); } @@ -951,14 +951,14 @@ public final void mDATATYPE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:335:10: ( D A T A T Y P E ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:335:12: D A T A T Y P E { - mD(); - mA(); - mT(); - mA(); - mT(); - mY(); - mP(); - mE(); + mD(); + mA(); + mT(); + mA(); + mT(); + mY(); + mP(); + mE(); } @@ -978,11 +978,11 @@ public final void mREGEX() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:336:7: ( R E G E X ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:336:9: R E G E X { - mR(); - mE(); - mG(); - mE(); - mX(); + mR(); + mE(); + mG(); + mE(); + mX(); } @@ -1002,10 +1002,10 @@ public final void mTRUE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:337:6: ( T R U E ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:337:8: T R U E { - mT(); - mR(); - mU(); - mE(); + mT(); + mR(); + mU(); + mE(); } @@ -1025,14 +1025,14 @@ public final void mSAMETERM() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:338:10: ( S A M E T E R M ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:338:12: S A M E T E R M { - mS(); - mA(); - mM(); - mE(); - mT(); - mE(); - mR(); - mM(); + mS(); + mA(); + mM(); + mE(); + mT(); + mE(); + mR(); + mM(); } @@ -1052,11 +1052,11 @@ public final void mFALSE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:339:7: ( F A L S E ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:339:9: F A L S E { - mF(); - mA(); - mL(); - mS(); - mE(); + mF(); + mA(); + mL(); + mS(); + mE(); } @@ -1700,7 +1700,7 @@ public final void mIRI_REF() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:372:3: ( '<' (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* '>' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:372:5: '<' (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* '>' { - match('<'); + match('<'); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:372:9: (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* loop1: do { @@ -1734,7 +1734,7 @@ public final void mIRI_REF() throws RecognitionException { } } while (true); - match('>'); + match('>'); } @@ -1765,14 +1765,14 @@ public final void mPNAME_NS() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:376:5: PN_PREFIX { - mPN_PREFIX(); + mPN_PREFIX(); } break; } - match(':'); + match(':'); } @@ -1792,8 +1792,8 @@ public final void mPNAME_LN() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:380:3: ( PNAME_NS PN_LOCAL ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:380:5: PNAME_NS PN_LOCAL { - mPNAME_NS(); - mPN_LOCAL(); + mPNAME_NS(); + mPN_LOCAL(); } @@ -1813,9 +1813,9 @@ public final void mBLANK_NODE_LABEL() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:384:3: ( '_:' PN_LOCAL ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:384:5: '_:' PN_LOCAL { - match("_:"); + match("_:"); - mPN_LOCAL(); + mPN_LOCAL(); } @@ -1835,8 +1835,8 @@ public final void mVAR1() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:388:3: ( '?' VARNAME ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:388:5: '?' VARNAME { - match('?'); - mVARNAME(); + match('?'); + mVARNAME(); } @@ -1856,8 +1856,8 @@ public final void mVAR2() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:392:3: ( '$' VARNAME ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:392:5: '$' VARNAME { - match('$'); - mVARNAME(); + match('$'); + mVARNAME(); } @@ -1877,7 +1877,7 @@ public final void mLANGTAG() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:396:3: ( '@' ( 'a' .. 'z' | 'A' .. 'Z' )+ ( '-' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ )* ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:396:5: '@' ( 'a' .. 'z' | 'A' .. 'Z' )+ ( '-' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ )* { - match('@'); + match('@'); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:396:9: ( 'a' .. 'z' | 'A' .. 'Z' )+ int cnt3=0; loop3: @@ -1931,7 +1931,7 @@ public final void mLANGTAG() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:396:33: '-' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ { - match('-'); + match('-'); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:396:37: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ int cnt4=0; loop4: @@ -2014,7 +2014,7 @@ public final void mINTEGER() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:400:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2080,7 +2080,7 @@ else if ( (LA10_0=='.') ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:404:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2094,7 +2094,7 @@ else if ( (LA10_0=='.') ) { cnt7++; } while (true); - match('.'); + match('.'); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:404:21: ( '0' .. '9' )* loop8: do { @@ -2110,7 +2110,7 @@ else if ( (LA10_0=='.') ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:404:22: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2126,7 +2126,7 @@ else if ( (LA10_0=='.') ) { case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:404:35: '.' ( '0' .. '9' )+ { - match('.'); + match('.'); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:404:39: ( '0' .. '9' )+ int cnt9=0; loop9: @@ -2143,7 +2143,7 @@ else if ( (LA10_0=='.') ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:404:40: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2198,7 +2198,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:408:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2212,7 +2212,7 @@ public final void mDOUBLE() throws RecognitionException { cnt11++; } while (true); - match('.'); + match('.'); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:408:21: ( '0' .. '9' )* loop12: do { @@ -2228,7 +2228,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:408:22: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2238,14 +2238,14 @@ public final void mDOUBLE() throws RecognitionException { } } while (true); - mEXPONENT(); + mEXPONENT(); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:409:5: '.' ( '0' .. '9' )+ EXPONENT { - match('.'); + match('.'); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:409:9: ( '0' .. '9' )+ int cnt13=0; loop13: @@ -2262,7 +2262,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:409:10: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2276,7 +2276,7 @@ public final void mDOUBLE() throws RecognitionException { cnt13++; } while (true); - mEXPONENT(); + mEXPONENT(); } break; @@ -2299,7 +2299,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:410:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2313,7 +2313,7 @@ public final void mDOUBLE() throws RecognitionException { cnt14++; } while (true); - mEXPONENT(); + mEXPONENT(); } break; @@ -2335,8 +2335,8 @@ public final void mINTEGER_POSITIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:414:3: ( '+' INTEGER ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:414:5: '+' INTEGER { - match('+'); - mINTEGER(); + match('+'); + mINTEGER(); } @@ -2356,8 +2356,8 @@ public final void mDECIMAL_POSITIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:418:3: ( '+' DECIMAL ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:418:5: '+' DECIMAL { - match('+'); - mDECIMAL(); + match('+'); + mDECIMAL(); } @@ -2377,8 +2377,8 @@ public final void mDOUBLE_POSITIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:422:3: ( '+' DOUBLE ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:422:5: '+' DOUBLE { - match('+'); - mDOUBLE(); + match('+'); + mDOUBLE(); } @@ -2398,8 +2398,8 @@ public final void mINTEGER_NEGATIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:426:3: ( '-' INTEGER ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:426:5: '-' INTEGER { - match('-'); - mINTEGER(); + match('-'); + mINTEGER(); } @@ -2419,8 +2419,8 @@ public final void mDECIMAL_NEGATIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:430:3: ( '-' DECIMAL ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:430:5: '-' DECIMAL { - match('-'); - mDECIMAL(); + match('-'); + mDECIMAL(); } @@ -2440,8 +2440,8 @@ public final void mDOUBLE_NEGATIVE() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:434:3: ( '-' DOUBLE ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:434:5: '-' DOUBLE { - match('-'); - mDOUBLE(); + match('-'); + mDOUBLE(); } @@ -2512,7 +2512,7 @@ public final void mEXPONENT() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:438:31: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -2545,7 +2545,7 @@ public final void mSTRING_LITERAL1() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:442:3: ( '\\'' (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\\'' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:442:5: '\\'' (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\\'' { - match('\''); + match('\''); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:442:10: (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* loop18: do { @@ -2579,7 +2579,7 @@ else if ( (LA18_0=='\\') ) { case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:442:58: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -2589,7 +2589,7 @@ else if ( (LA18_0=='\\') ) { } } while (true); - match('\''); + match('\''); } @@ -2609,7 +2609,7 @@ public final void mSTRING_LITERAL2() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:446:3: ( '\"' (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\"' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:446:5: '\"' (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\"' { - match('\"'); + match('\"'); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:446:9: (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* loop19: do { @@ -2643,7 +2643,7 @@ else if ( (LA19_0=='\\') ) { case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:446:57: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -2653,7 +2653,7 @@ else if ( (LA19_0=='\\') ) { } } while (true); - match('\"'); + match('\"'); } @@ -2673,7 +2673,7 @@ public final void mSTRING_LITERAL_LONG1() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:450:3: ( '\\'\\'\\'' ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* '\\'\\'\\'' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:450:5: '\\'\\'\\'' ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* '\\'\\'\\'' { - match("'''"); + match("'''"); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:450:14: ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* loop22: @@ -2726,14 +2726,14 @@ else if ( ((LA20_1>='\u0000' && LA20_1<='&')||(LA20_1>='(' && LA20_1<='\uFFFF')) case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:450:17: '\\'' { - match('\''); + match('\''); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:450:24: '\\'\\'' { - match("''"); + match("''"); } @@ -2776,7 +2776,7 @@ else if ( (LA21_0=='\\') ) { case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:450:51: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -2792,7 +2792,7 @@ else if ( (LA21_0=='\\') ) { } } while (true); - match("'''"); + match("'''"); } @@ -2813,7 +2813,7 @@ public final void mSTRING_LITERAL_LONG2() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:454:3: ( '\"\"\"' ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* '\"\"\"' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:454:5: '\"\"\"' ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* '\"\"\"' { - match("\"\"\""); + match("\"\"\""); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:454:11: ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* loop25: @@ -2866,14 +2866,14 @@ else if ( ((LA23_1>='\u0000' && LA23_1<='!')||(LA23_1>='#' && LA23_1<='\uFFFF')) case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:454:14: '\"' { - match('\"'); + match('\"'); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:454:20: '\"\"' { - match("\"\""); + match("\"\""); } @@ -2916,7 +2916,7 @@ else if ( (LA24_0=='\\') ) { case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:454:44: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -2932,7 +2932,7 @@ else if ( (LA24_0=='\\') ) { } } while (true); - match("\"\"\""); + match("\"\"\""); } @@ -2953,7 +2953,7 @@ public final void mECHAR() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:458:3: ( '\\\\' ( 't' | 'b' | 'n' | 'r' | 'f' | '\\\\' | '\"' | '\\'' ) ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:458:5: '\\\\' ( 't' | 'b' | 'n' | 'r' | 'f' | '\\\\' | '\"' | '\\'' ) { - match('\\'); + match('\\'); if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) { input.consume(); @@ -2982,7 +2982,7 @@ public final void mNIL() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:462:3: ( '(' ( WS )* ')' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:462:5: '(' ( WS )* ')' { - match('('); + match('('); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:462:9: ( WS )* loop26: do { @@ -2998,7 +2998,7 @@ public final void mNIL() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:462:9: WS { - mWS(); + mWS(); } break; @@ -3008,7 +3008,7 @@ public final void mNIL() throws RecognitionException { } } while (true); - match(')'); + match(')'); } @@ -3057,7 +3057,7 @@ public final void mANON() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:470:3: ( '[' ( WS )* ']' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:470:5: '[' ( WS )* ']' { - match('['); + match('['); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:470:9: ( WS )* loop27: do { @@ -3073,7 +3073,7 @@ public final void mANON() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:470:9: WS { - mWS(); + mWS(); } break; @@ -3083,7 +3083,7 @@ public final void mANON() throws RecognitionException { } } while (true); - match(']'); + match(']'); } @@ -3212,7 +3212,7 @@ public final void mPN_PREFIX() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:498:3: ( PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:498:5: PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? { - mPN_CHARS_BASE(); + mPN_CHARS_BASE(); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:498:19: ( ( PN_CHARS | '.' )* PN_CHARS )? int alt30=2; int LA30_0 = input.LA(1); @@ -3266,7 +3266,7 @@ else if ( (LA29_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -3376,7 +3376,7 @@ else if ( (LA31_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -3424,7 +3424,7 @@ public final void mCOMMENT() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:515:9: ( '#' ( . )* ( '\\n' | '\\r' ) ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:515:11: '#' ( . )* ( '\\n' | '\\r' ) { - match('#'); + match('#'); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:515:15: ( . )* loop33: do { @@ -3443,7 +3443,7 @@ else if ( ((LA33_0>='\u0000' && LA33_0<='\t')||(LA33_0>='\u000B' && LA33_0<='\f' case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:515:15: . { - matchAny(); + matchAny(); } break; @@ -3482,483 +3482,483 @@ public void mTokens() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:10: T__80 { - mT__80(); + mT__80(); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:16: T__81 { - mT__81(); + mT__81(); } break; case 3 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:22: T__82 { - mT__82(); + mT__82(); } break; case 4 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:28: T__83 { - mT__83(); + mT__83(); } break; case 5 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:34: T__84 { - mT__84(); + mT__84(); } break; case 6 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:40: T__85 { - mT__85(); + mT__85(); } break; case 7 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:46: T__86 { - mT__86(); + mT__86(); } break; case 8 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:52: T__87 { - mT__87(); + mT__87(); } break; case 9 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:58: T__88 { - mT__88(); + mT__88(); } break; case 10 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:64: T__89 { - mT__89(); + mT__89(); } break; case 11 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:70: T__90 { - mT__90(); + mT__90(); } break; case 12 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:76: T__91 { - mT__91(); + mT__91(); } break; case 13 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:82: T__92 { - mT__92(); + mT__92(); } break; case 14 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:88: T__93 { - mT__93(); + mT__93(); } break; case 15 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:94: T__94 { - mT__94(); + mT__94(); } break; case 16 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:100: T__95 { - mT__95(); + mT__95(); } break; case 17 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:106: T__96 { - mT__96(); + mT__96(); } break; case 18 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:112: T__97 { - mT__97(); + mT__97(); } break; case 19 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:118: T__98 { - mT__98(); + mT__98(); } break; case 20 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:124: T__99 { - mT__99(); + mT__99(); } break; case 21 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:130: T__100 { - mT__100(); + mT__100(); } break; case 22 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:137: T__101 { - mT__101(); + mT__101(); } break; case 23 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:144: T__102 { - mT__102(); + mT__102(); } break; case 24 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:151: T__103 { - mT__103(); + mT__103(); } break; case 25 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:158: GRAPH { - mGRAPH(); + mGRAPH(); } break; case 26 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:164: STR { - mSTR(); + mSTR(); } break; case 27 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:168: ISURI { - mISURI(); + mISURI(); } break; case 28 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:174: OPTIONAL { - mOPTIONAL(); + mOPTIONAL(); } break; case 29 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:183: LANG { - mLANG(); + mLANG(); } break; case 30 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:188: ISIRI { - mISIRI(); + mISIRI(); } break; case 31 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:194: UNION { - mUNION(); + mUNION(); } break; case 32 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:200: LANGMATCHES { - mLANGMATCHES(); + mLANGMATCHES(); } break; case 33 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:212: ISLITERAL { - mISLITERAL(); + mISLITERAL(); } break; case 34 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:222: ISBLANK { - mISBLANK(); + mISBLANK(); } break; case 35 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:230: BOUND { - mBOUND(); + mBOUND(); } break; case 36 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:236: FILTER { - mFILTER(); + mFILTER(); } break; case 37 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:243: DATATYPE { - mDATATYPE(); + mDATATYPE(); } break; case 38 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:252: REGEX { - mREGEX(); + mREGEX(); } break; case 39 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:258: TRUE { - mTRUE(); + mTRUE(); } break; case 40 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:263: SAMETERM { - mSAMETERM(); + mSAMETERM(); } break; case 41 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:272: FALSE { - mFALSE(); + mFALSE(); } break; case 42 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:278: IRI_REF { - mIRI_REF(); + mIRI_REF(); } break; case 43 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:286: PNAME_NS { - mPNAME_NS(); + mPNAME_NS(); } break; case 44 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:295: PNAME_LN { - mPNAME_LN(); + mPNAME_LN(); } break; case 45 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:304: BLANK_NODE_LABEL { - mBLANK_NODE_LABEL(); + mBLANK_NODE_LABEL(); } break; case 46 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:321: VAR1 { - mVAR1(); + mVAR1(); } break; case 47 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:326: VAR2 { - mVAR2(); + mVAR2(); } break; case 48 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:331: LANGTAG { - mLANGTAG(); + mLANGTAG(); } break; case 49 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:339: INTEGER { - mINTEGER(); + mINTEGER(); } break; case 50 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:347: DECIMAL { - mDECIMAL(); + mDECIMAL(); } break; case 51 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:355: DOUBLE { - mDOUBLE(); + mDOUBLE(); } break; case 52 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:362: INTEGER_POSITIVE { - mINTEGER_POSITIVE(); + mINTEGER_POSITIVE(); } break; case 53 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:379: DECIMAL_POSITIVE { - mDECIMAL_POSITIVE(); + mDECIMAL_POSITIVE(); } break; case 54 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:396: DOUBLE_POSITIVE { - mDOUBLE_POSITIVE(); + mDOUBLE_POSITIVE(); } break; case 55 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:412: INTEGER_NEGATIVE { - mINTEGER_NEGATIVE(); + mINTEGER_NEGATIVE(); } break; case 56 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:429: DECIMAL_NEGATIVE { - mDECIMAL_NEGATIVE(); + mDECIMAL_NEGATIVE(); } break; case 57 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:446: DOUBLE_NEGATIVE { - mDOUBLE_NEGATIVE(); + mDOUBLE_NEGATIVE(); } break; case 58 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:462: EXPONENT { - mEXPONENT(); + mEXPONENT(); } break; case 59 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:471: STRING_LITERAL1 { - mSTRING_LITERAL1(); + mSTRING_LITERAL1(); } break; case 60 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:487: STRING_LITERAL2 { - mSTRING_LITERAL2(); + mSTRING_LITERAL2(); } break; case 61 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:503: STRING_LITERAL_LONG1 { - mSTRING_LITERAL_LONG1(); + mSTRING_LITERAL_LONG1(); } break; case 62 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:524: STRING_LITERAL_LONG2 { - mSTRING_LITERAL_LONG2(); + mSTRING_LITERAL_LONG2(); } break; case 63 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:545: ECHAR { - mECHAR(); + mECHAR(); } break; case 64 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:551: NIL { - mNIL(); + mNIL(); } break; case 65 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:555: WS { - mWS(); + mWS(); } break; case 66 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:558: ANON { - mANON(); + mANON(); } break; case 67 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:563: VARNAME { - mVARNAME(); + mVARNAME(); } break; case 68 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:571: PN_PREFIX { - mPN_PREFIX(); + mPN_PREFIX(); } break; case 69 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:1:581: COMMENT { - mCOMMENT(); + mCOMMENT(); } break; @@ -4742,7 +4742,7 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc IntStream input = _input; int _s = s; switch ( s ) { - case 0 : + case 0 : int LA34_41 = input.LA(1); s = -1; @@ -4752,7 +4752,7 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc if ( s>=0 ) return s; break; - case 1 : + case 1 : int LA34_42 = input.LA(1); s = -1; @@ -4769,6 +4769,6 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc throw nvae; } } - -} \ No newline at end of file + +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternRewriterParser.java b/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternRewriterParser.java index cf2712c..c011d46 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternRewriterParser.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/SourcePatternRewriterParser.java @@ -18,7 +18,7 @@ // $ANTLR 3.2 Sep 23, 2009 12:02:23 /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g 2011-04-28 13:03:26 package com.avengerpenguin.r2r.parser; - + import java.util.Set; import java.util.HashSet; import java.util.Map; @@ -153,9 +153,9 @@ public SourcePatternRewriterParser(TokenStream input) { } public SourcePatternRewriterParser(TokenStream input, RecognizerSharedState state) { super(input, state); - + } - + protected StringTemplateGroup templateLib = new StringTemplateGroup("SourcePatternRewriterParserTemplates", AngleBracketTemplateLexer.class); @@ -185,26 +185,26 @@ public STAttrMap put(String attrName, int value) { StringGenerator variableGenerator = null; HashMap variableRewriter = null; - + public void setVariableGenerator(StringGenerator stringGenerator) { this.variableGenerator = stringGenerator; variableRewriter = new HashMap(); } - + public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public String rewriteVariable(String inVar) { if(variableRewriter==null || inVar.equals("SUBJ")) return inVar; @@ -212,10 +212,10 @@ public String rewriteVariable(String inVar) { String outVar = variableRewriter.get(inVar); if(outVar!=null) return outVar; - + outVar = variableGenerator.nextString(); variableRewriter.put(inVar, outVar); - return outVar; + return outVar; } @@ -244,7 +244,7 @@ public final SourcePatternRewriterParser.rewrittenSourcePattern_return rewritten state._fsp--; - retval.rewrittenSourcePattern = (sourcePattern1!=null?input.toString(sourcePattern1.start,sourcePattern1.stop):null); + retval.rewrittenSourcePattern = (sourcePattern1!=null?input.toString(sourcePattern1.start,sourcePattern1.stop):null); } @@ -367,7 +367,7 @@ else if ( (LA2_0==FILTER) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:83:54: '.' { - match(input,80,FOLLOW_80_in_sourcePattern101); + match(input,80,FOLLOW_80_in_sourcePattern101); } break; @@ -405,7 +405,7 @@ else if ( (LA2_0==FILTER) ) { } } while (true); - match(input,EOF,FOLLOW_EOF_in_sourcePattern110); + match(input,EOF,FOLLOW_EOF_in_sourcePattern110); } @@ -438,7 +438,7 @@ public final SourcePatternRewriterParser.wherePattern_return wherePattern() thro // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:87:3: ( '{' ( triplesBlock )? ( ( graphPatternNotTriples | filter ) ( '.' )? ( triplesBlock )? )* '}' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:87:5: '{' ( triplesBlock )? ( ( graphPatternNotTriples | filter ) ( '.' )? ( triplesBlock )? )* '}' { - match(input,81,FOLLOW_81_in_wherePattern123); + match(input,81,FOLLOW_81_in_wherePattern123); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:87:9: ( triplesBlock )? int alt6=2; int LA6_0 = input.LA(1); @@ -529,7 +529,7 @@ else if ( (LA7_0==FILTER) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:87:58: '.' { - match(input,80,FOLLOW_80_in_wherePattern137); + match(input,80,FOLLOW_80_in_wherePattern137); } break; @@ -567,7 +567,7 @@ else if ( (LA7_0==FILTER) ) { } } while (true); - match(input,82,FOLLOW_82_in_wherePattern146); + match(input,82,FOLLOW_82_in_wherePattern146); } @@ -600,7 +600,7 @@ public final SourcePatternRewriterParser.groupGraphPattern_return groupGraphPatt // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:91:3: ( '{' ( triplesBlock )? ( ( graphPatternNotTriples | filter ) ( '.' )? ( triplesBlock )? )* '}' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:91:5: '{' ( triplesBlock )? ( ( graphPatternNotTriples | filter ) ( '.' )? ( triplesBlock )? )* '}' { - match(input,81,FOLLOW_81_in_groupGraphPattern159); + match(input,81,FOLLOW_81_in_groupGraphPattern159); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:91:9: ( triplesBlock )? int alt11=2; int LA11_0 = input.LA(1); @@ -691,7 +691,7 @@ else if ( (LA12_0==FILTER) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:91:58: '.' { - match(input,80,FOLLOW_80_in_groupGraphPattern173); + match(input,80,FOLLOW_80_in_groupGraphPattern173); } break; @@ -729,7 +729,7 @@ else if ( (LA12_0==FILTER) ) { } } while (true); - match(input,82,FOLLOW_82_in_groupGraphPattern182); + match(input,82,FOLLOW_82_in_groupGraphPattern182); } @@ -778,7 +778,7 @@ public final SourcePatternRewriterParser.triplesBlock_return triplesBlock() thro case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:95:26: '.' ( triplesBlock )? { - match(input,80,FOLLOW_80_in_triplesBlock201); + match(input,80,FOLLOW_80_in_triplesBlock201); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:95:30: ( triplesBlock )? int alt16=2; int LA16_0 = input.LA(1); @@ -926,7 +926,7 @@ public final SourcePatternRewriterParser.optionalGraphPattern_return optionalGra // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:103:3: ( OPTIONAL groupGraphPattern ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:103:5: OPTIONAL groupGraphPattern { - match(input,OPTIONAL,FOLLOW_OPTIONAL_in_optionalGraphPattern244); + match(input,OPTIONAL,FOLLOW_OPTIONAL_in_optionalGraphPattern244); pushFollow(FOLLOW_groupGraphPattern_in_optionalGraphPattern246); groupGraphPattern(); @@ -964,7 +964,7 @@ public final SourcePatternRewriterParser.graphGraphPattern_return graphGraphPatt // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:107:3: ( GRAPH varOrIriRef groupGraphPattern ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:107:5: GRAPH varOrIriRef groupGraphPattern { - match(input,GRAPH,FOLLOW_GRAPH_in_graphGraphPattern261); + match(input,GRAPH,FOLLOW_GRAPH_in_graphGraphPattern261); pushFollow(FOLLOW_varOrIriRef_in_graphGraphPattern263); varOrIriRef(); @@ -1027,7 +1027,7 @@ public final SourcePatternRewriterParser.groupOrUnionGraphPattern_return groupOr case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:111:25: UNION groupGraphPattern { - match(input,UNION,FOLLOW_UNION_in_groupOrUnionGraphPattern284); + match(input,UNION,FOLLOW_UNION_in_groupOrUnionGraphPattern284); pushFollow(FOLLOW_groupGraphPattern_in_groupOrUnionGraphPattern286); groupGraphPattern(); @@ -1074,7 +1074,7 @@ public final SourcePatternRewriterParser.filter_return filter() throws Recogniti // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:115:3: ( FILTER constraint ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:115:5: FILTER constraint { - match(input,FILTER,FOLLOW_FILTER_in_filter302); + match(input,FILTER,FOLLOW_FILTER_in_filter302); pushFollow(FOLLOW_constraint_in_filter304); constraint(); @@ -1269,14 +1269,14 @@ else if ( (LA22_0==83) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:127:5: NIL { - match(input,NIL,FOLLOW_NIL_in_argList357); + match(input,NIL,FOLLOW_NIL_in_argList357); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:127:11: '(' expression ( ',' expression )* ')' { - match(input,83,FOLLOW_83_in_argList361); + match(input,83,FOLLOW_83_in_argList361); pushFollow(FOLLOW_expression_in_argList363); expression(); @@ -1297,7 +1297,7 @@ else if ( (LA22_0==83) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:127:28: ',' expression { - match(input,84,FOLLOW_84_in_argList367); + match(input,84,FOLLOW_84_in_argList367); pushFollow(FOLLOW_expression_in_argList369); expression(); @@ -1312,7 +1312,7 @@ else if ( (LA22_0==83) ) { } } while (true); - match(input,85,FOLLOW_85_in_argList374); + match(input,85,FOLLOW_85_in_argList374); } break; @@ -1454,7 +1454,7 @@ public final SourcePatternRewriterParser.propertyListNotEmpty_return propertyLis case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:136:6: ';' ( verb objectList )? { - match(input,86,FOLLOW_86_in_propertyListNotEmpty425); + match(input,86,FOLLOW_86_in_propertyListNotEmpty425); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:136:10: ( verb objectList )? int alt24=2; int LA24_0 = input.LA(1); @@ -1600,7 +1600,7 @@ public final SourcePatternRewriterParser.objectList_return objectList() throws R case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:145:7: ',' o= object { - match(input,84,FOLLOW_84_in_objectList475); + match(input,84,FOLLOW_84_in_objectList475); pushFollow(FOLLOW_object_in_objectList479); o=object(); @@ -1712,7 +1712,7 @@ else if ( (LA28_0==87) ) { case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:155:5: 'a' { - match(input,87,FOLLOW_87_in_verb523); + match(input,87,FOLLOW_87_in_verb523); } break; @@ -1814,13 +1814,13 @@ public final SourcePatternRewriterParser.blankNodePropertyList_return blankNodeP // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:163:3: ( '[' propertyListNotEmpty ']' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:163:5: '[' propertyListNotEmpty ']' { - match(input,88,FOLLOW_88_in_blankNodePropertyList555); + match(input,88,FOLLOW_88_in_blankNodePropertyList555); pushFollow(FOLLOW_propertyListNotEmpty_in_blankNodePropertyList557); propertyListNotEmpty(); state._fsp--; - match(input,89,FOLLOW_89_in_blankNodePropertyList559); + match(input,89,FOLLOW_89_in_blankNodePropertyList559); } @@ -1853,7 +1853,7 @@ public final SourcePatternRewriterParser.collection_return collection() throws R // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:167:3: ( '(' ( graphNode )+ ')' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:167:5: '(' ( graphNode )+ ')' { - match(input,83,FOLLOW_83_in_collection574); + match(input,83,FOLLOW_83_in_collection574); // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:167:9: ( graphNode )+ int cnt30=0; loop30: @@ -1888,7 +1888,7 @@ public final SourcePatternRewriterParser.collection_return collection() throws R cnt30++; } while (true); - match(input,85,FOLLOW_85_in_collection579); + match(input,85,FOLLOW_85_in_collection579); } @@ -2142,7 +2142,7 @@ else if ( (LA34_0==VAR2) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:186:5: VAR1 { - VAR12=(Token)match(input,VAR1,FOLLOW_VAR1_in_var658); + VAR12=(Token)match(input,VAR1,FOLLOW_VAR1_in_var658); // TEMPLATE REWRITE @@ -2161,7 +2161,7 @@ else if ( (LA34_0==VAR2) ) { case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:187:5: VAR2 { - VAR23=(Token)match(input,VAR2,FOLLOW_VAR2_in_var676); + VAR23=(Token)match(input,VAR2,FOLLOW_VAR2_in_var676); // TEMPLATE REWRITE @@ -2318,7 +2318,7 @@ public final SourcePatternRewriterParser.graphTerm_return graphTerm() throws Rec case 6 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:192:66: NIL { - match(input,NIL,FOLLOW_NIL_in_graphTerm727); + match(input,NIL,FOLLOW_NIL_in_graphTerm727); } break; @@ -2410,7 +2410,7 @@ public final SourcePatternRewriterParser.conditionalOrExpression_return conditio case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:200:31: '||' conditionalAndExpression { - match(input,90,FOLLOW_90_in_conditionalOrExpression760); + match(input,90,FOLLOW_90_in_conditionalOrExpression760); pushFollow(FOLLOW_conditionalAndExpression_in_conditionalOrExpression762); conditionalAndExpression(); @@ -2477,7 +2477,7 @@ public final SourcePatternRewriterParser.conditionalAndExpression_return conditi case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:204:20: '&&' valueLogical { - match(input,91,FOLLOW_91_in_conditionalAndExpression783); + match(input,91,FOLLOW_91_in_conditionalAndExpression783); pushFollow(FOLLOW_valueLogical_in_conditionalAndExpression785); valueLogical(); @@ -2605,7 +2605,7 @@ public final SourcePatternRewriterParser.relationalExpression_return relationalE case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:213:25: '=' numericExpression { - match(input,92,FOLLOW_92_in_relationalExpression846); + match(input,92,FOLLOW_92_in_relationalExpression846); pushFollow(FOLLOW_numericExpression_in_relationalExpression848); numericExpression(); @@ -2617,7 +2617,7 @@ public final SourcePatternRewriterParser.relationalExpression_return relationalE case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:214:25: '!=' numericExpression { - match(input,93,FOLLOW_93_in_relationalExpression875); + match(input,93,FOLLOW_93_in_relationalExpression875); pushFollow(FOLLOW_numericExpression_in_relationalExpression877); numericExpression(); @@ -2629,7 +2629,7 @@ public final SourcePatternRewriterParser.relationalExpression_return relationalE case 3 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:215:25: '<' numericExpression { - match(input,94,FOLLOW_94_in_relationalExpression904); + match(input,94,FOLLOW_94_in_relationalExpression904); pushFollow(FOLLOW_numericExpression_in_relationalExpression906); numericExpression(); @@ -2641,7 +2641,7 @@ public final SourcePatternRewriterParser.relationalExpression_return relationalE case 4 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:216:25: '>' numericExpression { - match(input,95,FOLLOW_95_in_relationalExpression933); + match(input,95,FOLLOW_95_in_relationalExpression933); pushFollow(FOLLOW_numericExpression_in_relationalExpression935); numericExpression(); @@ -2653,7 +2653,7 @@ public final SourcePatternRewriterParser.relationalExpression_return relationalE case 5 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:217:25: '<=' numericExpression { - match(input,96,FOLLOW_96_in_relationalExpression962); + match(input,96,FOLLOW_96_in_relationalExpression962); pushFollow(FOLLOW_numericExpression_in_relationalExpression964); numericExpression(); @@ -2665,7 +2665,7 @@ public final SourcePatternRewriterParser.relationalExpression_return relationalE case 6 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:218:25: '>=' numericExpression { - match(input,97,FOLLOW_97_in_relationalExpression990); + match(input,97,FOLLOW_97_in_relationalExpression990); pushFollow(FOLLOW_numericExpression_in_relationalExpression992); numericExpression(); @@ -2787,7 +2787,7 @@ public final SourcePatternRewriterParser.additiveExpression_return additiveExpre case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:227:33: '+' multiplicativeExpression { - match(input,98,FOLLOW_98_in_additiveExpression1057); + match(input,98,FOLLOW_98_in_additiveExpression1057); pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1059); multiplicativeExpression(); @@ -2799,7 +2799,7 @@ public final SourcePatternRewriterParser.additiveExpression_return additiveExpre case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:228:33: '-' multiplicativeExpression { - match(input,99,FOLLOW_99_in_additiveExpression1093); + match(input,99,FOLLOW_99_in_additiveExpression1093); pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1095); multiplicativeExpression(); @@ -2891,7 +2891,7 @@ else if ( (LA40_0==101) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:235:24: '*' unaryExpression { - match(input,100,FOLLOW_100_in_multiplicativeExpression1219); + match(input,100,FOLLOW_100_in_multiplicativeExpression1219); pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression1221); unaryExpression(); @@ -2903,7 +2903,7 @@ else if ( (LA40_0==101) ) { case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:235:46: '/' unaryExpression { - match(input,101,FOLLOW_101_in_multiplicativeExpression1225); + match(input,101,FOLLOW_101_in_multiplicativeExpression1225); pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression1228); unaryExpression(); @@ -3011,7 +3011,7 @@ public final SourcePatternRewriterParser.unaryExpression_return unaryExpression( case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:239:6: '!' primaryExpression { - match(input,102,FOLLOW_102_in_unaryExpression1249); + match(input,102,FOLLOW_102_in_unaryExpression1249); pushFollow(FOLLOW_primaryExpression_in_unaryExpression1251); primaryExpression(); @@ -3023,7 +3023,7 @@ public final SourcePatternRewriterParser.unaryExpression_return unaryExpression( case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:240:6: '+' primaryExpression { - match(input,98,FOLLOW_98_in_unaryExpression1258); + match(input,98,FOLLOW_98_in_unaryExpression1258); pushFollow(FOLLOW_primaryExpression_in_unaryExpression1260); primaryExpression(); @@ -3035,7 +3035,7 @@ public final SourcePatternRewriterParser.unaryExpression_return unaryExpression( case 3 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:241:6: '-' primaryExpression { - match(input,99,FOLLOW_99_in_unaryExpression1267); + match(input,99,FOLLOW_99_in_unaryExpression1267); pushFollow(FOLLOW_primaryExpression_in_unaryExpression1269); primaryExpression(); @@ -3261,13 +3261,13 @@ public final SourcePatternRewriterParser.brackettedExpression_return brackettedE // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:256:4: ( '(' expression ')' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:256:6: '(' expression ')' { - match(input,83,FOLLOW_83_in_brackettedExpression1354); + match(input,83,FOLLOW_83_in_brackettedExpression1354); pushFollow(FOLLOW_expression_in_brackettedExpression1356); expression(); state._fsp--; - match(input,85,FOLLOW_85_in_brackettedExpression1358); + match(input,85,FOLLOW_85_in_brackettedExpression1358); } @@ -3366,152 +3366,152 @@ public final SourcePatternRewriterParser.builtInCall_return builtInCall() throws case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:260:6: STR '(' expression ')' { - match(input,STR,FOLLOW_STR_in_builtInCall1377); - match(input,83,FOLLOW_83_in_builtInCall1379); + match(input,STR,FOLLOW_STR_in_builtInCall1377); + match(input,83,FOLLOW_83_in_builtInCall1379); pushFollow(FOLLOW_expression_in_builtInCall1381); expression(); state._fsp--; - match(input,85,FOLLOW_85_in_builtInCall1383); + match(input,85,FOLLOW_85_in_builtInCall1383); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:261:6: LANG '(' expression ')' { - match(input,LANG,FOLLOW_LANG_in_builtInCall1390); - match(input,83,FOLLOW_83_in_builtInCall1392); + match(input,LANG,FOLLOW_LANG_in_builtInCall1390); + match(input,83,FOLLOW_83_in_builtInCall1392); pushFollow(FOLLOW_expression_in_builtInCall1394); expression(); state._fsp--; - match(input,85,FOLLOW_85_in_builtInCall1396); + match(input,85,FOLLOW_85_in_builtInCall1396); } break; case 3 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:262:6: LANGMATCHES '(' expression ',' expression ')' { - match(input,LANGMATCHES,FOLLOW_LANGMATCHES_in_builtInCall1403); - match(input,83,FOLLOW_83_in_builtInCall1405); + match(input,LANGMATCHES,FOLLOW_LANGMATCHES_in_builtInCall1403); + match(input,83,FOLLOW_83_in_builtInCall1405); pushFollow(FOLLOW_expression_in_builtInCall1407); expression(); state._fsp--; - match(input,84,FOLLOW_84_in_builtInCall1409); + match(input,84,FOLLOW_84_in_builtInCall1409); pushFollow(FOLLOW_expression_in_builtInCall1411); expression(); state._fsp--; - match(input,85,FOLLOW_85_in_builtInCall1413); + match(input,85,FOLLOW_85_in_builtInCall1413); } break; case 4 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:263:6: DATATYPE '(' expression ')' { - match(input,DATATYPE,FOLLOW_DATATYPE_in_builtInCall1420); - match(input,83,FOLLOW_83_in_builtInCall1422); + match(input,DATATYPE,FOLLOW_DATATYPE_in_builtInCall1420); + match(input,83,FOLLOW_83_in_builtInCall1422); pushFollow(FOLLOW_expression_in_builtInCall1424); expression(); state._fsp--; - match(input,85,FOLLOW_85_in_builtInCall1426); + match(input,85,FOLLOW_85_in_builtInCall1426); } break; case 5 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:264:6: BOUND '(' var ')' { - match(input,BOUND,FOLLOW_BOUND_in_builtInCall1433); - match(input,83,FOLLOW_83_in_builtInCall1435); + match(input,BOUND,FOLLOW_BOUND_in_builtInCall1433); + match(input,83,FOLLOW_83_in_builtInCall1435); pushFollow(FOLLOW_var_in_builtInCall1437); var(); state._fsp--; - match(input,85,FOLLOW_85_in_builtInCall1439); + match(input,85,FOLLOW_85_in_builtInCall1439); } break; case 6 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:265:6: SAMETERM '(' expression ',' expression ')' { - match(input,SAMETERM,FOLLOW_SAMETERM_in_builtInCall1446); - match(input,83,FOLLOW_83_in_builtInCall1448); + match(input,SAMETERM,FOLLOW_SAMETERM_in_builtInCall1446); + match(input,83,FOLLOW_83_in_builtInCall1448); pushFollow(FOLLOW_expression_in_builtInCall1450); expression(); state._fsp--; - match(input,84,FOLLOW_84_in_builtInCall1452); + match(input,84,FOLLOW_84_in_builtInCall1452); pushFollow(FOLLOW_expression_in_builtInCall1454); expression(); state._fsp--; - match(input,85,FOLLOW_85_in_builtInCall1456); + match(input,85,FOLLOW_85_in_builtInCall1456); } break; case 7 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:266:6: ISIRI '(' expression ')' { - match(input,ISIRI,FOLLOW_ISIRI_in_builtInCall1463); - match(input,83,FOLLOW_83_in_builtInCall1465); + match(input,ISIRI,FOLLOW_ISIRI_in_builtInCall1463); + match(input,83,FOLLOW_83_in_builtInCall1465); pushFollow(FOLLOW_expression_in_builtInCall1467); expression(); state._fsp--; - match(input,85,FOLLOW_85_in_builtInCall1469); + match(input,85,FOLLOW_85_in_builtInCall1469); } break; case 8 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:267:6: ISURI '(' expression ')' { - match(input,ISURI,FOLLOW_ISURI_in_builtInCall1476); - match(input,83,FOLLOW_83_in_builtInCall1478); + match(input,ISURI,FOLLOW_ISURI_in_builtInCall1476); + match(input,83,FOLLOW_83_in_builtInCall1478); pushFollow(FOLLOW_expression_in_builtInCall1480); expression(); state._fsp--; - match(input,85,FOLLOW_85_in_builtInCall1482); + match(input,85,FOLLOW_85_in_builtInCall1482); } break; case 9 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:268:6: ISBLANK '(' expression ')' { - match(input,ISBLANK,FOLLOW_ISBLANK_in_builtInCall1490); - match(input,83,FOLLOW_83_in_builtInCall1492); + match(input,ISBLANK,FOLLOW_ISBLANK_in_builtInCall1490); + match(input,83,FOLLOW_83_in_builtInCall1492); pushFollow(FOLLOW_expression_in_builtInCall1494); expression(); state._fsp--; - match(input,85,FOLLOW_85_in_builtInCall1496); + match(input,85,FOLLOW_85_in_builtInCall1496); } break; case 10 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:269:6: ISLITERAL '(' expression ')' { - match(input,ISLITERAL,FOLLOW_ISLITERAL_in_builtInCall1503); - match(input,83,FOLLOW_83_in_builtInCall1505); + match(input,ISLITERAL,FOLLOW_ISLITERAL_in_builtInCall1503); + match(input,83,FOLLOW_83_in_builtInCall1505); pushFollow(FOLLOW_expression_in_builtInCall1507); expression(); state._fsp--; - match(input,85,FOLLOW_85_in_builtInCall1509); + match(input,85,FOLLOW_85_in_builtInCall1509); } break; @@ -3557,14 +3557,14 @@ public final SourcePatternRewriterParser.regexExpression_return regexExpression( // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:274:4: ( REGEX '(' expression ',' expression ( ',' expression )? ')' ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:274:6: REGEX '(' expression ',' expression ( ',' expression )? ')' { - match(input,REGEX,FOLLOW_REGEX_in_regexExpression1536); - match(input,83,FOLLOW_83_in_regexExpression1538); + match(input,REGEX,FOLLOW_REGEX_in_regexExpression1536); + match(input,83,FOLLOW_83_in_regexExpression1538); pushFollow(FOLLOW_expression_in_regexExpression1540); expression(); state._fsp--; - match(input,84,FOLLOW_84_in_regexExpression1542); + match(input,84,FOLLOW_84_in_regexExpression1542); pushFollow(FOLLOW_expression_in_regexExpression1544); expression(); @@ -3581,7 +3581,7 @@ public final SourcePatternRewriterParser.regexExpression_return regexExpression( case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:274:43: ',' expression { - match(input,84,FOLLOW_84_in_regexExpression1547); + match(input,84,FOLLOW_84_in_regexExpression1547); pushFollow(FOLLOW_expression_in_regexExpression1549); expression(); @@ -3593,7 +3593,7 @@ public final SourcePatternRewriterParser.regexExpression_return regexExpression( } - match(input,85,FOLLOW_85_in_regexExpression1553); + match(input,85,FOLLOW_85_in_regexExpression1553); } @@ -3704,7 +3704,7 @@ else if ( (LA46_0==103) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:282:14: LANGTAG { - match(input,LANGTAG,FOLLOW_LANGTAG_in_rdfLiteral1597); + match(input,LANGTAG,FOLLOW_LANGTAG_in_rdfLiteral1597); } break; @@ -3714,7 +3714,7 @@ else if ( (LA46_0==103) ) { // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:282:24: ( '^^' iriRef ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:282:25: '^^' iriRef { - match(input,103,FOLLOW_103_in_rdfLiteral1602); + match(input,103,FOLLOW_103_in_rdfLiteral1602); pushFollow(FOLLOW_iriRef_in_rdfLiteral1604); iriRef(); @@ -4076,7 +4076,7 @@ else if ( (LA48_0==PNAME_LN) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:309:6: IRI_REF { - match(input,IRI_REF,FOLLOW_IRI_REF_in_iriRef1785); + match(input,IRI_REF,FOLLOW_IRI_REF_in_iriRef1785); } break; @@ -4124,7 +4124,7 @@ public final SourcePatternRewriterParser.prefixedName_return prefixedName() thro // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:314:4: (p= PNAME_LN ) // /home/andreas/code/mavenprojects/mapping/SourceForger2rApi/r2r/antlr-files/SourcePatternRewriter.g:314:6: p= PNAME_LN { - p=(Token)match(input,PNAME_LN,FOLLOW_PNAME_LN_in_prefixedName1813); + p=(Token)match(input,PNAME_LN,FOLLOW_PNAME_LN_in_prefixedName1813); } @@ -4185,7 +4185,7 @@ public final SourcePatternRewriterParser.blankNode_return blankNode() throws Rec // Delegated rules - + public static final BitSet FOLLOW_sourcePattern_in_rewrittenSourcePattern74 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_triplesBlock_in_sourcePattern89 = new BitSet(new long[]{0x00000000000000B0L,0x0000000000020000L}); @@ -4396,4 +4396,4 @@ public final SourcePatternRewriterParser.blankNode_return blankNode() throws Rec public static final BitSet FOLLOW_PNAME_LN_in_prefixedName1813 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_set_in_blankNode0 = new BitSet(new long[]{0x0000000000000002L}); -} \ No newline at end of file +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/TargetPatternLexer.java b/src/main/java/com/avengerpenguin/r2r/parser/TargetPatternLexer.java index fc2ad5f..1c18270 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/TargetPatternLexer.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/TargetPatternLexer.java @@ -61,14 +61,14 @@ public class TargetPatternLexer extends Lexer { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } @@ -76,7 +76,7 @@ public void reportError(RecognitionException re) { // delegates // delegators - public TargetPatternLexer() {;} + public TargetPatternLexer() {;} public TargetPatternLexer(CharStream input) { this(input, new RecognizerSharedState()); } @@ -94,7 +94,7 @@ public final void mT__48() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:26:7: ( '.' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:26:9: '.' { - match('.'); + match('.'); } @@ -114,7 +114,7 @@ public final void mT__49() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:27:7: ( 'a' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:27:9: 'a' { - match('a'); + match('a'); } @@ -134,7 +134,7 @@ public final void mT__50() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:28:7: ( '^^' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:28:9: '^^' { - match("^^"); + match("^^"); } @@ -155,10 +155,10 @@ public final void mTRUE() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:291:6: ( T R U E ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:291:8: T R U E { - mT(); - mR(); - mU(); - mE(); + mT(); + mR(); + mU(); + mE(); } @@ -178,11 +178,11 @@ public final void mFALSE() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:292:7: ( F A L S E ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:292:9: F A L S E { - mF(); - mA(); - mL(); - mS(); - mE(); + mF(); + mA(); + mL(); + mS(); + mE(); } @@ -423,7 +423,7 @@ public final void mIRI_REF() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:310:3: ( '<' (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* '>' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:310:5: '<' (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* '>' { - match('<'); + match('<'); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:310:9: (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* loop1: do { @@ -457,7 +457,7 @@ public final void mIRI_REF() throws RecognitionException { } } while (true); - match('>'); + match('>'); } @@ -488,14 +488,14 @@ public final void mPNAME_NS() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:314:5: PN_PREFIX { - mPN_PREFIX(); + mPN_PREFIX(); } break; } - match(':'); + match(':'); } @@ -515,8 +515,8 @@ public final void mPNAME_LN() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:318:3: ( PNAME_NS PN_LOCAL ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:318:5: PNAME_NS PN_LOCAL { - mPNAME_NS(); - mPN_LOCAL(); + mPNAME_NS(); + mPN_LOCAL(); } @@ -536,9 +536,9 @@ public final void mBLANK_NODE_LABEL() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:322:3: ( '_:' PN_LOCAL ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:322:5: '_:' PN_LOCAL { - match("_:"); + match("_:"); - mPN_LOCAL(); + mPN_LOCAL(); } @@ -558,8 +558,8 @@ public final void mVAR1() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:326:3: ( '?' VARNAME ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:326:5: '?' VARNAME { - match('?'); - mVARNAME(); + match('?'); + mVARNAME(); } @@ -579,8 +579,8 @@ public final void mVAR2() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:330:3: ( '$' VARNAME ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:330:5: '$' VARNAME { - match('$'); - mVARNAME(); + match('$'); + mVARNAME(); } @@ -600,10 +600,10 @@ public final void mVARIABLETERM() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:334:4: ( '?\\'' VARNAME '\\'' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:334:6: '?\\'' VARNAME '\\'' { - match("?'"); + match("?'"); - mVARNAME(); - match('\''); + mVARNAME(); + match('\''); } @@ -623,10 +623,10 @@ public final void mVARIABLEURI() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:338:4: ( '?<' VARNAME '>' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:338:6: '?<' VARNAME '>' { - match("?<"); + match("?<"); - mVARNAME(); - match('>'); + mVARNAME(); + match('>'); } @@ -646,7 +646,7 @@ public final void mLANGTAG() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:342:3: ( '@' ( 'a' .. 'z' | 'A' .. 'Z' )+ ( '-' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ )* ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:342:5: '@' ( 'a' .. 'z' | 'A' .. 'Z' )+ ( '-' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ )* { - match('@'); + match('@'); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:342:9: ( 'a' .. 'z' | 'A' .. 'Z' )+ int cnt3=0; loop3: @@ -700,7 +700,7 @@ public final void mLANGTAG() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:342:33: '-' ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ { - match('-'); + match('-'); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:342:37: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ int cnt4=0; loop4: @@ -783,7 +783,7 @@ public final void mINTEGER() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:346:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -849,7 +849,7 @@ else if ( (LA10_0=='.') ) { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:350:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -863,7 +863,7 @@ else if ( (LA10_0=='.') ) { cnt7++; } while (true); - match('.'); + match('.'); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:350:21: ( '0' .. '9' )* loop8: do { @@ -879,7 +879,7 @@ else if ( (LA10_0=='.') ) { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:350:22: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -895,7 +895,7 @@ else if ( (LA10_0=='.') ) { case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:350:35: '.' ( '0' .. '9' )+ { - match('.'); + match('.'); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:350:39: ( '0' .. '9' )+ int cnt9=0; loop9: @@ -912,7 +912,7 @@ else if ( (LA10_0=='.') ) { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:350:40: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -967,7 +967,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:354:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -981,7 +981,7 @@ public final void mDOUBLE() throws RecognitionException { cnt11++; } while (true); - match('.'); + match('.'); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:354:21: ( '0' .. '9' )* loop12: do { @@ -997,7 +997,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:354:22: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -1007,14 +1007,14 @@ public final void mDOUBLE() throws RecognitionException { } } while (true); - mEXPONENT(); + mEXPONENT(); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:355:5: '.' ( '0' .. '9' )+ EXPONENT { - match('.'); + match('.'); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:355:9: ( '0' .. '9' )+ int cnt13=0; loop13: @@ -1031,7 +1031,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:355:10: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -1045,7 +1045,7 @@ public final void mDOUBLE() throws RecognitionException { cnt13++; } while (true); - mEXPONENT(); + mEXPONENT(); } break; @@ -1068,7 +1068,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:356:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -1082,7 +1082,7 @@ public final void mDOUBLE() throws RecognitionException { cnt14++; } while (true); - mEXPONENT(); + mEXPONENT(); } break; @@ -1104,8 +1104,8 @@ public final void mINTEGER_POSITIVE() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:360:3: ( '+' INTEGER ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:360:5: '+' INTEGER { - match('+'); - mINTEGER(); + match('+'); + mINTEGER(); } @@ -1125,8 +1125,8 @@ public final void mDECIMAL_POSITIVE() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:364:3: ( '+' DECIMAL ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:364:5: '+' DECIMAL { - match('+'); - mDECIMAL(); + match('+'); + mDECIMAL(); } @@ -1146,8 +1146,8 @@ public final void mDOUBLE_POSITIVE() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:368:3: ( '+' DOUBLE ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:368:5: '+' DOUBLE { - match('+'); - mDOUBLE(); + match('+'); + mDOUBLE(); } @@ -1167,8 +1167,8 @@ public final void mINTEGER_NEGATIVE() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:372:3: ( '-' INTEGER ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:372:5: '-' INTEGER { - match('-'); - mINTEGER(); + match('-'); + mINTEGER(); } @@ -1188,8 +1188,8 @@ public final void mDECIMAL_NEGATIVE() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:376:3: ( '-' DECIMAL ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:376:5: '-' DECIMAL { - match('-'); - mDECIMAL(); + match('-'); + mDECIMAL(); } @@ -1209,8 +1209,8 @@ public final void mDOUBLE_NEGATIVE() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:380:3: ( '-' DOUBLE ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:380:5: '-' DOUBLE { - match('-'); - mDOUBLE(); + match('-'); + mDOUBLE(); } @@ -1230,7 +1230,7 @@ public final void mEXPONENT() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:384:3: ( E ( '+' | '-' )? ( '0' .. '9' )+ ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:384:5: E ( '+' | '-' )? ( '0' .. '9' )+ { - mE(); + mE(); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:384:7: ( '+' | '-' )? int alt16=2; int LA16_0 = input.LA(1); @@ -1273,7 +1273,7 @@ public final void mEXPONENT() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:384:21: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -1306,7 +1306,7 @@ public final void mSTRING_LITERAL1() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:388:3: ( '\\'' (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\\'' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:388:5: '\\'' (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\\'' { - match('\''); + match('\''); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:388:10: (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* loop18: do { @@ -1340,7 +1340,7 @@ else if ( (LA18_0=='\\') ) { case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:388:58: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -1350,7 +1350,7 @@ else if ( (LA18_0=='\\') ) { } } while (true); - match('\''); + match('\''); } @@ -1370,7 +1370,7 @@ public final void mSTRING_LITERAL2() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:392:3: ( '\"' (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\"' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:392:5: '\"' (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\"' { - match('\"'); + match('\"'); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:392:9: (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* loop19: do { @@ -1404,7 +1404,7 @@ else if ( (LA19_0=='\\') ) { case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:392:57: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -1414,7 +1414,7 @@ else if ( (LA19_0=='\\') ) { } } while (true); - match('\"'); + match('\"'); } @@ -1434,7 +1434,7 @@ public final void mSTRING_LITERAL_LONG1() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:396:3: ( '\\'\\'\\'' ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* '\\'\\'\\'' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:396:5: '\\'\\'\\'' ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* '\\'\\'\\'' { - match("'''"); + match("'''"); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:396:14: ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* loop22: @@ -1487,14 +1487,14 @@ else if ( ((LA20_1>='\u0000' && LA20_1<='&')||(LA20_1>='(' && LA20_1<='\uFFFF')) case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:396:17: '\\'' { - match('\''); + match('\''); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:396:24: '\\'\\'' { - match("''"); + match("''"); } @@ -1537,7 +1537,7 @@ else if ( (LA21_0=='\\') ) { case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:396:51: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -1553,7 +1553,7 @@ else if ( (LA21_0=='\\') ) { } } while (true); - match("'''"); + match("'''"); } @@ -1574,7 +1574,7 @@ public final void mSTRING_LITERAL_LONG2() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:400:3: ( '\"\"\"' ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* '\"\"\"' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:400:5: '\"\"\"' ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* '\"\"\"' { - match("\"\"\""); + match("\"\"\""); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:400:11: ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* loop25: @@ -1627,14 +1627,14 @@ else if ( ((LA23_1>='\u0000' && LA23_1<='!')||(LA23_1>='#' && LA23_1<='\uFFFF')) case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:400:14: '\"' { - match('\"'); + match('\"'); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:400:20: '\"\"' { - match("\"\""); + match("\"\""); } @@ -1677,7 +1677,7 @@ else if ( (LA24_0=='\\') ) { case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:400:44: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -1693,7 +1693,7 @@ else if ( (LA24_0=='\\') ) { } } while (true); - match("\"\"\""); + match("\"\"\""); } @@ -1714,7 +1714,7 @@ public final void mECHAR() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:404:3: ( '\\\\' ( 't' | 'b' | 'n' | 'r' | 'f' | '\\\\' | '\"' | '\\'' ) ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:404:5: '\\\\' ( 't' | 'b' | 'n' | 'r' | 'f' | '\\\\' | '\"' | '\\'' ) { - match('\\'); + match('\\'); if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) { input.consume(); @@ -1743,7 +1743,7 @@ public final void mANON() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:410:3: ( '[' ( WS )* ']' ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:410:5: '[' ( WS )* ']' { - match('['); + match('['); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:410:9: ( WS )* loop26: do { @@ -1759,7 +1759,7 @@ public final void mANON() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:410:9: WS { - mWS(); + mWS(); } break; @@ -1769,7 +1769,7 @@ public final void mANON() throws RecognitionException { } } while (true); - match(']'); + match(']'); } @@ -1898,7 +1898,7 @@ public final void mPN_PREFIX() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:438:3: ( PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:438:5: PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? { - mPN_CHARS_BASE(); + mPN_CHARS_BASE(); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:438:19: ( ( PN_CHARS | '.' )* PN_CHARS )? int alt29=2; int LA29_0 = input.LA(1); @@ -1952,7 +1952,7 @@ else if ( (LA28_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -2062,7 +2062,7 @@ else if ( (LA30_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -2110,7 +2110,7 @@ public final void mCOMMENT() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:455:9: ( '#' ( . )* ( '\\n' | '\\r' ) ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:455:11: '#' ( . )* ( '\\n' | '\\r' ) { - match('#'); + match('#'); // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:455:15: ( . )* loop32: do { @@ -2129,7 +2129,7 @@ else if ( ((LA32_0>='\u0000' && LA32_0<='\t')||(LA32_0>='\u000B' && LA32_0<='\f' case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:455:15: . { - matchAny(); + matchAny(); } break; @@ -2168,238 +2168,238 @@ public void mTokens() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:10: T__48 { - mT__48(); + mT__48(); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:16: T__49 { - mT__49(); + mT__49(); } break; case 3 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:22: T__50 { - mT__50(); + mT__50(); } break; case 4 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:28: TRUE { - mTRUE(); + mTRUE(); } break; case 5 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:33: FALSE { - mFALSE(); + mFALSE(); } break; case 6 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:39: WS { - mWS(); + mWS(); } break; case 7 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:42: IRI_REF { - mIRI_REF(); + mIRI_REF(); } break; case 8 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:50: PNAME_NS { - mPNAME_NS(); + mPNAME_NS(); } break; case 9 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:59: PNAME_LN { - mPNAME_LN(); + mPNAME_LN(); } break; case 10 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:68: BLANK_NODE_LABEL { - mBLANK_NODE_LABEL(); + mBLANK_NODE_LABEL(); } break; case 11 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:85: VAR1 { - mVAR1(); + mVAR1(); } break; case 12 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:90: VAR2 { - mVAR2(); + mVAR2(); } break; case 13 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:95: VARIABLETERM { - mVARIABLETERM(); + mVARIABLETERM(); } break; case 14 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:108: VARIABLEURI { - mVARIABLEURI(); + mVARIABLEURI(); } break; case 15 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:120: LANGTAG { - mLANGTAG(); + mLANGTAG(); } break; case 16 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:128: INTEGER { - mINTEGER(); + mINTEGER(); } break; case 17 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:136: DECIMAL { - mDECIMAL(); + mDECIMAL(); } break; case 18 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:144: DOUBLE { - mDOUBLE(); + mDOUBLE(); } break; case 19 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:151: INTEGER_POSITIVE { - mINTEGER_POSITIVE(); + mINTEGER_POSITIVE(); } break; case 20 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:168: DECIMAL_POSITIVE { - mDECIMAL_POSITIVE(); + mDECIMAL_POSITIVE(); } break; case 21 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:185: DOUBLE_POSITIVE { - mDOUBLE_POSITIVE(); + mDOUBLE_POSITIVE(); } break; case 22 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:201: INTEGER_NEGATIVE { - mINTEGER_NEGATIVE(); + mINTEGER_NEGATIVE(); } break; case 23 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:218: DECIMAL_NEGATIVE { - mDECIMAL_NEGATIVE(); + mDECIMAL_NEGATIVE(); } break; case 24 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:235: DOUBLE_NEGATIVE { - mDOUBLE_NEGATIVE(); + mDOUBLE_NEGATIVE(); } break; case 25 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:251: EXPONENT { - mEXPONENT(); + mEXPONENT(); } break; case 26 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:260: STRING_LITERAL1 { - mSTRING_LITERAL1(); + mSTRING_LITERAL1(); } break; case 27 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:276: STRING_LITERAL2 { - mSTRING_LITERAL2(); + mSTRING_LITERAL2(); } break; case 28 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:292: STRING_LITERAL_LONG1 { - mSTRING_LITERAL_LONG1(); + mSTRING_LITERAL_LONG1(); } break; case 29 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:313: STRING_LITERAL_LONG2 { - mSTRING_LITERAL_LONG2(); + mSTRING_LITERAL_LONG2(); } break; case 30 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:334: ECHAR { - mECHAR(); + mECHAR(); } break; case 31 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:340: ANON { - mANON(); + mANON(); } break; case 32 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:345: VARNAME { - mVARNAME(); + mVARNAME(); } break; case 33 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:353: PN_PREFIX { - mPN_PREFIX(); + mPN_PREFIX(); } break; case 34 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:1:363: COMMENT { - mCOMMENT(); + mCOMMENT(); } break; @@ -2711,7 +2711,7 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc IntStream input = _input; int _s = s; switch ( s ) { - case 0 : + case 0 : int LA33_19 = input.LA(1); s = -1; @@ -2721,7 +2721,7 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc if ( s>=0 ) return s; break; - case 1 : + case 1 : int LA33_18 = input.LA(1); s = -1; @@ -2738,6 +2738,6 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc throw nvae; } } - -} \ No newline at end of file + +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/TargetPatternParser.java b/src/main/java/com/avengerpenguin/r2r/parser/TargetPatternParser.java index 5076ee6..11860e0 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/TargetPatternParser.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/TargetPatternParser.java @@ -1,7 +1,7 @@ // $ANTLR 3.2 Sep 23, 2009 12:02:23 /home/andreas/projects/r2r/antlr-files/TargetPattern.g 2012-02-23 14:53:37 package com.avengerpenguin.r2r.parser; - + import com.avengerpenguin.r2r.PrefixMapper; import com.avengerpenguin.r2r.TargetPattern; import com.avengerpenguin.r2r.Triple; @@ -84,9 +84,9 @@ public TargetPatternParser(TokenStream input) { } public TargetPatternParser(TokenStream input, RecognizerSharedState state) { super(input, state); - + } - + public String[] getTokenNames() { return TargetPatternParser.tokenNames; } public String getGrammarFileName() { return "/home/andreas/projects/r2r/antlr-files/TargetPattern.g"; } @@ -98,26 +98,26 @@ public TargetPatternParser(TokenStream input, RecognizerSharedState state) { Set props = new HashSet(); Set cls = new HashSet(); Map datatypeHints = new HashMap(); - + public void setPrefixMapper(PrefixMapper pm) { prefixMapper = pm; } - + public void setGeneratedVariables(Set variableNames) { generatedVariables = variableNames; } - + public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } @@ -150,7 +150,7 @@ public final TargetPatternParser.targetPattern_return targetPattern() throws Rec state._fsp--; - List triples = first; + List triples = first; // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:76:5: ( '.' more= tripleOrPath )* loop1: do { @@ -166,13 +166,13 @@ public final TargetPatternParser.targetPattern_return targetPattern() throws Rec case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:77:7: '.' more= tripleOrPath { - match(input,48,FOLLOW_48_in_targetPattern81); + match(input,48,FOLLOW_48_in_targetPattern81); pushFollow(FOLLOW_tripleOrPath_in_targetPattern85); more=tripleOrPath(); state._fsp--; - triples.addAll(more); + triples.addAll(more); } break; @@ -182,13 +182,13 @@ public final TargetPatternParser.targetPattern_return targetPattern() throws Rec } } while (true); - match(input,EOF,FOLLOW_EOF_in_targetPattern114); + match(input,EOF,FOLLOW_EOF_in_targetPattern114); retval.pattern = new TargetPattern(triples); retval.variableDependencies = variables; retval.classes = cls; retval.properties = props; retval.hints = datatypeHints; - + } @@ -237,7 +237,7 @@ else if ( ((LA3_0>=VARIABLEURI && LA3_0<=VAR2)||(LA3_0>=IRI_REF && LA3_0<=ANON)) } switch (alt3) { case 1 : - // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:91:5: + // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:91:5: { } break; @@ -259,7 +259,7 @@ else if ( ((LA3_0>=VARIABLEURI && LA3_0<=VAR2)||(LA3_0>=IRI_REF && LA3_0<=ANON)) TripleElement sElement = s; TripleElement vElement = v; props.add(vElement.getValue(0)); - + // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:97:7: (s= subject v= verb )* loop2: do { @@ -287,7 +287,7 @@ else if ( ((LA3_0>=VARIABLEURI && LA3_0<=VAR2)||(LA3_0>=IRI_REF && LA3_0<=ANON)) sElement = oElement; vElement = v; props.add(vElement.getValue(0)); - + } break; @@ -304,7 +304,7 @@ else if ( ((LA3_0>=VARIABLEURI && LA3_0<=VAR2)||(LA3_0>=IRI_REF && LA3_0<=ANON)) String property = vElement.getValue(0); - String classURI = null; + String classURI = null; if(property.equals("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")) { cls.add(o.getValue(0)); classURI = o.getValue(0); @@ -312,7 +312,7 @@ else if ( ((LA3_0>=VARIABLEURI && LA3_0<=VAR2)||(LA3_0>=IRI_REF && LA3_0<=ANON)) triples.add(new Triple(sElement, vElement, o, property, classURI)); value = triples; - + } break; @@ -372,13 +372,13 @@ else if ( (LA4_0==VARIABLEURI) ) { case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:134:5: VARIABLEURI { - VARIABLEURI2=(Token)match(input,VARIABLEURI,FOLLOW_VARIABLEURI_in_subject239); + VARIABLEURI2=(Token)match(input,VARIABLEURI,FOLLOW_VARIABLEURI_in_subject239); String v = (VARIABLEURI2!=null?VARIABLEURI2.getText():null); - v = v.substring(2, v.length()-1); - value = new TripleElement(TripleElement.Type.IRIVARIABLE, v); + v = v.substring(2, v.length()-1); + value = new TripleElement(TripleElement.Type.IRIVARIABLE, v); variables.add(v); - + } break; @@ -430,15 +430,15 @@ else if ( (LA5_0==49) ) { state._fsp--; - value = new TripleElement(TripleElement.Type.IRI, iriRef3); + value = new TripleElement(TripleElement.Type.IRI, iriRef3); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:145:5: 'a' { - match(input,49,FOLLOW_49_in_verb272); - value = new TripleElement(TripleElement.Type.IRI, PrintUtil.expandQname("rdf:type")); + match(input,49,FOLLOW_49_in_verb272); + value = new TripleElement(TripleElement.Type.IRI, PrintUtil.expandQname("rdf:type")); } break; @@ -491,19 +491,19 @@ else if ( (LA6_0==VARIABLEURI) ) { state._fsp--; - value = varOrTerm4; + value = varOrTerm4; } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:150:5: VARIABLEURI { - VARIABLEURI5=(Token)match(input,VARIABLEURI,FOLLOW_VARIABLEURI_in_object301); + VARIABLEURI5=(Token)match(input,VARIABLEURI,FOLLOW_VARIABLEURI_in_object301); String v = (VARIABLEURI5!=null?VARIABLEURI5.getText():null); - v = v.substring(2, v.length()-1); + v = v.substring(2, v.length()-1); value = new TripleElement(TripleElement.Type.IRIVARIABLE, v); variables.add(v); - + } break; @@ -557,7 +557,7 @@ else if ( (LA7_0==VARIABLETERM||(LA7_0>=INTEGER && LA7_0<=ANON)) ) { state._fsp--; - value = var6; + value = var6; } break; @@ -569,7 +569,7 @@ else if ( (LA7_0==VARIABLETERM||(LA7_0>=INTEGER && LA7_0<=ANON)) ) { state._fsp--; - value = graphTerm7; + value = graphTerm7; } break; @@ -637,7 +637,7 @@ public final TripleElement varOrIriRefOrBlankNode() throws RecognitionException state._fsp--; - value = var8; + value = var8; } break; @@ -649,7 +649,7 @@ public final TripleElement varOrIriRefOrBlankNode() throws RecognitionException state._fsp--; - value = new TripleElement(TripleElement.Type.IRI, iriRef9); + value = new TripleElement(TripleElement.Type.IRI, iriRef9); } break; @@ -661,7 +661,7 @@ public final TripleElement varOrIriRefOrBlankNode() throws RecognitionException state._fsp--; - value = blankNode10; + value = blankNode10; } break; @@ -708,7 +708,7 @@ else if ( (LA9_0==VAR2) ) { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:170:5: VAR1 { - VAR111=(Token)match(input,VAR1,FOLLOW_VAR1_in_var392); + VAR111=(Token)match(input,VAR1,FOLLOW_VAR1_in_var392); value = new TripleElement(TripleElement.Type.VARIABLE, (VAR111!=null?VAR111.getText():null).substring(1)); variables.add((VAR111!=null?VAR111.getText():null).substring(1)); } @@ -716,7 +716,7 @@ else if ( (LA9_0==VAR2) ) { case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:171:5: VAR2 { - VAR212=(Token)match(input,VAR2,FOLLOW_VAR2_in_var400); + VAR212=(Token)match(input,VAR2,FOLLOW_VAR2_in_var400); value = new TripleElement(TripleElement.Type.VARIABLE, (VAR212!=null?VAR212.getText():null).substring(1)); variables.add((VAR212!=null?VAR212.getText():null).substring(1)); } @@ -811,7 +811,7 @@ public final TripleElement graphTerm() throws RecognitionException { state._fsp--; - value = new TripleElement(TripleElement.Type.IRI, iriRef13); + value = new TripleElement(TripleElement.Type.IRI, iriRef13); } break; @@ -823,7 +823,7 @@ public final TripleElement graphTerm() throws RecognitionException { state._fsp--; - value = rdfLiteral14; + value = rdfLiteral14; } break; @@ -835,7 +835,7 @@ public final TripleElement graphTerm() throws RecognitionException { state._fsp--; - value = numericLiteral15; + value = numericLiteral15; } break; @@ -847,7 +847,7 @@ public final TripleElement graphTerm() throws RecognitionException { state._fsp--; - value = booleanLiteral16; + value = booleanLiteral16; } break; @@ -859,7 +859,7 @@ public final TripleElement graphTerm() throws RecognitionException { state._fsp--; - value = blankNode17; + value = blankNode17; } break; @@ -893,7 +893,7 @@ public final TripleElement rdfLiteral() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:183:4: ( (s= string | VARIABLETERM ) (l= LANGTAG | ( '^^' i= iriRef ) )? ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:183:6: (s= string | VARIABLETERM ) (l= LANGTAG | ( '^^' i= iriRef ) )? { - String v=null; TripleElement.Type vType = null; + String v=null; TripleElement.Type vType = null; // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:184:8: (s= string | VARIABLETERM ) int alt11=2; int LA11_0 = input.LA(1); @@ -919,15 +919,15 @@ else if ( (LA11_0==VARIABLETERM) ) { state._fsp--; - v = s; vType = TripleElement.Type.STRING; + v = s; vType = TripleElement.Type.STRING; } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:186:8: VARIABLETERM { - VARIABLETERM18=(Token)match(input,VARIABLETERM,FOLLOW_VARIABLETERM_in_rdfLiteral508); - v = (VARIABLETERM18!=null?VARIABLETERM18.getText():null); v = v.substring(2, v.length()-1); variables.add(v); vType = TripleElement.Type.STRINGVARIABLE; + VARIABLETERM18=(Token)match(input,VARIABLETERM,FOLLOW_VARIABLETERM_in_rdfLiteral508); + v = (VARIABLETERM18!=null?VARIABLETERM18.getText():null); v = v.substring(2, v.length()-1); variables.add(v); vType = TripleElement.Type.STRINGVARIABLE; } break; @@ -948,13 +948,13 @@ else if ( (LA12_0==50) ) { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:189:7: l= LANGTAG { - l=(Token)match(input,LANGTAG,FOLLOW_LANGTAG_in_rdfLiteral537); - + l=(Token)match(input,LANGTAG,FOLLOW_LANGTAG_in_rdfLiteral537); + if(vType==TripleElement.Type.STRING) value = new TripleElement(TripleElement.Type.LANGTAGSTRING, v, (l!=null?l.getText():null).substring(1)); else value = new TripleElement(TripleElement.Type.LANGTAGVARIABLE, v, (l!=null?l.getText():null).substring(1)); - + } break; @@ -964,20 +964,20 @@ else if ( (LA12_0==50) ) { // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:197:8: ( '^^' i= iriRef ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:197:9: '^^' i= iriRef { - match(input,50,FOLLOW_50_in_rdfLiteral563); + match(input,50,FOLLOW_50_in_rdfLiteral563); pushFollow(FOLLOW_iriRef_in_rdfLiteral567); i=iriRef(); state._fsp--; - + if(vType==TripleElement.Type.STRING) value = new TripleElement(TripleElement.Type.DATATYPESTRING, v, i); else { value = new TripleElement(TripleElement.Type.DATATYPEVARIABLE, v, i); datatypeHints.put(v, i); } - + } @@ -990,7 +990,7 @@ else if ( (LA12_0==50) ) { if(value==null) value = new TripleElement(vType, v); - + } @@ -1134,24 +1134,24 @@ public final TripleElement numericLiteralUnsigned() throws RecognitionException case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:220:6: v= INTEGER { - v=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_numericLiteralUnsigned671); - value = new TripleElement(TripleElement.Type.INTEGER, (v!=null?v.getText():null)); + v=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_numericLiteralUnsigned671); + value = new TripleElement(TripleElement.Type.INTEGER, (v!=null?v.getText():null)); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:221:6: v= DECIMAL { - v=(Token)match(input,DECIMAL,FOLLOW_DECIMAL_in_numericLiteralUnsigned682); - value = new TripleElement(TripleElement.Type.DECIMAL, (v!=null?v.getText():null)); + v=(Token)match(input,DECIMAL,FOLLOW_DECIMAL_in_numericLiteralUnsigned682); + value = new TripleElement(TripleElement.Type.DECIMAL, (v!=null?v.getText():null)); } break; case 3 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:222:6: v= DOUBLE { - v=(Token)match(input,DOUBLE,FOLLOW_DOUBLE_in_numericLiteralUnsigned693); - value = new TripleElement(TripleElement.Type.DOUBLE, (v!=null?v.getText():null)); + v=(Token)match(input,DOUBLE,FOLLOW_DOUBLE_in_numericLiteralUnsigned693); + value = new TripleElement(TripleElement.Type.DOUBLE, (v!=null?v.getText():null)); } break; @@ -1206,24 +1206,24 @@ public final TripleElement numericLiteralPositive() throws RecognitionException case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:226:6: v= INTEGER_POSITIVE { - v=(Token)match(input,INTEGER_POSITIVE,FOLLOW_INTEGER_POSITIVE_in_numericLiteralPositive720); - value = new TripleElement(TripleElement.Type.INTEGER, (v!=null?v.getText():null)); + v=(Token)match(input,INTEGER_POSITIVE,FOLLOW_INTEGER_POSITIVE_in_numericLiteralPositive720); + value = new TripleElement(TripleElement.Type.INTEGER, (v!=null?v.getText():null)); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:227:6: v= DECIMAL_POSITIVE { - v=(Token)match(input,DECIMAL_POSITIVE,FOLLOW_DECIMAL_POSITIVE_in_numericLiteralPositive731); - value = new TripleElement(TripleElement.Type.DECIMAL, (v!=null?v.getText():null)); + v=(Token)match(input,DECIMAL_POSITIVE,FOLLOW_DECIMAL_POSITIVE_in_numericLiteralPositive731); + value = new TripleElement(TripleElement.Type.DECIMAL, (v!=null?v.getText():null)); } break; case 3 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:228:6: v= DOUBLE_POSITIVE { - v=(Token)match(input,DOUBLE_POSITIVE,FOLLOW_DOUBLE_POSITIVE_in_numericLiteralPositive742); - value = new TripleElement(TripleElement.Type.DOUBLE, (v!=null?v.getText():null)); + v=(Token)match(input,DOUBLE_POSITIVE,FOLLOW_DOUBLE_POSITIVE_in_numericLiteralPositive742); + value = new TripleElement(TripleElement.Type.DOUBLE, (v!=null?v.getText():null)); } break; @@ -1278,24 +1278,24 @@ public final TripleElement numericLiteralNegative() throws RecognitionException case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:232:6: v= INTEGER_NEGATIVE { - v=(Token)match(input,INTEGER_NEGATIVE,FOLLOW_INTEGER_NEGATIVE_in_numericLiteralNegative769); - value = new TripleElement(TripleElement.Type.INTEGER, (v!=null?v.getText():null)); + v=(Token)match(input,INTEGER_NEGATIVE,FOLLOW_INTEGER_NEGATIVE_in_numericLiteralNegative769); + value = new TripleElement(TripleElement.Type.INTEGER, (v!=null?v.getText():null)); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:233:6: v= DECIMAL_NEGATIVE { - v=(Token)match(input,DECIMAL_NEGATIVE,FOLLOW_DECIMAL_NEGATIVE_in_numericLiteralNegative780); - value = new TripleElement(TripleElement.Type.DECIMAL, (v!=null?v.getText():null)); + v=(Token)match(input,DECIMAL_NEGATIVE,FOLLOW_DECIMAL_NEGATIVE_in_numericLiteralNegative780); + value = new TripleElement(TripleElement.Type.DECIMAL, (v!=null?v.getText():null)); } break; case 3 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:234:6: v= DOUBLE_NEGATIVE { - v=(Token)match(input,DOUBLE_NEGATIVE,FOLLOW_DOUBLE_NEGATIVE_in_numericLiteralNegative791); - value = new TripleElement(TripleElement.Type.DOUBLE, (v!=null?v.getText():null)); + v=(Token)match(input,DOUBLE_NEGATIVE,FOLLOW_DOUBLE_NEGATIVE_in_numericLiteralNegative791); + value = new TripleElement(TripleElement.Type.DOUBLE, (v!=null?v.getText():null)); } break; @@ -1339,16 +1339,16 @@ else if ( (LA17_0==FALSE) ) { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:238:6: TRUE { - match(input,TRUE,FOLLOW_TRUE_in_booleanLiteral816); - value = new TripleElement(TripleElement.Type.BOOLEAN, "true"); + match(input,TRUE,FOLLOW_TRUE_in_booleanLiteral816); + value = new TripleElement(TripleElement.Type.BOOLEAN, "true"); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:239:6: FALSE { - match(input,FALSE,FOLLOW_FALSE_in_booleanLiteral825); - value = new TripleElement(TripleElement.Type.BOOLEAN, "false"); + match(input,FALSE,FOLLOW_FALSE_in_booleanLiteral825); + value = new TripleElement(TripleElement.Type.BOOLEAN, "false"); } break; @@ -1408,32 +1408,32 @@ public final String string() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:243:6: s= STRING_LITERAL1 { - s=(Token)match(input,STRING_LITERAL1,FOLLOW_STRING_LITERAL1_in_string852); - String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(1, temp.length() - 1)); + s=(Token)match(input,STRING_LITERAL1,FOLLOW_STRING_LITERAL1_in_string852); + String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(1, temp.length() - 1)); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:244:6: s= STRING_LITERAL2 { - s=(Token)match(input,STRING_LITERAL2,FOLLOW_STRING_LITERAL2_in_string863); - String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(1, temp.length() - 1)); + s=(Token)match(input,STRING_LITERAL2,FOLLOW_STRING_LITERAL2_in_string863); + String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(1, temp.length() - 1)); } break; case 3 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:245:6: s= STRING_LITERAL_LONG1 { - s=(Token)match(input,STRING_LITERAL_LONG1,FOLLOW_STRING_LITERAL_LONG1_in_string874); - String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); + s=(Token)match(input,STRING_LITERAL_LONG1,FOLLOW_STRING_LITERAL_LONG1_in_string874); + String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); } break; case 4 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:246:6: s= STRING_LITERAL_LONG2 { - s=(Token)match(input,STRING_LITERAL_LONG2,FOLLOW_STRING_LITERAL_LONG2_in_string885); - String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); + s=(Token)match(input,STRING_LITERAL_LONG2,FOLLOW_STRING_LITERAL_LONG2_in_string885); + String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); } break; @@ -1481,11 +1481,11 @@ else if ( (LA19_0==PNAME_LN) ) { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:250:6: IRI_REF { - IRI_REF19=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_iriRef908); - + IRI_REF19=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_iriRef908); + String iri = (IRI_REF19!=null?IRI_REF19.getText():null); value = iri.substring(1, iri.length()-1); - + } break; @@ -1497,7 +1497,7 @@ else if ( (LA19_0==PNAME_LN) ) { state._fsp--; - + String qName = (prefixedName20!=null?input.toString(prefixedName20.start,prefixedName20.stop):null); String iri = PrintUtil.expandQname(qName); if(qName.equals(iri)) @@ -1511,12 +1511,12 @@ else if ( (LA19_0==PNAME_LN) ) { value = iri; else value = iri + prefixAndName[1]; - } + } } else { value = iri; } - + } break; @@ -1549,8 +1549,8 @@ public final TargetPatternParser.prefixedName_return prefixedName() throws Recog // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:279:4: ( PNAME_LN ) // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:279:6: PNAME_LN { - PNAME_LN21=(Token)match(input,PNAME_LN,FOLLOW_PNAME_LN_in_prefixedName951); - retval.value = (PNAME_LN21!=null?PNAME_LN21.getText():null); + PNAME_LN21=(Token)match(input,PNAME_LN,FOLLOW_PNAME_LN_in_prefixedName951); + retval.value = (PNAME_LN21!=null?PNAME_LN21.getText():null); } @@ -1596,16 +1596,16 @@ else if ( (LA20_0==ANON) ) { case 1 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:283:6: BLANK_NODE_LABEL { - BLANK_NODE_LABEL22=(Token)match(input,BLANK_NODE_LABEL,FOLLOW_BLANK_NODE_LABEL_in_blankNode976); - value = new TripleElement(TripleElement.Type.BLANKNODE, (BLANK_NODE_LABEL22!=null?BLANK_NODE_LABEL22.getText():null).substring(2)); + BLANK_NODE_LABEL22=(Token)match(input,BLANK_NODE_LABEL,FOLLOW_BLANK_NODE_LABEL_in_blankNode976); + value = new TripleElement(TripleElement.Type.BLANKNODE, (BLANK_NODE_LABEL22!=null?BLANK_NODE_LABEL22.getText():null).substring(2)); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/TargetPattern.g:284:6: ANON { - match(input,ANON,FOLLOW_ANON_in_blankNode985); - value = new TripleElement(TripleElement.Type.BLANKNODE, null); + match(input,ANON,FOLLOW_ANON_in_blankNode985); + value = new TripleElement(TripleElement.Type.BLANKNODE, null); } break; @@ -1684,7 +1684,7 @@ public String getDescription() { return "()* loopback of 97:7: (s= subject v= verb )*"; } } - + public static final BitSet FOLLOW_tripleOrPath_in_targetPattern64 = new BitSet(new long[]{0x0001000000000000L}); public static final BitSet FOLLOW_48_in_targetPattern81 = new BitSet(new long[]{0x000100000F000070L}); @@ -1742,4 +1742,4 @@ public String getDescription() { public static final BitSet FOLLOW_BLANK_NODE_LABEL_in_blankNode976 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ANON_in_blankNode985 = new BitSet(new long[]{0x0000000000000002L}); -} \ No newline at end of file +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyDiscoveryLexer.java b/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyDiscoveryLexer.java index af77152..411046a 100755 --- a/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyDiscoveryLexer.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyDiscoveryLexer.java @@ -46,14 +46,14 @@ public class TargetVocabularyDiscoveryLexer extends Lexer { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } @@ -61,7 +61,7 @@ public void reportError(RecognitionException re) { // delegates // delegators - public TargetVocabularyDiscoveryLexer() {;} + public TargetVocabularyDiscoveryLexer() {;} public TargetVocabularyDiscoveryLexer(CharStream input) { this(input, new RecognizerSharedState()); } @@ -79,7 +79,7 @@ public final void mT__13() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:26:7: ( '(' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:26:9: '(' { - match('('); + match('('); } @@ -99,7 +99,7 @@ public final void mT__14() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:27:7: ( ',' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:27:9: ',' { - match(','); + match(','); } @@ -119,7 +119,7 @@ public final void mT__15() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:28:7: ( ')' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:28:9: ')' { - match(')'); + match(')'); } @@ -139,7 +139,7 @@ public final void mT__16() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:29:7: ( '^' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:29:9: '^' { - match('^'); + match('^'); } @@ -159,7 +159,7 @@ public final void mT__17() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:30:7: ( '.' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:30:9: '.' { - match('.'); + match('.'); } @@ -179,7 +179,7 @@ public final void mT__18() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:31:7: ( '@prefix' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:31:9: '@prefix' { - match("@prefix"); + match("@prefix"); } @@ -229,7 +229,7 @@ public final void mIRI_REF() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:139:3: ( '<' (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* '>' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:139:5: '<' (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* '>' { - match('<'); + match('<'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:139:9: (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* loop1: do { @@ -263,7 +263,7 @@ public final void mIRI_REF() throws RecognitionException { } } while (true); - match('>'); + match('>'); } @@ -283,8 +283,8 @@ public final void mPNAME_LN() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:143:3: ( PNAME_NS PN_LOCAL ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:143:5: PNAME_NS PN_LOCAL { - mPNAME_NS(); - mPN_LOCAL(); + mPNAME_NS(); + mPN_LOCAL(); } @@ -304,8 +304,8 @@ public final void mPNAME_NS() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:147:3: ( PN_PREFIX ':' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:147:5: PN_PREFIX ':' { - mPN_PREFIX(); - match(':'); + mPN_PREFIX(); + match(':'); } @@ -433,7 +433,7 @@ else if ( (LA2_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -457,7 +457,7 @@ public final void mPN_PREFIX() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:175:3: ( PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:175:5: PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? { - mPN_CHARS_BASE(); + mPN_CHARS_BASE(); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:175:19: ( ( PN_CHARS | '.' )* PN_CHARS )? int alt5=2; int LA5_0 = input.LA(1); @@ -511,7 +511,7 @@ else if ( (LA4_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -561,77 +561,77 @@ public void mTokens() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:10: T__13 { - mT__13(); + mT__13(); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:16: T__14 { - mT__14(); + mT__14(); } break; case 3 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:22: T__15 { - mT__15(); + mT__15(); } break; case 4 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:28: T__16 { - mT__16(); + mT__16(); } break; case 5 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:34: T__17 { - mT__17(); + mT__17(); } break; case 6 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:40: T__18 { - mT__18(); + mT__18(); } break; case 7 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:46: WS { - mWS(); + mWS(); } break; case 8 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:49: IRI_REF { - mIRI_REF(); + mIRI_REF(); } break; case 9 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:57: PNAME_LN { - mPNAME_LN(); + mPNAME_LN(); } break; case 10 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:66: PNAME_NS { - mPNAME_NS(); + mPNAME_NS(); } break; case 11 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:1:75: PN_PREFIX { - mPN_PREFIX(); + mPN_PREFIX(); } break; @@ -727,6 +727,6 @@ public String getDescription() { return "1:1: Tokens : ( T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | WS | IRI_REF | PNAME_LN | PNAME_NS | PN_PREFIX );"; } } - -} \ No newline at end of file + +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyDiscoveryParser.java b/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyDiscoveryParser.java index 768f8b4..14aac56 100755 --- a/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyDiscoveryParser.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyDiscoveryParser.java @@ -18,7 +18,7 @@ // $ANTLR 3.2 Sep 23, 2009 12:02:23 /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g 2010-07-19 12:16:41 package com.avengerpenguin.r2r.parser; - + import java.util.Set; import java.util.HashSet; import java.util.Map; @@ -65,9 +65,9 @@ public TargetVocabularyDiscoveryParser(TokenStream input) { } public TargetVocabularyDiscoveryParser(TokenStream input, RecognizerSharedState state) { super(input, state); - + } - + public String[] getTokenNames() { return TargetVocabularyDiscoveryParser.tokenNames; } public String getGrammarFileName() { return "/home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g"; } @@ -78,14 +78,14 @@ public TargetVocabularyDiscoveryParser(TokenStream input, RecognizerSharedState public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } @@ -130,7 +130,7 @@ public final Collection targetVocabulary() throws Rec state._fsp--; - targetVocabularies = v; + targetVocabularies = v; } @@ -158,7 +158,7 @@ public final Collection vocabularyDefs() throws Recog // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:63:3: ( ( vocabularyDef )* ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:64:4: ( vocabularyDef )* { - value = new ArrayList(); + value = new ArrayList(); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:65:4: ( vocabularyDef )* loop2: do { @@ -181,7 +181,7 @@ public final Collection vocabularyDefs() throws Recog value.add(vocabularyDef1); - + } break; @@ -223,8 +223,8 @@ public final DiscoveryTargetVocabulary vocabularyDef() throws RecognitionExcepti String dataset = null; Map termDatasetPairs = new HashMap(); - - match(input,13,FOLLOW_13_in_vocabularyDef136); + + match(input,13,FOLLOW_13_in_vocabularyDef136); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:78:8: (entity= termWithDataset ( ',' entity= termWithDataset )* )? int alt4=2; int LA4_0 = input.LA(1); @@ -257,7 +257,7 @@ public final DiscoveryTargetVocabulary vocabularyDef() throws RecognitionExcepti case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:79:6: ',' entity= termWithDataset { - match(input,14,FOLLOW_14_in_vocabularyDef152); + match(input,14,FOLLOW_14_in_vocabularyDef152); pushFollow(FOLLOW_termWithDataset_in_vocabularyDef156); entity=termWithDataset(); @@ -279,7 +279,7 @@ public final DiscoveryTargetVocabulary vocabularyDef() throws RecognitionExcepti } - match(input,15,FOLLOW_15_in_vocabularyDef167); + match(input,15,FOLLOW_15_in_vocabularyDef167); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:80:6: ( '^' ds= iriRef )? int alt5=2; int LA5_0 = input.LA(1); @@ -291,7 +291,7 @@ public final DiscoveryTargetVocabulary vocabularyDef() throws RecognitionExcepti case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:80:7: '^' ds= iriRef { - match(input,16,FOLLOW_16_in_vocabularyDef170); + match(input,16,FOLLOW_16_in_vocabularyDef170); pushFollow(FOLLOW_iriRef_in_vocabularyDef174); ds=iriRef(); @@ -315,7 +315,7 @@ public final DiscoveryTargetVocabulary vocabularyDef() throws RecognitionExcepti case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:80:46: '.' { - match(input,17,FOLLOW_17_in_vocabularyDef180); + match(input,17,FOLLOW_17_in_vocabularyDef180); } break; @@ -324,7 +324,7 @@ public final DiscoveryTargetVocabulary vocabularyDef() throws RecognitionExcepti value = new DiscoveryTargetVocabulary(termDatasetPairs, dataset); - + } @@ -376,7 +376,7 @@ public final TargetVocabularyDiscoveryParser.termWithDataset_return termWithData case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:88:5: '^' ds= iriRef { - match(input,16,FOLLOW_16_in_termWithDataset218); + match(input,16,FOLLOW_16_in_termWithDataset218); pushFollow(FOLLOW_iriRef_in_termWithDataset222); ds=iriRef(); @@ -439,7 +439,7 @@ public final void prefixDefs() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:91:24: '.' prefixDef { - match(input,17,FOLLOW_17_in_prefixDefs241); + match(input,17,FOLLOW_17_in_prefixDefs241); pushFollow(FOLLOW_prefixDef_in_prefixDefs243); prefixDef(); @@ -465,7 +465,7 @@ public final void prefixDefs() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:91:40: '.' { - match(input,17,FOLLOW_17_in_prefixDefs247); + match(input,17,FOLLOW_17_in_prefixDefs247); } break; @@ -497,13 +497,13 @@ public final void prefixDef() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:94:3: ( '@prefix' prefix= PNAME_NS IRI_REF ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:94:5: '@prefix' prefix= PNAME_NS IRI_REF { - match(input,18,FOLLOW_18_in_prefixDef258); - prefix=(Token)match(input,PNAME_NS,FOLLOW_PNAME_NS_in_prefixDef262); - IRI_REF2=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_prefixDef264); + match(input,18,FOLLOW_18_in_prefixDef258); + prefix=(Token)match(input,PNAME_NS,FOLLOW_PNAME_NS_in_prefixDef262); + IRI_REF2=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_prefixDef264); String iri = (IRI_REF2!=null?IRI_REF2.getText():null); prefixMap.put((prefix!=null?prefix.getText():null).substring(0, (prefix!=null?prefix.getText():null).length()-1), iri.substring(1, iri.length()-1)); - + } @@ -549,11 +549,11 @@ else if ( (LA10_0==PNAME_LN) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:101:6: IRI_REF { - IRI_REF3=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_iriRef285); - + IRI_REF3=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_iriRef285); + String iri = (IRI_REF3!=null?IRI_REF3.getText():null); value = iri.substring(1, iri.length()-1); - + } break; @@ -565,7 +565,7 @@ else if ( (LA10_0==PNAME_LN) ) { state._fsp--; - + String qName = (prefixedName4!=null?input.toString(prefixedName4.start,prefixedName4.stop):null); String iri = PrintUtil.expandQname(qName); if(qName.equals(iri)) @@ -579,12 +579,12 @@ else if ( (LA10_0==PNAME_LN) ) { value = iri; else value = iri + prefixAndName[1]; - } + } } else { value = iri; } - + } break; @@ -616,7 +616,7 @@ public final TargetVocabularyDiscoveryParser.prefixedName_return prefixedName() // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:130:4: (p= PNAME_LN ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabularyDiscovery.g:130:6: p= PNAME_LN { - p=(Token)match(input,PNAME_LN,FOLLOW_PNAME_LN_in_prefixedName327); + p=(Token)match(input,PNAME_LN,FOLLOW_PNAME_LN_in_prefixedName327); } @@ -636,7 +636,7 @@ public final TargetVocabularyDiscoveryParser.prefixedName_return prefixedName() // Delegated rules - + public static final BitSet FOLLOW_prefixDefs_in_targetVocabulary60 = new BitSet(new long[]{0x0000000000002000L}); public static final BitSet FOLLOW_vocabularyDefs_in_targetVocabulary65 = new BitSet(new long[]{0x0000000000000002L}); @@ -663,4 +663,4 @@ public final TargetVocabularyDiscoveryParser.prefixedName_return prefixedName() public static final BitSet FOLLOW_prefixedName_in_iriRef300 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_PNAME_LN_in_prefixedName327 = new BitSet(new long[]{0x0000000000000002L}); -} \ No newline at end of file +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyLexer.java b/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyLexer.java index 41d0820..4a4f080 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyLexer.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyLexer.java @@ -46,14 +46,14 @@ public class TargetVocabularyLexer extends Lexer { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } @@ -61,7 +61,7 @@ public void reportError(RecognitionException re) { // delegates // delegators - public TargetVocabularyLexer() {;} + public TargetVocabularyLexer() {;} public TargetVocabularyLexer(CharStream input) { this(input, new RecognizerSharedState()); } @@ -79,7 +79,7 @@ public final void mT__13() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:26:7: ( '+' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:26:9: '+' { - match('+'); + match('+'); } @@ -99,7 +99,7 @@ public final void mT__14() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:27:7: ( ',' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:27:9: ',' { - match(','); + match(','); } @@ -119,7 +119,7 @@ public final void mT__15() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:28:7: ( '(' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:28:9: '(' { - match('('); + match('('); } @@ -139,7 +139,7 @@ public final void mT__16() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:29:7: ( ')' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:29:9: ')' { - match(')'); + match(')'); } @@ -159,7 +159,7 @@ public final void mT__17() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:30:7: ( '.' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:30:9: '.' { - match('.'); + match('.'); } @@ -179,7 +179,7 @@ public final void mT__18() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:31:7: ( '@prefix' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:31:9: '@prefix' { - match("@prefix"); + match("@prefix"); } @@ -229,7 +229,7 @@ public final void mIRI_REF() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:151:3: ( '<' (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* '>' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:151:5: '<' (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* '>' { - match('<'); + match('<'); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:151:9: (~ ( '<' | '>' | '\"' | '{' | '}' | '|' | '^' | '`' | '\\\\' | '\\u0000' .. '\\u0020' ) )* loop1: do { @@ -263,7 +263,7 @@ public final void mIRI_REF() throws RecognitionException { } } while (true); - match('>'); + match('>'); } @@ -283,8 +283,8 @@ public final void mPNAME_LN() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:155:3: ( PNAME_NS PN_LOCAL ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:155:5: PNAME_NS PN_LOCAL { - mPNAME_NS(); - mPN_LOCAL(); + mPNAME_NS(); + mPN_LOCAL(); } @@ -304,8 +304,8 @@ public final void mPNAME_NS() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:159:3: ( PN_PREFIX ':' ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:159:5: PN_PREFIX ':' { - mPN_PREFIX(); - match(':'); + mPN_PREFIX(); + match(':'); } @@ -433,7 +433,7 @@ else if ( (LA2_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -457,7 +457,7 @@ public final void mPN_PREFIX() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:187:3: ( PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:187:5: PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? { - mPN_CHARS_BASE(); + mPN_CHARS_BASE(); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:187:19: ( ( PN_CHARS | '.' )* PN_CHARS )? int alt5=2; int LA5_0 = input.LA(1); @@ -511,7 +511,7 @@ else if ( (LA4_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -561,77 +561,77 @@ public void mTokens() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:10: T__13 { - mT__13(); + mT__13(); } break; case 2 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:16: T__14 { - mT__14(); + mT__14(); } break; case 3 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:22: T__15 { - mT__15(); + mT__15(); } break; case 4 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:28: T__16 { - mT__16(); + mT__16(); } break; case 5 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:34: T__17 { - mT__17(); + mT__17(); } break; case 6 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:40: T__18 { - mT__18(); + mT__18(); } break; case 7 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:46: WS { - mWS(); + mWS(); } break; case 8 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:49: IRI_REF { - mIRI_REF(); + mIRI_REF(); } break; case 9 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:57: PNAME_LN { - mPNAME_LN(); + mPNAME_LN(); } break; case 10 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:66: PNAME_NS { - mPNAME_NS(); + mPNAME_NS(); } break; case 11 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:1:75: PN_PREFIX { - mPN_PREFIX(); + mPN_PREFIX(); } break; @@ -727,6 +727,6 @@ public String getDescription() { return "1:1: Tokens : ( T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | WS | IRI_REF | PNAME_LN | PNAME_NS | PN_PREFIX );"; } } - -} \ No newline at end of file + +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyParser.java b/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyParser.java index b7fd43d..d0f63f6 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyParser.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/TargetVocabularyParser.java @@ -18,7 +18,7 @@ // $ANTLR 3.2 Sep 23, 2009 12:02:23 /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g 2010-07-02 13:41:05 package com.avengerpenguin.r2r.parser; - + import java.util.Set; import java.util.HashSet; import java.util.Map; @@ -63,9 +63,9 @@ public TargetVocabularyParser(TokenStream input) { } public TargetVocabularyParser(TokenStream input, RecognizerSharedState state) { super(input, state); - + } - + public String[] getTokenNames() { return TargetVocabularyParser.tokenNames; } public String getGrammarFileName() { return "/home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g"; } @@ -76,14 +76,14 @@ public TargetVocabularyParser(TokenStream input, RecognizerSharedState state) { public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } @@ -128,7 +128,7 @@ public final Collection targetVocabulary() throws RecognitionE state._fsp--; - targetVocabularies = v; + targetVocabularies = v; } @@ -156,7 +156,7 @@ public final Collection vocabularyDefs() throws RecognitionExc // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:63:3: ( ( vocabularyDef )* ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:64:4: ( vocabularyDef )* { - value = new ArrayList(); + value = new ArrayList(); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:65:4: ( vocabularyDef )* loop2: do { @@ -179,7 +179,7 @@ public final Collection vocabularyDefs() throws RecognitionExc value.addAll(vocabularyDef1); - + } break; @@ -222,7 +222,7 @@ public final List vocabularyDef() throws RecognitionException Set classRestrictions = new HashSet(); Set classRestrictionsToMap = new HashSet(); value = new ArrayList(); - + // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:79:3: (res= iriRef ( '+' )? ( ',' res= iriRef ( '+' )? )* )? int alt6=2; int LA6_0 = input.LA(1); @@ -239,7 +239,7 @@ public final List vocabularyDef() throws RecognitionException state._fsp--; - classRestrictions.add(res); + classRestrictions.add(res); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:81:7: ( '+' )? int alt3=2; int LA3_0 = input.LA(1); @@ -251,8 +251,8 @@ public final List vocabularyDef() throws RecognitionException case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:81:8: '+' { - match(input,13,FOLLOW_13_in_vocabularyDef155); - classRestrictionsToMap.add(res); + match(input,13,FOLLOW_13_in_vocabularyDef155); + classRestrictionsToMap.add(res); } break; @@ -274,7 +274,7 @@ public final List vocabularyDef() throws RecognitionException case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:83:7: ',' res= iriRef ( '+' )? { - match(input,14,FOLLOW_14_in_vocabularyDef174); + match(input,14,FOLLOW_14_in_vocabularyDef174); pushFollow(FOLLOW_iriRef_in_vocabularyDef178); res=iriRef(); @@ -292,8 +292,8 @@ public final List vocabularyDef() throws RecognitionException case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:84:8: '+' { - match(input,13,FOLLOW_13_in_vocabularyDef189); - classRestrictionsToMap.add(res); + match(input,13,FOLLOW_13_in_vocabularyDef189); + classRestrictionsToMap.add(res); } break; @@ -315,7 +315,7 @@ public final List vocabularyDef() throws RecognitionException } - match(input,15,FOLLOW_15_in_vocabularyDef215); + match(input,15,FOLLOW_15_in_vocabularyDef215); // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:88:8: (entity= iriRef ( ',' entity= iriRef )* )? int alt8=2; int LA8_0 = input.LA(1); @@ -348,7 +348,7 @@ public final List vocabularyDef() throws RecognitionException case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:89:6: ',' entity= iriRef { - match(input,14,FOLLOW_14_in_vocabularyDef231); + match(input,14,FOLLOW_14_in_vocabularyDef231); pushFollow(FOLLOW_iriRef_in_vocabularyDef235); entity=iriRef(); @@ -370,18 +370,18 @@ public final List vocabularyDef() throws RecognitionException } - match(input,16,FOLLOW_16_in_vocabularyDef246); + match(input,16,FOLLOW_16_in_vocabularyDef246); if(classRestrictions.size()==0) { value.add(new TargetVocabulary(null, collectedEntities, false)); - } + } else { for(String restriction: classRestrictions) { boolean addMappingForCR = classRestrictionsToMap.contains(restriction); value.add(new TargetVocabulary(restriction, collectedEntities, addMappingForCR)); } } - + } @@ -430,7 +430,7 @@ public final void prefixDefs() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:103:24: '.' prefixDef { - match(input,17,FOLLOW_17_in_prefixDefs261); + match(input,17,FOLLOW_17_in_prefixDefs261); pushFollow(FOLLOW_prefixDef_in_prefixDefs263); prefixDef(); @@ -456,7 +456,7 @@ public final void prefixDefs() throws RecognitionException { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:103:40: '.' { - match(input,17,FOLLOW_17_in_prefixDefs267); + match(input,17,FOLLOW_17_in_prefixDefs267); } break; @@ -488,13 +488,13 @@ public final void prefixDef() throws RecognitionException { // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:106:3: ( '@prefix' prefix= PNAME_NS IRI_REF ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:106:5: '@prefix' prefix= PNAME_NS IRI_REF { - match(input,18,FOLLOW_18_in_prefixDef278); - prefix=(Token)match(input,PNAME_NS,FOLLOW_PNAME_NS_in_prefixDef282); - IRI_REF2=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_prefixDef284); + match(input,18,FOLLOW_18_in_prefixDef278); + prefix=(Token)match(input,PNAME_NS,FOLLOW_PNAME_NS_in_prefixDef282); + IRI_REF2=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_prefixDef284); String iri = (IRI_REF2!=null?IRI_REF2.getText():null); prefixMap.put((prefix!=null?prefix.getText():null).substring(0, (prefix!=null?prefix.getText():null).length()-1), iri.substring(1, iri.length()-1)); - + } @@ -540,11 +540,11 @@ else if ( (LA11_0==PNAME_LN) ) { case 1 : // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:113:6: IRI_REF { - IRI_REF3=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_iriRef305); - + IRI_REF3=(Token)match(input,IRI_REF,FOLLOW_IRI_REF_in_iriRef305); + String iri = (IRI_REF3!=null?IRI_REF3.getText():null); value = iri.substring(1, iri.length()-1); - + } break; @@ -556,7 +556,7 @@ else if ( (LA11_0==PNAME_LN) ) { state._fsp--; - + String qName = (prefixedName4!=null?input.toString(prefixedName4.start,prefixedName4.stop):null); String iri = PrintUtil.expandQname(qName); if(qName.equals(iri)) @@ -570,12 +570,12 @@ else if ( (LA11_0==PNAME_LN) ) { value = iri; else value = iri + prefixAndName[1]; - } + } } else { value = iri; } - + } break; @@ -607,7 +607,7 @@ public final TargetVocabularyParser.prefixedName_return prefixedName() throws Re // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:142:4: (p= PNAME_LN ) // /home/andreas/code/mavenprojects/mapping/r2rApi/antlr-files/TargetVocabulary.g:142:6: p= PNAME_LN { - p=(Token)match(input,PNAME_LN,FOLLOW_PNAME_LN_in_prefixedName347); + p=(Token)match(input,PNAME_LN,FOLLOW_PNAME_LN_in_prefixedName347); } @@ -627,7 +627,7 @@ public final TargetVocabularyParser.prefixedName_return prefixedName() throws Re // Delegated rules - + public static final BitSet FOLLOW_prefixDefs_in_targetVocabulary60 = new BitSet(new long[]{0x0000000000008060L}); public static final BitSet FOLLOW_vocabularyDefs_in_targetVocabulary65 = new BitSet(new long[]{0x0000000000000002L}); @@ -653,4 +653,4 @@ public final TargetVocabularyParser.prefixedName_return prefixedName() throws Re public static final BitSet FOLLOW_prefixedName_in_iriRef320 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_PNAME_LN_in_prefixedName347 = new BitSet(new long[]{0x0000000000000002L}); -} \ No newline at end of file +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/TransformationLexer.java b/src/main/java/com/avengerpenguin/r2r/parser/TransformationLexer.java index 58b17fb..220706f 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/TransformationLexer.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/TransformationLexer.java @@ -51,14 +51,14 @@ public class TransformationLexer extends Lexer { public void recover(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } @@ -66,7 +66,7 @@ public void reportError(RecognitionException re) { // delegates // delegators - public TransformationLexer() {;} + public TransformationLexer() {;} public TransformationLexer(CharStream input) { this(input, new RecognizerSharedState()); } @@ -84,7 +84,7 @@ public final void mT__28() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:26:7: ( '=' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:26:9: '=' { - match('='); + match('='); } @@ -104,7 +104,7 @@ public final void mT__29() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:27:7: ( '(' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:27:9: '(' { - match('('); + match('('); } @@ -124,7 +124,7 @@ public final void mT__30() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:28:7: ( ')' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:28:9: ')' { - match(')'); + match(')'); } @@ -144,7 +144,7 @@ public final void mT__31() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:29:7: ( '[' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:29:9: '[' { - match('['); + match('['); } @@ -164,7 +164,7 @@ public final void mT__32() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:30:7: ( '?' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:30:9: '?' { - match('?'); + match('?'); } @@ -184,7 +184,7 @@ public final void mT__33() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:31:7: ( ':' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:31:9: ':' { - match(':'); + match(':'); } @@ -204,7 +204,7 @@ public final void mT__34() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:32:7: ( ']' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:32:9: ']' { - match(']'); + match(']'); } @@ -224,7 +224,7 @@ public final void mT__35() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:33:7: ( '>' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:33:9: '>' { - match('>'); + match('>'); } @@ -244,7 +244,7 @@ public final void mT__36() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:34:7: ( '>=' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:34:9: '>=' { - match(">="); + match(">="); } @@ -265,7 +265,7 @@ public final void mT__37() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:35:7: ( '<' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:35:9: '<' { - match('<'); + match('<'); } @@ -285,7 +285,7 @@ public final void mT__38() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:36:7: ( '<=' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:36:9: '<=' { - match("<="); + match("<="); } @@ -306,7 +306,7 @@ public final void mT__39() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:37:7: ( '!=' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:37:9: '!=' { - match("!="); + match("!="); } @@ -327,7 +327,7 @@ public final void mT__40() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:38:7: ( ',' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:38:9: ',' { - match(','); + match(','); } @@ -347,8 +347,8 @@ public final void mVAR1() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:238:3: ( '?' VARNAME ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:238:5: '?' VARNAME { - match('?'); - mVARNAME(); + match('?'); + mVARNAME(); } @@ -368,8 +368,8 @@ public final void mVAR2() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:242:3: ( '$' VARNAME ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:242:5: '$' VARNAME { - match('$'); - mVARNAME(); + match('$'); + mVARNAME(); } @@ -405,7 +405,7 @@ public final void mINTEGER() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:246:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -461,7 +461,7 @@ public final void mFUNCTIONNAME() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:250:7: ALPHA { - mALPHA(); + mALPHA(); } break; @@ -475,14 +475,14 @@ public final void mFUNCTIONNAME() throws RecognitionException { cnt2++; } while (true); - match(':'); + match(':'); } break; } - mALPHA(); + mALPHA(); // /home/andreas/projects/r2r/antlr-files/Transformation.g:250:27: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | '0' .. '9' )* loop4: do { @@ -568,7 +568,7 @@ else if ( (LA8_0=='.') ) { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:254:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -582,7 +582,7 @@ else if ( (LA8_0=='.') ) { cnt5++; } while (true); - match('.'); + match('.'); // /home/andreas/projects/r2r/antlr-files/Transformation.g:254:21: ( '0' .. '9' )* loop6: do { @@ -598,7 +598,7 @@ else if ( (LA8_0=='.') ) { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:254:22: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -614,7 +614,7 @@ else if ( (LA8_0=='.') ) { case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:254:35: '.' ( '0' .. '9' )+ { - match('.'); + match('.'); // /home/andreas/projects/r2r/antlr-files/Transformation.g:254:39: ( '0' .. '9' )+ int cnt7=0; loop7: @@ -631,7 +631,7 @@ else if ( (LA8_0=='.') ) { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:254:40: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -686,7 +686,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:258:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -700,7 +700,7 @@ public final void mDOUBLE() throws RecognitionException { cnt9++; } while (true); - match('.'); + match('.'); // /home/andreas/projects/r2r/antlr-files/Transformation.g:258:21: ( '0' .. '9' )* loop10: do { @@ -716,7 +716,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:258:22: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -726,14 +726,14 @@ public final void mDOUBLE() throws RecognitionException { } } while (true); - mEXPONENT(); + mEXPONENT(); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:259:5: '.' ( '0' .. '9' )+ EXPONENT { - match('.'); + match('.'); // /home/andreas/projects/r2r/antlr-files/Transformation.g:259:9: ( '0' .. '9' )+ int cnt11=0; loop11: @@ -750,7 +750,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:259:10: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -764,7 +764,7 @@ public final void mDOUBLE() throws RecognitionException { cnt11++; } while (true); - mEXPONENT(); + mEXPONENT(); } break; @@ -787,7 +787,7 @@ public final void mDOUBLE() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:260:6: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -801,7 +801,7 @@ public final void mDOUBLE() throws RecognitionException { cnt12++; } while (true); - mEXPONENT(); + mEXPONENT(); } break; @@ -823,7 +823,7 @@ public final void mMULT() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:264:3: ( '*' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:264:5: '*' { - match('*'); + match('*'); } @@ -843,7 +843,7 @@ public final void mDIV() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:268:3: ( '/' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:268:5: '/' { - match('/'); + match('/'); } @@ -914,7 +914,7 @@ public final void mEXPONENT() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:296:34: '0' .. '9' { - matchRange('0','9'); + matchRange('0','9'); } break; @@ -947,7 +947,7 @@ public final void mSTRING_LITERAL1() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:300:3: ( '\\'' (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\\'' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:300:5: '\\'' (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\\'' { - match('\''); + match('\''); // /home/andreas/projects/r2r/antlr-files/Transformation.g:300:10: (~ ( '\\u0027' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* loop16: do { @@ -981,7 +981,7 @@ else if ( (LA16_0=='\\') ) { case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:300:58: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -991,7 +991,7 @@ else if ( (LA16_0=='\\') ) { } } while (true); - match('\''); + match('\''); } @@ -1011,7 +1011,7 @@ public final void mSTRING_LITERAL2() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:304:3: ( '\"' (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\"' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:304:5: '\"' (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* '\"' { - match('\"'); + match('\"'); // /home/andreas/projects/r2r/antlr-files/Transformation.g:304:9: (~ ( '\\u0022' | '\\u005c' | '\\u000A' | '\\u000D' ) | ECHAR )* loop17: do { @@ -1045,7 +1045,7 @@ else if ( (LA17_0=='\\') ) { case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:304:57: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -1055,7 +1055,7 @@ else if ( (LA17_0=='\\') ) { } } while (true); - match('\"'); + match('\"'); } @@ -1075,7 +1075,7 @@ public final void mSTRING_LITERAL_LONG1() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:308:3: ( '\\'\\'\\'' ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* '\\'\\'\\'' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:308:5: '\\'\\'\\'' ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* '\\'\\'\\'' { - match("'''"); + match("'''"); // /home/andreas/projects/r2r/antlr-files/Transformation.g:308:14: ( ( '\\'' | '\\'\\'' )? (~ ( '\\'' | '\\\\' ) | ECHAR ) )* loop20: @@ -1128,14 +1128,14 @@ else if ( ((LA18_1>='\u0000' && LA18_1<='&')||(LA18_1>='(' && LA18_1<='\uFFFF')) case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:308:17: '\\'' { - match('\''); + match('\''); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:308:24: '\\'\\'' { - match("''"); + match("''"); } @@ -1178,7 +1178,7 @@ else if ( (LA19_0=='\\') ) { case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:308:51: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -1194,7 +1194,7 @@ else if ( (LA19_0=='\\') ) { } } while (true); - match("'''"); + match("'''"); } @@ -1215,7 +1215,7 @@ public final void mSTRING_LITERAL_LONG2() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:312:3: ( '\"\"\"' ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* '\"\"\"' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:312:5: '\"\"\"' ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* '\"\"\"' { - match("\"\"\""); + match("\"\"\""); // /home/andreas/projects/r2r/antlr-files/Transformation.g:312:11: ( ( '\"' | '\"\"' )? (~ ( '\"' | '\\\\' ) | ECHAR ) )* loop23: @@ -1268,14 +1268,14 @@ else if ( ((LA21_1>='\u0000' && LA21_1<='!')||(LA21_1>='#' && LA21_1<='\uFFFF')) case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:312:14: '\"' { - match('\"'); + match('\"'); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:312:20: '\"\"' { - match("\"\""); + match("\"\""); } @@ -1318,7 +1318,7 @@ else if ( (LA22_0=='\\') ) { case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:312:44: ECHAR { - mECHAR(); + mECHAR(); } break; @@ -1334,7 +1334,7 @@ else if ( (LA22_0=='\\') ) { } } while (true); - match("\"\"\""); + match("\"\"\""); } @@ -1355,7 +1355,7 @@ public final void mMINUS() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:316:3: ( '-' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:316:5: '-' { - match('-'); + match('-'); } @@ -1375,7 +1375,7 @@ public final void mPLUS() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:320:3: ( '+' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:320:5: '+' { - match('+'); + match('+'); } @@ -1395,7 +1395,7 @@ public final void mECHAR() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:324:3: ( '\\\\' ( 't' | 'b' | 'n' | 'r' | 'f' | '\\\\' | '\"' | '\\'' ) ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:324:5: '\\\\' ( 't' | 'b' | 'n' | 'r' | 'f' | '\\\\' | '\"' | '\\'' ) { - match('\\'); + match('\\'); if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) { input.consume(); @@ -1514,7 +1514,7 @@ public final void mPN_PREFIX() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:336:3: ( PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:336:5: PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )? { - mPN_CHARS_BASE(); + mPN_CHARS_BASE(); // /home/andreas/projects/r2r/antlr-files/Transformation.g:336:19: ( ( PN_CHARS | '.' )* PN_CHARS )? int alt26=2; int LA26_0 = input.LA(1); @@ -1568,7 +1568,7 @@ else if ( (LA25_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -1726,7 +1726,7 @@ else if ( (LA27_0=='.') ) { } } while (true); - mPN_CHARS(); + mPN_CHARS(); } break; @@ -1774,224 +1774,224 @@ public void mTokens() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:10: T__28 { - mT__28(); + mT__28(); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:16: T__29 { - mT__29(); + mT__29(); } break; case 3 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:22: T__30 { - mT__30(); + mT__30(); } break; case 4 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:28: T__31 { - mT__31(); + mT__31(); } break; case 5 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:34: T__32 { - mT__32(); + mT__32(); } break; case 6 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:40: T__33 { - mT__33(); + mT__33(); } break; case 7 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:46: T__34 { - mT__34(); + mT__34(); } break; case 8 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:52: T__35 { - mT__35(); + mT__35(); } break; case 9 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:58: T__36 { - mT__36(); + mT__36(); } break; case 10 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:64: T__37 { - mT__37(); + mT__37(); } break; case 11 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:70: T__38 { - mT__38(); + mT__38(); } break; case 12 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:76: T__39 { - mT__39(); + mT__39(); } break; case 13 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:82: T__40 { - mT__40(); + mT__40(); } break; case 14 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:88: VAR1 { - mVAR1(); + mVAR1(); } break; case 15 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:93: VAR2 { - mVAR2(); + mVAR2(); } break; case 16 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:98: INTEGER { - mINTEGER(); + mINTEGER(); } break; case 17 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:106: FUNCTIONNAME { - mFUNCTIONNAME(); + mFUNCTIONNAME(); } break; case 18 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:119: DECIMAL { - mDECIMAL(); + mDECIMAL(); } break; case 19 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:127: DOUBLE { - mDOUBLE(); + mDOUBLE(); } break; case 20 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:134: MULT { - mMULT(); + mMULT(); } break; case 21 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:139: DIV { - mDIV(); + mDIV(); } break; case 22 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:143: EXPONENT { - mEXPONENT(); + mEXPONENT(); } break; case 23 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:152: STRING_LITERAL1 { - mSTRING_LITERAL1(); + mSTRING_LITERAL1(); } break; case 24 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:168: STRING_LITERAL2 { - mSTRING_LITERAL2(); + mSTRING_LITERAL2(); } break; case 25 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:184: STRING_LITERAL_LONG1 { - mSTRING_LITERAL_LONG1(); + mSTRING_LITERAL_LONG1(); } break; case 26 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:205: STRING_LITERAL_LONG2 { - mSTRING_LITERAL_LONG2(); + mSTRING_LITERAL_LONG2(); } break; case 27 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:226: MINUS { - mMINUS(); + mMINUS(); } break; case 28 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:232: PLUS { - mPLUS(); + mPLUS(); } break; case 29 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:237: ECHAR { - mECHAR(); + mECHAR(); } break; case 30 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:243: VARNAME { - mVARNAME(); + mVARNAME(); } break; case 31 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:251: WS { - mWS(); + mWS(); } break; case 32 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:1:254: PN_PREFIX { - mPN_PREFIX(); + mPN_PREFIX(); } break; @@ -2293,7 +2293,7 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc IntStream input = _input; int _s = s; switch ( s ) { - case 0 : + case 0 : int LA29_19 = input.LA(1); s = -1; @@ -2303,7 +2303,7 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc if ( s>=0 ) return s; break; - case 1 : + case 1 : int LA29_20 = input.LA(1); s = -1; @@ -2320,6 +2320,6 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc throw nvae; } } - -} \ No newline at end of file + +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/TransformationParser.java b/src/main/java/com/avengerpenguin/r2r/parser/TransformationParser.java index ebd8050..5ff3766 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/TransformationParser.java +++ b/src/main/java/com/avengerpenguin/r2r/parser/TransformationParser.java @@ -1,7 +1,7 @@ // $ANTLR 3.2 Sep 23, 2009 12:02:23 /home/andreas/projects/r2r/antlr-files/Transformation.g 2012-02-23 14:41:37 package com.avengerpenguin.r2r.parser; - + import com.avengerpenguin.r2r.*; import com.avengerpenguin.r2r.utils.StringUtils; import java.util.List; @@ -68,9 +68,9 @@ public TransformationParser(TokenStream input) { } public TransformationParser(TokenStream input, RecognizerSharedState state) { super(input, state); - + } - + public String[] getTokenNames() { return TransformationParser.tokenNames; } public String getGrammarFileName() { return "/home/andreas/projects/r2r/antlr-files/Transformation.g"; } @@ -80,29 +80,29 @@ public TransformationParser(TokenStream input, RecognizerSharedState state) { FunctionMapper funcMapper=new FunctionMapper(); Set variables = new HashSet(); boolean targetVariableParsed = false; - + public void setFunctionManager(FunctionManager fm) { funcManager = fm; } - + public void setFunctionMapping(FunctionMapper fm) { funcMapper = fm; } - + public void recover(IntStream input, RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + public void reportError(RecognitionException re) { String hdr = getErrorHeader(re); String msg = getErrorMessage(re, this.getTokenNames()); - + throw new ParseException(hdr + " " + msg); } - + private FunctionExecution createFunctionExecution(String functionName, Argument... args) { List arguments = new ArrayList(); for(Argument arg: args) @@ -142,13 +142,13 @@ public final transform_return transform() throws RecognitionException { state._fsp--; - match(input,28,FOLLOW_28_in_transform64); + match(input,28,FOLLOW_28_in_transform64); pushFollow(FOLLOW_expression_in_transform66); expression1=expression(); state._fsp--; - match(input,EOF,FOLLOW_EOF_in_transform68); + match(input,EOF,FOLLOW_EOF_in_transform68); String var = (v!=null?input.toString(v.start,v.stop):null); retval.variable = var.substring(1); @@ -159,7 +159,7 @@ public final transform_return transform() throws RecognitionException { retval.funcExec = createFunctionExecution("identityFunction", argument); } retval.variableDependencies = variables; - + } @@ -230,16 +230,16 @@ else if ( (LA1_0==MINUS) ) { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:98:7: PLUS { - match(input,PLUS,FOLLOW_PLUS_in_expression104); - operation = "add"; + match(input,PLUS,FOLLOW_PLUS_in_expression104); + operation = "add"; } break; case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:99:7: MINUS { - match(input,MINUS,FOLLOW_MINUS_in_expression114); - operation = "subtract"; + match(input,MINUS,FOLLOW_MINUS_in_expression114); + operation = "subtract"; } break; @@ -251,9 +251,9 @@ else if ( (LA1_0==MINUS) ) { state._fsp--; - + value = createFunctionExecution(operation, value, m); - + } break; @@ -331,16 +331,16 @@ else if ( (LA3_0==DIV) ) { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:108:7: MULT { - match(input,MULT,FOLLOW_MULT_in_mult169); - operation = "multiply"; + match(input,MULT,FOLLOW_MULT_in_mult169); + operation = "multiply"; } break; case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:109:7: DIV { - match(input,DIV,FOLLOW_DIV_in_mult181); - operation = "divide"; + match(input,DIV,FOLLOW_DIV_in_mult181); + operation = "divide"; } break; @@ -354,7 +354,7 @@ else if ( (LA3_0==DIV) ) { value = createFunctionExecution(operation, value, u); - + } break; @@ -427,15 +427,15 @@ else if ( (LA5_0==PLUS) ) { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:118:6: MINUS { - match(input,MINUS,FOLLOW_MINUS_in_unary228); - negative = !negative; + match(input,MINUS,FOLLOW_MINUS_in_unary228); + negative = !negative; } break; case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:119:5: PLUS { - match(input,PLUS,FOLLOW_PLUS_in_unary236); + match(input,PLUS,FOLLOW_PLUS_in_unary236); } break; @@ -460,7 +460,7 @@ else if ( (LA5_0==PLUS) ) { value = createFunctionExecution("negate", term2); else value = term2; - + } @@ -562,7 +562,7 @@ public final Argument term() throws RecognitionException { state._fsp--; - value = function3; + value = function3; } break; @@ -574,10 +574,10 @@ public final Argument term() throws RecognitionException { state._fsp--; - + String varName = (variable4!=null?input.toString(variable4.start,variable4.stop):null); value = new VariableArgument(varName.substring(1)); - + } break; @@ -589,7 +589,7 @@ public final Argument term() throws RecognitionException { state._fsp--; - value = new ConstantArgument(ConstantType.INTEGER, (integer5!=null?input.toString(integer5.start,integer5.stop):null)); + value = new ConstantArgument(ConstantType.INTEGER, (integer5!=null?input.toString(integer5.start,integer5.stop):null)); } break; @@ -601,7 +601,7 @@ public final Argument term() throws RecognitionException { state._fsp--; - value = new ConstantArgument(ConstantType.DECIMAL, (decimal6!=null?input.toString(decimal6.start,decimal6.stop):null)); + value = new ConstantArgument(ConstantType.DECIMAL, (decimal6!=null?input.toString(decimal6.start,decimal6.stop):null)); } break; @@ -613,7 +613,7 @@ public final Argument term() throws RecognitionException { state._fsp--; - value = new ConstantArgument(ConstantType.DOUBLE, (doubleVal7!=null?input.toString(doubleVal7.start,doubleVal7.stop):null)); + value = new ConstantArgument(ConstantType.DOUBLE, (doubleVal7!=null?input.toString(doubleVal7.start,doubleVal7.stop):null)); } break; @@ -627,21 +627,21 @@ public final Argument term() throws RecognitionException { value = new ConstantArgument(ConstantType.STRING, string8); - + } break; case 7 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:141:5: '(' expression ')' { - match(input,29,FOLLOW_29_in_term321); + match(input,29,FOLLOW_29_in_term321); pushFollow(FOLLOW_expression_in_term323); expression9=expression(); state._fsp--; - match(input,30,FOLLOW_30_in_term325); - value = expression9; + match(input,30,FOLLOW_30_in_term325); + value = expression9; } break; @@ -653,7 +653,7 @@ public final Argument term() throws RecognitionException { state._fsp--; - value = conditional10; + value = conditional10; } break; @@ -691,7 +691,7 @@ public final Argument conditional() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:146:3: ( '[' leftEx= expression comp= comparisonOp rightEx= expression '?' trueEx= expression ':' falseEx= expression ']' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:146:6: '[' leftEx= expression comp= comparisonOp rightEx= expression '?' trueEx= expression ':' falseEx= expression ']' { - match(input,31,FOLLOW_31_in_conditional355); + match(input,31,FOLLOW_31_in_conditional355); pushFollow(FOLLOW_expression_in_conditional359); leftEx=expression(); @@ -707,29 +707,29 @@ public final Argument conditional() throws RecognitionException { state._fsp--; - match(input,32,FOLLOW_32_in_conditional369); + match(input,32,FOLLOW_32_in_conditional369); pushFollow(FOLLOW_expression_in_conditional373); trueEx=expression(); state._fsp--; - match(input,33,FOLLOW_33_in_conditional375); + match(input,33,FOLLOW_33_in_conditional375); pushFollow(FOLLOW_expression_in_conditional379); falseEx=expression(); state._fsp--; - match(input,34,FOLLOW_34_in_conditional381); + match(input,34,FOLLOW_34_in_conditional381); // Create the comparison argument Argument compOpArg = new ConstantArgument(ConstantType.STRING, (comp!=null?input.toString(comp.start,comp.stop):null)); - + // First the compare function to calculate the boolean FunctionExecution comparisonFunction = createFunctionExecution("compare", compOpArg, leftEx, rightEx); // Then the booleanPick function to pick either the left or right value value = createFunctionExecution("booleanPick", comparisonFunction, trueEx, falseEx); - + } @@ -815,30 +815,30 @@ else if ( (LA8_0==VAR2) ) { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:165:5: v= VAR1 { - v=(Token)match(input,VAR1,FOLLOW_VAR1_in_variable445); + v=(Token)match(input,VAR1,FOLLOW_VAR1_in_variable445); if(targetVariableParsed) { String varName = (v!=null?v.getText():null); variables.add(varName.substring(1)); } else - targetVariableParsed = true; - + targetVariableParsed = true; + } break; case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:174:5: v= VAR2 { - v=(Token)match(input,VAR2,FOLLOW_VAR2_in_variable459); + v=(Token)match(input,VAR2,FOLLOW_VAR2_in_variable459); if(targetVariableParsed) { String varName = (v!=null?v.getText():null); variables.add(varName.substring(1)); } else - targetVariableParsed = true; - + targetVariableParsed = true; + } break; @@ -871,16 +871,16 @@ public final FunctionExecution function() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:186:3: ( FUNCTIONNAME '(' (a= expression ( ',' a= expression )* )? ')' ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:186:5: FUNCTIONNAME '(' (a= expression ( ',' a= expression )* )? ')' { - FUNCTIONNAME11=(Token)match(input,FUNCTIONNAME,FOLLOW_FUNCTIONNAME_in_function484); - + FUNCTIONNAME11=(Token)match(input,FUNCTIONNAME,FOLLOW_FUNCTIONNAME_in_function484); + List arguments = new ArrayList(); String fname = (FUNCTIONNAME11!=null?FUNCTIONNAME11.getText():null); String uri = funcMapper.getFunctionUri(fname); Function function = funcManager.getFunctionByUri(uri); if(function==null) throw new ParseException("Function Manager could not find/load Function <" + uri + ">"); - - match(input,29,FOLLOW_29_in_function496); + + match(input,29,FOLLOW_29_in_function496); // /home/andreas/projects/r2r/antlr-files/Transformation.g:196:8: (a= expression ( ',' a= expression )* )? int alt10=2; int LA10_0 = input.LA(1); @@ -897,7 +897,7 @@ public final FunctionExecution function() throws RecognitionException { state._fsp--; - arguments.add(a); + arguments.add(a); // /home/andreas/projects/r2r/antlr-files/Transformation.g:197:11: ( ',' a= expression )* loop9: do { @@ -913,7 +913,7 @@ public final FunctionExecution function() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:197:12: ',' a= expression { - match(input,40,FOLLOW_40_in_function524); + match(input,40,FOLLOW_40_in_function524); pushFollow(FOLLOW_expression_in_function528); a=expression(); @@ -935,7 +935,7 @@ public final FunctionExecution function() throws RecognitionException { } - match(input,30,FOLLOW_30_in_function548); + match(input,30,FOLLOW_30_in_function548); funcExec = new FunctionExecution(function, Collections.unmodifiableList(arguments)); } @@ -964,7 +964,7 @@ public final integer_return integer() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:215:3: ( INTEGER ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:215:5: INTEGER { - match(input,INTEGER,FOLLOW_INTEGER_in_integer577); + match(input,INTEGER,FOLLOW_INTEGER_in_integer577); } @@ -994,7 +994,7 @@ public final decimal_return decimal() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:219:3: ( DECIMAL ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:219:5: DECIMAL { - match(input,DECIMAL,FOLLOW_DECIMAL_in_decimal591); + match(input,DECIMAL,FOLLOW_DECIMAL_in_decimal591); } @@ -1024,7 +1024,7 @@ public final doubleVal_return doubleVal() throws RecognitionException { // /home/andreas/projects/r2r/antlr-files/Transformation.g:223:3: ( DOUBLE ) // /home/andreas/projects/r2r/antlr-files/Transformation.g:223:5: DOUBLE { - match(input,DOUBLE,FOLLOW_DOUBLE_in_doubleVal606); + match(input,DOUBLE,FOLLOW_DOUBLE_in_doubleVal606); } @@ -1084,32 +1084,32 @@ public final String string() throws RecognitionException { case 1 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:227:6: s= STRING_LITERAL1 { - s=(Token)match(input,STRING_LITERAL1,FOLLOW_STRING_LITERAL1_in_string627); - String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(1, temp.length() - 1)); + s=(Token)match(input,STRING_LITERAL1,FOLLOW_STRING_LITERAL1_in_string627); + String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(1, temp.length() - 1)); } break; case 2 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:228:6: s= STRING_LITERAL2 { - s=(Token)match(input,STRING_LITERAL2,FOLLOW_STRING_LITERAL2_in_string638); - String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(1, temp.length() - 1)); + s=(Token)match(input,STRING_LITERAL2,FOLLOW_STRING_LITERAL2_in_string638); + String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(1, temp.length() - 1)); } break; case 3 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:229:6: s= STRING_LITERAL_LONG1 { - s=(Token)match(input,STRING_LITERAL_LONG1,FOLLOW_STRING_LITERAL_LONG1_in_string649); - String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); + s=(Token)match(input,STRING_LITERAL_LONG1,FOLLOW_STRING_LITERAL_LONG1_in_string649); + String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); } break; case 4 : // /home/andreas/projects/r2r/antlr-files/Transformation.g:230:6: s= STRING_LITERAL_LONG2 { - s=(Token)match(input,STRING_LITERAL_LONG2,FOLLOW_STRING_LITERAL_LONG2_in_string660); - String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); + s=(Token)match(input,STRING_LITERAL_LONG2,FOLLOW_STRING_LITERAL_LONG2_in_string660); + String temp = (s!=null?s.getText():null); value = StringUtils.unescapeString(temp.substring(3, temp.length() - 3)); } break; @@ -1129,7 +1129,7 @@ public final String string() throws RecognitionException { // Delegated rules - + public static final BitSet FOLLOW_variable_in_transform62 = new BitSet(new long[]{0x0000000010000000L}); public static final BitSet FOLLOW_28_in_transform64 = new BitSet(new long[]{0x00000000A003FF30L}); @@ -1182,4 +1182,4 @@ public final String string() throws RecognitionException { public static final BitSet FOLLOW_STRING_LITERAL_LONG1_in_string649 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_STRING_LITERAL_LONG2_in_string660 = new BitSet(new long[]{0x0000000000000002L}); -} \ No newline at end of file +} diff --git a/src/main/java/com/avengerpenguin/r2r/parser/package.html b/src/main/java/com/avengerpenguin/r2r/parser/package.html index 382096a..9176510 100644 --- a/src/main/java/com/avengerpenguin/r2r/parser/package.html +++ b/src/main/java/com/avengerpenguin/r2r/parser/package.html @@ -1,7 +1,10 @@ - -com.avengerpenguin.r2r.parser package - - -Provides parsers for the R2R mapping language. - \ No newline at end of file + + + + com.avengerpenguin.r2r.parser package + + + Provides parsers for the R2R mapping language. + + diff --git a/src/main/scala/com/avengerpenguin/r2r/functions/RegExToListFunctionFactory.scala b/src/main/scala/com/avengerpenguin/r2r/functions/RegExToListFunctionFactory.scala index 7b5c020..3ba9191 100644 --- a/src/main/scala/com/avengerpenguin/r2r/functions/RegExToListFunctionFactory.scala +++ b/src/main/scala/com/avengerpenguin/r2r/functions/RegExToListFunctionFactory.scala @@ -26,7 +26,7 @@ class RegExToListFunctionFactory extends FunctionFactory { def getInstance(): Function = { function } - + private class RegExToListFunction() extends Function { def getURI(): String = { "regexToList" @@ -36,13 +36,13 @@ class RegExToListFunctionFactory extends FunctionFactory { val regex = arguments.get(0).get(0) val workString = arguments.get(1).get(0) val resultList: java.util.List[String] = new ArrayList[String](); - + val re = regex.r workString match { case re(contents @ _* ) => for(element <- contents.toList) resultList.add(element) resultList - case _ => resultList + case _ => resultList } } } diff --git a/src/main/scala/com/avengerpenguin/r2r/utils/StringUtils.scala b/src/main/scala/com/avengerpenguin/r2r/utils/StringUtils.scala index 088c2ce..9e5c41e 100644 --- a/src/main/scala/com/avengerpenguin/r2r/utils/StringUtils.scala +++ b/src/main/scala/com/avengerpenguin/r2r/utils/StringUtils.scala @@ -40,4 +40,4 @@ object StringUtils { def main(args: Array[String]) { println(unescapeString("\\o")) } -} \ No newline at end of file +} diff --git a/src/test/java/com/avengerpenguin/r2r/discovery/DiscoveryTargetVocabularyTest.java b/src/test/java/com/avengerpenguin/r2r/discovery/DiscoveryTargetVocabularyTest.java index 2aa9255..4f31490 100755 --- a/src/test/java/com/avengerpenguin/r2r/discovery/DiscoveryTargetVocabularyTest.java +++ b/src/test/java/com/avengerpenguin/r2r/discovery/DiscoveryTargetVocabularyTest.java @@ -28,24 +28,24 @@ public class DiscoveryTargetVocabularyTest { private Collection defs; - + @Before public void init() { String vocabString = "@prefix dbpedia: ." + - "@prefix a: ." + + "@prefix a: ." + "@prefix b: ." + "@prefix c: ." + "(a:a1, b:b1^, c:c1)^dbpedia:dbpediaVOID ." + "(c:c2)"; - + defs = DiscoveryTargetVocabulary.parse(vocabString); } - + @Test public void checkSize() { assertEquals(defs.size(), 2); } - + @Test public void checkSizes() { Iterator it = defs.iterator(); @@ -54,7 +54,7 @@ public void checkSizes() { assertTrue(it.hasNext()); assertEquals(it.next().getTermDatasetPairs().size(), 1); } - + @Test public void checkDatasetOverwrite() { Iterator it = defs.iterator(); diff --git a/src/test/java/com/avengerpenguin/r2r/functions/IterativeRegexToListFunctionTest.java b/src/test/java/com/avengerpenguin/r2r/functions/IterativeRegexToListFunctionTest.java index c367e7d..e8574e9 100644 --- a/src/test/java/com/avengerpenguin/r2r/functions/IterativeRegexToListFunctionTest.java +++ b/src/test/java/com/avengerpenguin/r2r/functions/IterativeRegexToListFunctionTest.java @@ -29,12 +29,12 @@ public class IterativeRegexToListFunctionTest { private Function itRegexToList; - + @Before public void init() { itRegexToList = (new IterateRegexToListFunctionFactory()).getInstance(); } - + @Test public void regex1() { List> argumentList = Helper.getArgumentLists("(\\d+)", "1, 2, 3, 4, 5"); diff --git a/src/test/java/com/avengerpenguin/r2r/functions/ReplaceAllFunctionTest.java b/src/test/java/com/avengerpenguin/r2r/functions/ReplaceAllFunctionTest.java index 03ed004..0b05ee2 100755 --- a/src/test/java/com/avengerpenguin/r2r/functions/ReplaceAllFunctionTest.java +++ b/src/test/java/com/avengerpenguin/r2r/functions/ReplaceAllFunctionTest.java @@ -28,16 +28,16 @@ public class ReplaceAllFunctionTest { private Function replaceAll; - + @Before public void init() { replaceAll = (new ReplaceAllFunctionFactory()).getInstance(); } - + @Test public void replace1() { List> argumentList = Helper.getArgumentLists("-", "", "43243-63634-123"); List result = replaceAll.execute(argumentList, null); - assertEquals(result.get(0), "4324363634123"); + assertEquals(result.get(0), "4324363634123"); } } diff --git a/src/test/java/com/avengerpenguin/r2r/functions/xpath/XPathFunctionFactoryTest.java b/src/test/java/com/avengerpenguin/r2r/functions/xpath/XPathFunctionFactoryTest.java index 142d3e1..59111ee 100644 --- a/src/test/java/com/avengerpenguin/r2r/functions/xpath/XPathFunctionFactoryTest.java +++ b/src/test/java/com/avengerpenguin/r2r/functions/xpath/XPathFunctionFactoryTest.java @@ -540,7 +540,7 @@ public void testTokenizeFunction() { String[] expected3 = {"Some unparsed", "HTML", "text"}; assertEquivalent(expected3, results); } - + @Test public void testAbsFunction() { Function function = factory.getInstance("xpath:abs"); @@ -595,7 +595,7 @@ public void testRoundFunction() { results = function.execute(argumentList, null); expected[0] = "2"; assertEquivalent(expected, results); - + argumentList = Helper.getArgumentLists("-2.5"); results = function.execute(argumentList, null); expected[0] = "-2"; @@ -614,29 +614,29 @@ public void testRoundHalfToEvenFunction() { results = function.execute(argumentList, null); expected[0] = "2.0"; assertEquivalent(expected, results); - + argumentList = Helper.getArgumentLists("2.5"); results = function.execute(argumentList, null); expected[0] = "2.0"; assertEquivalent(expected, results); - + argumentList = Helper.getArgumentLists("3.567812E+3", "2"); results = function.execute(argumentList, null); expected[0] = "3567.81"; assertEquivalent(expected, results); - + argumentList = Helper.getArgumentLists("35612.25", "-2"); results = function.execute(argumentList, null); expected[0] = "35600.0"; assertEquivalent(expected, results); - + argumentList = Helper.getArgumentLists("4.7564E-3", "2"); results = function.execute(argumentList, null); expected[0] = "0.0"; assertEquivalent(expected, results); } - + private void assertEquivalent(String[] expected, List results) { assertEquals(expected.length, results.size()); for (int i = 0; i < expected.length; i++) { diff --git a/src/test/resources/ABA-to-Wiki-input.rdf b/src/test/resources/ABA-to-Wiki-input.rdf index 22a8461..90271e3 100644 --- a/src/test/resources/ABA-to-Wiki-input.rdf +++ b/src/test/resources/ABA-to-Wiki-input.rdf @@ -395,4 +395,4 @@ - \ No newline at end of file + diff --git a/src/test/resources/ABA-to-Wiki.r2r.ttl b/src/test/resources/ABA-to-Wiki.r2r.ttl index e7e346f..774c43e 100644 --- a/src/test/resources/ABA-to-Wiki.r2r.ttl +++ b/src/test/resources/ABA-to-Wiki.r2r.ttl @@ -141,4 +141,4 @@ mp:Genealias ?x aba:aliassymbol ?s"""; r2r:targetPattern "?SUBJ smwprop:Aliassymbol ?s"; - . \ No newline at end of file + . diff --git a/src/test/resources/test_blanknode.r2r.ttl b/src/test/resources/test_blanknode.r2r.ttl index 8b74119..7ba5d48 100644 --- a/src/test/resources/test_blanknode.r2r.ttl +++ b/src/test/resources/test_blanknode.r2r.ttl @@ -18,4 +18,4 @@ mp:BlankNodeExpressions """?SUBJ out:hasExpression _:b . _:b a out:Expression . _:b out:NiceLabel ?label"""; - . \ No newline at end of file + . diff --git a/src/test/scala/com/avengerpenguin/r2r/test.scala b/src/test/scala/com/avengerpenguin/r2r/test.scala index 647a2e6..f717450 100644 --- a/src/test/scala/com/avengerpenguin/r2r/test.scala +++ b/src/test/scala/com/avengerpenguin/r2r/test.scala @@ -20,4 +20,4 @@ object test { for((uri,mapping) <- mappings) mapping.executeMapping(source, output) } -} \ No newline at end of file +}