indexeddbshim 17.0.0 → 17.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +62 -0
  2. package/badges/licenses-badge-dev.svg +1 -1
  3. package/badges/licenses-badge.svg +1 -1
  4. package/dist/CFG.d.ts +1 -0
  5. package/dist/CFG.d.ts.map +1 -1
  6. package/dist/DOMException.d.ts.map +1 -1
  7. package/dist/IDBCursor.d.ts +25 -18
  8. package/dist/IDBCursor.d.ts.map +1 -1
  9. package/dist/IDBFactory.d.ts +19 -19
  10. package/dist/IDBFactory.d.ts.map +1 -1
  11. package/dist/IDBIndex.d.ts.map +1 -1
  12. package/dist/IDBKeyRange.d.ts +5 -5
  13. package/dist/IDBKeyRange.d.ts.map +1 -1
  14. package/dist/IDBTransaction.d.ts +24 -3
  15. package/dist/IDBTransaction.d.ts.map +1 -1
  16. package/dist/Key.d.ts +41 -41
  17. package/dist/Key.d.ts.map +1 -1
  18. package/dist/indexeddbshim-Key.js +88 -69
  19. package/dist/indexeddbshim-Key.js.map +1 -1
  20. package/dist/indexeddbshim-Key.min.js +2 -2
  21. package/dist/indexeddbshim-Key.min.js.map +1 -1
  22. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +1682 -1056
  23. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
  24. package/dist/indexeddbshim-UnicodeIdentifiers.js +886 -663
  25. package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
  26. package/dist/indexeddbshim-UnicodeIdentifiers.min.js +4 -4
  27. package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
  28. package/dist/indexeddbshim-node.cjs +1682 -1056
  29. package/dist/indexeddbshim-node.cjs.map +1 -1
  30. package/dist/indexeddbshim-noninvasive.js +886 -663
  31. package/dist/indexeddbshim-noninvasive.js.map +1 -1
  32. package/dist/indexeddbshim-noninvasive.min.js +4 -4
  33. package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
  34. package/dist/indexeddbshim.js +890 -660
  35. package/dist/indexeddbshim.js.map +1 -1
  36. package/dist/indexeddbshim.min.js +4 -4
  37. package/dist/indexeddbshim.min.js.map +1 -1
  38. package/dist/node-UnicodeIdentifiers.d.ts.map +1 -1
  39. package/dist/node.d.ts.map +1 -1
  40. package/dist/nodeSQLiteDatabase.d.ts +65 -0
  41. package/dist/nodeSQLiteDatabase.d.ts.map +1 -0
  42. package/dist/nodeWebSQL.d.ts.map +1 -1
  43. package/dist/util.d.ts +5 -0
  44. package/dist/util.d.ts.map +1 -1
  45. package/package.json +22 -18
  46. package/src/CFG.js +3 -0
  47. package/src/DOMException.js +10 -10
  48. package/src/IDBCursor.js +152 -102
  49. package/src/IDBFactory.js +30 -26
  50. package/src/IDBIndex.js +1 -2
  51. package/src/IDBKeyRange.js +5 -5
  52. package/src/IDBTransaction.js +35 -5
  53. package/src/Key.js +63 -55
  54. package/src/node-UnicodeIdentifiers.js +5 -1
  55. package/src/node.js +5 -1
  56. package/src/nodeSQLiteDatabase.js +174 -0
  57. package/src/nodeWebSQL.js +1 -3
  58. package/src/util.js +62 -3
@@ -1,4 +1,4 @@
1
- /*! indexeddbshim - v17.0.0 - 7/28/2026 */
1
+ /*! indexeddbshim - v17.2.0 - 8/18/2026 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -59,7 +59,7 @@
59
59
  }
60
60
  }
61
61
  function _createClass(e, r, t) {
62
- return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
62
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
63
63
  writable: false
64
64
  }), e;
65
65
  }
@@ -343,12 +343,12 @@
343
343
  }
344
344
  }
345
345
 
346
- var _templateObject, _templateObject2;
346
+ var _templateObject$1, _templateObject2$1;
347
347
  // ID_Start (includes Other_ID_Start)
348
- var UnicodeIDStart = String.raw(_templateObject || (_templateObject = _taggedTemplateLiteral(["(?:[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA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uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\u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u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD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\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F\\uDFE0]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D])"])));
348
+ var UnicodeIDStart = String.raw(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["(?:[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uA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C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D])"], ["(?:[$A-Z_a-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA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\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F\\uDFE0]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D])"])));
349
349
 
350
350
  // ID_Continue (includes Other_ID_Continue)
351
- var UnicodeIDContinue = String.raw(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\u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\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDD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:[$0-9A-Z_a-z\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0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\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3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DD50-\\uDD73\\uDD76\\uDD80-\\uDDC4\\uDDCA-\\uDDCC\\uDDD0-\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE37\\uDE3E\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEEA\\uDEF0-\\uDEF9\\uDF00-\\uDF03\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3C-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF50\\uDF57\\uDF5D-\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC00-\\uDC4A\\uDC50-\\uDC59\\uDC80-\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDB5\\uDDB8-\\uDDC0\\uDDD8-\\uDDDD\\uDE00-\\uDE40\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEB7\\uDEC0-\\uDEC9\\uDF00-\\uDF19\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDCA0-\\uDCE9\\uDCFF\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC36\\uDC38-\\uDC40\\uDC50-\\uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\u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DE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF])"])));
351
+ var UnicodeIDContinue = String.raw(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B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0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A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uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])"], ["(?:[$0-9A-Z_a-z\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0AF9\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\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C8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-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F39\\uDF3C-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF50\\uDF57\\uDF5D-\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC00-\\uDC4A\\uDC50-\\uDC59\\uDC80-\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDB5\\uDDB8-\\uDDC0\\uDDD8-\\uDDDD\\uDE00-\\uDE40\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEB7\\uDEC0-\\uDEC9\\uDF00-\\uDF19\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDCA0-\\uDCE9\\uDCFF\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC36\\uDC38-\\uDC40\\uDC50-\\uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50-\\uDF7E\\uDF8F-\\uDF9F\\uDFE0]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\u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-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF])"])));
352
352
 
353
353
  function _typeof(obj) {
354
354
  "@babel/helpers - typeof";
@@ -1322,6 +1322,7 @@
1322
1322
  * sqlBusyTimeout: number,
1323
1323
  * sqlTrace: () => void,
1324
1324
  * sqlProfile: () => void,
1325
+ * escapeNULForSQLiteStatements: boolean,
1325
1326
  * createIndexes: boolean
1326
1327
  * }} ConfigValues
1327
1328
  */
@@ -1476,8 +1477,8 @@
1476
1477
  // Callback not used by default
1477
1478
  'sqlProfile',
1478
1479
  // Callback not used by default
