1
0
Fork 0
mirror of https://github.com/IRS-Public/direct-file.git synced 2025-06-27 20:25:52 +00:00
This commit is contained in:
Elijah Wright 2025-06-16 13:32:38 -07:00 committed by GitHub
commit 9196bba457
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 464 additions and 256 deletions

View file

@ -47,27 +47,67 @@
<Description>Whether the tax year is a leap year</Description>
<Derived>
<Switch>
<!-- TODO: replace this with the calc to determine leap year (e.g. divisible by 4, but not 100 unless also divisible by 400) -->
<Case>
<When>
<Any>
<Equal>
<Left>
<Modulo>
<Left>
<Dependency path="/taxYear" />
</Left>
<Right>
<Int>2024</Int>
<Int>400</Int>
</Right>
</Modulo>
</Left>
<Right>
<Int>0</Int>
</Right>
</Equal>
</When>
<Then>
<True />
</Then>
</Case>
<Case>
<When>
<Equal>
<Left>
<Modulo>
<Left>
<Dependency path="/taxYear" />
</Left>
<Right>
<Int>2028</Int>
<Int>100</Int>
</Right>
</Modulo>
</Left>
<Right>
<Int>0</Int>
</Right>
</Equal>
</When>
<Then>
<False />
</Then>
</Case>
<Case>
<When>
<Equal>
<Left>
<Modulo>
<Left>
<Dependency path="/taxYear" />
</Left>
<Right>
<Int>4</Int>
</Right>
</Modulo>
</Left>
<Right>
<Int>0</Int>
</Right>
</Equal>
</Any>
</When>
<Then>
<True />

View file

