Skip to content

Instantly share code, notes, and snippets.

@termi
Created March 30, 2014 16:48
Show Gist options
  • Save termi/9875658 to your computer and use it in GitHub Desktop.
Save termi/9875658 to your computer and use it in GitHub Desktop.
github.com/kpdecker/jsdiff infinite loop ?
{"expected":";applyPolyfills$0();(RegExp[\"__polyfill__\"]||function(obj1, obj2){var arr=RegExp[\"__polyfill__\"];if(!arr)arr=RegExp[\"__polyfill__\"]=[];arr.push([obj1,obj2])})({\"N[^1]N\":\"N(?:[^1]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF])N\",\"N[^1-9]N\":\"N(?:[^1-9]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF])N\",\"N[^\\\\s1-9]N\":\"N(?:[^\\\\s1-9]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF])N\",\"N[^\\\\S\\\\t\\\\r]N\":\"N[^\\\\S\\\\t\\\\r]N\",\"N[^\\\\da-z]N\":\"N(?:[^\\\\da-z]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF])N\",\"N[^\\\\D1-3]N\":\"N[^\\\\D1-3]N\",\"N[^\\\\w-]N\":\"N(?:[^\\\\w-]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF])N\",\"N[^\\\\Wa]N\":\"N[^\\\\Wa]N\",\"N[^\\\\s\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA1-9]N\":\"N(?:[^\\\\s1-9]|(?:\\\\uD800[\\\\uDCAB-\\\\uDFFF]|[\\\\uD801-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]))N\",\"N[^\\\\S\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\t\\\\r]N\":\"N[^\\\\S\\\\t\\\\r]N\",\"N[^\\\\d\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAAa-z]N\":\"N(?:[^\\\\da-z]|(?:\\\\uD800[\\\\uDCAB-\\\\uDFFF]|[\\\\uD801-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]))N\",\"N[^\\\\D\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA1-3]N\":\"N[^\\\\D1-3]N\",\"N[^\\\\w\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA-]N\":\"N(?:[^\\\\w-]|(?:\\\\uD800[\\\\uDCAB-\\\\uDFFF]|[\\\\uD801-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]))N\",\"N[^\\\\W\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAAa-]N\":\"N[^\\\\Wa-]N\",\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\":\"C(?:[^a-z]|(?:[\\\\uD800\\\\uD8FF][\\\\uDCAB-\\\\uDFFF]|[\\\\uD801-\\\\uD80E\\\\uD900-\\\\uDA9F\\\\uDAF1-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|\\\\uD80F[\\\\uDC00-\\\\uDCA9]|\\\\uDAA0[\\\\uDC00-\\\\uDFFE]))C\",\"N[^\\\\uD83D\\\\uDCA9-\\\\uD83D\\\\uDCAB]N\":\"N(?:[^]|(?:[\\\\uD800-\\\\uD83C\\\\uD83E-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|\\\\uD83D[\\\\uDC00-\\\\uDCA8\\\\uDCAC-\\\\uDFFF]))N\",\"N([^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA]|[\\\\uD83D\\\\uDCA9-\\\\uD83D\\\\uDCAB])+N\":\"N((?:[^]|(?:\\\\uD800[\\\\uDCAB-\\\\uDFFF]|[\\\\uD801-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]))|(?:\\\\uD83D[\\\\uDCA9-\\\\uDCAB]))+N\"}, {\"!65536|65706\":\"(?:\\\\uD800[\\\\uDCAB-\\\\uDFFF]|[\\\\uD801-\\\\uDBFF][\\\\uDC00-\\\\uDFFF])\",\"!65536|65706!81066|326826!754687|836607\":\"(?:[\\\\uD800\\\\uD8FF][\\\\uDCAB-\\\\uDFFF]|[\\\\uD801-\\\\uD80E\\\\uD900-\\\\uDA9F\\\\uDAF1-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|\\\\uD80F[\\\\uDC00-\\\\uDCA9]|\\\\uDAA0[\\\\uDC00-\\\\uDFFE])\",\"!128169|128171\":\"(?:[\\\\uD800-\\\\uD83C\\\\uD83E-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|\\\\uD83D[\\\\uDC00-\\\\uDCA8\\\\uDCAC-\\\\uDFFF])\",\"128169|128171\":\"\\\\uD83D[\\\\uDCA9-\\\\uDCAB]\"});/* <[tests es6-transpiler options: {\"includePolyfills\":true, \"polyfillsSeparator\":\"\\/* <[tests es6-transpiler test file EOF ]> *\\/\"} ]> */\r\n\r\n// @see http://mathiasbynens.be/notes/javascript-unicode#astral-ranges\r\n// @see https://github.com/google/traceur-compiler/issues/370\r\n\r\n{// ranges without astral symbols and CharacterClassEscape\r\n\tconsole.log(\r\n\t\t(new RegExp(\"N[^1]N\", \"u\")).test('N\\uD83D\\uDCA9N') //N(?:[^1]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, (new RegExp(\"N[^1]N\", \"u\")).test('N9N')\r\n\t\t, (new RegExp(\"N[^1]N\", \"u\")).test('N1N') === false\r\n\t);\r\n\tconsole.log(\r\n\t\t(new RegExp(\"N[^1-9]N\", \"u\")).test('N\\uD83D\\uDCA9N') //N(?:[^1-9]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, (new RegExp(\"N[^1-9]N\", \"u\")).test('NAN')\r\n\t\t, (new RegExp(\"N[^1-9]N\", \"u\")).test('N1N') === false\r\n\t);\r\n}\r\n\r\n{// ranges without astral symbols and with CharacterClassEscape\r\n\tconsole.log(\r\n\t\t(new RegExp(\"N[^\\\\s1-9]N\", \"u\")).test('N\\uD83D\\uDCA9N') //N(?:[^\\s1-9]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, (new RegExp(\"N[^\\\\s1-9]N\", \"u\")).test('N9N') === false\r\n\t\t, (new RegExp(\"N[^\\\\s1-9]N\", \"u\")).test('N N') === false\r\n\t\t, (new RegExp(\"N[^\\\\S\\\\t\\\\r]N\", \"u\")).test('N\\uD83D\\uDCA9N') === false //N[^\\S\\t\\r]N\r\n\t\t, (new RegExp(\"N[^\\\\S\\\\t\\\\r]N\", \"u\")).test('N\\tN') === false\r\n\t\t, (new RegExp(\"N[^\\\\S\\\\t\\\\r]N\", \"u\")).test('N\\rN') === false\r\n\t\t, (new RegExp(\"N[^\\\\S\\\\t\\\\r]N\", \"u\")).test('N N')\r\n\t);\r\n\tconsole.log(\r\n\t\t(new RegExp(\"N[^\\\\da-z]N\", \"u\")).test('N\\uD83D\\uDCA9N') //N(?:[^\\da-z]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, (new RegExp(\"N[^\\\\da-z]N\", \"u\")).test('N9N') === false\r\n\t\t, (new RegExp(\"N[^\\\\da-z]N\", \"u\")).test('NaN') === false\r\n\t\t, (new RegExp(\"N[^\\\\D1-3]N\", \"u\")).test('N\\uD83D\\uDCA9N') === false//N[^\\D1-3]N\r\n\t\t, (new RegExp(\"N[^\\\\D1-3]N\", \"u\")).test('N9N')\r\n\t\t, (new RegExp(\"N[^\\\\D1-3]N\", \"u\")).test('N3N') === false\r\n\t);\r\n\tconsole.log(\r\n\t\t(new RegExp(\"N[^\\\\w-]N\", \"u\")).test('N\\uD83D\\uDCA9N') //N(?:[^\\w-]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, (new RegExp(\"N[^\\\\w-]N\", \"u\")).test('N-N') === false\r\n\t\t, (new RegExp(\"N[^\\\\w-]N\", \"u\")).test('NaN') === false\r\n\t\t, (new RegExp(\"N[^\\\\Wa]N\", \"u\")).test('N\\uD83D\\uDCA9N') === false //N[^\\Wa]N\r\n\t\t, (new RegExp(\"N[^\\\\Wa]N\", \"u\")).test('NbN')\r\n\t\t, (new RegExp(\"N[^\\\\Wa]N\", \"u\")).test('NaN') === false\r\n\t);\r\n}\r\n\r\n{// ranges with astral symbols and CharacterClassEscape\r\n\t// /N[^\\s\\uD800\\uDC00-\\uD800\\uDCAA1-9]N/u\r\n\t// regenerate().addRange(0xFFFF+1, 0x10FFFF).removeRange('\\uD800\\uDC00', '\\uD800\\uDCAA')\r\n\t// //N(?:[^\\s1-9]|\\uD800[\\uDCAB-\\uDFFF]|[\\uD801-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\r\n\tconsole.log(\r\n\t\t(new RegExp(\"N[^\\\\s\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA1-9]N\", \"u\")).test('N\\uD83D\\uDCA9N') //N(?:[^\\s1-9]|\\uD800[\\uDCAB-\\uDFFF]|[\\uD801-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, (new RegExp(\"N[^\\\\s\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA1-9]N\", \"u\")).test('N\\uD800\\uDC01N') === false\r\n\t\t, (new RegExp(\"N[^\\\\s\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA1-9]N\", \"u\")).test('N9N') === false\r\n\t\t, (new RegExp(\"N[^\\\\s\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA1-9]N\", \"u\")).test('N N') === false\r\n\t\t, (new RegExp(\"N[^\\\\S\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\t\\\\r]N\", \"u\")).test('N\\uD83D\\uDCA9N') === false //N[^\\S\\t\\r]N\r\n\t\t, (new RegExp(\"N[^\\\\S\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\t\\\\r]N\", \"u\")).test('N\\tN') === false\r\n\t\t, (new RegExp(\"N[^\\\\S\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\t\\\\r]N\", \"u\")).test('N\\rN') === false\r\n\t\t, (new RegExp(\"N[^\\\\S\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\t\\\\r]N\", \"u\")).test('N N')\r\n\t);\r\n\tconsole.log(\r\n\t\t(new RegExp(\"N[^\\\\d\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAAa-z]N\", \"u\")).test('N\\uD83D\\uDCA9N') //N(?:[^\\da-z]|\\uD800[\\uDCAB-\\uDFFF]|[\\uD801-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, (new RegExp(\"N[^\\\\d\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAAa-z]N\", \"u\")).test('N\\uD800\\uDC01N') === false\r\n\t\t, (new RegExp(\"N[^\\\\d\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAAa-z]N\", \"u\")).test('N9N') === false\r\n\t\t, (new RegExp(\"N[^\\\\d\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAAa-z]N\", \"u\")).test('NaN') === false\r\n\t\t, (new RegExp(\"N[^\\\\D\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA1-3]N\", \"u\")).test('N\\uD83D\\uDCA9N') === false//N[^\\D1-3]N\r\n\t\t, (new RegExp(\"N[^\\\\D\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA1-3]N\", \"u\")).test('N9N')\r\n\t\t, (new RegExp(\"N[^\\\\D\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA1-3]N\", \"u\")).test('N3N') === false\r\n\t);\r\n\tconsole.log(\r\n\t\t(new RegExp(\"N[^\\\\w\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA-]N\", \"u\")).test('N\\uD83D\\uDCA9N') //N(?:[^\\w-]|\\uD800[\\uDCAB-\\uDFFF]|[\\uD801-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, (new RegExp(\"N[^\\\\w\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA-]N\", \"u\")).test('N\\uD800\\uDC01N') === false\r\n\t\t, (new RegExp(\"N[^\\\\w\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA-]N\", \"u\")).test('N-N') === false\r\n\t\t, (new RegExp(\"N[^\\\\w\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA-]N\", \"u\")).test('NaN') === false\r\n\t\t, (new RegExp(\"N[^\\\\W\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAAa-]N\", \"u\")).test('N\\uD83D\\uDCA9N') === false //N[^\\Wa]N\r\n\t\t, (new RegExp(\"N[^\\\\W\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAAa-]N\", \"u\")).test('NbN')\r\n\t\t, (new RegExp(\"N[^\\\\W\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAAa-]N\", \"u\")).test('NaN') === false\r\n\t);\r\n}\r\n\r\n{// complex\r\n\tconsole.log(\r\n\t\t(new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('CfC') === false\r\n\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uD800\\uDC00C') === false//first\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uD800\\uDC0AC') === false//middle\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uD800\\uDCAAC') === false//last\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uFFFFC') //first - 1\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uD800\\uDCABC') //last + 1\r\n\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uD80F\\uDCAAC') === false//first\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uD8F0\\uDCAAC') === false//middle\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uD8FF\\uDCAAC') === false//last\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uD80F\\uDCA9C') //first - 1\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uD8FF\\uDCABC') //last + 1\r\n\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uDAA0\\uDFFFC') === false//first\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uDAE0\\uDC00C') === false//middle\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uDAF0\\uDFFFC') === false//last\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uDAA0\\uDFFEC') //first - 1\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uDAF2\\uDC00C') //last + 1\r\n\r\n\t\t, (new RegExp(\"C[^\\\\uD800\\\\uDC00-\\\\uD800\\\\uDCAA\\\\uD80F\\\\uDCAA-\\\\uD8FF\\\\uDCAA\\\\uDAA0\\\\uDFFF-\\\\uDAF0\\\\uDFFFa-z]C\", \"u\")).test('C\\uDAFC\\uDFFFC')\r\n\t);\r\n}\r\n\r\n{// negative\r\n\t{\r\n\t\tvar re = (new RegExp(\"N[^\\\\uD83D\\\\uDCA9-\\\\uD83D\\\\uDCAB]N\", \"u\"));\r\n\t\tconsole.log(\r\n\t\t\tre.test('N\\uD83D\\uDCA9N') === false\r\n\t\t\t, re.test('NCN')\r\n\t\t);\r\n\t}\r\n//\t{// TODO:: and or\r\n//\t\tlet re = /N([^\\uD800\\uDC00-\\uD800\\uDCAA]|[\\uD83D\\uDCA9-\\uD83D\\uDCAB])+N/u;\r\n//\t\tconsole.log(\r\n//\t\t\tre.test('N\\uD83D\\uDCA9\\uD800\\uDC01abcN') === false\r\n//\t\t\t, re.test('NCN')\r\n//\t\t);\r\n//\t}\r\n}\r\nfunction applyPolyfills$0(){\"use strict\";\r\n//(function(){\"use strict\";\r\n\r\nvar regExp_flag_u_support = false\r\n\t, regExp_flag_y_support = false\r\n;\r\n\r\ntry {\r\n\t(new RegExp(\"1\", \"u\")).test(\"1\");\r\n\tregExp_flag_u_support = true;\r\n}\r\ncatch(e){}\r\n\r\ntry {\r\n\t(new RegExp(\"1\", \"y\")).test(\"1\");\r\n\tregExp_flag_y_support = true;\r\n}\r\ncatch(e){}\r\n\r\nvar getES6unicodeRangeConverter = function () {\r\n\t/*! This converter is based on http://mths.be/regenerate v0.5.4 by @mathias | MIT license */\r\n\r\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\r\n\r\n\tvar append = function(object, key, value) {\r\n\t\tif (hasOwnProperty.call(object, key)) {\r\n\t\t\tobject[key].push(value);\r\n\t\t} else {\r\n\t\t\tobject[key] = [value];\r\n\t\t}\r\n\t};\r\n\r\n\tvar sortUniqueNumbers = function(array) {\r\n\t\t// Sort numerically in ascending order\r\n\t\tarray = array.sort(function(a, b) {\r\n\t\t\treturn a - b;\r\n\t\t});\r\n\t\t// Remove duplicates\r\n\t\tvar previous;\r\n\t\tvar result = [];\r\n\t\tarray.forEach(function(item, index) {\r\n\t\t\tif (previous != item) {\r\n\t\t\t\tresult.push(item);\r\n\t\t\t\tprevious = item;\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn result;\r\n\t};\r\n\r\n\t// This assumes that `number` is a positive integer that `toString()`s nicely\r\n\t// (which is the case for all code point values).\r\n\tvar zeroes = '0000';\r\n\tvar pad = function(number, totalCharacters) {\r\n\t\tvar string = String(number);\r\n\t\treturn string.length < totalCharacters\r\n\t\t\t? (zeroes + string).slice(-totalCharacters)\r\n\t\t\t: string;\r\n\t};\r\n\r\n\t/*--------------------------------------------------------------------------*/\r\n\r\n\tvar range = function(start, stop) {\r\n\t\t// inclusive, e.g. `range(1, 3)` → `[1, 2, 3]`\r\n\t\tif (stop < start) {\r\n\t\t\tthrow Error('A range\\u2019s `stop` value must be greater than or equal ' +\r\n\t\t\t\t'to the `start` value.');\r\n\t\t}\r\n\t\tfor (var result = []; start <= stop; result.push(start++));\r\n\t\treturn result;\r\n\t};\r\n\r\n\t/*--------------------------------------------------------------------------*/\r\n\r\n\t// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\r\n\tvar floor = Math.floor;\r\n\tvar stringFromCharCode = String.fromCharCode;\r\n\tvar codePointToString = function(codePoint) {\r\n\t\tvar string;\r\n\t\tif (\r\n\t\t\t(codePoint >= 0x41 && codePoint <= 0x5A) ||\r\n\t\t\t\t(codePoint >= 0x61 && codePoint <= 0x7A) ||\r\n\t\t\t\t(codePoint >= 0x30 && codePoint <= 0x39)\r\n\t\t\t) {\r\n\t\t\t// [a-zA-Z0-9]\r\n\t\t\tstring = stringFromCharCode(codePoint);\r\n\t\t} else if (codePoint <= 0xFF) {\r\n\t\t\t// http://mathiasbynens.be/notes/javascript-escapes#hexadecimal\r\n\t\t\tstring = '\\\\x' + pad(Number(codePoint).toString(16).toUpperCase(), 2);\r\n\t\t} else { // if (codePoint <= 0xFFFF)\r\n\t\t\t// http://mathiasbynens.be/notes/javascript-escapes#unicode\r\n\t\t\tstring = '\\\\u' + pad(Number(codePoint).toString(16).toUpperCase(), 4);\r\n\t\t}\r\n\r\n\t\t// There’s no need to account for astral symbols / surrogate pairs here,\r\n\t\t// since `codePointToString` is private and only used for BMP code points.\r\n\t\t// But if that’s what you need, just add an `else` block with this code:\r\n\t\t//\r\n\t\t// string = '\\\\u' + pad(hex(highSurrogate(codePoint)), 4)\r\n\t\t// \t+ '\\\\u' + pad(hex(lowSurrogate(codePoint)), 4);\r\n\r\n\t\treturn string;\r\n\t};\r\n\r\n\tvar createBMPCharacterClasses = function(codePoints) {\r\n\t\tvar tmp = '';\r\n\t\tvar start = codePoints[0];\r\n\t\tvar end = start;\r\n\t\tvar predict = start + 1;\r\n\r\n\t\tcodePoints = codePoints.slice(1);\r\n\r\n\t\tvar counter = 0;\r\n\t\tcodePoints.forEach(function(code) {\r\n\t\t\tif (predict == code) {\r\n\t\t\t\tend = code;\r\n\t\t\t\tpredict = code + 1;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (start == end) {\r\n\t\t\t\ttmp += codePointToString(start);\r\n\t\t\t\tcounter += 1;\r\n\t\t\t} else if (end == start + 1) {\r\n\t\t\t\ttmp += codePointToString(start) + codePointToString(end);\r\n\t\t\t\tcounter += 2;\r\n\t\t\t} else {\r\n\t\t\t\ttmp += codePointToString(start) + '-' + codePointToString(end);\r\n\t\t\t\tcounter += 2;\r\n\t\t\t}\r\n\t\t\tstart = code;\r\n\t\t\tend = code;\r\n\t\t\tpredict = code + 1;\r\n\t\t});\r\n\r\n\t\tif (start == end) {\r\n\t\t\ttmp += codePointToString(start);\r\n\t\t\tcounter += 1;\r\n\t\t} else if (end == start + 1) {\r\n\t\t\ttmp += codePointToString(start) + codePointToString(end);\r\n\t\t\tcounter += 2;\r\n\t\t} else {\r\n\t\t\ttmp += codePointToString(start) + '-' + codePointToString(end);\r\n\t\t\tcounter += 2;\r\n\t\t}\r\n\r\n\t\tif (counter == 1) {\r\n\t\t\treturn tmp;\r\n\t\t} else {\r\n\t\t\treturn '[' + tmp + ']';\r\n\t\t}\r\n\t};\r\n\r\n\t// In Regenerate output, `\\0` will never be preceded by `\\` because we sort\r\n\t// by code point value, so let’s keep this regular expression simple:\r\n\tvar regexNull = /\\\\x00([^0123456789]|$)/g;\r\n\tvar createCharacterClasses = function(codePoints) {\r\n\t\t// At this point, it’s safe to assume `codePoints` is a sorted array of\r\n\t\t// numeric code point values.\r\n\t\tvar bmp = [];\r\n\t\tvar astralMap = {};\r\n\t\tvar surrogates = [];\r\n\t\tvar hasAstral = false;\r\n\r\n\t\tcodePoints.forEach(function(codePoint) {\r\n\t\t\tif (codePoint >= 0xD800 && codePoint <= 0xDBFF) {\r\n\t\t\t\t// If a high surrogate is followed by a low surrogate, the two code\r\n\t\t\t\t// units should be matched together, so that the regex always matches a\r\n\t\t\t\t// full code point. For this reason, separate code points that are\r\n\t\t\t\t// (unmatched) high surrogates are tracked separately, so they can be\r\n\t\t\t\t// moved to the end if astral symbols are to be matched as well.\r\n\t\t\t\tsurrogates.push(codePoint);\r\n\t\t\t} else if (codePoint >= 0x0000 && codePoint <= 0xFFFF) {\r\n\t\t\t\t// non-surrogate BMP code point\r\n\t\t\t\tbmp.push(codePoint);\r\n\t\t\t} else if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {\r\n\t\t\t\t// astral code point\r\n\t\t\t\thasAstral = true;\r\n\t\t\t\tappend(\r\n\t\t\t\t\tastralMap,\r\n\t\t\t\t\tparseInt(floor((codePoint - 0x10000) / 0x400) + 0xD800, 10),//high surrogate value\r\n\t\t\t\t\tparseInt((codePoint - 0x10000) % 0x400 + 0xDC00, 10)//low surrogate value\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tthrow RangeError('Invalid code point value. Code points range from ' +\r\n\t\t\t\t\t'U+000000 to U+10FFFF.');\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tvar astralMapByLowRanges = {};\r\n\r\n\t\tfor (var highSurrogateValue in astralMap) if (hasOwnProperty.call(astralMap, highSurrogateValue)) {\r\n\t\t\tappend(astralMapByLowRanges, createBMPCharacterClasses(astralMap[highSurrogateValue]), +highSurrogateValue);\r\n\t\t}\r\n\r\n\t\tvar tmp = [];\r\n\t\t// If we’re not dealing with any astral symbols, there’s no need to move\r\n\t\t// individual code points that are high surrogates to the end of the regex.\r\n\t\tif (!hasAstral && surrogates.length) {\r\n\t\t\tbmp = sortUniqueNumbers(bmp.concat(surrogates));\r\n\t\t}\r\n\t\tif (bmp.length) {\r\n\t\t\ttmp.push(createBMPCharacterClasses(bmp));\r\n\t\t}\r\n\t\tfor (var lowSurrogateValue in astralMapByLowRanges) if (hasOwnProperty.call(astralMapByLowRanges, lowSurrogateValue)) {\r\n\t\t\ttmp.push(createBMPCharacterClasses(astralMapByLowRanges[lowSurrogateValue]) + lowSurrogateValue);\r\n\t\t}\r\n\t\t// Individual code points that are high surrogates must go at the end\r\n\t\t// if astral symbols are to be matched as well.\r\n\t\tif (hasAstral && surrogates.length) {\r\n\t\t\ttmp.push(createBMPCharacterClasses(surrogates));\r\n\t\t}\r\n\t\treturn tmp\r\n\t\t\t.join('|')\r\n\t\t\t// Use `\\0` instead of `\\x00` where possible\r\n\t\t\t.replace(regexNull, '\\\\0$1');\r\n\t};\r\n\r\n\r\n\r\n\treturn function fromCodePointRange(start, end) {\r\n\t\treturn createCharacterClasses(range(start, end));\r\n\t};\r\n}\r\n\r\nif( !regExp_flag_u_support || !regExp_flag_y_support ) {\r\n\tvar $RegExp = RegExp\r\n\t\t, global = (new Function(\"return this\"))()\r\n\t\t, convertUnicodeSequenceToES5Compatible\r\n\t\t, convertUnicodeSequenceToES5Compatible_failed\r\n\t\t, convertUnicodeSequenceToES5Compatible_Map\r\n\t\t, codePointsToES5Range_Map\r\n\t\t, has__getter__support = (function(){\r\n\t\t\ttry {\r\n\t\t\t\tvar random = Math.random();\r\n\t\t\t\tvar propName = \"sentinel\";\r\n\t\t\t\tvar obj = Object.defineProperty({}, propName, {\"get\": function(){ return random }});\r\n\t\t\t\treturn obj[propName] == random;\r\n\t\t\t}\r\n\t\t\tcatch (e){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t})()\r\n\t\t, updateGlobalRegExpProperties\r\n\t\t, globalString_prototype = global[\"String\"].prototype\r\n\t\t, $string_replace = globalString_prototype.replace\r\n\t\t, unescapeUnicode\r\n\t;\r\n\r\n\tvar beforeRegExpCreate = function(pattern, has_u_flag, has_y_flag) {\r\n\t\tif( has_u_flag ) {\r\n\t\t\tvar newPattern = convertUnicodeSequenceToES5Compatible_Map[pattern];\r\n\t\t\tif ( newPattern === void 0 ) {\r\n\t\t\t\tnewPattern = convertUnicodeSequenceToES5Compatible(pattern);\r\n\t\t\t\tif ( convertUnicodeSequenceToES5Compatible_failed === true ) {\r\n\t\t\t\t\tconvertUnicodeSequenceToES5Compatible_Map[pattern] = false;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tpattern = convertUnicodeSequenceToES5Compatible_Map[pattern] = newPattern;\r\n\r\n\t\t\t\t\tconvertUnicodeSequenceToES5Compatible_Map[newPattern] = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if ( newPattern === true || newPattern === false ) {\r\n\t\t\t\t// true - nothing to convert\r\n\t\t\t\t// false - can't convert\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tpattern = newPattern;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( has_y_flag ) {\r\n\t\t\tvar lineStartIndex = pattern.indexOf(\"^\");\r\n\t\t\tif( lineStartIndex === -1 || (pattern[lineStartIndex - 1] === \"\\\\\") ) {\r\n\t\t\t\tpattern = \"^\" + pattern;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn pattern;\r\n\t};\r\n\r\n\tvar afterRegExpCreate = function(re, originalPattern, has_u_flag, has_y_flag) {\r\n\t\tif( originalPattern !== void 0 ) {\r\n\t\t\tObject.defineProperty(re, \"__pattern__\", {\"value\": originalPattern});\r\n\t\t}\r\n\r\n\t\tif( !regExp_flag_u_support ) {\r\n\t\t\tObject.defineProperty(re, \"unicode\", {\"value\": has_u_flag, \"configurable\": true});\r\n\t\t}\r\n\r\n\t\tif( !regExp_flag_y_support ) {\r\n\t\t\tObject.defineProperty(re, \"sticky\", {\"value\": has_y_flag, \"configurable\": true});\r\n\t\t}\r\n\t};\r\n\r\n\tvar extendedRegExp = function RegExp(pattern, flags) {\r\n\t\tvar has_u_flag = false, originalPattern;\r\n\t\tvar has_y_flag = false;\r\n\r\n\t\tif( flags ) {\r\n\t\t\tpattern = String(pattern);\r\n\r\n\t\t\toriginalPattern = pattern;\r\n\r\n\t\t\tflags = String(flags);\r\n\t\t\thas_u_flag = !regExp_flag_u_support && flags.indexOf(\"u\") !== -1;\r\n\t\t\thas_y_flag = !regExp_flag_y_support && flags.indexOf(\"y\") !== -1;\r\n\r\n\t\t\tconvertUnicodeSequenceToES5Compatible_failed = false;\r\n\t\t\tpattern = beforeRegExpCreate(pattern, has_u_flag, has_y_flag);\r\n\r\n\t\t\tif ( convertUnicodeSequenceToES5Compatible_failed === true ) {\r\n\t\t\t\t// something goes wrong and we were not able to modify the es6 Unicode sequence -> do not touch patten and flags\r\n\t\t\t\tflags = $string_replace.call(flags, \"y\", \"\");\r\n\t\t\t\tpattern = originalPattern;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tflags = $string_replace.call($string_replace.call(flags, \"u\", \"\"), \"y\", \"\");\r\n\t\t\t}\r\n\r\n\t\t\tif ( pattern == originalPattern ) {\r\n\t\t\t\toriginalPattern = void 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar re = new $RegExp(pattern, flags);// new RegExp object\r\n\r\n\t\tif( has_u_flag || has_y_flag ) {\r\n\t\t\tafterRegExpCreate(re, originalPattern, has_u_flag, has_y_flag);\r\n\t\t}\r\n\r\n\t\treturn re;\r\n\t};\r\n\textendedRegExp.prototype = $RegExp.prototype;\r\n\tglobal[\"RegExp\"] = extendedRegExp;\r\n\r\n\tvar $compile = extendedRegExp.prototype[\"compile\"];\r\n\tif ( typeof $compile === 'function' ) {\r\n\t\textendedRegExp.prototype[\"compile\"] = function(pattern, flags) {\r\n\t\t\tvar has_u_flag = false, originalPattern;\r\n\t\t\tvar has_y_flag = false;\r\n\r\n\t\t\tif( flags ) {\r\n\t\t\t\tflags = String(flags);\r\n\t\t\t\toriginalPattern = pattern = String(pattern)\r\n\t\t\t\thas_u_flag = !regExp_flag_u_support && flags.indexOf(\"u\") !== -1;\r\n\t\t\t\thas_y_flag = !regExp_flag_y_support && flags.indexOf(\"y\") !== -1;\r\n\r\n\t\t\t\tconvertUnicodeSequenceToES5Compatible_failed = false;\r\n\t\t\t\tpattern = beforeRegExpCreate(pattern, has_u_flag, has_y_flag);\r\n\r\n\t\t\t\tif ( convertUnicodeSequenceToES5Compatible_failed === true ) {\r\n\t\t\t\t\t// something goes wrong and we were not able to modify the es6 Unicode sequence -> do not touch patten\r\n\t\t\t\t\tpattern = originalPattern;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tflags = $string_replace.call($string_replace.call(flags, \"u\", \"\"), \"y\", \"\");\r\n\r\n\t\t\t\tif ( pattern == originalPattern ) {\r\n\t\t\t\t\toriginalPattern = void 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar re = $compile.apply(this, arguments);\r\n\r\n\t\t\tif( flags ) {\r\n\t\t\t\tafterRegExpCreate(re, originalPattern, has_u_flag, has_y_flag);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\tif ( !regExp_flag_u_support ) {\r\n\t\t// TODO:: require('lib/unescapeUnicode')\r\n\t\tunescapeUnicode = function(escapedString) {\r\n\t\t\treturn escapedString.replace(/\\\\u(\\w{4})/g, function(found, charCode, offset, string) {\r\n\t\t\t\tvar prev1 = string[offset - 1], prev2 = string[offset - 2];\r\n\t\t\t\tif ( prev1 === '\\\\' && prev2 !== '\\\\' ) {\r\n\t\t\t\t\treturn found;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn String.fromCharCode(parseInt(charCode, 16));\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\textendedRegExp[\"__polyfill__\"] = function(convertUnicodeSequence_Map, codePointsRange_Map) {\r\n\t\t\tif ( convertUnicodeSequence_Map && typeof convertUnicodeSequence_Map === 'object' ) {\r\n\t\t\t\tif ( !convertUnicodeSequenceToES5Compatible_Map ) {\r\n\t\t\t\t\tconvertUnicodeSequenceToES5Compatible_Map = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor( var key in convertUnicodeSequence_Map ) if ( convertUnicodeSequence_Map.hasOwnProperty(key) ) {\r\n\t\t\t\t\tvar newPattern = convertUnicodeSequenceToES5Compatible_Map[key] = convertUnicodeSequence_Map[key];\r\n\t\t\t\t\tvar unescapedKey = unescapeUnicode(key);\r\n\t\t\t\t\tif ( key !== unescapedKey ) {\r\n\t\t\t\t\t\tconvertUnicodeSequenceToES5Compatible_Map[unescapedKey] = newPattern;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( typeof newPattern === 'string' ) {\r\n\t\t\t\t\t\tconvertUnicodeSequenceToES5Compatible_Map[newPattern] = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( codePointsRange_Map && typeof codePointsRange_Map === 'object' ) {\r\n\t\t\t\tif ( !codePointsToES5Range_Map ) {\r\n\t\t\t\t\tcodePointsToES5Range_Map = codePointsRange_Map;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfor( var key$0 in codePointsToES5Range_Map ) if ( codePointsToES5Range_Map.hasOwnProperty(key$0) ) {\r\n\t\t\t\t\t\tconvertUnicodeSequenceToES5Compatible_Map[key$0] = codePointsToES5Range_Map[key$0];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif ( \"__polyfill__\" in $RegExp ) {\r\n\t\t\tvar initialData = $RegExp[\"__polyfill__\"];\r\n\t\t\tdelete $RegExp[\"__polyfill__\"];\r\n\r\n\t\t\tif ( Array.isArray(initialData) ) {\r\n\t\t\t\tvar data;\r\n\t\t\t\twhile ( data = initialData.shift() ) {\r\n\t\t\t\t\tif ( Array.isArray(data) ) {\r\n\t\t\t\t\t\textendedRegExp[\"__polyfill__\"](data[0], data[1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif( has__getter__support ) {\r\n\t\tObject.keys($RegExp).forEach(function(key) {\r\n\t\t\tvar desc = Object.getOwnPropertyDescriptor($RegExp, key);\r\n\r\n\t\t\tif( \"value\" in desc ) {\r\n\t\t\t\tdelete desc[\"value\"];\r\n\t\t\t\tdelete desc[\"writable\"];\r\n\t\t\t}\r\n\t\t\tif( key === \"leftContext\" ) {\r\n\t\t\t\tdesc[\"get\"] = function() {\r\n\t\t\t\t\tvar $leftContext = this[\"__leftContext__\"];\r\n\t\t\t\t\treturn $leftContext === void 0 ? $RegExp[\"leftContext\"] : $leftContext;\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tdesc[\"get\"] = function() {\r\n\t\t\t\t\treturn $RegExp[key];\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tdesc[\"set\"] = function(value) {\r\n\t\t\t\t$RegExp[key] = value;\r\n\t\t\t\treturn value;\r\n\t\t\t};\r\n\r\n\t\t\tObject.defineProperty(extendedRegExp, key, desc);\r\n\t\t});\r\n\r\n\t}\r\n\telse {\r\n\t\tvar $RegExp_keys = Object.keys($RegExp ).filter(function(key){ return key !== \"leftContext\"});\r\n\t\tvar len = $RegExp_keys.length;\r\n\t\tupdateGlobalRegExpProperties = function() {\r\n\t\t\tfor( var i = 0 ; i < len ; i++ ) {\r\n\t\t\t\tvar key = $RegExp_keys[i];\r\n\t\t\t\textendedRegExp[key] = $RegExp[key];\r\n\t\t\t}\r\n\t\t\tvar $leftContext = extendedRegExp[\"__leftContext__\"];\r\n\t\t\textendedRegExp[\"leftContext\"] = $leftContext === void 0 ? $RegExp[\"leftContext\"] : $leftContext;\r\n\t\t};\r\n\t\tupdateGlobalRegExpProperties();\r\n\t}\r\n\tif ( !regExp_flag_y_support )Object.defineProperty(extendedRegExp, \"sticky\", {\"value\": false, \"enumerable\": true});\r\n\tif ( !regExp_flag_u_support )Object.defineProperty(extendedRegExp, \"unicode\", {\"value\": false, \"enumerable\": true});\r\n\r\n\t{\r\n\t\tvar $toString = extendedRegExp.prototype.toString;\r\n\t\tvar newToString = function toString() {\r\n\t\t\tvar result = $toString.apply(this, arguments);\r\n\r\n\t\t\tif( !regExp_flag_y_support || !regExp_flag_u_support ) {\r\n\t\t\t\tvar originalPattern = this[\"__pattern__\"];\r\n\r\n\t\t\t\tif( originalPattern !== void 0 ) {\r\n\t\t\t\t\tresult = \"/\" + originalPattern + \"/\"\r\n\t\t\t\t\t\t+ (this.global ? \"g\" : \"\") + (this.ignoreCase ? \"i\" : \"\") + (this.multiline ? \"m\" : \"\") + (this[\"sticky\"] ? \"y\" : \"\") + (this[\"unicode\"] ? \"u\" : \"\")\r\n\t\t\t\t\t;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif( this[\"sticky\"] ) {\r\n\t\t\t\t\t\tresult += \"y\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif( this[\"unicode\"] ) {\r\n\t\t\t\t\t\tresult += \"u\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t};\r\n\r\n\t\tvar newProps = {\r\n\t\t\t\"sticky\": {\"value\": false, \"configurable\": true, \"writable\": true}\r\n\t\t\t, \"unicode\": {\"value\": false, \"configurable\": true, \"writable\": true}\r\n\t\t\t, \"toString\": {\"value\": newToString, \"configurable\": true, \"writable\": true}\r\n\t\t};\r\n\r\n\t\tif( regExp_flag_y_support ) {\r\n\t\t\tdelete newProps[\"sticky\"];\r\n\t\t}\r\n\r\n\t\tif( regExp_flag_u_support ) {\r\n\t\t\tdelete newProps[\"unicode\"];\r\n\t\t}\r\n\t\telse {\r\n\t\t\tvar zeroCodePoint = function(string) {\r\n\t\t\t\tvar size = string.length;\r\n\t\t\t\tvar first = string.charCodeAt(0);\r\n\t\t\t\tvar second;\r\n\t\t\t\tif (first >= 0xD800 && first <= 0xDBFF && size > 1) {\r\n\t\t\t\t\tsecond = string.charCodeAt(1);\r\n\t\t\t\t\tif (second >= 0xDC00 && second <= 0xDFFF) {\r\n\t\t\t\t\t\treturn (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif ( size > 1 ) {\r\n//\t\t\t\t\tthrow new Error('Invalid unicode range');\r\n\t\t\t\t\treturn false;//not supported\r\n\t\t\t\t}\r\n\t\t\t\treturn first;\r\n\t\t\t};\r\n\t\t\tvar es6unicodeRangeConverter = getES6unicodeRangeConverter();\r\n\t\t\tgetES6unicodeRangeConverter = void 0;\r\n\r\n\t\t\tvar unicodeRange = function(str, code11, code12, char1, code21, code22, char2) {\r\n\t\t\t\t// TODO:: [\\x01-\\uD7FF\\uDC00-\\uFFFF], [a-b-c-e] support\r\n\t\t\t\tif ( code11 ) {\r\n\t\t\t\t\tcode11 = parseInt(code11, 16);\r\n\t\t\t\t\tif ( code12 ) {\r\n\t\t\t\t\t\tchar1 = String.fromCharCode(code11, parseInt(code12, 16));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tchar1 = String.fromCharCode(code11);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar codePoint1 = zeroCodePoint(char1);\r\n\t\t\t\tif ( codePoint1 === false ) {\r\n\t\t\t\t\tconvertUnicodeSequenceToES5Compatible_failed = true;\r\n\t\t\t\t\treturn str;//not supported\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( code21 ) {\r\n\t\t\t\t\tcode21 = parseInt(code21, 16);\r\n\t\t\t\t\tif ( code22 ) {\r\n\t\t\t\t\t\tchar2 = String.fromCharCode(code21, parseInt(code22, 16));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tchar2 = String.fromCharCode(code21);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar codePoint2 = zeroCodePoint(char2);\r\n\t\t\t\tif ( codePoint2 === false ) {\r\n\t\t\t\t\tconvertUnicodeSequenceToES5Compatible_failed = true;\r\n\t\t\t\t\treturn str;//not supported\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar key = codePoint1 + '|' + codePoint2;\r\n\t\t\t\tvar result = codePointsToES5Range_Map[key];\r\n\r\n\t\t\t\tif ( result === void 0 ) {\r\n\t\t\t\t\tresult = es6unicodeRangeConverter(codePoint1, codePoint2);\r\n\r\n\t\t\t\t\tif ( result.indexOf(\"|\") !== -1 ) {\r\n\t\t\t\t\t\tresult = \"(?:\" + result + \")\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcodePointsToES5Range_Map[key] = result;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn result;\r\n\t\t\t};\r\n\r\n\t\t\tvar findCodePoint_RE = new RegExp('\\\\[' +\r\n\t\t\t\t'(?:' +\r\n\t\t\t\t\t'(?:(?:\\\\\\\\u(\\\\w{4}))(?:\\\\\\\\u(\\\\w{4}))?)' +\r\n//\t\t\t\t\t'|((?:[\\\\0-\\\\u005A\\\\u005C\\\\u005F-\\\\uD7FF\\\\uDC00-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF])+?)' +\r\n\t\t\t\t\t'|((?:[\\\\0-\\\\uD7FF\\\\uDC00-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF])+?)' +\r\n\t\t\t\t')' +\r\n\t\t\t\t'\\\\-' +\r\n\t\t\t\t'(?:' +\r\n\t\t\t\t\t'(?:(?:\\\\\\\\u(\\\\w{4}))(?:\\\\\\\\u(\\\\w{4}))?)' +\r\n//\t\t\t\t\t'|((?:[\\\\0-\\\\u005A\\\\u005C\\\\u005F-\\\\uD7FF\\\\uDC00-\\\\uFFFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF]|[\\\\uD800-\\\\uDBFF])+?)' +\r\n\t\t\t\t\t'|((?:[\\\\0-\\\\uD7FF\\\\uDC00-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF])+?)' +\r\n\t\t\t\t')' +\r\n\t\t\t'\\\\]', 'g');\r\n\r\n\t\t\tconvertUnicodeSequenceToES5Compatible = function(pattern) {\r\n\t\t\t\t// TODO:: /foo.bar/u -> /foo(?:\\s|[\\0-\\uD7FF\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF])bar/u\r\n\t\t\t\t// TODO:: /foo\\Sbar/u -> /foo(?:[\\0-\\uD7FF\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF])bar/u\r\n\t\t\t\t// TODO:: /foo[\\s\\S]bar/u -> /foo[\\s]|(?:[\\0-\\uD7FF\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF])bar/u\r\n\r\n\t\t\t\treturn $string_replace.call(pattern, findCodePoint_RE, unicodeRange);\r\n\t\t\t};\r\n\t\t\tif ( !convertUnicodeSequenceToES5Compatible_Map ) {\r\n\t\t\t\tconvertUnicodeSequenceToES5Compatible_Map = {};\r\n\t\t\t}\r\n\t\t\tif ( !codePointsToES5Range_Map ) {\r\n\t\t\t\tcodePointsToES5Range_Map = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tObject.defineProperties(extendedRegExp.prototype, newProps);\r\n\t}\r\n\r\n\tif( !regExp_flag_y_support ) {\r\n\t\tvar $exec = extendedRegExp.prototype.exec;\r\n\t\textendedRegExp.prototype.exec = function(string) {\r\n\t\t\textendedRegExp[\"__leftContext__\"] = void 0;\r\n\r\n\t\t\tvar sticky = this[\"sticky\"]\r\n\t\t\t\t, _global\r\n\t\t\t\t, lastIndex\r\n\t\t\t\t, leftContext\r\n\t\t\t;\r\n\r\n\t\t\tif( sticky ) {\r\n\t\t\t\tlastIndex = this.lastIndex;\r\n\t\t\t\t_global = this[\"global\"];\r\n\r\n\t\t\t\tif( lastIndex != 0 ) {\r\n\t\t\t\t\tif( _global ) {\r\n\t\t\t\t\t\tthis.lastIndex = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tleftContext = string.substring(0, lastIndex);\r\n\t\t\t\t\targuments[0] = String(string).substr(lastIndex);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar result = $exec.apply(this, arguments);\r\n\r\n\t\t\tif( sticky ) {\r\n\t\t\t\tthis.lastIndex = result == null ? 0 : lastIndex + (_global ? this.lastIndex : result[0].length);\r\n\t\t\t\textendedRegExp[\"__leftContext__\"] = leftContext !== void 0 && result != null ? leftContext : void 0;\r\n\t\t\t}\r\n\r\n\t\t\tif ( updateGlobalRegExpProperties !== void 0 )updateGlobalRegExpProperties();\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tvar $test = extendedRegExp.prototype.test;\r\n\t\textendedRegExp.prototype.test = function(string) {\r\n\t\t\textendedRegExp[\"__leftContext__\"] = void 0;\r\n\r\n\t\t\tvar sticky = this[\"sticky\"]\r\n\t\t\t\t, result\r\n\t\t\t;\r\n\r\n\t\t\tif( sticky ) {\r\n\t\t\t\tvar lastIndex = this.lastIndex\r\n\t\t\t\t\t, _global = this[\"global\"]\r\n\t\t\t\t\t, leftContext\r\n\t\t\t\t;\r\n\r\n\t\t\t\tif( lastIndex != 0 ) {\r\n\t\t\t\t\tif( _global ) {\r\n\t\t\t\t\t\tthis.lastIndex = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tleftContext = string.substring(0, lastIndex);\r\n\t\t\t\t\targuments[0] = String(string).substr(lastIndex);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresult = $exec.apply(this, arguments);\r\n\r\n\t\t\t\tthis.lastIndex = result ? lastIndex + (_global ? this.lastIndex : result[0].length) : 0;\r\n\t\t\t\textendedRegExp[\"__leftContext__\"] = leftContext !== void 0 && result != null ? leftContext : void 0;\r\n\r\n\t\t\t\tresult = result != null;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tresult = $test.apply(this, arguments);\r\n\t\t\t}\r\n\r\n\t\t\tif ( updateGlobalRegExpProperties !== void 0 )updateGlobalRegExpProperties();\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tglobalString_prototype.replace = function(pattern, replacer) {\r\n\t\t\t\tvar result;\r\n\t\t\t\tvar patternIsRegExpWithStickyAndGlobalFlag = pattern && typeof pattern === 'object' && pattern instanceof $RegExp && pattern[\"sticky\"] && pattern.global;\r\n\r\n\t\t\t\tif( patternIsRegExpWithStickyAndGlobalFlag ) {\r\n\t\t\t\t\t// String.match and String.replace now reset RegExp.lastIndex\r\n\t\t\t\t\t// [https://bugzilla.mozilla.org/show_bug.cgi?id=501739](Bug 501739 � String match and replace methods do not update global regexp lastIndex per ES3&5)\r\n\t\t\t\t\t// The String.match and String.replace methods have been refactored to resolve a spec conformance issue on RegExp.lastIndex. When those methods are called with a global regular expression, the lastIndex, if specified, will be reset to 0.\r\n\t\t\t\t\tpattern.lastIndex = 0;\r\n\r\n\t\t\t\t\tvar isFunction = typeof replacer === 'function';\r\n\t\t\t\t\tif ( !isFunction ) {\r\n\t\t\t\t\t\treplacer = String(replacer);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar str = this + \"\", execRes\r\n\t\t\t\t\t\t, parts = [], lastIndex = 0\r\n\t\t\t\t\t;\r\n\t\t\t\t\twhile( execRes = pattern.exec(str) ) {\r\n\t\t\t\t\t\tvar found = execRes[0]\r\n\t\t\t\t\t\t\t, args = execRes\r\n\t\t\t\t\t\t\t, end = pattern.lastIndex\r\n\t\t\t\t\t\t;\r\n\r\n//\t\t\t\t\t\tparts.push(str.substring(lastIndex, start));\r\n\r\n\t\t\t\t\t\tif ( isFunction ) {\r\n\t\t\t\t\t\t\targs.push(lastIndex, str);\r\n\t\t\t\t\t\t\tparts.push(replacer.apply(void 0, args));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t// \"12345678987654321\".replace(/4/g, \"($&)\") + \" - \" + \"12345678987654321\".replace(/4/g, \"($`)\") + \" - \" + \"12345678987654321\".replace(/4/g, \"($')\") + \" - \" + \"12345678987654321\".replace(/(4)/g, \"($1)\")\r\n\t\t\t\t\t\t\t// \"123(4)567898765(4)321 - 123(123)567898765(1234567898765)321 - 123(5678987654321)567898765(321)321 - 123(4)567898765(4)321\"\r\n//\t\t\t\t\t\t\t\"$1$$1($')($`)($&)($12)\".replace(/\\$(?:(')|(`)|(\\&)|(\\d(?:\\d)?))/g, function(str, $1, $2, $3, $nn, offset, string){\r\n//\t\t\t\t\t\t\t\tconsole.log(string[offset - 1], str, $1, $2, $3, $nn)\r\n//\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tparts.push(replacer.replace(/\\$(?:(&)|(`)|(')|(\\d(?:\\d)?))/g, function(pattern, $1, $2, $3, $nn, offset, string) {\r\n\t\t\t\t\t\t\t\tif ( string[offset - 1] !== '$' ) {\r\n\t\t\t\t\t\t\t\t\tif ( $1 ) {// $& - Inserts the matched substring.\r\n\t\t\t\t\t\t\t\t\t\treturn found;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif ( $2 ) {// $` - Inserts the portion of the string that precedes the matched substring.\r\n\t\t\t\t\t\t\t\t\t\treturn str.substring(0, lastIndex);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif ( $3 ) {// $' - Inserts the portion of the string that follows the matched substring.\r\n\t\t\t\t\t\t\t\t\t\treturn str.substring(end);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif ( $nn ) {// $n or $nn - Where n or nn are decimal digits, inserts the nth parenthesized submatch string, provided the first argument was a RegExp object.\r\n\t\t\t\t\t\t\t\t\t\t$nn = +$nn;\r\n\t\t\t\t\t\t\t\t\t\tif ( $nn !== 0 && $nn < args.length ) {\r\n\t\t\t\t\t\t\t\t\t\t\treturn args[$nn];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tpattern = pattern.substring(1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\treturn pattern;\r\n\t\t\t\t\t\t\t}));\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tlastIndex = end;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tparts.push(str.substring(lastIndex));\r\n\r\n\t\t\t\t\tresult = parts.join(\"\");\r\n\t\t\t\t\tparts = void 0;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tresult = $string_replace.apply(this, arguments);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( updateGlobalRegExpProperties !== void 0 )updateGlobalRegExpProperties();\r\n\r\n\t\t\t\treturn result;\r\n\t\t\t};\r\n\t\t\tvar $match = globalString_prototype.match;\r\n\t\t\tglobalString_prototype.match = function(pattern) {\r\n\t\t\t\tvar result;\r\n\t\t\t\tvar patternIsRegExpWithStickyFlag = pattern && typeof pattern === 'object' && pattern instanceof $RegExp && pattern[\"sticky\"];\r\n\r\n\t\t\t\tif( patternIsRegExpWithStickyFlag ) {\r\n\t\t\t\t\tif( pattern.global ) {\r\n\t\t\t\t\t\tresult = [];\r\n\t\t\t\t\t\tvar execRes;\r\n\t\t\t\t\t\twhile( execRes = pattern.exec(this) ) {\r\n\t\t\t\t\t\t\tresult.push(execRes[0]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tresult = pattern.exec(this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tresult = $match.apply(this, arguments);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( updateGlobalRegExpProperties !== void 0 )updateGlobalRegExpProperties();\r\n\r\n\t\t\t\treturn result;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//})();\r\n\r\n}\r\n","current":"/* <[tests es6-transpiler options: {\"includePolyfills\":true, \"polyfillsSeparator\":\"\\/* <[tests es6-transpiler test file EOF ]> *\\/\"} ]> */\r\n\r\n// @see http://mathiasbynens.be/notes/javascript-unicode#astral-ranges\r\n// @see https://github.com/google/traceur-compiler/issues/370\r\n\r\n{// ranges without astral symbols and CharacterClassEscape\r\n\tconsole.log(\r\n\t\t/N[^1]N/u.test('N\\uD83D\\uDCA9N') //N(?:[^1]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, /N[^1]N/u.test('N9N')\r\n\t\t, /N[^1]N/u.test('N1N') === false\r\n\t);\r\n\tconsole.log(\r\n\t\t/N[^1-9]N/u.test('N\\uD83D\\uDCA9N') //N(?:[^1-9]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, /N[^1-9]N/u.test('NAN')\r\n\t\t, /N[^1-9]N/u.test('N1N') === false\r\n\t);\r\n}\r\n\r\n{// ranges without astral symbols and with CharacterClassEscape\r\n\tconsole.log(\r\n\t\t/N[^\\s1-9]N/u.test('N\\uD83D\\uDCA9N') //N(?:[^\\s1-9]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, /N[^\\s1-9]N/u.test('N9N') === false\r\n\t\t, /N[^\\s1-9]N/u.test('N N') === false\r\n\t\t, /N[^\\S\\t\\r]N/u.test('N\\uD83D\\uDCA9N') === false //N[^\\S\\t\\r]N\r\n\t\t, /N[^\\S\\t\\r]N/u.test('N\\tN') === false\r\n\t\t, /N[^\\S\\t\\r]N/u.test('N\\rN') === false\r\n\t\t, /N[^\\S\\t\\r]N/u.test('N N')\r\n\t);\r\n\tconsole.log(\r\n\t\t/N[^\\da-z]N/u.test('N\\uD83D\\uDCA9N') //N(?:[^\\da-z]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, /N[^\\da-z]N/u.test('N9N') === false\r\n\t\t, /N[^\\da-z]N/u.test('NaN') === false\r\n\t\t, /N[^\\D1-3]N/u.test('N\\uD83D\\uDCA9N') === false//N[^\\D1-3]N\r\n\t\t, /N[^\\D1-3]N/u.test('N9N')\r\n\t\t, /N[^\\D1-3]N/u.test('N3N') === false\r\n\t);\r\n\tconsole.log(\r\n\t\t/N[^\\w-]N/u.test('N\\uD83D\\uDCA9N') //N(?:[^\\w-]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, /N[^\\w-]N/u.test('N-N') === false\r\n\t\t, /N[^\\w-]N/u.test('NaN') === false\r\n\t\t, /N[^\\Wa]N/u.test('N\\uD83D\\uDCA9N') === false //N[^\\Wa]N\r\n\t\t, /N[^\\Wa]N/u.test('NbN')\r\n\t\t, /N[^\\Wa]N/u.test('NaN') === false\r\n\t);\r\n}\r\n\r\n{// ranges with astral symbols and CharacterClassEscape\r\n\t// /N[^\\s\\uD800\\uDC00-\\uD800\\uDCAA1-9]N/u\r\n\t// regenerate().addRange(0xFFFF+1, 0x10FFFF).removeRange('\\uD800\\uDC00', '\\uD800\\uDCAA')\r\n\t// //N(?:[^\\s1-9]|\\uD800[\\uDCAB-\\uDFFF]|[\\uD801-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\r\n\tconsole.log(\r\n\t\t/N[^\\s\\uD800\\uDC00-\\uD800\\uDCAA1-9]N/u.test('N\\uD83D\\uDCA9N') //N(?:[^\\s1-9]|\\uD800[\\uDCAB-\\uDFFF]|[\\uD801-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, /N[^\\s\\uD800\\uDC00-\\uD800\\uDCAA1-9]N/u.test('N\\uD800\\uDC01N') === false\r\n\t\t, /N[^\\s\\uD800\\uDC00-\\uD800\\uDCAA1-9]N/u.test('N9N') === false\r\n\t\t, /N[^\\s\\uD800\\uDC00-\\uD800\\uDCAA1-9]N/u.test('N N') === false\r\n\t\t, /N[^\\S\\uD800\\uDC00-\\uD800\\uDCAA\\t\\r]N/u.test('N\\uD83D\\uDCA9N') === false //N[^\\S\\t\\r]N\r\n\t\t, /N[^\\S\\uD800\\uDC00-\\uD800\\uDCAA\\t\\r]N/u.test('N\\tN') === false\r\n\t\t, /N[^\\S\\uD800\\uDC00-\\uD800\\uDCAA\\t\\r]N/u.test('N\\rN') === false\r\n\t\t, /N[^\\S\\uD800\\uDC00-\\uD800\\uDCAA\\t\\r]N/u.test('N N')\r\n\t);\r\n\tconsole.log(\r\n\t\t/N[^\\d\\uD800\\uDC00-\\uD800\\uDCAAa-z]N/u.test('N\\uD83D\\uDCA9N') //N(?:[^\\da-z]|\\uD800[\\uDCAB-\\uDFFF]|[\\uD801-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, /N[^\\d\\uD800\\uDC00-\\uD800\\uDCAAa-z]N/u.test('N\\uD800\\uDC01N') === false\r\n\t\t, /N[^\\d\\uD800\\uDC00-\\uD800\\uDCAAa-z]N/u.test('N9N') === false\r\n\t\t, /N[^\\d\\uD800\\uDC00-\\uD800\\uDCAAa-z]N/u.test('NaN') === false\r\n\t\t, /N[^\\D\\uD800\\uDC00-\\uD800\\uDCAA1-3]N/u.test('N\\uD83D\\uDCA9N') === false//N[^\\D1-3]N\r\n\t\t, /N[^\\D\\uD800\\uDC00-\\uD800\\uDCAA1-3]N/u.test('N9N')\r\n\t\t, /N[^\\D\\uD800\\uDC00-\\uD800\\uDCAA1-3]N/u.test('N3N') === false\r\n\t);\r\n\tconsole.log(\r\n\t\t/N[^\\w\\uD800\\uDC00-\\uD800\\uDCAA-]N/u.test('N\\uD83D\\uDCA9N') //N(?:[^\\w-]|\\uD800[\\uDCAB-\\uDFFF]|[\\uD801-\\uDBFF][\\uDC00-\\uDFFF])N\r\n\t\t, /N[^\\w\\uD800\\uDC00-\\uD800\\uDCAA-]N/u.test('N\\uD800\\uDC01N') === false\r\n\t\t, /N[^\\w\\uD800\\uDC00-\\uD800\\uDCAA-]N/u.test('N-N') === false\r\n\t\t, /N[^\\w\\uD800\\uDC00-\\uD800\\uDCAA-]N/u.test('NaN') === false\r\n\t\t, /N[^\\W\\uD800\\uDC00-\\uD800\\uDCAAa-]N/u.test('N\\uD83D\\uDCA9N') === false //N[^\\Wa]N\r\n\t\t, /N[^\\W\\uD800\\uDC00-\\uD800\\uDCAAa-]N/u.test('NbN')\r\n\t\t, /N[^\\W\\uD800\\uDC00-\\uD800\\uDCAAa-]N/u.test('NaN') === false\r\n\t);\r\n}\r\n\r\n{// complex\r\n\tconsole.log(\r\n\t\t/C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('CfC') === false\r\n\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uD800\\uDC00C') === false//first\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uD800\\uDC0AC') === false//middle\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uD800\\uDCAAC') === false//last\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uFFFFC') //first - 1\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uD800\\uDCABC') //last + 1\r\n\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uD80F\\uDCAAC') === false//first\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uD8F0\\uDCAAC') === false//middle\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uD8FF\\uDCAAC') === false//last\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uD80F\\uDCA9C') //first - 1\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uD8FF\\uDCABC') //last + 1\r\n\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uDAA0\\uDFFFC') === false//first\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uDAE0\\uDC00C') === false//middle\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uDAF0\\uDFFFC') === false//last\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uDAA0\\uDFFEC') //first - 1\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uDAF2\\uDC00C') //last + 1\r\n\r\n\t\t, /C[^\\uD800\\uDC00-\\uD800\\uDCAA\\uD80F\\uDCAA-\\uD8FF\\uDCAA\\uDAA0\\uDFFF-\\uDAF0\\uDFFFa-z]C/u.test('C\\uDAFC\\uDFFFC')\r\n\t);\r\n}\r\n\r\n{// negative\r\n\t{\r\n\t\tvar re = /N[^\\uD83D\\uDCA9-\\uD83D\\uDCAB]N/u;\r\n\t\tconsole.log(\r\n\t\t\tre.test('N\\uD83D\\uDCA9N') === false\r\n\t\t\t, re.test('NCN')\r\n\t\t);\r\n\t}\r\n//\t{// TODO:: and or\r\n//\t\tlet re = /N([^\\uD800\\uDC00-\\uD800\\uDCAA]|[\\uD83D\\uDCA9-\\uD83D\\uDCAB])+N/u;\r\n//\t\tconsole.log(\r\n//\t\t\tre.test('N\\uD83D\\uDCA9\\uD800\\uDC01abcN') === false\r\n//\t\t\t, re.test('NCN')\r\n//\t\t);\r\n//\t}\r\n}\r\n","errors":""}
var data = __LOAD_FILE__('data.json');
JsDiff.diffWords(data.expected, data.current);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment