text: "use strict";function _typeof(a){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function checkRules(a){return a.forEach(function(a){if("function"!=typeof a)throw new Error("Expected [rule] to be typeof [function], got [".concat("undefined"==typeof value?"undefined":_typeof(value),"]"))}),!0}function checkSet(a){if(!a||!a.constructor||!(a instanceof global.Set))throw new Error("Expected [set] to be instanceof [Set], got [".concat(a&&a.constructor,"]"));return!0}function checkSets(a){return a.forEach(function(a){return checkSet(a)}),!0}function checkArgsSingle(a){if(!a||1!==a.length)throw new Error("The function must be given exactly 1 argument.");return!0}function arbitraryToBinary(a){return function(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];checkArgsSingle(c);var e=c[0];return a(this,e)}}var _originalAdd=global.Set.prototype.add;function add(a){if(this.rulesFct&&!this.rulesFct.call(null,a))throw new Error("Value [".concat(a,"] does not match ruleset."));return _originalAdd.call(this,a)}global.Set.prototype.add=add;var originalHas=global.Set.prototype.has;function resolve(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:new _originalSet([a]);if("undefined"==typeof a||"string"==typeof a||"number"==typeof a||"boolean"==typeof a||null===a)return a;if("function"==typeof a){var c={fctStr:(a+"").replace(/\s+/g,"")};return c.refs=Object.getOwnPropertyNames(a).map(function(c){return originalHas.call(b,a[c])?"circular":resolve(a[c],b)}),c}var d=Array.isArray(a);if("object"!==_typeof(a)&&!d)return a;if(b.add(a),d)return a.map(function(a){return originalHas.call(b,a)?"circular":resolve(a,b)});var e={};return Object.getOwnPropertyNames(a).sort(function(c,a){return c.localeCompare(a)}).forEach(function(c){e[c]=originalHas.call(b,a[c])?"circular":resolve(a[c],b)}),e}global.Set.prototype.has=function(a){var b=_typeof(a);if("string"===b||"number"===b||"boolean"===b)return originalHas.call(this,a);for(var c,d=this.values();void 0!==(c=d.next().value);){var e=_typeof(c);if(e!==b)return!1;var f=c instanceof Set&&a instanceof Set;if(c===a)return!0;if(f&&c.equal(a))return!0;if("function"===e&&"function"===b||!f&&"object"===e&&"object"===b||Array.isArray(c)&&Array.isArray(a)){var g=resolve(c),h=resolve(a);if(JSON.stringify(g)===JSON.stringify(h))return!0}}return!1};function rules(a){return a&&(checkRules([a]),this.rulesFct=a),this.rulesFct}global.Set.prototype.rules=rules;function toArray(){var a=this,b=[];b.length=a.size;var c=0;return a.forEach(function(a){b[c++]=a}),b}global.Set.prototype.toArray=toArray;function any(){var a=this,b=a.values();return b.next().value}global.Set.prototype.any=any;function isSupersetOf(a){for(var b,c=a.values();void 0!==(b=c.next().value);)if(!this.has(b))return!1;return!0}global.Set.prototype.isSupersetOf=isSupersetOf;function isSubsetOf(a){return a.isSupersetOf(this)}global.Set.prototype.isSubsetOf=isSubsetOf;function isProperSupersetOf(a){return this.size!==a.size&&this.isSupersetOf(a)}global.Set.prototype.properSupersetOf=isProperSupersetOf;function isProperSubsetOf(a){return this.size!==a.size&&this.isSubsetOf(a)}global.Set.prototype.properSubsetOf=isProperSubsetOf;function equal(a){return checkSet(a),this.size===a.size&&this.isSubsetOf(a)}global.Set.prototype.equal=equal;function isEmptyUnary(){return 0===this.size}global.Set.prototype.isEmpty=isEmptyUnary;var _originalSet=global.Set;function Set(a,b){var c=new _originalSet;return b&&c.rules(b),a&&a.forEach(function(a){return c.add(a)}),c}global.Set=Set,global.Set.prototype=_originalSet.prototype;function from(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return new Set(b.concat())}global.Set.from=from;function toSet(a){return a instanceof Set?a:Set.from(a)}global.Set.toSet=toSet;function copy(a){checkSet(a);var b=new Set;return a.forEach(function(a){return b.add(a)}),b}global.Set.copy=copy;function unionArbitrary(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];checkSets(b);var d=new Set;return b.forEach(function(a){return a.forEach(function(a){return d.add(a)})}),d}global.Set.union=unionArbitrary,global.Set.prototype.union=arbitraryToBinary(unionArbitrary);function intersectionArbitrary(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];if(checkSets(b),!b||0===b.length)throw new Error("The intersection operator currently does not support 0 arguments.");var d=new Set;return b.forEach(function(a){a.forEach(function(a){b.every(function(b){return b.has(a)})&&d.add(a)})}),d}global.Set.intersection=intersectionArbitrary,global.Set.prototype.intersect=arbitraryToBinary(intersectionArbitrary);function difference(a,b){checkSet(a),checkSet(b);var c=new Set([]);return a.forEach(function(a){b.has(a)||c.add(a)}),c}global.Set.difference=difference;function complement(a,b){if(checkSet(a),checkSet(b),!a.isSupersetOf(b))throw new Error("[set2] has an element which is not in the universe [set1].");return Set.difference(a,b)}global.Set.complement=complement;function symDiff(a,b){function addToSet(a,b,c){a.forEach(function(a){b.has(a)||c.add(a)})}var c=new Set;return addToSet(a,b,c),addToSet(b,a,c),c}function symmetricDifference(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];if(b.forEach(function(a){return checkSet(a)}),2===b.length)return symDiff.apply(void 0,b);for(var d=symDiff(b.shift(),b.shift());0<b.length;)d=symDiff(d,b.shift());return d}global.Set.symDiff=symmetricDifference,global.Set.cartesian=function(a,b){checkSet(a),checkSet(b);var c=new Set;return a.forEach(function(a){return b.forEach(function(b){return c.add([a,b])})}),c};function addToSubset(a,b){return b.forEach(function(b){return b.add(a)}),b}function subsets(a){if(checkSet(a),0===a.size)return Set.from(a);var b=a.any(),c=Set.difference(a,Set.from(b)),d=subsets(c),e=addToSubset(b,subsets(c));return Set.union(d,e)}function powerSet(a){checkSet(a);var b=subsets(a);return b.add(new Set),a.forEach(function(a){return b.add(Set.from(a))}),b}global.Set.power=powerSet;function mergeRules(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return checkRules(b),function(a){var c=b.some(function(b){return b.call(a)});if(!c)throw new Error("Value [".concat(a,"] does not match any rule of the ruleset."));return!0}}global.Set.mergeRules=mergeRules;function mergeRulesStrict(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return checkRules(b),function(a){var c=b.every(function(b){return b.call(a)});if(!c)throw new Error("Value [".concat(a,"] does not match any rule of the ruleset."));return!0}}global.Set.mergeRulesStrict=mergeRulesStrict,global.Set.__isExtended__=!0;