@ -1857,37 +1857,13 @@ $c_Lgov_irs_factgraph_Graph.prototype.getCollectionPaths__T__sci_Seq = (function
var this$4 = $n(paths);
return this$4
});
$c_Lgov_irs_factgraph_Graph.prototype.explainWithPath = (function(arg) {
var prep0 = $as_Lgov_irs_factgraph_Path(arg);
return this.explain__Lgov_irs_factgraph_Path__Lgov_irs_factgraph_Explanation(prep0)
});
$c_Lgov_irs_factgraph_Graph.prototype.getVectWithPath = (function(arg) {
var prep0 = $as_Lgov_irs_factgraph_Path(arg);
return this.getVect__Lgov_irs_factgraph_Path__Lgov_irs_factgraph_monads_MaybeVector(prep0)
});
$c_Lgov_irs_factgraph_Graph.prototype.setWithPath = (function(arg, arg$2) {
var prep0 = $as_Lgov_irs_factgraph_Path(arg);
this.set__Lgov_irs_factgraph_Path__O__V(prep0, arg$2)
});
$c_Lgov_irs_factgraph_Graph.prototype.getVect = (function(arg) {
var prep0 = $as_T(arg);
return this.getVect__T__Lgov_irs_factgraph_monads_MaybeVector(prep0)
});
$c_Lgov_irs_factgraph_Graph.prototype.set = (function(arg, arg$2) {
var prep0 = $as_T(arg);
this.set__T__O__V(prep0, arg$2)
});
$c_Lgov_irs_factgraph_Graph.prototype.getWithPath = (function(arg) {
$c_Lgov_irs_factgraph_Graph.prototype.getVectWithPath = (function(arg) {
var prep0 = $as_Lgov_irs_factgraph_Path(arg);
return this.get__Lgov_irs_factgraph_Path__Lgov_irs_factgraph_monads_Result(prep0)
});
$c_Lgov_irs_factgraph_Graph.prototype.get = (function(arg) {
var prep0 = $as_T(arg);
return this.get__T__Lgov_irs_factgraph_monads_Result(prep0)
});
$c_Lgov_irs_factgraph_Graph.prototype.delete = (function(arg) {
var prep0 = $as_T(arg);
this.delete__T__V(prep0)
return this.getVect__Lgov_irs_factgraph_Path__Lgov_irs_factgraph_monads_MaybeVector(prep0)
});
$c_Lgov_irs_factgraph_Graph.prototype.deleteWithPath = (function(arg) {
var prep0 = $as_Lgov_irs_factgraph_Path(arg);
@ -1896,10 +1872,34 @@ $c_Lgov_irs_factgraph_Graph.prototype.deleteWithPath = (function(arg) {
$c_Lgov_irs_factgraph_Graph.prototype.getDictionary = (function() {
return this.Lgov_irs_factgraph_JSGraph__f_dictionary
});
$c_Lgov_irs_factgraph_Graph.prototype.delete = (function(arg) {
var prep0 = $as_T(arg);
this.delete__T__V(prep0)
});
$c_Lgov_irs_factgraph_Graph.prototype.explain = (function(arg) {
var prep0 = $as_T(arg);
return this.explain__T__Lgov_irs_factgraph_Explanation(prep0)
});
$c_Lgov_irs_factgraph_Graph.prototype.setWithPath = (function(arg, arg$2) {
var prep0 = $as_Lgov_irs_factgraph_Path(arg);
this.set__Lgov_irs_factgraph_Path__O__V(prep0, arg$2)
});
$c_Lgov_irs_factgraph_Graph.prototype.set = (function(arg, arg$2) {
var prep0 = $as_T(arg);
this.set__T__O__V(prep0, arg$2)
});
$c_Lgov_irs_factgraph_Graph.prototype.get = (function(arg) {
var prep0 = $as_T(arg);
return this.get__T__Lgov_irs_factgraph_monads_Result(prep0)
});
$c_Lgov_irs_factgraph_Graph.prototype.getWithPath = (function(arg) {
var prep0 = $as_Lgov_irs_factgraph_Path(arg);
return this.get__Lgov_irs_factgraph_Path__Lgov_irs_factgraph_monads_Result(prep0)
});
$c_Lgov_irs_factgraph_Graph.prototype.explainWithPath = (function(arg) {
var prep0 = $as_Lgov_irs_factgraph_Path(arg);
return this.explain__Lgov_irs_factgraph_Path__Lgov_irs_factgraph_Explanation(prep0)
});
function $as_Lgov_irs_factgraph_Graph(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_Graph) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.Graph"))
}
@ -2320,7 +2320,7 @@ function $c_Lgov_irs_factgraph_compnodes_CompNode$() {
this.Lgov_irs_factgraph_compnodes_CompNode$__f_factories = null;
$n_Lgov_irs_factgraph_compnodes_CompNode$ = this;
$n($m_s_package$().s_package$__f_List);
var elems = $m_sr_ScalaRunTime$().wrapRefArray__AO__sci_ArraySeq(new ($d_Lgov_irs_factgraph_compnodes_CompNodeFactory.getArrayOf().constr)([$m_Lgov_irs_factgraph_compnodes_BooleanNode$False$(), $m_Lgov_irs_factgraph_compnodes_BooleanNode$True$(), $m_Lgov_irs_factgraph_compnodes_DollarNode$(), $m_Lgov_irs_factgraph_compnodes_IntNode$(), $m_Lgov_irs_factgraph_compnodes_DaysNode$(), $m_Lgov_irs_factgraph_compnodes_RationalNode$(), $m_Lgov_irs_factgraph_compnodes_DayNode$(), $m_Lgov_irs_factgraph_compnodes_StringNode$(), $m_Lgov_irs_factgraph_compnodes_TinNode$(), $m_Lgov_irs_factgraph_compnodes_EinNode$(), $m_Lgov_irs_factgraph_compnodes_EmailAddressNode$(), $m_Lgov_irs_factgraph_compnodes_AddressNode$(), $m_Lgov_irs_factgraph_compnodes_BankAccountNode$(), $m_Lgov_irs_factgraph_compnodes_EnumNode$(), $m_Lgov_irs_factgraph_compnodes_MultiEnumNode$(), $m_Lgov_irs_factgraph_compnodes_PhoneNumberNode$(), $m_Lgov_irs_factgraph_compnodes_Add$(), $m_Lgov_irs_factgraph_compnodes_All$(), $m_Lgov_irs_factgraph_compnodes_Any$(), $m_Lgov_irs_factgraph_compnodes_Today$(), $m_Lgov_irs_factgraph_compnodes_AsString$(), $m_Lgov_irs_factgraph_compnodes_AsDecimalString$(), $m_Lgov_irs_factgraph_compnodes_CollectionSize$(), $m_Lgov_irs_factgraph_compnodes_Count$(), $m_Lgov_irs_factgraph_compnodes_Dependency$(), $m_Lgov_irs_factgraph_compnodes_Divide$(), $m_Lgov_irs_factgraph_compnodes_EnumOptionsContains$(), $m_Lgov_irs_factgraph_compnodes_EnumOptionsSize$(), $m_Lgov_irs_factgraph_compnodes_EnumOptionsNode$(), $m_Lgov_irs_factgraph_compnodes_Equal$(), $m_Lgov_irs_factgraph_compnodes_Filter$(), $m_Lgov_irs_factgraph_compnodes_FirstNCollectionItems$(), $m_Lgov_irs_factgraph_compnodes_Find$(), $m_Lgov_irs_factgraph_compnodes_GreaterOf$(), $m_Lgov_irs_factgraph_compnodes_GreaterThan$(), $m_Lgov_irs_factgraph_compnodes_GreaterThanOrEqual$(), $m_Lgov_irs_factgraph_compnodes_IndexOf$(), $m_Lgov_irs_factgraph_compnodes_IsComplete$(), $m_Lgov_irs_factgraph_compnodes_Length$(), $m_Lgov_irs_factgraph_compnodes_LesserOf$(), $m_Lgov_irs_factgraph_compnodes_LessThan$(), $m_Lgov_irs_factgraph_compnodes_LessThanOrEqual$(), $m_Lgov_irs_factgraph_compnodes_Maximum$(), $m_Lgov_irs_factgraph_compnodes_Minimum$(), $m_Lgov_irs_factgraph_compnodes_Multiply$(), $m_Lgov_irs_factgraph_compnodes_Not$(), $m_Lgov_irs_factgraph_compnodes_NotEqual$(), $m_Lgov_irs_factgraph_compnodes_Paste$(), $m_Lgov_irs_factgraph_compnodes_Placeholder$(), $m_Lgov_irs_factgraph_compnodes_Regex$(), $m_Lgov_irs_factgraph_compnodes_Round$(), $m_Lgov_irs_factgraph_compnodes_RoundToInt$(), $m_Lgov_irs_factgraph_compnodes_StepwiseMultiply$(), $m_Lgov_irs_factgraph_compnodes_StripChars$(), $m_Lgov_irs_factgraph_compnodes_Subtract$(), $m_Lgov_irs_factgraph_compnodes_CollectionSum$(), $m_Lgov_irs_factgraph_compnodes_Switch$(), $m_Lgov_irs_factgraph_compnodes_Trim$(), $m_Lgov_irs_factgraph_compnodes_ToUpper$(), $m_Lgov_irs_factgraph_compnodes_TruncateCents$(), $m_Lgov_irs_factgraph_compnodes_transformations_TruncateNameForMeF$()]));
var elems = $m_sr_ScalaRunTime$().wrapRefArray__AO__sci_ArraySeq(new ($d_Lgov_irs_factgraph_compnodes_CompNodeFactory.getArrayOf().constr)([$m_Lgov_irs_factgraph_compnodes_BooleanNode$False$(), $m_Lgov_irs_factgraph_compnodes_BooleanNode$True$(), $m_Lgov_irs_factgraph_compnodes_DollarNode$(), $m_Lgov_irs_factgraph_compnodes_IntNode$(), $m_Lgov_irs_factgraph_compnodes_DaysNode$(), $m_Lgov_irs_factgraph_compnodes_RationalNode$(), $m_Lgov_irs_factgraph_compnodes_DayNode$(), $m_Lgov_irs_factgraph_compnodes_StringNode$(), $m_Lgov_irs_factgraph_compnodes_TinNode$(), $m_Lgov_irs_factgraph_compnodes_EinNode$(), $m_Lgov_irs_factgraph_compnodes_EmailAddressNode$(), $m_Lgov_irs_factgraph_compnodes_AddressNode$(), $m_Lgov_irs_factgraph_compnodes_BankAccountNode$(), $m_Lgov_irs_factgraph_compnodes_EnumNode$(), $m_Lgov_irs_factgraph_compnodes_MultiEnumNode$(), $m_Lgov_irs_factgraph_compnodes_PhoneNumberNode$(), $m_Lgov_irs_factgraph_compnodes_Add$(), $m_Lgov_irs_factgraph_compnodes_All$(), $m_Lgov_irs_factgraph_compnodes_Any$(), $m_Lgov_irs_factgraph_compnodes_Today$(), $m_Lgov_irs_factgraph_compnodes_AsString$(), $m_Lgov_irs_factgraph_compnodes_AsDecimalString$(), $m_Lgov_irs_factgraph_compnodes_CollectionSize$(), $m_Lgov_irs_factgraph_compnodes_Count$(), $m_Lgov_irs_factgraph_compnodes_Dependency$(), $m_Lgov_irs_factgraph_compnodes_Divide$(), $m_Lgov_irs_factgraph_compnodes_EnumOptionsContains$(), $m_Lgov_irs_factgraph_compnodes_EnumOptionsSize$(), $m_Lgov_irs_factgraph_compnodes_EnumOptionsNode$(), $m_Lgov_irs_factgraph_compnodes_Equal$(), $m_Lgov_irs_factgraph_compnodes_Filter$(), $m_Lgov_irs_factgraph_compnodes_FirstNCollectionItems$(), $m_Lgov_irs_factgraph_compnodes_Find$(), $m_Lgov_irs_factgraph_compnodes_GreaterOf$(), $m_Lgov_irs_factgraph_compnodes_GreaterThan$(), $m_Lgov_irs_factgraph_compnodes_GreaterThanOrEqual$(), $m_Lgov_irs_factgraph_compnodes_IndexOf$(), $m_Lgov_irs_factgraph_compnodes_IsComplete$(), $m_Lgov_irs_factgraph_compnodes_Length$(), $m_Lgov_irs_factgraph_compnodes_LesserOf$(), $m_Lgov_irs_factgraph_compnodes_LessThan$(), $m_Lgov_irs_factgraph_compnodes_LessThanOrEqual$(), $m_Lgov_irs_factgraph_compnodes_Maximum$(), $m_Lgov_irs_factgraph_compnodes_Minimum$(), $m_Lgov_irs_factgraph_compnodes_Modulo$(), $m_Lgov_irs_factgraph_compnodes_Multiply$(), $m_Lgov_irs_factgraph_compnodes_Not$(), $m_Lgov_irs_factgraph_compnodes_NotEqual$(), $m_Lgov_irs_factgraph_compnodes_Paste$(), $m_Lgov_irs_factgraph_compnodes_Placeholder$(), $m_Lgov_irs_factgraph_compnodes_Regex$(), $m_Lgov_irs_factgraph_compnodes_Round$(), $m_Lgov_irs_factgraph_compnodes_RoundToInt$(), $m_Lgov_irs_factgraph_compnodes_StepwiseMultiply$(), $m_Lgov_irs_factgraph_compnodes_StripChars$(), $m_Lgov_irs_factgraph_compnodes_Subtract$(), $m_Lgov_irs_factgraph_compnodes_CollectionSum$(), $m_Lgov_irs_factgraph_compnodes_Switch$(), $m_Lgov_irs_factgraph_compnodes_Trim$(), $m_Lgov_irs_factgraph_compnodes_ToUpper$(), $m_Lgov_irs_factgraph_compnodes_TruncateCents$(), $m_Lgov_irs_factgraph_compnodes_transformations_TruncateNameForMeF$()]));
var defaultFactories = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems);
var $$x2 = $m_scm_Map$();
var this$5 = $n(defaultFactories);
@ -20719,9 +20719,9 @@ $c_Lgov_irs_factgraph_Fact.prototype.apply__Lgov_irs_factgraph_PathItem__Lgov_ir
var elems = $m_sr_ScalaRunTime$().wrapRefArray__AO__sci_ArraySeq(new ($d_Lgov_irs_factgraph_PathItem.getArrayOf().constr)([key]));
return $p_Lgov_irs_factgraph_Fact__apply__sci_List__Z__Lgov_irs_factgraph_monads_MaybeVector(this, $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems), true)
});
Object.defineProperty($c_Lgov_irs_factgraph_Fact.prototype, "path", {
Object.defineProperty($c_Lgov_irs_factgraph_Fact.prototype, "meta", {
"get": (function() {
return this.Lgov_irs_factgraph_Fact__f_path
return this.Lgov_irs_factgraph_Fact__f_meta
}),
"configurable": true
});
@ -20731,30 +20731,30 @@ Object.defineProperty($c_Lgov_irs_factgraph_Fact.prototype, "graph", {
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_Fact.prototype, "limits", {
"get": (function() {
return this.Lgov_irs_factgraph_Fact__f_limits
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_Fact.prototype, "parent", {
"get": (function() {
return this.Lgov_irs_factgraph_Fact__f_parent
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_Fact.prototype, "path", {
"get": (function() {
return this.Lgov_irs_factgraph_Fact__f_path
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_Fact.prototype, "value", {
"get": (function() {
return this.Lgov_irs_factgraph_Fact__f_value
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_Fact.prototype, "meta", {
"get": (function() {
return this.Lgov_irs_factgraph_Fact__f_meta
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_Fact.prototype, "limits", {
"get": (function() {
return this.Lgov_irs_factgraph_Fact__f_limits
}),
"configurable": true
});
function $as_Lgov_irs_factgraph_Fact(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_Fact) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.Fact"))
}
@ -21152,12 +21152,6 @@ $c_Lgov_irs_factgraph_FactDefinition.prototype.apply__Lgov_irs_factgraph_PathIte
var elems = $m_sr_ScalaRunTime$().wrapRefArray__AO__sci_ArraySeq(new ($d_Lgov_irs_factgraph_PathItem.getArrayOf().constr)([key]));
return $p_Lgov_irs_factgraph_FactDefinition__apply__sci_List__Lgov_irs_factgraph_monads_MaybeVector(this, $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems))
});
Object.defineProperty($c_Lgov_irs_factgraph_FactDefinition.prototype, "value", {
"get": (function() {
return this.value__Lgov_irs_factgraph_compnodes_CompNode()
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_FactDefinition.prototype, "meta", {
"get": (function() {
return this.meta__Lgov_irs_factgraph_Factual$Meta()
@ -21176,6 +21170,12 @@ Object.defineProperty($c_Lgov_irs_factgraph_FactDefinition.prototype, "limits",
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_FactDefinition.prototype, "value", {
"get": (function() {
return this.value__Lgov_irs_factgraph_compnodes_CompNode()
}),
"configurable": true
});
function $as_Lgov_irs_factgraph_FactDefinition(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_FactDefinition) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.FactDefinition"))
}
@ -21323,28 +21323,6 @@ $c_Lgov_irs_factgraph_JSGraph.prototype.jsCheckPersister__sjs_js_Array = (functi
}))));
return $m_sjs_js_JSConverters$JSRichIterableOnce$().toJSArray$extension__sc_IterableOnce__sjs_js_Array(col)
});
Object.defineProperty($c_Lgov_irs_factgraph_JSGraph.prototype, "persister", {
"get": (function() {
return this.Lgov_irs_factgraph_JSGraph__f_persister
}),
"configurable": true
});
$c_Lgov_irs_factgraph_JSGraph.prototype.getFact = (function(arg) {
var prep0 = $as_T(arg);
return this.getFact__T__Lgov_irs_factgraph_Fact(prep0)
});
Object.defineProperty($c_Lgov_irs_factgraph_JSGraph.prototype, "dictionary", {
"get": (function() {
return this.Lgov_irs_factgraph_JSGraph__f_dictionary
}),
"configurable": true
});
$c_Lgov_irs_factgraph_JSGraph.prototype.save = (function() {
return this.jsSave__Lgov_irs_factgraph_SaveReturnValue()
});
$c_Lgov_irs_factgraph_JSGraph.prototype.jsSave = (function() {
return this.jsSave__Lgov_irs_factgraph_SaveReturnValue()
});
$c_Lgov_irs_factgraph_JSGraph.prototype.explainAndSolve = (function(arg) {
var prep0 = $as_T(arg);
return this.explainAndSolve__T__sjs_js_Array(prep0)
@ -21357,8 +21335,8 @@ $c_Lgov_irs_factgraph_JSGraph.prototype.toJSON = (function(...rest) {
var prep0 = ((rest[0] === (void 0)) ? (-1) : $uI(rest[0]));
return $n(this.Lgov_irs_factgraph_JSGraph__f_persister).toJson__I__T(prep0)
});
$c_Lgov_irs_factgraph_JSGraph.prototype.toStringDictionary = (function() {
return this.toStringDictionary__sjs_js_Dictionary()
$c_Lgov_irs_factgraph_JSGraph.prototype.checkPersister = (function() {
return this.jsCheckPersister__sjs_js_Array()
});
Object.defineProperty($c_Lgov_irs_factgraph_JSGraph.prototype, "toJson$default$1", {
"get": (function() {
@ -21366,10 +21344,32 @@ Object.defineProperty($c_Lgov_irs_factgraph_JSGraph.prototype, "toJson$default$1
}),
"configurable": true
});
$c_Lgov_irs_factgraph_JSGraph.prototype.jsCheckPersister = (function() {
return this.jsCheckPersister__sjs_js_Array()
$c_Lgov_irs_factgraph_JSGraph.prototype.jsSave = (function() {
return this.jsSave__Lgov_irs_factgraph_SaveReturnValue()
});
$c_Lgov_irs_factgraph_JSGraph.prototype.checkPersister = (function() {
$c_Lgov_irs_factgraph_JSGraph.prototype.save = (function() {
return this.jsSave__Lgov_irs_factgraph_SaveReturnValue()
});
$c_Lgov_irs_factgraph_JSGraph.prototype.toStringDictionary = (function() {
return this.toStringDictionary__sjs_js_Dictionary()
});
$c_Lgov_irs_factgraph_JSGraph.prototype.getFact = (function(arg) {
var prep0 = $as_T(arg);
return this.getFact__T__Lgov_irs_factgraph_Fact(prep0)
});
Object.defineProperty($c_Lgov_irs_factgraph_JSGraph.prototype, "dictionary", {
"get": (function() {
return this.Lgov_irs_factgraph_JSGraph__f_dictionary
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_JSGraph.prototype, "persister", {
"get": (function() {
return this.Lgov_irs_factgraph_JSGraph__f_persister
}),
"configurable": true
});
$c_Lgov_irs_factgraph_JSGraph.prototype.jsCheckPersister = (function() {
return this.jsCheckPersister__sjs_js_Array()
});
var $d_Lgov_irs_factgraph_JSGraph = new $TypeData().initClass({
@ -23672,6 +23672,61 @@ function $m_Lgov_irs_factgraph_compnodes_Minimum$() {
};
return $n_Lgov_irs_factgraph_compnodes_Minimum$
}
/** @constructor */
function $c_Lgov_irs_factgraph_compnodes_Modulo$() {
this.Lgov_irs_factgraph_compnodes_Modulo$__f_Key = null;
this.Lgov_irs_factgraph_compnodes_Modulo$__f_operator = null;
$n_Lgov_irs_factgraph_compnodes_Modulo$ = this;
this.Lgov_irs_factgraph_compnodes_Modulo$__f_Key = "Modulo";
this.Lgov_irs_factgraph_compnodes_Modulo$__f_operator = new $c_Lgov_irs_factgraph_compnodes_ModuloOperator()
}
$c_Lgov_irs_factgraph_compnodes_Modulo$.prototype = new $h_O();
$c_Lgov_irs_factgraph_compnodes_Modulo$.prototype.constructor = $c_Lgov_irs_factgraph_compnodes_Modulo$;
/** @constructor */
function $h_Lgov_irs_factgraph_compnodes_Modulo$() {
/*<skip>*/
}
$h_Lgov_irs_factgraph_compnodes_Modulo$.prototype = $c_Lgov_irs_factgraph_compnodes_Modulo$.prototype;
$c_Lgov_irs_factgraph_compnodes_Modulo$.prototype.Key__T = (function() {
return this.Lgov_irs_factgraph_compnodes_Modulo$__f_Key
});
$c_Lgov_irs_factgraph_compnodes_Modulo$.prototype.apply__Lgov_irs_factgraph_compnodes_CompNode__Lgov_irs_factgraph_compnodes_CompNode__Lgov_irs_factgraph_compnodes_IntNode = (function(lhs, rhs) {
if ((lhs instanceof $c_Lgov_irs_factgraph_compnodes_IntNode)) {
var l = $as_Lgov_irs_factgraph_compnodes_IntNode(lhs);
if ((rhs instanceof $c_Lgov_irs_factgraph_compnodes_IntNode)) {
var r = $as_Lgov_irs_factgraph_compnodes_IntNode(rhs);
var lhs$1 = $n(l).Lgov_irs_factgraph_compnodes_IntNode__f_expr;
var rhs$1 = $n(r).Lgov_irs_factgraph_compnodes_IntNode__f_expr;
var op = this.Lgov_irs_factgraph_compnodes_Modulo$__f_operator;
var expr = new $c_Lgov_irs_factgraph_Expression$Binary(lhs$1, rhs$1, op);
return new $c_Lgov_irs_factgraph_compnodes_IntNode(expr)
}
};
var this$4 = $n(lhs);
var $$x1 = $objectGetClass(this$4).getName__T();
var this$5 = $n(rhs);
throw $ct_jl_UnsupportedOperationException__T__(new $c_jl_UnsupportedOperationException(), ((("cannot modulate a " + $$x1) + " and a ") + $objectGetClass(this$5).getName__T()))
});
$c_Lgov_irs_factgraph_compnodes_Modulo$.prototype.fromDerivedConfig__Lgov_irs_factgraph_definitions_fact_CompNodeConfigTrait__Lgov_irs_factgraph_Factual__Lgov_irs_factgraph_FactDictionary__Lgov_irs_factgraph_compnodes_CompNode = (function(e, x$2, x$3) {
var lhs = $m_Lgov_irs_factgraph_compnodes_CompNode$().getConfigChildNode__Lgov_irs_factgraph_definitions_fact_CompNodeConfigTrait__T__Lgov_irs_factgraph_Factual__Lgov_irs_factgraph_FactDictionary__Lgov_irs_factgraph_compnodes_CompNode(e, "Left", x$2, x$3);
var rhs = $m_Lgov_irs_factgraph_compnodes_CompNode$().getConfigChildNode__Lgov_irs_factgraph_definitions_fact_CompNodeConfigTrait__T__Lgov_irs_factgraph_Factual__Lgov_irs_factgraph_FactDictionary__Lgov_irs_factgraph_compnodes_CompNode(e, "Right", x$2, x$3);
return this.apply__Lgov_irs_factgraph_compnodes_CompNode__Lgov_irs_factgraph_compnodes_CompNode__Lgov_irs_factgraph_compnodes_IntNode(lhs, rhs)
});
var $d_Lgov_irs_factgraph_compnodes_Modulo$ = new $TypeData().initClass({
Lgov_irs_factgraph_compnodes_Modulo$: 0
}, false, "gov.irs.factgraph.compnodes.Modulo$", {
Lgov_irs_factgraph_compnodes_Modulo$: 1,
O: 1,
Lgov_irs_factgraph_compnodes_CompNodeFactory: 1
});
$c_Lgov_irs_factgraph_compnodes_Modulo$.prototype.$classData = $d_Lgov_irs_factgraph_compnodes_Modulo$;
var $n_Lgov_irs_factgraph_compnodes_Modulo$;
function $m_Lgov_irs_factgraph_compnodes_Modulo$() {
if ((!$n_Lgov_irs_factgraph_compnodes_Modulo$)) {
$n_Lgov_irs_factgraph_compnodes_Modulo$ = new $c_Lgov_irs_factgraph_compnodes_Modulo$()
};
return $n_Lgov_irs_factgraph_compnodes_Modulo$
}
function $p_Lgov_irs_factgraph_compnodes_Multiply$__reduceMultiply__sci_Seq__Lgov_irs_factgraph_compnodes_CompNode($thiz, nodes) {
matchResult1: {
var $$x1;
@ -37579,6 +37634,38 @@ var $d_Lgov_irs_factgraph_compnodes_MinimumOperator = new $TypeData().initClass(
});
$c_Lgov_irs_factgraph_compnodes_MinimumOperator.prototype.$classData = $d_Lgov_irs_factgraph_compnodes_MinimumOperator;
/** @constructor */
function $c_Lgov_irs_factgraph_compnodes_ModuloOperator() {
/*<skip>*/
}
$c_Lgov_irs_factgraph_compnodes_ModuloOperator.prototype = new $h_O();
$c_Lgov_irs_factgraph_compnodes_ModuloOperator.prototype.constructor = $c_Lgov_irs_factgraph_compnodes_ModuloOperator;
/** @constructor */
function $h_Lgov_irs_factgraph_compnodes_ModuloOperator() {
/*<skip>*/
}
$h_Lgov_irs_factgraph_compnodes_ModuloOperator.prototype = $c_Lgov_irs_factgraph_compnodes_ModuloOperator.prototype;
$c_Lgov_irs_factgraph_compnodes_ModuloOperator.prototype.apply__Lgov_irs_factgraph_monads_Result__Lgov_irs_factgraph_monads_Thunk__Lgov_irs_factgraph_monads_Result = (function(lhs, rhs) {
return $f_Lgov_irs_factgraph_operators_BinaryOperator__apply__Lgov_irs_factgraph_monads_Result__Lgov_irs_factgraph_monads_Thunk__Lgov_irs_factgraph_monads_Result(this, lhs, rhs)
});
$c_Lgov_irs_factgraph_compnodes_ModuloOperator.prototype.explain__Lgov_irs_factgraph_Expression__Lgov_irs_factgraph_Expression__Lgov_irs_factgraph_Factual__Lgov_irs_factgraph_monads_MaybeVector = (function(lhs, rhs, x$3) {
return $f_Lgov_irs_factgraph_operators_BinaryOperator__explain__Lgov_irs_factgraph_Expression__Lgov_irs_factgraph_Expression__Lgov_irs_factgraph_Factual__Lgov_irs_factgraph_monads_MaybeVector(this, lhs, rhs, x$3)
});
$c_Lgov_irs_factgraph_compnodes_ModuloOperator.prototype.operation__I__I__I = (function(x, y) {
return $intMod(x, y)
});
$c_Lgov_irs_factgraph_compnodes_ModuloOperator.prototype.operation__O__O__O = (function(lhs, rhs) {
return this.operation__I__I__I($uI(lhs), $uI(rhs))
});
var $d_Lgov_irs_factgraph_compnodes_ModuloOperator = new $TypeData().initClass({
Lgov_irs_factgraph_compnodes_ModuloOperator: 0
}, false, "gov.irs.factgraph.compnodes.ModuloOperator", {
Lgov_irs_factgraph_compnodes_ModuloOperator: 1,
O: 1,
Lgov_irs_factgraph_operators_Operator: 1,
Lgov_irs_factgraph_operators_BinaryOperator: 1
});
$c_Lgov_irs_factgraph_compnodes_ModuloOperator.prototype.$classData = $d_Lgov_irs_factgraph_compnodes_ModuloOperator;
/** @constructor */
function $c_Lgov_irs_factgraph_compnodes_MultiEnumContainsOperator() {
/*<skip>*/
}
@ -56163,9 +56250,27 @@ $c_Lgov_irs_factgraph_types_Address.prototype.toString__T = (function() {
var streetLines = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$3, "", "\n", "");
return ((((((((streetLines + "\n") + this.Lgov_irs_factgraph_types_Address__f_city) + ", ") + this.Lgov_irs_factgraph_types_Address__f_stateOrProvence) + " ") + this.Lgov_irs_factgraph_types_Address__f_postalCode) + "\n") + this.Lgov_irs_factgraph_types_Address__f_country)
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "country", {
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "city", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_country
return this.Lgov_irs_factgraph_types_Address__f_city
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "ZipCodePattern", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_ZipCodePattern
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "stateOrProvence", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_stateOrProvence
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "StreetPatternLength", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_StreetPatternLength
}),
"configurable": true
});
@ -56179,6 +56284,18 @@ Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "addressErr
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "StatePattern", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_StatePattern
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "StreetPattern", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_StreetPattern
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "postalCode", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_postalCode
@ -56191,23 +56308,17 @@ Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "CityPatter
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "city", {
$c_Lgov_irs_factgraph_types_Address.prototype.foreignAddress = (function() {
return this.foreignAddress__Z()
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "country", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_city
return this.Lgov_irs_factgraph_types_Address__f_country
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "StreetPattern", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_StreetPattern
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "StatePattern", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_StatePattern
}),
"configurable": true
$c_Lgov_irs_factgraph_types_Address.prototype.toString = (function() {
return this.toString__T()
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "streetAddressLine2", {
"get": (function() {
@ -56215,36 +56326,12 @@ Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "streetAddr
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "StreetPatternLength", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_StreetPatternLength
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "ZipCodePattern", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_ZipCodePattern
}),
"configurable": true
});
$c_Lgov_irs_factgraph_types_Address.prototype.foreignAddress = (function() {
return this.foreignAddress__Z()
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "stateOrProvence", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_stateOrProvence
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Address.prototype, "streetAddress", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Address__f_streetAddress
}),
"configurable": true
});
$c_Lgov_irs_factgraph_types_Address.prototype.toString = (function() {
return this.toString__T()
});
function $as_Lgov_irs_factgraph_types_Address(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_types_Address) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.types.Address"))
}
@ -56698,30 +56785,30 @@ $c_Lgov_irs_factgraph_types_BankAccount.prototype.productElement__I__O = (functi
}
}
});
Object.defineProperty($c_Lgov_irs_factgraph_types_BankAccount.prototype, "AllowedAccountTypes", {
"get": (function() {
return this.Lgov_irs_factgraph_types_BankAccount__f_AllowedAccountTypes
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_BankAccount.prototype, "accountNumber", {
"get": (function() {
return this.Lgov_irs_factgraph_types_BankAccount__f_accountNumber
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_BankAccount.prototype, "accountType", {
"get": (function() {
return this.Lgov_irs_factgraph_types_BankAccount__f_accountType
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_BankAccount.prototype, "AllowedAccountTypes", {
"get": (function() {
return this.Lgov_irs_factgraph_types_BankAccount__f_AllowedAccountTypes
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_BankAccount.prototype, "routingNumber", {
"get": (function() {
return this.Lgov_irs_factgraph_types_BankAccount__f_routingNumber
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_BankAccount.prototype, "accountNumber", {
"get": (function() {
return this.Lgov_irs_factgraph_types_BankAccount__f_accountNumber
}),
"configurable": true
});
function $as_Lgov_irs_factgraph_types_BankAccount(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_types_BankAccount) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.types.BankAccount"))
}
@ -57525,18 +57612,18 @@ $c_Lgov_irs_factgraph_types_Ein.prototype.productElement__I__O = (function(n) {
$c_Lgov_irs_factgraph_types_Ein.prototype.toString__T = (function() {
return ((this.Lgov_irs_factgraph_types_Ein__f_prefix + "-") + this.Lgov_irs_factgraph_types_Ein__f_serial)
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Ein.prototype, "serial", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Ein__f_serial
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Ein.prototype, "prefix", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Ein__f_prefix
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Ein.prototype, "serial", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Ein__f_serial
}),
"configurable": true
});
$c_Lgov_irs_factgraph_types_Ein.prototype.toString = (function() {
return this.toString__T()
});
@ -58015,15 +58102,15 @@ $c_Lgov_irs_factgraph_types_IpPin.prototype.productElement__I__O = (function(n)
$c_Lgov_irs_factgraph_types_IpPin.prototype.toString__T = (function() {
return ("" + this.Lgov_irs_factgraph_types_IpPin__f_pin)
});
$c_Lgov_irs_factgraph_types_IpPin.prototype.toString = (function() {
return this.toString__T()
});
Object.defineProperty($c_Lgov_irs_factgraph_types_IpPin.prototype, "pin", {
"get": (function() {
return this.Lgov_irs_factgraph_types_IpPin__f_pin
}),
"configurable": true
});
$c_Lgov_irs_factgraph_types_IpPin.prototype.toString = (function() {
return this.toString__T()
});
function $as_Lgov_irs_factgraph_types_IpPin(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_types_IpPin) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.types.IpPin"))
}
@ -58352,15 +58439,15 @@ $c_Lgov_irs_factgraph_types_Pin.prototype.productElement__I__O = (function(n) {
$c_Lgov_irs_factgraph_types_Pin.prototype.toString__T = (function() {
return ("" + this.Lgov_irs_factgraph_types_Pin__f_pin)
});
$c_Lgov_irs_factgraph_types_Pin.prototype.toString = (function() {
return this.toString__T()
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Pin.prototype, "pin", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Pin__f_pin
}),
"configurable": true
});
$c_Lgov_irs_factgraph_types_Pin.prototype.toString = (function() {
return this.toString__T()
});
function $as_Lgov_irs_factgraph_types_Pin(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_types_Pin) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.types.Pin"))
}
@ -58766,21 +58853,15 @@ $c_Lgov_irs_factgraph_types_Tin.prototype.isATIN__Z = (function() {
return false
}
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Tin.prototype, "area", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Tin__f_area
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Tin.prototype, "isITIN", {
"get": (function() {
return this.isITIN__Z()
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Tin.prototype, "isATIN", {
Object.defineProperty($c_Lgov_irs_factgraph_types_Tin.prototype, "area", {
"get": (function() {
return this.isATIN__Z()
return this.Lgov_irs_factgraph_types_Tin__f_area
}),
"configurable": true
});
@ -58790,9 +58871,9 @@ Object.defineProperty($c_Lgov_irs_factgraph_types_Tin.prototype, "allowAllZeros"
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Tin.prototype, "isSSN", {
Object.defineProperty($c_Lgov_irs_factgraph_types_Tin.prototype, "isATIN", {
"get": (function() {
return this.isSSN__Z()
return this.isATIN__Z()
}),
"configurable": true
});
@ -58802,6 +58883,12 @@ Object.defineProperty($c_Lgov_irs_factgraph_types_Tin.prototype, "group", {
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Tin.prototype, "isSSN", {
"get": (function() {
return this.isSSN__Z()
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_Tin.prototype, "serial", {
"get": (function() {
return this.Lgov_irs_factgraph_types_Tin__f_serial
@ -71708,28 +71795,28 @@ $c_Lgov_irs_factgraph_compnodes_TinNode.prototype.extract__Lgov_irs_factgraph_Pa
};
return $m_s_None$()
});
Object.defineProperty($c_Lgov_irs_factgraph_compnodes_TinNode.prototype, "allowAllZeros", {
"get": (function() {
return this.Lgov_irs_factgraph_compnodes_TinNode__f_allowAllZeros
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_compnodes_TinNode.prototype, "expr", {
"get": (function() {
return this.Lgov_irs_factgraph_compnodes_TinNode__f_expr
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_compnodes_TinNode.prototype, "ValueClass", {
"get": (function() {
return $d_Lgov_irs_factgraph_types_Tin.getClassOf()
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_compnodes_TinNode.prototype, "allowAllZeros", {
"get": (function() {
return this.Lgov_irs_factgraph_compnodes_TinNode__f_allowAllZeros
}),
"configurable": true
});
$c_Lgov_irs_factgraph_compnodes_TinNode.prototype.extract = (function(arg) {
var prep0 = $as_Lgov_irs_factgraph_PathItem(arg);
return this.extract__Lgov_irs_factgraph_PathItem__s_Option(prep0)
});
Object.defineProperty($c_Lgov_irs_factgraph_compnodes_TinNode.prototype, "expr", {
"get": (function() {
return this.Lgov_irs_factgraph_compnodes_TinNode__f_expr
}),
"configurable": true
});
function $as_Lgov_irs_factgraph_compnodes_TinNode(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_compnodes_TinNode) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.compnodes.TinNode"))
}
@ -72931,21 +73018,6 @@ $c_Lgov_irs_factgraph_monads_JSEither.prototype.mapLeftRight__sjs_js_Function1__
};
throw new $c_s_MatchError(this)
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_JSEither.prototype, "right", {
"get": (function() {
return this.right__O()
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_JSEither.prototype, "left", {
"get": (function() {
return this.left__O()
}),
"configurable": true
});
$c_Lgov_irs_factgraph_monads_JSEither.prototype.mapLeftRight = (function(arg, arg$2) {
return this.mapLeftRight__sjs_js_Function1__sjs_js_Function1__sjs_js_Object(arg, arg$2)
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_JSEither.prototype, "isLeft", {
"get": (function() {
return (!this.isRight__Z())
@ -72955,6 +73027,21 @@ Object.defineProperty($c_Lgov_irs_factgraph_monads_JSEither.prototype, "isLeft",
$c_Lgov_irs_factgraph_monads_JSEither.prototype.map = (function(arg) {
return this.map__sjs_js_Function1__sjs_js_Object(arg)
});
$c_Lgov_irs_factgraph_monads_JSEither.prototype.mapLeftRight = (function(arg, arg$2) {
return this.mapLeftRight__sjs_js_Function1__sjs_js_Function1__sjs_js_Object(arg, arg$2)
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_JSEither.prototype, "left", {
"get": (function() {
return this.left__O()
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_JSEither.prototype, "right", {
"get": (function() {
return this.right__O()
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_JSEither.prototype, "isRight", {
"get": (function() {
return this.isRight__Z()
@ -73366,33 +73453,45 @@ $c_Lgov_irs_factgraph_monads_Result.prototype.typeName__T = (function() {
};
throw new $c_s_MatchError(this)
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "toString", {
$c_Lgov_irs_factgraph_monads_Result.prototype.flatMap = (function(arg) {
var prep0 = $as_F1(arg);
return this.flatMap__F1__Lgov_irs_factgraph_monads_Result(prep0)
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "hasValue", {
"get": (function() {
return this.toString__T()
return this.hasValue__Z()
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "get", {
"get": (function() {
return this.get__O()
}),
"configurable": true
});
$c_Lgov_irs_factgraph_monads_Result.prototype.getOrElse = (function(arg) {
var prep0 = $as_F0(arg);
return this.getOrElse__F0__O(prep0)
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "asPlaceholder", {
"get": (function() {
return this.asPlaceholder__Lgov_irs_factgraph_monads_Result()
}),
"configurable": true
});
$c_Lgov_irs_factgraph_monads_Result.prototype.orElse = (function(arg) {
var prep0 = $as_F0(arg);
return this.orElse__F0__Lgov_irs_factgraph_monads_Result(prep0)
});
$c_Lgov_irs_factgraph_monads_Result.prototype.getOrElse = (function(arg) {
var prep0 = $as_F0(arg);
return this.getOrElse__F0__O(prep0)
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "toString", {
"get": (function() {
return this.toString__T()
}),
"configurable": true
});
$c_Lgov_irs_factgraph_monads_Result.prototype.foreach = (function(arg) {
var prep0 = $as_F1(arg);
this.foreach__F1__V(prep0)
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "typeName", {
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "complete", {
"get": (function() {
return this.typeName__T()
return this.complete__Z()
}),
"configurable": true
});
@ -73402,32 +73501,20 @@ Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "value", {
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "hasValue", {
"get": (function() {
return this.hasValue__Z()
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "complete", {
"get": (function() {
return this.complete__Z()
}),
"configurable": true
});
$c_Lgov_irs_factgraph_monads_Result.prototype.map = (function(arg) {
var prep0 = $as_F1(arg);
return this.map__F1__Lgov_irs_factgraph_monads_Result(prep0)
});
$c_Lgov_irs_factgraph_monads_Result.prototype.flatMap = (function(arg) {
var prep0 = $as_F1(arg);
return this.flatMap__F1__Lgov_irs_factgraph_monads_Result(prep0)
});
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "get", {
Object.defineProperty($c_Lgov_irs_factgraph_monads_Result.prototype, "typeName", {
"get": (function() {
return this.get__O()
return this.typeName__T()
}),
"configurable": true
});
$c_Lgov_irs_factgraph_monads_Result.prototype.orElse = (function(arg) {
var prep0 = $as_F0(arg);
return this.orElse__F0__Lgov_irs_factgraph_monads_Result(prep0)
});
function $as_Lgov_irs_factgraph_monads_Result(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_monads_Result) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.monads.Result"))
}
@ -75056,27 +75143,12 @@ $c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype.subscriberNumber__T = (funct
$c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype.getFormatted__T = (function() {
return ((((this.Lgov_irs_factgraph_types_UsPhoneNumber__f_areaCode + "-") + this.Lgov_irs_factgraph_types_UsPhoneNumber__f_officeCode) + "-") + this.Lgov_irs_factgraph_types_UsPhoneNumber__f_lineNumber)
});
Object.defineProperty($c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype, "officeCode", {
"get": (function() {
return this.Lgov_irs_factgraph_types_UsPhoneNumber__f_officeCode
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype, "countryCode", {
"get": (function() {
return this.Lgov_irs_factgraph_types_UsPhoneNumber__f_countryCode
}),
"configurable": true
});
$c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype.getFormatted = (function() {
return this.getFormatted__T()
});
Object.defineProperty($c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype, "areaCode", {
"get": (function() {
return this.Lgov_irs_factgraph_types_UsPhoneNumber__f_areaCode
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype, "lineNumber", {
"get": (function() {
return this.Lgov_irs_factgraph_types_UsPhoneNumber__f_lineNumber
@ -75089,6 +75161,21 @@ Object.defineProperty($c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype, "subs
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype, "officeCode", {
"get": (function() {
return this.Lgov_irs_factgraph_types_UsPhoneNumber__f_officeCode
}),
"configurable": true
});
Object.defineProperty($c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype, "areaCode", {
"get": (function() {
return this.Lgov_irs_factgraph_types_UsPhoneNumber__f_areaCode
}),
"configurable": true
});
$c_Lgov_irs_factgraph_types_UsPhoneNumber.prototype.getFormatted = (function() {
return this.getFormatted__T()
});
function $as_Lgov_irs_factgraph_types_UsPhoneNumber(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_types_UsPhoneNumber) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.types.UsPhoneNumber"))
}
@ -104965,12 +105052,12 @@ class $c_Lgov_irs_factgraph_types_AddressFieldValidationFailure extends $c_jl_Il
$js$exported$prop$message__O() {
return this.Lgov_irs_factgraph_types_AddressFieldValidationFailure__f_message
};
get "message"() {
return this.Lgov_irs_factgraph_types_AddressFieldValidationFailure__f_message
};
get "validationMessage"() {
return this.Lgov_irs_factgraph_types_AddressFieldValidationFailure__f_validationMessage
};
get "message"() {
return this.Lgov_irs_factgraph_types_AddressFieldValidationFailure__f_message
};
}
function $as_Lgov_irs_factgraph_types_AddressFieldValidationFailure(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_types_AddressFieldValidationFailure) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.types.AddressFieldValidationFailure"))
@ -105086,12 +105173,12 @@ class $c_Lgov_irs_factgraph_types_AddressValidationFailure extends $c_jl_Illegal
get "addressErrors"() {
return this.Lgov_irs_factgraph_types_AddressValidationFailure__f_addressErrors
};
get "message"() {
return this.Lgov_irs_factgraph_types_AddressValidationFailure__f_message
};
get "validationMessage"() {
return this.Lgov_irs_factgraph_types_AddressValidationFailure__f_validationMessage
};
get "message"() {
return this.Lgov_irs_factgraph_types_AddressValidationFailure__f_message
};
}
function $as_Lgov_irs_factgraph_types_AddressValidationFailure(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_types_AddressValidationFailure) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.types.AddressValidationFailure"))
@ -105191,12 +105278,12 @@ class $c_Lgov_irs_factgraph_types_BankAccountFieldValidationFailure extends $c_j
$js$exported$prop$message__O() {
return this.Lgov_irs_factgraph_types_BankAccountFieldValidationFailure__f_message
};
get "message"() {
return this.Lgov_irs_factgraph_types_BankAccountFieldValidationFailure__f_message
};
get "validationMessage"() {
return this.Lgov_irs_factgraph_types_BankAccountFieldValidationFailure__f_validationMessage
};
get "message"() {
return this.Lgov_irs_factgraph_types_BankAccountFieldValidationFailure__f_message
};
}
function $as_Lgov_irs_factgraph_types_BankAccountFieldValidationFailure(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_types_BankAccountFieldValidationFailure) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.types.BankAccountFieldValidationFailure"))
@ -105309,14 +105396,14 @@ class $c_Lgov_irs_factgraph_types_BankAccountValidationFailure extends $c_jl_Ill
$js$exported$prop$message__O() {
return this.Lgov_irs_factgraph_types_BankAccountValidationFailure__f_message
};
get "message"() {
return this.Lgov_irs_factgraph_types_BankAccountValidationFailure__f_message
get "fieldErrors"() {
return this.Lgov_irs_factgraph_types_BankAccountValidationFailure__f_fieldErrors
};
get "validationMessage"() {
return this.Lgov_irs_factgraph_types_BankAccountValidationFailure__f_validationMessage
};
get "fieldErrors"() {
return this.Lgov_irs_factgraph_types_BankAccountValidationFailure__f_fieldErrors
get "message"() {
return this.Lgov_irs_factgraph_types_BankAccountValidationFailure__f_message
};
}
function $as_Lgov_irs_factgraph_types_BankAccountValidationFailure(obj) {
@ -105615,12 +105702,12 @@ class $c_Lgov_irs_factgraph_types_DollarValidationFailure extends $c_jl_IllegalA
$js$exported$prop$message__O() {
return this.Lgov_irs_factgraph_types_DollarValidationFailure__f_message
};
get "message"() {
return this.Lgov_irs_factgraph_types_DollarValidationFailure__f_message
};
get "validationMessage"() {
return this.Lgov_irs_factgraph_types_DollarValidationFailure__f_validationMessage
};
get "message"() {
return this.Lgov_irs_factgraph_types_DollarValidationFailure__f_message
};
}
function $as_Lgov_irs_factgraph_types_DollarValidationFailure(obj) {
return (((obj instanceof $c_Lgov_irs_factgraph_types_DollarValidationFailure) || (obj === null)) ? obj : $throwClassCastException(obj, "gov.irs.factgraph.types.DollarValidationFailure"))

File diff suppressed because one or more lines are too long

View file

@ -89,6 +89,7 @@ object CompNode:
LessThanOrEqual,
Maximum,
Minimum,
Modulo,
Multiply,
Not,
NotEqual,

View file

@ -0,0 +1,35 @@
package gov.irs.factgraph.compnodes
import gov.irs.factgraph.{Expression, FactDictionary, Factual}
import gov.irs.factgraph.definitions.fact.CompNodeConfigTrait
import gov.irs.factgraph.operators.BinaryOperator
object Modulo extends CompNodeFactory:
override val Key: String = "Modulo"
private val operator = ModuloOperator()
def apply(lhs: CompNode, rhs: CompNode): IntNode = (lhs, rhs) match
case (l: IntNode, r: IntNode) =>
IntNode(
Expression.Binary(
l.expr,
r.expr,
operator,
),
)
case _ =>
throw new UnsupportedOperationException(
s"cannot modulate a ${lhs.getClass.getName} and a ${rhs.getClass.getName}",
)
override def fromDerivedConfig(e: CompNodeConfigTrait)(using Factual)(using
FactDictionary,
): CompNode =
val lhs = CompNode.getConfigChildNode(e, "Left")
val rhs = CompNode.getConfigChildNode(e, "Right")
this(lhs, rhs)
private final class ModuloOperator extends BinaryOperator[Int, Int, Int]:
override protected def operation(x: Int, y: Int): Int = x % y

View file

@ -0,0 +1,45 @@
package gov.irs.factgraph.compnodes
import gov.irs.factgraph.FactDictionary
import gov.irs.factgraph.definitions.fact.{
CommonOptionConfigTraits,
CompNodeConfigElement
}
import org.scalatest.funspec.AnyFunSpec
import gov.irs.factgraph.monads.Result
import gov.irs.factgraph.types.*
class ModuloSpec extends AnyFunSpec:
describe("Modulo") {
it("reduces Int modulo Int") {
val node = CompNode.fromDerivedConfig(
new CompNodeConfigElement(
"Modulo",
Seq(
new CompNodeConfigElement(
"Left",
Seq(
new CompNodeConfigElement(
"Int",
Seq.empty,
CommonOptionConfigTraits.value("5")
)
)
),
new CompNodeConfigElement(
"Right",
Seq(
new CompNodeConfigElement(
"Int",
Seq.empty,
CommonOptionConfigTraits.value("3")
)
)
)
)
)
)
assert(node.get(0) == Result.Complete(2))
}
}