1479
-
1480
- 'createIndexes'].forEach(function (prop) {
1480
+ // Defaults to true except in Node builds where we can preserve literal NUL with better-sqlite3
1481
+ 'escapeNULForSQLiteStatements', 'createIndexes'].forEach(function (prop) {
1481
1482
  /** @type {(val: any) => void} */
1482
1483
  var validator;
1483
1484
  if (Array.isArray(prop)) {
@@ -1558,7 +1559,8 @@
1558
1559
  * @returns {string}
1559
1560
  */
1560
1561
  function escapeSQLiteStatement(arg) {
1561
- return escapeUnmatchedSurrogates(arg.replaceAll('^', '^^').replaceAll('\0', '^0'));
1562
+ var escaped = arg.replaceAll('^', '^^');
1563
+ return escapeUnmatchedSurrogates(CFG.escapeNULForSQLiteStatements === false ? escaped : escaped.replaceAll('\0', '^0'));
1562
1564
  }
1563
1565
 
1564
1566
  /**
@@ -1566,7 +1568,11 @@
1566
1568
  * @returns {string}
1567
1569
  */
1568
1570
  function unescapeSQLiteResponse(arg) {
1569
- return unescapeUnmatchedSurrogates(arg).replaceAll(/(\^+)0/g, function (_, esc) {
1571
+ var unescaped = unescapeUnmatchedSurrogates(arg);
1572
+ if (CFG.escapeNULForSQLiteStatements === false) {
1573
+ return unescaped.replaceAll('^^', '^');
1574
+ }
1575
+ return unescaped.replaceAll(/(\^+)0/g, function (_, esc) {
1570
1576
  return esc.length % 2 ? esc.slice(1) + '\0' : _;
1571
1577
  }).replaceAll('^^', '^');
1572
1578
  }
@@ -1967,6 +1973,56 @@
1967
1973
  return v === null || v === undefined;
1968
1974
  }
1969
1975
 
1976
+ /**
1977
+ * Cursor/request continuation chains can call each other synchronously
1978
+ * (e.g. walking a large prefetched buffer, or advancing many interleaved
1979
+ * cursors in one transaction) which, for large enough record counts, can
1980
+ * exceed the JS engine's call stack ("Maximum call stack size exceeded").
1981
+ *
1982
+ * This can't be fixed by deferring continuations to a microtask/macrotask:
1983
+ * the transaction machinery synchronously checks (once the current call
1984
+ * stack unwinds) whether there are any pending requests left in order to
1985
+ * decide it's safe to commit; deferring a continuation opens a real gap in
1986
+ * which that check runs first and the transaction completes prematurely,
1987
+ * with the deferred continuation then acting on an already-finished
1988
+ * transaction (a hang, since it can never resolve).
1989
+ *
1990
+ * Instead, this implements a true trampoline: the first call starts a
1991
+ * synchronous work queue and drains it in a flat loop; any call made while
1992
+ * already draining (i.e. a continuation triggering another continuation)
1993
+ * is simply appended to that same queue and returns immediately instead of
1994
+ * recursing. This keeps everything synchronous (so no completion-check
1995
+ * race is introduced) while preventing the call stack from growing with
1996
+ * each successive continuation.
1997
+ */
1998
+ var continuationState = {
1999
+ /** @type {Array<() => void>|null} */
2000
+ queue: null
2001
+ };
2002
+
2003
+ /**
2004
+ * @param {() => void} fn
2005
+ * @returns {void}
2006
+ */
2007
+ function runContinuationSafely(fn) {
2008
+ if (continuationState.queue) {
2009
+ continuationState.queue.push(fn);
2010
+ return;
2011
+ }
2012
+ var queue = [fn];
2013
+ continuationState.queue = queue;
2014
+ try {
2015
+ while (queue.length) {
2016
+ var next = /** @type {() => void} */queue.shift();
2017
+ next();
2018
+ }
2019
+ } finally {
2020
+ // Ensure a thrown exception can't leave the queue permanently
2021
+ // stuck (which would silently swallow all future continuations).
2022
+ continuationState.queue = null;
2023
+ }
2024
+ }
2025
+
1970
2026
  /**
1971
2027
  * @typedef {Error} DebuggingError
1972
2028
  */
@@ -2437,11 +2493,11 @@
2437
2493
  // eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
2438
2494
  ?
2439
2495
  /**
2440
- * @param {string} name
2441
- * @param {string} message
2442
- * @param {ErrorLike} [error]
2443
- * @returns {DOMException}
2444
- */
2496
+ * @param {string} name
2497
+ * @param {string} message
2498
+ * @param {ErrorLike} [error]
2499
+ * @returns {DOMException}
2500
+ */
2445
2501
  function (name, message, error) {
2446
2502
  logError(name, message, error);
2447
2503
  return createNativeDOMException(name, message);
@@ -2449,11 +2505,11 @@
2449
2505
  // eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
2450
2506
  :
2451
2507
  /**
2452
- * @param {string} name
2453
- * @param {string} message
2454
- * @param {ErrorLike} [error]
2455
- * @returns {Error}
2456
- */
2508
+ * @param {string} name
2509
+ * @param {string} message
2510
+ * @param {ErrorLike} [error]
2511
+ * @returns {Error}
2512
+ */
2457
2513
  function (name, message, error) {
2458
2514
  logError(name, message, error);
2459
2515
  return createNonNativeDOMException(name, message);
@@ -2648,16 +2704,15 @@
2648
2704
  /* eslint-disable promise/prefer-await-to-callbacks -- Needed for API */
2649
2705
  /* eslint-disable promise/catch-or-return, n/callback-return,
2650
2706
  promise/always-return -- Not needed */
2651
- /* eslint-disable unicorn/no-this-assignment -- Clarity */
2652
2707
  // Since [immediate](https://github.com/calvinmetcalf/immediate) is
2653
2708
  // not doing the trick for our WebSQL transactions (at least in Node),
2654
2709
  // we are forced to make the promises run fully synchronously.
2655
2710
 
2656
- // Todo: Use ES6 classes
2657
-
2711
+ /* eslint-disable jsdoc/reject-any-type -- Truly arbitrary */
2658
2712
  /**
2659
2713
  * @typedef {any} ArbitraryValue
2660
2714
  */
2715
+ /* eslint-enable jsdoc/reject-any-type -- Truly arbitrary */
2661
2716
 
2662
2717
  /**
2663
2718
  * @callback Resolve
@@ -2717,209 +2772,235 @@
2717
2772
  REJECTED = 1;
2718
2773
 
2719
2774
  /**
2720
- * @class
2721
- * @param {(
2722
- * resolve: (value: ArbitraryValue | PromiseLike<ArbitraryValue>) => void,
2723
- * reject: (reason?: any) => void
2724
- * ) => void} fn
2725
- */
2726
- function SyncPromise(fn) {
2727
- var that = this;
2728
- // Value, this will be set to either a resolved value or rejected reason
2729
- that.v = 0;
2730
- // State of the promise
2731
- that.s = PENDING;
2732
- // Callbacks c[0] is fulfillment and c[1] contains rejection callbacks
2733
- /** @type {Callbacks|null} */
2734
- that.c = [[], []];
2775
+ *
2776
+ */
2777
+ var SyncPromise = /*#__PURE__*/function () {
2735
2778
  /**
2736
- *
2737
- * @param {ArbitraryValue} val
2738
- * @param {0|1} state
2739
- * @returns {void}
2779
+ * @param {(
2780
+ * resolve: (value: ArbitraryValue | PromiseLike<ArbitraryValue>) => void,
2781
+ * reject: (reason?: ArbitraryValue) => void
2782
+ * ) => void} fn
2740
2783
  */
2741
- function transist(val, state) {
2742
- that.v = val;
2743
- that.s = state;
2744
-
2745
- // console.log('state', state);
2746
- /** @type {Callbacks} */
2747
- that.c[state].forEach(function (func) {
2748
- func(val);
2749
- });
2750
- // Release memory, but if no handlers have been added, as we
2751
- // assume that we will resolve/reject (truly) synchronously
2752
- // and thus we avoid flagging checks about whether we've
2753
- // already resolved/rejected.
2754
- if (/** @type {Callbacks} */that.c[state].length) {
2755
- that.c = null;
2756
- }
2757
- }
2784
+ function SyncPromise(fn) {
2785
+ var _this = this;
2786
+ _classCallCheck(this, SyncPromise);
2787
+ // Value, this will be set to either a resolved value or rejected reason
2788
+ _defineProperty(this, "v", 0);
2789
+ // State of the promise
2790
+ this.s = PENDING;
2791
+ // Callbacks c[0] is fulfillment and c[1] contains rejection callbacks
2792
+ /** @type {Callbacks|null} */
2793
+ this.c = [[], []];
2794
+ /**
2795
+ *
2796
+ * @param {ArbitraryValue} val
2797
+ * @param {0|1} state
2798
+ * @returns {void}
2799
+ */
2800
+ var transist = function transist(val, state) {
2801
+ _this.v = val;
2802
+ _this.s = state;
2758
2803
 
2759
- /** @type {Resolve} */
2760
- function resolve(val) {
2761
- if (!that.c) ; else if (isPromise(val)) {
2762
- addReject(val.then(resolve), reject);
2763
- } else {
2764
- transist(val, FULFILLED);
2765
- }
2766
- }
2804
+ // console.log('state', state);
2805
+ /** @type {Callbacks} */
2806
+ _this.c[state].forEach(function (func) {
2807
+ func(val);
2808
+ });
2809
+ // Release memory, but if no handlers have been added, as we
2810
+ // assume that we will resolve/reject (truly) synchronously
2811
+ // and thus we avoid flagging checks about whether we've
2812
+ // already resolved/rejected.
2813
+ if (/** @type {Callbacks} */_this.c[state].length) {
2814
+ _this.c = null;
2815
+ }
2816
+ };
2767
2817
 
2768
- /** @type {Reject} */
2769
- function reject(reason) {
2770
- if (!that.c) ; else if (isPromise(reason)) {
2771
- addReject(reason.then(reject), reject);
2772
- } else {
2773
- transist(reason, REJECTED);
2818
+ /** @type {Resolve} */
2819
+ var _resolve = function resolve(val) {
2820
+ if (!_this.c) ; else if (isPromise(val)) {
2821
+ addReject(val.then(_resolve), _reject);
2822
+ } else {
2823
+ transist(val, FULFILLED);
2824
+ }
2825
+ };
2826
+
2827
+ /** @type {Reject} */
2828
+ var _reject = function reject(reason) {
2829
+ if (!_this.c) ; else if (isPromise(reason)) {
2830
+ addReject(reason.then(_reject), _reject);
2831
+ } else {
2832
+ transist(reason, REJECTED);
2833
+ }
2834
+ };
2835
+ try {
2836
+ fn(_resolve, _reject);
2837
+ } catch (err) {
2838
+ _reject(err);
2774
2839
  }
2775
2840
  }
2776
- try {
2777
- fn(resolve, reject);
2778
- } catch (err) {
2779
- reject(err);
2780
- }
2781
- }
2782
2841
 
2783
- /* eslint-disable unicorn/no-thenable -- Promise API */
2784
- /**
2785
- * @param {((value: ArbitraryValue) => ArbitraryValue)|null|undefined} [cb]
2786
- * @param {(reason: any) => PromiseLike<never>} [errBack]
2787
- * @returns {SyncPromise}
2788
- */
2789
- SyncPromise.prototype.then = function (cb, errBack) {
2790
- /* eslint-enable unicorn/no-thenable -- Promise API */
2791
- var that = this;
2792
- return new SyncPromise(/** @type {ResolveReject} */
2793
- function (resolve, reject) {
2794
- var rej = typeof errBack === 'function' ? errBack : reject;
2842
+ /* eslint-disable unicorn/no-thenable -- Promise API */
2843
+ /**
2844
+ * @param {((value: ArbitraryValue) => ArbitraryValue)|null|undefined} [cb]
2845
+ * @param {(reason: ArbitraryValue) => PromiseLike<never>} [errBack]
2846
+ * @returns {SyncPromise}
2847
+ */
2848
+ return _createClass(SyncPromise, [{
2849
+ key: "then",
2850
+ value: function then(cb, errBack) {
2851
+ var _this2 = this;
2852
+ /* eslint-enable unicorn/no-thenable -- Promise API */
2853
+ return new SyncPromise(/** @type {ResolveReject} */
2854
+ function (resolve, reject) {
2855
+ var rej = typeof errBack === 'function' ? errBack : reject;
2795
2856
 
2796
- /** @type {Settle} */
2797
- function settle() {
2798
- try {
2799
- resolve(cb ? cb(that.v) : that.v);
2800
- } catch (e) {
2801
- rej(e);
2802
- }
2803
- }
2804
- if (that.s === FULFILLED) {
2805
- settle();
2806
- } else if (that.s === REJECTED) {
2807
- rej(that.v);
2808
- } else {
2809
- /** @type {Callbacks} */that.c[FULFILLED].push(settle);
2810
- /** @type {Callbacks} */
2811
- that.c[REJECTED].push(rej);
2857
+ /** @type {Settle} */
2858
+ var settle = function settle() {
2859
+ try {
2860
+ resolve(cb ? cb(_this2.v) : _this2.v);
2861
+ } catch (e) {
2862
+ rej(e);
2863
+ }
2864
+ };
2865
+ if (_this2.s === FULFILLED) {
2866
+ settle();
2867
+ } else if (_this2.s === REJECTED) {
2868
+ rej(_this2.v);
2869
+ } else {
2870
+ /** @type {Callbacks} */_this2.c[FULFILLED].push(settle);
2871
+ /** @type {Callbacks} */
2872
+ _this2.c[REJECTED].push(rej);
2873
+ }
2874
+ });
2812
2875
  }
2813
- });
2814
- };
2815
2876
 
2816
- /**
2817
- * @param {(reason: any) => PromiseLike<never>|null|undefined} cb
2818
- * @returns {SyncPromise}
2819
- */
2820
- SyncPromise.prototype.catch = function (cb) {
2821
- var that = this;
2822
- return new SyncPromise(/** @type {ResolveReject} */
2823
- function (resolve, reject) {
2824
2877
  /**
2825
- * @returns {void}
2878
+ * @param {(reason: ArbitraryValue) => PromiseLike<never>|null|undefined} cb
2879
+ * @returns {SyncPromise}
2826
2880
  */
2827
- function settle() {
2828
- try {
2829
- resolve(cb(that.v));
2830
- } catch (e) {
2831
- reject(e);
2832
- }
2833
- }
2834
- if (that.s === REJECTED) {
2835
- settle();
2836
- } else if (that.s === FULFILLED) {
2837
- resolve(that.v);
2838
- } else {
2839
- /** @type {Callbacks} */that.c[REJECTED].push(settle);
2840
- /** @type {Callbacks} */
2841
- that.c[FULFILLED].push(resolve);
2881
+ }, {
2882
+ key: "catch",
2883
+ value: function _catch(cb) {
2884
+ var _this3 = this;
2885
+ return new SyncPromise(/** @type {ResolveReject} */
2886
+ function (resolve, reject) {
2887
+ /**
2888
+ * @returns {void}
2889
+ */
2890
+ var settle = function settle() {
2891
+ try {
2892
+ resolve(cb(_this3.v));
2893
+ } catch (e) {
2894
+ reject(e);
2895
+ }
2896
+ };
2897
+ if (_this3.s === REJECTED) {
2898
+ settle();
2899
+ } else if (_this3.s === FULFILLED) {
2900
+ resolve(_this3.v);
2901
+ } else {
2902
+ /** @type {Callbacks} */_this3.c[REJECTED].push(settle);
2903
+ /** @type {Callbacks} */
2904
+ _this3.c[FULFILLED].push(resolve);
2905
+ }
2906
+ });
2842
2907
  }
2843
- });
2844
- };
2845
-
2846
- /**
2847
- * @param {unknown[]|[]} promises
2848
- * @returns {SyncPromise}
2849
- */
2850
- SyncPromise.all = function (promises) {
2851
- return new SyncPromise(/** @type {ResolveReject} */
2852
- function (resolve, reject) {
2853
- var l = promises.length;
2854
- /** @type {ArbitraryValue[]} */
2855
- var newPromises = [];
2856
- if (!l) {
2857
- resolve(newPromises);
2858
- return;
2908
+ }], [{
2909
+ key: "all",
2910
+ value:
2911
+ /**
2912
+ * @param {unknown[]|[]} promises
2913
+ * @returns {SyncPromise}
2914
+ */
2915
+ function all(promises) {
2916
+ return new SyncPromise(/** @type {ResolveReject} */
2917
+ function (resolve, reject) {
2918
+ var l = promises.length;
2919
+ /** @type {ArbitraryValue[]} */
2920
+ var newPromises = [];
2921
+ if (!l) {
2922
+ resolve(newPromises);
2923
+ return;
2924
+ }
2925
+ promises.forEach(function (p, i) {
2926
+ if (isPromise(/** @type {PromiseLike<ArbitraryValue>} */p)) {
2927
+ addReject(/** @type {PromiseLike<ArbitraryValue>} */p.then(/** @type {OnFulfilled} */
2928
+ function (res) {
2929
+ newPromises[i] = res;
2930
+ --l;
2931
+ if (!l) {
2932
+ resolve(newPromises);
2933
+ }
2934
+ }), reject);
2935
+ } else {
2936
+ newPromises[i] = p;
2937
+ --l;
2938
+ if (!l) {
2939
+ resolve(promises);
2940
+ }
2941
+ }
2942
+ });
2943
+ });
2859
2944
  }
2860
- promises.forEach(function (p, i) {
2861
- if (isPromise(/** @type {PromiseLike<any>} */p)) {
2862
- addReject(/** @type {PromiseLike<any>} */p.then(/** @type {OnFulfilled} */
2863
- function (res) {
2864
- newPromises[i] = res;
2865
- --l || resolve(newPromises);
2866
- }), reject);
2867
- } else {
2868
- newPromises[i] = p;
2869
- --l || resolve(promises);
2870
- }
2871
- });
2872
- });
2873
- };
2874
2945
 
2875
- /**
2876
- * @param {unknown[]|[]} promises
2877
- * @returns {SyncPromise}
2878
- */
2879
- SyncPromise.race = function (promises) {
2880
- var resolved = false;
2881
- return new SyncPromise(/** @type {ResolveReject} */
2882
- function (resolve, reject) {
2883
- promises.some(function (p, i) {
2884
- if (isPromise(/** @type {PromiseLike<any>} */p)) {
2885
- addReject(/** @type {PromiseLike<any>} */p.then(/** @type {OnFulfilled} */
2886
- function (res) {
2887
- if (resolved) {
2888
- return;
2946
+ /**
2947
+ * @param {unknown[]|[]} promises
2948
+ * @returns {SyncPromise}
2949
+ */
2950
+ }, {
2951
+ key: "race",
2952
+ value: function race(promises) {
2953
+ var resolved = false;
2954
+ return new SyncPromise(/** @type {ResolveReject} */
2955
+ function (resolve, reject) {
2956
+ // eslint-disable-next-line @stylistic/max-len -- Long
2957
+ // eslint-disable-next-line unicorn/no-unused-array-method-return -- Shortcuts
2958
+ promises.some(function (p) {
2959
+ if (isPromise(/** @type {PromiseLike<ArbitraryValue>} */p)) {
2960
+ addReject(/** @type {PromiseLike<ArbitraryValue>} */p.then(/** @type {OnFulfilled} */
2961
+ function (res) {
2962
+ if (resolved) {
2963
+ return;
2964
+ }
2965
+ resolve(res);
2966
+ resolved = true;
2967
+ }), reject);
2968
+ return false;
2889
2969
  }
2890
- resolve(res);
2970
+ resolve(p);
2891
2971
  resolved = true;
2892
- }), reject);
2893
- return false;
2894
- }
2895
- resolve(p);
2896
- resolved = true;
2897
- return true;
2898
- });
2899
- });
2900
- };
2972
+ return true;
2973
+ });
2974
+ });
2975
+ }
2901
2976
 
2902
- /**
2903
- * @param {ArbitraryValue} val
2904
- * @returns {SyncPromise}
2905
- */
2906
- SyncPromise.resolve = function (val) {
2907
- return new SyncPromise(/** @type {ResolveReject} */
2908
- function (resolve, reject) {
2909
- resolve(val);
2910
- });
2911
- };
2977
+ /**
2978
+ * @param {ArbitraryValue} val
2979
+ * @returns {SyncPromise}
2980
+ */
2981
+ }, {
2982
+ key: "resolve",
2983
+ value: function resolve(val) {
2984
+ return new SyncPromise(/** @type {ResolveReject} */
2985
+ function (resolve) {
2986
+ resolve(val);
2987
+ });
2988
+ }
2912
2989
 
2913
- /**
2914
- * @param {ArbitraryValue} val
2915
- * @returns {SyncPromise}
2916
- */
2917
- SyncPromise.reject = function (val) {
2918
- return new SyncPromise(/** @type {ResolveReject} */
2919
- function (resolve, reject) {
2920
- reject(val);
2921
- });
2922
- };
2990
+ /**
2991
+ * @param {ArbitraryValue} val
2992
+ * @returns {SyncPromise}
2993
+ */
2994
+ }, {
2995
+ key: "reject",
2996
+ value: function reject(val) {
2997
+ return new SyncPromise(/** @type {ResolveReject} */
2998
+ function (resolve, reject) {
2999
+ reject(val);
3000
+ });
3001
+ }
3002
+ }]);
3003
+ }();
2923
3004
 
2924
3005
  /**
2925
3006
  * Compares two keys.
@@ -2956,6 +3037,8 @@
2956
3037
  return result;
2957
3038
  }
2958
3039
 
3040
+ var _templateObject, _templateObject2;
3041
+
2959
3042
  /**
2960
3043
  * @typedef {NodeJS.TypedArray|DataView} ArrayBufferView
2961
3044
  */
@@ -2985,14 +3068,14 @@
2985
3068
  */
2986
3069
 
2987
3070
  /**
2988
- * @typedef {object} KeyValueObject
2989
- * @property {KeyType|"NaN"|"null"|"undefined"|"boolean"|"object"|"symbol"|
2990
- * "function"|"bigint"} type If not `KeyType`, indicates invalid value
2991
- * @property {Value} [value]
2992
- * @property {boolean} [invalid]
2993
- * @property {string} [message]
2994
- * @todo Specify acceptable `value` more precisely
2995
- */
3071
+ * @typedef {object} KeyValueObject
3072
+ * @property {KeyType|"NaN"|"null"|"undefined"|"boolean"|"object"|"symbol"|
3073
+ * "function"|"bigint"} type If not `KeyType`, indicates invalid value
3074
+ * @property {Value} [value]
3075
+ * @property {boolean} [invalid]
3076
+ * @property {string} [message]
3077
+ * @todo Specify acceptable `value` more precisely
3078
+ */
2996
3079
 
2997
3080
  /**
2998
3081
  * @typedef {number|string|Date|ArrayBuffer} ValueTypePrimitive
@@ -3231,14 +3314,22 @@
3231
3314
  _iterator.f();
3232
3315
  }
3233
3316
  encoded.push(keyTypeToEncodedChar.invalid + '-'); // append an extra item, so empty arrays sort correctly
3234
- return keyTypeToEncodedChar.array + '-' + JSON.stringify(encoded);
3317
+ var encodedKey = JSON.stringify(encoded);
3318
+ if (CFG.escapeNULForSQLiteStatements === false) {
3319
+ encodedKey = encodedKey.replaceAll(String.raw(_templateObject || (_templateObject = _taggedTemplateLiteral(["\0"], ["\\u0000"]))), '\0');
3320
+ }
3321
+ return keyTypeToEncodedChar.array + '-' + encodedKey;
3235
3322
  },
3236
3323
  /**
3237
3324
  * @param {string} key
3238
3325
  * @returns {ValueTypeArray}
3239
3326
  */
3240
3327
  decode: function decode(key) {
3241
- var decoded = JSON.parse(key.slice(2));
3328
+ var decodedKey = key.slice(2);
3329
+ if (CFG.escapeNULForSQLiteStatements === false) {
3330
+ decodedKey = decodedKey.replaceAll('\0', String.raw(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\0"], ["\\u0000"]))));
3331
+ }
3332
+ var decoded = JSON.parse(decodedKey);
3242
3333
  decoded.pop(); // remove the extra item
3243
3334
  for (var i = 0; i < decoded.length; i++) {
3244
3335
  var item = decoded[i];
@@ -3424,10 +3515,10 @@
3424
3515
  }
3425
3516
 
3426
3517
  /**
3427
- * Currently not in use.
3428
- * @param {Value} input
3429
- * @returns {KeyValueObject}
3430
- */
3518
+ * Currently not in use.
3519
+ * @param {Value} input
3520
+ * @returns {KeyValueObject}
3521
+ */
3431
3522
  function convertValueToMultiEntryKey(input) {
3432
3523
  return convertValueToKeyValueDecoded(input, null, true, true);
3433
3524
  }
@@ -3462,17 +3553,17 @@
3462
3553
  }
3463
3554
 
3464
3555
  /**
3465
- * Shortcut utility to avoid returning full keys from `convertValueToKey`
3466
- * and subsequent need to process in calling code unless `fullKeys` is
3467
- * set; may throw.
3468
- * @param {Value} input
3469
- * @param {Value[]|null} [seen]
3470
- * @param {boolean} [multiEntry]
3471
- * @param {boolean} [fullKeys]
3472
- * @throws {TypeError} See `getCopyBytesHeldByBufferSource`
3473
- * @todo Document other allowable `input`
3474
- * @returns {KeyValueObject}
3475
- */
3556
+ * Shortcut utility to avoid returning full keys from `convertValueToKey`
3557
+ * and subsequent need to process in calling code unless `fullKeys` is
3558
+ * set; may throw.
3559
+ * @param {Value} input
3560
+ * @param {Value[]|null} [seen]
3561
+ * @param {boolean} [multiEntry]
3562
+ * @param {boolean} [fullKeys]
3563
+ * @throws {TypeError} See `getCopyBytesHeldByBufferSource`
3564
+ * @todo Document other allowable `input`
3565
+ * @returns {KeyValueObject}
3566
+ */
3476
3567
  function convertValueToKeyValueDecoded(input, seen, multiEntry, fullKeys) {
3477
3568
  seen || (seen = []);
3478
3569
  if (seen.includes(input)) {
@@ -3628,12 +3719,12 @@
3628
3719
  }
3629
3720
 
3630
3721
  /**
3631
- * An internal utility.
3632
- * @param {Value} input
3633
- * @param {Value[]|null|undefined} [seen]
3634
- * @throws {DOMException} `DataError`
3635
- * @returns {KeyValueObject}
3636
- */
3722
+ * An internal utility.
3723
+ * @param {Value} input
3724
+ * @param {Value[]|null|undefined} [seen]
3725
+ * @throws {DOMException} `DataError`
3726
+ * @returns {KeyValueObject}
3727
+ */
3637
3728
  function convertValueToKeyRethrowingAndIfInvalid(input, seen) {
3638
3729
  var key = convertValueToKey(input, seen);
3639
3730
  if (key.invalid) {
@@ -3654,26 +3745,26 @@
3654
3745
  return extractKeyValueDecodedFromValueUsingKeyPath(value, keyPath, multiEntry, true);
3655
3746
  }
3656
3747
  /**
3657
- * Not currently in use.
3658
- * @param {Value} value
3659
- * @param {KeyPath} keyPath
3660
- * @param {boolean} multiEntry
3661
- * @returns {KeyPathEvaluateValue}
3662
- */
3748
+ * Not currently in use.
3749
+ * @param {Value} value
3750
+ * @param {KeyPath} keyPath
3751
+ * @param {boolean} multiEntry
3752
+ * @returns {KeyPathEvaluateValue}
3753
+ */
3663
3754
  function evaluateKeyPathOnValue(value, keyPath, multiEntry) {
3664
3755
  return evaluateKeyPathOnValueToDecodedValue(value, keyPath);
3665
3756
  }
3666
3757
 
3667
3758
  /**
3668
- * May throw, return `{failure: true}` (e.g., non-object on keyPath resolution)
3669
- * or `{invalid: true}` (e.g., `NaN`).
3670
- * @param {Value} value
3671
- * @param {KeyPath} keyPath
3672
- * @param {boolean} [multiEntry]
3673
- * @param {boolean} [fullKeys]
3674
- * @returns {KeyValueObject|KeyPathEvaluateValue}
3675
- * @todo Document other possible return?
3676
- */
3759
+ * May throw, return `{failure: true}` (e.g., non-object on keyPath resolution)
3760
+ * or `{invalid: true}` (e.g., `NaN`).
3761
+ * @param {Value} value
3762
+ * @param {KeyPath} keyPath
3763
+ * @param {boolean} [multiEntry]
3764
+ * @param {boolean} [fullKeys]
3765
+ * @returns {KeyValueObject|KeyPathEvaluateValue}
3766
+ * @todo Document other possible return?
3767
+ */
3677
3768
  function extractKeyValueDecodedFromValueUsingKeyPath(value, keyPath, multiEntry, fullKeys) {
3678
3769
  var r = evaluateKeyPathOnValueToDecodedValue(value, keyPath);
3679
3770
  if (r.failure) {
@@ -3903,11 +3994,11 @@
3903
3994
  }
3904
3995
 
3905
3996
  /**
3906
- * Not currently in use but keeping for spec parity.
3907
- * @param {Key} key
3908
- * @throws {Error} Upon a "bad key"
3909
- * @returns {ValueType}
3910
- */
3997
+ * Not currently in use but keeping for spec parity.
3998
+ * @param {Key} key
3999
+ * @throws {Error} Upon a "bad key"
4000
+ * @returns {ValueType}
4001
+ */
3911
4002
  function convertKeyToValue(key) {
3912
4003
  var type = key.type,
3913
4004
  value = key.value;
@@ -3999,10 +4090,10 @@
3999
4090
  */
4000
4091
 
4001
4092
  /**
4002
- * @callback SQLFailureCallback
4003
- * @param {DOMException|Error} exception
4004
- * @returns {void}
4005
- */
4093
+ * @callback SQLFailureCallback
4094
+ * @param {DOMException|Error} exception
4095
+ * @returns {void}
4096
+ */
4006
4097
 
4007
4098
  /**
4008
4099
  *
@@ -4171,11 +4262,11 @@
4171
4262
 
4172
4263
  /**
4173
4264
  * @typedef {globalThis.IDBKeyRange & {
4174
- * __lowerCached: string|null|false,
4175
- * __upperCached: string|null|false,
4176
- * __lowerOpen: boolean,
4177
- * }} IDBKeyRangeFull
4178
- */
4265
+ * __lowerCached: string|null|false,
4266
+ * __upperCached: string|null|false,
4267
+ * __lowerOpen: boolean,
4268
+ * }} IDBKeyRangeFull
4269
+ */
4179
4270
 
4180
4271
  /**
4181
4272
  * The IndexedDB KeyRange object.
@@ -4702,6 +4793,7 @@
4702
4793
  * },
4703
4794
  * __requestsFinished: boolean,
4704
4795
  * __transFinishedCb: (err: boolean, cb: ((bool?: boolean) => void)) => void,
4796
+ * __callTransFinishedCb: (err: boolean, cb: ((bool?: boolean) => void)) => void,
4705
4797
  * __transactionEndCallback: () => void,
4706
4798
  * __transactionFinished: boolean,
4707
4799
  * __completed: boolean,
@@ -4811,6 +4903,35 @@
4811
4903
  IDBTransaction.prototype.__transFinishedCb = function (err, cb) {
4812
4904
  cb(Boolean(err));
4813
4905
  };
4906
+
4907
+ /**
4908
+ * In Node, the real (SQL-commit-capable) `__transFinishedCb` is only
4909
+ * installed once the underlying WebSQL driver's own SQL-queue-idle check
4910
+ * has fired at least once for this transaction (asynchronously, via the
4911
+ * `nonstandardTransCb` passed to `db.transaction`/`.readTransaction`).
4912
+ * Since our own request processing can now finish synchronously (e.g., a
4913
+ * trivial upgrade using a synchronous SQL driver), it is possible to reach
4914
+ * transaction completion here before that has happened, in which case
4915
+ * `__transFinishedCb` is still the non-committing default above. Calling
4916
+ * that default directly would silently skip the actual SQL commit and
4917
+ * leave the underlying WebSQL transaction "running" forever, hanging any
4918
+ * later transaction on that same database connection. So, if the real
4919
+ * callback isn't installed yet, defer and retry until it is.
4920
+ * @this {IDBTransactionFull}
4921
+ * @param {boolean} err
4922
+ * @param {(bool?: boolean) => void} cb
4923
+ * @returns {void}
4924
+ */
4925
+ IDBTransaction.prototype.__callTransFinishedCb = function (err, cb) {
4926
+ var me = this;
4927
+ if (me.__transFinishedCb === IDBTransaction.prototype.__transFinishedCb) {
4928
+ setTimeout(function () {
4929
+ me.__callTransFinishedCb(err, cb);
4930
+ }, 0);
4931
+ return;
4932
+ }
4933
+ me.__transFinishedCb(err, cb);
4934
+ };
4814
4935
  /**
4815
4936
  * @this {IDBTransactionFull}
4816
4937
  * @returns {void}
@@ -4870,7 +4991,7 @@
4870
4991
  me.__abortTransaction(createDOMException('AbortError', 'A request was aborted (in user handler after success).'));
4871
4992
  return;
4872
4993
  }
4873
- executeNextRequest();
4994
+ runContinuationSafely(executeNextRequest);
4874
4995
  }
4875
4996
 
4876
4997
  /**
@@ -4945,7 +5066,9 @@
4945
5066
  try {
4946
5067
  q = me.__requests[i];
4947
5068
  if (!q.req) {
4948
- q.op(tx, q.args, executeNextRequest, error);
5069
+ q.op(tx, q.args, function () {
5070
+ return runContinuationSafely(executeNextRequest);
5071
+ }, error);
4949
5072
  return;
4950
5073
  }
4951
5074
  if (q.req.__done) {
@@ -5411,10 +5534,10 @@
5411
5534
  };
5412
5535
 
5413
5536
  /**
5414
- * Used by our `EventTarget.prototype` library to implement bubbling/capturing.
5537
+ * Used by our `EventTarget.prototype` library to implement bubbling/capturing.
5415
5538
  * @this {IDBTransactionFull}
5416
- * @returns {import('./IDBDatabase.js').IDBDatabaseFull}
5417
- */
5539
+ * @returns {import('./IDBDatabase.js').IDBDatabaseFull}
5540
+ */
5418
5541
  IDBTransaction.prototype.__getParent = function () {
5419
5542
  return this.db;
5420
5543
  };
@@ -5450,7 +5573,7 @@
5450
5573
  }).then(r, n);
5451
5574
  });
5452
5575
  }, TypesonPromise.prototype.catch = function (e) {
5453
- return this.then(function () {}, e);
5576
+ return this.then(void 0, e);
5454
5577
  }, TypesonPromise.resolve = function (e) {
5455
5578
  return new TypesonPromise(function (t) {
5456
5579
  t(e);
@@ -5510,26 +5633,31 @@
5510
5633
  function unescapeKeyPathComponent(e) {
5511
5634
  return e.replaceAll("~1", ".").replaceAll("~0", "~").replace(/^''$/, "").replaceAll("''''", "''");
5512
5635
  }
5513
- function getByKeyPath(e, t) {
5514
- if ("" === t) return e;
5515
- if (null === e || "object" != _typeof$1(e)) throw new TypeError("Unexpected non-object type");
5516
- var r = t.indexOf(".");
5517
- if (-1 !== r) {
5518
- var _n = e[unescapeKeyPathComponent(t.slice(0, r))];
5519
- return void 0 === _n ? void 0 : getByKeyPath(_n, t.slice(r + 1));
5636
+ function getByKeyPath(t, r, n) {
5637
+ if ("" === r) return t;
5638
+ if (null === t || "object" != _typeof$1(t)) throw new TypeError("Unexpected non-object type");
5639
+ var o = r.indexOf("."),
5640
+ s = unescapeKeyPathComponent(-1 === o ? r : r.slice(0, o));
5641
+ if (e(t, s)) {
5642
+ if (-1 !== o) {
5643
+ var _e = t[s];
5644
+ return void 0 === _e ? void 0 : getByKeyPath(_e, r.slice(o + 1));
5645
+ }
5646
+ return t[s];
5520
5647
  }
5521
- return e[unescapeKeyPathComponent(t)];
5522
5648
  }
5523
- function setAtKeyPath(e, t, r) {
5524
- if ("" === t) return r;
5525
- var n = e,
5526
- o = t;
5649
+ function setAtKeyPath(t, r, n, o) {
5650
+ if ("" === r) return n;
5651
+ var s = t,
5652
+ a = r;
5527
5653
  for (;;) {
5528
- if (!n || "object" != _typeof$1(n)) throw new TypeError("Unexpected non-object type");
5529
- if ("__proto__" === o) throw new TypeError("Invalid property");
5530
- var _t = o.indexOf(".");
5531
- if (-1 === _t) return n[unescapeKeyPathComponent(o)] = r, e;
5532
- n = n[unescapeKeyPathComponent(o.slice(0, _t))], o = o.slice(_t + 1);
5654
+ if (!s || "object" != _typeof$1(s)) throw new TypeError("Unexpected non-object type");
5655
+ var _r = a.indexOf("."),
5656
+ _i = unescapeKeyPathComponent(-1 === _r ? a : a.slice(0, _r));
5657
+ if ("__proto__" === _i) throw new TypeError("Invalid property");
5658
+ if (-1 === _r) return s[_i] = n, t;
5659
+ if (!e(s, _i)) throw new TypeError("Invalid property");
5660
+ s = s[_i], a = a.slice(_r + 1);
5533
5661
  }
5534
5662
  }
5535
5663
  function getJSONType(e) {
@@ -5539,11 +5667,19 @@
5539
5667
  * @file Typeson - JSON with types.
5540
5668
  * @license The MIT License (MIT)
5541
5669
  * @copyright (c) 2016-2018 David Fahlander, Brett Zamir
5542
- */
5670
+ */
5543
5671
  var r = Object.keys,
5544
5672
  n = Object.hasOwn,
5545
5673
  o = Array.isArray,
5546
5674
  s = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
5675
+ function setOwnEnumerable(e, t, r) {
5676
+ Object.defineProperty(e, t, {
5677
+ configurable: true,
5678
+ enumerable: true,
5679
+ value: r,
5680
+ writable: true
5681
+ });
5682
+ }
5547
5683
  function nestedPathsFirst(e, t) {
5548
5684
  var _e$keypath$match, _t$keypath$match;
5549
5685
  if ("" === e.keypath) return -1;
@@ -5614,13 +5750,17 @@
5614
5750
  key: "specialTypeNames",
5615
5751
  value: function specialTypeNames(e, t) {
5616
5752
  var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
5617
- return r.returnTypeNames = true, this.encapsulate(e, t, r);
5753
+ return this.encapsulate(e, t, _objectSpread2(_objectSpread2({}, r), {}, {
5754
+ returnTypeNames: true
5755
+ }));
5618
5756
  }
5619
5757
  }, {
5620
5758
  key: "rootTypeName",
5621
5759
  value: function rootTypeName(e, t) {
5622
5760
  var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
5623
- return r.iterateNone = true, this.encapsulate(e, t, r);
5761
+ return this.encapsulate(e, t, _objectSpread2(_objectSpread2({}, r), {}, {
5762
+ iterateNone: true
5763
+ }));
5624
5764
  }
5625
5765
  }, {
5626
5766
  key: "encapsulate",
@@ -5631,11 +5771,12 @@
5631
5771
  }, this.options), a),
5632
5772
  c = i.sync,
5633
5773
  y = {},
5634
- l = [],
5635
5774
  u = [],
5775
+ l = [],
5636
5776
  p = [],
5637
5777
  f = !("cyclic" in i) || i.cyclic,
5638
5778
  d = i.encapsulateObserver,
5779
+ m = i.encapsulateError,
5639
5780
  finish = function finish(e) {
5640
5781
  var t = Object.values(y);
5641
5782
  if (i.iterateNone) return t.length ? t[0] : getJSONType(e);
@@ -5668,22 +5809,29 @@
5668
5809
  _context2.n = 2;
5669
5810
  return Promise.all(r.map(/*#__PURE__*/function () {
5670
5811
  var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(r) {
5671
- var n, _t$splice, _t$splice2, o, _o, s, a, i, c, y, l, u, p, _t2;
5812
+ var n, _t$splice, _t$splice2, o, _o, s, a, i, c, y, u, l, p, _t, _t2, _t3, _t4;
5672
5813
  return _regenerator().w(function (_context) {
5673
5814
  while (1) switch (_context.n) {
5674
5815
  case 0:
5675
- n = [], _t$splice = t.splice(0, 1), _t$splice2 = _slicedToArray(_t$splice, 1), o = _t$splice2[0], _o = _slicedToArray(o, 7), s = _o[0], a = _o[2], i = _o[3], c = _o[4], y = _o[5], l = _o[6], u = _encapsulate2(s, r, a, i, n, true, l), p = hasConstructorOf(u, TypesonPromise);
5816
+ n = [], _t$splice = t.splice(0, 1), _t$splice2 = _slicedToArray(_t$splice, 1), o = _t$splice2[0], _o = _slicedToArray(o, 7), s = _o[0], a = _o[2], i = _o[3], c = _o[4], y = _o[5], u = _o[6], l = _encapsulate2(s, r, a, i, n, true, u), p = hasConstructorOf(l, TypesonPromise);
5676
5817
  if (!(s && p)) {
5677
5818
  _context.n = 2;
5678
5819
  break;
5679
5820
  }
5821
+ _t2 = setOwnEnumerable;
5822
+ _t3 = c;
5823
+ _t4 = y;
5680
5824
  _context.n = 1;
5681
- return u.p;
5825
+ return l.p;
5682
5826
  case 1:
5683
- _t2 = _context.v;
5684
- return _context.a(2, (c[y] = _t2, _checkPromises(e, n)));
5827
+ _t2(_t3, _t4, _context.v);
5828
+ _t = _checkPromises(e, n);
5829
+ _context.n = 3;
5830
+ break;
5685
5831
  case 2:
5686
- return _context.a(2, (s ? c[y] = u : e = p ? u.p : u, _checkPromises(e, n)));
5832
+ _t = (s ? setOwnEnumerable(c, y, l) : e = p ? l.p : l, _checkPromises(e, n));
5833
+ case 3:
5834
+ return _context.a(2, _t);
5687
5835
  }
5688
5836
  }, _callee);
5689
5837
  }));
@@ -5712,61 +5860,88 @@
5712
5860
  });
5713
5861
  },
5714
5862
  _encapsulate2 = function _encapsulate(e, t, s, a, c, p, f) {
5715
- var m,
5716
- h = {};
5717
- var g = d ? function (r) {
5718
- var _ref2;
5719
- var n = (_ref2 = f !== null && f !== void 0 ? f : a.type) !== null && _ref2 !== void 0 ? _ref2 : getJSONType(t);
5720
- d(Object.assign(r !== null && r !== void 0 ? r : h, {
5721
- keypath: e,
5722
- value: t,
5723
- cyclic: s,
5724
- stateObj: a,
5725
- promisesData: c,
5726
- resolvingTypesonPromise: p,
5727
- awaitingTypesonPromise: hasConstructorOf(t, TypesonPromise)
5728
- }, {
5729
- type: n
5730
- }));
5731
- } : null;
5732
- if (["string", "boolean", "number", "undefined"].includes(_typeof$1(t))) return void 0 === t || t === 1 / 0 || 0 === t || t === -1 / 0 || Number.isNaN(t) ? (m = a.replaced ? t : replace(e, t, a, c, false, p, g), m !== t && (h = {
5733
- replaced: m
5734
- })) : m = t, g && g(), m;
5735
- if (null === t) return g && g(), t;
5863
+ var h,
5864
+ g = {};
5865
+ var b = d ? function (r) {
5866
+ var _ref2;
5867
+ var n = (_ref2 = f !== null && f !== void 0 ? f : a.type) !== null && _ref2 !== void 0 ? _ref2 : getJSONType(t);
5868
+ d(Object.assign(r !== null && r !== void 0 ? r : g, {
5869
+ keypath: e,
5870
+ value: t,
5871
+ cyclic: s,
5872
+ stateObj: a,
5873
+ promisesData: c,
5874
+ resolvingTypesonPromise: p,
5875
+ awaitingTypesonPromise: hasConstructorOf(t, TypesonPromise)
5876
+ }, {
5877
+ type: n
5878
+ }));
5879
+ } : null,
5880
+ getEncapsulatedValue = function getEncapsulatedValue(e, t, r) {
5881
+ try {
5882
+ return {
5883
+ value: _encapsulate2(e, t[r], Boolean(s), a, c, p)
5884
+ };
5885
+ } catch (n) {
5886
+ var _ref3;
5887
+ if (!m) throw n;
5888
+ var _o2 = (_ref3 = f !== null && f !== void 0 ? f : a.type) !== null && _ref3 !== void 0 ? _ref3 : getJSONType(t),
5889
+ _s = m({
5890
+ keypath: e,
5891
+ error: n,
5892
+ parent: t,
5893
+ key: r,
5894
+ stateObj: a,
5895
+ type: _o2
5896
+ });
5897
+ if (!_s) throw n;
5898
+ if ("substitute" in _s) return {
5899
+ value: _s.substitute,
5900
+ substitute: true
5901
+ };
5902
+ if (_s.ignore) return;
5903
+ throw n;
5904
+ }
5905
+ };
5906
+ if (["string", "boolean", "number", "undefined"].includes(_typeof$1(t))) return void 0 === t || t === 1 / 0 || 0 === t || t === -1 / 0 || Number.isNaN(t) ? (h = a.replaced ? t : replace(e, t, a, c, false, p, b), h !== t && (g = {
5907
+ replaced: h
5908
+ })) : h = t, b && b(), h;
5909
+ if (null === t) return b && b(), t;
5736
5910
  if (s && t && "object" == _typeof$1(t) && !a.iterateIn && !a.iterateUnsetNumeric) {
5737
- var _r = l.indexOf(t);
5738
- if (-1 !== _r) return y[e] = "#", g && g({
5739
- cyclicKeypath: u[_r]
5740
- }), "#" + u[_r];
5741
- true === s && (l.push(t), u.push(e));
5911
+ var _r2 = u.indexOf(t);
5912
+ if (-1 !== _r2) return y[e] = "#", b && b({
5913
+ cyclicKeypath: l[_r2]
5914
+ }), "#" + l[_r2];
5915
+ true === s && (u.push(t), l.push(e));
5742
5916
  }
5743
- var b = isPlainObject(t),
5744
- v = o(t),
5745
- O = (b || v) && (!_this2.plainObjectReplacers.length || a.replaced) || a.iterateIn ? t : replace(e, t, a, c, b || v, null, g);
5746
- var w;
5747
- if (O !== t ? (m = O, h = {
5748
- replaced: O
5749
- }) : "" === e && hasConstructorOf(t, TypesonPromise) ? (c.push([e, t, s, a, void 0, void 0, a.type]), m = t) : v && "object" !== a.iterateIn || "array" === a.iterateIn ? (w = new Array(t.length), h = {
5750
- clone: w
5751
- }) : !b && (["function", "symbol"].includes(_typeof$1(t)) || "toJSON" in t || hasConstructorOf(t, TypesonPromise) || hasConstructorOf(t, Promise) || hasConstructorOf(t, ArrayBuffer)) && "object" !== a.iterateIn ? m = t : (w = {}, a.addLength && (w.length = t.length), h = {
5752
- clone: w
5753
- }), g && g(), i.iterateNone) return w !== null && w !== void 0 ? w : m;
5754
- if (!w) return m;
5917
+ var v = isPlainObject(t),
5918
+ O = o(t),
5919
+ w = (v || O) && (!_this2.plainObjectReplacers.length || a.replaced) || a.iterateIn ? t : replace(e, t, a, c, v || O, null, b);
5920
+ var T;
5921
+ if (w !== t ? (h = w, g = {
5922
+ replaced: w
5923
+ }) : "" === e && hasConstructorOf(t, TypesonPromise) ? (c.push([e, t, s, a, void 0, void 0, a.type]), h = t) : O && "object" !== a.iterateIn || "array" === a.iterateIn ? (T = new Array(t.length), g = {
5924
+ clone: T
5925
+ }) : !v && ("object" != _typeof$1(t) || "toJSON" in t || hasConstructorOf(t, TypesonPromise) || hasConstructorOf(t, Promise) || hasConstructorOf(t, ArrayBuffer)) && "object" !== a.iterateIn ? h = t : (T = {}, a.addLength && (T.length = t.length), g = {
5926
+ clone: T
5927
+ }), b && b(), i.iterateNone) return T !== null && T !== void 0 ? T : h;
5928
+ if (!T) return h;
5755
5929
  if (a.iterateIn) {
5756
- var _loop = function _loop(_r2) {
5930
+ var _loop = function _loop(_r3) {
5757
5931
  var o = {
5758
- ownKeys: n(t, _r2)
5932
+ ownKeys: n(t, _r3)
5759
5933
  };
5760
5934
  _adaptBuiltinStateObjectProperties(a, o, function () {
5761
- var n = e + (e ? "." : "") + escapeKeyPathComponent(_r2),
5762
- o = _encapsulate2(n, t[_r2], Boolean(s), a, c, p);
5763
- hasConstructorOf(o, TypesonPromise) ? c.push([n, o, Boolean(s), a, w, _r2, a.type]) : void 0 !== o && (w[_r2] = o);
5935
+ var n = e + (e ? "." : "") + escapeKeyPathComponent(_r3),
5936
+ o = getEncapsulatedValue(n, t, _r3),
5937
+ i = o && o.value;
5938
+ hasConstructorOf(i, TypesonPromise) ? c.push([n, i, Boolean(s), a, T, _r3, a.type]) : o && (void 0 !== i || "substitute" in o) && setOwnEnumerable(T, _r3, i);
5764
5939
  });
5765
5940
  };
5766
- for (var _r2 in t) {
5767
- _loop(_r2);
5941
+ for (var _r3 in t) {
5942
+ _loop(_r3);
5768
5943
  }
5769
- g && g({
5944
+ b && b({
5770
5945
  endIterateIn: true,
5771
5946
  end: true
5772
5947
  });
@@ -5775,70 +5950,71 @@
5775
5950
  _adaptBuiltinStateObjectProperties(a, {
5776
5951
  ownKeys: true
5777
5952
  }, function () {
5778
- var e = _encapsulate2(n, t[r], Boolean(s), a, c, p);
5779
- hasConstructorOf(e, TypesonPromise) ? c.push([n, e, Boolean(s), a, w, r, a.type]) : void 0 !== e && (w[r] = e);
5953
+ var e = getEncapsulatedValue(n, t, r),
5954
+ o = e && e.value;
5955
+ hasConstructorOf(o, TypesonPromise) ? c.push([n, o, Boolean(s), a, T, r, a.type]) : e && (void 0 !== o || "substitute" in e) && setOwnEnumerable(T, r, o);
5780
5956
  });
5781
- }), g && g({
5957
+ }), b && b({
5782
5958
  endIterateOwn: true,
5783
5959
  end: true
5784
5960
  });
5785
5961
  if (a.iterateUnsetNumeric) {
5786
- var _r3 = t.length;
5787
- var _loop2 = function _loop2(_n2) {
5788
- if (_n2 in t) return 1; // continue
5789
- var r = "".concat(e).concat(e ? "." : "").concat(String(_n2));
5962
+ var _r4 = t.length;
5963
+ var _loop2 = function _loop2(_n) {
5964
+ if (_n in t) return 1; // continue
5965
+ var r = "".concat(e).concat(e ? "." : "").concat(String(_n));
5790
5966
  _adaptBuiltinStateObjectProperties(a, {
5791
5967
  ownKeys: false
5792
5968
  }, function () {
5793
5969
  var e = _encapsulate2(r, void 0, Boolean(s), a, c, p);
5794
- hasConstructorOf(e, TypesonPromise) ? c.push([r, e, Boolean(s), a, w, _n2, a.type]) : void 0 !== e && (w[_n2] = e);
5970
+ hasConstructorOf(e, TypesonPromise) ? c.push([r, e, Boolean(s), a, T, _n, a.type]) : void 0 !== e && setOwnEnumerable(T, _n, e);
5795
5971
  });
5796
5972
  };
5797
- for (var _n2 = 0; _n2 < _r3; _n2++) {
5798
- if (_loop2(_n2)) continue;
5973
+ for (var _n = 0; _n < _r4; _n++) {
5974
+ if (_loop2(_n)) continue;
5799
5975
  }
5800
- g && g({
5976
+ b && b({
5801
5977
  endIterateUnsetNumeric: true,
5802
5978
  end: true
5803
5979
  });
5804
5980
  }
5805
- return w;
5981
+ return T;
5806
5982
  },
5807
5983
  replace = function replace(e, t, r, n, o, s, a) {
5808
5984
  var i = o ? _this2.plainObjectReplacers : _this2.nonplainObjectReplacers;
5809
- var l = i.length;
5810
- for (; l--;) {
5811
- var _o2 = i[l];
5812
- if (_o2.test(t, r)) {
5813
- var _i = _o2.type;
5814
- if (Object.hasOwn(_this2.revivers, _i)) {
5815
- var _t3 = y[e];
5816
- y[e] = _t3 ? [_i].concat(_t3) : _i;
5985
+ var u = i.length;
5986
+ for (; u--;) {
5987
+ var _o3 = i[u];
5988
+ if (_o3.test(t, r)) {
5989
+ var _i2 = _o3.type;
5990
+ if (Object.hasOwn(_this2.revivers, _i2)) {
5991
+ var _t5 = y[e];
5992
+ y[e] = _t5 ? [_i2].concat(_t5) : _i2;
5817
5993
  }
5818
5994
  if (Object.assign(r, {
5819
- type: _i,
5995
+ type: _i2,
5820
5996
  replaced: true
5821
- }), (c || !_o2.replaceAsync) && !_o2.replace) return a && a({
5997
+ }), (c || !_o3.replaceAsync) && !_o3.replace) return a && a({
5822
5998
  typeDetected: true
5823
- }), _encapsulate2(e, t, f && "readonly", r, n, s, _i);
5824
- var _l = void 0;
5999
+ }), _encapsulate2(e, t, f && "readonly", r, n, s, _i2);
6000
+ var _u = void 0;
5825
6001
  if (a && a({
5826
6002
  replacing: true
5827
- }), c || !_o2.replaceAsync) {
5828
- if (void 0 === _o2.replace) throw new TypeError("Missing replacer");
5829
- _l = _o2.replace(t, r);
5830
- } else _l = _o2.replaceAsync(t, r);
5831
- return _encapsulate2(e, _l, f && "readonly", r, n, s, _i);
6003
+ }), c || !_o3.replaceAsync) {
6004
+ if (void 0 === _o3.replace) throw new TypeError("Missing replacer");
6005
+ _u = _o3.replace(t, r);
6006
+ } else _u = _o3.replaceAsync(t, r);
6007
+ return _encapsulate2(e, _u, f && "readonly", r, n, s, _i2);
5832
6008
  }
5833
6009
  }
5834
6010
  return t;
5835
6011
  },
5836
- m = _encapsulate2("", e, f, t !== null && t !== void 0 ? t : {}, p);
6012
+ h = _encapsulate2("", e, f, t !== null && t !== void 0 ? t : {}, p);
5837
6013
  if (p.length) return c && i.throwOnBadSyncType ? function () {
5838
6014
  throw new TypeError("Sync method requested but async result obtained");
5839
- }() : Promise.resolve(_checkPromises(m, p)).then(finish);
6015
+ }() : Promise.resolve(_checkPromises(h, p)).then(finish);
5840
6016
  if (!c && i.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
5841
- return c && i.stringification ? [finish(m)] : c ? finish(m) : Promise.resolve(finish(m));
6017
+ return c && i.stringification ? [finish(h)] : c ? finish(h) : Promise.resolve(finish(h));
5842
6018
  }
5843
6019
  }, {
5844
6020
  key: "encapsulateSync",
@@ -5877,18 +6053,18 @@
5877
6053
  if (!i || "object" != _typeof$1(i) || Array.isArray(i)) return finishRevival(e);
5878
6054
  var c = [],
5879
6055
  y = Object.create(null),
5880
- l = {};
5881
- var u = true;
5882
- i.$ && isPlainObject(i.$) && (e = e.$, i = i.$, u = false);
6056
+ u = {};
6057
+ var l = true;
6058
+ i.$ && isPlainObject(i.$) && (e = e.$, i = i.$, l = false);
5883
6059
  var executeReviver = function executeReviver(e, t) {
5884
6060
  var _this3$revivers$e;
5885
- var _ref3 = (_this3$revivers$e = _this3.revivers[e]) !== null && _this3$revivers$e !== void 0 ? _this3$revivers$e : [],
5886
- _ref4 = _slicedToArray(_ref3, 1),
5887
- r = _ref4[0];
6061
+ var _ref4 = (_this3$revivers$e = _this3.revivers[e]) !== null && _this3$revivers$e !== void 0 ? _this3$revivers$e : [],
6062
+ _ref5 = _slicedToArray(_ref4, 1),
6063
+ r = _ref5[0];
5888
6064
  if (!r) throw new Error("Unregistered type: " + e);
5889
6065
  if (a && !("revive" in r)) return t;
5890
- if (!a && r.reviveAsync) return r.reviveAsync(t, l);
5891
- if (r.revive) return r.revive(t, l);
6066
+ if (!a && r.reviveAsync) return r.reviveAsync(t, u);
6067
+ if (r.revive) return r.revive(t, u);
5892
6068
  throw new Error("Missing reviver");
5893
6069
  },
5894
6070
  p = [];
@@ -5898,23 +6074,23 @@
5898
6074
  var f = function () {
5899
6075
  if (!i) throw new Error("Found bad `types`");
5900
6076
  var t = [];
5901
- if (Object.entries(i).forEach(function (_ref5) {
5902
- var _ref6 = _slicedToArray(_ref5, 2),
5903
- e = _ref6[0],
5904
- r = _ref6[1];
6077
+ if (Object.entries(i).forEach(function (_ref6) {
6078
+ var _ref7 = _slicedToArray(_ref6, 2),
6079
+ e = _ref7[0],
6080
+ r = _ref7[1];
5905
6081
  "#" !== r && [].concat(r).forEach(function (r) {
5906
6082
  var _this3$revivers$r;
5907
- var _ref7 = (_this3$revivers$r = _this3.revivers[r]) !== null && _this3$revivers$r !== void 0 ? _this3$revivers$r : [null, {}],
5908
- _ref8 = _slicedToArray(_ref7, 2),
5909
- n = _ref8[1].plain;
6083
+ var _ref8 = (_this3$revivers$r = _this3.revivers[r]) !== null && _this3$revivers$r !== void 0 ? _this3$revivers$r : [null, {}],
6084
+ _ref9 = _slicedToArray(_ref8, 2),
6085
+ n = _ref9[1].plain;
5910
6086
  n && (t.push({
5911
6087
  keypath: e,
5912
6088
  type: r
5913
6089
  }), delete i[e]);
5914
6090
  });
5915
- }), t.length) return t.sort(nestedPathsFirst), t.reduce(function reducer(t, _ref9) {
5916
- var r = _ref9.keypath,
5917
- n = _ref9.type;
6091
+ }), t.length) return t.sort(nestedPathsFirst), t.reduce(function reducer(t, _ref0) {
6092
+ var r = _ref0.keypath,
6093
+ n = _ref0.type;
5918
6094
  if (isThenable(t)) return t.then(function (e) {
5919
6095
  return reducer(e, {
5920
6096
  keypath: r,
@@ -5933,39 +6109,39 @@
5933
6109
  var d;
5934
6110
  return hasConstructorOf(f, TypesonPromise) ? d = f.then(function () {
5935
6111
  return e;
5936
- }) : (d = function _revive(e, t, s, l, f) {
5937
- if (u && "$types" === e) return;
6112
+ }) : (d = function _revive(e, t, s, u, f) {
6113
+ if (l && "$types" === e) return;
5938
6114
  var d = p.length,
5939
- m = i[e],
6115
+ m = n(i, e) ? i[e] : void 0,
5940
6116
  h = o(t);
5941
6117
  if (h || isPlainObject(t)) {
5942
- var _o3 = h ? new Array(t.length) : {};
6118
+ var _o4 = h ? new Array(t.length) : {};
5943
6119
  for (r(t).forEach(function (r) {
5944
- var n = _revive(e + (e ? "." : "") + escapeKeyPathComponent(r), t[r], s !== null && s !== void 0 ? s : _o3, _o3, r),
6120
+ var n = _revive(e + (e ? "." : "") + escapeKeyPathComponent(r), t[r], s !== null && s !== void 0 ? s : _o4, _o4, r),
5945
6121
  set = function set(e) {
5946
- return hasConstructorOf(e, Undefined) ? _o3[r] = void 0 : void 0 !== e && (_o3[r] = e), e;
6122
+ return hasConstructorOf(e, Undefined) ? setOwnEnumerable(_o4, r, void 0) : void 0 !== e && setOwnEnumerable(_o4, r, e), e;
5947
6123
  };
5948
6124
  hasConstructorOf(n, TypesonPromise) ? p.push(n.then(function (e) {
5949
6125
  return set(e);
5950
6126
  })) : set(n);
5951
- }), t = _o3; c.length;) {
6127
+ }), t = _o4; c.length;) {
5952
6128
  var _c$ = _slicedToArray(c[0], 4),
5953
- _e = _c$[0],
5954
- _t4 = _c$[1],
5955
- _r4 = _c$[2],
5956
- _o4 = _c$[3],
5957
- _s = n(y, _t4),
5958
- _a = _s ? y[_t4] : getByKeyPath(_e, _t4);
5959
- if (!_s && void 0 === _a) break;
5960
- _r4[_o4] = _a, c.shift();
6129
+ _e2 = _c$[0],
6130
+ _t6 = _c$[1],
6131
+ _r5 = _c$[2],
6132
+ _o5 = _c$[3],
6133
+ _s2 = n(y, _t6),
6134
+ _a = _s2 ? y[_t6] : getByKeyPath(_e2, _t6);
6135
+ if (!_s2 && void 0 === _a) break;
6136
+ setOwnEnumerable(_r5, _o5, _a), c.shift();
5961
6137
  }
5962
6138
  }
5963
6139
  if (!m) return y[e] = t, t;
5964
6140
  if ("#" === m) {
5965
- var _e2 = t.slice(1),
5966
- _r5 = n(y, _e2),
5967
- _o5 = _r5 ? y[_e2] : getByKeyPath(s, _e2);
5968
- return _r5 || void 0 !== _o5 || c.push([s, _e2, l, f]), _o5;
6141
+ var _e3 = t.slice(1),
6142
+ _r6 = n(y, _e3),
6143
+ _o6 = _r6 ? y[_e3] : getByKeyPath(s, _e3);
6144
+ return _r6 || void 0 !== _o6 || c.push([s, _e3, u, f]), _o6;
5969
6145
  }
5970
6146
  var applyType = function applyType(t) {
5971
6147
  var r = [].concat(m).reduce(function reducer(e, t) {
@@ -5984,9 +6160,9 @@
5984
6160
  }) : applyType(t);
5985
6161
  }("", e, null), p.length && (d = TypesonPromise.resolve(d).then(function (e) {
5986
6162
  return TypesonPromise.all([e].concat(p));
5987
- }).then(function (_ref0) {
5988
- var _ref1 = _slicedToArray(_ref0, 1),
5989
- e = _ref1[0];
6163
+ }).then(function (_ref1) {
6164
+ var _ref10 = _slicedToArray(_ref1, 1),
6165
+ e = _ref10[0];
5990
6166
  return e;
5991
6167
  }))), isThenable(d) ? a && s.throwOnBadSyncType ? function () {
5992
6168
  throw new TypeError("Sync method requested but async result obtained");
@@ -6021,49 +6197,50 @@
6021
6197
  o(e) ? e.forEach(function (e) {
6022
6198
  _reg(e);
6023
6199
  }) : r(e).forEach(function (t) {
6024
- var _r8;
6200
+ var _r9;
6025
6201
  if ("#" === t) throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");
6026
6202
  if (a.includes(t)) throw new TypeError("Plain JSON object types are reserved as type names");
6027
6203
  var r = e[t];
6028
- var s = r && "function" != typeof r && !Array.isArray(r) && r.testPlainObjects ? _this4.plainObjectReplacers : _this4.nonplainObjectReplacers,
6029
- i = s.filter(function (e) {
6204
+ if ([_this4.plainObjectReplacers, _this4.nonplainObjectReplacers].forEach(function (e) {
6205
+ var r = e.findIndex(function (e) {
6030
6206
  return e.type === t;
6031
6207
  });
6032
- if (i.length && (s.splice(s.indexOf(i[0]), 1), delete _this4.revivers[t], delete _this4.types[t]), "function" == typeof r) {
6033
- var _e3 = r;
6208
+ -1 !== r && e.splice(r, 1);
6209
+ }), delete _this4.revivers[t], delete _this4.types[t], "function" == typeof r) {
6210
+ var _e4 = r;
6034
6211
  r = {
6035
6212
  test: function test(t) {
6036
- return t && t.constructor === _e3;
6213
+ return t && t.constructor === _e4;
6037
6214
  },
6038
6215
  replace: function replace(e) {
6039
6216
  return _objectSpread2({}, e);
6040
6217
  },
6041
6218
  revive: function revive(t) {
6042
- return Object.assign(Object.create(_e3.prototype), t);
6219
+ return Object.assign(Object.create(_e4.prototype), t);
6043
6220
  }
6044
6221
  };
6045
6222
  } else if (o(r)) {
6046
- var _r6 = r,
6047
- _r7 = _slicedToArray(_r6, 3),
6048
- _e4 = _r7[0],
6049
- _t5 = _r7[1],
6050
- _n3 = _r7[2];
6223
+ var _r7 = r,
6224
+ _r8 = _slicedToArray(_r7, 3),
6225
+ _e5 = _r8[0],
6226
+ _t7 = _r8[1],
6227
+ _n2 = _r8[2];
6051
6228
  r = {
6052
- test: _e4,
6053
- replace: _t5,
6054
- revive: _n3
6229
+ test: _e5,
6230
+ replace: _t7,
6231
+ revive: _n2
6055
6232
  };
6056
6233
  }
6057
- if (!((_r8 = r) !== null && _r8 !== void 0 && _r8.test)) return;
6058
- var c = {
6234
+ if (!((_r9 = r) !== null && _r9 !== void 0 && _r9.test)) return;
6235
+ var s = {
6059
6236
  type: t,
6060
6237
  test: r.test.bind(r)
6061
6238
  };
6062
- r.replace && (c.replace = r.replace.bind(r)), r.replaceAsync && (c.replaceAsync = r.replaceAsync.bind(r));
6063
- var y = "number" == typeof n.fallback ? n.fallback : n.fallback ? 0 : 1 / 0;
6064
- if (r.testPlainObjects ? _this4.plainObjectReplacers.splice(y, 0, c) : _this4.nonplainObjectReplacers.splice(y, 0, c), r.revive || r.reviveAsync) {
6065
- var _e5 = {};
6066
- r.revive && (_e5.revive = r.revive.bind(r)), r.reviveAsync && (_e5.reviveAsync = r.reviveAsync.bind(r)), _this4.revivers[t] = [_e5, {
6239
+ r.replace && (s.replace = r.replace.bind(r)), r.replaceAsync && (s.replaceAsync = r.replaceAsync.bind(r));
6240
+ var i = "number" == typeof n.fallback ? n.fallback : n.fallback ? 0 : 1 / 0;
6241
+ if (r.testPlainObjects ? _this4.plainObjectReplacers.splice(i, 0, s) : _this4.nonplainObjectReplacers.splice(i, 0, s), r.revive || r.reviveAsync) {
6242
+ var _e6 = {};
6243
+ r.revive && (_e6.revive = r.revive.bind(r)), r.reviveAsync && (_e6.reviveAsync = r.reviveAsync.bind(r)), _this4.revivers[t] = [_e6, {
6067
6244
  plain: r.testPlainObjects
6068
6245
  }];
6069
6246
  }
@@ -6082,12 +6259,12 @@
6082
6259
  Undefined.__typeson__type__ = "TypesonUndefined";
6083
6260
  var a = ["null", "boolean", "number", "string", "array", "object"];
6084
6261
  for (var i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", c = new Uint8Array(256), y = 0; y < 64; y++) c[i.codePointAt(y)] = y;
6085
- var l = function encode(e, t, r) {
6262
+ var u = function encode(e, t, r) {
6086
6263
  null == r && (r = e.byteLength);
6087
6264
  for (var n = new Uint8Array(e, 0, r), o = n.length, s = "", a = 0; a < o; a += 3) s += i[n[a] >> 2], s += i[(3 & n[a]) << 4 | n[a + 1] >> 4], s += i[(15 & n[a + 1]) << 2 | n[a + 2] >> 6], s += i[63 & n[a + 2]];
6088
6265
  return o % 3 == 2 ? s = s.slice(0, -1) + "=" : o % 3 == 1 && (s = s.slice(0, -2) + "=="), s;
6089
6266
  },
6090
- u = function decode(e, t) {
6267
+ l = function decode(e, t) {
6091
6268
  var r = e.length;
6092
6269
  if (r % 4) throw new Error("Bad base64 length: not divisible by four");
6093
6270
  var n,
@@ -6097,8 +6274,8 @@
6097
6274
  i = .75 * e.length,
6098
6275
  y = 0;
6099
6276
  "=" === e[e.length - 1] && (i--, "=" === e[e.length - 2] && i--);
6100
- for (var l = new ArrayBuffer(i, t), u = new Uint8Array(l), p = 0; p < r; p += 4) n = c[e.codePointAt(p)], o = c[e.codePointAt(p + 1)], s = c[e.codePointAt(p + 2)], a = c[e.codePointAt(p + 3)], u[y++] = n << 2 | o >> 4, u[y++] = (15 & o) << 4 | s >> 2, u[y++] = (3 & s) << 6 | 63 & a;
6101
- return l;
6277
+ for (var u = new ArrayBuffer(i, t), l = new Uint8Array(u), p = 0; p < r; p += 4) n = c[e.codePointAt(p)], o = c[e.codePointAt(p + 1)], s = c[e.codePointAt(p + 2)], a = c[e.codePointAt(p + 3)], l[y++] = n << 2 | o >> 4, l[y++] = (15 & o) << 4 | s >> 2, l[y++] = (3 & s) << 6 | 63 & a;
6278
+ return u;
6102
6279
  };
6103
6280
  var p = {
6104
6281
  arraybuffer: {
@@ -6111,14 +6288,14 @@
6111
6288
  return -1 !== r ? {
6112
6289
  index: r
6113
6290
  } : (t.buffers.push(e), {
6114
- s: l(e),
6291
+ s: u(e),
6115
6292
  maxByteLength: e.maxByteLength,
6116
6293
  resizable: e.resizable
6117
6294
  });
6118
6295
  },
6119
6296
  revive: function revive(e, t) {
6120
6297
  if (t.buffers || (t.buffers = []), Object.hasOwn(e, "index")) return t.buffers[e.index];
6121
- var r = u(e.s, e.resizable ? {
6298
+ var r = l(e.s, e.resizable ? {
6122
6299
  maxByteLength: e.maxByteLength
6123
6300
  } : void 0);
6124
6301
  return t.buffers.push(r), r;
@@ -6154,7 +6331,7 @@
6154
6331
  }
6155
6332
  function string2arraybuffer(e) {
6156
6333
  var t = new Uint8Array(e.length);
6157
- for (var _r9 = 0; _r9 < e.length; _r9++) t[_r9] = e.charCodeAt(_r9);
6334
+ for (var _r0 = 0; _r0 < e.length; _r0++) t[_r0] = e.charCodeAt(_r0);
6158
6335
  return t.buffer;
6159
6336
  }
6160
6337
  var m = {
@@ -6199,8 +6376,8 @@
6199
6376
  },
6200
6377
  replaceAsync: function replaceAsync(e) {
6201
6378
  return new TypesonPromise(/*#__PURE__*/function () {
6202
- var _ref10 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(t, r) {
6203
- var n, _t6;
6379
+ var _ref11 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(t, r) {
6380
+ var n, _t8;
6204
6381
  return _regenerator().w(function (_context3) {
6205
6382
  while (1) switch (_context3.p = _context3.n) {
6206
6383
  case 0:
@@ -6213,8 +6390,8 @@
6213
6390
  break;
6214
6391
  case 2:
6215
6392
  _context3.p = 2;
6216
- _t6 = _context3.v;
6217
- return _context3.a(2, void r(_t6));
6393
+ _t8 = _context3.v;
6394
+ return _context3.a(2, void r(_t8));
6218
6395
  case 3:
6219
6396
  t({
6220
6397
  jwk: n,
@@ -6227,7 +6404,7 @@
6227
6404
  }, _callee3, null, [[0, 2]]);
6228
6405
  }));
6229
6406
  return function (_x4, _x5) {
6230
- return _ref10.apply(this, arguments);
6407
+ return _ref11.apply(this, arguments);
6231
6408
  };
6232
6409
  }());
6233
6410
  },
@@ -6244,10 +6421,10 @@
6244
6421
  test: function test(e) {
6245
6422
  return "DataView" === toStringTag(e);
6246
6423
  },
6247
- replace: function replace(_ref11, n) {
6248
- var e = _ref11.buffer,
6249
- t = _ref11.byteOffset,
6250
- r = _ref11.byteLength;
6424
+ replace: function replace(_ref12, n) {
6425
+ var e = _ref12.buffer,
6426
+ t = _ref12.byteOffset,
6427
+ r = _ref12.byteLength;
6251
6428
  n.buffers || (n.buffers = []);
6252
6429
  var o = n.buffers.indexOf(e);
6253
6430
  return -1 !== o ? {
@@ -6255,7 +6432,7 @@
6255
6432
  byteOffset: t,
6256
6433
  byteLength: r
6257
6434
  } : (n.buffers.push(e), {
6258
- encoded: l(e),
6435
+ encoded: u(e),
6259
6436
  maxByteLength: e.maxByteLength,
6260
6437
  resizable: e.resizable,
6261
6438
  byteOffset: t,
@@ -6271,7 +6448,7 @@
6271
6448
  a = e.maxByteLength,
6272
6449
  i = e.resizable;
6273
6450
  var c;
6274
- return "index" in e ? c = t.buffers[s] : (c = u(o, i ? {
6451
+ return "index" in e ? c = t.buffers[s] : (c = l(o, i ? {
6275
6452
  maxByteLength: a
6276
6453
  } : a), t.buffers.push(c)), new DataView(c, r, n);
6277
6454
  }
@@ -6302,9 +6479,9 @@
6302
6479
  message: e.message
6303
6480
  };
6304
6481
  },
6305
- revive: function revive(_ref12) {
6306
- var e = _ref12.message,
6307
- t = _ref12.name;
6482
+ revive: function revive(_ref13) {
6483
+ var e = _ref13.message,
6484
+ t = _ref13.name;
6308
6485
  return new DOMException(e, t);
6309
6486
  }
6310
6487
  }
@@ -6362,11 +6539,11 @@
6362
6539
  w: e.w
6363
6540
  };
6364
6541
  },
6365
- revive: function revive(_ref13) {
6366
- var t = _ref13.x,
6367
- r = _ref13.y,
6368
- n = _ref13.z,
6369
- o = _ref13.w;
6542
+ revive: function revive(_ref14) {
6543
+ var t = _ref14.x,
6544
+ r = _ref14.y,
6545
+ n = _ref14.z,
6546
+ o = _ref14.w;
6370
6547
  return new e(t, r, n, o);
6371
6548
  }
6372
6549
  };
@@ -6385,11 +6562,11 @@
6385
6562
  p4: e.p4
6386
6563
  };
6387
6564
  },
6388
- revive: function revive(_ref14) {
6389
- var e = _ref14.p1,
6390
- t = _ref14.p2,
6391
- r = _ref14.p3,
6392
- n = _ref14.p4;
6565
+ revive: function revive(_ref15) {
6566
+ var e = _ref15.p1,
6567
+ t = _ref15.p2,
6568
+ r = _ref15.p3,
6569
+ n = _ref15.p4;
6393
6570
  return new DOMQuad(e, t, r, n);
6394
6571
  }
6395
6572
  }
@@ -6408,11 +6585,11 @@
6408
6585
  height: e.height
6409
6586
  };
6410
6587
  },
6411
- revive: function revive(_ref15) {
6412
- var t = _ref15.x,
6413
- r = _ref15.y,
6414
- n = _ref15.width,
6415
- o = _ref15.height;
6588
+ revive: function revive(_ref16) {
6589
+ var t = _ref16.x,
6590
+ r = _ref16.y,
6591
+ n = _ref16.width,
6592
+ o = _ref16.height;
6416
6593
  return new e(t, r, n, o);
6417
6594
  }
6418
6595
  };
@@ -6423,14 +6600,14 @@
6423
6600
  test: function test(e) {
6424
6601
  return "Error" === toStringTag(e);
6425
6602
  },
6426
- replace: function replace(_ref16) {
6427
- var e = _ref16.name,
6428
- t = _ref16.message,
6429
- r = _ref16.cause,
6430
- n = _ref16.stack,
6431
- o = _ref16.fileName,
6432
- s = _ref16.lineNumber,
6433
- a = _ref16.columnNumber;
6603
+ replace: function replace(_ref17) {
6604
+ var e = _ref17.name,
6605
+ t = _ref17.message,
6606
+ r = _ref17.cause,
6607
+ n = _ref17.stack,
6608
+ o = _ref17.fileName,
6609
+ s = _ref17.lineNumber,
6610
+ a = _ref17.columnNumber;
6434
6611
  return {
6435
6612
  name: e,
6436
6613
  message: t,
@@ -6453,15 +6630,15 @@
6453
6630
  test: function test(t) {
6454
6631
  return hasConstructorOf(t, e);
6455
6632
  },
6456
- replace: function replace(_ref17) {
6457
- var e = _ref17.name,
6458
- t = _ref17.message,
6459
- r = _ref17.cause,
6460
- n = _ref17.stack,
6461
- o = _ref17.fileName,
6462
- s = _ref17.lineNumber,
6463
- a = _ref17.columnNumber,
6464
- i = _ref17.errors;
6633
+ replace: function replace(_ref18) {
6634
+ var e = _ref18.name,
6635
+ t = _ref18.message,
6636
+ r = _ref18.cause,
6637
+ n = _ref18.stack,
6638
+ o = _ref18.fileName,
6639
+ s = _ref18.lineNumber,
6640
+ a = _ref18.columnNumber,
6641
+ i = _ref18.errors;
6465
6642
  return {
6466
6643
  name: e,
6467
6644
  message: t,
@@ -6482,7 +6659,7 @@
6482
6659
  [TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError].forEach(function (e) {
6483
6660
  return create$2(e);
6484
6661
  }), "undefined" != typeof AggregateError && create$2(AggregateError), "function" == typeof InternalError && create$2(InternalError);
6485
- var N = {
6662
+ var E = {
6486
6663
  file: {
6487
6664
  test: function test(e) {
6488
6665
  return "File" === toStringTag(e);
@@ -6497,11 +6674,11 @@
6497
6674
  lastModified: e.lastModified
6498
6675
  };
6499
6676
  },
6500
- revive: function revive(_ref18) {
6501
- var e = _ref18.name,
6502
- t = _ref18.type,
6503
- r = _ref18.stringContents,
6504
- n = _ref18.lastModified;
6677
+ revive: function revive(_ref19) {
6678
+ var e = _ref19.name,
6679
+ t = _ref19.type,
6680
+ r = _ref19.stringContents,
6681
+ n = _ref19.lastModified;
6505
6682
  return new File([string2arraybuffer(r)], e, {
6506
6683
  type: t,
6507
6684
  lastModified: n
@@ -6524,15 +6701,15 @@
6524
6701
  }
6525
6702
  }
6526
6703
  },
6527
- _ = {
6528
- file: N.file,
6704
+ N = {
6705
+ file: E.file,
6529
6706
  filelist: {
6530
6707
  test: function test(e) {
6531
6708
  return "FileList" === toStringTag(e);
6532
6709
  },
6533
6710
  replace: function replace(e) {
6534
6711
  var t = [];
6535
- for (var _r0 = 0; _r0 < e.length; _r0++) t[_r0] = e.item(_r0);
6712
+ for (var _r1 = 0; _r1 < e.length; _r1++) t[_r1] = e.item(_r1);
6536
6713
  return t;
6537
6714
  },
6538
6715
  revive: function revive(e) {
@@ -6557,7 +6734,7 @@
6557
6734
  }
6558
6735
  }
6559
6736
  },
6560
- B = {
6737
+ _ = {
6561
6738
  imagebitmap: {
6562
6739
  test: function test(e) {
6563
6740
  return "ImageBitmap" === toStringTag(e) || e && e.dataset && "ImageBitmap" === e.dataset.toStringTag;
@@ -6585,36 +6762,36 @@
6585
6762
  return n.addEventListener("load", function () {
6586
6763
  r.drawImage(n, 0, 0);
6587
6764
  }), n.src = e.dataURL, new TypesonPromise(/*#__PURE__*/function () {
6588
- var _ref19 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(e, r) {
6589
- var _t7, _t8;
6765
+ var _ref20 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(e, r) {
6766
+ var _t9, _t0;
6590
6767
  return _regenerator().w(function (_context4) {
6591
6768
  while (1) switch (_context4.p = _context4.n) {
6592
6769
  case 0:
6593
6770
  _context4.p = 0;
6594
- _t7 = e;
6771
+ _t9 = e;
6595
6772
  _context4.n = 1;
6596
6773
  return createImageBitmap(t);
6597
6774
  case 1:
6598
- _t7(_context4.v);
6775
+ _t9(_context4.v);
6599
6776
  _context4.n = 3;
6600
6777
  break;
6601
6778
  case 2:
6602
6779
  _context4.p = 2;
6603
- _t8 = _context4.v;
6604
- r(_t8);
6780
+ _t0 = _context4.v;
6781
+ r(_t0);
6605
6782
  case 3:
6606
6783
  return _context4.a(2);
6607
6784
  }
6608
6785
  }, _callee4, null, [[0, 2]]);
6609
6786
  }));
6610
6787
  return function (_x6, _x7) {
6611
- return _ref19.apply(this, arguments);
6788
+ return _ref20.apply(this, arguments);
6612
6789
  };
6613
6790
  }());
6614
6791
  }
6615
6792
  }
6616
6793
  },
6617
- E = {
6794
+ B = {
6618
6795
  imagedata: {
6619
6796
  test: function test(e) {
6620
6797
  return "ImageData" === toStringTag(e);
@@ -6631,7 +6808,7 @@
6631
6808
  }
6632
6809
  }
6633
6810
  },
6634
- C = {
6811
+ I = {
6635
6812
  infinity: {
6636
6813
  test: function test(e) {
6637
6814
  return e === 1 / 0;
@@ -6696,7 +6873,7 @@
6696
6873
  }
6697
6874
  }
6698
6875
  },
6699
- k = {
6876
+ R = {
6700
6877
  StringObject: {
6701
6878
  test: function test(e) {
6702
6879
  return "String" === toStringTag(e) && "object" == _typeof$1(e);
@@ -6727,7 +6904,7 @@
6727
6904
  }
6728
6905
  }
6729
6906
  },
6730
- $ = {
6907
+ K = {
6731
6908
  regexp: {
6732
6909
  test: function test(e) {
6733
6910
  return "RegExp" === toStringTag(e);
@@ -6738,14 +6915,14 @@
6738
6915
  flags: (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.sticky ? "y" : "") + (e.unicode ? "u" : "") + (e.unicodeSets ? "v" : "") + (e.hasIndices ? "d" : "") + (e.dotAll ? "s" : "")
6739
6916
  };
6740
6917
  },
6741
- revive: function revive(_ref21) {
6742
- var e = _ref21.source,
6743
- t = _ref21.flags;
6918
+ revive: function revive(_ref22) {
6919
+ var e = _ref22.source,
6920
+ t = _ref22.flags;
6744
6921
  return new RegExp(e, t);
6745
6922
  }
6746
6923
  }
6747
6924
  },
6748
- J = {
6925
+ z = {
6749
6926
  set: {
6750
6927
  test: function test(e) {
6751
6928
  return "Set" === toStringTag(e);
@@ -6783,10 +6960,10 @@
6783
6960
  test: function test(e) {
6784
6961
  return toStringTag(e) === t;
6785
6962
  },
6786
- replace: function replace(_ref22, n) {
6787
- var e = _ref22.buffer,
6788
- t = _ref22.byteOffset,
6789
- r = _ref22.length;
6963
+ replace: function replace(_ref23, n) {
6964
+ var e = _ref23.buffer,
6965
+ t = _ref23.byteOffset,
6966
+ r = _ref23.length;
6790
6967
  n.buffers || (n.buffers = []);
6791
6968
  var o = n.buffers.indexOf(e);
6792
6969
  return -1 !== o ? {
@@ -6796,7 +6973,7 @@
6796
6973
  } : (n.buffers.push(e), {
6797
6974
  maxByteLength: e.maxByteLength,
6798
6975
  resizable: e.resizable,
6799
- encoded: l(e),
6976
+ encoded: u(e),
6800
6977
  byteOffset: t,
6801
6978
  length: r
6802
6979
  });
@@ -6810,7 +6987,7 @@
6810
6987
  i = t.maxByteLength,
6811
6988
  c = t.resizable;
6812
6989
  var y;
6813
- return "index" in t ? y = r.buffers[a] : (y = u(s, c ? {
6990
+ return "index" in t ? y = r.buffers[a] : (y = l(s, c ? {
6814
6991
  maxByteLength: i
6815
6992
  } : void 0), r.buffers.push(y)), new e(y, n, o);
6816
6993
  }
@@ -6857,10 +7034,10 @@
6857
7034
  revive: function revive(e) {
6858
7035
  if (Array.isArray(e)) return e;
6859
7036
  var t = [];
6860
- return Object.entries(e).forEach(function (_ref23) {
6861
- var _ref24 = _slicedToArray(_ref23, 2),
6862
- e = _ref24[0],
6863
- r = _ref24[1];
7037
+ return Object.entries(e).forEach(function (_ref24) {
7038
+ var _ref25 = _slicedToArray(_ref24, 2),
7039
+ e = _ref25[0],
7040
+ r = _ref25[1];
6864
7041
  t[e] = r;
6865
7042
  }), t;
6866
7043
  }
@@ -6876,8 +7053,8 @@
6876
7053
  revive: function revive() {}
6877
7054
  }
6878
7055
  }],
6879
- X = [M, C, L, D],
6880
- re = [G, Q, H, k, X, O, $, E, B, N, _, m, x, j].concat("function" == typeof Map ? U : [], "function" == typeof Set ? J : [], "function" == typeof ArrayBuffer ? p : [], "function" == typeof Uint8Array ? W : [], "function" == typeof DataView ? v : [], "undefined" != typeof crypto ? b : [], "undefined" != typeof BigInt ? [d, f] : [], "undefined" != typeof DOMException ? w : [], "undefined" != typeof DOMRect ? S : [], "undefined" != typeof DOMPoint ? A : [], "undefined" != typeof DOMQuad ? P : [], "undefined" != typeof DOMMatrix ? T : []),
7056
+ X = [M, I, L, D],
7057
+ re = [G, Q, H, R, X, O, K, B, _, E, N, m, x, j].concat("function" == typeof Map ? U : [], "function" == typeof Set ? z : [], "function" == typeof ArrayBuffer ? p : [], "function" == typeof Uint8Array ? W : [], "function" == typeof DataView ? v : [], "undefined" != typeof crypto ? b : [], "undefined" != typeof BigInt ? [d, f] : [], "undefined" != typeof DOMException ? w : [], "undefined" != typeof DOMRect ? S : [], "undefined" != typeof DOMPoint ? A : [], "undefined" != typeof DOMQuad ? P : [], "undefined" != typeof DOMMatrix ? T : []),
6881
7058
  ne = re.concat({
6882
7059
  checkDataCloneException: {
6883
7060
  test: function test(e) {
@@ -7641,7 +7818,7 @@
7641
7818
  reject(err);
7642
7819
  });
7643
7820
  }));
7644
- SyncPromise.all(indexCreations).then(finish, /** @type {(reason: any) => PromiseLike<never>} */
7821
+ SyncPromise.all(indexCreations).then(finish).catch(/** @type {(reason: any) => PromiseLike<never>} */
7645
7822
  error).catch(function (err) {
7646
7823
  console.log('Index rename error');
7647
7824
  throw err;
@@ -9834,7 +10011,7 @@
9834
10011
  * __connections: {
9835
10012
  * [key: string]: import('./IDBDatabase.js').IDBDatabaseFull[]
9836
10013
  * }
9837
- * }} IDBFactoryFull
10014
+ * }} IDBFactoryFull
9838
10015
  */
9839
10016
 
9840
10017
  var IDBFactoryAlias = IDBFactory;
@@ -10025,7 +10202,7 @@
10025
10202
  /** @type {import('./IDBDatabase.js').IDBDatabaseFull} */
10026
10203
  req.__result.__versionTransaction = null;
10027
10204
  sysdbFinishedCb(systx, false, function () {
10028
- req.transaction.__transFinishedCb(false, function () {
10205
+ req.transaction.__callTransFinishedCb(false, function () {
10029
10206
  ev.complete();
10030
10207
  req.__transaction = null;
10031
10208
  });
@@ -10136,6 +10313,13 @@
10136
10313
  function openDB(oldVersion) {
10137
10314
  /** @type {DatabaseFull} */
10138
10315
  var db;
10316
+ if (version === undefined) {
10317
+ // Resolve before use as a cache key below, or a `open(name)` call
10318
+ // (no explicit version) would cache/look up under `undefined`
10319
+ // instead of the actual version, causing a second, separate
10320
+ // connection to be opened for the same database on reopen.
10321
+ version = oldVersion || 1;
10322
+ }
10139
10323
  if ((useMemoryDatabase || useDatabaseCache) && Object.hasOwn(websqlDBCache, name) && Object.hasOwn(websqlDBCache[name], version)) {
10140
10324
  db = websqlDBCache[name][version];
10141
10325
  } else {
@@ -10147,9 +10331,6 @@
10147
10331
  websqlDBCache[name][version] = db;
10148
10332
  }
10149
10333
  }
10150
- if (version === undefined) {
10151
- version = oldVersion || 1;
10152
- }
10153
10334
  if (oldVersion > version) {
10154
10335
  var err = createDOMException('VersionError', 'An attempt was made to open a database using a lower version than the existing version.', version);
10155
10336
  if (useDatabaseCache) {
@@ -10317,7 +10498,6 @@
10317
10498
  version = _data$rows$item.version;
10318
10499
  var openConnections = me.__connections[name] || [];
10319
10500
  triggerAnyVersionChangeAndBlockedEvents(openConnections, req, version, null).then(function () {
10320
- // eslint-disable-line promise/catch-or-return -- Sync promise
10321
10501
  // Since we need two databases which can't be in a single transaction, we
10322
10502
  // do this deleting from `dbVersions` first since the `__sys__` deleting
10323
10503
  // only impacts file memory whereas this one is critical for avoiding it
@@ -10346,7 +10526,7 @@
10346
10526
  });
10347
10527
  return undefined;
10348
10528
  // @ts-expect-error It's ok
10349
- }, dbError);
10529
+ }).catch(dbError);
10350
10530
  return undefined;
10351
10531
  }, dbError);
10352
10532
  });
@@ -10377,14 +10557,14 @@
10377
10557
  };
10378
10558
 
10379
10559
  /**
10380
- * May return outdated information if a database has since been deleted.
10381
- * @see https://github.com/w3c/IndexedDB/pull/240/files
10382
- * @this {IDBFactoryFull}
10383
- * @returns {Promise<{
10384
- * name: string,
10385
- * version: Integer
10386
- * }[]>}
10387
- */
10560
+ * May return outdated information if a database has since been deleted.
10561
+ * @see https://github.com/w3c/IndexedDB/pull/240/files
10562
+ * @this {IDBFactoryFull}
10563
+ * @returns {Promise<{
10564
+ * name: string,
10565
+ * version: Integer
10566
+ * }[]>}
10567
+ */
10388
10568
  IDBFactory.prototype.databases = function () {
10389
10569
  var me = this;
10390
10570
  var calledDbCreateError = false;
@@ -10432,17 +10612,17 @@
10432
10612
  };
10433
10613
 
10434
10614
  /**
10435
- * @todo forceClose: Test
10436
- * This is provided to facilitate unit-testing of the
10437
- * closing of a database connection with a forced flag:
10438
- * <https://w3c.github.io/IndexedDB/#steps-for-closing-a-database-connection>
10439
- * @param {string} dbName
10440
- * @param {Integer} connIdx
10441
- * @param {string} msg
10442
- * @throws {TypeError}
10443
- * @this {IDBFactoryFull}
10444
- * @returns {void}
10445
- */
10615
+ * @todo forceClose: Test
10616
+ * This is provided to facilitate unit-testing of the
10617
+ * closing of a database connection with a forced flag:
10618
+ * <https://w3c.github.io/IndexedDB/#steps-for-closing-a-database-connection>
10619
+ * @param {string} dbName
10620
+ * @param {Integer} connIdx
10621
+ * @param {string} msg
10622
+ * @throws {TypeError}
10623
+ * @this {IDBFactoryFull}
10624
+ * @returns {void}
10625
+ */
10446
10626
  IDBFactory.prototype.__forceClose = function (dbName, connIdx, msg) {
10447
10627
  var me = this;
10448
10628
  /**
@@ -10528,6 +10708,9 @@
10528
10708
  * __unique: boolean,
10529
10709
  * __sqlDirection: "DESC"|"ASC",
10530
10710
  * __matchedKeys: {[key: string]: true},
10711
+ * __continuationKey: import('./Key.js').Key|undefined,
10712
+ * __continuationPrimaryKey: import('./Key.js').Key|undefined,
10713
+ * __multiEntryExhausted: boolean,
10531
10714
  * __invalidateCache: () => void
10532
10715
  * }} IDBCursorFull
10533
10716
  */
@@ -10601,6 +10784,9 @@
10601
10784
  this.__valueDecoder = this.__keyOnly ? Key : Sca;
10602
10785
  this.__count = count;
10603
10786
  this.__prefetchedIndex = -1;
10787
+ this.__continuationKey = undefined;
10788
+ this.__continuationPrimaryKey = undefined;
10789
+ this.__multiEntryExhausted = false;
10604
10790
  this.__multiEntryIndex = this.__indexSource ? 'multiEntry' in source && source.multiEntry : false;
10605
10791
  this.__unique = this.direction.includes('unique');
10606
10792
  this.__sqlDirection = ['prev', 'prevunique'].includes(this.direction) ? 'DESC' : 'ASC';
@@ -10764,73 +10950,97 @@
10764
10950
  * @param {SQLTransaction} tx
10765
10951
  * @param {KeySuccess} success
10766
10952
  * @param {FindError} error
10767
- * @param {Integer|undefined} recordsToLoad
10953
+ * @param {Integer} [recordsToLoad]
10768
10954
  * @this {IDBCursorFull}
10769
10955
  * @returns {void}
10770
10956
  */
10771
- IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, error, recordsToLoad) {
10957
+ IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, error) {
10958
+ var recordsToLoad = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
10772
10959
  var me = this;
10773
- if (me.__prefetchedData && me.__prefetchedData.length === me.__prefetchedIndex) {
10960
+ if (me.__multiEntryExhausted) {
10774
10961
  if (CFG.DEBUG) {
10775
- console.log('Reached end of multiEntry cursor');
10962
+ console.log('[multiEntry] Reached end of multiEntry cursor (already exhausted)');
10776
10963
  }
10777
10964
  success(undefined, undefined, undefined);
10778
10965
  return;
10779
10966
  }
10780
10967
  var quotedKeyColumnName = sqlQuote(me.__keyColumnName);
10781
- var sql = ['SELECT * FROM', escapeStoreNameForSQL(me.__store.__currentName)];
10782
- /** @type {string[]} */
10783
- var sqlValues = [];
10784
- sql.push('WHERE', quotedKeyColumnName, 'NOT NULL');
10785
- if (me.__range && me.__range.lower !== undefined && Array.isArray(me.__range.upper)) {
10786
- if (me.__range.upper.indexOf(me.__range.lower) === 0) {
10787
- sql.push('AND', quotedKeyColumnName, "LIKE ? ESCAPE '^'");
10788
- sqlValues.push('%' + sqlLIKEEscape(/** @type {string} */me.__range.__lowerCached.slice(0, -1)) + '%');
10789
- }
10790
- }
10968
+ var quotedKey = sqlQuote('key');
10791
10969
 
10792
10970
  // Determine the ORDER BY direction based on the cursor.
10793
10971
  var direction = me.__sqlDirection;
10794
10972
  var op = direction === 'ASC' ? '>' : '<';
10795
- var quotedKey = sqlQuote('key');
10796
- if (primaryKey !== undefined) {
10797
- sql.push('AND', quotedKey, op + '= ?');
10798
- // Key.convertValueToKey(primaryKey); // Already checked by `continuePrimaryKey`
10799
- sqlValues.push(/** @type {string} */_encode(primaryKey));
10800
- }
10801
- if (key !== undefined) {
10802
- sql.push('AND', quotedKeyColumnName, op + '= ?');
10803
- // Key.convertValueToKey(key); // Already checked by `continue` or `continuePrimaryKey`
10804
- sqlValues.push(/** @type {string} */_encode(key));
10805
- } else if (me.__key !== undefined) {
10806
- sql.push('AND', quotedKeyColumnName, op + ' ?');
10807
- // Key.convertValueToKey(me.__key); // Already checked when entered
10808
- sqlValues.push(/** @type {string} */_encode(me.__key));
10809
- }
10810
- if (!me.__count) {
10811
- // 1. Sort by key
10812
- sql.push('ORDER BY', quotedKeyColumnName, direction);
10813
10973
 
10814
- // 2. Sort by primaryKey (if defined and not unique)
10815
- if (!me.__unique && me.__keyColumnName !== 'key') {
10816
- // Avoid adding 'key' twice
10817
- sql.push(',', sqlQuote('key'), direction);
10974
+ /**
10975
+ * Runs (and, if a batch of underlying rows produces no matching
10976
+ * multi-entry values, repeatedly re-runs) the query for the next batch
10977
+ * of underlying rows, advancing `me.__continuationKey`/
10978
+ * `me.__continuationPrimaryKey` (tracking the last *physical* row
10979
+ * scanned) each time, until either some matches are found or the
10980
+ * underlying table is exhausted.
10981
+ * @returns {void}
10982
+ */
10983
+ function runQuery() {
10984
+ var sql = ['SELECT * FROM', escapeStoreNameForSQL(me.__store.__currentName)];
10985
+ /** @type {string[]} */
10986
+ var sqlValues = [];
10987
+ sql.push('WHERE', quotedKeyColumnName, 'NOT NULL');
10988
+ if (me.__range && me.__range.lower !== undefined && Array.isArray(me.__range.upper)) {
10989
+ if (me.__range.upper.indexOf(me.__range.lower) === 0) {
10990
+ sql.push('AND', quotedKeyColumnName, "LIKE ? ESCAPE '^'");
10991
+ sqlValues.push('%' + sqlLIKEEscape(/** @type {string} */me.__range.__lowerCached.slice(0, -1)) + '%');
10992
+ }
10993
+ }
10994
+ if (primaryKey !== undefined) {
10995
+ sql.push('AND', quotedKey, op + '= ?');
10996
+ // Key.convertValueToKey(primaryKey); // Already checked by `continuePrimaryKey`
10997
+ sqlValues.push(/** @type {string} */_encode(primaryKey));
10818
10998
  }
10819
-
10820
- // 3. Sort by position (if defined)
10821
-
10822
- if (!me.__unique && me.__indexSource) {
10823
- // 4. Sort by object store position (if defined and not unique)
10824
- sql.push(',', sqlQuote(me.__valueColumnName), direction);
10999
+ if (key !== undefined) {
11000
+ sql.push('AND', quotedKeyColumnName, op + '= ?');
11001
+ // Key.convertValueToKey(key); // Already checked by `continue` or `continuePrimaryKey`
11002
+ sqlValues.push(/** @type {string} */_encode(key));
11003
+ } else if (me.__continuationKey !== undefined) {
11004
+ // Resume from the last underlying (physical) row we scanned, not
11005
+ // from the last *matching* multi-entry value (which lives in a
11006
+ // different key-space than the raw index column and cannot be
11007
+ // reliably compared against it, e.g. for array index keys).
11008
+ sql.push('AND (', quotedKeyColumnName, op, '?', 'OR (', quotedKeyColumnName, '= ?', 'AND', quotedKey, op, '?))');
11009
+ var encodedContinuationKey = /** @type {string} */
11010
+ _encode(me.__continuationKey, true);
11011
+ sqlValues.push(encodedContinuationKey, encodedContinuationKey, /** @type {string} */_encode(me.__continuationPrimaryKey));
11012
+ }
11013
+ if (!me.__count) {
11014
+ // 1. Sort by key
11015
+ sql.push('ORDER BY', quotedKeyColumnName, direction);
11016
+
11017
+ // 2. Sort by primaryKey (if defined and not unique)
11018
+ if (!me.__unique && me.__keyColumnName !== 'key') {
11019
+ // Avoid adding 'key' twice
11020
+ sql.push(',', sqlQuote('key'), direction);
11021
+ }
11022
+
11023
+ // 3. Sort by position (if defined)
11024
+
11025
+ if (!me.__unique && me.__indexSource) {
11026
+ // 4. Sort by object store position (if defined and not unique)
11027
+ sql.push(',', sqlQuote(me.__valueColumnName), direction);
11028
+ }
11029
+ sql.push('LIMIT', String(recordsToLoad));
11030
+ }
11031
+ var sqlStr = sql.join(' ');
11032
+ if (CFG.DEBUG) {
11033
+ console.log('[multiEntry] query', sqlStr, sqlValues);
10825
11034
  }
10826
- sql.push('LIMIT', String(recordsToLoad));
10827
- }
10828
- var sqlStr = sql.join(' ');
10829
- if (CFG.DEBUG) {
10830
- console.log(sqlStr, sqlValues);
10831
- }
10832
- tx.executeSql(sqlStr, sqlValues, function (tx, data) {
10833
- if (data.rows.length > 0) {
11035
+ tx.executeSql(sqlStr, sqlValues, function (tx, data) {
11036
+ if (data.rows.length === 0) {
11037
+ me.__multiEntryExhausted = true;
11038
+ if (CFG.DEBUG) {
11039
+ console.log('[multiEntry] Reached end of multiEntry cursor (no more rows)');
11040
+ }
11041
+ success(undefined, undefined, undefined);
11042
+ return;
11043
+ }
10834
11044
  if (me.__count) {
10835
11045
  // Avoid caching and other processing below
10836
11046
  var ct = 0;
@@ -10843,6 +11053,16 @@
10843
11053
  success(undefined, ct, undefined);
10844
11054
  return;
10845
11055
  }
11056
+
11057
+ // Track how far we've physically scanned, regardless of whether
11058
+ // this batch produced any matches, so the next batch (if any)
11059
+ // resumes after this one instead of re-scanning or stopping early.
11060
+ var lastRawRow = data.rows.item(data.rows.length - 1);
11061
+ me.__continuationKey = _decode(lastRawRow[me.__keyColumnName], true);
11062
+ me.__continuationPrimaryKey = _decode(lastRawRow.key);
11063
+ if (data.rows.length < recordsToLoad) {
11064
+ me.__multiEntryExhausted = true;
11065
+ }
10846
11066
  var rows = [];
10847
11067
  for (var _i = 0; _i < data.rows.length; _i++) {
10848
11068
  var _rowItem = data.rows.item(_i);
@@ -10869,6 +11089,20 @@
10869
11089
  _iterator.f();
10870
11090
  }
10871
11091
  }
11092
+ if (rows.length === 0) {
11093
+ if (me.__multiEntryExhausted) {
11094
+ if (CFG.DEBUG) {
11095
+ console.log('[multiEntry] Reached end of multiEntry cursor (last batch had no matches)');
11096
+ }
11097
+ success(undefined, undefined, undefined);
11098
+ return;
11099
+ }
11100
+ if (CFG.DEBUG) {
11101
+ console.log('[multiEntry] batch had no matches; fetching next batch');
11102
+ }
11103
+ runQuery();
11104
+ return;
11105
+ }
10872
11106
  var reverse = me.direction.indexOf('prev') === 0;
10873
11107
  rows.sort(function (a, b) {
10874
11108
  if (a.matchingKey.replaceAll(leftBracketRegex, 'z') < b.matchingKey.replaceAll(leftBracketRegex, 'z')) {
@@ -10885,47 +11119,31 @@
10885
11119
  }
10886
11120
  return 0;
10887
11121
  });
10888
- if (rows.length > 1) {
10889
- me.__prefetchedIndex = 0;
10890
- me.__prefetchedData = {
10891
- data: rows,
10892
- length: rows.length,
10893
- /**
10894
- * @param {Integer} index
10895
- * @returns {RowItemNonNull}
10896
- */
10897
- item: function item(index) {
10898
- return this.data[index];
10899
- }
10900
- };
10901
- if (CFG.DEBUG) {
10902
- console.log('Preloaded ' + me.__prefetchedData.length + ' records for multiEntry cursor');
10903
- }
10904
- me.__decode(rows[0], success);
10905
- } else if (rows.length === 1) {
10906
- if (CFG.DEBUG) {
10907
- console.log('Reached end of multiEntry cursor');
10908
- }
10909
- me.__decode(rows[0], success);
10910
- } else {
10911
- if (CFG.DEBUG) {
10912
- console.log('Reached end of multiEntry cursor');
11122
+ me.__prefetchedIndex = 0;
11123
+ me.__prefetchedData = {
11124
+ data: rows,
11125
+ length: rows.length,
11126
+ /**
11127
+ * @param {Integer} index
11128
+ * @returns {RowItemNonNull}
11129
+ */
11130
+ item: function item(index) {
11131
+ return this.data[index];
10913
11132
  }
10914
- success(undefined, undefined, undefined);
11133
+ };
11134
+ if (CFG.DEBUG) {
11135
+ console.log('[multiEntry] Preloaded ' + me.__prefetchedData.length + ' records for multiEntry cursor');
10915
11136
  }
10916
- } else {
11137
+ me.__decode(rows[0], success);
11138
+ }, function (tx, err) {
10917
11139
  if (CFG.DEBUG) {
10918
- console.log('Reached end of multiEntry cursor');
11140
+ console.log('[multiEntry] Could not execute Cursor.continue', sqlStr, sqlValues);
10919
11141
  }
10920
- success(undefined, undefined, undefined);
10921
- }
10922
- }, function (tx, err) {
10923
- if (CFG.DEBUG) {
10924
- console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
10925
- }
10926
- error(err);
10927
- return false;
10928
- });
11142
+ error(err);
11143
+ return false;
11144
+ });
11145
+ }
11146
+ runQuery();
10929
11147
  };
10930
11148
 
10931
11149
  /**
@@ -10937,19 +11155,19 @@
10937
11155
  */
10938
11156
 
10939
11157
  /**
10940
- * @callback SuccessArg
10941
- * @param {StructuredCloneValue} value
10942
- * @param {import('./IDBRequest.js').IDBRequestFull} req
10943
- * @returns {void}
10944
- */
11158
+ * @callback SuccessArg
11159
+ * @param {StructuredCloneValue} value
11160
+ * @param {import('./IDBRequest.js').IDBRequestFull} req
11161
+ * @returns {void}
11162
+ */
10945
11163
 
10946
11164
  /**
10947
- * @callback SuccessCallback
10948
- * @param {IndexedDBKey} key
10949
- * @param {StructuredCloneValue} value
10950
- * @param {IndexedDBKey} primaryKey
10951
- * @returns {void}
10952
- */
11165
+ * @callback SuccessCallback
11166
+ * @param {IndexedDBKey} key
11167
+ * @param {StructuredCloneValue} value
11168
+ * @param {IndexedDBKey} primaryKey
11169
+ * @returns {void}
11170
+ */
10953
11171
 
10954
11172
  /**
10955
11173
  * Creates an "onsuccess" callback.
@@ -10977,11 +11195,11 @@
10977
11195
 
10978
11196
  /**
10979
11197
  * @typedef {{
10980
- * matchingKey: string,
10981
- * key: string,
10982
- * [k: string]: string
10983
- * }} RowItemNonNull
10984
- */
11198
+ * matchingKey: string,
11199
+ * key: string,
11200
+ * [k: string]: string
11201
+ * }} RowItemNonNull
11202
+ */
10985
11203
 
10986
11204
  /**
10987
11205
  *
@@ -11034,6 +11252,7 @@
11034
11252
  IDBCursor.prototype.__invalidateCache = function () {
11035
11253
  // @ts-expect-error Why is this not being found?
11036
11254
  this.__prefetchedData = null;
11255
+ this.__multiEntryExhausted = false;
11037
11256
  };
11038
11257
 
11039
11258
  /**
@@ -11089,8 +11308,8 @@
11089
11308
  me.__advanceCount--;
11090
11309
  me.__key = k;
11091
11310
  me.__continue(undefined, true);
11092
- /** @type {() => void} */
11093
- executeNextRequest(); // We don't call success yet but do need to advance the transaction queue
11311
+ // We don't call success yet but do need to advance the transaction queue
11312
+ runContinuationSafely(/** @type {() => void} */executeNextRequest);
11094
11313
  return;
11095
11314
  }
11096
11315
  me.__advanceCount = undefined;
@@ -11112,11 +11331,15 @@
11112
11331
  return;
11113
11332
  }
11114
11333
  // @ts-expect-error Todo: Our bug to fix
11115
- cursorContinue(tx, args, success, error);
11334
+ runContinuationSafely(function () {
11335
+ return cursorContinue(tx, args, success, error);
11336
+ });
11116
11337
  }
11117
11338
  if (me.__unique && !me.__multiEntryIndex && encKey === _encode(me.key, me.__multiEntryIndex)) {
11118
11339
  // @ts-expect-error Todo: Our bug to fix
11119
- cursorContinue(tx, args, success, error);
11340
+ runContinuationSafely(function () {
11341
+ return cursorContinue(tx, args, success, error);
11342
+ });
11120
11343
  return;
11121
11344
  }
11122
11345
  checkKey();