diff --git a/TestCases/DMN13.xsd b/TestCases/DMN13.xsd
index 0593bfc1..269a293f 100644
--- a/TestCases/DMN13.xsd
+++ b/TestCases/DMN13.xsd
@@ -1,524 +1,524 @@
-
-
-
-
-
-
- Include the DMN Diagram Interchange (DI) schema
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ Include the DMN Diagram Interchange (DI) schema
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TestCases/DMNDI13.xsd b/TestCases/DMNDI13.xsd
index e8c5c7af..5c60c966 100644
--- a/TestCases/DMNDI13.xsd
+++ b/TestCases/DMNDI13.xsd
@@ -1,108 +1,108 @@
-
-
-
-
-
-
-
-
-
-
- This element should never be instantiated directly, but rather concrete implementation should. It is placed there only to be referred in the sequence
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ This element should never be instantiated directly, but rather concrete implementation should. It is placed there only to be referred in the sequence
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TestCases/compliance-level-2/0001-input-data-string/0001-input-data-string-test-01.xml b/TestCases/compliance-level-2/0001-input-data-string/0001-input-data-string-test-01.xml
index 14c5127e..14a29e99 100644
--- a/TestCases/compliance-level-2/0001-input-data-string/0001-input-data-string-test-01.xml
+++ b/TestCases/compliance-level-2/0001-input-data-string/0001-input-data-string-test-01.xml
@@ -1,21 +1,21 @@
-
-
- 0001-input-data-string.dmn
-
-
-
-
-
-
-
- Testing valid input
-
- John Doe
-
-
-
- Hello John Doe
-
-
-
+
+
+ 0001-input-data-string.dmn
+
+
+
+
+
+
+
+ Testing valid input
+
+ John Doe
+
+
+
+ Hello John Doe
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0002-input-data-number/0002-input-data-number-test-01.xml b/TestCases/compliance-level-2/0002-input-data-number/0002-input-data-number-test-01.xml
index e3fd07a9..3f60a780 100644
--- a/TestCases/compliance-level-2/0002-input-data-number/0002-input-data-number-test-01.xml
+++ b/TestCases/compliance-level-2/0002-input-data-number/0002-input-data-number-test-01.xml
@@ -1,22 +1,22 @@
-
-
- 0002-input-data-number.dmn
-
-
-
-
-
-
-
-
- Testing valid input
-
- 10000
-
-
-
- 120000
-
-
-
+
+
+ 0002-input-data-number.dmn
+
+
+
+
+
+
+
+
+ Testing valid input
+
+ 10000
+
+
+
+ 120000
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values-test-01.xml b/TestCases/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values-test-01.xml
index da6174d5..29f67080 100644
--- a/TestCases/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values-test-01.xml
+++ b/TestCases/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values-test-01.xml
@@ -1,23 +1,23 @@
-
-
- 0003-input-data-string-allowed-values.dmn
-
-
-
-
-
-
-
-
-
- Testing valid input
-
- EMPLOYED
-
-
-
- You are EMPLOYED
-
-
-
+
+
+ 0003-input-data-string-allowed-values.dmn
+
+
+
+
+
+
+
+
+
+ Testing valid input
+
+ EMPLOYED
+
+
+
+ You are EMPLOYED
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0100-feel-constants/0100-feel-constants-test-01.xml b/TestCases/compliance-level-2/0100-feel-constants/0100-feel-constants-test-01.xml
index 5f8d6646..be66ad8b 100644
--- a/TestCases/compliance-level-2/0100-feel-constants/0100-feel-constants-test-01.xml
+++ b/TestCases/compliance-level-2/0100-feel-constants/0100-feel-constants-test-01.xml
@@ -1,23 +1,23 @@
-
-
- 0100-feel-constants.dmn
-
-
-
-
-
-
-
- Tests FEEL boolean constants
-
-
- true
-
-
-
-
- false
-
-
-
+
+
+ 0100-feel-constants.dmn
+
+
+
+
+
+
+
+ Tests FEEL boolean constants
+
+
+ true
+
+
+
+
+ false
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0101-feel-constants/0101-feel-constants-test-01.xml b/TestCases/compliance-level-2/0101-feel-constants/0101-feel-constants-test-01.xml
index 5a79d803..af6a8755 100644
--- a/TestCases/compliance-level-2/0101-feel-constants/0101-feel-constants-test-01.xml
+++ b/TestCases/compliance-level-2/0101-feel-constants/0101-feel-constants-test-01.xml
@@ -1,58 +1,58 @@
-
-
- 0101-feel-constants.dmn
-
-
-
-
-
-
-
- Tests FEEL decimal number constant
-
-
- 0.872
-
-
-
-
- Tests FEEL negative decimal number constant
-
-
- -0.872
-
-
-
-
- Tests FEEL number constant
-
-
- 50
-
-
-
-
- Tests FEEL negative number constant
-
-
- -50
-
-
-
-
- Tests FEEL decimal number constant
-
-
- 125.4321987654
-
-
-
-
- Tests FEEL negative decimal number constant
-
-
- -125.4321987654
-
-
-
+
+
+ 0101-feel-constants.dmn
+
+
+
+
+
+
+
+ Tests FEEL decimal number constant
+
+
+ 0.872
+
+
+
+
+ Tests FEEL negative decimal number constant
+
+
+ -0.872
+
+
+
+
+ Tests FEEL number constant
+
+
+ 50
+
+
+
+
+ Tests FEEL negative number constant
+
+
+ -50
+
+
+
+
+ Tests FEEL decimal number constant
+
+
+ 125.4321987654
+
+
+
+
+ Tests FEEL negative decimal number constant
+
+
+ -125.4321987654
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0102-feel-constants/0102-feel-constants-test-01.xml b/TestCases/compliance-level-2/0102-feel-constants/0102-feel-constants-test-01.xml
index bfafeec4..a39de3cd 100644
--- a/TestCases/compliance-level-2/0102-feel-constants/0102-feel-constants-test-01.xml
+++ b/TestCases/compliance-level-2/0102-feel-constants/0102-feel-constants-test-01.xml
@@ -1,43 +1,43 @@
-
-
- 0102-feel-constants.dmn
-
-
-
-
-
-
-
-
- Tests FEEL string constants
-
-
- foo bar
-
-
-
-
- Tests FEEL unicode string constant
-
-
- šomeÚnicodeŠtriňg
-
-
-
-
- Tests FEEL unicode string constant
-
-
- 横綱
-
-
-
-
- Tests FEEL long string constant
-
-
- thisIsSomeLongStringThatMustBeProcessedSoHopefullyThisTestPassWithItAndIMustWriteSomethingMoreSoItIsLongerAndLongerAndLongerAndLongerAndLongerTillItIsReallyLong
-
-
-
+
+
+ 0102-feel-constants.dmn
+
+
+
+
+
+
+
+
+ Tests FEEL string constants
+
+
+ foo bar
+
+
+
+
+ Tests FEEL unicode string constant
+
+
+ šomeÚnicodeŠtriňg
+
+
+
+
+ Tests FEEL unicode string constant
+
+
+ 横綱
+
+
+
+
+ Tests FEEL long string constant
+
+
+ thisIsSomeLongStringThatMustBeProcessedSoHopefullyThisTestPassWithItAndIMustWriteSomethingMoreSoItIsLongerAndLongerAndLongerAndLongerAndLongerTillItIsReallyLong
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0105-feel-math/0105-feel-math-test-01.xml b/TestCases/compliance-level-2/0105-feel-math/0105-feel-math-test-01.xml
index aff09152..18ae9090 100644
--- a/TestCases/compliance-level-2/0105-feel-math/0105-feel-math-test-01.xml
+++ b/TestCases/compliance-level-2/0105-feel-math/0105-feel-math-test-01.xml
@@ -1,284 +1,284 @@
-
-
- 0105-feel-math.dmn
-
-
-
-
-
-
-
-
- Tests FEEL addition of number literals
-
-
- 15
-
-
-
-
- Tests FEEL addition of negative number literals
-
-
- -15
-
-
-
-
- Tests FEEL addition of negative number literals with brakets
-
-
- -15
-
-
-
-
- Tests FEEL subtraction of number literals
-
-
- 5
-
-
-
-
- Tests FEEL subtraction of negative number literals
-
-
- -5
-
-
-
-
- Tests FEEL subtraction of negative number literals with brakets
-
-
- -5
-
-
-
-
- Tests FEEL addition and subtraction of number literals with brakets
-
-
- 32
-
-
-
-
- Tests FEEL multiplication of number literals
-
-
- 50
-
-
-
-
- Tests FEEL multiplication of negative number literals
-
-
- 50
-
-
-
-
- Tests FEEL multiplication of negative number literals with brakets
-
-
- 50
-
-
-
-
- Tests FEEL addition and multiplication of number literals with brakets
-
-
- -225
-
-
-
-
- Tests FEEL division of number literals
-
-
- 2
-
-
-
-
- Tests FEEL division of negative number literals
-
-
- 2
-
-
-
-
- Tests FEEL division of negative number literals with brakets
-
-
- 2
-
-
-
-
- Tests FEEL addition and division of number literals with brakets
-
-
- -2
-
-
-
-
- Tests FEEL division by zero
-
-
-
-
-
-
-
-
- Tests FEEL potency of number literal
-
-
- 100000
-
-
-
-
- Tests FEEL negative potency of number literal
-
-
- 0.00001
-
-
-
-
- Tests FEEL potency of number literal with brakets
-
-
- 16807
-
-
-
-
- Tests FEEL addition and potency of number literals
-
-
- 37
-
-
-
-
- Tests FEEL addition and potency of number literals
-
-
- 40
-
-
-
-
- Tests FEEL addition and potency of number literals with brakets
-
-
- 261
-
-
-
-
- Tests FEEL addition with null
-
-
-
-
-
-
-
-
- Tests FEEL addition with null
-
-
-
-
-
-
-
-
- Tests FEEL subtraction with null
-
-
-
-
-
-
-
-
- Tests FEEL subtraction with null
-
-
-
-
-
-
-
-
- Tests FEEL multiplication with null
-
-
-
-
-
-
-
-
- Tests FEEL multiplication with null
-
-
-
-
-
-
-
-
- Tests FEEL division with null
-
-
-
-
-
-
-
-
- Tests FEEL division with null
-
-
-
-
-
-
-
-
- Tests FEEL arithmetics with spaces between number literals
-
-
- 3
-
-
-
-
- Tests FEEL arithmetics with spaces between number literals and brakets
-
-
- 7.5
-
-
-
-
- Tests FEEL arithmetics with decimal number literals
-
-
- 1200
-
-
-
+
+
+ 0105-feel-math.dmn
+
+
+
+
+
+
+
+
+ Tests FEEL addition of number literals
+
+
+ 15
+
+
+
+
+ Tests FEEL addition of negative number literals
+
+
+ -15
+
+
+
+
+ Tests FEEL addition of negative number literals with brakets
+
+
+ -15
+
+
+
+
+ Tests FEEL subtraction of number literals
+
+
+ 5
+
+
+
+
+ Tests FEEL subtraction of negative number literals
+
+
+ -5
+
+
+
+
+ Tests FEEL subtraction of negative number literals with brakets
+
+
+ -5
+
+
+
+
+ Tests FEEL addition and subtraction of number literals with brakets
+
+
+ 32
+
+
+
+
+ Tests FEEL multiplication of number literals
+
+
+ 50
+
+
+
+
+ Tests FEEL multiplication of negative number literals
+
+
+ 50
+
+
+
+
+ Tests FEEL multiplication of negative number literals with brakets
+
+
+ 50
+
+
+
+
+ Tests FEEL addition and multiplication of number literals with brakets
+
+
+ -225
+
+
+
+
+ Tests FEEL division of number literals
+
+
+ 2
+
+
+
+
+ Tests FEEL division of negative number literals
+
+
+ 2
+
+
+
+
+ Tests FEEL division of negative number literals with brakets
+
+
+ 2
+
+
+
+
+ Tests FEEL addition and division of number literals with brakets
+
+
+ -2
+
+
+
+
+ Tests FEEL division by zero
+
+
+
+
+
+
+
+
+ Tests FEEL potency of number literal
+
+
+ 100000
+
+
+
+
+ Tests FEEL negative potency of number literal
+
+
+ 0.00001
+
+
+
+
+ Tests FEEL potency of number literal with brakets
+
+
+ 16807
+
+
+
+
+ Tests FEEL addition and potency of number literals
+
+
+ 37
+
+
+
+
+ Tests FEEL addition and potency of number literals
+
+
+ 40
+
+
+
+
+ Tests FEEL addition and potency of number literals with brakets
+
+
+ 261
+
+
+
+
+ Tests FEEL addition with null
+
+
+
+
+
+
+
+
+ Tests FEEL addition with null
+
+
+
+
+
+
+
+
+ Tests FEEL subtraction with null
+
+
+
+
+
+
+
+
+ Tests FEEL subtraction with null
+
+
+
+
+
+
+
+
+ Tests FEEL multiplication with null
+
+
+
+
+
+
+
+
+ Tests FEEL multiplication with null
+
+
+
+
+
+
+
+
+ Tests FEEL division with null
+
+
+
+
+
+
+
+
+ Tests FEEL division with null
+
+
+
+
+
+
+
+
+ Tests FEEL arithmetics with spaces between number literals
+
+
+ 3
+
+
+
+
+ Tests FEEL arithmetics with spaces between number literals and brakets
+
+
+ 7.5
+
+
+
+
+ Tests FEEL arithmetics with decimal number literals
+
+
+ 1200
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0106-feel-ternary-logic/0106-feel-ternary-logic-test-01.xml b/TestCases/compliance-level-2/0106-feel-ternary-logic/0106-feel-ternary-logic-test-01.xml
index 8e5fda21..d7d76ba6 100644
--- a/TestCases/compliance-level-2/0106-feel-ternary-logic/0106-feel-ternary-logic-test-01.xml
+++ b/TestCases/compliance-level-2/0106-feel-ternary-logic/0106-feel-ternary-logic-test-01.xml
@@ -1,180 +1,180 @@
-
-
- 0106-feel-ternary-logic.dmn
-
-
-
-
-
-
- Tests ternary logic for true, true
-
- true
-
-
- true
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- Tests ternary logic for false, true
-
- false
-
-
- true
-
-
-
- false
-
-
-
-
- true
-
-
-
-
- Tests ternary logic for null, true
-
-
-
-
- true
-
-
-
-
-
-
-
-
- true
-
-
-
-
- Tests ternary logic for true, false
-
- true
-
-
- false
-
-
-
- false
-
-
-
-
- true
-
-
-
-
- Tests ternary logic for false, false
-
- false
-
-
- false
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- Tests ternary logic for null, false
-
-
-
-
- false
-
-
-
- false
-
-
-
-
-
-
-
-
-
- Tests ternary logic for true, null
-
- true
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
-
-
- Tests ternary logic for false, null
-
- false
-
-
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
- Tests ternary logic for null, null
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 0106-feel-ternary-logic.dmn
+
+
+
+
+
+
+ Tests ternary logic for true, true
+
+ true
+
+
+ true
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ Tests ternary logic for false, true
+
+ false
+
+
+ true
+
+
+
+ false
+
+
+
+
+ true
+
+
+
+
+ Tests ternary logic for null, true
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ Tests ternary logic for true, false
+
+ true
+
+
+ false
+
+
+
+ false
+
+
+
+
+ true
+
+
+
+
+ Tests ternary logic for false, false
+
+ false
+
+
+ false
+
+
+
+ false
+
+
+
+
+ false
+
+
+
+
+ Tests ternary logic for null, false
+
+
+
+
+ false
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+ Tests ternary logic for true, null
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ Tests ternary logic for false, null
+
+ false
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+ Tests ternary logic for null, null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0107-feel-ternary-logic-not/0107-feel-ternary-logic-not-test-01.xml b/TestCases/compliance-level-2/0107-feel-ternary-logic-not/0107-feel-ternary-logic-not-test-01.xml
index f65bb025..890813db 100644
--- a/TestCases/compliance-level-2/0107-feel-ternary-logic-not/0107-feel-ternary-logic-not-test-01.xml
+++ b/TestCases/compliance-level-2/0107-feel-ternary-logic-not/0107-feel-ternary-logic-not-test-01.xml
@@ -1,42 +1,42 @@
-
-
- 0107-feel-ternary-logic-not.dmn
-
-
-
-
-
-
- Tests ternary logic for true
-
- true
-
-
-
- false
-
-
-
-
- Tests ternary logic for false
-
- false
-
-
-
- true
-
-
-
-
- Tests ternary logic for null
-
-
-
-
-
-
-
-
-
+
+
+ 0107-feel-ternary-logic-not.dmn
+
+
+
+
+
+
+ Tests ternary logic for true
+
+ true
+
+
+
+ false
+
+
+
+
+ Tests ternary logic for false
+
+ false
+
+
+
+ true
+
+
+
+
+ Tests ternary logic for null
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0108-first-hitpolicy/0108-first-hitpolicy-test-01.xml b/TestCases/compliance-level-2/0108-first-hitpolicy/0108-first-hitpolicy-test-01.xml
index 0eaf45c6..3bb5d4e7 100644
--- a/TestCases/compliance-level-2/0108-first-hitpolicy/0108-first-hitpolicy-test-01.xml
+++ b/TestCases/compliance-level-2/0108-first-hitpolicy/0108-first-hitpolicy-test-01.xml
@@ -1,77 +1,77 @@
-
-
- 0108-first-hitpolicy.dmn
-
-
-
-
-
-
-
-
-
-
-
-
- 19
-
-
- Medium
-
-
- true
-
-
-
-
- Approved
-
-
- Best
-
-
-
-
-
-
- 13
-
-
- Medium
-
-
- true
-
-
-
-
- Approved
-
-
- Standard
-
-
-
-
-
-
- 10
-
-
- Low
-
-
- true
-
-
-
-
- Declined
-
-
- Standard
-
-
-
-
+
+
+ 0108-first-hitpolicy.dmn
+
+
+
+
+
+
+
+
+
+
+
+
+ 19
+
+
+ Medium
+
+
+ true
+
+
+
+
+ Approved
+
+
+ Best
+
+
+
+
+
+
+ 13
+
+
+ Medium
+
+
+ true
+
+
+
+
+ Approved
+
+
+ Standard
+
+
+
+
+
+
+ 10
+
+
+ Low
+
+
+ true
+
+
+
+
+ Declined
+
+
+ Standard
+
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0109-ruleOrder-hitpolicy/0109-ruleOrder-hitpolicy-test-01.xml b/TestCases/compliance-level-2/0109-ruleOrder-hitpolicy/0109-ruleOrder-hitpolicy-test-01.xml
index 5bc2914f..50f8d186 100644
--- a/TestCases/compliance-level-2/0109-ruleOrder-hitpolicy/0109-ruleOrder-hitpolicy-test-01.xml
+++ b/TestCases/compliance-level-2/0109-ruleOrder-hitpolicy/0109-ruleOrder-hitpolicy-test-01.xml
@@ -1,97 +1,97 @@
-
-
- 0109-ruleOrder-hitpolicy.dmn
-
-
-
-
-
-
-
-
-
-
-
-
- 19
-
-
- Medium
-
-
- true
-
-
-
-
- -
-
- Approved
-
-
- Best
-
-
- -
-
- Approved
-
-
- Standard
-
-
-
-
-
-
-
-
- 13
-
-
- Medium
-
-
- true
-
-
-
-
- -
-
- Approved
-
-
- Standard
-
-
-
-
-
-
-
-
- 10
-
-
- Low
-
-
- true
-
-
-
-
- -
-
- Declined
-
-
- Standard
-
-
-
-
-
-
+
+
+ 0109-ruleOrder-hitpolicy.dmn
+
+
+
+
+
+
+
+
+
+
+
+
+ 19
+
+
+ Medium
+
+
+ true
+
+
+
+
+ -
+
+ Approved
+
+
+ Best
+
+
+ -
+
+ Approved
+
+
+ Standard
+
+
+
+
+
+
+
+
+ 13
+
+
+ Medium
+
+
+ true
+
+
+
+
+ -
+
+ Approved
+
+
+ Standard
+
+
+
+
+
+
+
+
+ 10
+
+
+ Low
+
+
+ true
+
+
+
+
+ -
+
+ Declined
+
+
+ Standard
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0110-outputOrder-hitpolicy/0110-outputOrder-hitpolicy-test-01.xml b/TestCases/compliance-level-2/0110-outputOrder-hitpolicy/0110-outputOrder-hitpolicy-test-01.xml
index 8b509778..35e4d289 100644
--- a/TestCases/compliance-level-2/0110-outputOrder-hitpolicy/0110-outputOrder-hitpolicy-test-01.xml
+++ b/TestCases/compliance-level-2/0110-outputOrder-hitpolicy/0110-outputOrder-hitpolicy-test-01.xml
@@ -1,97 +1,97 @@
-
-
- 0110-outputOrder-hitpolicy.dmn
-
-
-
-
-
-
-
-
-
-
-
-
- 17
-
-
- High
-
-
- true
-
-
-
-
- -
-
- Approved
-
-
- Standard
-
-
- -
-
- Declined
-
-
- Standard
-
-
-
-
-
-
-
-
- 19
-
-
- Low
-
-
- true
-
-
-
-
- -
-
- Approved
-
-
- Basic
-
-
-
-
-
-
-
-
- 10
-
-
- Low
-
-
- true
-
-
-
-
- -
-
- Declined
-
-
- Standard
-
-
-
-
-
-
+
+
+ 0110-outputOrder-hitpolicy.dmn
+
+
+
+
+
+
+
+
+
+
+
+
+ 17
+
+
+ High
+
+
+ true
+
+
+
+
+ -
+
+ Approved
+
+
+ Standard
+
+
+ -
+
+ Declined
+
+
+ Standard
+
+
+
+
+
+
+
+
+ 19
+
+
+ Low
+
+
+ true
+
+
+
+
+ -
+
+ Approved
+
+
+ Basic
+
+
+
+
+
+
+
+
+ 10
+
+
+ Low
+
+
+ true
+
+
+
+
+ -
+
+ Declined
+
+
+ Standard
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0111-first-hitpolicy-singleoutputcol/0111-first-hitpolicy-singleoutputcol-test-01.xml b/TestCases/compliance-level-2/0111-first-hitpolicy-singleoutputcol/0111-first-hitpolicy-singleoutputcol-test-01.xml
index e9ccc436..1dbfb895 100644
--- a/TestCases/compliance-level-2/0111-first-hitpolicy-singleoutputcol/0111-first-hitpolicy-singleoutputcol-test-01.xml
+++ b/TestCases/compliance-level-2/0111-first-hitpolicy-singleoutputcol/0111-first-hitpolicy-singleoutputcol-test-01.xml
@@ -1,41 +1,41 @@
-
-
- 0111-first-hitpolicy-singleoutputcol.dmn
-
-
-
-
-
-
-
-
-
- 19
-
-
-
- Cars
-
-
-
-
-
- 13
-
-
-
- Videogames
-
-
-
-
-
- 5
-
-
-
- Toys
-
-
-
+
+
+ 0111-first-hitpolicy-singleoutputcol.dmn
+
+
+
+
+
+
+
+
+
+ 19
+
+
+
+ Cars
+
+
+
+
+
+ 13
+
+
+
+ Videogames
+
+
+
+
+
+ 5
+
+
+
+ Toys
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0112-ruleOrder-hitpolicy-singleinoutcol/0112-ruleOrder-hitpolicy-singleinoutcol-test-01.xml b/TestCases/compliance-level-2/0112-ruleOrder-hitpolicy-singleinoutcol/0112-ruleOrder-hitpolicy-singleinoutcol-test-01.xml
index 78bb0282..d61e497c 100644
--- a/TestCases/compliance-level-2/0112-ruleOrder-hitpolicy-singleinoutcol/0112-ruleOrder-hitpolicy-singleinoutcol-test-01.xml
+++ b/TestCases/compliance-level-2/0112-ruleOrder-hitpolicy-singleinoutcol/0112-ruleOrder-hitpolicy-singleinoutcol-test-01.xml
@@ -1,57 +1,57 @@
-
-
- 0112-ruleOrder-hitpolicy-singleinoutcol.dmn
-
-
-
-
-
-
-
-
-
-
- 19
-
-
-
-
- -
- Best
-
- -
- Standard
-
-
-
-
-
-
-
- 13
-
-
-
-
- -
- Standard
-
-
-
-
-
-
-
- 10
-
-
-
-
- -
- Standard
-
-
-
-
-
+
+
+ 0112-ruleOrder-hitpolicy-singleinoutcol.dmn
+
+
+
+
+
+
+
+
+
+
+ 19
+
+
+
+
+ -
+ Best
+
+ -
+ Standard
+
+
+
+
+
+
+
+ 13
+
+
+
+
+ -
+ Standard
+
+
+
+
+
+
+
+ 10
+
+
+
+
+ -
+ Standard
+
+
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0113-outputOrder-hitpolicy-singleinoutcol/0113-outputOrder-hitpolicy-singleinoutcol-test-01.xml b/TestCases/compliance-level-2/0113-outputOrder-hitpolicy-singleinoutcol/0113-outputOrder-hitpolicy-singleinoutcol-test-01.xml
index 2b86d0e9..29a7d895 100644
--- a/TestCases/compliance-level-2/0113-outputOrder-hitpolicy-singleinoutcol/0113-outputOrder-hitpolicy-singleinoutcol-test-01.xml
+++ b/TestCases/compliance-level-2/0113-outputOrder-hitpolicy-singleinoutcol/0113-outputOrder-hitpolicy-singleinoutcol-test-01.xml
@@ -1,63 +1,63 @@
-
-
- 0113-outputOrder-hitpolicy-singleinoutcol.dmn
-
-
-
-
-
-
-
-
-
-
- 17
-
-
-
-
- -
- Approved
-
- -
- Declined
-
-
-
-
-
-
-
- 19
-
-
-
-
- -
- Approved
-
- -
- Approved
-
-
-
-
-
-
-
- 10
-
-
-
-
- -
- Approved
-
- -
- Declined
-
-
-
-
-
+
+
+ 0113-outputOrder-hitpolicy-singleinoutcol.dmn
+
+
+
+
+
+
+
+
+
+
+ 17
+
+
+
+
+ -
+ Approved
+
+ -
+ Declined
+
+
+
+
+
+
+
+ 19
+
+
+
+
+ -
+ Approved
+
+ -
+ Approved
+
+
+
+
+
+
+
+ 10
+
+
+
+
+ -
+ Approved
+
+ -
+ Declined
+
+
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0114-min-collect-hitpolicy/0114-min-collect-hitpolicy-test-01.xml b/TestCases/compliance-level-2/0114-min-collect-hitpolicy/0114-min-collect-hitpolicy-test-01.xml
index 0dadef13..0383de7d 100644
--- a/TestCases/compliance-level-2/0114-min-collect-hitpolicy/0114-min-collect-hitpolicy-test-01.xml
+++ b/TestCases/compliance-level-2/0114-min-collect-hitpolicy/0114-min-collect-hitpolicy-test-01.xml
@@ -1,43 +1,43 @@
-
-
- 0114-min-collect-hitpolicy.dmn
-
-
-
-
-
-
-
-
-
-
-
- 5
-
-
-
- 64.32
-
-
-
-
-
- 3
-
-
-
- 98.83
-
-
-
-
-
- 4
-
-
-
- 98.83
-
-
-
-
+
+
+ 0114-min-collect-hitpolicy.dmn
+
+
+
+
+
+
+
+
+
+
+
+ 5
+
+
+
+ 64.32
+
+
+
+
+
+ 3
+
+
+
+ 98.83
+
+
+
+
+
+ 4
+
+
+
+ 98.83
+
+
+
+
diff --git a/TestCases/compliance-level-2/0115-sum-collect-hitpolicy/0115-sum-collect-hitpolicy-test-01.xml b/TestCases/compliance-level-2/0115-sum-collect-hitpolicy/0115-sum-collect-hitpolicy-test-01.xml
index 3be197de..fd097ed6 100644
--- a/TestCases/compliance-level-2/0115-sum-collect-hitpolicy/0115-sum-collect-hitpolicy-test-01.xml
+++ b/TestCases/compliance-level-2/0115-sum-collect-hitpolicy/0115-sum-collect-hitpolicy-test-01.xml
@@ -1,42 +1,42 @@
-
-
- 0115-sum-collect-hitpolicy.dmn
-
-
-
-
-
-
-
-
-
-
- 6
-
-
-
- 1100
-
-
-
-
-
- 3
-
-
-
- 300
-
-
-
-
-
- 2
-
-
-
- 100
-
-
-
-
+
+
+ 0115-sum-collect-hitpolicy.dmn
+
+
+
+
+
+
+
+
+
+
+ 6
+
+
+
+ 1100
+
+
+
+
+
+ 3
+
+
+
+ 300
+
+
+
+
+
+ 2
+
+
+
+ 100
+
+
+
+
diff --git a/TestCases/compliance-level-2/0116-count-collect-hitpolicy/0116-count-collect-hitpolicy-test-01.xml b/TestCases/compliance-level-2/0116-count-collect-hitpolicy/0116-count-collect-hitpolicy-test-01.xml
index e420b450..e28cf7ec 100644
--- a/TestCases/compliance-level-2/0116-count-collect-hitpolicy/0116-count-collect-hitpolicy-test-01.xml
+++ b/TestCases/compliance-level-2/0116-count-collect-hitpolicy/0116-count-collect-hitpolicy-test-01.xml
@@ -1,42 +1,42 @@
-
-
- 0116-count-collect-hitpolicy.dmn
-
-
-
-
-
-
-
-
-
-
- 6
-
-
-
- 4
-
-
-
-
-
- 2
-
-
-
- 1
-
-
-
-
-
- 3
-
-
-
- 2
-
-
-
-
+
+
+ 0116-count-collect-hitpolicy.dmn
+
+
+
+
+
+
+
+
+
+
+ 6
+
+
+
+ 4
+
+
+
+
+
+ 2
+
+
+
+ 1
+
+
+
+
+
+ 3
+
+
+
+ 2
+
+
+
+
diff --git a/TestCases/compliance-level-2/0117-multi-any-hitpolicy/0117-multi-any-hitpolicy-test-01.xml b/TestCases/compliance-level-2/0117-multi-any-hitpolicy/0117-multi-any-hitpolicy-test-01.xml
index 49335fc2..0326387a 100644
--- a/TestCases/compliance-level-2/0117-multi-any-hitpolicy/0117-multi-any-hitpolicy-test-01.xml
+++ b/TestCases/compliance-level-2/0117-multi-any-hitpolicy/0117-multi-any-hitpolicy-test-01.xml
@@ -1,77 +1,77 @@
-
-
- 0117-multi-any-hitpolicy.dmn
-
-
-
-
-
-
-
-
-
-
-
-
- 19
-
-
- true
-
-
- Low
-
-
-
-
- Approved
-
-
- Best
-
-
-
-
-
-
- 17
-
-
- true
-
-
- High
-
-
-
-
- Declined
-
-
- Standard
-
-
-
-
-
-
- 19
-
-
- true
-
-
- Medium
-
-
-
-
- Approved
-
-
- Standard
-
-
-
-
+
+
+ 0117-multi-any-hitpolicy.dmn
+
+
+
+
+
+
+
+
+
+
+
+
+ 19
+
+
+ true
+
+
+ Low
+
+
+
+
+ Approved
+
+
+ Best
+
+
+
+
+
+
+ 17
+
+
+ true
+
+
+ High
+
+
+
+
+ Declined
+
+
+ Standard
+
+
+
+
+
+
+ 19
+
+
+ true
+
+
+ Medium
+
+
+
+
+ Approved
+
+
+ Standard
+
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0118-multi-priority-hitpolicy/0118-multi-priority-hitpolicy-test-01.xml b/TestCases/compliance-level-2/0118-multi-priority-hitpolicy/0118-multi-priority-hitpolicy-test-01.xml
index 13b8bbbf..6770e0aa 100644
--- a/TestCases/compliance-level-2/0118-multi-priority-hitpolicy/0118-multi-priority-hitpolicy-test-01.xml
+++ b/TestCases/compliance-level-2/0118-multi-priority-hitpolicy/0118-multi-priority-hitpolicy-test-01.xml
@@ -1,77 +1,77 @@
-
-
- 0118-multi-priority-hitpolicy.dmn
-
-
-
-
-
-
-
-
-
-
-
-
- 17
-
-
- High
-
-
- true
-
-
-
-
- Approved
-
-
- Standard
-
-
-
-
-
-
- 19
-
-
- Low
-
-
- true
-
-
-
-
- Approved
-
-
- Basic
-
-
-
-
-
-
- 10
-
-
- Low
-
-
- true
-
-
-
-
- Declined
-
-
- Standard
-
-
-
-
+
+
+ 0118-multi-priority-hitpolicy.dmn
+
+
+
+
+
+
+
+
+
+
+
+
+ 17
+
+
+ High
+
+
+ true
+
+
+
+
+ Approved
+
+
+ Standard
+
+
+
+
+
+
+ 19
+
+
+ Low
+
+
+ true
+
+
+
+
+ Approved
+
+
+ Basic
+
+
+
+
+
+
+ 10
+
+
+ Low
+
+
+ true
+
+
+
+
+ Declined
+
+
+ Standard
+
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-2/0119-multi-collect-hitpolicy/0119-multi-collect-hitpolicy-test-01.xml b/TestCases/compliance-level-2/0119-multi-collect-hitpolicy/0119-multi-collect-hitpolicy-test-01.xml
index 0e7e2438..7f2d8bc7 100644
--- a/TestCases/compliance-level-2/0119-multi-collect-hitpolicy/0119-multi-collect-hitpolicy-test-01.xml
+++ b/TestCases/compliance-level-2/0119-multi-collect-hitpolicy/0119-multi-collect-hitpolicy-test-01.xml
@@ -1,97 +1,97 @@
-
-
- 0119-multi-collect-hitpolicy.dmn
-
-
-
-
-
-
-
-
-
-
-
-
- 17
-
-
- High
-
-
- true
-
-
-
-
- -
-
- Declined
-
-
- Standard
-
-
- -
-
- Approved
-
-
- Standard
-
-
-
-
-
-
-
-
- 19
-
-
- Low
-
-
- true
-
-
-
-
- -
-
- Approved
-
-
- Basic
-
-
-
-
-
-
-
-
- 10
-
-
- Low
-
-
- true
-
-
-
-
- -
-
- Declined
-
-
- Standard
-
-
-
-
-
-
+
+
+ 0119-multi-collect-hitpolicy.dmn
+
+
+
+
+
+
+
+
+
+
+
+
+ 17
+
+
+ High
+
+
+ true
+
+
+
+
+ -
+
+ Declined
+
+
+ Standard
+
+
+ -
+
+ Approved
+
+
+ Standard
+
+
+
+
+
+
+
+
+ 19
+
+
+ Low
+
+
+ true
+
+
+
+
+ -
+
+ Approved
+
+
+ Basic
+
+
+
+
+
+
+
+
+ 10
+
+
+ Low
+
+
+ true
+
+
+
+
+ -
+
+ Declined
+
+
+ Standard
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-3/0040-singlenestedcontext/0040-singlenestedcontext-test-01.xml b/TestCases/compliance-level-3/0040-singlenestedcontext/0040-singlenestedcontext-test-01.xml
index 11b8e17a..c2c1bd77 100644
--- a/TestCases/compliance-level-3/0040-singlenestedcontext/0040-singlenestedcontext-test-01.xml
+++ b/TestCases/compliance-level-3/0040-singlenestedcontext/0040-singlenestedcontext-test-01.xml
@@ -1,48 +1,48 @@
-
-
- 0040-singlenestedcontext.dmn
-
-
-
-
-
-
-
- 600000
-
-
- 360
-
-
-
- 2878.6935494327668
-
-
-
-
-
- 30000
-
-
- 60
-
-
-
- 649.1175498364003
-
-
-
-
-
- 600000
-
-
- 365
-
-
-
- 2858.1160998965915
-
-
-
+
+
+ 0040-singlenestedcontext.dmn
+
+
+
+
+
+
+
+ 600000
+
+
+ 360
+
+
+
+ 2878.6935494327668
+
+
+
+
+
+ 30000
+
+
+ 60
+
+
+
+ 649.1175498364003
+
+
+
+
+
+ 600000
+
+
+ 365
+
+
+
+ 2858.1160998965915
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-3/0041-multiple-nestedcontext/0041-multiple-nestedcontext-test-01.xml b/TestCases/compliance-level-3/0041-multiple-nestedcontext/0041-multiple-nestedcontext-test-01.xml
index 9738066e..ab0feb93 100644
--- a/TestCases/compliance-level-3/0041-multiple-nestedcontext/0041-multiple-nestedcontext-test-01.xml
+++ b/TestCases/compliance-level-3/0041-multiple-nestedcontext/0041-multiple-nestedcontext-test-01.xml
@@ -1,48 +1,48 @@
-
-
- 0041-multiple-nestedcontext.dmn
-
-
-
-
-
-
-
- 600000
-
-
- 360
-
-
-
- 2778.6935494327668
-
-
-
-
-
- 30000
-
-
- 60
-
-
-
- 549.1175498364003
-
-
-
-
-
- 600000
-
-
- 365
-
-
-
- 2758.1160998965915
-
-
-
+
+
+ 0041-multiple-nestedcontext.dmn
+
+
+
+
+
+
+
+ 600000
+
+
+ 360
+
+
+
+ 2778.6935494327668
+
+
+
+
+
+ 30000
+
+
+ 60
+
+
+
+ 549.1175498364003
+
+
+
+
+
+ 600000
+
+
+ 365
+
+
+
+ 2758.1160998965915
+
+
+
\ No newline at end of file
diff --git a/TestCases/compliance-level-3/1143-feel-round-half-up-function/1143-feel-round-half-up-function-test-01.xml b/TestCases/compliance-level-3/1143-feel-round-half-up-function/1143-feel-round-half-up-function-test-01.xml
new file mode 100644
index 00000000..b3265b5d
--- /dev/null
+++ b/TestCases/compliance-level-3/1143-feel-round-half-up-function/1143-feel-round-half-up-function-test-01.xml
@@ -0,0 +1,197 @@
+
+
+
+ 1143-feel-round-half-up-function.dmn
+
+
+
+
+
+
+
+ Will round to integer
+
+
+ 6
+
+
+
+
+
+ Will round to negative to integer
+
+
+ -6
+
+
+
+
+
+ Will round positive to scale
+
+
+ 1.12
+
+
+
+
+
+ Will round negative to scale
+
+
+ -1.13
+
+
+
+
+
+ No params gives null
+
+
+
+
+
+
+
+
+ Missing scale param gives null
+
+
+
+
+
+
+
+
+ null number gives null
+
+
+
+
+
+
+
+
+ null scale gives null
+
+
+
+
+
+
+
+
+ Too many params gives null
+
+
+
+
+
+
+
+
+ named params
+
+
+ 6
+
+
+
+
+
+ Missing 'n' named param gives null
+
+
+
+
+
+
+
+
+ Missing 'scale' named param gives null
+
+
+
+
+
+
+
+
+ Incorrect named param gives null
+
+
+
+
+
+
+
+
+ Incorrect 'n' type gives null
+
+
+
+
+
+
+
+
+ Incorrect 'scale' type gives null
+
+
+
+
+
+
+
+
+ Non integer scale param gives null
+
+
+
+
+
+
+
+
+
+
+ less than min scale gives null
+
+
+
+
+
+
+
+
+ Max scale is 6176
+
+
+ 5.5
+
+
+
+
+
+ Greater than max scale gives null
+
+
+
+
+
+
+
+
diff --git a/TestCases/compliance-level-3/1143-feel-round-half-up-function/1143-feel-round-half-up-function.dmn b/TestCases/compliance-level-3/1143-feel-round-half-up-function/1143-feel-round-half-up-function.dmn
new file mode 100644
index 00000000..5061ba60
--- /dev/null
+++ b/TestCases/compliance-level-3/1143-feel-round-half-up-function/1143-feel-round-half-up-function.dmn
@@ -0,0 +1,153 @@
+
+
+ FEEL built-in function 'round half up(n,scale)' in category number functions
+
+
+
+
+ round half up(5.5, 0)
+
+
+
+
+
+
+ round half up(-5.5, 0)
+
+
+
+
+
+
+ round half up(1.121, 2)
+
+
+
+
+
+
+ round half up(-1.126, 2)
+
+
+
+
+
+
+ round half up()
+
+
+
+
+
+
+ round half up(1234)
+
+
+
+
+
+
+ round half up(null,0)
+
+
+
+
+
+
+ round half up(1234,null)
+
+
+
+
+
+
+ round half up(1234.12,1,2)
+
+
+
+
+
+
+ round half up(n:5.5,scale:0)
+
+
+
+
+
+
+ round half up(scale:0)
+
+
+
+
+
+
+ round half up(n:5.5)
+
+
+
+
+
+
+ round half up(n:5.5,scale:0,foo:123)
+
+
+
+
+
+
+ round half up("123", 0)
+
+
+
+
+
+
+ round half up(5.5, "0")
+
+
+
+
+
+
+ round half up(5.5, 1.1)
+
+
+
+
+
+
+ round half up(5.5, -6111)
+
+
+
+
+
+
+ round half up(5.5, (-6111 - 1))
+
+
+
+
+
+
+ round half up(5.5, 6176)
+
+
+
+
+
+
+ round half up(5.5, (6176 + 1))
+
+
+
+
+
diff --git a/TestCases/non-compliant/0019-flight-rebooking/0019-flight-rebooking.dmn b/TestCases/non-compliant/0019-flight-rebooking/0019-flight-rebooking.dmn
index 14d07036..1e24cd46 100644
--- a/TestCases/non-compliant/0019-flight-rebooking/0019-flight-rebooking.dmn
+++ b/TestCases/non-compliant/0019-flight-rebooking/0019-flight-rebooking.dmn
@@ -1,334 +1,334 @@
-
-
-
-
-
- string
-
-
- string
-
-
- string
-
-
- dateTime
-
-
- dateTime
-
-
- number
-
-
- string
-
-
-
- tFlight
-
-
-
-
- string
-
-
- string
-
-
- number
-
-
- string
-
-
-
- tPassenger
-
-
- string
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Flight List[ Status = "cancelled" ].Flight Number
-
-
-
-
-
- Passenger List[ list contains( Cancelled Flights, Flight Number ) ]
-
-
-
-
- sort( Waiting List, passenger priority )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- reassign next passenger
-
-
-
-
- Prioritized Waiting List
-
-
-
-
-
- []
-
-
-
-
-
- Flight List
-
-
-
-
-
-
-
-
-
-
-
-
-
- Passenger1.Status
-
-
- "gold", "silver", "bronze"
-
-
-
-
- Passenger2.Status
-
-
- "gold", "silver", "bronze"
-
-
-
-
- Passenger1.Miles
-
-
-
-
-
- "gold"
-
-
- "gold"
-
-
- >= Passenger2.Miles
-
-
- true
-
-
-
-
- "gold"
-
-
- "silver","bronze"
-
-
- -
-
-
- true
-
-
-
-
- "silver"
-
-
- "silver"
-
-
- >= Passenger2.Miles
-
-
- true
-
-
-
-
- "silver"
-
-
- "bronze"
-
-
- -
-
-
- true
-
-
-
-
- "bronze"
-
-
- "bronze"
-
-
- >= Passenger2.Miles
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Waiting List[1]
-
-
-
-
-
- Flights[ Flight Number = Next Passenger.Flight Number ][1]
-
-
-
-
-
- Flights[ From = Original Flight.From and
- To = Original Flight.To and
- Departure > Original Flight.Departure and
- Status = "scheduled" and
- has capacity( item, Reassigned Passengers List ) ][1]
-
-
-
-
-
-
-
- Next Passenger.Name
-
-
-
- Next Passenger.Status
-
-
-
- Next Passenger.Miles
-
-
-
- Best Alternate Flight.Flight Number
-
-
-
-
-
-
- remove( Waiting List, 1 )
-
-
-
-
-
- append( Reassigned Passengers List, Reassigned Passenger )
-
-
-
-
- if count( Remaining Waiting List ) > 0
- then
- reassign next passenger( Remaining Waiting List,
- Updated Reassigned Passengers List,
- Flights )
- else
- Updated Reassigned Passengers List
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- flight.Capacity > count( rebooked list[ Flight Number = flight.Flight Number ] )
-
-
-
-
-
+
+
+
+
+
+ string
+
+
+ string
+
+
+ string
+
+
+ dateTime
+
+
+ dateTime
+
+
+ number
+
+
+ string
+
+
+
+ tFlight
+
+
+
+
+ string
+
+
+ string
+
+
+ number
+
+
+ string
+
+
+
+ tPassenger
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Flight List[ Status = "cancelled" ].Flight Number
+
+
+
+
+
+ Passenger List[ list contains( Cancelled Flights, Flight Number ) ]
+
+
+
+
+ sort( Waiting List, passenger priority )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ reassign next passenger
+
+
+
+
+ Prioritized Waiting List
+
+
+
+
+
+ []
+
+
+
+
+
+ Flight List
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Passenger1.Status
+
+
+ "gold", "silver", "bronze"
+
+
+
+
+ Passenger2.Status
+
+
+ "gold", "silver", "bronze"
+
+
+
+
+ Passenger1.Miles
+
+
+
+
+
+ "gold"
+
+
+ "gold"
+
+
+ >= Passenger2.Miles
+
+
+ true
+
+
+
+
+ "gold"
+
+
+ "silver","bronze"
+
+
+ -
+
+
+ true
+
+
+
+
+ "silver"
+
+
+ "silver"
+
+
+ >= Passenger2.Miles
+
+
+ true
+
+
+
+
+ "silver"
+
+
+ "bronze"
+
+
+ -
+
+
+ true
+
+
+
+
+ "bronze"
+
+
+ "bronze"
+
+
+ >= Passenger2.Miles
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Waiting List[1]
+
+
+
+
+
+ Flights[ Flight Number = Next Passenger.Flight Number ][1]
+
+
+
+
+
+ Flights[ From = Original Flight.From and
+ To = Original Flight.To and
+ Departure > Original Flight.Departure and
+ Status = "scheduled" and
+ has capacity( item, Reassigned Passengers List ) ][1]
+
+
+
+
+
+
+
+ Next Passenger.Name
+
+
+
+ Next Passenger.Status
+
+
+
+ Next Passenger.Miles
+
+
+
+ Best Alternate Flight.Flight Number
+
+
+
+
+
+
+ remove( Waiting List, 1 )
+
+
+
+
+
+ append( Reassigned Passengers List, Reassigned Passenger )
+
+
+
+
+ if count( Remaining Waiting List ) > 0
+ then
+ reassign next passenger( Remaining Waiting List,
+ Updated Reassigned Passengers List,
+ Flights )
+ else
+ Updated Reassigned Passengers List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ flight.Capacity > count( rebooked list[ Flight Number = flight.Flight Number ] )
+
+
+
+
+
diff --git a/TestCases/testCases.xsd b/TestCases/testCases.xsd
index 64f40837..3f5eec07 100644
--- a/TestCases/testCases.xsd
+++ b/TestCases/testCases.xsd
@@ -1,96 +1,96 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TestExamples/lending1/lending1-input-001.xml b/TestExamples/lending1/lending1-input-001.xml
index 2e20838f..3b699529 100644
--- a/TestExamples/lending1/lending1-input-001.xml
+++ b/TestExamples/lending1/lending1-input-001.xml
@@ -1,56 +1,56 @@
-
-
-
- lending1.dmn
-
-
-
-
- 6000
-
-
- 2000
-
-
- 0
-
-
-
- 35
-
-
- true
-
-
- M
-
-
- EMPLOYED
-
-
-
-
- STANDARD LOAN
-
-
- 350000
-
-
- 0.0395
-
-
- 360
-
-
-
-
- 649
-
-
- false
-
-
-
-
+
+
+
+ lending1.dmn
+
+
+
+
+ 6000
+
+
+ 2000
+
+
+ 0
+
+
+
+ 35
+
+
+ true
+
+
+ M
+
+
+ EMPLOYED
+
+
+
+
+ STANDARD LOAN
+
+
+ 350000
+
+
+ 0.0395
+
+
+ 360
+
+
+
+
+ 649
+
+
+ false
+
+
+
+
diff --git a/TestExamples/lending1/lending1-output-001.xml b/TestExamples/lending1/lending1-output-001.xml
index 9ceeaf7b..3705a5bd 100644
--- a/TestExamples/lending1/lending1-output-001.xml
+++ b/TestExamples/lending1/lending1-output-001.xml
@@ -1,105 +1,105 @@
-
-
- lending1.dmn
-
-
-
-
- 6000
-
-
- 2000
-
-
- 0
-
-
-
- 35
-
-
- true
-
-
- M
-
-
- EMPLOYED
-
-
-
-
- STANDARD LOAN
-
-
- 350000
-
-
- 0.0395
-
-
- 360
-
-
-
-
- 649
-
-
- false
-
-
-
-
- 90
-
-
-
-
- HIGH
-
-
-
-
- FULL
-
-
-
-
- LOW
-
-
-
-
- 1680.880325608555
-
-
-
-
- true
-
-
-
-
- ELIGIBLE
-
-
-
-
- BUREAU
-
-
-
-
- true
-
-
-
-
- ACCEPT
-
-
-
-
+
+
+ lending1.dmn
+
+
+
+
+ 6000
+
+
+ 2000
+
+
+ 0
+
+
+
+ 35
+
+
+ true
+
+
+ M
+
+
+ EMPLOYED
+
+
+
+
+ STANDARD LOAN
+
+
+ 350000
+
+
+ 0.0395
+
+
+ 360
+
+
+
+
+ 649
+
+
+ false
+
+
+
+
+ 90
+
+
+
+
+ HIGH
+
+
+
+
+ FULL
+
+
+
+
+ LOW
+
+
+
+
+ 1680.880325608555
+
+
+
+
+ true
+
+
+
+
+ ELIGIBLE
+
+
+
+
+ BUREAU
+
+
+
+
+ true
+
+
+
+
+ ACCEPT
+
+
+
+
diff --git a/TestExamples/lending1/lending1.dmn b/TestExamples/lending1/lending1.dmn
index 38a02786..f0051aaa 100644
--- a/TestExamples/lending1/lending1.dmn
+++ b/TestExamples/lending1/lending1.dmn
@@ -1,1399 +1,1399 @@
-
-
-
-
-
-
- feel:string
-
- "INELIGIBLE", "ELIGIBLE"
-
-
-
- feel:string
-
- "FULL", "MINI", "NONE"
-
-
-
- feel:string
-
- "DECLINE", "BUREAU", "THROUGH"
-
-
-
- feel:string
-
- "DECLINE", "HIGH", "MEDIUM", "LOW", "VERY LOW"
-
-
-
- feel:string
-
- "DECLINE", "REFER", "ACCEPT"
-
-
-
-
- feel:number
-
- [0..999], null
-
-
-
- feel:boolean
-
-
-
- feel:string
-
- "DECLINE", "ACCEPT"
-
-
-
-
-
- feel:number
-
-
- feel:number
-
-
- feel:number
-
-
-
- feel:number
-
-
- feel:boolean
-
-
- feel:string
-
- "S","M"
-
-
-
- feel:string
-
- "EMPLOYED","SELF-EMPLOYED","STUDENT","UNEMPLOYED"
-
-
-
-
-
- feel:string
-
- "STANDARD LOAN", "SPECIAL LOAN"
-
-
-
- feel:number
-
-
- feel:number
-
-
- feel:number
-
-
-
-
-
-
-
-
-
-
-
-
- 'Bureau Call Type Table'
-
-
-
-
- 'Pre-bureau Risk Category'
-
-
-
-
-
- Is credit bureau call required?
- Yes (BUREAU) or No (DECLINE, THROUGH)
-
-
-
-
-
-
-
-
-
-
- Eligibility
-
-
- "ELIGIBLE", "INELIGIBLE"
-
-
-
-
- 'Bureau Call Type'
-
-
- "FULL", "MINI", "NONE"
-
-
-
-
-
- "INELIGIBLE"
-
-
- -
-
-
- "DECLINE"
-
-
-
-
- "ELIGIBLE"
-
-
- "FULL","MINI"
-
-
- "BUREAU"
-
-
-
-
- "ELIGIBLE"
-
-
- "NONE"
-
-
- "THROUGH"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Eligibility Rules'
-
-
-
-
- 'Pre-bureau Affordability'
-
-
-
-
-
- 'Pre-bureau Risk Category'
-
-
-
-
-
- 'Applicant Data'.Age
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Pre-bureau Risk Category Table'
-
-
-
-
- 'Applicant Data'.'Existing Customer'
-
-
-
-
-
- 'Application Risk Score'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Post-bureau Risk Category Table'
-
-
-
-
- 'Applicant Data'.'Existing Customer'
-
-
-
-
-
- 'Bureau Data'.'Credit Score'
-
-
-
-
-
- 'Application Risk Score'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Application Risk Score Model'
-
-
-
-
- 'Applicant Data'.Age
-
-
-
-
-
- 'Applicant Data'.'Marital Status'
-
-
-
-
-
- 'Applicant Data'.'Employment Status'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Affordability Calculation'
-
-
-
-
- 'Applicant Data'.Monthly.Income
-
-
-
-
-
- 'Applicant Data'.Monthly.Repayments
-
-
-
-
-
- 'Applicant Data'.Monthly.Expenses
-
-
-
-
-
- 'Pre-bureau Risk Category'
-
-
-
-
-
- 'Required Monthly Installment'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Affordability Calculation'
-
-
-
-
- 'Applicant Data'.Monthly.Income
-
-
-
-
-
- 'Applicant Data'.Monthly.Repayments
-
-
-
-
-
- 'Applicant Data'.Monthly.Expenses
-
-
-
-
-
- 'Post-bureau Risk Category'
-
-
-
-
-
- 'Required Monthly Installment'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Installment Calculation'
-
-
-
-
- 'Requested Product'.'Product Type'
-
-
-
-
-
- 'Requested Product'.Rate
-
-
-
-
-
- 'Requested Product'.Term
-
-
-
-
-
- 'Requested Product'.Amount
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Routing Rules'
-
-
-
-
- 'Bureau Data'.Bankrupt
-
-
-
-
-
- 'Bureau Data'.'Credit Score'
-
-
-
-
-
- 'Post-bureau Risk Category'
-
-
-
-
-
- 'Post-bureau Affordability'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "ACCEPT"
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Monthly Income' - ('Monthly Expenses' + 'Monthly Repayments')
-
-
-
-
-
-
- 'Credit Contingency Factor Table'
-
-
-
-
- 'Risk Category'
-
-
-
-
-
-
-
- if 'Disposable Income' * 'Credit Contingency Factor' > 'Required Monthly Installment' then true else false
-
-
-
-
- Affordability
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Risk Category'
-
-
- "DECLINE", "HIGH", "LOW", "MEDIUM", "VERY LOW"
-
-
-
-
-
- "HIGH", "DECLINE"
-
-
- 0.6
-
-
-
-
- "MEDIUM"
-
-
- 0.7
-
-
-
-
- "LOW", "VERY LOW"
-
-
- 0.8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Pre-bureau Risk Category'
-
-
-
-
- 'Pre-bureau Affordability'
-
-
-
-
- Age
-
-
-
-
-
- "DECLINE"
-
-
- -
-
-
- -
-
-
- "INELIGIBLE"
-
-
-
-
- -
-
-
- false
-
-
- -
-
-
- "INELIGIBLE"
-
-
-
-
- -
-
-
- -
-
-
- <18
-
-
- "INELIGIBLE"
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- "ELIGIBLE"
-
-
-
-
-
-
-
-
-
-
-
-
- 'Pre-bureau Risk Category'
-
-
-
-
-
- "HIGH","MEDIUM"
-
-
- "FULL"
-
-
-
-
- "LOW"
-
-
- "MINI"
-
-
-
-
- "VERY LOW","DECLINE"
-
-
- "NONE"
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Existing Customer'
-
-
-
-
- 'Application Risk Score'
-
-
-
-
-
- false
-
-
- <100
-
-
- "HIGH"
-
-
-
-
- false
-
-
- [100..120)
-
-
- "MEDIUM"
-
-
-
-
- false
-
-
- [120..130)
-
-
- "LOW"
-
-
-
-
- false
-
-
- >130
-
-
- "VERY LOW"
-
-
-
-
- true
-
-
- <80
-
-
- "DECLINE"
-
-
-
-
- true
-
-
- [80..90)
-
-
- "HIGH"
-
-
-
-
- true
-
-
- [90..110]
-
-
- "MEDIUM"
-
-
-
-
- true
-
-
- >110
-
-
- "LOW"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Existing Customer'
-
-
-
-
- 'Application Risk Score'
-
-
-
-
- 'Credit Score'
-
-
-
-
-
- false
-
-
- <120
-
-
- <590
-
-
- "HIGH"
-
-
-
-
- false
-
-
- <120
-
-
- [590..610]
-
-
- "MEDIUM"
-
-
-
-
- false
-
-
- <120
-
-
- >610
-
-
- "LOW"
-
-
-
-
- false
-
-
- [120..130]
-
-
- <600
-
-
- "HIGH"
-
-
-
-
- false
-
-
- [120..130]
-
-
- [600..625]
-
-
- "MEDIUM"
-
-
-
-
- false
-
-
- [120..130]
-
-
- >625
-
-
- "LOW"
-
-
-
-
- false
-
-
- >130
-
-
- -
-
-
- "VERY LOW"
-
-
-
-
- true
-
-
- <=100
-
-
- <580
-
-
- "HIGH"
-
-
-
-
- true
-
-
- <=100
-
-
- [580..600]
-
-
- "MEDIUM"
-
-
-
-
- true
-
-
- <=100
-
-
- >600
-
-
- "LOW"
-
-
-
-
- true
-
-
- >100
-
-
- <590
-
-
- "HIGH"
-
-
-
-
- true
-
-
- >100
-
-
- [590..615]
-
-
- "MEDIUM"
-
-
-
-
- true
-
-
- >100
-
-
- >615
-
-
- "LOW"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Age
-
-
- [18..120]
-
-
-
-
- 'Marital Status'
-
-
- "S","M"
-
-
-
-
- 'Employment Status'
-
-
- "UNEMPLOYED", "EMPLOYED", "SELF-EMPLOYED", "STUDENT"
-
-
-
-
-
- [18..21]
-
-
- -
-
-
- -
-
-
- 32
-
-
-
-
- [22..25]
-
-
- -
-
-
- -
-
-
- 35
-
-
-
-
- [26..35]
-
-
- -
-
-
- -
-
-
- 40
-
-
-
-
- [36..49]
-
-
- -
-
-
- -
-
-
- 43
-
-
-
-
- >=50
-
-
- -
-
-
- -
-
-
- 48
-
-
-
-
- -
-
-
- "S"
-
-
- -
-
-
- 25
-
-
-
-
- -
-
-
- "M"
-
-
- -
-
-
- 45
-
-
-
-
- -
-
-
- -
-
-
- "UNEMPLOYED"
-
-
- 15
-
-
-
-
- -
-
-
- -
-
-
- "EMPLOYED"
-
-
- 45
-
-
-
-
- -
-
-
- -
-
-
- "SELF-EMPLOYED"
-
-
- 36
-
-
-
-
- -
-
-
- -
-
-
- "STUDENT"
-
-
- 18
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if 'Product Type'="STANDARD LOAN" then 20.00 else if 'Product Type'="SPECIAL LOAN" then 25.00 else null
-
-
-
-
-
- (Amount *Rate/12) / (1 - (1 + Rate/12)**-Term)
-
-
-
-
- 'Monthly Repayment' + 'Monthly Fee'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Post-bureau Risk Category'
-
-
-
-
- 'Post-bureau Affordability'
-
-
-
-
- Bankrupt
-
-
-
-
- 'Credit Score'
-
-
-
-
-
- -
-
-
- false
-
-
- -
-
-
- -
-
-
- "DECLINE"
-
-
-
-
- -
-
-
- -
-
-
- true
-
-
- -
-
-
- "DECLINE"
-
-
-
-
- "HIGH"
-
-
- -
-
-
- -
-
-
- -
-
-
- "REFER"
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- <580
-
-
- "REFER"
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- "ACCEPT"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ feel:string
+
+ "INELIGIBLE", "ELIGIBLE"
+
+
+
+ feel:string
+
+ "FULL", "MINI", "NONE"
+
+
+
+ feel:string
+
+ "DECLINE", "BUREAU", "THROUGH"
+
+
+
+ feel:string
+
+ "DECLINE", "HIGH", "MEDIUM", "LOW", "VERY LOW"
+
+
+
+ feel:string
+
+ "DECLINE", "REFER", "ACCEPT"
+
+
+
+
+ feel:number
+
+ [0..999], null
+
+
+
+ feel:boolean
+
+
+
+ feel:string
+
+ "DECLINE", "ACCEPT"
+
+
+
+
+
+ feel:number
+
+
+ feel:number
+
+
+ feel:number
+
+
+
+ feel:number
+
+
+ feel:boolean
+
+
+ feel:string
+
+ "S","M"
+
+
+
+ feel:string
+
+ "EMPLOYED","SELF-EMPLOYED","STUDENT","UNEMPLOYED"
+
+
+
+
+
+ feel:string
+
+ "STANDARD LOAN", "SPECIAL LOAN"
+
+
+
+ feel:number
+
+
+ feel:number
+
+
+ feel:number
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Bureau Call Type Table'
+
+
+
+
+ 'Pre-bureau Risk Category'
+
+
+
+
+
+ Is credit bureau call required?
+ Yes (BUREAU) or No (DECLINE, THROUGH)
+
+
+
+
+
+
+
+
+
+
+ Eligibility
+
+
+ "ELIGIBLE", "INELIGIBLE"
+
+
+
+
+ 'Bureau Call Type'
+
+
+ "FULL", "MINI", "NONE"
+
+
+
+
+
+ "INELIGIBLE"
+
+
+ -
+
+
+ "DECLINE"
+
+
+
+
+ "ELIGIBLE"
+
+
+ "FULL","MINI"
+
+
+ "BUREAU"
+
+
+
+
+ "ELIGIBLE"
+
+
+ "NONE"
+
+
+ "THROUGH"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Eligibility Rules'
+
+
+
+
+ 'Pre-bureau Affordability'
+
+
+
+
+
+ 'Pre-bureau Risk Category'
+
+
+
+
+
+ 'Applicant Data'.Age
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Pre-bureau Risk Category Table'
+
+
+
+
+ 'Applicant Data'.'Existing Customer'
+
+
+
+
+
+ 'Application Risk Score'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Post-bureau Risk Category Table'
+
+
+
+
+ 'Applicant Data'.'Existing Customer'
+
+
+
+
+
+ 'Bureau Data'.'Credit Score'
+
+
+
+
+
+ 'Application Risk Score'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Application Risk Score Model'
+
+
+
+
+ 'Applicant Data'.Age
+
+
+
+
+
+ 'Applicant Data'.'Marital Status'
+
+
+
+
+
+ 'Applicant Data'.'Employment Status'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Affordability Calculation'
+
+
+
+
+ 'Applicant Data'.Monthly.Income
+
+
+
+
+
+ 'Applicant Data'.Monthly.Repayments
+
+
+
+
+
+ 'Applicant Data'.Monthly.Expenses
+
+
+
+
+
+ 'Pre-bureau Risk Category'
+
+
+
+
+
+ 'Required Monthly Installment'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Affordability Calculation'
+
+
+
+
+ 'Applicant Data'.Monthly.Income
+
+
+
+
+
+ 'Applicant Data'.Monthly.Repayments
+
+
+
+
+
+ 'Applicant Data'.Monthly.Expenses
+
+
+
+
+
+ 'Post-bureau Risk Category'
+
+
+
+
+
+ 'Required Monthly Installment'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Installment Calculation'
+
+
+
+
+ 'Requested Product'.'Product Type'
+
+
+
+
+
+ 'Requested Product'.Rate
+
+
+
+
+
+ 'Requested Product'.Term
+
+
+
+
+
+ 'Requested Product'.Amount
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Routing Rules'
+
+
+
+
+ 'Bureau Data'.Bankrupt
+
+
+
+
+
+ 'Bureau Data'.'Credit Score'
+
+
+
+
+
+ 'Post-bureau Risk Category'
+
+
+
+
+
+ 'Post-bureau Affordability'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "ACCEPT"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Monthly Income' - ('Monthly Expenses' + 'Monthly Repayments')
+
+
+
+
+
+
+ 'Credit Contingency Factor Table'
+
+
+
+
+ 'Risk Category'
+
+
+
+
+
+
+
+ if 'Disposable Income' * 'Credit Contingency Factor' > 'Required Monthly Installment' then true else false
+
+
+
+
+ Affordability
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Risk Category'
+
+
+ "DECLINE", "HIGH", "LOW", "MEDIUM", "VERY LOW"
+
+
+
+
+
+ "HIGH", "DECLINE"
+
+
+ 0.6
+
+
+
+
+ "MEDIUM"
+
+
+ 0.7
+
+
+
+
+ "LOW", "VERY LOW"
+
+
+ 0.8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Pre-bureau Risk Category'
+
+
+
+
+ 'Pre-bureau Affordability'
+
+
+
+
+ Age
+
+
+
+
+
+ "DECLINE"
+
+
+ -
+
+
+ -
+
+
+ "INELIGIBLE"
+
+
+
+
+ -
+
+
+ false
+
+
+ -
+
+
+ "INELIGIBLE"
+
+
+
+
+ -
+
+
+ -
+
+
+ <18
+
+
+ "INELIGIBLE"
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ "ELIGIBLE"
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Pre-bureau Risk Category'
+
+
+
+
+
+ "HIGH","MEDIUM"
+
+
+ "FULL"
+
+
+
+
+ "LOW"
+
+
+ "MINI"
+
+
+
+
+ "VERY LOW","DECLINE"
+
+
+ "NONE"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Existing Customer'
+
+
+
+
+ 'Application Risk Score'
+
+
+
+
+
+ false
+
+
+ <100
+
+
+ "HIGH"
+
+
+
+
+ false
+
+
+ [100..120)
+
+
+ "MEDIUM"
+
+
+
+
+ false
+
+
+ [120..130)
+
+
+ "LOW"
+
+
+
+
+ false
+
+
+ >130
+
+
+ "VERY LOW"
+
+
+
+
+ true
+
+
+ <80
+
+
+ "DECLINE"
+
+
+
+
+ true
+
+
+ [80..90)
+
+
+ "HIGH"
+
+
+
+
+ true
+
+
+ [90..110]
+
+
+ "MEDIUM"
+
+
+
+
+ true
+
+
+ >110
+
+
+ "LOW"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Existing Customer'
+
+
+
+
+ 'Application Risk Score'
+
+
+
+
+ 'Credit Score'
+
+
+
+
+
+ false
+
+
+ <120
+
+
+ <590
+
+
+ "HIGH"
+
+
+
+
+ false
+
+
+ <120
+
+
+ [590..610]
+
+
+ "MEDIUM"
+
+
+
+
+ false
+
+
+ <120
+
+
+ >610
+
+
+ "LOW"
+
+
+
+
+ false
+
+
+ [120..130]
+
+
+ <600
+
+
+ "HIGH"
+
+
+
+
+ false
+
+
+ [120..130]
+
+
+ [600..625]
+
+
+ "MEDIUM"
+
+
+
+
+ false
+
+
+ [120..130]
+
+
+ >625
+
+
+ "LOW"
+
+
+
+
+ false
+
+
+ >130
+
+
+ -
+
+
+ "VERY LOW"
+
+
+
+
+ true
+
+
+ <=100
+
+
+ <580
+
+
+ "HIGH"
+
+
+
+
+ true
+
+
+ <=100
+
+
+ [580..600]
+
+
+ "MEDIUM"
+
+
+
+
+ true
+
+
+ <=100
+
+
+ >600
+
+
+ "LOW"
+
+
+
+
+ true
+
+
+ >100
+
+
+ <590
+
+
+ "HIGH"
+
+
+
+
+ true
+
+
+ >100
+
+
+ [590..615]
+
+
+ "MEDIUM"
+
+
+
+
+ true
+
+
+ >100
+
+
+ >615
+
+
+ "LOW"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Age
+
+
+ [18..120]
+
+
+
+
+ 'Marital Status'
+
+
+ "S","M"
+
+
+
+
+ 'Employment Status'
+
+
+ "UNEMPLOYED", "EMPLOYED", "SELF-EMPLOYED", "STUDENT"
+
+
+
+
+
+ [18..21]
+
+
+ -
+
+
+ -
+
+
+ 32
+
+
+
+
+ [22..25]
+
+
+ -
+
+
+ -
+
+
+ 35
+
+
+
+
+ [26..35]
+
+
+ -
+
+
+ -
+
+
+ 40
+
+
+
+
+ [36..49]
+
+
+ -
+
+
+ -
+
+
+ 43
+
+
+
+
+ >=50
+
+
+ -
+
+
+ -
+
+
+ 48
+
+
+
+
+ -
+
+
+ "S"
+
+
+ -
+
+
+ 25
+
+
+
+
+ -
+
+
+ "M"
+
+
+ -
+
+
+ 45
+
+
+
+
+ -
+
+
+ -
+
+
+ "UNEMPLOYED"
+
+
+ 15
+
+
+
+
+ -
+
+
+ -
+
+
+ "EMPLOYED"
+
+
+ 45
+
+
+
+
+ -
+
+
+ -
+
+
+ "SELF-EMPLOYED"
+
+
+ 36
+
+
+
+
+ -
+
+
+ -
+
+
+ "STUDENT"
+
+
+ 18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if 'Product Type'="STANDARD LOAN" then 20.00 else if 'Product Type'="SPECIAL LOAN" then 25.00 else null
+
+
+
+
+
+ (Amount *Rate/12) / (1 - (1 + Rate/12)**-Term)
+
+
+
+
+ 'Monthly Repayment' + 'Monthly Fee'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Post-bureau Risk Category'
+
+
+
+
+ 'Post-bureau Affordability'
+
+
+
+
+ Bankrupt
+
+
+
+
+ 'Credit Score'
+
+
+
+
+
+ -
+
+
+ false
+
+
+ -
+
+
+ -
+
+
+ "DECLINE"
+
+
+
+
+ -
+
+
+ -
+
+
+ true
+
+
+ -
+
+
+ "DECLINE"
+
+
+
+
+ "HIGH"
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ "REFER"
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ <580
+
+
+ "REFER"
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ "ACCEPT"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TestExamples/order-discount/order-discount.dmn b/TestExamples/order-discount/order-discount.dmn
index 927893e7..ef427f6f 100644
--- a/TestExamples/order-discount/order-discount.dmn
+++ b/TestExamples/order-discount/order-discount.dmn
@@ -1,42 +1,42 @@
-
-
-
-
-
- amount
-
-
-
-
-
-
- 0
-
-
-
- [500..999]
-
- 2
-
-
-
- [1000..1999]
-
- 3
-
-
-
- [2000..4999]
-
- 5
-
-
-
- = 5000]]>
-
- 8
-
-
-
-
-
+
+
+
+
+
+ amount
+
+
+
+
+
+
+ 0
+
+
+
+ [500..999]
+
+ 2
+
+
+
+ [1000..1999]
+
+ 3
+
+
+
+ [2000..4999]
+
+ 5
+
+
+
+ = 5000]]>
+
+ 8
+
+
+
+
+
diff --git a/TestResults/FujitsuDXP/2.4/tck_results.properties b/TestResults/FujitsuDXP/2.4/tck_results.properties
index db8d8f80..1bba6c3c 100644
--- a/TestResults/FujitsuDXP/2.4/tck_results.properties
+++ b/TestResults/FujitsuDXP/2.4/tck_results.properties
@@ -1,8 +1,8 @@
-vendor.name=Fujitsu America
-vendor.url=http://www.fujitsu.com/us/about/local/corporate/subsidiaries/fai/
-product.name=Digital Transformation Platform (DXP)
-product.url=http://www.fujitsu.com/global/products/software/middleware/application-infrastructure/interstage/solutions/bpmgt/bpm/
-product.version=2.4
-product.comment=Fujitsu DXP includes REST API for DMN using DROOLS for execution of DMN models included in applications
-last.update=2019-07-22
-instructions.url=http://dist.interstagebpm.com/tck/
+vendor.name=Fujitsu America
+vendor.url=http://www.fujitsu.com/us/about/local/corporate/subsidiaries/fai/
+product.name=Digital Transformation Platform (DXP)
+product.url=http://www.fujitsu.com/global/products/software/middleware/application-infrastructure/interstage/solutions/bpmgt/bpm/
+product.version=2.4
+product.comment=Fujitsu DXP includes REST API for DMN using DROOLS for execution of DMN models included in applications
+last.update=2019-07-22
+instructions.url=http://dist.interstagebpm.com/tck/
diff --git a/TestResults/OpenRules/7.0.0/tck_results.properties b/TestResults/OpenRules/7.0.0/tck_results.properties
index 5c235bbf..7512761b 100644
--- a/TestResults/OpenRules/7.0.0/tck_results.properties
+++ b/TestResults/OpenRules/7.0.0/tck_results.properties
@@ -1,8 +1,8 @@
-vendor.name=OpenRules, Inc.
-vendor.url=http://www.openrules.com
-product.name=OpenRules
-product.url=http://www.openrules.org
-product.version=7.0.0
-product.comment=OpenRules provides a runtime compliance level 2 engine
-last.update=2017-07-05
-instructions.url=
+vendor.name=OpenRules, Inc.
+vendor.url=http://www.openrules.com
+product.name=OpenRules
+product.url=http://www.openrules.org
+product.version=7.0.0
+product.comment=OpenRules provides a runtime compliance level 2 engine
+last.update=2017-07-05
+instructions.url=
diff --git a/docs/archive-DMNv1.1/js/Chart.bundle.js b/docs/archive-DMNv1.1/js/Chart.bundle.js
index f015a67d..c83d8b23 100644
--- a/docs/archive-DMNv1.1/js/Chart.bundle.js
+++ b/docs/archive-DMNv1.1/js/Chart.bundle.js
@@ -8,712 +8,712 @@
* https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o lum2) {
- return (lum1 + 0.05) / (lum2 + 0.05);
- }
- return (lum2 + 0.05) / (lum1 + 0.05);
- },
-
- level: function (color2) {
- var contrastRatio = this.contrast(color2);
- if (contrastRatio >= 7.1) {
- return 'AAA';
- }
-
- return (contrastRatio >= 4.5) ? 'AA' : '';
- },
-
- dark: function () {
- // YIQ equation from http://24ways.org/2010/calculating-color-contrast
- var rgb = this.values.rgb;
- var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
- return yiq < 128;
- },
-
- light: function () {
- return !this.dark();
- },
-
- negate: function () {
- var rgb = [];
- for (var i = 0; i < 3; i++) {
- rgb[i] = 255 - this.values.rgb[i];
- }
- this.setValues('rgb', rgb);
- return this;
- },
-
- lighten: function (ratio) {
- var hsl = this.values.hsl;
- hsl[2] += hsl[2] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- darken: function (ratio) {
- var hsl = this.values.hsl;
- hsl[2] -= hsl[2] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- saturate: function (ratio) {
- var hsl = this.values.hsl;
- hsl[1] += hsl[1] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- desaturate: function (ratio) {
- var hsl = this.values.hsl;
- hsl[1] -= hsl[1] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- whiten: function (ratio) {
- var hwb = this.values.hwb;
- hwb[1] += hwb[1] * ratio;
- this.setValues('hwb', hwb);
- return this;
- },
-
- blacken: function (ratio) {
- var hwb = this.values.hwb;
- hwb[2] += hwb[2] * ratio;
- this.setValues('hwb', hwb);
- return this;
- },
-
- greyscale: function () {
- var rgb = this.values.rgb;
- // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
- var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
- this.setValues('rgb', [val, val, val]);
- return this;
- },
-
- clearer: function (ratio) {
- var alpha = this.values.alpha;
- this.setValues('alpha', alpha - (alpha * ratio));
- return this;
- },
-
- opaquer: function (ratio) {
- var alpha = this.values.alpha;
- this.setValues('alpha', alpha + (alpha * ratio));
- return this;
- },
-
- rotate: function (degrees) {
- var hsl = this.values.hsl;
- var hue = (hsl[0] + degrees) % 360;
- hsl[0] = hue < 0 ? 360 + hue : hue;
- this.setValues('hsl', hsl);
- return this;
- },
-
- /**
- * Ported from sass implementation in C
- * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
- */
- mix: function (mixinColor, weight) {
- var color1 = this;
- var color2 = mixinColor;
- var p = weight === undefined ? 0.5 : weight;
-
- var w = 2 * p - 1;
- var a = color1.alpha() - color2.alpha();
-
- var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
- var w2 = 1 - w1;
-
- return this
- .rgb(
- w1 * color1.red() + w2 * color2.red(),
- w1 * color1.green() + w2 * color2.green(),
- w1 * color1.blue() + w2 * color2.blue()
- )
- .alpha(color1.alpha() * p + color2.alpha() * (1 - p));
- },
-
- toJSON: function () {
- return this.rgb();
- },
-
- clone: function () {
- // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,
- // making the final build way to big to embed in Chart.js. So let's do it manually,
- // assuming that values to clone are 1 dimension arrays containing only numbers,
- // except 'alpha' which is a number.
- var result = new Color();
- var source = this.values;
- var target = result.values;
- var value, type;
-
- for (var prop in source) {
- if (source.hasOwnProperty(prop)) {
- value = source[prop];
- type = ({}).toString.call(value);
- if (type === '[object Array]') {
- target[prop] = value.slice(0);
- } else if (type === '[object Number]') {
- target[prop] = value;
- } else {
- console.error('unexpected color value:', value);
- }
- }
- }
-
- return result;
- }
-};
-
-Color.prototype.spaces = {
- rgb: ['red', 'green', 'blue'],
- hsl: ['hue', 'saturation', 'lightness'],
- hsv: ['hue', 'saturation', 'value'],
- hwb: ['hue', 'whiteness', 'blackness'],
- cmyk: ['cyan', 'magenta', 'yellow', 'black']
-};
-
-Color.prototype.maxes = {
- rgb: [255, 255, 255],
- hsl: [360, 100, 100],
- hsv: [360, 100, 100],
- hwb: [360, 100, 100],
- cmyk: [100, 100, 100, 100]
-};
-
-Color.prototype.getValues = function (space) {
- var values = this.values;
- var vals = {};
-
- for (var i = 0; i < space.length; i++) {
- vals[space.charAt(i)] = values[space][i];
- }
-
- if (values.alpha !== 1) {
- vals.a = values.alpha;
- }
-
- // {r: 255, g: 255, b: 255, a: 0.4}
- return vals;
-};
-
-Color.prototype.setValues = function (space, vals) {
- var values = this.values;
- var spaces = this.spaces;
- var maxes = this.maxes;
- var alpha = 1;
- var i;
-
- if (space === 'alpha') {
- alpha = vals;
- } else if (vals.length) {
- // [10, 10, 10]
- values[space] = vals.slice(0, space.length);
- alpha = vals[space.length];
- } else if (vals[space.charAt(0)] !== undefined) {
- // {r: 10, g: 10, b: 10}
- for (i = 0; i < space.length; i++) {
- values[space][i] = vals[space.charAt(i)];
- }
-
- alpha = vals.a;
- } else if (vals[spaces[space][0]] !== undefined) {
- // {red: 10, green: 10, blue: 10}
- var chans = spaces[space];
-
- for (i = 0; i < space.length; i++) {
- values[space][i] = vals[chans[i]];
- }
-
- alpha = vals.alpha;
- }
-
- values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));
-
- if (space === 'alpha') {
- return false;
- }
-
- var capped;
-
- // cap values of the space prior converting all values
- for (i = 0; i < space.length; i++) {
- capped = Math.max(0, Math.min(maxes[space][i], values[space][i]));
- values[space][i] = Math.round(capped);
- }
-
- // convert to all the other color spaces
- for (var sname in spaces) {
- if (sname !== space) {
- values[sname] = convert[space][sname](values[space]);
- }
- }
-
- return true;
-};
-
-Color.prototype.setSpace = function (space, args) {
- var vals = args[0];
-
- if (vals === undefined) {
- // color.rgb()
- return this.getValues(space);
- }
-
- // color.rgb(10, 10, 10)
- if (typeof vals === 'number') {
- vals = Array.prototype.slice.call(args);
- }
-
- this.setValues(space, vals);
- return this;
-};
-
-Color.prototype.setChannel = function (space, index, val) {
- var svalues = this.values[space];
- if (val === undefined) {
- // color.red()
- return svalues[index];
- } else if (val === svalues[index]) {
- // color.red(color.red())
- return this;
- }
-
- // color.red(100)
- svalues[index] = val;
- this.setValues(space, svalues);
-
- return this;
-};
-
-if (typeof window !== 'undefined') {
- window.Color = Color;
-}
-
-module.exports = Color;
+/* MIT license */
+var convert = require(4);
+var string = require(1);
+
+var Color = function (obj) {
+ if (obj instanceof Color) {
+ return obj;
+ }
+ if (!(this instanceof Color)) {
+ return new Color(obj);
+ }
+
+ this.values = {
+ rgb: [0, 0, 0],
+ hsl: [0, 0, 0],
+ hsv: [0, 0, 0],
+ hwb: [0, 0, 0],
+ cmyk: [0, 0, 0, 0],
+ alpha: 1
+ };
+
+ // parse Color() argument
+ var vals;
+ if (typeof obj === 'string') {
+ vals = string.getRgba(obj);
+ if (vals) {
+ this.setValues('rgb', vals);
+ } else if (vals = string.getHsla(obj)) {
+ this.setValues('hsl', vals);
+ } else if (vals = string.getHwb(obj)) {
+ this.setValues('hwb', vals);
+ } else {
+ throw new Error('Unable to parse color from string "' + obj + '"');
+ }
+ } else if (typeof obj === 'object') {
+ vals = obj;
+ if (vals.r !== undefined || vals.red !== undefined) {
+ this.setValues('rgb', vals);
+ } else if (vals.l !== undefined || vals.lightness !== undefined) {
+ this.setValues('hsl', vals);
+ } else if (vals.v !== undefined || vals.value !== undefined) {
+ this.setValues('hsv', vals);
+ } else if (vals.w !== undefined || vals.whiteness !== undefined) {
+ this.setValues('hwb', vals);
+ } else if (vals.c !== undefined || vals.cyan !== undefined) {
+ this.setValues('cmyk', vals);
+ } else {
+ throw new Error('Unable to parse color from object ' + JSON.stringify(obj));
+ }
+ }
+};
+
+Color.prototype = {
+ rgb: function () {
+ return this.setSpace('rgb', arguments);
+ },
+ hsl: function () {
+ return this.setSpace('hsl', arguments);
+ },
+ hsv: function () {
+ return this.setSpace('hsv', arguments);
+ },
+ hwb: function () {
+ return this.setSpace('hwb', arguments);
+ },
+ cmyk: function () {
+ return this.setSpace('cmyk', arguments);
+ },
+
+ rgbArray: function () {
+ return this.values.rgb;
+ },
+ hslArray: function () {
+ return this.values.hsl;
+ },
+ hsvArray: function () {
+ return this.values.hsv;
+ },
+ hwbArray: function () {
+ var values = this.values;
+ if (values.alpha !== 1) {
+ return values.hwb.concat([values.alpha]);
+ }
+ return values.hwb;
+ },
+ cmykArray: function () {
+ return this.values.cmyk;
+ },
+ rgbaArray: function () {
+ var values = this.values;
+ return values.rgb.concat([values.alpha]);
+ },
+ hslaArray: function () {
+ var values = this.values;
+ return values.hsl.concat([values.alpha]);
+ },
+ alpha: function (val) {
+ if (val === undefined) {
+ return this.values.alpha;
+ }
+ this.setValues('alpha', val);
+ return this;
+ },
+
+ red: function (val) {
+ return this.setChannel('rgb', 0, val);
+ },
+ green: function (val) {
+ return this.setChannel('rgb', 1, val);
+ },
+ blue: function (val) {
+ return this.setChannel('rgb', 2, val);
+ },
+ hue: function (val) {
+ if (val) {
+ val %= 360;
+ val = val < 0 ? 360 + val : val;
+ }
+ return this.setChannel('hsl', 0, val);
+ },
+ saturation: function (val) {
+ return this.setChannel('hsl', 1, val);
+ },
+ lightness: function (val) {
+ return this.setChannel('hsl', 2, val);
+ },
+ saturationv: function (val) {
+ return this.setChannel('hsv', 1, val);
+ },
+ whiteness: function (val) {
+ return this.setChannel('hwb', 1, val);
+ },
+ blackness: function (val) {
+ return this.setChannel('hwb', 2, val);
+ },
+ value: function (val) {
+ return this.setChannel('hsv', 2, val);
+ },
+ cyan: function (val) {
+ return this.setChannel('cmyk', 0, val);
+ },
+ magenta: function (val) {
+ return this.setChannel('cmyk', 1, val);
+ },
+ yellow: function (val) {
+ return this.setChannel('cmyk', 2, val);
+ },
+ black: function (val) {
+ return this.setChannel('cmyk', 3, val);
+ },
+
+ hexString: function () {
+ return string.hexString(this.values.rgb);
+ },
+ rgbString: function () {
+ return string.rgbString(this.values.rgb, this.values.alpha);
+ },
+ rgbaString: function () {
+ return string.rgbaString(this.values.rgb, this.values.alpha);
+ },
+ percentString: function () {
+ return string.percentString(this.values.rgb, this.values.alpha);
+ },
+ hslString: function () {
+ return string.hslString(this.values.hsl, this.values.alpha);
+ },
+ hslaString: function () {
+ return string.hslaString(this.values.hsl, this.values.alpha);
+ },
+ hwbString: function () {
+ return string.hwbString(this.values.hwb, this.values.alpha);
+ },
+ keyword: function () {
+ return string.keyword(this.values.rgb, this.values.alpha);
+ },
+
+ rgbNumber: function () {
+ var rgb = this.values.rgb;
+ return (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];
+ },
+
+ luminosity: function () {
+ // http://www.w3.org/TR/WCAG20/#relativeluminancedef
+ var rgb = this.values.rgb;
+ var lum = [];
+ for (var i = 0; i < rgb.length; i++) {
+ var chan = rgb[i] / 255;
+ lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);
+ }
+ return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
+ },
+
+ contrast: function (color2) {
+ // http://www.w3.org/TR/WCAG20/#contrast-ratiodef
+ var lum1 = this.luminosity();
+ var lum2 = color2.luminosity();
+ if (lum1 > lum2) {
+ return (lum1 + 0.05) / (lum2 + 0.05);
+ }
+ return (lum2 + 0.05) / (lum1 + 0.05);
+ },
+
+ level: function (color2) {
+ var contrastRatio = this.contrast(color2);
+ if (contrastRatio >= 7.1) {
+ return 'AAA';
+ }
+
+ return (contrastRatio >= 4.5) ? 'AA' : '';
+ },
+
+ dark: function () {
+ // YIQ equation from http://24ways.org/2010/calculating-color-contrast
+ var rgb = this.values.rgb;
+ var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
+ return yiq < 128;
+ },
+
+ light: function () {
+ return !this.dark();
+ },
+
+ negate: function () {
+ var rgb = [];
+ for (var i = 0; i < 3; i++) {
+ rgb[i] = 255 - this.values.rgb[i];
+ }
+ this.setValues('rgb', rgb);
+ return this;
+ },
+
+ lighten: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[2] += hsl[2] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ darken: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[2] -= hsl[2] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ saturate: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[1] += hsl[1] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ desaturate: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[1] -= hsl[1] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ whiten: function (ratio) {
+ var hwb = this.values.hwb;
+ hwb[1] += hwb[1] * ratio;
+ this.setValues('hwb', hwb);
+ return this;
+ },
+
+ blacken: function (ratio) {
+ var hwb = this.values.hwb;
+ hwb[2] += hwb[2] * ratio;
+ this.setValues('hwb', hwb);
+ return this;
+ },
+
+ greyscale: function () {
+ var rgb = this.values.rgb;
+ // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
+ var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
+ this.setValues('rgb', [val, val, val]);
+ return this;
+ },
+
+ clearer: function (ratio) {
+ var alpha = this.values.alpha;
+ this.setValues('alpha', alpha - (alpha * ratio));
+ return this;
+ },
+
+ opaquer: function (ratio) {
+ var alpha = this.values.alpha;
+ this.setValues('alpha', alpha + (alpha * ratio));
+ return this;
+ },
+
+ rotate: function (degrees) {
+ var hsl = this.values.hsl;
+ var hue = (hsl[0] + degrees) % 360;
+ hsl[0] = hue < 0 ? 360 + hue : hue;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ /**
+ * Ported from sass implementation in C
+ * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
+ */
+ mix: function (mixinColor, weight) {
+ var color1 = this;
+ var color2 = mixinColor;
+ var p = weight === undefined ? 0.5 : weight;
+
+ var w = 2 * p - 1;
+ var a = color1.alpha() - color2.alpha();
+
+ var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
+ var w2 = 1 - w1;
+
+ return this
+ .rgb(
+ w1 * color1.red() + w2 * color2.red(),
+ w1 * color1.green() + w2 * color2.green(),
+ w1 * color1.blue() + w2 * color2.blue()
+ )
+ .alpha(color1.alpha() * p + color2.alpha() * (1 - p));
+ },
+
+ toJSON: function () {
+ return this.rgb();
+ },
+
+ clone: function () {
+ // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,
+ // making the final build way to big to embed in Chart.js. So let's do it manually,
+ // assuming that values to clone are 1 dimension arrays containing only numbers,
+ // except 'alpha' which is a number.
+ var result = new Color();
+ var source = this.values;
+ var target = result.values;
+ var value, type;
+
+ for (var prop in source) {
+ if (source.hasOwnProperty(prop)) {
+ value = source[prop];
+ type = ({}).toString.call(value);
+ if (type === '[object Array]') {
+ target[prop] = value.slice(0);
+ } else if (type === '[object Number]') {
+ target[prop] = value;
+ } else {
+ console.error('unexpected color value:', value);
+ }
+ }
+ }
+
+ return result;
+ }
+};
+
+Color.prototype.spaces = {
+ rgb: ['red', 'green', 'blue'],
+ hsl: ['hue', 'saturation', 'lightness'],
+ hsv: ['hue', 'saturation', 'value'],
+ hwb: ['hue', 'whiteness', 'blackness'],
+ cmyk: ['cyan', 'magenta', 'yellow', 'black']
+};
+
+Color.prototype.maxes = {
+ rgb: [255, 255, 255],
+ hsl: [360, 100, 100],
+ hsv: [360, 100, 100],
+ hwb: [360, 100, 100],
+ cmyk: [100, 100, 100, 100]
+};
+
+Color.prototype.getValues = function (space) {
+ var values = this.values;
+ var vals = {};
+
+ for (var i = 0; i < space.length; i++) {
+ vals[space.charAt(i)] = values[space][i];
+ }
+
+ if (values.alpha !== 1) {
+ vals.a = values.alpha;
+ }
+
+ // {r: 255, g: 255, b: 255, a: 0.4}
+ return vals;
+};
+
+Color.prototype.setValues = function (space, vals) {
+ var values = this.values;
+ var spaces = this.spaces;
+ var maxes = this.maxes;
+ var alpha = 1;
+ var i;
+
+ if (space === 'alpha') {
+ alpha = vals;
+ } else if (vals.length) {
+ // [10, 10, 10]
+ values[space] = vals.slice(0, space.length);
+ alpha = vals[space.length];
+ } else if (vals[space.charAt(0)] !== undefined) {
+ // {r: 10, g: 10, b: 10}
+ for (i = 0; i < space.length; i++) {
+ values[space][i] = vals[space.charAt(i)];
+ }
+
+ alpha = vals.a;
+ } else if (vals[spaces[space][0]] !== undefined) {
+ // {red: 10, green: 10, blue: 10}
+ var chans = spaces[space];
+
+ for (i = 0; i < space.length; i++) {
+ values[space][i] = vals[chans[i]];
+ }
+
+ alpha = vals.alpha;
+ }
+
+ values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));
+
+ if (space === 'alpha') {
+ return false;
+ }
+
+ var capped;
+
+ // cap values of the space prior converting all values
+ for (i = 0; i < space.length; i++) {
+ capped = Math.max(0, Math.min(maxes[space][i], values[space][i]));
+ values[space][i] = Math.round(capped);
+ }
+
+ // convert to all the other color spaces
+ for (var sname in spaces) {
+ if (sname !== space) {
+ values[sname] = convert[space][sname](values[space]);
+ }
+ }
+
+ return true;
+};
+
+Color.prototype.setSpace = function (space, args) {
+ var vals = args[0];
+
+ if (vals === undefined) {
+ // color.rgb()
+ return this.getValues(space);
+ }
+
+ // color.rgb(10, 10, 10)
+ if (typeof vals === 'number') {
+ vals = Array.prototype.slice.call(args);
+ }
+
+ this.setValues(space, vals);
+ return this;
+};
+
+Color.prototype.setChannel = function (space, index, val) {
+ var svalues = this.values[space];
+ if (val === undefined) {
+ // color.red()
+ return svalues[index];
+ } else if (val === svalues[index]) {
+ // color.red(color.red())
+ return this;
+ }
+
+ // color.red(100)
+ svalues[index] = val;
+ this.setValues(space, svalues);
+
+ return this;
+};
+
+if (typeof window !== 'undefined') {
+ window.Color = Color;
+}
+
+module.exports = Color;
},{"1":1,"4":4}],3:[function(require,module,exports){
/* MIT license */
@@ -1509,155 +1509,155 @@ Converter.prototype.getValues = function(space) {
module.exports = convert;
},{"3":3}],5:[function(require,module,exports){
-module.exports = {
- "aliceblue": [240, 248, 255],
- "antiquewhite": [250, 235, 215],
- "aqua": [0, 255, 255],
- "aquamarine": [127, 255, 212],
- "azure": [240, 255, 255],
- "beige": [245, 245, 220],
- "bisque": [255, 228, 196],
- "black": [0, 0, 0],
- "blanchedalmond": [255, 235, 205],
- "blue": [0, 0, 255],
- "blueviolet": [138, 43, 226],
- "brown": [165, 42, 42],
- "burlywood": [222, 184, 135],
- "cadetblue": [95, 158, 160],
- "chartreuse": [127, 255, 0],
- "chocolate": [210, 105, 30],
- "coral": [255, 127, 80],
- "cornflowerblue": [100, 149, 237],
- "cornsilk": [255, 248, 220],
- "crimson": [220, 20, 60],
- "cyan": [0, 255, 255],
- "darkblue": [0, 0, 139],
- "darkcyan": [0, 139, 139],
- "darkgoldenrod": [184, 134, 11],
- "darkgray": [169, 169, 169],
- "darkgreen": [0, 100, 0],
- "darkgrey": [169, 169, 169],
- "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],
- "darkseagreen": [143, 188, 143],
- "darkslateblue": [72, 61, 139],
- "darkslategray": [47, 79, 79],
- "darkslategrey": [47, 79, 79],
- "darkturquoise": [0, 206, 209],
- "darkviolet": [148, 0, 211],
- "deeppink": [255, 20, 147],
- "deepskyblue": [0, 191, 255],
- "dimgray": [105, 105, 105],
- "dimgrey": [105, 105, 105],
- "dodgerblue": [30, 144, 255],
- "firebrick": [178, 34, 34],
- "floralwhite": [255, 250, 240],
- "forestgreen": [34, 139, 34],
- "fuchsia": [255, 0, 255],
- "gainsboro": [220, 220, 220],
- "ghostwhite": [248, 248, 255],
- "gold": [255, 215, 0],
- "goldenrod": [218, 165, 32],
- "gray": [128, 128, 128],
- "green": [0, 128, 0],
- "greenyellow": [173, 255, 47],
- "grey": [128, 128, 128],
- "honeydew": [240, 255, 240],
- "hotpink": [255, 105, 180],
- "indianred": [205, 92, 92],
- "indigo": [75, 0, 130],
- "ivory": [255, 255, 240],
- "khaki": [240, 230, 140],
- "lavender": [230, 230, 250],
- "lavenderblush": [255, 240, 245],
- "lawngreen": [124, 252, 0],
- "lemonchiffon": [255, 250, 205],
- "lightblue": [173, 216, 230],
- "lightcoral": [240, 128, 128],
- "lightcyan": [224, 255, 255],
- "lightgoldenrodyellow": [250, 250, 210],
- "lightgray": [211, 211, 211],
- "lightgreen": [144, 238, 144],
- "lightgrey": [211, 211, 211],
- "lightpink": [255, 182, 193],
- "lightsalmon": [255, 160, 122],
- "lightseagreen": [32, 178, 170],
- "lightskyblue": [135, 206, 250],
- "lightslategray": [119, 136, 153],
- "lightslategrey": [119, 136, 153],
- "lightsteelblue": [176, 196, 222],
- "lightyellow": [255, 255, 224],
- "lime": [0, 255, 0],
- "limegreen": [50, 205, 50],
- "linen": [250, 240, 230],
- "magenta": [255, 0, 255],
- "maroon": [128, 0, 0],
- "mediumaquamarine": [102, 205, 170],
- "mediumblue": [0, 0, 205],
- "mediumorchid": [186, 85, 211],
- "mediumpurple": [147, 112, 219],
- "mediumseagreen": [60, 179, 113],
- "mediumslateblue": [123, 104, 238],
- "mediumspringgreen": [0, 250, 154],
- "mediumturquoise": [72, 209, 204],
- "mediumvioletred": [199, 21, 133],
- "midnightblue": [25, 25, 112],
- "mintcream": [245, 255, 250],
- "mistyrose": [255, 228, 225],
- "moccasin": [255, 228, 181],
- "navajowhite": [255, 222, 173],
- "navy": [0, 0, 128],
- "oldlace": [253, 245, 230],
- "olive": [128, 128, 0],
- "olivedrab": [107, 142, 35],
- "orange": [255, 165, 0],
- "orangered": [255, 69, 0],
- "orchid": [218, 112, 214],
- "palegoldenrod": [238, 232, 170],
- "palegreen": [152, 251, 152],
- "paleturquoise": [175, 238, 238],
- "palevioletred": [219, 112, 147],
- "papayawhip": [255, 239, 213],
- "peachpuff": [255, 218, 185],
- "peru": [205, 133, 63],
- "pink": [255, 192, 203],
- "plum": [221, 160, 221],
- "powderblue": [176, 224, 230],
- "purple": [128, 0, 128],
- "rebeccapurple": [102, 51, 153],
- "red": [255, 0, 0],
- "rosybrown": [188, 143, 143],
- "royalblue": [65, 105, 225],
- "saddlebrown": [139, 69, 19],
- "salmon": [250, 128, 114],
- "sandybrown": [244, 164, 96],
- "seagreen": [46, 139, 87],
- "seashell": [255, 245, 238],
- "sienna": [160, 82, 45],
- "silver": [192, 192, 192],
- "skyblue": [135, 206, 235],
- "slateblue": [106, 90, 205],
- "slategray": [112, 128, 144],
- "slategrey": [112, 128, 144],
- "snow": [255, 250, 250],
- "springgreen": [0, 255, 127],
- "steelblue": [70, 130, 180],
- "tan": [210, 180, 140],
- "teal": [0, 128, 128],
- "thistle": [216, 191, 216],
- "tomato": [255, 99, 71],
- "turquoise": [64, 224, 208],
- "violet": [238, 130, 238],
- "wheat": [245, 222, 179],
- "white": [255, 255, 255],
- "whitesmoke": [245, 245, 245],
- "yellow": [255, 255, 0],
- "yellowgreen": [154, 205, 50]
+module.exports = {
+ "aliceblue": [240, 248, 255],
+ "antiquewhite": [250, 235, 215],
+ "aqua": [0, 255, 255],
+ "aquamarine": [127, 255, 212],
+ "azure": [240, 255, 255],
+ "beige": [245, 245, 220],
+ "bisque": [255, 228, 196],
+ "black": [0, 0, 0],
+ "blanchedalmond": [255, 235, 205],
+ "blue": [0, 0, 255],
+ "blueviolet": [138, 43, 226],
+ "brown": [165, 42, 42],
+ "burlywood": [222, 184, 135],
+ "cadetblue": [95, 158, 160],
+ "chartreuse": [127, 255, 0],
+ "chocolate": [210, 105, 30],
+ "coral": [255, 127, 80],
+ "cornflowerblue": [100, 149, 237],
+ "cornsilk": [255, 248, 220],
+ "crimson": [220, 20, 60],
+ "cyan": [0, 255, 255],
+ "darkblue": [0, 0, 139],
+ "darkcyan": [0, 139, 139],
+ "darkgoldenrod": [184, 134, 11],
+ "darkgray": [169, 169, 169],
+ "darkgreen": [0, 100, 0],
+ "darkgrey": [169, 169, 169],
+ "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],
+ "darkseagreen": [143, 188, 143],
+ "darkslateblue": [72, 61, 139],
+ "darkslategray": [47, 79, 79],
+ "darkslategrey": [47, 79, 79],
+ "darkturquoise": [0, 206, 209],
+ "darkviolet": [148, 0, 211],
+ "deeppink": [255, 20, 147],
+ "deepskyblue": [0, 191, 255],
+ "dimgray": [105, 105, 105],
+ "dimgrey": [105, 105, 105],
+ "dodgerblue": [30, 144, 255],
+ "firebrick": [178, 34, 34],
+ "floralwhite": [255, 250, 240],
+ "forestgreen": [34, 139, 34],
+ "fuchsia": [255, 0, 255],
+ "gainsboro": [220, 220, 220],
+ "ghostwhite": [248, 248, 255],
+ "gold": [255, 215, 0],
+ "goldenrod": [218, 165, 32],
+ "gray": [128, 128, 128],
+ "green": [0, 128, 0],
+ "greenyellow": [173, 255, 47],
+ "grey": [128, 128, 128],
+ "honeydew": [240, 255, 240],
+ "hotpink": [255, 105, 180],
+ "indianred": [205, 92, 92],
+ "indigo": [75, 0, 130],
+ "ivory": [255, 255, 240],
+ "khaki": [240, 230, 140],
+ "lavender": [230, 230, 250],
+ "lavenderblush": [255, 240, 245],
+ "lawngreen": [124, 252, 0],
+ "lemonchiffon": [255, 250, 205],
+ "lightblue": [173, 216, 230],
+ "lightcoral": [240, 128, 128],
+ "lightcyan": [224, 255, 255],
+ "lightgoldenrodyellow": [250, 250, 210],
+ "lightgray": [211, 211, 211],
+ "lightgreen": [144, 238, 144],
+ "lightgrey": [211, 211, 211],
+ "lightpink": [255, 182, 193],
+ "lightsalmon": [255, 160, 122],
+ "lightseagreen": [32, 178, 170],
+ "lightskyblue": [135, 206, 250],
+ "lightslategray": [119, 136, 153],
+ "lightslategrey": [119, 136, 153],
+ "lightsteelblue": [176, 196, 222],
+ "lightyellow": [255, 255, 224],
+ "lime": [0, 255, 0],
+ "limegreen": [50, 205, 50],
+ "linen": [250, 240, 230],
+ "magenta": [255, 0, 255],
+ "maroon": [128, 0, 0],
+ "mediumaquamarine": [102, 205, 170],
+ "mediumblue": [0, 0, 205],
+ "mediumorchid": [186, 85, 211],
+ "mediumpurple": [147, 112, 219],
+ "mediumseagreen": [60, 179, 113],
+ "mediumslateblue": [123, 104, 238],
+ "mediumspringgreen": [0, 250, 154],
+ "mediumturquoise": [72, 209, 204],
+ "mediumvioletred": [199, 21, 133],
+ "midnightblue": [25, 25, 112],
+ "mintcream": [245, 255, 250],
+ "mistyrose": [255, 228, 225],
+ "moccasin": [255, 228, 181],
+ "navajowhite": [255, 222, 173],
+ "navy": [0, 0, 128],
+ "oldlace": [253, 245, 230],
+ "olive": [128, 128, 0],
+ "olivedrab": [107, 142, 35],
+ "orange": [255, 165, 0],
+ "orangered": [255, 69, 0],
+ "orchid": [218, 112, 214],
+ "palegoldenrod": [238, 232, 170],
+ "palegreen": [152, 251, 152],
+ "paleturquoise": [175, 238, 238],
+ "palevioletred": [219, 112, 147],
+ "papayawhip": [255, 239, 213],
+ "peachpuff": [255, 218, 185],
+ "peru": [205, 133, 63],
+ "pink": [255, 192, 203],
+ "plum": [221, 160, 221],
+ "powderblue": [176, 224, 230],
+ "purple": [128, 0, 128],
+ "rebeccapurple": [102, 51, 153],
+ "red": [255, 0, 0],
+ "rosybrown": [188, 143, 143],
+ "royalblue": [65, 105, 225],
+ "saddlebrown": [139, 69, 19],
+ "salmon": [250, 128, 114],
+ "sandybrown": [244, 164, 96],
+ "seagreen": [46, 139, 87],
+ "seashell": [255, 245, 238],
+ "sienna": [160, 82, 45],
+ "silver": [192, 192, 192],
+ "skyblue": [135, 206, 235],
+ "slateblue": [106, 90, 205],
+ "slategray": [112, 128, 144],
+ "slategrey": [112, 128, 144],
+ "snow": [255, 250, 250],
+ "springgreen": [0, 255, 127],
+ "steelblue": [70, 130, 180],
+ "tan": [210, 180, 140],
+ "teal": [0, 128, 128],
+ "thistle": [216, 191, 216],
+ "tomato": [255, 99, 71],
+ "turquoise": [64, 224, 208],
+ "violet": [238, 130, 238],
+ "wheat": [245, 222, 179],
+ "white": [255, 255, 255],
+ "whitesmoke": [245, 245, 245],
+ "yellow": [255, 255, 0],
+ "yellowgreen": [154, 205, 50]
};
},{}],6:[function(require,module,exports){
//! moment.js
@@ -6288,7 +6288,7 @@ module.exports = function(Chart) {
var xScale = me.getScaleForId(meta.xAxisID);
var stackCount = me.getStackCount();
- var tickWidth = xScale.width / xScale.ticks.length;
+ var tickWidth = xScale.width / xScale.ticks.length;
var categoryWidth = tickWidth * xScale.options.categoryPercentage;
var categorySpacing = (tickWidth - (tickWidth * xScale.options.categoryPercentage)) / 2;
var fullBarWidth = categoryWidth / stackCount;
@@ -6314,7 +6314,7 @@ module.exports = function(Chart) {
if (xScale.options.barThickness) {
return xScale.options.barThickness;
}
- return ruler.barWidth;
+ return ruler.barWidth;
},
// Get stack index from the given dataset index accounting for stacks and the fact that not all bars are visible
@@ -6364,7 +6364,7 @@ module.exports = function(Chart) {
(yScale.options.stacked === undefined && meta.stack !== undefined)) {
var base = yScale.getBaseValue();
var sumPos = base,
- sumNeg = base;
+ sumNeg = base;
for (var i = 0; i < datasetIndex; i++) {
var ds = me.chart.data.datasets[i];
@@ -6628,7 +6628,7 @@ module.exports = function(Chart) {
}
}
- return stacks.length - 1;
+ return stacks.length - 1;
},
calculateBarX: function(index, datasetIndex) {
@@ -6641,7 +6641,7 @@ module.exports = function(Chart) {
(xScale.options.stacked === undefined && meta.stack !== undefined)) {
var base = xScale.getBaseValue();
var sumPos = base,
- sumNeg = base;
+ sumNeg = base;
for (var i = 0; i < datasetIndex; i++) {
var ds = me.chart.data.datasets[i];
diff --git a/docs/archive-DMNv1.2/js/Chart.bundle.js b/docs/archive-DMNv1.2/js/Chart.bundle.js
index f015a67d..c83d8b23 100644
--- a/docs/archive-DMNv1.2/js/Chart.bundle.js
+++ b/docs/archive-DMNv1.2/js/Chart.bundle.js
@@ -8,712 +8,712 @@
* https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o lum2) {
- return (lum1 + 0.05) / (lum2 + 0.05);
- }
- return (lum2 + 0.05) / (lum1 + 0.05);
- },
-
- level: function (color2) {
- var contrastRatio = this.contrast(color2);
- if (contrastRatio >= 7.1) {
- return 'AAA';
- }
-
- return (contrastRatio >= 4.5) ? 'AA' : '';
- },
-
- dark: function () {
- // YIQ equation from http://24ways.org/2010/calculating-color-contrast
- var rgb = this.values.rgb;
- var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
- return yiq < 128;
- },
-
- light: function () {
- return !this.dark();
- },
-
- negate: function () {
- var rgb = [];
- for (var i = 0; i < 3; i++) {
- rgb[i] = 255 - this.values.rgb[i];
- }
- this.setValues('rgb', rgb);
- return this;
- },
-
- lighten: function (ratio) {
- var hsl = this.values.hsl;
- hsl[2] += hsl[2] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- darken: function (ratio) {
- var hsl = this.values.hsl;
- hsl[2] -= hsl[2] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- saturate: function (ratio) {
- var hsl = this.values.hsl;
- hsl[1] += hsl[1] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- desaturate: function (ratio) {
- var hsl = this.values.hsl;
- hsl[1] -= hsl[1] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- whiten: function (ratio) {
- var hwb = this.values.hwb;
- hwb[1] += hwb[1] * ratio;
- this.setValues('hwb', hwb);
- return this;
- },
-
- blacken: function (ratio) {
- var hwb = this.values.hwb;
- hwb[2] += hwb[2] * ratio;
- this.setValues('hwb', hwb);
- return this;
- },
-
- greyscale: function () {
- var rgb = this.values.rgb;
- // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
- var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
- this.setValues('rgb', [val, val, val]);
- return this;
- },
-
- clearer: function (ratio) {
- var alpha = this.values.alpha;
- this.setValues('alpha', alpha - (alpha * ratio));
- return this;
- },
-
- opaquer: function (ratio) {
- var alpha = this.values.alpha;
- this.setValues('alpha', alpha + (alpha * ratio));
- return this;
- },
-
- rotate: function (degrees) {
- var hsl = this.values.hsl;
- var hue = (hsl[0] + degrees) % 360;
- hsl[0] = hue < 0 ? 360 + hue : hue;
- this.setValues('hsl', hsl);
- return this;
- },
-
- /**
- * Ported from sass implementation in C
- * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
- */
- mix: function (mixinColor, weight) {
- var color1 = this;
- var color2 = mixinColor;
- var p = weight === undefined ? 0.5 : weight;
-
- var w = 2 * p - 1;
- var a = color1.alpha() - color2.alpha();
-
- var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
- var w2 = 1 - w1;
-
- return this
- .rgb(
- w1 * color1.red() + w2 * color2.red(),
- w1 * color1.green() + w2 * color2.green(),
- w1 * color1.blue() + w2 * color2.blue()
- )
- .alpha(color1.alpha() * p + color2.alpha() * (1 - p));
- },
-
- toJSON: function () {
- return this.rgb();
- },
-
- clone: function () {
- // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,
- // making the final build way to big to embed in Chart.js. So let's do it manually,
- // assuming that values to clone are 1 dimension arrays containing only numbers,
- // except 'alpha' which is a number.
- var result = new Color();
- var source = this.values;
- var target = result.values;
- var value, type;
-
- for (var prop in source) {
- if (source.hasOwnProperty(prop)) {
- value = source[prop];
- type = ({}).toString.call(value);
- if (type === '[object Array]') {
- target[prop] = value.slice(0);
- } else if (type === '[object Number]') {
- target[prop] = value;
- } else {
- console.error('unexpected color value:', value);
- }
- }
- }
-
- return result;
- }
-};
-
-Color.prototype.spaces = {
- rgb: ['red', 'green', 'blue'],
- hsl: ['hue', 'saturation', 'lightness'],
- hsv: ['hue', 'saturation', 'value'],
- hwb: ['hue', 'whiteness', 'blackness'],
- cmyk: ['cyan', 'magenta', 'yellow', 'black']
-};
-
-Color.prototype.maxes = {
- rgb: [255, 255, 255],
- hsl: [360, 100, 100],
- hsv: [360, 100, 100],
- hwb: [360, 100, 100],
- cmyk: [100, 100, 100, 100]
-};
-
-Color.prototype.getValues = function (space) {
- var values = this.values;
- var vals = {};
-
- for (var i = 0; i < space.length; i++) {
- vals[space.charAt(i)] = values[space][i];
- }
-
- if (values.alpha !== 1) {
- vals.a = values.alpha;
- }
-
- // {r: 255, g: 255, b: 255, a: 0.4}
- return vals;
-};
-
-Color.prototype.setValues = function (space, vals) {
- var values = this.values;
- var spaces = this.spaces;
- var maxes = this.maxes;
- var alpha = 1;
- var i;
-
- if (space === 'alpha') {
- alpha = vals;
- } else if (vals.length) {
- // [10, 10, 10]
- values[space] = vals.slice(0, space.length);
- alpha = vals[space.length];
- } else if (vals[space.charAt(0)] !== undefined) {
- // {r: 10, g: 10, b: 10}
- for (i = 0; i < space.length; i++) {
- values[space][i] = vals[space.charAt(i)];
- }
-
- alpha = vals.a;
- } else if (vals[spaces[space][0]] !== undefined) {
- // {red: 10, green: 10, blue: 10}
- var chans = spaces[space];
-
- for (i = 0; i < space.length; i++) {
- values[space][i] = vals[chans[i]];
- }
-
- alpha = vals.alpha;
- }
-
- values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));
-
- if (space === 'alpha') {
- return false;
- }
-
- var capped;
-
- // cap values of the space prior converting all values
- for (i = 0; i < space.length; i++) {
- capped = Math.max(0, Math.min(maxes[space][i], values[space][i]));
- values[space][i] = Math.round(capped);
- }
-
- // convert to all the other color spaces
- for (var sname in spaces) {
- if (sname !== space) {
- values[sname] = convert[space][sname](values[space]);
- }
- }
-
- return true;
-};
-
-Color.prototype.setSpace = function (space, args) {
- var vals = args[0];
-
- if (vals === undefined) {
- // color.rgb()
- return this.getValues(space);
- }
-
- // color.rgb(10, 10, 10)
- if (typeof vals === 'number') {
- vals = Array.prototype.slice.call(args);
- }
-
- this.setValues(space, vals);
- return this;
-};
-
-Color.prototype.setChannel = function (space, index, val) {
- var svalues = this.values[space];
- if (val === undefined) {
- // color.red()
- return svalues[index];
- } else if (val === svalues[index]) {
- // color.red(color.red())
- return this;
- }
-
- // color.red(100)
- svalues[index] = val;
- this.setValues(space, svalues);
-
- return this;
-};
-
-if (typeof window !== 'undefined') {
- window.Color = Color;
-}
-
-module.exports = Color;
+/* MIT license */
+var convert = require(4);
+var string = require(1);
+
+var Color = function (obj) {
+ if (obj instanceof Color) {
+ return obj;
+ }
+ if (!(this instanceof Color)) {
+ return new Color(obj);
+ }
+
+ this.values = {
+ rgb: [0, 0, 0],
+ hsl: [0, 0, 0],
+ hsv: [0, 0, 0],
+ hwb: [0, 0, 0],
+ cmyk: [0, 0, 0, 0],
+ alpha: 1
+ };
+
+ // parse Color() argument
+ var vals;
+ if (typeof obj === 'string') {
+ vals = string.getRgba(obj);
+ if (vals) {
+ this.setValues('rgb', vals);
+ } else if (vals = string.getHsla(obj)) {
+ this.setValues('hsl', vals);
+ } else if (vals = string.getHwb(obj)) {
+ this.setValues('hwb', vals);
+ } else {
+ throw new Error('Unable to parse color from string "' + obj + '"');
+ }
+ } else if (typeof obj === 'object') {
+ vals = obj;
+ if (vals.r !== undefined || vals.red !== undefined) {
+ this.setValues('rgb', vals);
+ } else if (vals.l !== undefined || vals.lightness !== undefined) {
+ this.setValues('hsl', vals);
+ } else if (vals.v !== undefined || vals.value !== undefined) {
+ this.setValues('hsv', vals);
+ } else if (vals.w !== undefined || vals.whiteness !== undefined) {
+ this.setValues('hwb', vals);
+ } else if (vals.c !== undefined || vals.cyan !== undefined) {
+ this.setValues('cmyk', vals);
+ } else {
+ throw new Error('Unable to parse color from object ' + JSON.stringify(obj));
+ }
+ }
+};
+
+Color.prototype = {
+ rgb: function () {
+ return this.setSpace('rgb', arguments);
+ },
+ hsl: function () {
+ return this.setSpace('hsl', arguments);
+ },
+ hsv: function () {
+ return this.setSpace('hsv', arguments);
+ },
+ hwb: function () {
+ return this.setSpace('hwb', arguments);
+ },
+ cmyk: function () {
+ return this.setSpace('cmyk', arguments);
+ },
+
+ rgbArray: function () {
+ return this.values.rgb;
+ },
+ hslArray: function () {
+ return this.values.hsl;
+ },
+ hsvArray: function () {
+ return this.values.hsv;
+ },
+ hwbArray: function () {
+ var values = this.values;
+ if (values.alpha !== 1) {
+ return values.hwb.concat([values.alpha]);
+ }
+ return values.hwb;
+ },
+ cmykArray: function () {
+ return this.values.cmyk;
+ },
+ rgbaArray: function () {
+ var values = this.values;
+ return values.rgb.concat([values.alpha]);
+ },
+ hslaArray: function () {
+ var values = this.values;
+ return values.hsl.concat([values.alpha]);
+ },
+ alpha: function (val) {
+ if (val === undefined) {
+ return this.values.alpha;
+ }
+ this.setValues('alpha', val);
+ return this;
+ },
+
+ red: function (val) {
+ return this.setChannel('rgb', 0, val);
+ },
+ green: function (val) {
+ return this.setChannel('rgb', 1, val);
+ },
+ blue: function (val) {
+ return this.setChannel('rgb', 2, val);
+ },
+ hue: function (val) {
+ if (val) {
+ val %= 360;
+ val = val < 0 ? 360 + val : val;
+ }
+ return this.setChannel('hsl', 0, val);
+ },
+ saturation: function (val) {
+ return this.setChannel('hsl', 1, val);
+ },
+ lightness: function (val) {
+ return this.setChannel('hsl', 2, val);
+ },
+ saturationv: function (val) {
+ return this.setChannel('hsv', 1, val);
+ },
+ whiteness: function (val) {
+ return this.setChannel('hwb', 1, val);
+ },
+ blackness: function (val) {
+ return this.setChannel('hwb', 2, val);
+ },
+ value: function (val) {
+ return this.setChannel('hsv', 2, val);
+ },
+ cyan: function (val) {
+ return this.setChannel('cmyk', 0, val);
+ },
+ magenta: function (val) {
+ return this.setChannel('cmyk', 1, val);
+ },
+ yellow: function (val) {
+ return this.setChannel('cmyk', 2, val);
+ },
+ black: function (val) {
+ return this.setChannel('cmyk', 3, val);
+ },
+
+ hexString: function () {
+ return string.hexString(this.values.rgb);
+ },
+ rgbString: function () {
+ return string.rgbString(this.values.rgb, this.values.alpha);
+ },
+ rgbaString: function () {
+ return string.rgbaString(this.values.rgb, this.values.alpha);
+ },
+ percentString: function () {
+ return string.percentString(this.values.rgb, this.values.alpha);
+ },
+ hslString: function () {
+ return string.hslString(this.values.hsl, this.values.alpha);
+ },
+ hslaString: function () {
+ return string.hslaString(this.values.hsl, this.values.alpha);
+ },
+ hwbString: function () {
+ return string.hwbString(this.values.hwb, this.values.alpha);
+ },
+ keyword: function () {
+ return string.keyword(this.values.rgb, this.values.alpha);
+ },
+
+ rgbNumber: function () {
+ var rgb = this.values.rgb;
+ return (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];
+ },
+
+ luminosity: function () {
+ // http://www.w3.org/TR/WCAG20/#relativeluminancedef
+ var rgb = this.values.rgb;
+ var lum = [];
+ for (var i = 0; i < rgb.length; i++) {
+ var chan = rgb[i] / 255;
+ lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);
+ }
+ return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
+ },
+
+ contrast: function (color2) {
+ // http://www.w3.org/TR/WCAG20/#contrast-ratiodef
+ var lum1 = this.luminosity();
+ var lum2 = color2.luminosity();
+ if (lum1 > lum2) {
+ return (lum1 + 0.05) / (lum2 + 0.05);
+ }
+ return (lum2 + 0.05) / (lum1 + 0.05);
+ },
+
+ level: function (color2) {
+ var contrastRatio = this.contrast(color2);
+ if (contrastRatio >= 7.1) {
+ return 'AAA';
+ }
+
+ return (contrastRatio >= 4.5) ? 'AA' : '';
+ },
+
+ dark: function () {
+ // YIQ equation from http://24ways.org/2010/calculating-color-contrast
+ var rgb = this.values.rgb;
+ var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
+ return yiq < 128;
+ },
+
+ light: function () {
+ return !this.dark();
+ },
+
+ negate: function () {
+ var rgb = [];
+ for (var i = 0; i < 3; i++) {
+ rgb[i] = 255 - this.values.rgb[i];
+ }
+ this.setValues('rgb', rgb);
+ return this;
+ },
+
+ lighten: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[2] += hsl[2] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ darken: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[2] -= hsl[2] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ saturate: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[1] += hsl[1] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ desaturate: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[1] -= hsl[1] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ whiten: function (ratio) {
+ var hwb = this.values.hwb;
+ hwb[1] += hwb[1] * ratio;
+ this.setValues('hwb', hwb);
+ return this;
+ },
+
+ blacken: function (ratio) {
+ var hwb = this.values.hwb;
+ hwb[2] += hwb[2] * ratio;
+ this.setValues('hwb', hwb);
+ return this;
+ },
+
+ greyscale: function () {
+ var rgb = this.values.rgb;
+ // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
+ var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
+ this.setValues('rgb', [val, val, val]);
+ return this;
+ },
+
+ clearer: function (ratio) {
+ var alpha = this.values.alpha;
+ this.setValues('alpha', alpha - (alpha * ratio));
+ return this;
+ },
+
+ opaquer: function (ratio) {
+ var alpha = this.values.alpha;
+ this.setValues('alpha', alpha + (alpha * ratio));
+ return this;
+ },
+
+ rotate: function (degrees) {
+ var hsl = this.values.hsl;
+ var hue = (hsl[0] + degrees) % 360;
+ hsl[0] = hue < 0 ? 360 + hue : hue;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ /**
+ * Ported from sass implementation in C
+ * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
+ */
+ mix: function (mixinColor, weight) {
+ var color1 = this;
+ var color2 = mixinColor;
+ var p = weight === undefined ? 0.5 : weight;
+
+ var w = 2 * p - 1;
+ var a = color1.alpha() - color2.alpha();
+
+ var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
+ var w2 = 1 - w1;
+
+ return this
+ .rgb(
+ w1 * color1.red() + w2 * color2.red(),
+ w1 * color1.green() + w2 * color2.green(),
+ w1 * color1.blue() + w2 * color2.blue()
+ )
+ .alpha(color1.alpha() * p + color2.alpha() * (1 - p));
+ },
+
+ toJSON: function () {
+ return this.rgb();
+ },
+
+ clone: function () {
+ // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,
+ // making the final build way to big to embed in Chart.js. So let's do it manually,
+ // assuming that values to clone are 1 dimension arrays containing only numbers,
+ // except 'alpha' which is a number.
+ var result = new Color();
+ var source = this.values;
+ var target = result.values;
+ var value, type;
+
+ for (var prop in source) {
+ if (source.hasOwnProperty(prop)) {
+ value = source[prop];
+ type = ({}).toString.call(value);
+ if (type === '[object Array]') {
+ target[prop] = value.slice(0);
+ } else if (type === '[object Number]') {
+ target[prop] = value;
+ } else {
+ console.error('unexpected color value:', value);
+ }
+ }
+ }
+
+ return result;
+ }
+};
+
+Color.prototype.spaces = {
+ rgb: ['red', 'green', 'blue'],
+ hsl: ['hue', 'saturation', 'lightness'],
+ hsv: ['hue', 'saturation', 'value'],
+ hwb: ['hue', 'whiteness', 'blackness'],
+ cmyk: ['cyan', 'magenta', 'yellow', 'black']
+};
+
+Color.prototype.maxes = {
+ rgb: [255, 255, 255],
+ hsl: [360, 100, 100],
+ hsv: [360, 100, 100],
+ hwb: [360, 100, 100],
+ cmyk: [100, 100, 100, 100]
+};
+
+Color.prototype.getValues = function (space) {
+ var values = this.values;
+ var vals = {};
+
+ for (var i = 0; i < space.length; i++) {
+ vals[space.charAt(i)] = values[space][i];
+ }
+
+ if (values.alpha !== 1) {
+ vals.a = values.alpha;
+ }
+
+ // {r: 255, g: 255, b: 255, a: 0.4}
+ return vals;
+};
+
+Color.prototype.setValues = function (space, vals) {
+ var values = this.values;
+ var spaces = this.spaces;
+ var maxes = this.maxes;
+ var alpha = 1;
+ var i;
+
+ if (space === 'alpha') {
+ alpha = vals;
+ } else if (vals.length) {
+ // [10, 10, 10]
+ values[space] = vals.slice(0, space.length);
+ alpha = vals[space.length];
+ } else if (vals[space.charAt(0)] !== undefined) {
+ // {r: 10, g: 10, b: 10}
+ for (i = 0; i < space.length; i++) {
+ values[space][i] = vals[space.charAt(i)];
+ }
+
+ alpha = vals.a;
+ } else if (vals[spaces[space][0]] !== undefined) {
+ // {red: 10, green: 10, blue: 10}
+ var chans = spaces[space];
+
+ for (i = 0; i < space.length; i++) {
+ values[space][i] = vals[chans[i]];
+ }
+
+ alpha = vals.alpha;
+ }
+
+ values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));
+
+ if (space === 'alpha') {
+ return false;
+ }
+
+ var capped;
+
+ // cap values of the space prior converting all values
+ for (i = 0; i < space.length; i++) {
+ capped = Math.max(0, Math.min(maxes[space][i], values[space][i]));
+ values[space][i] = Math.round(capped);
+ }
+
+ // convert to all the other color spaces
+ for (var sname in spaces) {
+ if (sname !== space) {
+ values[sname] = convert[space][sname](values[space]);
+ }
+ }
+
+ return true;
+};
+
+Color.prototype.setSpace = function (space, args) {
+ var vals = args[0];
+
+ if (vals === undefined) {
+ // color.rgb()
+ return this.getValues(space);
+ }
+
+ // color.rgb(10, 10, 10)
+ if (typeof vals === 'number') {
+ vals = Array.prototype.slice.call(args);
+ }
+
+ this.setValues(space, vals);
+ return this;
+};
+
+Color.prototype.setChannel = function (space, index, val) {
+ var svalues = this.values[space];
+ if (val === undefined) {
+ // color.red()
+ return svalues[index];
+ } else if (val === svalues[index]) {
+ // color.red(color.red())
+ return this;
+ }
+
+ // color.red(100)
+ svalues[index] = val;
+ this.setValues(space, svalues);
+
+ return this;
+};
+
+if (typeof window !== 'undefined') {
+ window.Color = Color;
+}
+
+module.exports = Color;
},{"1":1,"4":4}],3:[function(require,module,exports){
/* MIT license */
@@ -1509,155 +1509,155 @@ Converter.prototype.getValues = function(space) {
module.exports = convert;
},{"3":3}],5:[function(require,module,exports){
-module.exports = {
- "aliceblue": [240, 248, 255],
- "antiquewhite": [250, 235, 215],
- "aqua": [0, 255, 255],
- "aquamarine": [127, 255, 212],
- "azure": [240, 255, 255],
- "beige": [245, 245, 220],
- "bisque": [255, 228, 196],
- "black": [0, 0, 0],
- "blanchedalmond": [255, 235, 205],
- "blue": [0, 0, 255],
- "blueviolet": [138, 43, 226],
- "brown": [165, 42, 42],
- "burlywood": [222, 184, 135],
- "cadetblue": [95, 158, 160],
- "chartreuse": [127, 255, 0],
- "chocolate": [210, 105, 30],
- "coral": [255, 127, 80],
- "cornflowerblue": [100, 149, 237],
- "cornsilk": [255, 248, 220],
- "crimson": [220, 20, 60],
- "cyan": [0, 255, 255],
- "darkblue": [0, 0, 139],
- "darkcyan": [0, 139, 139],
- "darkgoldenrod": [184, 134, 11],
- "darkgray": [169, 169, 169],
- "darkgreen": [0, 100, 0],
- "darkgrey": [169, 169, 169],
- "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],
- "darkseagreen": [143, 188, 143],
- "darkslateblue": [72, 61, 139],
- "darkslategray": [47, 79, 79],
- "darkslategrey": [47, 79, 79],
- "darkturquoise": [0, 206, 209],
- "darkviolet": [148, 0, 211],
- "deeppink": [255, 20, 147],
- "deepskyblue": [0, 191, 255],
- "dimgray": [105, 105, 105],
- "dimgrey": [105, 105, 105],
- "dodgerblue": [30, 144, 255],
- "firebrick": [178, 34, 34],
- "floralwhite": [255, 250, 240],
- "forestgreen": [34, 139, 34],
- "fuchsia": [255, 0, 255],
- "gainsboro": [220, 220, 220],
- "ghostwhite": [248, 248, 255],
- "gold": [255, 215, 0],
- "goldenrod": [218, 165, 32],
- "gray": [128, 128, 128],
- "green": [0, 128, 0],
- "greenyellow": [173, 255, 47],
- "grey": [128, 128, 128],
- "honeydew": [240, 255, 240],
- "hotpink": [255, 105, 180],
- "indianred": [205, 92, 92],
- "indigo": [75, 0, 130],
- "ivory": [255, 255, 240],
- "khaki": [240, 230, 140],
- "lavender": [230, 230, 250],
- "lavenderblush": [255, 240, 245],
- "lawngreen": [124, 252, 0],
- "lemonchiffon": [255, 250, 205],
- "lightblue": [173, 216, 230],
- "lightcoral": [240, 128, 128],
- "lightcyan": [224, 255, 255],
- "lightgoldenrodyellow": [250, 250, 210],
- "lightgray": [211, 211, 211],
- "lightgreen": [144, 238, 144],
- "lightgrey": [211, 211, 211],
- "lightpink": [255, 182, 193],
- "lightsalmon": [255, 160, 122],
- "lightseagreen": [32, 178, 170],
- "lightskyblue": [135, 206, 250],
- "lightslategray": [119, 136, 153],
- "lightslategrey": [119, 136, 153],
- "lightsteelblue": [176, 196, 222],
- "lightyellow": [255, 255, 224],
- "lime": [0, 255, 0],
- "limegreen": [50, 205, 50],
- "linen": [250, 240, 230],
- "magenta": [255, 0, 255],
- "maroon": [128, 0, 0],
- "mediumaquamarine": [102, 205, 170],
- "mediumblue": [0, 0, 205],
- "mediumorchid": [186, 85, 211],
- "mediumpurple": [147, 112, 219],
- "mediumseagreen": [60, 179, 113],
- "mediumslateblue": [123, 104, 238],
- "mediumspringgreen": [0, 250, 154],
- "mediumturquoise": [72, 209, 204],
- "mediumvioletred": [199, 21, 133],
- "midnightblue": [25, 25, 112],
- "mintcream": [245, 255, 250],
- "mistyrose": [255, 228, 225],
- "moccasin": [255, 228, 181],
- "navajowhite": [255, 222, 173],
- "navy": [0, 0, 128],
- "oldlace": [253, 245, 230],
- "olive": [128, 128, 0],
- "olivedrab": [107, 142, 35],
- "orange": [255, 165, 0],
- "orangered": [255, 69, 0],
- "orchid": [218, 112, 214],
- "palegoldenrod": [238, 232, 170],
- "palegreen": [152, 251, 152],
- "paleturquoise": [175, 238, 238],
- "palevioletred": [219, 112, 147],
- "papayawhip": [255, 239, 213],
- "peachpuff": [255, 218, 185],
- "peru": [205, 133, 63],
- "pink": [255, 192, 203],
- "plum": [221, 160, 221],
- "powderblue": [176, 224, 230],
- "purple": [128, 0, 128],
- "rebeccapurple": [102, 51, 153],
- "red": [255, 0, 0],
- "rosybrown": [188, 143, 143],
- "royalblue": [65, 105, 225],
- "saddlebrown": [139, 69, 19],
- "salmon": [250, 128, 114],
- "sandybrown": [244, 164, 96],
- "seagreen": [46, 139, 87],
- "seashell": [255, 245, 238],
- "sienna": [160, 82, 45],
- "silver": [192, 192, 192],
- "skyblue": [135, 206, 235],
- "slateblue": [106, 90, 205],
- "slategray": [112, 128, 144],
- "slategrey": [112, 128, 144],
- "snow": [255, 250, 250],
- "springgreen": [0, 255, 127],
- "steelblue": [70, 130, 180],
- "tan": [210, 180, 140],
- "teal": [0, 128, 128],
- "thistle": [216, 191, 216],
- "tomato": [255, 99, 71],
- "turquoise": [64, 224, 208],
- "violet": [238, 130, 238],
- "wheat": [245, 222, 179],
- "white": [255, 255, 255],
- "whitesmoke": [245, 245, 245],
- "yellow": [255, 255, 0],
- "yellowgreen": [154, 205, 50]
+module.exports = {
+ "aliceblue": [240, 248, 255],
+ "antiquewhite": [250, 235, 215],
+ "aqua": [0, 255, 255],
+ "aquamarine": [127, 255, 212],
+ "azure": [240, 255, 255],
+ "beige": [245, 245, 220],
+ "bisque": [255, 228, 196],
+ "black": [0, 0, 0],
+ "blanchedalmond": [255, 235, 205],
+ "blue": [0, 0, 255],
+ "blueviolet": [138, 43, 226],
+ "brown": [165, 42, 42],
+ "burlywood": [222, 184, 135],
+ "cadetblue": [95, 158, 160],
+ "chartreuse": [127, 255, 0],
+ "chocolate": [210, 105, 30],
+ "coral": [255, 127, 80],
+ "cornflowerblue": [100, 149, 237],
+ "cornsilk": [255, 248, 220],
+ "crimson": [220, 20, 60],
+ "cyan": [0, 255, 255],
+ "darkblue": [0, 0, 139],
+ "darkcyan": [0, 139, 139],
+ "darkgoldenrod": [184, 134, 11],
+ "darkgray": [169, 169, 169],
+ "darkgreen": [0, 100, 0],
+ "darkgrey": [169, 169, 169],
+ "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],
+ "darkseagreen": [143, 188, 143],
+ "darkslateblue": [72, 61, 139],
+ "darkslategray": [47, 79, 79],
+ "darkslategrey": [47, 79, 79],
+ "darkturquoise": [0, 206, 209],
+ "darkviolet": [148, 0, 211],
+ "deeppink": [255, 20, 147],
+ "deepskyblue": [0, 191, 255],
+ "dimgray": [105, 105, 105],
+ "dimgrey": [105, 105, 105],
+ "dodgerblue": [30, 144, 255],
+ "firebrick": [178, 34, 34],
+ "floralwhite": [255, 250, 240],
+ "forestgreen": [34, 139, 34],
+ "fuchsia": [255, 0, 255],
+ "gainsboro": [220, 220, 220],
+ "ghostwhite": [248, 248, 255],
+ "gold": [255, 215, 0],
+ "goldenrod": [218, 165, 32],
+ "gray": [128, 128, 128],
+ "green": [0, 128, 0],
+ "greenyellow": [173, 255, 47],
+ "grey": [128, 128, 128],
+ "honeydew": [240, 255, 240],
+ "hotpink": [255, 105, 180],
+ "indianred": [205, 92, 92],
+ "indigo": [75, 0, 130],
+ "ivory": [255, 255, 240],
+ "khaki": [240, 230, 140],
+ "lavender": [230, 230, 250],
+ "lavenderblush": [255, 240, 245],
+ "lawngreen": [124, 252, 0],
+ "lemonchiffon": [255, 250, 205],
+ "lightblue": [173, 216, 230],
+ "lightcoral": [240, 128, 128],
+ "lightcyan": [224, 255, 255],
+ "lightgoldenrodyellow": [250, 250, 210],
+ "lightgray": [211, 211, 211],
+ "lightgreen": [144, 238, 144],
+ "lightgrey": [211, 211, 211],
+ "lightpink": [255, 182, 193],
+ "lightsalmon": [255, 160, 122],
+ "lightseagreen": [32, 178, 170],
+ "lightskyblue": [135, 206, 250],
+ "lightslategray": [119, 136, 153],
+ "lightslategrey": [119, 136, 153],
+ "lightsteelblue": [176, 196, 222],
+ "lightyellow": [255, 255, 224],
+ "lime": [0, 255, 0],
+ "limegreen": [50, 205, 50],
+ "linen": [250, 240, 230],
+ "magenta": [255, 0, 255],
+ "maroon": [128, 0, 0],
+ "mediumaquamarine": [102, 205, 170],
+ "mediumblue": [0, 0, 205],
+ "mediumorchid": [186, 85, 211],
+ "mediumpurple": [147, 112, 219],
+ "mediumseagreen": [60, 179, 113],
+ "mediumslateblue": [123, 104, 238],
+ "mediumspringgreen": [0, 250, 154],
+ "mediumturquoise": [72, 209, 204],
+ "mediumvioletred": [199, 21, 133],
+ "midnightblue": [25, 25, 112],
+ "mintcream": [245, 255, 250],
+ "mistyrose": [255, 228, 225],
+ "moccasin": [255, 228, 181],
+ "navajowhite": [255, 222, 173],
+ "navy": [0, 0, 128],
+ "oldlace": [253, 245, 230],
+ "olive": [128, 128, 0],
+ "olivedrab": [107, 142, 35],
+ "orange": [255, 165, 0],
+ "orangered": [255, 69, 0],
+ "orchid": [218, 112, 214],
+ "palegoldenrod": [238, 232, 170],
+ "palegreen": [152, 251, 152],
+ "paleturquoise": [175, 238, 238],
+ "palevioletred": [219, 112, 147],
+ "papayawhip": [255, 239, 213],
+ "peachpuff": [255, 218, 185],
+ "peru": [205, 133, 63],
+ "pink": [255, 192, 203],
+ "plum": [221, 160, 221],
+ "powderblue": [176, 224, 230],
+ "purple": [128, 0, 128],
+ "rebeccapurple": [102, 51, 153],
+ "red": [255, 0, 0],
+ "rosybrown": [188, 143, 143],
+ "royalblue": [65, 105, 225],
+ "saddlebrown": [139, 69, 19],
+ "salmon": [250, 128, 114],
+ "sandybrown": [244, 164, 96],
+ "seagreen": [46, 139, 87],
+ "seashell": [255, 245, 238],
+ "sienna": [160, 82, 45],
+ "silver": [192, 192, 192],
+ "skyblue": [135, 206, 235],
+ "slateblue": [106, 90, 205],
+ "slategray": [112, 128, 144],
+ "slategrey": [112, 128, 144],
+ "snow": [255, 250, 250],
+ "springgreen": [0, 255, 127],
+ "steelblue": [70, 130, 180],
+ "tan": [210, 180, 140],
+ "teal": [0, 128, 128],
+ "thistle": [216, 191, 216],
+ "tomato": [255, 99, 71],
+ "turquoise": [64, 224, 208],
+ "violet": [238, 130, 238],
+ "wheat": [245, 222, 179],
+ "white": [255, 255, 255],
+ "whitesmoke": [245, 245, 245],
+ "yellow": [255, 255, 0],
+ "yellowgreen": [154, 205, 50]
};
},{}],6:[function(require,module,exports){
//! moment.js
@@ -6288,7 +6288,7 @@ module.exports = function(Chart) {
var xScale = me.getScaleForId(meta.xAxisID);
var stackCount = me.getStackCount();
- var tickWidth = xScale.width / xScale.ticks.length;
+ var tickWidth = xScale.width / xScale.ticks.length;
var categoryWidth = tickWidth * xScale.options.categoryPercentage;
var categorySpacing = (tickWidth - (tickWidth * xScale.options.categoryPercentage)) / 2;
var fullBarWidth = categoryWidth / stackCount;
@@ -6314,7 +6314,7 @@ module.exports = function(Chart) {
if (xScale.options.barThickness) {
return xScale.options.barThickness;
}
- return ruler.barWidth;
+ return ruler.barWidth;
},
// Get stack index from the given dataset index accounting for stacks and the fact that not all bars are visible
@@ -6364,7 +6364,7 @@ module.exports = function(Chart) {
(yScale.options.stacked === undefined && meta.stack !== undefined)) {
var base = yScale.getBaseValue();
var sumPos = base,
- sumNeg = base;
+ sumNeg = base;
for (var i = 0; i < datasetIndex; i++) {
var ds = me.chart.data.datasets[i];
@@ -6628,7 +6628,7 @@ module.exports = function(Chart) {
}
}
- return stacks.length - 1;
+ return stacks.length - 1;
},
calculateBarX: function(index, datasetIndex) {
@@ -6641,7 +6641,7 @@ module.exports = function(Chart) {
(xScale.options.stacked === undefined && meta.stack !== undefined)) {
var base = xScale.getBaseValue();
var sumPos = base,
- sumNeg = base;
+ sumNeg = base;
for (var i = 0; i < datasetIndex; i++) {
var ds = me.chart.data.datasets[i];
diff --git a/docs/js/Chart.bundle.js b/docs/js/Chart.bundle.js
index f015a67d..c83d8b23 100644
--- a/docs/js/Chart.bundle.js
+++ b/docs/js/Chart.bundle.js
@@ -8,712 +8,712 @@
* https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o lum2) {
- return (lum1 + 0.05) / (lum2 + 0.05);
- }
- return (lum2 + 0.05) / (lum1 + 0.05);
- },
-
- level: function (color2) {
- var contrastRatio = this.contrast(color2);
- if (contrastRatio >= 7.1) {
- return 'AAA';
- }
-
- return (contrastRatio >= 4.5) ? 'AA' : '';
- },
-
- dark: function () {
- // YIQ equation from http://24ways.org/2010/calculating-color-contrast
- var rgb = this.values.rgb;
- var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
- return yiq < 128;
- },
-
- light: function () {
- return !this.dark();
- },
-
- negate: function () {
- var rgb = [];
- for (var i = 0; i < 3; i++) {
- rgb[i] = 255 - this.values.rgb[i];
- }
- this.setValues('rgb', rgb);
- return this;
- },
-
- lighten: function (ratio) {
- var hsl = this.values.hsl;
- hsl[2] += hsl[2] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- darken: function (ratio) {
- var hsl = this.values.hsl;
- hsl[2] -= hsl[2] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- saturate: function (ratio) {
- var hsl = this.values.hsl;
- hsl[1] += hsl[1] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- desaturate: function (ratio) {
- var hsl = this.values.hsl;
- hsl[1] -= hsl[1] * ratio;
- this.setValues('hsl', hsl);
- return this;
- },
-
- whiten: function (ratio) {
- var hwb = this.values.hwb;
- hwb[1] += hwb[1] * ratio;
- this.setValues('hwb', hwb);
- return this;
- },
-
- blacken: function (ratio) {
- var hwb = this.values.hwb;
- hwb[2] += hwb[2] * ratio;
- this.setValues('hwb', hwb);
- return this;
- },
-
- greyscale: function () {
- var rgb = this.values.rgb;
- // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
- var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
- this.setValues('rgb', [val, val, val]);
- return this;
- },
-
- clearer: function (ratio) {
- var alpha = this.values.alpha;
- this.setValues('alpha', alpha - (alpha * ratio));
- return this;
- },
-
- opaquer: function (ratio) {
- var alpha = this.values.alpha;
- this.setValues('alpha', alpha + (alpha * ratio));
- return this;
- },
-
- rotate: function (degrees) {
- var hsl = this.values.hsl;
- var hue = (hsl[0] + degrees) % 360;
- hsl[0] = hue < 0 ? 360 + hue : hue;
- this.setValues('hsl', hsl);
- return this;
- },
-
- /**
- * Ported from sass implementation in C
- * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
- */
- mix: function (mixinColor, weight) {
- var color1 = this;
- var color2 = mixinColor;
- var p = weight === undefined ? 0.5 : weight;
-
- var w = 2 * p - 1;
- var a = color1.alpha() - color2.alpha();
-
- var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
- var w2 = 1 - w1;
-
- return this
- .rgb(
- w1 * color1.red() + w2 * color2.red(),
- w1 * color1.green() + w2 * color2.green(),
- w1 * color1.blue() + w2 * color2.blue()
- )
- .alpha(color1.alpha() * p + color2.alpha() * (1 - p));
- },
-
- toJSON: function () {
- return this.rgb();
- },
-
- clone: function () {
- // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,
- // making the final build way to big to embed in Chart.js. So let's do it manually,
- // assuming that values to clone are 1 dimension arrays containing only numbers,
- // except 'alpha' which is a number.
- var result = new Color();
- var source = this.values;
- var target = result.values;
- var value, type;
-
- for (var prop in source) {
- if (source.hasOwnProperty(prop)) {
- value = source[prop];
- type = ({}).toString.call(value);
- if (type === '[object Array]') {
- target[prop] = value.slice(0);
- } else if (type === '[object Number]') {
- target[prop] = value;
- } else {
- console.error('unexpected color value:', value);
- }
- }
- }
-
- return result;
- }
-};
-
-Color.prototype.spaces = {
- rgb: ['red', 'green', 'blue'],
- hsl: ['hue', 'saturation', 'lightness'],
- hsv: ['hue', 'saturation', 'value'],
- hwb: ['hue', 'whiteness', 'blackness'],
- cmyk: ['cyan', 'magenta', 'yellow', 'black']
-};
-
-Color.prototype.maxes = {
- rgb: [255, 255, 255],
- hsl: [360, 100, 100],
- hsv: [360, 100, 100],
- hwb: [360, 100, 100],
- cmyk: [100, 100, 100, 100]
-};
-
-Color.prototype.getValues = function (space) {
- var values = this.values;
- var vals = {};
-
- for (var i = 0; i < space.length; i++) {
- vals[space.charAt(i)] = values[space][i];
- }
-
- if (values.alpha !== 1) {
- vals.a = values.alpha;
- }
-
- // {r: 255, g: 255, b: 255, a: 0.4}
- return vals;
-};
-
-Color.prototype.setValues = function (space, vals) {
- var values = this.values;
- var spaces = this.spaces;
- var maxes = this.maxes;
- var alpha = 1;
- var i;
-
- if (space === 'alpha') {
- alpha = vals;
- } else if (vals.length) {
- // [10, 10, 10]
- values[space] = vals.slice(0, space.length);
- alpha = vals[space.length];
- } else if (vals[space.charAt(0)] !== undefined) {
- // {r: 10, g: 10, b: 10}
- for (i = 0; i < space.length; i++) {
- values[space][i] = vals[space.charAt(i)];
- }
-
- alpha = vals.a;
- } else if (vals[spaces[space][0]] !== undefined) {
- // {red: 10, green: 10, blue: 10}
- var chans = spaces[space];
-
- for (i = 0; i < space.length; i++) {
- values[space][i] = vals[chans[i]];
- }
-
- alpha = vals.alpha;
- }
-
- values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));
-
- if (space === 'alpha') {
- return false;
- }
-
- var capped;
-
- // cap values of the space prior converting all values
- for (i = 0; i < space.length; i++) {
- capped = Math.max(0, Math.min(maxes[space][i], values[space][i]));
- values[space][i] = Math.round(capped);
- }
-
- // convert to all the other color spaces
- for (var sname in spaces) {
- if (sname !== space) {
- values[sname] = convert[space][sname](values[space]);
- }
- }
-
- return true;
-};
-
-Color.prototype.setSpace = function (space, args) {
- var vals = args[0];
-
- if (vals === undefined) {
- // color.rgb()
- return this.getValues(space);
- }
-
- // color.rgb(10, 10, 10)
- if (typeof vals === 'number') {
- vals = Array.prototype.slice.call(args);
- }
-
- this.setValues(space, vals);
- return this;
-};
-
-Color.prototype.setChannel = function (space, index, val) {
- var svalues = this.values[space];
- if (val === undefined) {
- // color.red()
- return svalues[index];
- } else if (val === svalues[index]) {
- // color.red(color.red())
- return this;
- }
-
- // color.red(100)
- svalues[index] = val;
- this.setValues(space, svalues);
-
- return this;
-};
-
-if (typeof window !== 'undefined') {
- window.Color = Color;
-}
-
-module.exports = Color;
+/* MIT license */
+var convert = require(4);
+var string = require(1);
+
+var Color = function (obj) {
+ if (obj instanceof Color) {
+ return obj;
+ }
+ if (!(this instanceof Color)) {
+ return new Color(obj);
+ }
+
+ this.values = {
+ rgb: [0, 0, 0],
+ hsl: [0, 0, 0],
+ hsv: [0, 0, 0],
+ hwb: [0, 0, 0],
+ cmyk: [0, 0, 0, 0],
+ alpha: 1
+ };
+
+ // parse Color() argument
+ var vals;
+ if (typeof obj === 'string') {
+ vals = string.getRgba(obj);
+ if (vals) {
+ this.setValues('rgb', vals);
+ } else if (vals = string.getHsla(obj)) {
+ this.setValues('hsl', vals);
+ } else if (vals = string.getHwb(obj)) {
+ this.setValues('hwb', vals);
+ } else {
+ throw new Error('Unable to parse color from string "' + obj + '"');
+ }
+ } else if (typeof obj === 'object') {
+ vals = obj;
+ if (vals.r !== undefined || vals.red !== undefined) {
+ this.setValues('rgb', vals);
+ } else if (vals.l !== undefined || vals.lightness !== undefined) {
+ this.setValues('hsl', vals);
+ } else if (vals.v !== undefined || vals.value !== undefined) {
+ this.setValues('hsv', vals);
+ } else if (vals.w !== undefined || vals.whiteness !== undefined) {
+ this.setValues('hwb', vals);
+ } else if (vals.c !== undefined || vals.cyan !== undefined) {
+ this.setValues('cmyk', vals);
+ } else {
+ throw new Error('Unable to parse color from object ' + JSON.stringify(obj));
+ }
+ }
+};
+
+Color.prototype = {
+ rgb: function () {
+ return this.setSpace('rgb', arguments);
+ },
+ hsl: function () {
+ return this.setSpace('hsl', arguments);
+ },
+ hsv: function () {
+ return this.setSpace('hsv', arguments);
+ },
+ hwb: function () {
+ return this.setSpace('hwb', arguments);
+ },
+ cmyk: function () {
+ return this.setSpace('cmyk', arguments);
+ },
+
+ rgbArray: function () {
+ return this.values.rgb;
+ },
+ hslArray: function () {
+ return this.values.hsl;
+ },
+ hsvArray: function () {
+ return this.values.hsv;
+ },
+ hwbArray: function () {
+ var values = this.values;
+ if (values.alpha !== 1) {
+ return values.hwb.concat([values.alpha]);
+ }
+ return values.hwb;
+ },
+ cmykArray: function () {
+ return this.values.cmyk;
+ },
+ rgbaArray: function () {
+ var values = this.values;
+ return values.rgb.concat([values.alpha]);
+ },
+ hslaArray: function () {
+ var values = this.values;
+ return values.hsl.concat([values.alpha]);
+ },
+ alpha: function (val) {
+ if (val === undefined) {
+ return this.values.alpha;
+ }
+ this.setValues('alpha', val);
+ return this;
+ },
+
+ red: function (val) {
+ return this.setChannel('rgb', 0, val);
+ },
+ green: function (val) {
+ return this.setChannel('rgb', 1, val);
+ },
+ blue: function (val) {
+ return this.setChannel('rgb', 2, val);
+ },
+ hue: function (val) {
+ if (val) {
+ val %= 360;
+ val = val < 0 ? 360 + val : val;
+ }
+ return this.setChannel('hsl', 0, val);
+ },
+ saturation: function (val) {
+ return this.setChannel('hsl', 1, val);
+ },
+ lightness: function (val) {
+ return this.setChannel('hsl', 2, val);
+ },
+ saturationv: function (val) {
+ return this.setChannel('hsv', 1, val);
+ },
+ whiteness: function (val) {
+ return this.setChannel('hwb', 1, val);
+ },
+ blackness: function (val) {
+ return this.setChannel('hwb', 2, val);
+ },
+ value: function (val) {
+ return this.setChannel('hsv', 2, val);
+ },
+ cyan: function (val) {
+ return this.setChannel('cmyk', 0, val);
+ },
+ magenta: function (val) {
+ return this.setChannel('cmyk', 1, val);
+ },
+ yellow: function (val) {
+ return this.setChannel('cmyk', 2, val);
+ },
+ black: function (val) {
+ return this.setChannel('cmyk', 3, val);
+ },
+
+ hexString: function () {
+ return string.hexString(this.values.rgb);
+ },
+ rgbString: function () {
+ return string.rgbString(this.values.rgb, this.values.alpha);
+ },
+ rgbaString: function () {
+ return string.rgbaString(this.values.rgb, this.values.alpha);
+ },
+ percentString: function () {
+ return string.percentString(this.values.rgb, this.values.alpha);
+ },
+ hslString: function () {
+ return string.hslString(this.values.hsl, this.values.alpha);
+ },
+ hslaString: function () {
+ return string.hslaString(this.values.hsl, this.values.alpha);
+ },
+ hwbString: function () {
+ return string.hwbString(this.values.hwb, this.values.alpha);
+ },
+ keyword: function () {
+ return string.keyword(this.values.rgb, this.values.alpha);
+ },
+
+ rgbNumber: function () {
+ var rgb = this.values.rgb;
+ return (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];
+ },
+
+ luminosity: function () {
+ // http://www.w3.org/TR/WCAG20/#relativeluminancedef
+ var rgb = this.values.rgb;
+ var lum = [];
+ for (var i = 0; i < rgb.length; i++) {
+ var chan = rgb[i] / 255;
+ lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);
+ }
+ return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
+ },
+
+ contrast: function (color2) {
+ // http://www.w3.org/TR/WCAG20/#contrast-ratiodef
+ var lum1 = this.luminosity();
+ var lum2 = color2.luminosity();
+ if (lum1 > lum2) {
+ return (lum1 + 0.05) / (lum2 + 0.05);
+ }
+ return (lum2 + 0.05) / (lum1 + 0.05);
+ },
+
+ level: function (color2) {
+ var contrastRatio = this.contrast(color2);
+ if (contrastRatio >= 7.1) {
+ return 'AAA';
+ }
+
+ return (contrastRatio >= 4.5) ? 'AA' : '';
+ },
+
+ dark: function () {
+ // YIQ equation from http://24ways.org/2010/calculating-color-contrast
+ var rgb = this.values.rgb;
+ var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
+ return yiq < 128;
+ },
+
+ light: function () {
+ return !this.dark();
+ },
+
+ negate: function () {
+ var rgb = [];
+ for (var i = 0; i < 3; i++) {
+ rgb[i] = 255 - this.values.rgb[i];
+ }
+ this.setValues('rgb', rgb);
+ return this;
+ },
+
+ lighten: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[2] += hsl[2] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ darken: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[2] -= hsl[2] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ saturate: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[1] += hsl[1] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ desaturate: function (ratio) {
+ var hsl = this.values.hsl;
+ hsl[1] -= hsl[1] * ratio;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ whiten: function (ratio) {
+ var hwb = this.values.hwb;
+ hwb[1] += hwb[1] * ratio;
+ this.setValues('hwb', hwb);
+ return this;
+ },
+
+ blacken: function (ratio) {
+ var hwb = this.values.hwb;
+ hwb[2] += hwb[2] * ratio;
+ this.setValues('hwb', hwb);
+ return this;
+ },
+
+ greyscale: function () {
+ var rgb = this.values.rgb;
+ // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
+ var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
+ this.setValues('rgb', [val, val, val]);
+ return this;
+ },
+
+ clearer: function (ratio) {
+ var alpha = this.values.alpha;
+ this.setValues('alpha', alpha - (alpha * ratio));
+ return this;
+ },
+
+ opaquer: function (ratio) {
+ var alpha = this.values.alpha;
+ this.setValues('alpha', alpha + (alpha * ratio));
+ return this;
+ },
+
+ rotate: function (degrees) {
+ var hsl = this.values.hsl;
+ var hue = (hsl[0] + degrees) % 360;
+ hsl[0] = hue < 0 ? 360 + hue : hue;
+ this.setValues('hsl', hsl);
+ return this;
+ },
+
+ /**
+ * Ported from sass implementation in C
+ * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
+ */
+ mix: function (mixinColor, weight) {
+ var color1 = this;
+ var color2 = mixinColor;
+ var p = weight === undefined ? 0.5 : weight;
+
+ var w = 2 * p - 1;
+ var a = color1.alpha() - color2.alpha();
+
+ var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
+ var w2 = 1 - w1;
+
+ return this
+ .rgb(
+ w1 * color1.red() + w2 * color2.red(),
+ w1 * color1.green() + w2 * color2.green(),
+ w1 * color1.blue() + w2 * color2.blue()
+ )
+ .alpha(color1.alpha() * p + color2.alpha() * (1 - p));
+ },
+
+ toJSON: function () {
+ return this.rgb();
+ },
+
+ clone: function () {
+ // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,
+ // making the final build way to big to embed in Chart.js. So let's do it manually,
+ // assuming that values to clone are 1 dimension arrays containing only numbers,
+ // except 'alpha' which is a number.
+ var result = new Color();
+ var source = this.values;
+ var target = result.values;
+ var value, type;
+
+ for (var prop in source) {
+ if (source.hasOwnProperty(prop)) {
+ value = source[prop];
+ type = ({}).toString.call(value);
+ if (type === '[object Array]') {
+ target[prop] = value.slice(0);
+ } else if (type === '[object Number]') {
+ target[prop] = value;
+ } else {
+ console.error('unexpected color value:', value);
+ }
+ }
+ }
+
+ return result;
+ }
+};
+
+Color.prototype.spaces = {
+ rgb: ['red', 'green', 'blue'],
+ hsl: ['hue', 'saturation', 'lightness'],
+ hsv: ['hue', 'saturation', 'value'],
+ hwb: ['hue', 'whiteness', 'blackness'],
+ cmyk: ['cyan', 'magenta', 'yellow', 'black']
+};
+
+Color.prototype.maxes = {
+ rgb: [255, 255, 255],
+ hsl: [360, 100, 100],
+ hsv: [360, 100, 100],
+ hwb: [360, 100, 100],
+ cmyk: [100, 100, 100, 100]
+};
+
+Color.prototype.getValues = function (space) {
+ var values = this.values;
+ var vals = {};
+
+ for (var i = 0; i < space.length; i++) {
+ vals[space.charAt(i)] = values[space][i];
+ }
+
+ if (values.alpha !== 1) {
+ vals.a = values.alpha;
+ }
+
+ // {r: 255, g: 255, b: 255, a: 0.4}
+ return vals;
+};
+
+Color.prototype.setValues = function (space, vals) {
+ var values = this.values;
+ var spaces = this.spaces;
+ var maxes = this.maxes;
+ var alpha = 1;
+ var i;
+
+ if (space === 'alpha') {
+ alpha = vals;
+ } else if (vals.length) {
+ // [10, 10, 10]
+ values[space] = vals.slice(0, space.length);
+ alpha = vals[space.length];
+ } else if (vals[space.charAt(0)] !== undefined) {
+ // {r: 10, g: 10, b: 10}
+ for (i = 0; i < space.length; i++) {
+ values[space][i] = vals[space.charAt(i)];
+ }
+
+ alpha = vals.a;
+ } else if (vals[spaces[space][0]] !== undefined) {
+ // {red: 10, green: 10, blue: 10}
+ var chans = spaces[space];
+
+ for (i = 0; i < space.length; i++) {
+ values[space][i] = vals[chans[i]];
+ }
+
+ alpha = vals.alpha;
+ }
+
+ values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));
+
+ if (space === 'alpha') {
+ return false;
+ }
+
+ var capped;
+
+ // cap values of the space prior converting all values
+ for (i = 0; i < space.length; i++) {
+ capped = Math.max(0, Math.min(maxes[space][i], values[space][i]));
+ values[space][i] = Math.round(capped);
+ }
+
+ // convert to all the other color spaces
+ for (var sname in spaces) {
+ if (sname !== space) {
+ values[sname] = convert[space][sname](values[space]);
+ }
+ }
+
+ return true;
+};
+
+Color.prototype.setSpace = function (space, args) {
+ var vals = args[0];
+
+ if (vals === undefined) {
+ // color.rgb()
+ return this.getValues(space);
+ }
+
+ // color.rgb(10, 10, 10)
+ if (typeof vals === 'number') {
+ vals = Array.prototype.slice.call(args);
+ }
+
+ this.setValues(space, vals);
+ return this;
+};
+
+Color.prototype.setChannel = function (space, index, val) {
+ var svalues = this.values[space];
+ if (val === undefined) {
+ // color.red()
+ return svalues[index];
+ } else if (val === svalues[index]) {
+ // color.red(color.red())
+ return this;
+ }
+
+ // color.red(100)
+ svalues[index] = val;
+ this.setValues(space, svalues);
+
+ return this;
+};
+
+if (typeof window !== 'undefined') {
+ window.Color = Color;
+}
+
+module.exports = Color;
},{"1":1,"4":4}],3:[function(require,module,exports){
/* MIT license */
@@ -1509,155 +1509,155 @@ Converter.prototype.getValues = function(space) {
module.exports = convert;
},{"3":3}],5:[function(require,module,exports){
-module.exports = {
- "aliceblue": [240, 248, 255],
- "antiquewhite": [250, 235, 215],
- "aqua": [0, 255, 255],
- "aquamarine": [127, 255, 212],
- "azure": [240, 255, 255],
- "beige": [245, 245, 220],
- "bisque": [255, 228, 196],
- "black": [0, 0, 0],
- "blanchedalmond": [255, 235, 205],
- "blue": [0, 0, 255],
- "blueviolet": [138, 43, 226],
- "brown": [165, 42, 42],
- "burlywood": [222, 184, 135],
- "cadetblue": [95, 158, 160],
- "chartreuse": [127, 255, 0],
- "chocolate": [210, 105, 30],
- "coral": [255, 127, 80],
- "cornflowerblue": [100, 149, 237],
- "cornsilk": [255, 248, 220],
- "crimson": [220, 20, 60],
- "cyan": [0, 255, 255],
- "darkblue": [0, 0, 139],
- "darkcyan": [0, 139, 139],
- "darkgoldenrod": [184, 134, 11],
- "darkgray": [169, 169, 169],
- "darkgreen": [0, 100, 0],
- "darkgrey": [169, 169, 169],
- "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],
- "darkseagreen": [143, 188, 143],
- "darkslateblue": [72, 61, 139],
- "darkslategray": [47, 79, 79],
- "darkslategrey": [47, 79, 79],
- "darkturquoise": [0, 206, 209],
- "darkviolet": [148, 0, 211],
- "deeppink": [255, 20, 147],
- "deepskyblue": [0, 191, 255],
- "dimgray": [105, 105, 105],
- "dimgrey": [105, 105, 105],
- "dodgerblue": [30, 144, 255],
- "firebrick": [178, 34, 34],
- "floralwhite": [255, 250, 240],
- "forestgreen": [34, 139, 34],
- "fuchsia": [255, 0, 255],
- "gainsboro": [220, 220, 220],
- "ghostwhite": [248, 248, 255],
- "gold": [255, 215, 0],
- "goldenrod": [218, 165, 32],
- "gray": [128, 128, 128],
- "green": [0, 128, 0],
- "greenyellow": [173, 255, 47],
- "grey": [128, 128, 128],
- "honeydew": [240, 255, 240],
- "hotpink": [255, 105, 180],
- "indianred": [205, 92, 92],
- "indigo": [75, 0, 130],
- "ivory": [255, 255, 240],
- "khaki": [240, 230, 140],
- "lavender": [230, 230, 250],
- "lavenderblush": [255, 240, 245],
- "lawngreen": [124, 252, 0],
- "lemonchiffon": [255, 250, 205],
- "lightblue": [173, 216, 230],
- "lightcoral": [240, 128, 128],
- "lightcyan": [224, 255, 255],
- "lightgoldenrodyellow": [250, 250, 210],
- "lightgray": [211, 211, 211],
- "lightgreen": [144, 238, 144],
- "lightgrey": [211, 211, 211],
- "lightpink": [255, 182, 193],
- "lightsalmon": [255, 160, 122],
- "lightseagreen": [32, 178, 170],
- "lightskyblue": [135, 206, 250],
- "lightslategray": [119, 136, 153],
- "lightslategrey": [119, 136, 153],
- "lightsteelblue": [176, 196, 222],
- "lightyellow": [255, 255, 224],
- "lime": [0, 255, 0],
- "limegreen": [50, 205, 50],
- "linen": [250, 240, 230],
- "magenta": [255, 0, 255],
- "maroon": [128, 0, 0],
- "mediumaquamarine": [102, 205, 170],
- "mediumblue": [0, 0, 205],
- "mediumorchid": [186, 85, 211],
- "mediumpurple": [147, 112, 219],
- "mediumseagreen": [60, 179, 113],
- "mediumslateblue": [123, 104, 238],
- "mediumspringgreen": [0, 250, 154],
- "mediumturquoise": [72, 209, 204],
- "mediumvioletred": [199, 21, 133],
- "midnightblue": [25, 25, 112],
- "mintcream": [245, 255, 250],
- "mistyrose": [255, 228, 225],
- "moccasin": [255, 228, 181],
- "navajowhite": [255, 222, 173],
- "navy": [0, 0, 128],
- "oldlace": [253, 245, 230],
- "olive": [128, 128, 0],
- "olivedrab": [107, 142, 35],
- "orange": [255, 165, 0],
- "orangered": [255, 69, 0],
- "orchid": [218, 112, 214],
- "palegoldenrod": [238, 232, 170],
- "palegreen": [152, 251, 152],
- "paleturquoise": [175, 238, 238],
- "palevioletred": [219, 112, 147],
- "papayawhip": [255, 239, 213],
- "peachpuff": [255, 218, 185],
- "peru": [205, 133, 63],
- "pink": [255, 192, 203],
- "plum": [221, 160, 221],
- "powderblue": [176, 224, 230],
- "purple": [128, 0, 128],
- "rebeccapurple": [102, 51, 153],
- "red": [255, 0, 0],
- "rosybrown": [188, 143, 143],
- "royalblue": [65, 105, 225],
- "saddlebrown": [139, 69, 19],
- "salmon": [250, 128, 114],
- "sandybrown": [244, 164, 96],
- "seagreen": [46, 139, 87],
- "seashell": [255, 245, 238],
- "sienna": [160, 82, 45],
- "silver": [192, 192, 192],
- "skyblue": [135, 206, 235],
- "slateblue": [106, 90, 205],
- "slategray": [112, 128, 144],
- "slategrey": [112, 128, 144],
- "snow": [255, 250, 250],
- "springgreen": [0, 255, 127],
- "steelblue": [70, 130, 180],
- "tan": [210, 180, 140],
- "teal": [0, 128, 128],
- "thistle": [216, 191, 216],
- "tomato": [255, 99, 71],
- "turquoise": [64, 224, 208],
- "violet": [238, 130, 238],
- "wheat": [245, 222, 179],
- "white": [255, 255, 255],
- "whitesmoke": [245, 245, 245],
- "yellow": [255, 255, 0],
- "yellowgreen": [154, 205, 50]
+module.exports = {
+ "aliceblue": [240, 248, 255],
+ "antiquewhite": [250, 235, 215],
+ "aqua": [0, 255, 255],
+ "aquamarine": [127, 255, 212],
+ "azure": [240, 255, 255],
+ "beige": [245, 245, 220],
+ "bisque": [255, 228, 196],
+ "black": [0, 0, 0],
+ "blanchedalmond": [255, 235, 205],
+ "blue": [0, 0, 255],
+ "blueviolet": [138, 43, 226],
+ "brown": [165, 42, 42],
+ "burlywood": [222, 184, 135],
+ "cadetblue": [95, 158, 160],
+ "chartreuse": [127, 255, 0],
+ "chocolate": [210, 105, 30],
+ "coral": [255, 127, 80],
+ "cornflowerblue": [100, 149, 237],
+ "cornsilk": [255, 248, 220],
+ "crimson": [220, 20, 60],
+ "cyan": [0, 255, 255],
+ "darkblue": [0, 0, 139],
+ "darkcyan": [0, 139, 139],
+ "darkgoldenrod": [184, 134, 11],
+ "darkgray": [169, 169, 169],
+ "darkgreen": [0, 100, 0],
+ "darkgrey": [169, 169, 169],
+ "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],
+ "darkseagreen": [143, 188, 143],
+ "darkslateblue": [72, 61, 139],
+ "darkslategray": [47, 79, 79],
+ "darkslategrey": [47, 79, 79],
+ "darkturquoise": [0, 206, 209],
+ "darkviolet": [148, 0, 211],
+ "deeppink": [255, 20, 147],
+ "deepskyblue": [0, 191, 255],
+ "dimgray": [105, 105, 105],
+ "dimgrey": [105, 105, 105],
+ "dodgerblue": [30, 144, 255],
+ "firebrick": [178, 34, 34],
+ "floralwhite": [255, 250, 240],
+ "forestgreen": [34, 139, 34],
+ "fuchsia": [255, 0, 255],
+ "gainsboro": [220, 220, 220],
+ "ghostwhite": [248, 248, 255],
+ "gold": [255, 215, 0],
+ "goldenrod": [218, 165, 32],
+ "gray": [128, 128, 128],
+ "green": [0, 128, 0],
+ "greenyellow": [173, 255, 47],
+ "grey": [128, 128, 128],
+ "honeydew": [240, 255, 240],
+ "hotpink": [255, 105, 180],
+ "indianred": [205, 92, 92],
+ "indigo": [75, 0, 130],
+ "ivory": [255, 255, 240],
+ "khaki": [240, 230, 140],
+ "lavender": [230, 230, 250],
+ "lavenderblush": [255, 240, 245],
+ "lawngreen": [124, 252, 0],
+ "lemonchiffon": [255, 250, 205],
+ "lightblue": [173, 216, 230],
+ "lightcoral": [240, 128, 128],
+ "lightcyan": [224, 255, 255],
+ "lightgoldenrodyellow": [250, 250, 210],
+ "lightgray": [211, 211, 211],
+ "lightgreen": [144, 238, 144],
+ "lightgrey": [211, 211, 211],
+ "lightpink": [255, 182, 193],
+ "lightsalmon": [255, 160, 122],
+ "lightseagreen": [32, 178, 170],
+ "lightskyblue": [135, 206, 250],
+ "lightslategray": [119, 136, 153],
+ "lightslategrey": [119, 136, 153],
+ "lightsteelblue": [176, 196, 222],
+ "lightyellow": [255, 255, 224],
+ "lime": [0, 255, 0],
+ "limegreen": [50, 205, 50],
+ "linen": [250, 240, 230],
+ "magenta": [255, 0, 255],
+ "maroon": [128, 0, 0],
+ "mediumaquamarine": [102, 205, 170],
+ "mediumblue": [0, 0, 205],
+ "mediumorchid": [186, 85, 211],
+ "mediumpurple": [147, 112, 219],
+ "mediumseagreen": [60, 179, 113],
+ "mediumslateblue": [123, 104, 238],
+ "mediumspringgreen": [0, 250, 154],
+ "mediumturquoise": [72, 209, 204],
+ "mediumvioletred": [199, 21, 133],
+ "midnightblue": [25, 25, 112],
+ "mintcream": [245, 255, 250],
+ "mistyrose": [255, 228, 225],
+ "moccasin": [255, 228, 181],
+ "navajowhite": [255, 222, 173],
+ "navy": [0, 0, 128],
+ "oldlace": [253, 245, 230],
+ "olive": [128, 128, 0],
+ "olivedrab": [107, 142, 35],
+ "orange": [255, 165, 0],
+ "orangered": [255, 69, 0],
+ "orchid": [218, 112, 214],
+ "palegoldenrod": [238, 232, 170],
+ "palegreen": [152, 251, 152],
+ "paleturquoise": [175, 238, 238],
+ "palevioletred": [219, 112, 147],
+ "papayawhip": [255, 239, 213],
+ "peachpuff": [255, 218, 185],
+ "peru": [205, 133, 63],
+ "pink": [255, 192, 203],
+ "plum": [221, 160, 221],
+ "powderblue": [176, 224, 230],
+ "purple": [128, 0, 128],
+ "rebeccapurple": [102, 51, 153],
+ "red": [255, 0, 0],
+ "rosybrown": [188, 143, 143],
+ "royalblue": [65, 105, 225],
+ "saddlebrown": [139, 69, 19],
+ "salmon": [250, 128, 114],
+ "sandybrown": [244, 164, 96],
+ "seagreen": [46, 139, 87],
+ "seashell": [255, 245, 238],
+ "sienna": [160, 82, 45],
+ "silver": [192, 192, 192],
+ "skyblue": [135, 206, 235],
+ "slateblue": [106, 90, 205],
+ "slategray": [112, 128, 144],
+ "slategrey": [112, 128, 144],
+ "snow": [255, 250, 250],
+ "springgreen": [0, 255, 127],
+ "steelblue": [70, 130, 180],
+ "tan": [210, 180, 140],
+ "teal": [0, 128, 128],
+ "thistle": [216, 191, 216],
+ "tomato": [255, 99, 71],
+ "turquoise": [64, 224, 208],
+ "violet": [238, 130, 238],
+ "wheat": [245, 222, 179],
+ "white": [255, 255, 255],
+ "whitesmoke": [245, 245, 245],
+ "yellow": [255, 255, 0],
+ "yellowgreen": [154, 205, 50]
};
},{}],6:[function(require,module,exports){
//! moment.js
@@ -6288,7 +6288,7 @@ module.exports = function(Chart) {
var xScale = me.getScaleForId(meta.xAxisID);
var stackCount = me.getStackCount();
- var tickWidth = xScale.width / xScale.ticks.length;
+ var tickWidth = xScale.width / xScale.ticks.length;
var categoryWidth = tickWidth * xScale.options.categoryPercentage;
var categorySpacing = (tickWidth - (tickWidth * xScale.options.categoryPercentage)) / 2;
var fullBarWidth = categoryWidth / stackCount;
@@ -6314,7 +6314,7 @@ module.exports = function(Chart) {
if (xScale.options.barThickness) {
return xScale.options.barThickness;
}
- return ruler.barWidth;
+ return ruler.barWidth;
},
// Get stack index from the given dataset index accounting for stacks and the fact that not all bars are visible
@@ -6364,7 +6364,7 @@ module.exports = function(Chart) {
(yScale.options.stacked === undefined && meta.stack !== undefined)) {
var base = yScale.getBaseValue();
var sumPos = base,
- sumNeg = base;
+ sumNeg = base;
for (var i = 0; i < datasetIndex; i++) {
var ds = me.chart.data.datasets[i];
@@ -6628,7 +6628,7 @@ module.exports = function(Chart) {
}
}
- return stacks.length - 1;
+ return stacks.length - 1;
},
calculateBarX: function(index, datasetIndex) {
@@ -6641,7 +6641,7 @@ module.exports = function(Chart) {
(xScale.options.stacked === undefined && meta.stack !== undefined)) {
var base = xScale.getBaseValue();
var sumPos = base,
- sumNeg = base;
+ sumNeg = base;
for (var i = 0; i < datasetIndex; i++) {
var ds = me.chart.data.datasets[i];
diff --git a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0001-input-data-string/0001-input-data-string-test-01.xml b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0001-input-data-string/0001-input-data-string-test-01.xml
index 6e3d5f76..5705114a 100644
--- a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0001-input-data-string/0001-input-data-string-test-01.xml
+++ b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0001-input-data-string/0001-input-data-string-test-01.xml
@@ -1,29 +1,29 @@
-
-
- 0001-input-data-string.dmn
-
-
-
-
-
- Testing valid input
-
- John Doe
-
-
-
- Hello John Doe
-
-
-
-
- Testing invalid input
-
-
- 10
-
-
-
-
+
+
+ 0001-input-data-string.dmn
+
+
+
+
+
+ Testing valid input
+
+ John Doe
+
+
+
+ Hello John Doe
+
+
+
+
+ Testing invalid input
+
+
+ 10
+
+
+
+
diff --git a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0001-input-data-string/0001-input-data-string.dmn b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0001-input-data-string/0001-input-data-string.dmn
index 212f2f19..f27d2266 100644
--- a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0001-input-data-string/0001-input-data-string.dmn
+++ b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0001-input-data-string/0001-input-data-string.dmn
@@ -1,18 +1,18 @@
-
-
-
-
-
-
-
-
- "Hello " + Full Name
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ "Hello " + Full Name
+
+
+
+
+
+
diff --git a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0002-input-data-number/0002-input-data-number-test-01.xml b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0002-input-data-number/0002-input-data-number-test-01.xml
index f1e69668..7c1112a5 100644
--- a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0002-input-data-number/0002-input-data-number-test-01.xml
+++ b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0002-input-data-number/0002-input-data-number-test-01.xml
@@ -1,29 +1,29 @@
-
-
- 0002-input-data-number.dmn
-
-
-
-
-
- Testing valid input
-
- 10000
-
-
-
- 120000
-
-
-
-
- Testing invalid input
-
-
- foo
-
-
-
+
+
+ 0002-input-data-number.dmn
+
+
+
+
+
+ Testing valid input
+
+ 10000
+
+
+
+ 120000
+
+
+
+
+ Testing invalid input
+
+
+ foo
+
+
+
\ No newline at end of file
diff --git a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0002-input-data-number/0002-input-data-number.dmn b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0002-input-data-number/0002-input-data-number.dmn
index 28b4fef9..c9e70c37 100644
--- a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0002-input-data-number/0002-input-data-number.dmn
+++ b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0002-input-data-number/0002-input-data-number.dmn
@@ -1,18 +1,18 @@
-
-
-
-
-
-
-
-
- 12 * Monthly Salary
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 12 * Monthly Salary
+
+
+
+
+
+
diff --git a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values-test-01.xml b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values-test-01.xml
index 88502326..93ea7464 100644
--- a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values-test-01.xml
+++ b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values-test-01.xml
@@ -1,37 +1,37 @@
-
-
- 0003-input-data-string-allowed-values.dmn
-
-
-
-
-
- Testing valid input
-
- EMPLOYED
-
-
-
- You are EMPLOYED
-
-
-
-
- Testing invalid input
-
-
- 10
-
-
-
-
- Testing value that is not in the allowed values list
-
- FOO
-
-
-
-
-
+
+
+ 0003-input-data-string-allowed-values.dmn
+
+
+
+
+
+ Testing valid input
+
+ EMPLOYED
+
+
+
+ You are EMPLOYED
+
+
+
+
+ Testing invalid input
+
+
+ 10
+
+
+
+
+ Testing value that is not in the allowed values list
+
+ FOO
+
+
+
+
+
diff --git a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values.dmn b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values.dmn
index 8ddbee08..ac4a082a 100644
--- a/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values.dmn
+++ b/runners/dmn-tck-marshaller/src/test/resources/compliance-level-2/0003-input-data-string-allowed-values/0003-input-data-string-allowed-values.dmn
@@ -1,25 +1,25 @@
-
-
-
- feel:string
-
- "UNEMPLOYED","EMPLOYED","SELF-EMPLOYED","STUDENT"
-
-
-
-
-
-
-
-
- "You are " + Employment Status
-
-
-
-
-
-
+
+
+
+ feel:string
+
+ "UNEMPLOYED","EMPLOYED","SELF-EMPLOYED","STUDENT"
+
+
+
+
+
+
+
+
+ "You are " + Employment Status
+
+
+
+
+
+
diff --git a/runners/dmn-tck-runner-csharp/DMN.TCK.Runner.csproj b/runners/dmn-tck-runner-csharp/DMN.TCK.Runner.csproj
index e83a81b7..ce0fb7d6 100644
--- a/runners/dmn-tck-runner-csharp/DMN.TCK.Runner.csproj
+++ b/runners/dmn-tck-runner-csharp/DMN.TCK.Runner.csproj
@@ -1,69 +1,69 @@
-
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {27200310-A9C3-4A28-B9AB-120CC3FDD5D3}
- Exe
- Properties
- DMN.TCK.Runner
- DMN.TCK.Runner
- v4.0
-
-
- 512
-
-
- x86
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- x86
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
- ..\packages\Newtonsoft.Json.8.0.1\lib\net40\Newtonsoft.Json.dll
- True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {27200310-A9C3-4A28-B9AB-120CC3FDD5D3}
+ Exe
+ Properties
+ DMN.TCK.Runner
+ DMN.TCK.Runner
+ v4.0
+
+
+ 512
+
+
+ x86
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ x86
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Newtonsoft.Json.8.0.1\lib\net40\Newtonsoft.Json.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/runners/dmn-tck-runner-csharp/DMN.TCK.Runner.sln b/runners/dmn-tck-runner-csharp/DMN.TCK.Runner.sln
index 2b6f3dba..297c2be4 100644
--- a/runners/dmn-tck-runner-csharp/DMN.TCK.Runner.sln
+++ b/runners/dmn-tck-runner-csharp/DMN.TCK.Runner.sln
@@ -1,20 +1,20 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DMN.TCK.Runner", "DMN.TCK.Runner.csproj", "{27200310-A9C3-4A28-B9AB-120CC3FDD5D3}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x86 = Debug|x86
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {27200310-A9C3-4A28-B9AB-120CC3FDD5D3}.Debug|x86.ActiveCfg = Debug|x86
- {27200310-A9C3-4A28-B9AB-120CC3FDD5D3}.Debug|x86.Build.0 = Debug|x86
- {27200310-A9C3-4A28-B9AB-120CC3FDD5D3}.Release|x86.ActiveCfg = Release|x86
- {27200310-A9C3-4A28-B9AB-120CC3FDD5D3}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DMN.TCK.Runner", "DMN.TCK.Runner.csproj", "{27200310-A9C3-4A28-B9AB-120CC3FDD5D3}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {27200310-A9C3-4A28-B9AB-120CC3FDD5D3}.Debug|x86.ActiveCfg = Debug|x86
+ {27200310-A9C3-4A28-B9AB-120CC3FDD5D3}.Debug|x86.Build.0 = Debug|x86
+ {27200310-A9C3-4A28-B9AB-120CC3FDD5D3}.Release|x86.ActiveCfg = Release|x86
+ {27200310-A9C3-4A28-B9AB-120CC3FDD5D3}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/runners/dmn-tck-runner-csharp/Helper.cs b/runners/dmn-tck-runner-csharp/Helper.cs
index 82797eb4..7c8eb363 100644
--- a/runners/dmn-tck-runner-csharp/Helper.cs
+++ b/runners/dmn-tck-runner-csharp/Helper.cs
@@ -1,130 +1,130 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Xml;
-using System.Net;
-using System.Web;
-using System.Text;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Serialization;
-using Newtonsoft.Json.Linq;
-
-namespace DMN.TCK.Runner
-{
- public class Helper
- {
- private string _url;
- private string _bearer;
- private WebClient _webClient;
-
- public Helper()
- {
- }
-
- public bool Connect(string url, string user, string password)
- {
- _url = url;
- _webClient = new WebClient();
- _webClient.BaseAddress = url;
-
- var param = new System.Collections.Specialized.NameValueCollection();
- param.Add("param2", "escaping is already handled");
- param.Add("username", user);
- param.Add("password", password);
-
- try
- {
- _webClient.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
- byte[] bytes = _webClient.UploadValues(url + "/Token", param);
- string response = Encoding.UTF8.GetString(bytes);
-
- JObject jObject = (JObject)JsonConvert.DeserializeObject(response);
- _bearer = jObject.GetValue("AccessToken").ToString();
- if(string.IsNullOrEmpty(_bearer)) return false;
-
- string auth = string.Format("Bearer {0}", _bearer);
- _webClient.Headers.Add(HttpRequestHeader.Authorization, auth);
- return true;
- }
- catch { return false; }
- }
-
- public bool PushTestCase(string groupId, string artifactId, FileInfo dmnFile)
- {
- if (string.IsNullOrEmpty(_bearer))
- {
- return false;
- }
-
- string publishURL = _url;
- if (!publishURL.EndsWith("/"))
- {
- publishURL += "/";
- }
- publishURL += "execution/deployment/" + groupId + "/" + artifactId;
-
- try
- {
- string data = File.ReadAllText(dmnFile.FullName);
- string response = _webClient.UploadString(publishURL, data);
- return true;
- }
- catch
- {
- return false;
- }
- }
-
- public Dictionary RunTestCase(string groupId, string artifactId, FileInfo tckTestFile)
- {
- if (string.IsNullOrEmpty(_bearer))
- {
- return null;
- }
-
- Dictionary results = new Dictionary();
-
- string publishURL = _url;
- if (!publishURL.EndsWith("/"))
- {
- publishURL += "/";
- }
- publishURL += artifactId;
-
- try
- {
- string data = File.ReadAllText(tckTestFile.FullName);
- string response = _webClient.UploadString(publishURL, data);
- XmlDocument doc = new XmlDocument();
- doc.LoadXml(response);
- XmlNodeList nodes = doc.GetElementsByTagName("testCase");
- foreach (XmlNode node in nodes)
- {
- XmlElement elm = node as XmlElement;
- string passed = node.Attributes["passed"].Value;
- bool status = (passed == "True") ? true : false;
- results.Add(node.Attributes["id"].Value, status);
- }
- }
- catch
- {
- return null;
- }
- return results;
- }
- }
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Xml;
+using System.Net;
+using System.Web;
+using System.Text;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Serialization;
+using Newtonsoft.Json.Linq;
+
+namespace DMN.TCK.Runner
+{
+ public class Helper
+ {
+ private string _url;
+ private string _bearer;
+ private WebClient _webClient;
+
+ public Helper()
+ {
+ }
+
+ public bool Connect(string url, string user, string password)
+ {
+ _url = url;
+ _webClient = new WebClient();
+ _webClient.BaseAddress = url;
+
+ var param = new System.Collections.Specialized.NameValueCollection();
+ param.Add("param2", "escaping is already handled");
+ param.Add("username", user);
+ param.Add("password", password);
+
+ try
+ {
+ _webClient.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
+ byte[] bytes = _webClient.UploadValues(url + "/Token", param);
+ string response = Encoding.UTF8.GetString(bytes);
+
+ JObject jObject = (JObject)JsonConvert.DeserializeObject(response);
+ _bearer = jObject.GetValue("AccessToken").ToString();
+ if(string.IsNullOrEmpty(_bearer)) return false;
+
+ string auth = string.Format("Bearer {0}", _bearer);
+ _webClient.Headers.Add(HttpRequestHeader.Authorization, auth);
+ return true;
+ }
+ catch { return false; }
+ }
+
+ public bool PushTestCase(string groupId, string artifactId, FileInfo dmnFile)
+ {
+ if (string.IsNullOrEmpty(_bearer))
+ {
+ return false;
+ }
+
+ string publishURL = _url;
+ if (!publishURL.EndsWith("/"))
+ {
+ publishURL += "/";
+ }
+ publishURL += "execution/deployment/" + groupId + "/" + artifactId;
+
+ try
+ {
+ string data = File.ReadAllText(dmnFile.FullName);
+ string response = _webClient.UploadString(publishURL, data);
+ return true;
+ }
+ catch
+ {
+ return false;
+ }
+ }
+
+ public Dictionary RunTestCase(string groupId, string artifactId, FileInfo tckTestFile)
+ {
+ if (string.IsNullOrEmpty(_bearer))
+ {
+ return null;
+ }
+
+ Dictionary results = new Dictionary();
+
+ string publishURL = _url;
+ if (!publishURL.EndsWith("/"))
+ {
+ publishURL += "/";
+ }
+ publishURL += artifactId;
+
+ try
+ {
+ string data = File.ReadAllText(tckTestFile.FullName);
+ string response = _webClient.UploadString(publishURL, data);
+ XmlDocument doc = new XmlDocument();
+ doc.LoadXml(response);
+ XmlNodeList nodes = doc.GetElementsByTagName("testCase");
+ foreach (XmlNode node in nodes)
+ {
+ XmlElement elm = node as XmlElement;
+ string passed = node.Attributes["passed"].Value;
+ bool status = (passed == "True") ? true : false;
+ results.Add(node.Attributes["id"].Value, status);
+ }
+ }
+ catch
+ {
+ return null;
+ }
+ return results;
+ }
+ }
}
\ No newline at end of file
diff --git a/runners/dmn-tck-runner-csharp/Program.cs b/runners/dmn-tck-runner-csharp/Program.cs
index 91ac3eec..57829225 100644
--- a/runners/dmn-tck-runner-csharp/Program.cs
+++ b/runners/dmn-tck-runner-csharp/Program.cs
@@ -1,136 +1,136 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-
-namespace DMN.TCK.Runner
-{
- class Program
- {
- static void Main(string[] args)
- {
- if (args.Length < 4)
- {
- ShowUsageInfo();
- return;
- }
-
- try
- {
- string tckTestsRoot = args[0];
- if (!Directory.Exists(tckTestsRoot))
- {
- Console.WriteLine("Invalid DMN TCK test case folder: " + tckTestsRoot);
- ShowUsageInfo(); return;
- }
-
- // Detect all test categories
- DirectoryInfo di = new DirectoryInfo(tckTestsRoot);
- DirectoryInfo[] testCategoriesFolders = di.GetDirectories();
- if (testCategoriesFolders == null || testCategoriesFolders.Length == 0)
- {
- Console.WriteLine("Invalid DMN TCK test case folder: " +
- tckTestsRoot + " it does not contain compliance sub folders");
- ShowUsageInfo(); return;
- }
-
- Helper helper = new Helper();
- bool connected = true; // helper.Connect(args[1], args[2], args[3]);
- if (!connected)
- {
- Console.WriteLine("Cannot connect to test server!");
- ShowUsageInfo(); return;
- }
-
- // Inside each category, there are a list of tests
- foreach (DirectoryInfo testCategoriesFolder in testCategoriesFolders)
- {
- string category = testCategoriesFolder.Name;
- DirectoryInfo[] testFolders = testCategoriesFolder.GetDirectories();
- if (testFolders == null)
- {
- // TODO: Warning!!! continue If
- continue;
- }
-
- Console.WriteLine(category);
- foreach (DirectoryInfo testFolder in testFolders)
- {
- string testId = testFolder.Name;
- FileInfo[] testCasesFiles = testFolder.GetFiles("*.xml");
- foreach (FileInfo testCaseFile in testCasesFiles)
- {
- try
- {
- Console.WriteLine(testCaseFile.Name);
- try
- {
- if (helper.PushTestCase(category, testId, testCaseFile))
- {
- Dictionary results = helper.RunTestCase(category, testId, testCaseFile);
- int total = 0;
- int passed = 0;
- foreach (KeyValuePair result in results)
- {
- total++;
- if (result.Value)
- {
- passed++;
- }
- }
- if (total == 0)
- {
- Console.WriteLine("[" + "NO TESTS FOUND" + "]");
- }
- else if ((total == passed))
- {
- Console.WriteLine("[" + "PASSED " + (passed + ("/" + total)) + "]");
- }
- else
- {
- Console.WriteLine("[" + "FAILED " + (passed + ("/" + total)) + "]");
- }
- }
- }
- catch (Exception ex)
- {
- Console.Write("Internal error: \n" + ex.StackTrace);
- }
- }
- catch (Exception ex)
- {
- Console.Write("Internal error: \n" + ex.StackTrace);
- }
- }
- }
- }
- }
- catch (Exception ex)
- {
- Console.Write("Internal error: \n" + ex.StackTrace);
- }
- }
-
- private static void ShowUsageInfo()
- {
- Console.Write("Usage: DMN.TCK.Runner [DMN TCK test case folder] [Process Server URL] [User] [Password]");
- Console.Write("---------------------------------------------------------------------------------------");
- Console.Write("If the DMN TCK folder is not provided, the current working directory will be used");
- Console.Write("");
- }
- }
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace DMN.TCK.Runner
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ if (args.Length < 4)
+ {
+ ShowUsageInfo();
+ return;
+ }
+
+ try
+ {
+ string tckTestsRoot = args[0];
+ if (!Directory.Exists(tckTestsRoot))
+ {
+ Console.WriteLine("Invalid DMN TCK test case folder: " + tckTestsRoot);
+ ShowUsageInfo(); return;
+ }
+
+ // Detect all test categories
+ DirectoryInfo di = new DirectoryInfo(tckTestsRoot);
+ DirectoryInfo[] testCategoriesFolders = di.GetDirectories();
+ if (testCategoriesFolders == null || testCategoriesFolders.Length == 0)
+ {
+ Console.WriteLine("Invalid DMN TCK test case folder: " +
+ tckTestsRoot + " it does not contain compliance sub folders");
+ ShowUsageInfo(); return;
+ }
+
+ Helper helper = new Helper();
+ bool connected = true; // helper.Connect(args[1], args[2], args[3]);
+ if (!connected)
+ {
+ Console.WriteLine("Cannot connect to test server!");
+ ShowUsageInfo(); return;
+ }
+
+ // Inside each category, there are a list of tests
+ foreach (DirectoryInfo testCategoriesFolder in testCategoriesFolders)
+ {
+ string category = testCategoriesFolder.Name;
+ DirectoryInfo[] testFolders = testCategoriesFolder.GetDirectories();
+ if (testFolders == null)
+ {
+ // TODO: Warning!!! continue If
+ continue;
+ }
+
+ Console.WriteLine(category);
+ foreach (DirectoryInfo testFolder in testFolders)
+ {
+ string testId = testFolder.Name;
+ FileInfo[] testCasesFiles = testFolder.GetFiles("*.xml");
+ foreach (FileInfo testCaseFile in testCasesFiles)
+ {
+ try
+ {
+ Console.WriteLine(testCaseFile.Name);
+ try
+ {
+ if (helper.PushTestCase(category, testId, testCaseFile))
+ {
+ Dictionary results = helper.RunTestCase(category, testId, testCaseFile);
+ int total = 0;
+ int passed = 0;
+ foreach (KeyValuePair result in results)
+ {
+ total++;
+ if (result.Value)
+ {
+ passed++;
+ }
+ }
+ if (total == 0)
+ {
+ Console.WriteLine("[" + "NO TESTS FOUND" + "]");
+ }
+ else if ((total == passed))
+ {
+ Console.WriteLine("[" + "PASSED " + (passed + ("/" + total)) + "]");
+ }
+ else
+ {
+ Console.WriteLine("[" + "FAILED " + (passed + ("/" + total)) + "]");
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.Write("Internal error: \n" + ex.StackTrace);
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.Write("Internal error: \n" + ex.StackTrace);
+ }
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.Write("Internal error: \n" + ex.StackTrace);
+ }
+ }
+
+ private static void ShowUsageInfo()
+ {
+ Console.Write("Usage: DMN.TCK.Runner [DMN TCK test case folder] [Process Server URL] [User] [Password]");
+ Console.Write("---------------------------------------------------------------------------------------");
+ Console.Write("If the DMN TCK folder is not provided, the current working directory will be used");
+ Console.Write("");
+ }
+ }
}
\ No newline at end of file
diff --git a/runners/dmn-tck-runner-csharp/packages.config b/runners/dmn-tck-runner-csharp/packages.config
index b5b974b5..d9261b81 100644
--- a/runners/dmn-tck-runner-csharp/packages.config
+++ b/runners/dmn-tck-runner-csharp/packages.config
@@ -1,4 +1,4 @@
-
-
-
+
+
+
\ No newline at end of file