@streamline-pulse/formkrafter-wc 0.6.2 → 0.7.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 (57) hide show
  1. package/dist/components/fk-brick-actions.js +1 -1
  2. package/dist/components/fk-brick-list.js +1 -1
  3. package/dist/components/fk-brick-mold-item.js +1 -1
  4. package/dist/components/fk-brick-render.js +1 -1
  5. package/dist/components/fk-data-grid.js +1 -1
  6. package/dist/components/fk-drop-area.js +1 -1
  7. package/dist/components/fk-empty-form.js +1 -1
  8. package/dist/components/fk-file-input.js +1 -1
  9. package/dist/components/fk-form-builder.js +1 -1
  10. package/dist/components/fk-form-render.js +1 -1
  11. package/dist/components/fk-property-panel.js +1 -1
  12. package/dist/components/fk-rules-editor.js +1 -1
  13. package/dist/components/fk-select-input.js +1 -1
  14. package/dist/components/fk-signature-input.js +1 -1
  15. package/dist/components/fk-stepper.js +1 -1
  16. package/dist/components/fk-tabs.js +1 -1
  17. package/dist/components/index.js +1 -1
  18. package/dist/components/{p-gPc0o8Jb.js → p-BMtyMU2R.js} +1 -1
  19. package/dist/components/p-B__57BXb.js +1 -0
  20. package/dist/components/p-Ba_UlLpe.js +1 -0
  21. package/dist/components/p-Bu01BUvZ.js +1 -0
  22. package/dist/components/p-CQzlnCWY.js +1 -0
  23. package/dist/components/p-CfD_xuFD.js +1 -0
  24. package/dist/components/{p-38x7HHH5.js → p-CjplV1cW.js} +4 -4
  25. package/dist/components/p-D-Ecxaih.js +1 -0
  26. package/dist/components/{p-D3QEgcHG.js → p-DBxl-MIH.js} +1 -1
  27. package/dist/components/{p-CZjWddWs.js → p-DmUc_MMe.js} +1 -1
  28. package/dist/components/p-DvaooIpr.js +1 -0
  29. package/dist/components/{p-3NPX8MNr.js → p-DxHWiCOh.js} +1 -1
  30. package/dist/components/{p-QeFpa6kK.js → p-Dy32DQ32.js} +1 -1
  31. package/dist/components/p-KJC4yRYy.js +1 -0
  32. package/dist/components/p-S9BHdmDo.js +1 -0
  33. package/dist/components/{p-BPkt48lM.js → p-lfUyDMwX.js} +1 -1
  34. package/dist/components/p-qAhhbDM0.js +1 -0
  35. package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
  36. package/dist/formkrafter-wc/index.esm.js +1 -1
  37. package/dist/formkrafter-wc/{p-119fa811.entry.js → p-9210eef9.entry.js} +1 -1
  38. package/dist/formkrafter-wc/p-DJXfHHdv.js +12 -0
  39. package/dist/formkrafter-wc/{p-a0c9edbe.entry.js → p-dd9f50b2.entry.js} +1 -1
  40. package/dist/types/i18n/i18n.d.ts +2 -5
  41. package/dist/types/utils/brick-data.d.ts +1 -3
  42. package/dist/types/utils/options.d.ts +2 -5
  43. package/package.json +2 -2
  44. package/dist/components/p-5h-UvDFa.js +0 -1
  45. package/dist/components/p-BJjVMqii.js +0 -1
  46. package/dist/components/p-BoS9--1x.js +0 -1
  47. package/dist/components/p-CQ2FHKGi.js +0 -1
  48. package/dist/components/p-CRHZB3wr.js +0 -1
  49. package/dist/components/p-CyZA17qf.js +0 -1
  50. package/dist/components/p-D3OgliTU.js +0 -1
  51. package/dist/components/p-D6TWh6y5.js +0 -1
  52. package/dist/components/p-DZy-N4JK.js +0 -1
  53. package/dist/components/p-Diknh4-7.js +0 -1
  54. package/dist/components/p-SSethAWa.js +0 -1
  55. package/dist/components/p-l1k-fShB.js +0 -1
  56. package/dist/formkrafter-wc/p-BDCXThbl.js +0 -12
  57. package/dist/formkrafter-wc/p-C5uD3tpA.js +0 -1
@@ -1,12 +1,12 @@
1
- function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,i={exports:{}},r=(e||(e=1,i.exports=function(){Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var t={},e={"==":function(t,e){return t==e},"===":function(t,e){return t===e},"!=":function(t,e){return t!=e},"!==":function(t,e){return t!==e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"<":function(t,e,i){return void 0===i?t<e:t<e&&e<i},"<=":function(t,e,i){return void 0===i?t<=e:t<=e&&e<=i},"!!":function(e){return t.truthy(e)},"!":function(e){return!t.truthy(e)},"%":function(t,e){return t%e},log:function(t){return console.log(t),t},in:function(t,e){return!(!e||void 0===e.indexOf)&&-1!==e.indexOf(t)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(t,e,i){if(i<0){var r=String(t).substr(e);return r.substr(0,r.length+i)}return String(t).substr(e,i)},"+":function(){return Array.prototype.reduce.call(arguments,(function(t,e){return parseFloat(t,10)+parseFloat(e,10)}),0)},"*":function(){return Array.prototype.reduce.call(arguments,(function(t,e){return parseFloat(t,10)*parseFloat(e,10)}))},"-":function(t,e){return void 0===e?-t:t-e},"/":function(t,e){return t/e},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,(function(t,e){return t.concat(e)}),[])},var:function(t,e){var i=void 0===e?null:e,r=this;if(void 0===t||""===t||null===t)return r;for(var n=String(t).split("."),s=0;s<n.length;s++){if(null==r)return i;if(void 0===(r=r[n[s]]))return i}return r},missing:function(){for(var e=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,r=0;r<i.length;r++){var n=i[r],s=t.apply({var:n},this);null!==s&&""!==s||e.push(n)}return e},missing_some:function(e,i){var r=t.apply({missing:i},this);return i.length-r.length>=e?[]:r}};return t.is_logic=function(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&1===Object.keys(t).length},t.truthy=function(t){return!(Array.isArray(t)&&0===t.length||!t)},t.get_operator=function(t){return Object.keys(t)[0]},t.get_values=function(e){return e[t.get_operator(e)]},t.apply=function(i,r){if(Array.isArray(i))return i.map((function(e){return t.apply(e,r)}));if(!t.is_logic(i))return i;var n,s,o,a,h,u=t.get_operator(i),c=i[u];if(Array.isArray(c)||(c=[c]),"if"===u||"?:"==u){for(n=0;n<c.length-1;n+=2)if(t.truthy(t.apply(c[n],r)))return t.apply(c[n+1],r);return c.length===n+1?t.apply(c[n],r):null}if("and"===u){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),!t.truthy(s))return s;return s}if("or"===u){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),t.truthy(s))return s;return s}if("filter"===u)return a=t.apply(c[0],r),o=c[1],Array.isArray(a)?a.filter((function(e){return t.truthy(t.apply(o,e))})):[];if("map"===u)return a=t.apply(c[0],r),o=c[1],Array.isArray(a)?a.map((function(e){return t.apply(o,e)})):[];if("reduce"===u)return a=t.apply(c[0],r),o=c[1],h=void 0!==c[2]?t.apply(c[2],r):null,Array.isArray(a)?a.reduce((function(e,i){return t.apply(o,{current:i,accumulator:e})}),h):h;if("all"===u){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!1;for(n=0;n<a.length;n+=1)if(!t.truthy(t.apply(o,a[n])))return!1;return!0}if("none"===u){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!0;for(n=0;n<a.length;n+=1)if(t.truthy(t.apply(o,a[n])))return!1;return!0}if("some"===u){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!1;for(n=0;n<a.length;n+=1)if(t.truthy(t.apply(o,a[n])))return!0;return!1}if(c=c.map((function(e){return t.apply(e,r)})),e.hasOwnProperty(u)&&"function"==typeof e[u])return e[u].apply(r,c);if(u.indexOf(".")>0){var f=String(u).split("."),l=e;for(n=0;n<f.length;n++){if(!l.hasOwnProperty(f[n]))throw new Error("Unrecognized operation "+u+" (failed at "+f.slice(0,n+1).join(".")+")");l=l[f[n]]}return l.apply(r,c)}throw new Error("Unrecognized operation "+u)},t.uses_data=function(e){var i=[];if(t.is_logic(e)){var r=t.get_operator(e),n=e[r];Array.isArray(n)||(n=[n]),"var"===r?i.push(n[0]):n.forEach((function(e){i.push.apply(i,t.uses_data(e))}))}return function(t){for(var e=[],i=0,r=t.length;i<r;i++)-1===e.indexOf(t[i])&&e.push(t[i]);return e}(i)},t.add_operation=function(t,i){e[t]=i},t.rm_operation=function(t){delete e[t]},t.rule_like=function(e,i){if(i===e)return!0;if("@"===i)return!0;if("number"===i)return"number"==typeof e;if("string"===i)return"string"==typeof e;if("array"===i)return Array.isArray(e)&&!t.is_logic(e);if(t.is_logic(i)){if(t.is_logic(e)){var r=t.get_operator(i),n=t.get_operator(e);if("@"===r||r===n)return t.rule_like(t.get_values(e,!1),t.get_values(i,!1))}return!1}if(Array.isArray(i)){if(Array.isArray(e)){if(i.length!==e.length)return!1;for(var s=0;s<i.length;s+=1)if(!t.rule_like(e[s],i[s]))return!1;return!0}return!1}return!1},t}()),i.exports),n=t(r),s=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",h={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},u="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",c={5:u,"5module":u+" export import",6:u+" const class extends export import super"},f=/^in(stanceof)?$/,l=new RegExp("["+a+"]"),d=new RegExp("["+a+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function p(t,e){for(var i=65536,r=0;r<e.length;r+=2){if((i+=e[r])>t)return!1;if((i+=e[r+1])>=t)return!0}return!1}function m(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&l.test(String.fromCharCode(t)):!1!==e&&p(t,o)))}function v(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&d.test(String.fromCharCode(t)):!1!==e&&(p(t,o)||p(t,s)))))}var y=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function $(t,e){return new y(t,{beforeExpr:!0,binop:e})}var w={beforeExpr:!0},g={startsExpr:!0},b={};function _(t,e){return void 0===e&&(e={}),e.keyword=t,b[t]=new y(t,e)}var E={num:new y("num",g),regexp:new y("regexp",g),string:new y("string",g),name:new y("name",g),privateId:new y("privateId",g),eof:new y("eof"),bracketL:new y("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new y("]"),braceL:new y("{",{beforeExpr:!0,startsExpr:!0}),braceR:new y("}"),parenL:new y("(",{beforeExpr:!0,startsExpr:!0}),parenR:new y(")"),comma:new y(",",w),semi:new y(";",w),colon:new y(":",w),dot:new y("."),question:new y("?",w),questionDot:new y("?."),arrow:new y("=>",w),template:new y("template"),invalidTemplate:new y("invalidTemplate"),ellipsis:new y("...",w),backQuote:new y("`",g),dollarBraceL:new y("${",{beforeExpr:!0,startsExpr:!0}),eq:new y("=",{beforeExpr:!0,isAssign:!0}),assign:new y("_=",{beforeExpr:!0,isAssign:!0}),incDec:new y("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new y("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:$("||",1),logicalAND:$("&&",2),bitwiseOR:$("|",3),bitwiseXOR:$("^",4),bitwiseAND:$("&",5),equality:$("==/!=/===/!==",6),relational:$("</>/<=/>=",7),bitShift:$("<</>>/>>>",8),plusMin:new y("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:$("%",10),star:$("*",10),slash:$("/",10),starstar:new y("**",{beforeExpr:!0}),coalesce:$("??",1),_break:_("break"),_case:_("case",w),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",w),_do:_("do",{isLoop:!0,beforeExpr:!0}),_else:_("else",w),_finally:_("finally"),_for:_("for",{isLoop:!0}),_function:_("function",g),_if:_("if"),_return:_("return",w),_switch:_("switch"),_throw:_("throw",w),_try:_("try"),_var:_("var"),_const:_("const"),_while:_("while",{isLoop:!0}),_with:_("with"),_new:_("new",{beforeExpr:!0,startsExpr:!0}),_this:_("this",g),_super:_("super",g),_class:_("class",g),_extends:_("extends",w),_export:_("export"),_import:_("import",g),_null:_("null",g),_true:_("true",g),_false:_("false",g),_in:_("in",{beforeExpr:!0,binop:7}),_instanceof:_("instanceof",{beforeExpr:!0,binop:7}),_typeof:_("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:_("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:_("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},O=/\r\n?|\n|\u2028|\u2029/,j=new RegExp(O.source,"g");function S(t){return 10===t||13===t||8232===t||8233===t}function x(t,e,i){void 0===i&&(i=t.length);for(var r=e;r<i;r++){var n=t.charCodeAt(r);if(S(n))return r<i-1&&13===n&&10===t.charCodeAt(r+1)?r+2:r+1}return-1}var k=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,P=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,I=Object.prototype,A=I.hasOwnProperty,C=I.toString,N=Object.hasOwn||function(t,e){return A.call(t,e)},T=Array.isArray||function(t){return"[object Array]"===C.call(t)},M=Object.create(null);function R(t){return M[t]||(M[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function D(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}var z=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,L=function(t,e){this.line=t,this.column=e};L.prototype.offset=function(t){return new L(this.line,this.column+t)};var U=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function q(t,e){for(var i=1,r=0;;){var n=x(t,r,e);if(n<0)return new L(i,e-r);++i,r=n}}var F={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},B=!1;function V(t,e){return 2|(t?4:0)|(e?8:0)}var G=function(t,e,i){this.options=t=function(t){var e={};for(var i in F)e[i]=t&&N(t,i)?t[i]:F[i];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!B&&"object"==typeof console&&console.warn&&(B=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),t&&null!=t.allowHashBang||(e.allowHashBang=e.ecmaVersion>=14),T(e.onToken)){var r=e.onToken;e.onToken=function(t){return r.push(t)}}if(T(e.onComment)&&(e.onComment=function(t,e){return function(i,r,n,s,o,a){var h={type:i?"Block":"Line",value:r,start:n,end:s};t.locations&&(h.loc=new U(this,o,a)),t.ranges&&(h.range=[n,s]),e.push(h)}}(e,e.onComment)),"commonjs"===e.sourceType&&e.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}(t),this.sourceFile=t.sourceFile,this.keywords=R(c[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var r="";!0!==t.allowReserved&&(r=h[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(r+=" await")),this.reservedWords=R(r);var n=(r?r+" ":"")+h.strict;this.reservedWordsStrict=R(n),this.reservedWordsStrictBind=R(n+" "+h.strictBind),this.input=String(e),this.containsEsc=!1,this.pos=i||0,this.curLine=1,t.startLocation?(this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line):i?(this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(O).length)):this.lineStart=0,this.type=E.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===t.sourceType,this.strict=this.inModule||!0===t.strict||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope("commonjs"===this.options.sourceType?2:1),this.regexpState=null,this.privateNameStack=[]},H={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};G.prototype.parse=function(){var t=this,e=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow((function(){return t.parseTopLevel(e)}))},H.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},H.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},H.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},H.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e)return!1;if(2&e)return(4&e)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},H.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},H.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},H.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},H.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},H.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e||2&e&&!(16&e))return!0}return!1},H.allowUsing.get=function(){var t=this.currentScope().flags;return!(1024&t||!this.inModule&&1&t)},H.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},G.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,r=0;r<t.length;r++)i=t[r](i);return i},G.parse=function(t,e){return new this(e,t).parse()},G.parseExpressionAt=function(t,e,i){var r=new this(i,t,e);return r.nextToken(),r.parseExpression()},G.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(G.prototype,H);var K=G.prototype,W=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;K.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){P.lastIndex=t,t+=P.exec(this.input)[0].length;var e=W.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){P.lastIndex=t+e[0].length;var i=P.exec(this.input),r=i.index+i[0].length,n=this.input.charAt(r);return";"===n||"}"===n||O.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(r+1))}P.lastIndex=t+=e[0].length,t+=P.exec(this.input)[0].length,";"===this.input[t]&&t++}},K.eat=function(t){return this.type===t&&(this.next(),!0)},K.isContextual=function(t){return this.type===E.name&&this.value===t&&!this.containsEsc},K.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},K.catchStackOverflow=function(t){try{return t()}catch(t){if(!(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message))))throw t;this.raise(this.start,"Not enough stack space to parse input")}},K.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},K.canInsertSemicolon=function(){return this.type===E.eof||this.type===E.braceR||O.test(this.input.slice(this.lastTokEnd,this.start))},K.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},K.semicolon=function(){this.eat(E.semi)||this.insertSemicolon()||this.unexpected()},K.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},K.expect=function(t){this.eat(t)||this.unexpected()},K.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")};var J=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};K.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,e?"Assigning to rvalue":"Parenthesized pattern")}},K.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,r=t.doubleProto;if(!e)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},K.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},K.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var Z=G.prototype;Z.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==E.eof;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var r=0,n=Object.keys(this.undefinedExports);r<n.length;r+=1){var s=n[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType="commonjs"===this.options.sourceType?"script":this.options.sourceType,this.finishNode(t,"Program")};var X={kind:"loop"},Q={kind:"switch"};Z.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;P.lastIndex=this.pos;var e=P.exec(this.input),i=this.pos+e[0].length,r=this.fullCharCodeAt(i);if(91===r||92===r)return!0;if(t)return!1;if(123===r)return!0;if(m(r)){var n=i;do{i+=r<=65535?1:2}while(v(r=this.fullCharCodeAt(i)));if(92===r)return!0;var s=this.input.slice(n,i);if(!f.test(s))return!0}return!1},Z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;P.lastIndex=this.pos;var t,e=P.exec(this.input),i=this.pos+e[0].length;return!(O.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(v(t=this.fullCharCodeAt(i+8))||92===t))},Z.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;P.lastIndex=this.pos;var i=P.exec(this.input),r=this.pos+i[0].length;if(O.test(this.input.slice(this.pos,r)))return!1;if(t){var n,s=r+5;if("using"!==this.input.slice(r,s)||s===this.input.length||v(n=this.fullCharCodeAt(s))||92===n)return!1;P.lastIndex=s;var o=P.exec(this.input);if(r=s+o[0].length,o&&O.test(this.input.slice(s,r)))return!1}var a=this.fullCharCodeAt(r);if(!m(a)&&92!==a)return!1;var h=r;do{r+=a<=65535?1:2}while(v(a=this.fullCharCodeAt(r)));if(92===a)return!0;var u=this.input.slice(h,r);if(f.test(u))return!1;if(e&&!t&&"of"===u){P.lastIndex=r;var c=P.exec(this.input);if(61!==this.input.charCodeAt(r+=c[0].length)||61===(a=this.input.charCodeAt(r+1))||62===a)return!1}return!0},Z.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},Z.isUsing=function(t){return this.isUsingKeyword(!1,t)},Z.parseStatement=function(t,e,i){var r,n=this.type,s=this.startNode();switch(this.isLet(t)&&(n=E._var,r="let"),n){case E._break:case E._continue:return this.parseBreakContinueStatement(s,n.keyword);case E._debugger:return this.parseDebuggerStatement(s);case E._do:return this.parseDoStatement(s);case E._for:return this.parseForStatement(s);case E._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!t);case E._class:return t&&this.unexpected(),this.parseClass(s,!0);case E._if:return this.parseIfStatement(s);case E._return:return this.parseReturnStatement(s);case E._switch:return this.parseSwitchStatement(s);case E._throw:return this.parseThrowStatement(s);case E._try:return this.parseTryStatement(s);case E._const:case E._var:return r=r||this.value,t&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case E._while:return this.parseWhileStatement(s);case E._with:return this.parseWithStatement(s);case E.braceL:return this.parseBlock(!0,s);case E.semi:return this.parseEmptyStatement(s);case E._export:case E._import:if(this.options.ecmaVersion>10&&n===E._import){P.lastIndex=this.pos;var o=P.exec(this.input),a=this.input.charCodeAt(this.pos+o[0].length);if(40===a||46===a)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===E._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!t);var h=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(h)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),t&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),"await using"===h&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,!1,h),this.semicolon(),this.finishNode(s,"VariableDeclaration");var u=this.value,c=this.parseExpression();return n===E.name&&"Identifier"===c.type&&this.eat(E.colon)?this.parseLabeledStatement(s,u,c,t):this.parseExpressionStatement(s,c)}},Z.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(E.semi)||this.insertSemicolon()?t.label=null:this.type!==E.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var n=this.labels[r];if(null==t.label||n.name===t.label.name){if(null!=n.kind&&(i||"loop"===n.kind))break;if(t.label&&i)break}}return r===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},Z.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},Z.parseDoStatement=function(t){return this.next(),this.labels.push(X),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(E._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(E.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},Z.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(X),this.enterScope(0),this.expect(E.parenL),this.type===E.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===E._var||this.type===E._const||i){var r=this.startNode(),n=i?"let":this.value;return this.next(),this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(t,r,e)}var s=this.isContextual("let"),o=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var h=this.startNode();return this.next(),"await using"===a&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(h,!0,a),this.finishNode(h,"VariableDeclaration"),this.parseForAfterInit(t,h,e)}var u=this.containsEsc,c=new J,f=this.start,l=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===E._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===E._in&&this.unexpected(e),t.await=!0):o&&this.options.ecmaVersion>=8&&(l.start!==f||u||"Identifier"!==l.type||"async"!==l.name?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),s&&o&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,c),this.checkLValPattern(l),this.parseForIn(t,l)):(this.checkExpressionErrors(c,!0),e>-1&&this.unexpected(e),this.parseFor(t,l))},Z.parseForAfterInit=function(t,e,i){return(this.type===E._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.type===E._in?("using"!==e.kind&&"await using"!==e.kind||e.declarations[0].init||this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&i>-1&&this.unexpected(i)):this.options.ecmaVersion>=9&&(t.await=i>-1),this.parseForIn(t,e)):(i>-1&&this.unexpected(i),this.parseFor(t,e))},Z.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,tt|(i?0:et),!1,e)},Z.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(E._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},Z.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(E.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},Z.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(E.braceL),this.labels.push(Q),this.enterScope(1024);for(var i=!1;this.type!==E.braceR;)if(this.type===E._case||this.type===E._default){var r=this.type===E._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),r?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(E.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},Z.parseThrowStatement=function(t){return this.next(),O.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Y=[];Z.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?32:0),this.checkLValPattern(t,e?4:2),this.expect(E.parenR),t},Z.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===E._catch){var e=this.startNode();this.next(),this.eat(E.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(E._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},Z.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")},Z.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(X),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},Z.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},Z.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},Z.parseLabeledStatement=function(t,e,i,r){for(var n=0,s=this.labels;n<s.length;n+=1)s[n].name===e&&this.raise(i.start,"Label '"+e+"' is already declared");for(var o=this.type.isLoop?"loop":this.type===E._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var h=this.labels[a];if(h.statementStart!==t.start)break;h.statementStart=this.start,h.kind=o}return this.labels.push({name:e,kind:o,statementStart:this.start}),t.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},Z.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},Z.parseBlock=function(t,e,i){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(E.braceL),t&&this.enterScope(0);this.type!==E.braceR;){var r=this.parseStatement(null);e.body.push(r)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},Z.parseFor=function(t,e){return t.init=e,this.expect(E.semi),t.test=this.type===E.semi?null:this.parseExpression(),this.expect(E.semi),t.update=this.type===E.parenR?null:this.parseExpression(),this.expect(E.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},Z.parseForIn=function(t,e){var i=this.type===E._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!i||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(E.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},Z.parseVar=function(t,e,i,r){for(t.declarations=[],t.kind=i;;){var n=this.startNode();if(this.parseVarId(n,i),this.eat(E.eq)?n.init=this.parseMaybeAssign(e):r||"const"!==i||this.type===E._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==i&&"await using"!==i||!(this.options.ecmaVersion>=17)||this.type===E._in||this.isContextual("of")?r||"Identifier"===n.id.type||e&&(this.type===E._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(E.comma))break}return t},Z.parseVarId=function(t,e){t.id="using"===e||"await using"===e?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?1:2,!1)};var tt=1,et=2;function it(t,e){var i=e.key.name,r=t[i],n="true";return"MethodDefinition"!==e.type||"get"!==e.kind&&"set"!==e.kind||(n=(e.static?"s":"i")+e.kind),"iget"===r&&"iset"===n||"iset"===r&&"iget"===n||"sget"===r&&"sset"===n||"sset"===r&&"sget"===n?(t[i]="true",!1):!!r||(t[i]=n,!1)}function rt(t,e){var i=t.key;return!t.computed&&("Identifier"===i.type&&i.name===e||"Literal"===i.type&&i.value===e)}Z.parseFunction=function(t,e,i,r,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===E.star&&e&et&&this.unexpected(),t.generator=this.eat(E.star)),this.options.ecmaVersion>=8&&(t.async=!!r),e&tt&&(t.id=4&e&&this.type!==E.name?null:this.parseIdent(),!t.id||e&et||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(V(t.async,t.generator)),e&tt||(t.id=this.type===E.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,n),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(t,e&tt?"FunctionDeclaration":"FunctionExpression")},Z.parseFunctionParams=function(t){this.expect(E.parenL),t.params=this.parseBindingList(E.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Z.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var r=this.enterClassBody(),n=this.startNode(),s=!1;for(n.body=[],this.expect(E.braceL);this.type!==E.braceR;){var o=this.parseClassElement(null!==t.superClass);o&&(n.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&"PrivateIdentifier"===o.key.type&&it(r,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),t.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},Z.parseClassElement=function(t){if(this.eat(E.semi))return null;var e=this.options.ecmaVersion,i=this.startNode(),r="",n=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(E.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===E.star?a=!0:r="static"}if(i.static=a,!r&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==E.star||this.canInsertSemicolon()?r="async":s=!0),!r&&(e>=9||!s)&&this.eat(E.star)&&(n=!0),!r&&!s&&!n){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=h:r=h)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===E.parenL||"method"!==o||n||s){var u=!i.static&&rt(i,"constructor"),c=u&&t;u&&"method"!==o&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=u?"constructor":o,this.parseClassMethod(i,n,s,c)}else this.parseClassField(i);return i},Z.isClassElementNameStart=function(){return this.type===E.name||this.type===E.privateId||this.type===E.num||this.type===E.string||this.type===E.bracketL||this.type.keyword},Z.parseClassElementName=function(t){this.type===E.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},Z.parseClassMethod=function(t,e,i,r){var n=t.key;"constructor"===t.kind?(e&&this.raise(n.start,"Constructor can't be a generator"),i&&this.raise(n.start,"Constructor can't be an async method")):t.static&&rt(t,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var s=t.value=this.parseMethod(e,i,r);return"get"===t.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===t.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===t.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},Z.parseClassField=function(t){return rt(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&rt(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(E.eq)?(this.enterScope(576),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},Z.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(320);this.type!==E.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},Z.parseClassId=function(t,e){this.type===E.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},Z.parseClassSuper=function(t){t.superClass=this.eat(E._extends)?this.parseExprSubscripts(null,!1):null},Z.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},Z.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,i=t.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,n=0===r?null:this.privateNameStack[r-1],s=0;s<i.length;++s){var o=i[s];N(e,o.name)||(n?n.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},Z.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==E.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},Z.parseExport=function(t,e){if(this.next(),this.eat(E.star))return this.parseExportAllDeclaration(t,e);if(this.eat(E._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==E.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var i=0,r=t.specifiers;i<r.length;i+=1){var n=r[i];this.checkUnreserved(n.local),this.checkLocalExport(n.local),"Literal"===n.local.type&&this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},Z.parseExportDeclaration=function(){return this.parseStatement(null)},Z.parseExportDefaultDeclaration=function(){var t;if(this.type===E._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,4|tt,!1,t)}if(this.type===E._class){var i=this.startNode();return this.parseClass(i,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},Z.checkExport=function(t,e,i){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),N(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},Z.checkPatternExport=function(t,e){var i=e.type;if("Identifier"===i)this.checkExport(t,e,e.start);else if("ObjectPattern"===i)for(var r=0,n=e.properties;r<n.length;r+=1)this.checkPatternExport(t,n[r]);else if("ArrayPattern"===i)for(var s=0,o=e.elements;s<o.length;s+=1){var a=o[s];a&&this.checkPatternExport(t,a)}else"Property"===i?this.checkPatternExport(t,e.value):"AssignmentPattern"===i?this.checkPatternExport(t,e.left):"RestElement"===i&&this.checkPatternExport(t,e.argument)},Z.checkVariableExport=function(t,e){if(t)for(var i=0,r=e;i<r.length;i+=1)this.checkPatternExport(t,r[i].id)},Z.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Z.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},Z.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(E.braceL);!this.eat(E.braceR);){if(i)i=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;e.push(this.parseExportSpecifier(t))}return e},Z.parseImport=function(t){return this.next(),this.type===E.string?(t.specifiers=Y,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===E.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},Z.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportSpecifier")},Z.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportDefaultSpecifier")},Z.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportNamespaceSpecifier")},Z.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===E.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(E.comma)))return t;if(this.type===E.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(E.braceL);!this.eat(E.braceR);){if(e)e=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;t.push(this.parseImportSpecifier())}return t},Z.parseWithClause=function(){var t=[];if(!this.eat(E._with))return t;this.expect(E.braceL);for(var e={},i=!0;!this.eat(E.braceR);){if(i)i=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;var r=this.parseImportAttribute(),n="Identifier"===r.key.type?r.key.name:r.key.value;N(e,n)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+n+"'"),e[n]=!0,t.push(r)}return t},Z.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===E.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(E.colon),this.type!==E.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},Z.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===E.string){var t=this.parseLiteral(this.value);return z.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},Z.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},Z.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var nt=G.prototype;nt.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var r=0,n=t.properties;r<n.length;r+=1){var s=n[r];this.toAssignable(s,e),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},nt.toAssignableList=function(t,e){for(var i=t.length,r=0;r<i;r++){var n=t[r];n&&this.toAssignable(n,e)}if(i){var s=t[i-1];6===this.options.ecmaVersion&&e&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return t},nt.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},nt.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==E.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},nt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case E.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(E.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case E.braceL:return this.parseObj(!0)}return this.parseIdent()},nt.parseBindingList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);)if(s?s=!1:this.expect(E.comma),e&&this.type===E.comma)n.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===E.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),n.push(o),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}n.push(this.parseAssignableListItem(r))}return n},nt.parseAssignableListItem=function(){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},nt.parseBindingListItem=function(t){return t},nt.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(E.eq))return i;var r=this.startNodeAt(t,e);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},nt.checkLValSimple=function(t,e,i){void 0===e&&(e=0);var r=0!==e;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(r?"Binding ":"Assigning to ")+t.name+" in strict mode"),r&&(2===e&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&(N(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),5!==e&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(r?"Binding":"Assigning to")+" rvalue")}},nt.checkLValPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"ObjectPattern":for(var r=0,n=t.properties;r<n.length;r+=1)this.checkLValInnerPattern(n[r],e,i);break;case"ArrayPattern":for(var s=0,o=t.elements;s<o.length;s+=1){var a=o[s];a&&this.checkLValInnerPattern(a,e,i)}break;default:this.checkLValSimple(t,e,i)}},nt.checkLValInnerPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var st=function(t,e,i,r,n){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=r,this.generator=!!n},ot={b_stat:new st("{",!1),b_expr:new st("{",!0),b_tmpl:new st("${",!1),p_stat:new st("(",!1),p_expr:new st("(",!0),q_tmpl:new st("`",!0,!0,(function(t){return t.tryReadTemplateToken()})),f_stat:new st("function",!1),f_expr:new st("function",!0),f_expr_gen:new st("function",!0,!1,null,!0),f_gen:new st("function",!1,!1,null,!0)},at=G.prototype;at.initialContext=function(){return[ot.b_stat]},at.curContext=function(){return this.context[this.context.length-1]},at.braceIsBlock=function(t){var e=this.curContext();return e===ot.f_expr||e===ot.f_stat||(t!==E.colon||e!==ot.b_stat&&e!==ot.b_expr?t===E._return||t===E.name&&this.exprAllowed?O.test(this.input.slice(this.lastTokEnd,this.start)):t===E._else||t===E.semi||t===E.eof||t===E.parenR||t===E.arrow||(t===E.braceL?e===ot.b_stat:t!==E._var&&t!==E._const&&t!==E.name&&!this.exprAllowed):!e.isExpr)},at.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},at.updateContext=function(t){var e,i=this.type;i.keyword&&t===E.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},at.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},E.parenR.updateContext=E.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===ot.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},E.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?ot.b_stat:ot.b_expr),this.exprAllowed=!0},E.dollarBraceL.updateContext=function(){this.context.push(ot.b_tmpl),this.exprAllowed=!0},E.parenL.updateContext=function(t){this.context.push(t===E._if||t===E._for||t===E._with||t===E._while?ot.p_stat:ot.p_expr),this.exprAllowed=!0},E.incDec.updateContext=function(){},E._function.updateContext=E._class.updateContext=function(t){!t.beforeExpr||t===E._else||t===E.semi&&this.curContext()!==ot.p_stat||t===E._return&&O.test(this.input.slice(this.lastTokEnd,this.start))||(t===E.colon||t===E.braceL)&&this.curContext()===ot.b_stat?this.context.push(ot.f_stat):this.context.push(ot.f_expr),this.exprAllowed=!1},E.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},E.backQuote.updateContext=function(){this.curContext()===ot.q_tmpl?this.context.pop():this.context.push(ot.q_tmpl),this.exprAllowed=!1},E.star.updateContext=function(t){if(t===E._function){var e=this.context.length-1;this.context[e]=this.context[e]===ot.f_expr?ot.f_expr_gen:ot.f_gen}this.exprAllowed=!0},E.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==E.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var ht=G.prototype;function ut(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&ut(t.expression)}function ct(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&ct(t.expression)||"ParenthesizedExpression"===t.type&&ct(t.expression)}ht.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var r,n=t.key;switch(n.type){case"Identifier":r=n.name;break;case"Literal":r=String(n.value);break;default:return}var s=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===s&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),e.proto=!0);else{var o=e[r="$"+r];o?("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(n.start,"Redefinition of property"):o=e[r]={init:!1,get:!1,set:!1},o[s]=!0}}},ht.parseExpression=function(t,e){var i=this;return this.catchStackOverflow((function(){var r=i.start,n=i.startLoc,s=i.parseMaybeAssign(t,e);if(i.type===E.comma){var o=i.startNodeAt(r,n);for(o.expressions=[s];i.eat(E.comma);)o.expressions.push(i.parseMaybeAssign(t,e));return i.finishNode(o,"SequenceExpression")}return s}))},ht.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var r=!1,n=-1,s=-1,o=-1;e?(n=e.parenthesizedAssign,s=e.trailingComma,o=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new J,r=!0);var a=this.start,h=this.startLoc;this.type!==E.parenL&&this.type!==E.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var u=this.parseMaybeConditional(t,e);if(i&&(u=i.call(this,u,a,h)),this.type.isAssign){var c=this.startNodeAt(a,h);return c.operator=this.value,this.type===E.eq&&(u=this.toAssignable(u,!1,e)),r||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=u.start&&(e.shorthandAssign=-1),this.type===E.eq?this.checkLValPattern(u):this.checkLValSimple(u),c.left=u,this.next(),c.right=this.parseMaybeAssign(t),o>-1&&(e.doubleProto=o),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(e,!0),n>-1&&(e.parenthesizedAssign=n),s>-1&&(e.trailingComma=s),u},ht.parseMaybeConditional=function(t,e){var i=this.start,r=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(("ArrowFunctionExpression"!==n.type||n.start!==i)&&this.eat(E.question)){var s=this.startNodeAt(i,r);return s.test=n,s.consequent=this.parseMaybeAssign(),this.expect(E.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return n},ht.parseExprOps=function(t,e){var i=this.start,r=this.startLoc,n=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||n.start===i&&"ArrowFunctionExpression"===n.type?n:this.parseExprOp(n,i,r,-1,t)},ht.parseExprOp=function(t,e,i,r,n){var s=this.type.binop;if(null!=s&&(!n||this.type!==E._in)&&s>r){var o=this.type===E.logicalOR||this.type===E.logicalAND,a=this.type===E.coalesce;a&&(s=E.logicalAND.binop);var h=this.value;this.next();var u=this.start,c=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),u,c,s,n),l=this.buildBinary(e,i,t,f,h,o||a);return(o&&this.type===E.coalesce||a&&(this.type===E.logicalOR||this.type===E.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(l,e,i,r,n)}return t},ht.buildBinary=function(t,e,i,r,n,s){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(t,e);return o.left=i,o.operator=n,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},ht.parseMaybeUnary=function(t,e,i,r){var n,s=this.start,o=this.startLoc;if(this.isContextual("await")&&this.canAwait)n=this.parseAwait(r),e=!0;else if(this.type.prefix){var a=this.startNode(),h=this.type===E.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,h,r),this.checkExpressionErrors(t,!0),h?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&ut(a.argument)?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&ct(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):e=!0,n=this.finishNode(a,h?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==E.privateId){if(n=this.parseExprSubscripts(t,r),this.checkExpressionErrors(t))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=this.startNodeAt(s,o);u.operator=this.value,u.prefix=!1,u.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(u,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==E._in&&this.unexpected();return i||"ArrowFunctionExpression"===n.type&&n.start===s||!this.eat(E.starstar)?n:e?void this.unexpected(this.lastTokStart):this.buildBinary(s,o,n,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},ht.parseExprSubscripts=function(t,e){var i=this.start,r=this.startLoc,n=this.parseExprAtom(t,e);if("ArrowFunctionExpression"===n.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return n;var s=this.parseSubscripts(n,i,r,!1,e);return t&&"MemberExpression"===s.type&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1),t.trailingComma>=s.start&&(t.trailingComma=-1)),s},ht.parseSubscripts=function(t,e,i,r,n){for(var s=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.potentialArrowAt===t.start,o=!1;;){var a=this.parseSubscript(t,e,i,r,s,o,n);if(a.optional&&(o=!0),a===t||"ArrowFunctionExpression"===a.type){if(o){var h=this.startNodeAt(e,i);h.expression=a,a=this.finishNode(h,"ChainExpression")}return a}t=a}},ht.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(E.arrow)},ht.parseSubscriptAsyncArrow=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,r)},ht.parseSubscript=function(t,e,i,r,n,s,o){var a=this.options.ecmaVersion>=11,h=a&&this.eat(E.questionDot);r&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(E.bracketL);if(u||h&&this.type!==E.parenL&&this.type!==E.backQuote||this.eat(E.dot)){var c=this.startNodeAt(e,i);c.object=t,u?(c.property=this.parseExpression(),this.expect(E.bracketR)):c.property=this.type===E.privateId&&"Super"!==t.type?this.parsePrivateIdent():this.parseIdent("never"!==this.options.allowReserved),c.computed=!!u,a&&(c.optional=h),t=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(E.parenL)){var f=new J,l=this.yieldPos,d=this.awaitPos,p=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(E.parenR,this.options.ecmaVersion>=8,!1,f);if(n&&!h&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=l,this.awaitPos=d,this.awaitIdentPos=p,this.parseSubscriptAsyncArrow(e,i,m,o);this.checkExpressionErrors(f,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=p||this.awaitIdentPos;var v=this.startNodeAt(e,i);v.callee=t,v.arguments=m,a&&(v.optional=h),t=this.finishNode(v,"CallExpression")}else if(this.type===E.backQuote){(h||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(e,i);y.tag=t,y.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(y,"TaggedTemplateExpression")}return t},ht.parseExprAtom=function(t,e,i){this.type===E.slash&&this.readRegexp();var r,n=this.potentialArrowAt===this.start;switch(this.type){case E._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==E.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==E.dot&&this.type!==E.bracketL&&this.type!==E.parenL&&this.unexpected(),this.finishNode(r,"Super");case E._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case E.name:var s=this.start,o=this.startLoc,a=this.containsEsc,h=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&"async"===h.name&&!this.canInsertSemicolon()&&this.eat(E._function))return this.overrideContext(ot.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(E.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[h],!1,e);if(this.options.ecmaVersion>=8&&"async"===h.name&&this.type===E.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return h=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(E.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[h],!0,e)}return h;case E.regexp:var u=this.value;return(r=this.parseLiteral(u.value)).regex={pattern:u.pattern,flags:u.flags},r;case E.num:case E.string:return this.parseLiteral(this.value);case E._null:case E._true:case E._false:return(r=this.startNode()).value=this.type===E._null?null:this.type===E._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case E.parenL:var c=this.start,f=this.parseParenAndDistinguishExpression(n,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),f;case E.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(E.bracketR,!0,!0,t),this.finishNode(r,"ArrayExpression");case E.braceL:return this.overrideContext(ot.b_expr),this.parseObj(!1,t);case E._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case E._class:return this.parseClass(this.startNode(),!1);case E._new:return this.parseNew();case E.backQuote:return this.parseTemplate();case E._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}},ht.parseExprAtomDefault=function(){this.unexpected()},ht.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===E.parenL&&!t)return this.parseDynamicImport(e);if(this.type===E.dot){var i=this.startNodeAt(e.start,e.loc&&e.loc.start);return i.name="import",e.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(e)}this.unexpected()},ht.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(E.parenR)?t.options=null:(this.expect(E.comma),this.afterTrailingComma(E.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(E.parenR)||(this.expect(E.comma),this.afterTrailingComma(E.parenR)||this.unexpected())));else if(!this.eat(E.parenR)){var e=this.start;this.eat(E.comma)&&this.eat(E.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},ht.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},ht.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=null!=e.value?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},ht.parseParenExpression=function(){this.expect(E.parenL);var t=this.parseExpression();return this.expect(E.parenR),t},ht.shouldParseArrow=function(){return!this.canInsertSemicolon()},ht.parseParenAndDistinguishExpression=function(t,e){var i,r=this.start,n=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,h=this.startLoc,u=[],c=!0,f=!1,l=new J,d=this.yieldPos,p=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==E.parenR;){if(c?c=!1:this.expect(E.comma),s&&this.afterTrailingComma(E.parenR,!0)){f=!0;break}if(this.type===E.ellipsis){o=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}u.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var m=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(E.parenR),t&&this.shouldParseArrow(u)&&this.eat(E.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=p,this.parseParenArrowList(r,n,u,e);u.length&&!f||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(l,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=p||this.awaitPos,u.length>1?((i=this.startNodeAt(a,h)).expressions=u,this.finishNodeAt(i,"SequenceExpression",m,v)):i=u[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,n);return y.expression=i,this.finishNode(y,"ParenthesizedExpression")}return i},ht.parseParenItem=function(t){return t},ht.parseParenArrowList=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,r)};var ft=[];ht.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===E.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var i=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var r=this.start,n=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,n,!0,!1),"Super"===t.callee.type&&this.raiseRecoverable(r,"Invalid use of 'super'"),t.arguments=this.eat(E.parenL)?this.parseExprList(E.parenR,this.options.ecmaVersion>=8,!1):ft,this.finishNode(t,"NewExpression")},ht.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===E.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),i.tail=this.type===E.backQuote,this.finishNode(i,"TemplateElement")},ht.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:e});for(i.quasis=[r];!r.tail;)this.type===E.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(E.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(E.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},ht.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===E.name||this.type===E.num||this.type===E.string||this.type===E.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===E.star)&&!O.test(this.input.slice(this.lastTokEnd,this.start))},ht.parseObj=function(t,e){var i=this.startNode(),r=!0,n={};for(i.properties=[],this.next();!this.eat(E.braceR);){if(r)r=!1;else if(this.expect(E.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(E.braceR))break;var s=this.parseProperty(t,e);t||this.checkPropClash(s,n,e),i.properties.push(s)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},ht.parseProperty=function(t,e){var i,r,n,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(E.ellipsis))return t?(o.argument=this.parseIdent(!1),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,e),this.type===E.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(t||e)&&(n=this.start,s=this.startLoc),t||(i=this.eat(E.star)));var a=this.containsEsc;return this.parsePropertyName(o),!t&&!a&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(o)?(r=!0,i=this.options.ecmaVersion>=9&&this.eat(E.star),this.parsePropertyName(o)):r=!1,this.parsePropertyValue(o,t,i,r,n,s,e,a),this.finishNode(o,"Property")},ht.parseGetterSetter=function(t){var e=t.key.name;(this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e,t.value.params.length!==("get"===t.kind?0:1))?this.raiseRecoverable(t.value.start,"get"===t.kind?"getter should have no params":"setter should have exactly one param"):"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},ht.parsePropertyValue=function(t,e,i,r,n,s,o,a){(i||r)&&this.type===E.colon&&this.unexpected(),this.eat(E.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init"):this.options.ecmaVersion>=6&&this.type===E.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(i,r),t.kind="init"):e||a||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===E.comma||this.type===E.braceR||this.type===E.eq?this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((i||r)&&this.unexpected(),this.checkUnreserved(t.key),"await"!==t.key.name||this.awaitIdentPos||(this.awaitIdentPos=n),e?t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key)):this.type===E.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((i||r)&&this.unexpected(),this.parseGetterSetter(t))},ht.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(E.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(E.bracketR),t.key;t.computed=!1}return t.key=this.type===E.num||this.type===E.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},ht.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},ht.parseMethod=function(t,e,i){var r=this.startNode(),n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=t),this.options.ecmaVersion>=8&&(r.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|V(e,r.generator)|(i?128:0)),this.expect(E.parenL),r.params=this.parseBindingList(E.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},ht.parseArrowExpression=function(t,e,i,r){var n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|V(i,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,r),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")},ht.parseFunctionBody=function(t,e,i,r){var n=this.strict,s=!1;if(e&&this.type!==E.braceL)t.body=this.parseMaybeAssign(r),t.expression=!0,this.checkParams(t,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);n&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var a=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(t,!n&&!s&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,5),t.body=this.parseBlock(!1,void 0,s&&!n),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=a}this.exitScope()},ht.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1)if("Identifier"!==i[e].type)return!1;return!0},ht.checkParams=function(t,e){for(var i=Object.create(null),r=0,n=t.params;r<n.length;r+=1)this.checkLValInnerPattern(n[r],1,e?null:i)},ht.parseExprList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(E.comma),e&&this.afterTrailingComma(t))break;var o=void 0;i&&this.type===E.comma?o=null:this.type===E.ellipsis?(o=this.parseSpread(r),r&&this.type===E.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),n.push(o)}return n},ht.checkUnreserved=function(t){var e=t.start,i=t.end,r=t.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),259&this.currentThisScope().flags||"arguments"!==r||this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(e,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(e,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,i).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+r+"' is reserved"))},ht.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),"await"!==e.name||this.awaitIdentPos||(this.awaitIdentPos=e.start)),e},ht.parseIdentNode=function(){var t=this.startNode();return this.type===E.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,"class"!==t.name&&"function"!==t.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=E.name):this.unexpected(),t},ht.parsePrivateIdent=function(){var t=this.startNode();return this.type===E.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},ht.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===E.semi||this.canInsertSemicolon()||this.type!==E.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(E.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},ht.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var lt=G.prototype;lt.raise=function(t,e){var i=q(this.input,t);e+=" ("+i.line+":"+i.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var r=new SyntaxError(e);throw r.pos=t,r.loc=i,r.raisedAt=this.pos,r},lt.raiseRecoverable=lt.raise,lt.curPosition=function(){if(this.options.locations)return new L(this.curLine,this.pos-this.lineStart)};var dt=G.prototype,pt=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};dt.enterScope=function(t){this.scopeStack.push(new pt(t))},dt.exitScope=function(){this.scopeStack.pop()},dt.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},dt.declareName=function(t,e,i){var r=!1;if(2===e){var n=this.currentScope();r=n.lexical.indexOf(t)>-1||n.functions.indexOf(t)>-1||n.var.indexOf(t)>-1,n.lexical.push(t),this.inModule&&1&n.flags&&delete this.undefinedExports[t]}else if(4===e)this.currentScope().lexical.push(t);else if(3===e){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(t)>-1:s.lexical.indexOf(t)>-1||s.var.indexOf(t)>-1,s.functions.push(t)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(t)>-1&&!(32&a.flags&&a.lexical[0]===t)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(t)>-1){r=!0;break}if(a.var.push(t),this.inModule&&1&a.flags&&delete this.undefinedExports[t],259&a.flags)break}r&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")},dt.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},dt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},dt.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags)return e}},dt.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags&&!(16&e.flags))return e}};var mt=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new U(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},vt=G.prototype;function yt(t,e,i,r){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=r),this.options.ranges&&(t.range[1]=i),t}vt.startNode=function(){return new mt(this,this.start,this.startLoc)},vt.startNodeAt=function(t,e){return new mt(this,t,e)},vt.finishNode=function(t,e){return yt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},vt.finishNodeAt=function(t,e,i,r){return yt.call(this,t,e,i,r)},vt.copyNode=function(t){var e=new mt(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var $t,wt,gt="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",bt=gt+" Extended_Pictographic",_t=bt+" EBase EComp EMod EPres ExtPict",Et={9:gt,10:bt,11:bt,12:_t,13:_t,14:_t},Ot={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},jt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",St="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",xt=St+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",kt=xt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Pt=kt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",It=Pt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",At={9:St,10:xt,11:kt,12:Pt,13:It,14:It+" Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"},Ct={};for(var Nt=0,Tt=[9,10,11,12,13,14];Nt<Tt.length;Nt+=1)wt=void 0,(wt=Ct[$t=Tt[Nt]]={binary:R(Et[$t]+" "+jt),binaryOfStrings:R(Ot[$t]),nonBinary:{General_Category:R(jt),Script:R(At[$t])}}).nonBinary.Script_Extensions=wt.nonBinary.Script,wt.nonBinary.gc=wt.nonBinary.General_Category,wt.nonBinary.sc=wt.nonBinary.Script,wt.nonBinary.scx=wt.nonBinary.Script_Extensions;var Mt=G.prototype,Rt=function(t,e){this.parent=t,this.base=e||this};Rt.prototype.separatedFrom=function(t){for(var e=this;e;e=e.parent)for(var i=t;i;i=i.parent)if(e.base===i.base&&e!==i)return!0;return!1},Rt.prototype.sibling=function(){return new Rt(this.parent,this.base)};var Dt=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Ct[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function zt(t){return 105===t||109===t||115===t}function Lt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function Ut(t){return t>=65&&t<=90||t>=97&&t<=122}function qt(t){return Ut(t)||95===t}function Ft(t){return qt(t)||Bt(t)}function Bt(t){return t>=48&&t<=57}function Vt(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function Gt(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function Ht(t){return t>=48&&t<=55}Dt.prototype.reset=function(t,e,i){var r=-1!==i.indexOf("v"),n=-1!==i.indexOf("u");this.start=0|t,this.source=e+"",this.flags=i,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},Dt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Dt.prototype.at=function(t,e){void 0===e&&(e=!1);var i=this.source,r=i.length;if(t>=r)return-1;var n=i.charCodeAt(t);if(!e&&!this.switchU||n<=55295||n>=57344||t+1>=r)return n;var s=i.charCodeAt(t+1);return s>=56320&&s<=57343?(n<<10)+s-56613888:n},Dt.prototype.nextIndex=function(t,e){void 0===e&&(e=!1);var i=this.source,r=i.length;if(t>=r)return r;var n,s=i.charCodeAt(t);return!e&&!this.switchU||s<=55295||s>=57344||t+1>=r||(n=i.charCodeAt(t+1))<56320||n>57343?t+1:t+2},Dt.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},Dt.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},Dt.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},Dt.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},Dt.prototype.eatChars=function(t,e){void 0===e&&(e=!1);for(var i=this.pos,r=0,n=t;r<n.length;r+=1){var s=n[r],o=this.at(i,e);if(-1===o||o!==s)return!1;i=this.nextIndex(i,e)}return this.pos=i,!0},Mt.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,r=!1,n=!1,s=0;s<i.length;s++){var o=i.charAt(s);-1===e.indexOf(o)&&this.raise(t.start,"Invalid regular expression flag"),i.indexOf(o,s+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),"u"===o&&(r=!0),"v"===o&&(n=!0)}this.options.ecmaVersion>=15&&r&&n&&this.raise(t.start,"Invalid regular expression flag")},Mt.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&function(t){for(var e in t)return!0;return!1}(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},Mt.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e<i.length;e+=1)t.groupNames[i[e]]||t.raise("Invalid named capture referenced")},Mt.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Rt(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},Mt.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},Mt.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},Mt.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1},Mt.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},Mt.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},Mt.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var r=0,n=-1;if(this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(n=t.lastIntValue),t.eat(125)))return-1!==n&&n<r&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=i}return!1},Mt.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},Mt.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},Mt.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(t),r=t.eat(45);if(i||r){for(var n=0;n<i.length;n++){var s=i.charAt(n);i.indexOf(s,n+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(r){var o=this.regexp_eatModifiers(t);i||o||58!==t.current()||t.raise("Invalid regular expression modifiers");for(var a=0;a<o.length;a++){var h=o.charAt(a);(o.indexOf(h,a+1)>-1||i.indexOf(h)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},Mt.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},Mt.regexp_eatModifiers=function(t){for(var e="",i=0;-1!==(i=t.current())&&zt(i);)e+=D(i),t.advance();return e},Mt.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},Mt.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},Mt.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Lt(e)&&(t.lastIntValue=e,t.advance(),!0)},Mt.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!Lt(i);)t.advance();return t.pos!==e},Mt.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e||(t.advance(),0))},Mt.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,i=t.groupNames[t.lastStringValue];if(i)if(e)for(var r=0,n=i;r<n.length;r+=1)n[r].separatedFrom(t.branchID)||t.raise("Duplicate capture group name");else t.raise("Duplicate capture group name");e?(i||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},Mt.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},Mt.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=D(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=D(t.lastIntValue);return!0}return!1},Mt.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,r=t.current(i);return t.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(r=t.lastIntValue),function(t){return m(t,!0)||36===t||95===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Mt.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,r=t.current(i);return t.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(r=t.lastIntValue),function(t){return v(t,!0)||36===t||95===t||8204===t||8205===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Mt.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},Mt.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1},Mt.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},Mt.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},Mt.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},Mt.regexp_eatZero=function(t){return 48===t.current()&&!Bt(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},Mt.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},Mt.regexp_eatControlLetter=function(t){var e=t.current();return!!Ut(e)&&(t.lastIntValue=e%32,t.advance(),!0)},Mt.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var i,r=t.pos,n=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var s=t.lastIntValue;if(n&&s>=55296&&s<=56319){var o=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var a=t.lastIntValue;if(a>=56320&&a<=57343)return t.lastIntValue=1024*(s-55296)+(a-56320)+65536,!0}t.pos=o,t.lastIntValue=s}return!0}if(n&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&(i=t.lastIntValue)>=0&&i<=1114111)return!0;n&&t.raise("Invalid unicode escape"),t.pos=r}return!1},Mt.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e||(t.lastIntValue=e,t.advance(),0))},Mt.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1},Mt.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(function(t){return 100===t||68===t||115===t||83===t||119===t||87===t}(e))return t.lastIntValue=-1,t.advance(),1;var i=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((i=80===e)||112===e)){var r;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return i&&2===r&&t.raise("Invalid property name"),r;t.raise("Invalid property name")}return 0},Mt.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t))return this.regexp_validateUnicodePropertyNameAndValue(t,i,t.lastStringValue),1}return t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)?this.regexp_validateUnicodePropertyNameOrValue(t,t.lastStringValue):0},Mt.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){N(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},Mt.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?1:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?2:void t.raise("Invalid property name")},Mt.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";qt(e=t.current());)t.lastStringValue+=D(e),t.advance();return""!==t.lastStringValue},Mt.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Ft(e=t.current());)t.lastStringValue+=D(e),t.advance();return""!==t.lastStringValue},Mt.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},Mt.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),i=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&2===i&&t.raise("Negated character class may contain strings"),!0}return!1},Mt.regexp_classContents=function(t){return 93===t.current()?1:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),1)},Mt.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;!t.switchU||-1!==e&&-1!==i||t.raise("Invalid character class"),-1!==e&&-1!==i&&e>i&&t.raise("Range out of order in character class")}}},Mt.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(99===i||Ht(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var r=t.current();return 93!==r&&(t.lastIntValue=r,t.advance(),!0)},Mt.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},Mt.regexp_classSetExpression=function(t){var e,i=1;if(this.regexp_eatClassSetRange(t));else if(e=this.regexp_eatClassSetOperand(t)){2===e&&(i=2);for(var r=t.pos;t.eatChars([38,38]);)38!==t.current()&&(e=this.regexp_eatClassSetOperand(t))?2!==e&&(i=1):t.raise("Invalid character in character class");if(r!==t.pos)return i;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(r!==t.pos)return i}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return i;2===e&&(i=2)}},Mt.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var r=t.lastIntValue;return-1!==i&&-1!==r&&i>r&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},Mt.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?1:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},Mt.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var i=t.eat(94),r=this.regexp_classContents(t);if(t.eat(93))return i&&2===r&&t.raise("Negated character class may contain strings"),r;t.pos=e}if(t.eat(92)){var n=this.regexp_eatCharacterClassEscape(t);if(n)return n;t.pos=e}return null},Mt.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var i=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return i}else t.raise("Invalid escape");t.pos=e}return null},Mt.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)2===this.regexp_classString(t)&&(e=2);return e},Mt.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?1:2},Mt.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t)&&(t.eat(98)?(t.lastIntValue=8,0):(t.pos=e,1)));var i=t.current();return!(i<0||i===t.lookahead()&&function(t){return 33===t||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t}(i)||function(t){return 40===t||41===t||45===t||47===t||t>=91&&t<=93||t>=123&&t<=125}(i)||(t.advance(),t.lastIntValue=i,0))},Mt.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!function(t){return 33===t||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t}(e)&&(t.lastIntValue=e,t.advance(),!0)},Mt.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Bt(e)&&95!==e||(t.lastIntValue=e%32,t.advance(),0))},Mt.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},Mt.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Bt(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},Mt.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Vt(i=t.current());)t.lastIntValue=16*t.lastIntValue+Gt(i),t.advance();return t.pos!==e},Mt.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;t.lastIntValue=e<=3&&this.regexp_eatOctalDigit(t)?64*e+8*i+t.lastIntValue:8*e+i}else t.lastIntValue=e;return!0}return!1},Mt.regexp_eatOctalDigit=function(t){var e=t.current();return Ht(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},Mt.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var r=0;r<e;++r){var n=t.current();if(!Vt(n))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+Gt(n),t.advance()}return!0};var Kt=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new U(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Wt=G.prototype;function Jt(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}Wt.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Kt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Wt.getToken=function(){return this.next(),new Kt(this)},"undefined"!=typeof Symbol&&(Wt[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===E.eof,value:e}}}}),Wt.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(E.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},Wt.readToken=function(t){return m(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},Wt.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var i=this.input.charCodeAt(t+1);return i<=56319||i>=57344?e:(e<<10)+i-56613888},Wt.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Wt.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var r=void 0,n=e;(r=x(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,i),e,this.pos,t,this.curPosition())},Wt.skipLineComment=function(t){for(var e=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!S(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())},Wt.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&k.test(String.fromCharCode(t))))break t;++this.pos}}},Wt.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)},Wt.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(E.ellipsis)):(++this.pos,this.finishToken(E.dot))},Wt.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(E.assign,2):this.finishOp(E.slash,1)},Wt.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,r=42===t?E.star:E.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,r=E.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(E.assign,i+1):this.finishOp(r,i)},Wt.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(E.assign,3):this.finishOp(124===t?E.logicalOR:E.logicalAND,2):61===e?this.finishOp(E.assign,2):this.finishOp(124===t?E.bitwiseOR:E.bitwiseAND,1)},Wt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(E.assign,2):this.finishOp(E.bitwiseXOR,1)},Wt.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!O.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(E.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(E.assign,2):this.finishOp(E.plusMin,1)},Wt.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+i)?this.finishOp(E.assign,i+1):this.finishOp(E.bitShift,i)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(i=2),this.finishOp(E.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Wt.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(E.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(E.arrow)):this.finishOp(61===t?E.eq:E.prefix,1)},Wt.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(E.questionDot,2)}if(63===e)return t>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(E.assign,3):this.finishOp(E.coalesce,2)}return this.finishOp(E.question,1)},Wt.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,m(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(E.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+D(t)+"'")},Wt.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(E.parenL);case 41:return++this.pos,this.finishToken(E.parenR);case 59:return++this.pos,this.finishToken(E.semi);case 44:return++this.pos,this.finishToken(E.comma);case 91:return++this.pos,this.finishToken(E.bracketL);case 93:return++this.pos,this.finishToken(E.bracketR);case 123:return++this.pos,this.finishToken(E.braceL);case 125:return++this.pos,this.finishToken(E.braceR);case 58:return++this.pos,this.finishToken(E.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(E.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(E.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+D(t)+"'")},Wt.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},Wt.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(O.test(r)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if("["===r)e=!0;else if("]"===r&&e)e=!1;else if("/"===r&&!e)break;t="\\"===r}++this.pos}var n=this.input.slice(i,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Dt(this));a.reset(i,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var h=null;try{h=new RegExp(n,o)}catch(t){}return this.finishToken(E.regexp,{pattern:n,flags:o,value:h})},Wt.readInt=function(t,e,i){for(var r=this.options.ecmaVersion>=12&&void 0===e,n=i&&48===this.input.charCodeAt(this.pos),s=this.pos,o=0,a=0,h=0,u=null==e?1/0:e;h<u;++h,++this.pos){var c=this.input.charCodeAt(this.pos),f=void 0;if(r&&95===c)n&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===a&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===h&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=c;else{if((f=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=t)break;a=c,o=o*t+f}}return r&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=e&&this.pos-s!==e?null:o},Wt.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);return null==i&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(i=Jt(this.input.slice(e,this.pos)),++this.pos):m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(E.num,i)},Wt.readNumber=function(t){var e=this.pos;t||null!==this.readInt(10,void 0,!0)||this.raise(e,"Invalid number");var i=this.pos-e>=2&&48===this.input.charCodeAt(e);i&&this.strict&&this.raise(e,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&110===r){var n=Jt(this.input.slice(e,this.pos));return++this.pos,m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(E.num,n)}i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1),46!==r||i||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||i||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s,o=(s=this.input.slice(e,this.pos),i?parseInt(s,8):parseFloat(s.replace(/_/g,"")));return this.finishToken(E.num,o)},Wt.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},Wt.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===t)break;92===r?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(S(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(E.string,e)};var Zt={};function Xt(t,e){return G.parse(t,e)}Wt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==Zt)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Wt.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Zt;this.raise(t,e)},Wt.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==E.template&&this.type!==E.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(E.template,t)):36===i?(this.pos+=2,this.finishToken(E.dollarBraceL)):(++this.pos,this.finishToken(E.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(S(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},Wt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(E.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},Wt.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return D(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t&&this.invalidStringToken(this.pos-1,"Invalid escape sequence in template string");default:if(e>=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);return r>255&&(i=i.slice(0,-1),r=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),"0"===i&&56!==e&&57!==e||!this.strict&&!t||this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return S(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},Wt.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},Wt.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(v(n,r))this.pos+=n<=65535?1:2;else{if(92!==n)break;this.containsEsc=!0,t+=this.input.slice(i,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(e?m:v)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=D(o),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},Wt.readWord=function(){var t=this.readWord1(),e=E.name;return this.keywords.test(t)&&(e=b[t]),this.finishToken(e,t)},G.acorn={Parser:G,version:"8.18.0",defaultOptions:F,Position:L,SourceLocation:U,getLineInfo:q,Node:mt,TokenType:y,tokTypes:E,keywordTypes:b,TokContext:st,tokContexts:ot,isIdentifierChar:v,isIdentifierStart:m,Token:Kt,isNewLine:S,lineBreak:O,lineBreakG:j,nonASCIIwhitespace:k};var Qt,Yt={exports:{}},te={},ee={},ie={},re={},ne={},se={};function oe(){return Qt||(Qt=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends e{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=i;class r extends e{constructor(t){super(),this._items="string"==typeof t?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return""===t||'""'===t}get str(){var t;return null!==(t=this._str)&&void 0!==t?t:this._str=this._items.reduce(((t,e)=>`${t}${e}`),"")}get names(){var t;return null!==(t=this._names)&&void 0!==t?t:this._names=this._items.reduce(((t,e)=>(e instanceof i&&(t[e.str]=(t[e.str]||0)+1),t)),{})}}function n(t,...e){const i=[t[0]];let n=0;for(;n<e.length;)a(i,e[n]),i.push(t[++n]);return new r(i)}t._Code=r,t.nil=new r(""),t._=n;const s=new r("+");function o(t,...e){const i=[u(t[0])];let n=0;for(;n<e.length;)i.push(s),a(i,e[n]),i.push(s,u(t[++n]));return function(t){let e=1;for(;e<t.length-1;){if(t[e]===s){const i=h(t[e-1],t[e+1]);if(void 0!==i){t.splice(e-1,3,i);continue}t[e++]="+"}e++}}(i),new r(i)}function a(t,e){var n;e instanceof r?t.push(...e._items):t.push(e instanceof i?e:"number"==typeof(n=e)||"boolean"==typeof n||null===n?n:u(Array.isArray(n)?n.join(","):n))}function h(t,e){if('""'===e)return t;if('""'===t)return e;if("string"==typeof t){if(e instanceof i||'"'!==t[t.length-1])return;return"string"!=typeof e?`${t.slice(0,-1)}${e}"`:'"'===e[0]?t.slice(0,-1)+e.slice(1):void 0}return"string"!=typeof e||'"'!==e[0]||t instanceof i?void 0:`"${t}${e.slice(1)}`}function u(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=o,t.addCodeArg=a,t.strConcat=function(t,e){return e.emptyStr()?t:t.emptyStr()?e:o`${t}${e}`},t.stringify=function(t){return new r(u(t))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new r(`.${e}`):n`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new r(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(t){return new r(t.toString())}}(se)),se}var ae,he,ue={};function ce(){return ae||(ae=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=oe();class i extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}}var r;!function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"}(r||(t.UsedValueState=r={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class n{constructor({prefixes:t,parent:e}={}){this._names={},this._prefixes=t,this._parent=e}toName(t){return t instanceof e.Name?t:this.name(t)}name(t){return new e.Name(this._newName(t))}_newName(t){return`${t}${(this._names[t]||this._nameGroup(t)).index++}`}_nameGroup(t){var e,i;if((null===(i=null===(e=this._parent)||void 0===e?void 0:e._prefixes)||void 0===i?void 0:i.has(t))||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}}t.Scope=n;class s extends e.Name{constructor(t,e){super(e),this.prefix=t}setValue(t,{property:i,itemIndex:r}){this.value=t,this.scopePath=e._`.${new e.Name(i)}[${r}]`}}t.ValueScopeName=s;const o=e._`\n`;t.ValueScope=class extends n{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?o:e.nil}}get(){return this._scope}name(t){return new s(t,this._newName(t))}value(t,e){var i;if(void 0===e.ref)throw new Error("CodeGen: ref must be passed in value");const r=this.toName(t),{prefix:n}=r,s=null!==(i=e.key)&&void 0!==i?i:e.ref;let o=this._values[n];if(o){const t=o.get(s);if(t)return t}else o=this._values[n]=new Map;o.set(s,r);const a=this._scope[n]||(this._scope[n]=[]),h=a.length;return a[h]=e.ref,r.setValue(e,{property:n,itemIndex:h}),r}getValue(t,e){const i=this._values[t];if(i)return i.get(e)}scopeRefs(t,i=this._values){return this._reduceValues(i,(i=>{if(void 0===i.scopePath)throw new Error(`CodeGen: name "${i}" has no value`);return e._`${t}${i.scopePath}`}))}scopeCode(t=this._values,e,i){return this._reduceValues(t,(t=>{if(void 0===t.value)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),e,i)}_reduceValues(n,s,o={},a){let h=e.nil;for(const u in n){const c=n[u];if(!c)continue;const f=o[u]=o[u]||new Map;c.forEach((n=>{if(f.has(n))return;f.set(n,r.Started);let o=s(n);if(o)h=e._`${h}${this.opts.es5?t.varKinds.var:t.varKinds.const} ${n} = ${o};${this.opts._n}`;else{if(!(o=null==a?void 0:a(n)))throw new i(n);h=e._`${h}${o}${this.opts._n}`}f.set(n,r.Completed)}))}return h}}}(ue)),ue}function fe(){return he||(he=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=oe(),i=ce();var r=oe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var n=ce();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(t,e){return this}}class o extends s{constructor(t,e,i){super(),this.varKind=t,this.name=e,this.rhs=i}render({es5:t,_n:e}){return`${t?i.varKinds.var:this.varKind} ${this.name}${void 0===this.rhs?"":` = ${this.rhs}`};`+e}optimizeNames(t,e){if(t[this.name.str])return this.rhs&&(this.rhs=P(this.rhs,t,e)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(t,e,i){super(),this.lhs=t,this.rhs=e,this.sideEffects=i}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,i){if(!(this.lhs instanceof e.Name)||t[this.lhs.str]||this.sideEffects)return this.rhs=P(this.rhs,t,i),this}get names(){return k(this.lhs instanceof e.Name?{}:{...this.lhs.names},this.rhs)}}class h extends a{constructor(t,e,i,r){super(t,i,r),this.op=e}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class u extends s{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}}class c extends s{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}}class f extends s{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class l extends s{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,e){return this.code=P(this.code,t,e),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class d extends s{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce(((e,i)=>e+i.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let e=t.length;for(;e--;){const i=t[e].optimizeNodes();Array.isArray(i)?t.splice(e,1,...i):i?t[e]=i:t.splice(e,1)}return t.length>0?this:void 0}optimizeNames(t,e){const{nodes:i}=this;let r=i.length;for(;r--;){const n=i[r];n.optimizeNames(t,e)||(I(t,n.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce(((t,e)=>x(t,e.names)),{})}}class p extends d{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class m extends d{}class v extends p{}v.kind="else";class y extends p{constructor(t,e){super(e),this.condition=t}render(t){let e=`if(${this.condition})`+super.render(t);return this.else&&(e+="else "+this.else.render(t)),e}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(!0===t)return this.nodes;let e=this.else;if(e){const t=e.optimizeNodes();e=this.else=Array.isArray(t)?new v(t):t}return e?!1===t?e instanceof y?e:e.nodes:this.nodes.length?this:new y(A(t),e instanceof y?[e]:e.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(t,e){var i;if(this.else=null===(i=this.else)||void 0===i?void 0:i.optimizeNames(t,e),super.optimizeNames(t,e)||this.else)return this.condition=P(this.condition,t,e),this}get names(){const t=super.names;return k(t,this.condition),this.else&&x(t,this.else.names),t}}y.kind="if";class $ extends p{}$.kind="for";class w extends ${constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iteration=P(this.iteration,t,e),this}get names(){return x(super.names,this.iteration.names)}}class g extends ${constructor(t,e,i,r){super(),this.varKind=t,this.name=e,this.from=i,this.to=r}render(t){const e=t.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:s}=this;return`for(${e} ${r}=${n}; ${r}<${s}; ${r}++)`+super.render(t)}get names(){const t=k(super.names,this.from);return k(t,this.to)}}class b extends ${constructor(t,e,i,r){super(),this.loop=t,this.varKind=e,this.name=i,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iterable=P(this.iterable,t,e),this}get names(){return x(super.names,this.iterable.names)}}class _ extends p{constructor(t,e,i){super(),this.name=t,this.args=e,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}_.kind="func";class E extends d{render(t){return"return "+super.render(t)}}E.kind="return";class O extends p{render(t){let e="try"+super.render(t);return this.catch&&(e+=this.catch.render(t)),this.finally&&(e+=this.finally.render(t)),e}optimizeNodes(){var t,e;return super.optimizeNodes(),null===(t=this.catch)||void 0===t||t.optimizeNodes(),null===(e=this.finally)||void 0===e||e.optimizeNodes(),this}optimizeNames(t,e){var i,r;return super.optimizeNames(t,e),null===(i=this.catch)||void 0===i||i.optimizeNames(t,e),null===(r=this.finally)||void 0===r||r.optimizeNames(t,e),this}get names(){const t=super.names;return this.catch&&x(t,this.catch.names),this.finally&&x(t,this.finally.names),t}}class j extends p{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}j.kind="catch";class S extends p{render(t){return"finally"+super.render(t)}}function x(t,e){for(const i in e)t[i]=(t[i]||0)+(e[i]||0);return t}function k(t,i){return i instanceof e._CodeOrName?x(t,i.names):t}function P(t,i,r){return t instanceof e.Name?s(t):(n=t)instanceof e._Code&&n._items.some((t=>t instanceof e.Name&&1===i[t.str]&&void 0!==r[t.str]))?new e._Code(t._items.reduce(((t,i)=>(i instanceof e.Name&&(i=s(i)),i instanceof e._Code?t.push(...i._items):t.push(i),t)),[])):t;var n;function s(t){const e=r[t.str];return void 0===e||1!==i[t.str]?t:(delete i[t.str],e)}}function I(t,e){for(const i in e)t[i]=(t[i]||0)-(e[i]||0)}function A(t){return"boolean"==typeof t||"number"==typeof t||null===t?!t:e._`!${M(t)}`}S.kind="finally",t.CodeGen=class{constructor(t,e={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...e,_n:e.lines?"\n":""},this._extScope=t,this._scope=new i.Scope({parent:t}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,e){const i=this._extScope.value(t,e);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(t,e){return this._extScope.getValue(t,e)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,e,i,r){const n=this._scope.toName(e);return void 0!==i&&r&&(this._constants[n.str]=i),this._leafNode(new o(t,n,i)),n}const(t,e,r){return this._def(i.varKinds.const,t,e,r)}let(t,e,r){return this._def(i.varKinds.let,t,e,r)}var(t,e,r){return this._def(i.varKinds.var,t,e,r)}assign(t,e,i){return this._leafNode(new a(t,e,i))}add(e,i){return this._leafNode(new h(e,t.operators.ADD,i))}code(t){return"function"==typeof t?t():t!==e.nil&&this._leafNode(new l(t)),this}object(...t){const i=["{"];for(const[r,n]of t)i.length>1&&i.push(","),i.push(r),(r!==n||this.opts.es5)&&(i.push(":"),(0,e.addCodeArg)(i,n));return i.push("}"),new e._Code(i)}if(t,e,i){if(this._blockNode(new y(t)),e&&i)this.code(e).else().code(i).endIf();else if(e)this.code(e).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new y(t))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(y,v)}_for(t,e){return this._blockNode(t),e&&this.code(e).endFor(),this}for(t,e){return this._for(new w(t),e)}forRange(t,e,r,n,s=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const o=this._scope.toName(t);return this._for(new g(s,o,e,r),(()=>n(o)))}forOf(t,r,n,s=i.varKinds.const){const o=this._scope.toName(t);if(this.opts.es5){const t=r instanceof e.Name?r:this.var("_arr",r);return this.forRange("_i",0,e._`${t}.length`,(i=>{this.var(o,e._`${t}[${i}]`),n(o)}))}return this._for(new b("of",s,o,r),(()=>n(o)))}forIn(t,r,n,s=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(t,e._`Object.keys(${r})`,n);const o=this._scope.toName(t);return this._for(new b("in",s,o,r),(()=>n(o)))}endFor(){return this._endBlockNode($)}label(t){return this._leafNode(new u(t))}break(t){return this._leafNode(new c(t))}return(t){const e=new E;if(this._blockNode(e),this.code(t),1!==e.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(t,e,i){if(!e&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new O;if(this._blockNode(r),this.code(t),e){const t=this.name("e");this._currNode=r.catch=new j(t),e(t)}return i&&(this._currNode=r.finally=new S,this.code(i)),this._endBlockNode(j,S)}throw(t){return this._leafNode(new f(t))}block(t,e){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(e),this}endBlock(t){const e=this._blockStarts.pop();if(void 0===e)throw new Error("CodeGen: not in self-balancing block");const i=this._nodes.length-e;if(i<0||void 0!==t&&i!==t)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${t} expected`);return this._nodes.length=e,this}func(t,i=e.nil,r,n){return this._blockNode(new _(t,i,r)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,e){const i=this._currNode;if(i instanceof t||e&&i instanceof e)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${e?`${t.kind}/${e.kind}`:t.kind}"`)}_elseNode(t){const e=this._currNode;if(!(e instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=e.else=t,this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const e=this._nodes;e[e.length-1]=t}},t.not=A;const C=T(t.operators.AND);t.and=function(...t){return t.reduce(C)};const N=T(t.operators.OR);function T(t){return(i,r)=>i===e.nil?r:r===e.nil?i:e._`${M(i)} ${t} ${M(r)}`}function M(t){return t instanceof e.Name?t:e._`(${t})`}t.or=function(...t){return t.reduce(N)}}(ne)),ne}var le,de={};function pe(){if(le)return de;le=1,Object.defineProperty(de,"__esModule",{value:!0}),de.checkStrictMode=de.getErrorPath=de.Type=de.useFunc=de.setEvaluated=de.evaluatedPropsToName=de.mergeEvaluated=de.eachItem=de.unescapeJsonPointer=de.escapeJsonPointer=de.escapeFragment=de.unescapeFragment=de.schemaRefOrVal=de.schemaHasRulesButRef=de.schemaHasRules=de.checkUnknownRules=de.alwaysValidSchema=de.toHash=void 0;const t=fe(),e=oe();function i(t,e=t.schema){const{opts:i,self:r}=t;if(!i.strictSchema)return;if("boolean"==typeof e)return;const n=r.RULES.keywords;for(const i in e)n[i]||f(t,`unknown keyword: "${i}"`)}function r(t,e){if("boolean"==typeof t)return!t;for(const i in t)if(e[i])return!0;return!1}function n(t){return"number"==typeof t?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}function s(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function o({mergeNames:e,mergeToName:i,mergeValues:r,resultToName:n}){return(s,o,a,h)=>{const u=void 0===a?o:a instanceof t.Name?(o instanceof t.Name?e(s,o,a):i(s,o,a),a):o instanceof t.Name?(i(s,a,o),o):r(o,a);return h!==t.Name||u instanceof t.Name?u:n(s,u)}}function a(e,i){if(!0===i)return e.var("props",!0);const r=e.var("props",t._`{}`);return void 0!==i&&h(e,r,i),r}function h(e,i,r){Object.keys(r).forEach((r=>e.assign(t._`${i}${(0,t.getProperty)(r)}`,!0)))}de.toHash=function(t){const e={};for(const i of t)e[i]=!0;return e},de.alwaysValidSchema=function(t,e){return"boolean"==typeof e?e:0===Object.keys(e).length||(i(t,e),!r(e,t.self.RULES.all))},de.checkUnknownRules=i,de.schemaHasRules=r,de.schemaHasRulesButRef=function(t,e){if("boolean"==typeof t)return!t;for(const i in t)if("$ref"!==i&&e.all[i])return!0;return!1},de.schemaRefOrVal=function({topSchemaRef:e,schemaPath:i},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return t._`${r}`}return t._`${e}${i}${(0,t.getProperty)(n)}`},de.unescapeFragment=function(t){return s(decodeURIComponent(t))},de.escapeFragment=function(t){return encodeURIComponent(n(t))},de.escapeJsonPointer=n,de.unescapeJsonPointer=s,de.eachItem=function(t,e){if(Array.isArray(t))for(const i of t)e(i);else e(t)},de.mergeEvaluated={props:o({mergeNames:(e,i,r)=>e.if(t._`${r} !== true && ${i} !== undefined`,(()=>{e.if(t._`${i} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,t._`${r} || {}`).code(t._`Object.assign(${r}, ${i})`)))})),mergeToName:(e,i,r)=>e.if(t._`${r} !== true`,(()=>{!0===i?e.assign(r,!0):(e.assign(r,t._`${r} || {}`),h(e,r,i))})),mergeValues:(t,e)=>!0===t||{...t,...e},resultToName:a}),items:o({mergeNames:(e,i,r)=>e.if(t._`${r} !== true && ${i} !== undefined`,(()=>e.assign(r,t._`${i} === true ? true : ${r} > ${i} ? ${r} : ${i}`))),mergeToName:(e,i,r)=>e.if(t._`${r} !== true`,(()=>e.assign(r,!0===i||t._`${r} > ${i} ? ${r} : ${i}`))),mergeValues:(t,e)=>!0===t||Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})},de.evaluatedPropsToName=a,de.setEvaluated=h;const u={};var c;function f(t,e,i=t.opts.strictSchema){if(i){if(e=`strict mode: ${e}`,!0===i)throw new Error(e);t.self.logger.warn(e)}}return de.useFunc=function(t,i){return t.scopeValue("func",{ref:i,code:u[i.code]||(u[i.code]=new e._Code(i.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(c||(de.Type=c={})),de.getErrorPath=function(e,i,r){if(e instanceof t.Name){const n=i===c.Num;return r?n?t._`"[" + ${e} + "]"`:t._`"['" + ${e} + "']"`:n?t._`"/" + ${e}`:t._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():"/"+n(e)},de.checkStrictMode=f,de}var me,ve,ye,$e={};function we(){if(me)return $e;me=1,Object.defineProperty($e,"__esModule",{value:!0});const t=fe(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return $e.default=e,$e}function ge(){return ve||(ve=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=fe(),i=pe(),r=we();function n(t,i){const n=t.const("err",i);t.if(e._`${r.default.vErrors} === null`,(()=>t.assign(r.default.vErrors,e._`[${n}]`)),e._`${r.default.vErrors}.push(${n})`),t.code(e._`${r.default.errors}++`)}function s(t,i){const{gen:r,validateName:n,schemaEnv:s}=t;s.$async?r.throw(e._`new ${t.ValidationError}(${i})`):(r.assign(e._`${n}.errors`,i),r.return(!1))}t.keywordError={message:({keyword:t})=>e.str`must pass "${t}" keyword validation`},t.keyword$DataError={message:({keyword:t,schemaType:i})=>i?e.str`"${t}" keyword must be ${i} ($data)`:e.str`"${t}" keyword is invalid ($data)`},t.reportError=function(i,r=t.keywordError,o,h){const{it:u}=i,{gen:c,compositeRule:f,allErrors:l}=u,d=a(i,r,o);(null!=h?h:f||l)?n(c,d):s(u,e._`[${d}]`)},t.reportExtraError=function(e,i=t.keywordError,o){const{it:h}=e,{gen:u,compositeRule:c,allErrors:f}=h;n(u,a(e,i,o)),c||f||s(h,r.default.vErrors)},t.resetErrorsCount=function(t,i){t.assign(r.default.errors,i),t.if(e._`${r.default.vErrors} !== null`,(()=>t.if(i,(()=>t.assign(e._`${r.default.vErrors}.length`,i)),(()=>t.assign(r.default.vErrors,null)))))},t.extendErrors=function({gen:t,keyword:i,schemaValue:n,data:s,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const h=t.name("err");t.forRange("i",o,r.default.errors,(o=>{t.const(h,e._`${r.default.vErrors}[${o}]`),t.if(e._`${h}.instancePath === undefined`,(()=>t.assign(e._`${h}.instancePath`,(0,e.strConcat)(r.default.instancePath,a.errorPath)))),t.assign(e._`${h}.schemaPath`,e.str`${a.errSchemaPath}/${i}`),a.opts.verbose&&(t.assign(e._`${h}.schema`,n),t.assign(e._`${h}.data`,s))}))};const o={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function a(t,i,n){const{createErrors:s}=t.it;return!1===s?e._`{}`:function(t,i,n={}){const{gen:s,it:a}=t,c=[h(a,n),u(t,n)];return function(t,{params:i,message:n},s){const{keyword:a,data:h,schemaValue:u,it:c}=t,{opts:f,propertyName:l,topSchemaRef:d,schemaPath:p}=c;s.push([o.keyword,a],[o.params,"function"==typeof i?i(t):i||e._`{}`]),f.messages&&s.push([o.message,"function"==typeof n?n(t):n]),f.verbose&&s.push([o.schema,u],[o.parentSchema,e._`${d}${p}`],[r.default.data,h]),l&&s.push([o.propertyName,l])}(t,i,c),s.object(...c)}(t,i,n)}function h({errorPath:t},{instancePath:n}){const s=n?e.str`${t}${(0,i.getErrorPath)(n,i.Type.Str)}`:t;return[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,s)]}function u({keyword:t,it:{errSchemaPath:r}},{schemaPath:n,parentSchema:s}){let a=s?r:e.str`${r}/${t}`;return n&&(a=e.str`${a}${(0,i.getErrorPath)(n,i.Type.Str)}`),[o.schemaPath,a]}}(re)),re}function be(){if(ye)return ie;ye=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.boolOrEmptySchema=ie.topBoolOrEmptySchema=void 0;const t=ge(),e=fe(),i=we(),r={message:"boolean schema is false"};function n(e,i){const{gen:n,data:s}=e;(0,t.reportError)({gen:n,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},r,void 0,i)}return ie.topBoolOrEmptySchema=function(t){const{gen:r,schema:s,validateName:o}=t;!1===s?n(t,!1):"object"==typeof s&&!0===s.$async?r.return(i.default.data):(r.assign(e._`${o}.errors`,null),r.return(!0))},ie.boolOrEmptySchema=function(t,e){const{gen:i,schema:r}=t;!1===r?(i.var(e,!1),n(t)):i.var(e,!0)},ie}var _e,Ee={},Oe={};function je(){if(_e)return Oe;_e=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.getRules=Oe.isJSONType=void 0;const t=new Set(["string","number","integer","boolean","null","object","array"]);return Oe.isJSONType=function(e){return"string"==typeof e&&t.has(e)},Oe.getRules=function(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}},Oe}var Se,xe,ke={};function Pe(){if(Se)return ke;function t(t,i){return i.rules.some((i=>e(t,i)))}function e(t,e){var i;return void 0!==t[e.keyword]||(null===(i=e.definition.implements)||void 0===i?void 0:i.some((e=>void 0!==t[e])))}return Se=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.shouldUseRule=ke.shouldUseGroup=ke.schemaHasRulesForType=void 0,ke.schemaHasRulesForType=function({schema:e,self:i},r){const n=i.RULES.types[r];return n&&!0!==n&&t(e,n)},ke.shouldUseGroup=t,ke.shouldUseRule=e,ke}function Ie(){if(xe)return Ee;xe=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.reportTypeError=Ee.checkDataTypes=Ee.checkDataType=Ee.coerceAndCheckDataType=Ee.getJSONTypes=Ee.getSchemaTypes=Ee.DataType=void 0;const t=je(),e=Pe(),i=ge(),r=fe(),n=pe();var s;function o(e){const i=Array.isArray(e)?e:e?[e]:[];if(i.every(t.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}!function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"}(s||(Ee.DataType=s={})),Ee.getSchemaTypes=function(t){const e=o(t.type);if(e.includes("null")){if(!1===t.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&void 0!==t.nullable)throw new Error('"nullable" cannot be used without "type"');!0===t.nullable&&e.push("null")}return e},Ee.getJSONTypes=o,Ee.coerceAndCheckDataType=function(t,i){const{gen:n,data:o,opts:h}=t,c=function(t,e){return e?t.filter((t=>a.has(t)||"array"===e&&"array"===t)):[]}(i,h.coerceTypes),l=i.length>0&&!(0===c.length&&1===i.length&&(0,e.schemaHasRulesForType)(t,i[0]));if(l){const e=u(i,o,h.strictNumbers,s.Wrong);n.if(e,(()=>{c.length?function(t,e,i){const{gen:n,data:s,opts:o}=t,h=n.let("dataType",r._`typeof ${s}`),c=n.let("coerced",r._`undefined`);"array"===o.coerceTypes&&n.if(r._`${h} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,r._`${s}[0]`).assign(h,r._`typeof ${s}`).if(u(e,s,o.strictNumbers),(()=>n.assign(c,s))))),n.if(r._`${c} !== undefined`);for(const t of i)(a.has(t)||"array"===t&&"array"===o.coerceTypes)&&l(t);function l(t){switch(t){case"string":return void n.elseIf(r._`${h} == "number" || ${h} == "boolean"`).assign(c,r._`"" + ${s}`).elseIf(r._`${s} === null`).assign(c,r._`""`);case"number":return void n.elseIf(r._`${h} == "boolean" || ${s} === null
1
+ function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,i={exports:{}},r=(e||(e=1,i.exports=function(){Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var t={},e={"==":function(t,e){return t==e},"===":function(t,e){return t===e},"!=":function(t,e){return t!=e},"!==":function(t,e){return t!==e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"<":function(t,e,i){return void 0===i?t<e:t<e&&e<i},"<=":function(t,e,i){return void 0===i?t<=e:t<=e&&e<=i},"!!":function(e){return t.truthy(e)},"!":function(e){return!t.truthy(e)},"%":function(t,e){return t%e},log:function(t){return console.log(t),t},in:function(t,e){return!(!e||void 0===e.indexOf)&&-1!==e.indexOf(t)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(t,e,i){if(i<0){var r=String(t).substr(e);return r.substr(0,r.length+i)}return String(t).substr(e,i)},"+":function(){return Array.prototype.reduce.call(arguments,(function(t,e){return parseFloat(t,10)+parseFloat(e,10)}),0)},"*":function(){return Array.prototype.reduce.call(arguments,(function(t,e){return parseFloat(t,10)*parseFloat(e,10)}))},"-":function(t,e){return void 0===e?-t:t-e},"/":function(t,e){return t/e},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,(function(t,e){return t.concat(e)}),[])},var:function(t,e){var i=void 0===e?null:e,r=this;if(void 0===t||""===t||null===t)return r;for(var n=String(t).split("."),s=0;s<n.length;s++){if(null==r)return i;if(void 0===(r=r[n[s]]))return i}return r},missing:function(){for(var e=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,r=0;r<i.length;r++){var n=i[r],s=t.apply({var:n},this);null!==s&&""!==s||e.push(n)}return e},missing_some:function(e,i){var r=t.apply({missing:i},this);return i.length-r.length>=e?[]:r}};return t.is_logic=function(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&1===Object.keys(t).length},t.truthy=function(t){return!(Array.isArray(t)&&0===t.length||!t)},t.get_operator=function(t){return Object.keys(t)[0]},t.get_values=function(e){return e[t.get_operator(e)]},t.apply=function(i,r){if(Array.isArray(i))return i.map((function(e){return t.apply(e,r)}));if(!t.is_logic(i))return i;var n,s,o,a,h,u=t.get_operator(i),c=i[u];if(Array.isArray(c)||(c=[c]),"if"===u||"?:"==u){for(n=0;n<c.length-1;n+=2)if(t.truthy(t.apply(c[n],r)))return t.apply(c[n+1],r);return c.length===n+1?t.apply(c[n],r):null}if("and"===u){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),!t.truthy(s))return s;return s}if("or"===u){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),t.truthy(s))return s;return s}if("filter"===u)return a=t.apply(c[0],r),o=c[1],Array.isArray(a)?a.filter((function(e){return t.truthy(t.apply(o,e))})):[];if("map"===u)return a=t.apply(c[0],r),o=c[1],Array.isArray(a)?a.map((function(e){return t.apply(o,e)})):[];if("reduce"===u)return a=t.apply(c[0],r),o=c[1],h=void 0!==c[2]?t.apply(c[2],r):null,Array.isArray(a)?a.reduce((function(e,i){return t.apply(o,{current:i,accumulator:e})}),h):h;if("all"===u){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!1;for(n=0;n<a.length;n+=1)if(!t.truthy(t.apply(o,a[n])))return!1;return!0}if("none"===u){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!0;for(n=0;n<a.length;n+=1)if(t.truthy(t.apply(o,a[n])))return!1;return!0}if("some"===u){if(a=t.apply(c[0],r),o=c[1],!Array.isArray(a)||!a.length)return!1;for(n=0;n<a.length;n+=1)if(t.truthy(t.apply(o,a[n])))return!0;return!1}if(c=c.map((function(e){return t.apply(e,r)})),e.hasOwnProperty(u)&&"function"==typeof e[u])return e[u].apply(r,c);if(u.indexOf(".")>0){var f=String(u).split("."),l=e;for(n=0;n<f.length;n++){if(!l.hasOwnProperty(f[n]))throw new Error("Unrecognized operation "+u+" (failed at "+f.slice(0,n+1).join(".")+")");l=l[f[n]]}return l.apply(r,c)}throw new Error("Unrecognized operation "+u)},t.uses_data=function(e){var i=[];if(t.is_logic(e)){var r=t.get_operator(e),n=e[r];Array.isArray(n)||(n=[n]),"var"===r?i.push(n[0]):n.forEach((function(e){i.push.apply(i,t.uses_data(e))}))}return function(t){for(var e=[],i=0,r=t.length;i<r;i++)-1===e.indexOf(t[i])&&e.push(t[i]);return e}(i)},t.add_operation=function(t,i){e[t]=i},t.rm_operation=function(t){delete e[t]},t.rule_like=function(e,i){if(i===e)return!0;if("@"===i)return!0;if("number"===i)return"number"==typeof e;if("string"===i)return"string"==typeof e;if("array"===i)return Array.isArray(e)&&!t.is_logic(e);if(t.is_logic(i)){if(t.is_logic(e)){var r=t.get_operator(i),n=t.get_operator(e);if("@"===r||r===n)return t.rule_like(t.get_values(e,!1),t.get_values(i,!1))}return!1}if(Array.isArray(i)){if(Array.isArray(e)){if(i.length!==e.length)return!1;for(var s=0;s<i.length;s+=1)if(!t.rule_like(e[s],i[s]))return!1;return!0}return!1}return!1},t}()),i.exports),n=t(r),s=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",h={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},u="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",c={5:u,"5module":u+" export import",6:u+" const class extends export import super"},f=/^in(stanceof)?$/,l=new RegExp("["+a+"]"),d=new RegExp("["+a+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function p(t,e){for(var i=65536,r=0;r<e.length;r+=2){if((i+=e[r])>t)return!1;if((i+=e[r+1])>=t)return!0}return!1}function m(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&l.test(String.fromCharCode(t)):!1!==e&&p(t,o)))}function v(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&d.test(String.fromCharCode(t)):!1!==e&&(p(t,o)||p(t,s)))))}var y=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function g(t,e){return new y(t,{beforeExpr:!0,binop:e})}var $={beforeExpr:!0},w={startsExpr:!0},b={};function _(t,e){return void 0===e&&(e={}),e.keyword=t,b[t]=new y(t,e)}var E={num:new y("num",w),regexp:new y("regexp",w),string:new y("string",w),name:new y("name",w),privateId:new y("privateId",w),eof:new y("eof"),bracketL:new y("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new y("]"),braceL:new y("{",{beforeExpr:!0,startsExpr:!0}),braceR:new y("}"),parenL:new y("(",{beforeExpr:!0,startsExpr:!0}),parenR:new y(")"),comma:new y(",",$),semi:new y(";",$),colon:new y(":",$),dot:new y("."),question:new y("?",$),questionDot:new y("?."),arrow:new y("=>",$),template:new y("template"),invalidTemplate:new y("invalidTemplate"),ellipsis:new y("...",$),backQuote:new y("`",w),dollarBraceL:new y("${",{beforeExpr:!0,startsExpr:!0}),eq:new y("=",{beforeExpr:!0,isAssign:!0}),assign:new y("_=",{beforeExpr:!0,isAssign:!0}),incDec:new y("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new y("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:g("||",1),logicalAND:g("&&",2),bitwiseOR:g("|",3),bitwiseXOR:g("^",4),bitwiseAND:g("&",5),equality:g("==/!=/===/!==",6),relational:g("</>/<=/>=",7),bitShift:g("<</>>/>>>",8),plusMin:new y("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:g("%",10),star:g("*",10),slash:g("/",10),starstar:new y("**",{beforeExpr:!0}),coalesce:g("??",1),_break:_("break"),_case:_("case",$),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",$),_do:_("do",{isLoop:!0,beforeExpr:!0}),_else:_("else",$),_finally:_("finally"),_for:_("for",{isLoop:!0}),_function:_("function",w),_if:_("if"),_return:_("return",$),_switch:_("switch"),_throw:_("throw",$),_try:_("try"),_var:_("var"),_const:_("const"),_while:_("while",{isLoop:!0}),_with:_("with"),_new:_("new",{beforeExpr:!0,startsExpr:!0}),_this:_("this",w),_super:_("super",w),_class:_("class",w),_extends:_("extends",$),_export:_("export"),_import:_("import",w),_null:_("null",w),_true:_("true",w),_false:_("false",w),_in:_("in",{beforeExpr:!0,binop:7}),_instanceof:_("instanceof",{beforeExpr:!0,binop:7}),_typeof:_("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:_("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:_("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},k=/\r\n?|\n|\u2028|\u2029/,S=new RegExp(k.source,"g");function x(t){return 10===t||13===t||8232===t||8233===t}function O(t,e,i){void 0===i&&(i=t.length);for(var r=e;r<i;r++){var n=t.charCodeAt(r);if(x(n))return r<i-1&&13===n&&10===t.charCodeAt(r+1)?r+2:r+1}return-1}var j=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,P=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,I=Object.prototype,C=I.hasOwnProperty,A=I.toString,N=Object.hasOwn||function(t,e){return C.call(t,e)},T=Array.isArray||function(t){return"[object Array]"===A.call(t)},M=Object.create(null);function R(t){return M[t]||(M[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function D(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}var L=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,z=function(t,e){this.line=t,this.column=e};z.prototype.offset=function(t){return new z(this.line,this.column+t)};var U=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function q(t,e){for(var i=1,r=0;;){var n=O(t,r,e);if(n<0)return new z(i,e-r);++i,r=n}}var F={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},V=!1;function B(t,e){return 2|(t?4:0)|(e?8:0)}var G=function(t,e,i){this.options=t=function(t){var e={};for(var i in F)e[i]=t&&N(t,i)?t[i]:F[i];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!V&&"object"==typeof console&&console.warn&&(V=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),t&&null!=t.allowHashBang||(e.allowHashBang=e.ecmaVersion>=14),T(e.onToken)){var r=e.onToken;e.onToken=function(t){return r.push(t)}}if(T(e.onComment)&&(e.onComment=function(t,e){return function(i,r,n,s,o,a){var h={type:i?"Block":"Line",value:r,start:n,end:s};t.locations&&(h.loc=new U(this,o,a)),t.ranges&&(h.range=[n,s]),e.push(h)}}(e,e.onComment)),"commonjs"===e.sourceType&&e.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}(t),this.sourceFile=t.sourceFile,this.keywords=R(c[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var r="";!0!==t.allowReserved&&(r=h[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(r+=" await")),this.reservedWords=R(r);var n=(r?r+" ":"")+h.strict;this.reservedWordsStrict=R(n),this.reservedWordsStrictBind=R(n+" "+h.strictBind),this.input=String(e),this.containsEsc=!1,this.pos=i||0,this.curLine=1,t.startLocation?(this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line):i?(this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(k).length)):this.lineStart=0,this.type=E.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===t.sourceType,this.strict=this.inModule||!0===t.strict||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope("commonjs"===this.options.sourceType?2:1),this.regexpState=null,this.privateNameStack=[]},H={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};G.prototype.parse=function(){var t=this,e=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow((function(){return t.parseTopLevel(e)}))},H.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},H.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},H.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},H.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e)return!1;if(2&e)return(4&e)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},H.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},H.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},H.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},H.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},H.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e||2&e&&!(16&e))return!0}return!1},H.allowUsing.get=function(){var t=this.currentScope().flags;return!(1024&t||!this.inModule&&1&t)},H.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},G.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,r=0;r<t.length;r++)i=t[r](i);return i},G.parse=function(t,e){return new this(e,t).parse()},G.parseExpressionAt=function(t,e,i){var r=new this(i,t,e);return r.nextToken(),r.parseExpression()},G.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(G.prototype,H);var K=G.prototype,J=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;K.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){P.lastIndex=t,t+=P.exec(this.input)[0].length;var e=J.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){P.lastIndex=t+e[0].length;var i=P.exec(this.input),r=i.index+i[0].length,n=this.input.charAt(r);return";"===n||"}"===n||k.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(r+1))}P.lastIndex=t+=e[0].length,t+=P.exec(this.input)[0].length,";"===this.input[t]&&t++}},K.eat=function(t){return this.type===t&&(this.next(),!0)},K.isContextual=function(t){return this.type===E.name&&this.value===t&&!this.containsEsc},K.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},K.catchStackOverflow=function(t){try{return t()}catch(t){if(!(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message))))throw t;this.raise(this.start,"Not enough stack space to parse input")}},K.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},K.canInsertSemicolon=function(){return this.type===E.eof||this.type===E.braceR||k.test(this.input.slice(this.lastTokEnd,this.start))},K.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},K.semicolon=function(){this.eat(E.semi)||this.insertSemicolon()||this.unexpected()},K.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},K.expect=function(t){this.eat(t)||this.unexpected()},K.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")};var W=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};K.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,e?"Assigning to rvalue":"Parenthesized pattern")}},K.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,r=t.doubleProto;if(!e)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},K.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},K.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var Z=G.prototype;Z.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==E.eof;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var r=0,n=Object.keys(this.undefinedExports);r<n.length;r+=1){var s=n[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType="commonjs"===this.options.sourceType?"script":this.options.sourceType,this.finishNode(t,"Program")};var Y={kind:"loop"},Q={kind:"switch"};Z.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;P.lastIndex=this.pos;var e=P.exec(this.input),i=this.pos+e[0].length,r=this.fullCharCodeAt(i);if(91===r||92===r)return!0;if(t)return!1;if(123===r)return!0;if(m(r)){var n=i;do{i+=r<=65535?1:2}while(v(r=this.fullCharCodeAt(i)));if(92===r)return!0;var s=this.input.slice(n,i);if(!f.test(s))return!0}return!1},Z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;P.lastIndex=this.pos;var t,e=P.exec(this.input),i=this.pos+e[0].length;return!(k.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(v(t=this.fullCharCodeAt(i+8))||92===t))},Z.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;P.lastIndex=this.pos;var i=P.exec(this.input),r=this.pos+i[0].length;if(k.test(this.input.slice(this.pos,r)))return!1;if(t){var n,s=r+5;if("using"!==this.input.slice(r,s)||s===this.input.length||v(n=this.fullCharCodeAt(s))||92===n)return!1;P.lastIndex=s;var o=P.exec(this.input);if(r=s+o[0].length,o&&k.test(this.input.slice(s,r)))return!1}var a=this.fullCharCodeAt(r);if(!m(a)&&92!==a)return!1;var h=r;do{r+=a<=65535?1:2}while(v(a=this.fullCharCodeAt(r)));if(92===a)return!0;var u=this.input.slice(h,r);if(f.test(u))return!1;if(e&&!t&&"of"===u){P.lastIndex=r;var c=P.exec(this.input);if(61!==this.input.charCodeAt(r+=c[0].length)||61===(a=this.input.charCodeAt(r+1))||62===a)return!1}return!0},Z.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},Z.isUsing=function(t){return this.isUsingKeyword(!1,t)},Z.parseStatement=function(t,e,i){var r,n=this.type,s=this.startNode();switch(this.isLet(t)&&(n=E._var,r="let"),n){case E._break:case E._continue:return this.parseBreakContinueStatement(s,n.keyword);case E._debugger:return this.parseDebuggerStatement(s);case E._do:return this.parseDoStatement(s);case E._for:return this.parseForStatement(s);case E._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!t);case E._class:return t&&this.unexpected(),this.parseClass(s,!0);case E._if:return this.parseIfStatement(s);case E._return:return this.parseReturnStatement(s);case E._switch:return this.parseSwitchStatement(s);case E._throw:return this.parseThrowStatement(s);case E._try:return this.parseTryStatement(s);case E._const:case E._var:return r=r||this.value,t&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case E._while:return this.parseWhileStatement(s);case E._with:return this.parseWithStatement(s);case E.braceL:return this.parseBlock(!0,s);case E.semi:return this.parseEmptyStatement(s);case E._export:case E._import:if(this.options.ecmaVersion>10&&n===E._import){P.lastIndex=this.pos;var o=P.exec(this.input),a=this.input.charCodeAt(this.pos+o[0].length);if(40===a||46===a)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===E._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!t);var h=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(h)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),t&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),"await using"===h&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,!1,h),this.semicolon(),this.finishNode(s,"VariableDeclaration");var u=this.value,c=this.parseExpression();return n===E.name&&"Identifier"===c.type&&this.eat(E.colon)?this.parseLabeledStatement(s,u,c,t):this.parseExpressionStatement(s,c)}},Z.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(E.semi)||this.insertSemicolon()?t.label=null:this.type!==E.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var n=this.labels[r];if(null==t.label||n.name===t.label.name){if(null!=n.kind&&(i||"loop"===n.kind))break;if(t.label&&i)break}}return r===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},Z.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},Z.parseDoStatement=function(t){return this.next(),this.labels.push(Y),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(E._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(E.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},Z.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Y),this.enterScope(0),this.expect(E.parenL),this.type===E.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===E._var||this.type===E._const||i){var r=this.startNode(),n=i?"let":this.value;return this.next(),this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(t,r,e)}var s=this.isContextual("let"),o=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var h=this.startNode();return this.next(),"await using"===a&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(h,!0,a),this.finishNode(h,"VariableDeclaration"),this.parseForAfterInit(t,h,e)}var u=this.containsEsc,c=new W,f=this.start,l=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===E._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===E._in&&this.unexpected(e),t.await=!0):o&&this.options.ecmaVersion>=8&&(l.start!==f||u||"Identifier"!==l.type||"async"!==l.name?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),s&&o&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,c),this.checkLValPattern(l),this.parseForIn(t,l)):(this.checkExpressionErrors(c,!0),e>-1&&this.unexpected(e),this.parseFor(t,l))},Z.parseForAfterInit=function(t,e,i){return(this.type===E._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.type===E._in?("using"!==e.kind&&"await using"!==e.kind||e.declarations[0].init||this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&i>-1&&this.unexpected(i)):this.options.ecmaVersion>=9&&(t.await=i>-1),this.parseForIn(t,e)):(i>-1&&this.unexpected(i),this.parseFor(t,e))},Z.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,tt|(i?0:et),!1,e)},Z.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(E._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},Z.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(E.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},Z.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(E.braceL),this.labels.push(Q),this.enterScope(1024);for(var i=!1;this.type!==E.braceR;)if(this.type===E._case||this.type===E._default){var r=this.type===E._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),r?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(E.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},Z.parseThrowStatement=function(t){return this.next(),k.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var X=[];Z.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?32:0),this.checkLValPattern(t,e?4:2),this.expect(E.parenR),t},Z.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===E._catch){var e=this.startNode();this.next(),this.eat(E.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(E._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},Z.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")},Z.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(Y),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},Z.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},Z.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},Z.parseLabeledStatement=function(t,e,i,r){for(var n=0,s=this.labels;n<s.length;n+=1)s[n].name===e&&this.raise(i.start,"Label '"+e+"' is already declared");for(var o=this.type.isLoop?"loop":this.type===E._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var h=this.labels[a];if(h.statementStart!==t.start)break;h.statementStart=this.start,h.kind=o}return this.labels.push({name:e,kind:o,statementStart:this.start}),t.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},Z.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},Z.parseBlock=function(t,e,i){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(E.braceL),t&&this.enterScope(0);this.type!==E.braceR;){var r=this.parseStatement(null);e.body.push(r)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},Z.parseFor=function(t,e){return t.init=e,this.expect(E.semi),t.test=this.type===E.semi?null:this.parseExpression(),this.expect(E.semi),t.update=this.type===E.parenR?null:this.parseExpression(),this.expect(E.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},Z.parseForIn=function(t,e){var i=this.type===E._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!i||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(E.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},Z.parseVar=function(t,e,i,r){for(t.declarations=[],t.kind=i;;){var n=this.startNode();if(this.parseVarId(n,i),this.eat(E.eq)?n.init=this.parseMaybeAssign(e):r||"const"!==i||this.type===E._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==i&&"await using"!==i||!(this.options.ecmaVersion>=17)||this.type===E._in||this.isContextual("of")?r||"Identifier"===n.id.type||e&&(this.type===E._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(E.comma))break}return t},Z.parseVarId=function(t,e){t.id="using"===e||"await using"===e?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?1:2,!1)};var tt=1,et=2;function it(t,e){var i=e.key.name,r=t[i],n="true";return"MethodDefinition"!==e.type||"get"!==e.kind&&"set"!==e.kind||(n=(e.static?"s":"i")+e.kind),"iget"===r&&"iset"===n||"iset"===r&&"iget"===n||"sget"===r&&"sset"===n||"sset"===r&&"sget"===n?(t[i]="true",!1):!!r||(t[i]=n,!1)}function rt(t,e){var i=t.key;return!t.computed&&("Identifier"===i.type&&i.name===e||"Literal"===i.type&&i.value===e)}Z.parseFunction=function(t,e,i,r,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===E.star&&e&et&&this.unexpected(),t.generator=this.eat(E.star)),this.options.ecmaVersion>=8&&(t.async=!!r),e&tt&&(t.id=4&e&&this.type!==E.name?null:this.parseIdent(),!t.id||e&et||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(B(t.async,t.generator)),e&tt||(t.id=this.type===E.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,n),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(t,e&tt?"FunctionDeclaration":"FunctionExpression")},Z.parseFunctionParams=function(t){this.expect(E.parenL),t.params=this.parseBindingList(E.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Z.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var r=this.enterClassBody(),n=this.startNode(),s=!1;for(n.body=[],this.expect(E.braceL);this.type!==E.braceR;){var o=this.parseClassElement(null!==t.superClass);o&&(n.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&"PrivateIdentifier"===o.key.type&&it(r,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),t.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},Z.parseClassElement=function(t){if(this.eat(E.semi))return null;var e=this.options.ecmaVersion,i=this.startNode(),r="",n=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(E.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===E.star?a=!0:r="static"}if(i.static=a,!r&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==E.star||this.canInsertSemicolon()?r="async":s=!0),!r&&(e>=9||!s)&&this.eat(E.star)&&(n=!0),!r&&!s&&!n){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=h:r=h)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===E.parenL||"method"!==o||n||s){var u=!i.static&&rt(i,"constructor"),c=u&&t;u&&"method"!==o&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=u?"constructor":o,this.parseClassMethod(i,n,s,c)}else this.parseClassField(i);return i},Z.isClassElementNameStart=function(){return this.type===E.name||this.type===E.privateId||this.type===E.num||this.type===E.string||this.type===E.bracketL||this.type.keyword},Z.parseClassElementName=function(t){this.type===E.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},Z.parseClassMethod=function(t,e,i,r){var n=t.key;"constructor"===t.kind?(e&&this.raise(n.start,"Constructor can't be a generator"),i&&this.raise(n.start,"Constructor can't be an async method")):t.static&&rt(t,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var s=t.value=this.parseMethod(e,i,r);return"get"===t.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===t.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===t.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},Z.parseClassField=function(t){return rt(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&rt(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(E.eq)?(this.enterScope(576),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},Z.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(320);this.type!==E.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},Z.parseClassId=function(t,e){this.type===E.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},Z.parseClassSuper=function(t){t.superClass=this.eat(E._extends)?this.parseExprSubscripts(null,!1):null},Z.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},Z.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,i=t.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,n=0===r?null:this.privateNameStack[r-1],s=0;s<i.length;++s){var o=i[s];N(e,o.name)||(n?n.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},Z.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==E.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},Z.parseExport=function(t,e){if(this.next(),this.eat(E.star))return this.parseExportAllDeclaration(t,e);if(this.eat(E._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==E.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var i=0,r=t.specifiers;i<r.length;i+=1){var n=r[i];this.checkUnreserved(n.local),this.checkLocalExport(n.local),"Literal"===n.local.type&&this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},Z.parseExportDeclaration=function(){return this.parseStatement(null)},Z.parseExportDefaultDeclaration=function(){var t;if(this.type===E._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,4|tt,!1,t)}if(this.type===E._class){var i=this.startNode();return this.parseClass(i,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},Z.checkExport=function(t,e,i){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),N(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},Z.checkPatternExport=function(t,e){var i=e.type;if("Identifier"===i)this.checkExport(t,e,e.start);else if("ObjectPattern"===i)for(var r=0,n=e.properties;r<n.length;r+=1)this.checkPatternExport(t,n[r]);else if("ArrayPattern"===i)for(var s=0,o=e.elements;s<o.length;s+=1){var a=o[s];a&&this.checkPatternExport(t,a)}else"Property"===i?this.checkPatternExport(t,e.value):"AssignmentPattern"===i?this.checkPatternExport(t,e.left):"RestElement"===i&&this.checkPatternExport(t,e.argument)},Z.checkVariableExport=function(t,e){if(t)for(var i=0,r=e;i<r.length;i+=1)this.checkPatternExport(t,r[i].id)},Z.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Z.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},Z.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(E.braceL);!this.eat(E.braceR);){if(i)i=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;e.push(this.parseExportSpecifier(t))}return e},Z.parseImport=function(t){return this.next(),this.type===E.string?(t.specifiers=X,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===E.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},Z.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportSpecifier")},Z.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportDefaultSpecifier")},Z.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportNamespaceSpecifier")},Z.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===E.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(E.comma)))return t;if(this.type===E.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(E.braceL);!this.eat(E.braceR);){if(e)e=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;t.push(this.parseImportSpecifier())}return t},Z.parseWithClause=function(){var t=[];if(!this.eat(E._with))return t;this.expect(E.braceL);for(var e={},i=!0;!this.eat(E.braceR);){if(i)i=!1;else if(this.expect(E.comma),this.afterTrailingComma(E.braceR))break;var r=this.parseImportAttribute(),n="Identifier"===r.key.type?r.key.name:r.key.value;N(e,n)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+n+"'"),e[n]=!0,t.push(r)}return t},Z.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===E.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(E.colon),this.type!==E.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},Z.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===E.string){var t=this.parseLiteral(this.value);return L.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},Z.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},Z.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var nt=G.prototype;nt.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var r=0,n=t.properties;r<n.length;r+=1){var s=n[r];this.toAssignable(s,e),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},nt.toAssignableList=function(t,e){for(var i=t.length,r=0;r<i;r++){var n=t[r];n&&this.toAssignable(n,e)}if(i){var s=t[i-1];6===this.options.ecmaVersion&&e&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return t},nt.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},nt.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==E.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},nt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case E.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(E.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case E.braceL:return this.parseObj(!0)}return this.parseIdent()},nt.parseBindingList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);)if(s?s=!1:this.expect(E.comma),e&&this.type===E.comma)n.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===E.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),n.push(o),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}n.push(this.parseAssignableListItem(r))}return n},nt.parseAssignableListItem=function(){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},nt.parseBindingListItem=function(t){return t},nt.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(E.eq))return i;var r=this.startNodeAt(t,e);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},nt.checkLValSimple=function(t,e,i){void 0===e&&(e=0);var r=0!==e;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(r?"Binding ":"Assigning to ")+t.name+" in strict mode"),r&&(2===e&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&(N(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),5!==e&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(r?"Binding":"Assigning to")+" rvalue")}},nt.checkLValPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"ObjectPattern":for(var r=0,n=t.properties;r<n.length;r+=1)this.checkLValInnerPattern(n[r],e,i);break;case"ArrayPattern":for(var s=0,o=t.elements;s<o.length;s+=1){var a=o[s];a&&this.checkLValInnerPattern(a,e,i)}break;default:this.checkLValSimple(t,e,i)}},nt.checkLValInnerPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var st=function(t,e,i,r,n){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=r,this.generator=!!n},ot={b_stat:new st("{",!1),b_expr:new st("{",!0),b_tmpl:new st("${",!1),p_stat:new st("(",!1),p_expr:new st("(",!0),q_tmpl:new st("`",!0,!0,(function(t){return t.tryReadTemplateToken()})),f_stat:new st("function",!1),f_expr:new st("function",!0),f_expr_gen:new st("function",!0,!1,null,!0),f_gen:new st("function",!1,!1,null,!0)},at=G.prototype;at.initialContext=function(){return[ot.b_stat]},at.curContext=function(){return this.context[this.context.length-1]},at.braceIsBlock=function(t){var e=this.curContext();return e===ot.f_expr||e===ot.f_stat||(t!==E.colon||e!==ot.b_stat&&e!==ot.b_expr?t===E._return||t===E.name&&this.exprAllowed?k.test(this.input.slice(this.lastTokEnd,this.start)):t===E._else||t===E.semi||t===E.eof||t===E.parenR||t===E.arrow||(t===E.braceL?e===ot.b_stat:t!==E._var&&t!==E._const&&t!==E.name&&!this.exprAllowed):!e.isExpr)},at.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},at.updateContext=function(t){var e,i=this.type;i.keyword&&t===E.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},at.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},E.parenR.updateContext=E.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===ot.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},E.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?ot.b_stat:ot.b_expr),this.exprAllowed=!0},E.dollarBraceL.updateContext=function(){this.context.push(ot.b_tmpl),this.exprAllowed=!0},E.parenL.updateContext=function(t){this.context.push(t===E._if||t===E._for||t===E._with||t===E._while?ot.p_stat:ot.p_expr),this.exprAllowed=!0},E.incDec.updateContext=function(){},E._function.updateContext=E._class.updateContext=function(t){!t.beforeExpr||t===E._else||t===E.semi&&this.curContext()!==ot.p_stat||t===E._return&&k.test(this.input.slice(this.lastTokEnd,this.start))||(t===E.colon||t===E.braceL)&&this.curContext()===ot.b_stat?this.context.push(ot.f_stat):this.context.push(ot.f_expr),this.exprAllowed=!1},E.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},E.backQuote.updateContext=function(){this.curContext()===ot.q_tmpl?this.context.pop():this.context.push(ot.q_tmpl),this.exprAllowed=!1},E.star.updateContext=function(t){if(t===E._function){var e=this.context.length-1;this.context[e]=this.context[e]===ot.f_expr?ot.f_expr_gen:ot.f_gen}this.exprAllowed=!0},E.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==E.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var ht=G.prototype;function ut(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&ut(t.expression)}function ct(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&ct(t.expression)||"ParenthesizedExpression"===t.type&&ct(t.expression)}ht.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var r,n=t.key;switch(n.type){case"Identifier":r=n.name;break;case"Literal":r=String(n.value);break;default:return}var s=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===s&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),e.proto=!0);else{var o=e[r="$"+r];o?("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(n.start,"Redefinition of property"):o=e[r]={init:!1,get:!1,set:!1},o[s]=!0}}},ht.parseExpression=function(t,e){var i=this;return this.catchStackOverflow((function(){var r=i.start,n=i.startLoc,s=i.parseMaybeAssign(t,e);if(i.type===E.comma){var o=i.startNodeAt(r,n);for(o.expressions=[s];i.eat(E.comma);)o.expressions.push(i.parseMaybeAssign(t,e));return i.finishNode(o,"SequenceExpression")}return s}))},ht.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var r=!1,n=-1,s=-1,o=-1;e?(n=e.parenthesizedAssign,s=e.trailingComma,o=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new W,r=!0);var a=this.start,h=this.startLoc;this.type!==E.parenL&&this.type!==E.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var u=this.parseMaybeConditional(t,e);if(i&&(u=i.call(this,u,a,h)),this.type.isAssign){var c=this.startNodeAt(a,h);return c.operator=this.value,this.type===E.eq&&(u=this.toAssignable(u,!1,e)),r||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=u.start&&(e.shorthandAssign=-1),this.type===E.eq?this.checkLValPattern(u):this.checkLValSimple(u),c.left=u,this.next(),c.right=this.parseMaybeAssign(t),o>-1&&(e.doubleProto=o),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(e,!0),n>-1&&(e.parenthesizedAssign=n),s>-1&&(e.trailingComma=s),u},ht.parseMaybeConditional=function(t,e){var i=this.start,r=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(("ArrowFunctionExpression"!==n.type||n.start!==i)&&this.eat(E.question)){var s=this.startNodeAt(i,r);return s.test=n,s.consequent=this.parseMaybeAssign(),this.expect(E.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return n},ht.parseExprOps=function(t,e){var i=this.start,r=this.startLoc,n=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||n.start===i&&"ArrowFunctionExpression"===n.type?n:this.parseExprOp(n,i,r,-1,t)},ht.parseExprOp=function(t,e,i,r,n){var s=this.type.binop;if(null!=s&&(!n||this.type!==E._in)&&s>r){var o=this.type===E.logicalOR||this.type===E.logicalAND,a=this.type===E.coalesce;a&&(s=E.logicalAND.binop);var h=this.value;this.next();var u=this.start,c=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),u,c,s,n),l=this.buildBinary(e,i,t,f,h,o||a);return(o&&this.type===E.coalesce||a&&(this.type===E.logicalOR||this.type===E.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(l,e,i,r,n)}return t},ht.buildBinary=function(t,e,i,r,n,s){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(t,e);return o.left=i,o.operator=n,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},ht.parseMaybeUnary=function(t,e,i,r){var n,s=this.start,o=this.startLoc;if(this.isContextual("await")&&this.canAwait)n=this.parseAwait(r),e=!0;else if(this.type.prefix){var a=this.startNode(),h=this.type===E.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,h,r),this.checkExpressionErrors(t,!0),h?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&ut(a.argument)?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&ct(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):e=!0,n=this.finishNode(a,h?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==E.privateId){if(n=this.parseExprSubscripts(t,r),this.checkExpressionErrors(t))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=this.startNodeAt(s,o);u.operator=this.value,u.prefix=!1,u.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(u,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==E._in&&this.unexpected();return i||"ArrowFunctionExpression"===n.type&&n.start===s||!this.eat(E.starstar)?n:e?void this.unexpected(this.lastTokStart):this.buildBinary(s,o,n,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},ht.parseExprSubscripts=function(t,e){var i=this.start,r=this.startLoc,n=this.parseExprAtom(t,e);if("ArrowFunctionExpression"===n.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return n;var s=this.parseSubscripts(n,i,r,!1,e);return t&&"MemberExpression"===s.type&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1),t.trailingComma>=s.start&&(t.trailingComma=-1)),s},ht.parseSubscripts=function(t,e,i,r,n){for(var s=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.potentialArrowAt===t.start,o=!1;;){var a=this.parseSubscript(t,e,i,r,s,o,n);if(a.optional&&(o=!0),a===t||"ArrowFunctionExpression"===a.type){if(o){var h=this.startNodeAt(e,i);h.expression=a,a=this.finishNode(h,"ChainExpression")}return a}t=a}},ht.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(E.arrow)},ht.parseSubscriptAsyncArrow=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,r)},ht.parseSubscript=function(t,e,i,r,n,s,o){var a=this.options.ecmaVersion>=11,h=a&&this.eat(E.questionDot);r&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(E.bracketL);if(u||h&&this.type!==E.parenL&&this.type!==E.backQuote||this.eat(E.dot)){var c=this.startNodeAt(e,i);c.object=t,u?(c.property=this.parseExpression(),this.expect(E.bracketR)):c.property=this.type===E.privateId&&"Super"!==t.type?this.parsePrivateIdent():this.parseIdent("never"!==this.options.allowReserved),c.computed=!!u,a&&(c.optional=h),t=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(E.parenL)){var f=new W,l=this.yieldPos,d=this.awaitPos,p=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(E.parenR,this.options.ecmaVersion>=8,!1,f);if(n&&!h&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=l,this.awaitPos=d,this.awaitIdentPos=p,this.parseSubscriptAsyncArrow(e,i,m,o);this.checkExpressionErrors(f,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=p||this.awaitIdentPos;var v=this.startNodeAt(e,i);v.callee=t,v.arguments=m,a&&(v.optional=h),t=this.finishNode(v,"CallExpression")}else if(this.type===E.backQuote){(h||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(e,i);y.tag=t,y.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(y,"TaggedTemplateExpression")}return t},ht.parseExprAtom=function(t,e,i){this.type===E.slash&&this.readRegexp();var r,n=this.potentialArrowAt===this.start;switch(this.type){case E._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==E.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==E.dot&&this.type!==E.bracketL&&this.type!==E.parenL&&this.unexpected(),this.finishNode(r,"Super");case E._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case E.name:var s=this.start,o=this.startLoc,a=this.containsEsc,h=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&"async"===h.name&&!this.canInsertSemicolon()&&this.eat(E._function))return this.overrideContext(ot.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(E.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[h],!1,e);if(this.options.ecmaVersion>=8&&"async"===h.name&&this.type===E.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return h=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(E.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[h],!0,e)}return h;case E.regexp:var u=this.value;return(r=this.parseLiteral(u.value)).regex={pattern:u.pattern,flags:u.flags},r;case E.num:case E.string:return this.parseLiteral(this.value);case E._null:case E._true:case E._false:return(r=this.startNode()).value=this.type===E._null?null:this.type===E._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case E.parenL:var c=this.start,f=this.parseParenAndDistinguishExpression(n,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),f;case E.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(E.bracketR,!0,!0,t),this.finishNode(r,"ArrayExpression");case E.braceL:return this.overrideContext(ot.b_expr),this.parseObj(!1,t);case E._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case E._class:return this.parseClass(this.startNode(),!1);case E._new:return this.parseNew();case E.backQuote:return this.parseTemplate();case E._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}},ht.parseExprAtomDefault=function(){this.unexpected()},ht.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===E.parenL&&!t)return this.parseDynamicImport(e);if(this.type===E.dot){var i=this.startNodeAt(e.start,e.loc&&e.loc.start);return i.name="import",e.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(e)}this.unexpected()},ht.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(E.parenR)?t.options=null:(this.expect(E.comma),this.afterTrailingComma(E.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(E.parenR)||(this.expect(E.comma),this.afterTrailingComma(E.parenR)||this.unexpected())));else if(!this.eat(E.parenR)){var e=this.start;this.eat(E.comma)&&this.eat(E.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},ht.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},ht.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=null!=e.value?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},ht.parseParenExpression=function(){this.expect(E.parenL);var t=this.parseExpression();return this.expect(E.parenR),t},ht.shouldParseArrow=function(){return!this.canInsertSemicolon()},ht.parseParenAndDistinguishExpression=function(t,e){var i,r=this.start,n=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,h=this.startLoc,u=[],c=!0,f=!1,l=new W,d=this.yieldPos,p=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==E.parenR;){if(c?c=!1:this.expect(E.comma),s&&this.afterTrailingComma(E.parenR,!0)){f=!0;break}if(this.type===E.ellipsis){o=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}u.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var m=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(E.parenR),t&&this.shouldParseArrow(u)&&this.eat(E.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=p,this.parseParenArrowList(r,n,u,e);u.length&&!f||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(l,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=p||this.awaitPos,u.length>1?((i=this.startNodeAt(a,h)).expressions=u,this.finishNodeAt(i,"SequenceExpression",m,v)):i=u[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,n);return y.expression=i,this.finishNode(y,"ParenthesizedExpression")}return i},ht.parseParenItem=function(t){return t},ht.parseParenArrowList=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,r)};var ft=[];ht.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===E.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var i=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var r=this.start,n=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,n,!0,!1),"Super"===t.callee.type&&this.raiseRecoverable(r,"Invalid use of 'super'"),t.arguments=this.eat(E.parenL)?this.parseExprList(E.parenR,this.options.ecmaVersion>=8,!1):ft,this.finishNode(t,"NewExpression")},ht.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===E.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),i.tail=this.type===E.backQuote,this.finishNode(i,"TemplateElement")},ht.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:e});for(i.quasis=[r];!r.tail;)this.type===E.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(E.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(E.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},ht.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===E.name||this.type===E.num||this.type===E.string||this.type===E.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===E.star)&&!k.test(this.input.slice(this.lastTokEnd,this.start))},ht.parseObj=function(t,e){var i=this.startNode(),r=!0,n={};for(i.properties=[],this.next();!this.eat(E.braceR);){if(r)r=!1;else if(this.expect(E.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(E.braceR))break;var s=this.parseProperty(t,e);t||this.checkPropClash(s,n,e),i.properties.push(s)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},ht.parseProperty=function(t,e){var i,r,n,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(E.ellipsis))return t?(o.argument=this.parseIdent(!1),this.type===E.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,e),this.type===E.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(t||e)&&(n=this.start,s=this.startLoc),t||(i=this.eat(E.star)));var a=this.containsEsc;return this.parsePropertyName(o),!t&&!a&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(o)?(r=!0,i=this.options.ecmaVersion>=9&&this.eat(E.star),this.parsePropertyName(o)):r=!1,this.parsePropertyValue(o,t,i,r,n,s,e,a),this.finishNode(o,"Property")},ht.parseGetterSetter=function(t){var e=t.key.name;(this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e,t.value.params.length!==("get"===t.kind?0:1))?this.raiseRecoverable(t.value.start,"get"===t.kind?"getter should have no params":"setter should have exactly one param"):"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},ht.parsePropertyValue=function(t,e,i,r,n,s,o,a){(i||r)&&this.type===E.colon&&this.unexpected(),this.eat(E.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init"):this.options.ecmaVersion>=6&&this.type===E.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(i,r),t.kind="init"):e||a||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===E.comma||this.type===E.braceR||this.type===E.eq?this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((i||r)&&this.unexpected(),this.checkUnreserved(t.key),"await"!==t.key.name||this.awaitIdentPos||(this.awaitIdentPos=n),e?t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key)):this.type===E.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((i||r)&&this.unexpected(),this.parseGetterSetter(t))},ht.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(E.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(E.bracketR),t.key;t.computed=!1}return t.key=this.type===E.num||this.type===E.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},ht.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},ht.parseMethod=function(t,e,i){var r=this.startNode(),n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=t),this.options.ecmaVersion>=8&&(r.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|B(e,r.generator)|(i?128:0)),this.expect(E.parenL),r.params=this.parseBindingList(E.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},ht.parseArrowExpression=function(t,e,i,r){var n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|B(i,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,r),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")},ht.parseFunctionBody=function(t,e,i,r){var n=this.strict,s=!1;if(e&&this.type!==E.braceL)t.body=this.parseMaybeAssign(r),t.expression=!0,this.checkParams(t,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);n&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var a=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(t,!n&&!s&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,5),t.body=this.parseBlock(!1,void 0,s&&!n),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=a}this.exitScope()},ht.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1)if("Identifier"!==i[e].type)return!1;return!0},ht.checkParams=function(t,e){for(var i=Object.create(null),r=0,n=t.params;r<n.length;r+=1)this.checkLValInnerPattern(n[r],1,e?null:i)},ht.parseExprList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(E.comma),e&&this.afterTrailingComma(t))break;var o=void 0;i&&this.type===E.comma?o=null:this.type===E.ellipsis?(o=this.parseSpread(r),r&&this.type===E.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),n.push(o)}return n},ht.checkUnreserved=function(t){var e=t.start,i=t.end,r=t.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),259&this.currentThisScope().flags||"arguments"!==r||this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(e,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(e,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,i).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+r+"' is reserved"))},ht.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),"await"!==e.name||this.awaitIdentPos||(this.awaitIdentPos=e.start)),e},ht.parseIdentNode=function(){var t=this.startNode();return this.type===E.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,"class"!==t.name&&"function"!==t.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=E.name):this.unexpected(),t},ht.parsePrivateIdent=function(){var t=this.startNode();return this.type===E.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},ht.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===E.semi||this.canInsertSemicolon()||this.type!==E.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(E.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},ht.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var lt=G.prototype;lt.raise=function(t,e){var i=q(this.input,t);e+=" ("+i.line+":"+i.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var r=new SyntaxError(e);throw r.pos=t,r.loc=i,r.raisedAt=this.pos,r},lt.raiseRecoverable=lt.raise,lt.curPosition=function(){if(this.options.locations)return new z(this.curLine,this.pos-this.lineStart)};var dt=G.prototype,pt=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};dt.enterScope=function(t){this.scopeStack.push(new pt(t))},dt.exitScope=function(){this.scopeStack.pop()},dt.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},dt.declareName=function(t,e,i){var r=!1;if(2===e){var n=this.currentScope();r=n.lexical.indexOf(t)>-1||n.functions.indexOf(t)>-1||n.var.indexOf(t)>-1,n.lexical.push(t),this.inModule&&1&n.flags&&delete this.undefinedExports[t]}else if(4===e)this.currentScope().lexical.push(t);else if(3===e){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(t)>-1:s.lexical.indexOf(t)>-1||s.var.indexOf(t)>-1,s.functions.push(t)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(t)>-1&&!(32&a.flags&&a.lexical[0]===t)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(t)>-1){r=!0;break}if(a.var.push(t),this.inModule&&1&a.flags&&delete this.undefinedExports[t],259&a.flags)break}r&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")},dt.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},dt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},dt.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags)return e}},dt.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags&&!(16&e.flags))return e}};var mt=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new U(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},vt=G.prototype;function yt(t,e,i,r){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=r),this.options.ranges&&(t.range[1]=i),t}vt.startNode=function(){return new mt(this,this.start,this.startLoc)},vt.startNodeAt=function(t,e){return new mt(this,t,e)},vt.finishNode=function(t,e){return yt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},vt.finishNodeAt=function(t,e,i,r){return yt.call(this,t,e,i,r)},vt.copyNode=function(t){var e=new mt(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var gt,$t,wt="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",bt=wt+" Extended_Pictographic",_t=bt+" EBase EComp EMod EPres ExtPict",Et={9:wt,10:bt,11:bt,12:_t,13:_t,14:_t},kt={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},St="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",xt="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Ot=xt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",jt=Ot+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Pt=jt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",It=Pt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ct={9:xt,10:Ot,11:jt,12:Pt,13:It,14:It+" Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"},At={};for(var Nt=0,Tt=[9,10,11,12,13,14];Nt<Tt.length;Nt+=1)$t=void 0,($t=At[gt=Tt[Nt]]={binary:R(Et[gt]+" "+St),binaryOfStrings:R(kt[gt]),nonBinary:{General_Category:R(St),Script:R(Ct[gt])}}).nonBinary.Script_Extensions=$t.nonBinary.Script,$t.nonBinary.gc=$t.nonBinary.General_Category,$t.nonBinary.sc=$t.nonBinary.Script,$t.nonBinary.scx=$t.nonBinary.Script_Extensions;var Mt=G.prototype,Rt=function(t,e){this.parent=t,this.base=e||this};Rt.prototype.separatedFrom=function(t){for(var e=this;e;e=e.parent)for(var i=t;i;i=i.parent)if(e.base===i.base&&e!==i)return!0;return!1},Rt.prototype.sibling=function(){return new Rt(this.parent,this.base)};var Dt=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=At[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function Lt(t){return 105===t||109===t||115===t}function zt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function Ut(t){return t>=65&&t<=90||t>=97&&t<=122}function qt(t){return Ut(t)||95===t}function Ft(t){return qt(t)||Vt(t)}function Vt(t){return t>=48&&t<=57}function Bt(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function Gt(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function Ht(t){return t>=48&&t<=55}Dt.prototype.reset=function(t,e,i){var r=-1!==i.indexOf("v"),n=-1!==i.indexOf("u");this.start=0|t,this.source=e+"",this.flags=i,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},Dt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Dt.prototype.at=function(t,e){void 0===e&&(e=!1);var i=this.source,r=i.length;if(t>=r)return-1;var n=i.charCodeAt(t);if(!e&&!this.switchU||n<=55295||n>=57344||t+1>=r)return n;var s=i.charCodeAt(t+1);return s>=56320&&s<=57343?(n<<10)+s-56613888:n},Dt.prototype.nextIndex=function(t,e){void 0===e&&(e=!1);var i=this.source,r=i.length;if(t>=r)return r;var n,s=i.charCodeAt(t);return!e&&!this.switchU||s<=55295||s>=57344||t+1>=r||(n=i.charCodeAt(t+1))<56320||n>57343?t+1:t+2},Dt.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},Dt.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},Dt.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},Dt.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},Dt.prototype.eatChars=function(t,e){void 0===e&&(e=!1);for(var i=this.pos,r=0,n=t;r<n.length;r+=1){var s=n[r],o=this.at(i,e);if(-1===o||o!==s)return!1;i=this.nextIndex(i,e)}return this.pos=i,!0},Mt.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,r=!1,n=!1,s=0;s<i.length;s++){var o=i.charAt(s);-1===e.indexOf(o)&&this.raise(t.start,"Invalid regular expression flag"),i.indexOf(o,s+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),"u"===o&&(r=!0),"v"===o&&(n=!0)}this.options.ecmaVersion>=15&&r&&n&&this.raise(t.start,"Invalid regular expression flag")},Mt.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&function(t){for(var e in t)return!0;return!1}(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},Mt.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e<i.length;e+=1)t.groupNames[i[e]]||t.raise("Invalid named capture referenced")},Mt.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Rt(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},Mt.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},Mt.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},Mt.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1},Mt.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},Mt.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},Mt.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var r=0,n=-1;if(this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(n=t.lastIntValue),t.eat(125)))return-1!==n&&n<r&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=i}return!1},Mt.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},Mt.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},Mt.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(t),r=t.eat(45);if(i||r){for(var n=0;n<i.length;n++){var s=i.charAt(n);i.indexOf(s,n+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(r){var o=this.regexp_eatModifiers(t);i||o||58!==t.current()||t.raise("Invalid regular expression modifiers");for(var a=0;a<o.length;a++){var h=o.charAt(a);(o.indexOf(h,a+1)>-1||i.indexOf(h)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},Mt.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},Mt.regexp_eatModifiers=function(t){for(var e="",i=0;-1!==(i=t.current())&&Lt(i);)e+=D(i),t.advance();return e},Mt.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},Mt.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},Mt.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!zt(e)&&(t.lastIntValue=e,t.advance(),!0)},Mt.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!zt(i);)t.advance();return t.pos!==e},Mt.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e||(t.advance(),0))},Mt.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,i=t.groupNames[t.lastStringValue];if(i)if(e)for(var r=0,n=i;r<n.length;r+=1)n[r].separatedFrom(t.branchID)||t.raise("Duplicate capture group name");else t.raise("Duplicate capture group name");e?(i||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},Mt.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},Mt.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=D(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=D(t.lastIntValue);return!0}return!1},Mt.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,r=t.current(i);return t.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(r=t.lastIntValue),function(t){return m(t,!0)||36===t||95===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Mt.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,r=t.current(i);return t.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(r=t.lastIntValue),function(t){return v(t,!0)||36===t||95===t||8204===t||8205===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Mt.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},Mt.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1},Mt.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},Mt.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},Mt.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},Mt.regexp_eatZero=function(t){return 48===t.current()&&!Vt(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},Mt.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},Mt.regexp_eatControlLetter=function(t){var e=t.current();return!!Ut(e)&&(t.lastIntValue=e%32,t.advance(),!0)},Mt.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var i,r=t.pos,n=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var s=t.lastIntValue;if(n&&s>=55296&&s<=56319){var o=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var a=t.lastIntValue;if(a>=56320&&a<=57343)return t.lastIntValue=1024*(s-55296)+(a-56320)+65536,!0}t.pos=o,t.lastIntValue=s}return!0}if(n&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&(i=t.lastIntValue)>=0&&i<=1114111)return!0;n&&t.raise("Invalid unicode escape"),t.pos=r}return!1},Mt.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e||(t.lastIntValue=e,t.advance(),0))},Mt.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1},Mt.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(function(t){return 100===t||68===t||115===t||83===t||119===t||87===t}(e))return t.lastIntValue=-1,t.advance(),1;var i=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((i=80===e)||112===e)){var r;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return i&&2===r&&t.raise("Invalid property name"),r;t.raise("Invalid property name")}return 0},Mt.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t))return this.regexp_validateUnicodePropertyNameAndValue(t,i,t.lastStringValue),1}return t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)?this.regexp_validateUnicodePropertyNameOrValue(t,t.lastStringValue):0},Mt.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){N(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},Mt.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?1:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?2:void t.raise("Invalid property name")},Mt.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";qt(e=t.current());)t.lastStringValue+=D(e),t.advance();return""!==t.lastStringValue},Mt.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Ft(e=t.current());)t.lastStringValue+=D(e),t.advance();return""!==t.lastStringValue},Mt.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},Mt.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),i=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&2===i&&t.raise("Negated character class may contain strings"),!0}return!1},Mt.regexp_classContents=function(t){return 93===t.current()?1:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),1)},Mt.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;!t.switchU||-1!==e&&-1!==i||t.raise("Invalid character class"),-1!==e&&-1!==i&&e>i&&t.raise("Range out of order in character class")}}},Mt.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(99===i||Ht(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var r=t.current();return 93!==r&&(t.lastIntValue=r,t.advance(),!0)},Mt.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},Mt.regexp_classSetExpression=function(t){var e,i=1;if(this.regexp_eatClassSetRange(t));else if(e=this.regexp_eatClassSetOperand(t)){2===e&&(i=2);for(var r=t.pos;t.eatChars([38,38]);)38!==t.current()&&(e=this.regexp_eatClassSetOperand(t))?2!==e&&(i=1):t.raise("Invalid character in character class");if(r!==t.pos)return i;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(r!==t.pos)return i}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return i;2===e&&(i=2)}},Mt.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var r=t.lastIntValue;return-1!==i&&-1!==r&&i>r&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},Mt.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?1:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},Mt.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var i=t.eat(94),r=this.regexp_classContents(t);if(t.eat(93))return i&&2===r&&t.raise("Negated character class may contain strings"),r;t.pos=e}if(t.eat(92)){var n=this.regexp_eatCharacterClassEscape(t);if(n)return n;t.pos=e}return null},Mt.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var i=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return i}else t.raise("Invalid escape");t.pos=e}return null},Mt.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)2===this.regexp_classString(t)&&(e=2);return e},Mt.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?1:2},Mt.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t)&&(t.eat(98)?(t.lastIntValue=8,0):(t.pos=e,1)));var i=t.current();return!(i<0||i===t.lookahead()&&function(t){return 33===t||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t}(i)||function(t){return 40===t||41===t||45===t||47===t||t>=91&&t<=93||t>=123&&t<=125}(i)||(t.advance(),t.lastIntValue=i,0))},Mt.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!function(t){return 33===t||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t}(e)&&(t.lastIntValue=e,t.advance(),!0)},Mt.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Vt(e)&&95!==e||(t.lastIntValue=e%32,t.advance(),0))},Mt.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},Mt.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Vt(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},Mt.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Bt(i=t.current());)t.lastIntValue=16*t.lastIntValue+Gt(i),t.advance();return t.pos!==e},Mt.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;t.lastIntValue=e<=3&&this.regexp_eatOctalDigit(t)?64*e+8*i+t.lastIntValue:8*e+i}else t.lastIntValue=e;return!0}return!1},Mt.regexp_eatOctalDigit=function(t){var e=t.current();return Ht(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},Mt.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var r=0;r<e;++r){var n=t.current();if(!Bt(n))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+Gt(n),t.advance()}return!0};var Kt=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new U(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Jt=G.prototype;function Wt(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}Jt.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Kt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Jt.getToken=function(){return this.next(),new Kt(this)},"undefined"!=typeof Symbol&&(Jt[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===E.eof,value:e}}}}),Jt.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(E.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},Jt.readToken=function(t){return m(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},Jt.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var i=this.input.charCodeAt(t+1);return i<=56319||i>=57344?e:(e<<10)+i-56613888},Jt.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Jt.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var r=void 0,n=e;(r=O(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,i),e,this.pos,t,this.curPosition())},Jt.skipLineComment=function(t){for(var e=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!x(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())},Jt.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&j.test(String.fromCharCode(t))))break t;++this.pos}}},Jt.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)},Jt.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(E.ellipsis)):(++this.pos,this.finishToken(E.dot))},Jt.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(E.assign,2):this.finishOp(E.slash,1)},Jt.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,r=42===t?E.star:E.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,r=E.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(E.assign,i+1):this.finishOp(r,i)},Jt.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(E.assign,3):this.finishOp(124===t?E.logicalOR:E.logicalAND,2):61===e?this.finishOp(E.assign,2):this.finishOp(124===t?E.bitwiseOR:E.bitwiseAND,1)},Jt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(E.assign,2):this.finishOp(E.bitwiseXOR,1)},Jt.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!k.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(E.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(E.assign,2):this.finishOp(E.plusMin,1)},Jt.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+i)?this.finishOp(E.assign,i+1):this.finishOp(E.bitShift,i)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(i=2),this.finishOp(E.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Jt.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(E.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(E.arrow)):this.finishOp(61===t?E.eq:E.prefix,1)},Jt.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(E.questionDot,2)}if(63===e)return t>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(E.assign,3):this.finishOp(E.coalesce,2)}return this.finishOp(E.question,1)},Jt.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,m(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(E.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+D(t)+"'")},Jt.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(E.parenL);case 41:return++this.pos,this.finishToken(E.parenR);case 59:return++this.pos,this.finishToken(E.semi);case 44:return++this.pos,this.finishToken(E.comma);case 91:return++this.pos,this.finishToken(E.bracketL);case 93:return++this.pos,this.finishToken(E.bracketR);case 123:return++this.pos,this.finishToken(E.braceL);case 125:return++this.pos,this.finishToken(E.braceR);case 58:return++this.pos,this.finishToken(E.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(E.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(E.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+D(t)+"'")},Jt.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},Jt.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(k.test(r)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if("["===r)e=!0;else if("]"===r&&e)e=!1;else if("/"===r&&!e)break;t="\\"===r}++this.pos}var n=this.input.slice(i,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Dt(this));a.reset(i,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var h=null;try{h=new RegExp(n,o)}catch(t){}return this.finishToken(E.regexp,{pattern:n,flags:o,value:h})},Jt.readInt=function(t,e,i){for(var r=this.options.ecmaVersion>=12&&void 0===e,n=i&&48===this.input.charCodeAt(this.pos),s=this.pos,o=0,a=0,h=0,u=null==e?1/0:e;h<u;++h,++this.pos){var c=this.input.charCodeAt(this.pos),f=void 0;if(r&&95===c)n&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===a&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===h&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=c;else{if((f=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=t)break;a=c,o=o*t+f}}return r&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=e&&this.pos-s!==e?null:o},Jt.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);return null==i&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(i=Wt(this.input.slice(e,this.pos)),++this.pos):m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(E.num,i)},Jt.readNumber=function(t){var e=this.pos;t||null!==this.readInt(10,void 0,!0)||this.raise(e,"Invalid number");var i=this.pos-e>=2&&48===this.input.charCodeAt(e);i&&this.strict&&this.raise(e,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&110===r){var n=Wt(this.input.slice(e,this.pos));return++this.pos,m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(E.num,n)}i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1),46!==r||i||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||i||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s,o=(s=this.input.slice(e,this.pos),i?parseInt(s,8):parseFloat(s.replace(/_/g,"")));return this.finishToken(E.num,o)},Jt.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},Jt.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===t)break;92===r?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(x(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(E.string,e)};var Zt={};function Yt(t,e){return G.parse(t,e)}Jt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==Zt)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Jt.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Zt;this.raise(t,e)},Jt.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==E.template&&this.type!==E.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(E.template,t)):36===i?(this.pos+=2,this.finishToken(E.dollarBraceL)):(++this.pos,this.finishToken(E.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(x(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},Jt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(E.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},Jt.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return D(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t&&this.invalidStringToken(this.pos-1,"Invalid escape sequence in template string");default:if(e>=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);return r>255&&(i=i.slice(0,-1),r=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),"0"===i&&56!==e&&57!==e||!this.strict&&!t||this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return x(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},Jt.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},Jt.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(v(n,r))this.pos+=n<=65535?1:2;else{if(92!==n)break;this.containsEsc=!0,t+=this.input.slice(i,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(e?m:v)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=D(o),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},Jt.readWord=function(){var t=this.readWord1(),e=E.name;return this.keywords.test(t)&&(e=b[t]),this.finishToken(e,t)},G.acorn={Parser:G,version:"8.18.0",defaultOptions:F,Position:z,SourceLocation:U,getLineInfo:q,Node:mt,TokenType:y,tokTypes:E,keywordTypes:b,TokContext:st,tokContexts:ot,isIdentifierChar:v,isIdentifierStart:m,Token:Kt,isNewLine:x,lineBreak:k,lineBreakG:S,nonASCIIwhitespace:j};var Qt,Xt={exports:{}},te={},ee={},ie={},re={},ne={},se={};function oe(){return Qt||(Qt=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends e{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=i;class r extends e{constructor(t){super(),this._items="string"==typeof t?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return""===t||'""'===t}get str(){var t;return null!==(t=this._str)&&void 0!==t?t:this._str=this._items.reduce(((t,e)=>`${t}${e}`),"")}get names(){var t;return null!==(t=this._names)&&void 0!==t?t:this._names=this._items.reduce(((t,e)=>(e instanceof i&&(t[e.str]=(t[e.str]||0)+1),t)),{})}}function n(t,...e){const i=[t[0]];let n=0;for(;n<e.length;)a(i,e[n]),i.push(t[++n]);return new r(i)}t._Code=r,t.nil=new r(""),t._=n;const s=new r("+");function o(t,...e){const i=[u(t[0])];let n=0;for(;n<e.length;)i.push(s),a(i,e[n]),i.push(s,u(t[++n]));return function(t){let e=1;for(;e<t.length-1;){if(t[e]===s){const i=h(t[e-1],t[e+1]);if(void 0!==i){t.splice(e-1,3,i);continue}t[e++]="+"}e++}}(i),new r(i)}function a(t,e){var n;e instanceof r?t.push(...e._items):t.push(e instanceof i?e:"number"==typeof(n=e)||"boolean"==typeof n||null===n?n:u(Array.isArray(n)?n.join(","):n))}function h(t,e){if('""'===e)return t;if('""'===t)return e;if("string"==typeof t){if(e instanceof i||'"'!==t[t.length-1])return;return"string"!=typeof e?`${t.slice(0,-1)}${e}"`:'"'===e[0]?t.slice(0,-1)+e.slice(1):void 0}return"string"!=typeof e||'"'!==e[0]||t instanceof i?void 0:`"${t}${e.slice(1)}`}function u(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=o,t.addCodeArg=a,t.strConcat=function(t,e){return e.emptyStr()?t:t.emptyStr()?e:o`${t}${e}`},t.stringify=function(t){return new r(u(t))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new r(`.${e}`):n`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new r(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(t){return new r(t.toString())}}(se)),se}var ae,he,ue={};function ce(){return ae||(ae=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=oe();class i extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}}var r;!function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"}(r||(t.UsedValueState=r={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class n{constructor({prefixes:t,parent:e}={}){this._names={},this._prefixes=t,this._parent=e}toName(t){return t instanceof e.Name?t:this.name(t)}name(t){return new e.Name(this._newName(t))}_newName(t){return`${t}${(this._names[t]||this._nameGroup(t)).index++}`}_nameGroup(t){var e,i;if((null===(i=null===(e=this._parent)||void 0===e?void 0:e._prefixes)||void 0===i?void 0:i.has(t))||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}}t.Scope=n;class s extends e.Name{constructor(t,e){super(e),this.prefix=t}setValue(t,{property:i,itemIndex:r}){this.value=t,this.scopePath=e._`.${new e.Name(i)}[${r}]`}}t.ValueScopeName=s;const o=e._`\n`;t.ValueScope=class extends n{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?o:e.nil}}get(){return this._scope}name(t){return new s(t,this._newName(t))}value(t,e){var i;if(void 0===e.ref)throw new Error("CodeGen: ref must be passed in value");const r=this.toName(t),{prefix:n}=r,s=null!==(i=e.key)&&void 0!==i?i:e.ref;let o=this._values[n];if(o){const t=o.get(s);if(t)return t}else o=this._values[n]=new Map;o.set(s,r);const a=this._scope[n]||(this._scope[n]=[]),h=a.length;return a[h]=e.ref,r.setValue(e,{property:n,itemIndex:h}),r}getValue(t,e){const i=this._values[t];if(i)return i.get(e)}scopeRefs(t,i=this._values){return this._reduceValues(i,(i=>{if(void 0===i.scopePath)throw new Error(`CodeGen: name "${i}" has no value`);return e._`${t}${i.scopePath}`}))}scopeCode(t=this._values,e,i){return this._reduceValues(t,(t=>{if(void 0===t.value)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),e,i)}_reduceValues(n,s,o={},a){let h=e.nil;for(const u in n){const c=n[u];if(!c)continue;const f=o[u]=o[u]||new Map;c.forEach((n=>{if(f.has(n))return;f.set(n,r.Started);let o=s(n);if(o)h=e._`${h}${this.opts.es5?t.varKinds.var:t.varKinds.const} ${n} = ${o};${this.opts._n}`;else{if(!(o=null==a?void 0:a(n)))throw new i(n);h=e._`${h}${o}${this.opts._n}`}f.set(n,r.Completed)}))}return h}}}(ue)),ue}function fe(){return he||(he=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=oe(),i=ce();var r=oe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var n=ce();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(t,e){return this}}class o extends s{constructor(t,e,i){super(),this.varKind=t,this.name=e,this.rhs=i}render({es5:t,_n:e}){return`${t?i.varKinds.var:this.varKind} ${this.name}${void 0===this.rhs?"":` = ${this.rhs}`};`+e}optimizeNames(t,e){if(t[this.name.str])return this.rhs&&(this.rhs=P(this.rhs,t,e)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(t,e,i){super(),this.lhs=t,this.rhs=e,this.sideEffects=i}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,i){if(!(this.lhs instanceof e.Name)||t[this.lhs.str]||this.sideEffects)return this.rhs=P(this.rhs,t,i),this}get names(){return j(this.lhs instanceof e.Name?{}:{...this.lhs.names},this.rhs)}}class h extends a{constructor(t,e,i,r){super(t,i,r),this.op=e}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class u extends s{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}}class c extends s{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}}class f extends s{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class l extends s{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,e){return this.code=P(this.code,t,e),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class d extends s{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce(((e,i)=>e+i.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let e=t.length;for(;e--;){const i=t[e].optimizeNodes();Array.isArray(i)?t.splice(e,1,...i):i?t[e]=i:t.splice(e,1)}return t.length>0?this:void 0}optimizeNames(t,e){const{nodes:i}=this;let r=i.length;for(;r--;){const n=i[r];n.optimizeNames(t,e)||(I(t,n.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce(((t,e)=>O(t,e.names)),{})}}class p extends d{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class m extends d{}class v extends p{}v.kind="else";class y extends p{constructor(t,e){super(e),this.condition=t}render(t){let e=`if(${this.condition})`+super.render(t);return this.else&&(e+="else "+this.else.render(t)),e}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(!0===t)return this.nodes;let e=this.else;if(e){const t=e.optimizeNodes();e=this.else=Array.isArray(t)?new v(t):t}return e?!1===t?e instanceof y?e:e.nodes:this.nodes.length?this:new y(C(t),e instanceof y?[e]:e.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(t,e){var i;if(this.else=null===(i=this.else)||void 0===i?void 0:i.optimizeNames(t,e),super.optimizeNames(t,e)||this.else)return this.condition=P(this.condition,t,e),this}get names(){const t=super.names;return j(t,this.condition),this.else&&O(t,this.else.names),t}}y.kind="if";class g extends p{}g.kind="for";class $ extends g{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iteration=P(this.iteration,t,e),this}get names(){return O(super.names,this.iteration.names)}}class w extends g{constructor(t,e,i,r){super(),this.varKind=t,this.name=e,this.from=i,this.to=r}render(t){const e=t.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:s}=this;return`for(${e} ${r}=${n}; ${r}<${s}; ${r}++)`+super.render(t)}get names(){const t=j(super.names,this.from);return j(t,this.to)}}class b extends g{constructor(t,e,i,r){super(),this.loop=t,this.varKind=e,this.name=i,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iterable=P(this.iterable,t,e),this}get names(){return O(super.names,this.iterable.names)}}class _ extends p{constructor(t,e,i){super(),this.name=t,this.args=e,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}_.kind="func";class E extends d{render(t){return"return "+super.render(t)}}E.kind="return";class k extends p{render(t){let e="try"+super.render(t);return this.catch&&(e+=this.catch.render(t)),this.finally&&(e+=this.finally.render(t)),e}optimizeNodes(){var t,e;return super.optimizeNodes(),null===(t=this.catch)||void 0===t||t.optimizeNodes(),null===(e=this.finally)||void 0===e||e.optimizeNodes(),this}optimizeNames(t,e){var i,r;return super.optimizeNames(t,e),null===(i=this.catch)||void 0===i||i.optimizeNames(t,e),null===(r=this.finally)||void 0===r||r.optimizeNames(t,e),this}get names(){const t=super.names;return this.catch&&O(t,this.catch.names),this.finally&&O(t,this.finally.names),t}}class S extends p{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}S.kind="catch";class x extends p{render(t){return"finally"+super.render(t)}}function O(t,e){for(const i in e)t[i]=(t[i]||0)+(e[i]||0);return t}function j(t,i){return i instanceof e._CodeOrName?O(t,i.names):t}function P(t,i,r){return t instanceof e.Name?s(t):(n=t)instanceof e._Code&&n._items.some((t=>t instanceof e.Name&&1===i[t.str]&&void 0!==r[t.str]))?new e._Code(t._items.reduce(((t,i)=>(i instanceof e.Name&&(i=s(i)),i instanceof e._Code?t.push(...i._items):t.push(i),t)),[])):t;var n;function s(t){const e=r[t.str];return void 0===e||1!==i[t.str]?t:(delete i[t.str],e)}}function I(t,e){for(const i in e)t[i]=(t[i]||0)-(e[i]||0)}function C(t){return"boolean"==typeof t||"number"==typeof t||null===t?!t:e._`!${M(t)}`}x.kind="finally",t.CodeGen=class{constructor(t,e={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...e,_n:e.lines?"\n":""},this._extScope=t,this._scope=new i.Scope({parent:t}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,e){const i=this._extScope.value(t,e);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(t,e){return this._extScope.getValue(t,e)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,e,i,r){const n=this._scope.toName(e);return void 0!==i&&r&&(this._constants[n.str]=i),this._leafNode(new o(t,n,i)),n}const(t,e,r){return this._def(i.varKinds.const,t,e,r)}let(t,e,r){return this._def(i.varKinds.let,t,e,r)}var(t,e,r){return this._def(i.varKinds.var,t,e,r)}assign(t,e,i){return this._leafNode(new a(t,e,i))}add(e,i){return this._leafNode(new h(e,t.operators.ADD,i))}code(t){return"function"==typeof t?t():t!==e.nil&&this._leafNode(new l(t)),this}object(...t){const i=["{"];for(const[r,n]of t)i.length>1&&i.push(","),i.push(r),(r!==n||this.opts.es5)&&(i.push(":"),(0,e.addCodeArg)(i,n));return i.push("}"),new e._Code(i)}if(t,e,i){if(this._blockNode(new y(t)),e&&i)this.code(e).else().code(i).endIf();else if(e)this.code(e).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new y(t))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(y,v)}_for(t,e){return this._blockNode(t),e&&this.code(e).endFor(),this}for(t,e){return this._for(new $(t),e)}forRange(t,e,r,n,s=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const o=this._scope.toName(t);return this._for(new w(s,o,e,r),(()=>n(o)))}forOf(t,r,n,s=i.varKinds.const){const o=this._scope.toName(t);if(this.opts.es5){const t=r instanceof e.Name?r:this.var("_arr",r);return this.forRange("_i",0,e._`${t}.length`,(i=>{this.var(o,e._`${t}[${i}]`),n(o)}))}return this._for(new b("of",s,o,r),(()=>n(o)))}forIn(t,r,n,s=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(t,e._`Object.keys(${r})`,n);const o=this._scope.toName(t);return this._for(new b("in",s,o,r),(()=>n(o)))}endFor(){return this._endBlockNode(g)}label(t){return this._leafNode(new u(t))}break(t){return this._leafNode(new c(t))}return(t){const e=new E;if(this._blockNode(e),this.code(t),1!==e.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(t,e,i){if(!e&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new k;if(this._blockNode(r),this.code(t),e){const t=this.name("e");this._currNode=r.catch=new S(t),e(t)}return i&&(this._currNode=r.finally=new x,this.code(i)),this._endBlockNode(S,x)}throw(t){return this._leafNode(new f(t))}block(t,e){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(e),this}endBlock(t){const e=this._blockStarts.pop();if(void 0===e)throw new Error("CodeGen: not in self-balancing block");const i=this._nodes.length-e;if(i<0||void 0!==t&&i!==t)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${t} expected`);return this._nodes.length=e,this}func(t,i=e.nil,r,n){return this._blockNode(new _(t,i,r)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,e){const i=this._currNode;if(i instanceof t||e&&i instanceof e)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${e?`${t.kind}/${e.kind}`:t.kind}"`)}_elseNode(t){const e=this._currNode;if(!(e instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=e.else=t,this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const e=this._nodes;e[e.length-1]=t}},t.not=C;const A=T(t.operators.AND);t.and=function(...t){return t.reduce(A)};const N=T(t.operators.OR);function T(t){return(i,r)=>i===e.nil?r:r===e.nil?i:e._`${M(i)} ${t} ${M(r)}`}function M(t){return t instanceof e.Name?t:e._`(${t})`}t.or=function(...t){return t.reduce(N)}}(ne)),ne}var le,de={};function pe(){if(le)return de;le=1,Object.defineProperty(de,"__esModule",{value:!0}),de.checkStrictMode=de.getErrorPath=de.Type=de.useFunc=de.setEvaluated=de.evaluatedPropsToName=de.mergeEvaluated=de.eachItem=de.unescapeJsonPointer=de.escapeJsonPointer=de.escapeFragment=de.unescapeFragment=de.schemaRefOrVal=de.schemaHasRulesButRef=de.schemaHasRules=de.checkUnknownRules=de.alwaysValidSchema=de.toHash=void 0;const t=fe(),e=oe();function i(t,e=t.schema){const{opts:i,self:r}=t;if(!i.strictSchema)return;if("boolean"==typeof e)return;const n=r.RULES.keywords;for(const i in e)n[i]||f(t,`unknown keyword: "${i}"`)}function r(t,e){if("boolean"==typeof t)return!t;for(const i in t)if(e[i])return!0;return!1}function n(t){return"number"==typeof t?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}function s(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function o({mergeNames:e,mergeToName:i,mergeValues:r,resultToName:n}){return(s,o,a,h)=>{const u=void 0===a?o:a instanceof t.Name?(o instanceof t.Name?e(s,o,a):i(s,o,a),a):o instanceof t.Name?(i(s,a,o),o):r(o,a);return h!==t.Name||u instanceof t.Name?u:n(s,u)}}function a(e,i){if(!0===i)return e.var("props",!0);const r=e.var("props",t._`{}`);return void 0!==i&&h(e,r,i),r}function h(e,i,r){Object.keys(r).forEach((r=>e.assign(t._`${i}${(0,t.getProperty)(r)}`,!0)))}de.toHash=function(t){const e={};for(const i of t)e[i]=!0;return e},de.alwaysValidSchema=function(t,e){return"boolean"==typeof e?e:0===Object.keys(e).length||(i(t,e),!r(e,t.self.RULES.all))},de.checkUnknownRules=i,de.schemaHasRules=r,de.schemaHasRulesButRef=function(t,e){if("boolean"==typeof t)return!t;for(const i in t)if("$ref"!==i&&e.all[i])return!0;return!1},de.schemaRefOrVal=function({topSchemaRef:e,schemaPath:i},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return t._`${r}`}return t._`${e}${i}${(0,t.getProperty)(n)}`},de.unescapeFragment=function(t){return s(decodeURIComponent(t))},de.escapeFragment=function(t){return encodeURIComponent(n(t))},de.escapeJsonPointer=n,de.unescapeJsonPointer=s,de.eachItem=function(t,e){if(Array.isArray(t))for(const i of t)e(i);else e(t)},de.mergeEvaluated={props:o({mergeNames:(e,i,r)=>e.if(t._`${r} !== true && ${i} !== undefined`,(()=>{e.if(t._`${i} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,t._`${r} || {}`).code(t._`Object.assign(${r}, ${i})`)))})),mergeToName:(e,i,r)=>e.if(t._`${r} !== true`,(()=>{!0===i?e.assign(r,!0):(e.assign(r,t._`${r} || {}`),h(e,r,i))})),mergeValues:(t,e)=>!0===t||{...t,...e},resultToName:a}),items:o({mergeNames:(e,i,r)=>e.if(t._`${r} !== true && ${i} !== undefined`,(()=>e.assign(r,t._`${i} === true ? true : ${r} > ${i} ? ${r} : ${i}`))),mergeToName:(e,i,r)=>e.if(t._`${r} !== true`,(()=>e.assign(r,!0===i||t._`${r} > ${i} ? ${r} : ${i}`))),mergeValues:(t,e)=>!0===t||Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})},de.evaluatedPropsToName=a,de.setEvaluated=h;const u={};var c;function f(t,e,i=t.opts.strictSchema){if(i){if(e=`strict mode: ${e}`,!0===i)throw new Error(e);t.self.logger.warn(e)}}return de.useFunc=function(t,i){return t.scopeValue("func",{ref:i,code:u[i.code]||(u[i.code]=new e._Code(i.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(c||(de.Type=c={})),de.getErrorPath=function(e,i,r){if(e instanceof t.Name){const n=i===c.Num;return r?n?t._`"[" + ${e} + "]"`:t._`"['" + ${e} + "']"`:n?t._`"/" + ${e}`:t._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():"/"+n(e)},de.checkStrictMode=f,de}var me,ve,ye,ge={};function $e(){if(me)return ge;me=1,Object.defineProperty(ge,"__esModule",{value:!0});const t=fe(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return ge.default=e,ge}function we(){return ve||(ve=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=fe(),i=pe(),r=$e();function n(t,i){const n=t.const("err",i);t.if(e._`${r.default.vErrors} === null`,(()=>t.assign(r.default.vErrors,e._`[${n}]`)),e._`${r.default.vErrors}.push(${n})`),t.code(e._`${r.default.errors}++`)}function s(t,i){const{gen:r,validateName:n,schemaEnv:s}=t;s.$async?r.throw(e._`new ${t.ValidationError}(${i})`):(r.assign(e._`${n}.errors`,i),r.return(!1))}t.keywordError={message:({keyword:t})=>e.str`must pass "${t}" keyword validation`},t.keyword$DataError={message:({keyword:t,schemaType:i})=>i?e.str`"${t}" keyword must be ${i} ($data)`:e.str`"${t}" keyword is invalid ($data)`},t.reportError=function(i,r=t.keywordError,o,h){const{it:u}=i,{gen:c,compositeRule:f,allErrors:l}=u,d=a(i,r,o);(null!=h?h:f||l)?n(c,d):s(u,e._`[${d}]`)},t.reportExtraError=function(e,i=t.keywordError,o){const{it:h}=e,{gen:u,compositeRule:c,allErrors:f}=h;n(u,a(e,i,o)),c||f||s(h,r.default.vErrors)},t.resetErrorsCount=function(t,i){t.assign(r.default.errors,i),t.if(e._`${r.default.vErrors} !== null`,(()=>t.if(i,(()=>t.assign(e._`${r.default.vErrors}.length`,i)),(()=>t.assign(r.default.vErrors,null)))))},t.extendErrors=function({gen:t,keyword:i,schemaValue:n,data:s,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const h=t.name("err");t.forRange("i",o,r.default.errors,(o=>{t.const(h,e._`${r.default.vErrors}[${o}]`),t.if(e._`${h}.instancePath === undefined`,(()=>t.assign(e._`${h}.instancePath`,(0,e.strConcat)(r.default.instancePath,a.errorPath)))),t.assign(e._`${h}.schemaPath`,e.str`${a.errSchemaPath}/${i}`),a.opts.verbose&&(t.assign(e._`${h}.schema`,n),t.assign(e._`${h}.data`,s))}))};const o={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function a(t,i,n){const{createErrors:s}=t.it;return!1===s?e._`{}`:function(t,i,n={}){const{gen:s,it:a}=t,c=[h(a,n),u(t,n)];return function(t,{params:i,message:n},s){const{keyword:a,data:h,schemaValue:u,it:c}=t,{opts:f,propertyName:l,topSchemaRef:d,schemaPath:p}=c;s.push([o.keyword,a],[o.params,"function"==typeof i?i(t):i||e._`{}`]),f.messages&&s.push([o.message,"function"==typeof n?n(t):n]),f.verbose&&s.push([o.schema,u],[o.parentSchema,e._`${d}${p}`],[r.default.data,h]),l&&s.push([o.propertyName,l])}(t,i,c),s.object(...c)}(t,i,n)}function h({errorPath:t},{instancePath:n}){const s=n?e.str`${t}${(0,i.getErrorPath)(n,i.Type.Str)}`:t;return[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,s)]}function u({keyword:t,it:{errSchemaPath:r}},{schemaPath:n,parentSchema:s}){let a=s?r:e.str`${r}/${t}`;return n&&(a=e.str`${a}${(0,i.getErrorPath)(n,i.Type.Str)}`),[o.schemaPath,a]}}(re)),re}function be(){if(ye)return ie;ye=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.boolOrEmptySchema=ie.topBoolOrEmptySchema=void 0;const t=we(),e=fe(),i=$e(),r={message:"boolean schema is false"};function n(e,i){const{gen:n,data:s}=e;(0,t.reportError)({gen:n,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},r,void 0,i)}return ie.topBoolOrEmptySchema=function(t){const{gen:r,schema:s,validateName:o}=t;!1===s?n(t,!1):"object"==typeof s&&!0===s.$async?r.return(i.default.data):(r.assign(e._`${o}.errors`,null),r.return(!0))},ie.boolOrEmptySchema=function(t,e){const{gen:i,schema:r}=t;!1===r?(i.var(e,!1),n(t)):i.var(e,!0)},ie}var _e,Ee={},ke={};function Se(){if(_e)return ke;_e=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.getRules=ke.isJSONType=void 0;const t=new Set(["string","number","integer","boolean","null","object","array"]);return ke.isJSONType=function(e){return"string"==typeof e&&t.has(e)},ke.getRules=function(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}},ke}var xe,Oe,je={};function Pe(){if(xe)return je;function t(t,i){return i.rules.some((i=>e(t,i)))}function e(t,e){var i;return void 0!==t[e.keyword]||(null===(i=e.definition.implements)||void 0===i?void 0:i.some((e=>void 0!==t[e])))}return xe=1,Object.defineProperty(je,"__esModule",{value:!0}),je.shouldUseRule=je.shouldUseGroup=je.schemaHasRulesForType=void 0,je.schemaHasRulesForType=function({schema:e,self:i},r){const n=i.RULES.types[r];return n&&!0!==n&&t(e,n)},je.shouldUseGroup=t,je.shouldUseRule=e,je}function Ie(){if(Oe)return Ee;Oe=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.reportTypeError=Ee.checkDataTypes=Ee.checkDataType=Ee.coerceAndCheckDataType=Ee.getJSONTypes=Ee.getSchemaTypes=Ee.DataType=void 0;const t=Se(),e=Pe(),i=we(),r=fe(),n=pe();var s;function o(e){const i=Array.isArray(e)?e:e?[e]:[];if(i.every(t.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}!function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"}(s||(Ee.DataType=s={})),Ee.getSchemaTypes=function(t){const e=o(t.type);if(e.includes("null")){if(!1===t.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&void 0!==t.nullable)throw new Error('"nullable" cannot be used without "type"');!0===t.nullable&&e.push("null")}return e},Ee.getJSONTypes=o,Ee.coerceAndCheckDataType=function(t,i){const{gen:n,data:o,opts:h}=t,c=function(t,e){return e?t.filter((t=>a.has(t)||"array"===e&&"array"===t)):[]}(i,h.coerceTypes),l=i.length>0&&!(0===c.length&&1===i.length&&(0,e.schemaHasRulesForType)(t,i[0]));if(l){const e=u(i,o,h.strictNumbers,s.Wrong);n.if(e,(()=>{c.length?function(t,e,i){const{gen:n,data:s,opts:o}=t,h=n.let("dataType",r._`typeof ${s}`),c=n.let("coerced",r._`undefined`);"array"===o.coerceTypes&&n.if(r._`${h} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,r._`${s}[0]`).assign(h,r._`typeof ${s}`).if(u(e,s,o.strictNumbers),(()=>n.assign(c,s))))),n.if(r._`${c} !== undefined`);for(const t of i)(a.has(t)||"array"===t&&"array"===o.coerceTypes)&&l(t);function l(t){switch(t){case"string":return void n.elseIf(r._`${h} == "number" || ${h} == "boolean"`).assign(c,r._`"" + ${s}`).elseIf(r._`${s} === null`).assign(c,r._`""`);case"number":return void n.elseIf(r._`${h} == "boolean" || ${s} === null
2
2
  || (${h} == "string" && ${s} && ${s} == +${s})`).assign(c,r._`+${s}`);case"integer":return void n.elseIf(r._`${h} === "boolean" || ${s} === null
3
3
  || (${h} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(c,r._`+${s}`);case"boolean":return void n.elseIf(r._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(c,!1).elseIf(r._`${s} === "true" || ${s} === 1`).assign(c,!0);case"null":return n.elseIf(r._`${s} === "" || ${s} === 0 || ${s} === false`),void n.assign(c,null);case"array":n.elseIf(r._`${h} === "string" || ${h} === "number"
4
- || ${h} === "boolean" || ${s} === null`).assign(c,r._`[${s}]`)}}n.else(),f(t),n.endIf(),n.if(r._`${c} !== undefined`,(()=>{n.assign(s,c),function({gen:t,parentData:e,parentDataProperty:i},n){t.if(r._`${e} !== undefined`,(()=>t.assign(r._`${e}[${i}]`,n)))}(t,c)}))}(t,i,c):f(t)}))}return l};const a=new Set(["string","number","integer","boolean","null"]);function h(t,e,i,n=s.Correct){const o=n===s.Correct?r.operators.EQ:r.operators.NEQ;let a;switch(t){case"null":return r._`${e} ${o} null`;case"array":a=r._`Array.isArray(${e})`;break;case"object":a=r._`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=h(r._`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=h();break;default:return r._`typeof ${e} ${o} ${t}`}return n===s.Correct?a:(0,r.not)(a);function h(t=r.nil){return(0,r.and)(r._`typeof ${e} == "number"`,t,i?r._`isFinite(${e})`:r.nil)}}function u(t,e,i,s){if(1===t.length)return h(t[0],e,i,s);let o;const a=(0,n.toHash)(t);if(a.array&&a.object){const t=r._`typeof ${e} != "object"`;o=a.null?t:r._`!${e} || ${t}`,delete a.null,delete a.array,delete a.object}else o=r.nil;a.number&&delete a.integer;for(const t in a)o=(0,r.and)(o,h(t,e,i,s));return o}Ee.checkDataType=h,Ee.checkDataTypes=u;const c={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>"string"==typeof t?r._`{type: ${t}}`:r._`{type: ${e}}`};function f(t){const e=function(t){const{gen:e,data:i,schema:r}=t,s=(0,n.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:i,schema:r.type,schemaCode:s,schemaValue:s,parentSchema:r,params:{},it:t}}(t);(0,i.reportError)(e,c)}return Ee.reportTypeError=f,Ee}var Ae,Ce={};function Ne(){if(Ae)return Ce;Ae=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.assignDefaults=void 0;const t=fe(),e=pe();function i(i,r,n){const{gen:s,compositeRule:o,data:a,opts:h}=i;if(void 0===n)return;const u=t._`${a}${(0,t.getProperty)(r)}`;if(o)return void(0,e.checkStrictMode)(i,`default is ignored for: ${u}`);let c=t._`${u} === undefined`;"empty"===h.useDefaults&&(c=t._`${c} || ${u} === null || ${u} === ""`),s.if(c,t._`${u} = ${(0,t.stringify)(n)}`)}return Ce.assignDefaults=function(t,e){const{properties:r,items:n}=t.schema;if("object"===e&&r)for(const e in r)i(t,e,r[e].default);else"array"===e&&Array.isArray(n)&&n.forEach(((e,r)=>i(t,r,e.default)))},Ce}var Te,Me,Re={},De={};function ze(){if(Te)return De;Te=1,Object.defineProperty(De,"__esModule",{value:!0}),De.validateUnion=De.validateArray=De.usePattern=De.callValidateCode=De.schemaProperties=De.allSchemaProperties=De.noPropertyInData=De.propertyInData=De.isOwnProperty=De.hasPropFunc=De.reportMissingProp=De.checkMissingProp=De.checkReportMissingProp=void 0;const t=fe(),e=pe(),i=we(),r=pe();function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:t._`Object.prototype.hasOwnProperty`})}function s(e,i,r){return t._`${n(e)}.call(${i}, ${r})`}function o(e,i,r,n){const o=t._`${i}${(0,t.getProperty)(r)} === undefined`;return n?(0,t.or)(o,(0,t.not)(s(e,i,r))):o}function a(t){return t?Object.keys(t).filter((t=>"__proto__"!==t)):[]}De.checkReportMissingProp=function(e,i){const{gen:r,data:n,it:s}=e;r.if(o(r,n,i,s.opts.ownProperties),(()=>{e.setParams({missingProperty:t._`${i}`},!0),e.error()}))},De.checkMissingProp=function({gen:e,data:i,it:{opts:r}},n,s){return(0,t.or)(...n.map((n=>(0,t.and)(o(e,i,n,r.ownProperties),t._`${s} = ${n}`))))},De.reportMissingProp=function(t,e){t.setParams({missingProperty:e},!0),t.error()},De.hasPropFunc=n,De.isOwnProperty=s,De.propertyInData=function(e,i,r,n){const o=t._`${i}${(0,t.getProperty)(r)} !== undefined`;return n?t._`${o} && ${s(e,i,r)}`:o},De.noPropertyInData=o,De.allSchemaProperties=a,De.schemaProperties=function(t,i){return a(i).filter((r=>!(0,e.alwaysValidSchema)(t,i[r])))},De.callValidateCode=function({schemaCode:e,data:r,it:{gen:n,topSchemaRef:s,schemaPath:o,errorPath:a},it:h},u,c,f){const l=f?t._`${e}, ${r}, ${s}${o}`:r,d=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,a)],[i.default.parentData,h.parentData],[i.default.parentDataProperty,h.parentDataProperty],[i.default.rootData,i.default.rootData]];h.opts.dynamicRef&&d.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const p=t._`${l}, ${n.object(...d)}`;return c!==t.nil?t._`${u}.call(${c}, ${p})`:t._`${u}(${p})`};const h=t._`new RegExp`;return De.usePattern=function({gen:e,it:{opts:i}},n){const s=i.unicodeRegExp?"u":"",{regExp:o}=i.code,a=o(n,s);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:t._`${"new RegExp"===o.code?h:(0,r.useFunc)(e,o)}(${n}, ${s})`})},De.validateArray=function(i){const{gen:r,data:n,keyword:s,it:o}=i,a=r.name("valid");if(o.allErrors){const t=r.let("valid",!0);return h((()=>r.assign(t,!1))),t}return r.var(a,!0),h((()=>r.break())),a;function h(o){const h=r.const("len",t._`${n}.length`);r.forRange("i",0,h,(n=>{i.subschema({keyword:s,dataProp:n,dataPropType:e.Type.Num},a),r.if((0,t.not)(a),o)}))}},De.validateUnion=function(i){const{gen:r,schema:n,keyword:s,it:o}=i;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((t=>(0,e.alwaysValidSchema)(o,t)))&&!o.opts.unevaluated)return;const a=r.let("valid",!1),h=r.name("_valid");r.block((()=>n.forEach(((e,n)=>{const o=i.subschema({keyword:s,schemaProp:n,compositeRule:!0},h);r.assign(a,t._`${a} || ${h}`),i.mergeValidEvaluated(o,h)||r.if((0,t.not)(a))})))),i.result(a,(()=>i.reset()),(()=>i.error(!0)))},De}function Le(){if(Me)return Re;Me=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.validateKeywordUsage=Re.validSchemaType=Re.funcKeywordCode=Re.macroKeywordCode=void 0;const t=fe(),e=we(),i=ze(),r=ge();function n(e){const{gen:i,data:r,it:n}=e;i.if(n.parentData,(()=>i.assign(r,t._`${n.parentData}[${n.parentDataProperty}]`)))}function s(e,i,r){if(void 0===r)throw new Error(`keyword "${i}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}return Re.macroKeywordCode=function(e,i){const{gen:r,keyword:n,schema:o,parentSchema:a,it:h}=e,u=i.macro.call(h.self,o,a,h),c=s(r,n,u);!1!==h.opts.validateSchema&&h.self.validateSchema(u,!0);const f=r.name("valid");e.subschema({schema:u,schemaPath:t.nil,errSchemaPath:`${h.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},Re.funcKeywordCode=function(o,a){var h;const{gen:u,keyword:c,schema:f,parentSchema:l,$data:d,it:p}=o;!function({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}(p,a);const m=!d&&a.compile?a.compile.call(p.self,f,l,p):a.validate,v=s(u,c,m),y=u.let("valid");function $(r=(a.async?t._`await `:t.nil)){u.assign(y,t._`${r}${(0,i.callValidateCode)(o,v,p.opts.passContext?e.default.this:e.default.self,!("compile"in a&&!d||!1===a.schema))}`,a.modifying)}function w(e){var i;u.if((0,t.not)(null!==(i=a.valid)&&void 0!==i?i:y),e)}o.block$data(y,(function(){if(!1===a.errors)$(),a.modifying&&n(o),w((()=>o.error()));else{const i=a.async?function(){const e=u.let("ruleErrs",null);return u.try((()=>$(t._`await `)),(i=>u.assign(y,!1).if(t._`${i} instanceof ${p.ValidationError}`,(()=>u.assign(e,t._`${i}.errors`)),(()=>u.throw(i))))),e}():function(){const e=t._`${v}.errors`;return u.assign(e,null),$(t.nil),e}();a.modifying&&n(o),w((()=>function(i,n){const{gen:s}=i;s.if(t._`Array.isArray(${n})`,(()=>{s.assign(e.default.vErrors,t._`${e.default.vErrors} === null ? ${n} : ${e.default.vErrors}.concat(${n})`).assign(e.default.errors,t._`${e.default.vErrors}.length`),(0,r.extendErrors)(i)}),(()=>i.error()))}(o,i)))}})),o.ok(null!==(h=a.valid)&&void 0!==h?h:y)},Re.validSchemaType=function(t,e,i=!1){return!e.length||e.some((e=>"array"===e?Array.isArray(t):"object"===e?t&&"object"==typeof t&&!Array.isArray(t):typeof t==e||i&&void 0===t))},Re.validateKeywordUsage=function({schema:t,opts:e,self:i,errSchemaPath:r},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw new Error("ajv implementation error");const o=n.dependencies;if(null==o?void 0:o.some((e=>!Object.prototype.hasOwnProperty.call(t,e))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[s])){const t=`keyword "${s}" value is invalid at path "${r}": `+i.errorsText(n.validateSchema.errors);if("log"!==e.validateSchema)throw new Error(t);i.logger.error(t)}},Re}var Ue,qe={};function Fe(){if(Ue)return qe;Ue=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.extendSubschemaMode=qe.extendSubschemaData=qe.getSubschema=void 0;const t=fe(),e=pe();return qe.getSubschema=function(i,{keyword:r,schemaProp:n,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:h}){if(void 0!==r&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==r){const s=i.schema[r];return void 0===n?{schema:s,schemaPath:t._`${i.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${i.errSchemaPath}/${r}`}:{schema:s[n],schemaPath:t._`${i.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(n)}`,errSchemaPath:`${i.errSchemaPath}/${r}/${(0,e.escapeFragment)(n)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===h)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:h,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},qe.extendSubschemaData=function(i,r,{dataProp:n,dataPropType:s,data:o,dataTypes:a,propertyName:h}){if(void 0!==o&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=r;if(void 0!==n){const{errorPath:o,dataPathArr:a,opts:h}=r;c(u.let("data",t._`${r.data}${(0,t.getProperty)(n)}`,!0)),i.errorPath=t.str`${o}${(0,e.getErrorPath)(n,s,h.jsPropertySyntax)}`,i.parentDataProperty=t._`${n}`,i.dataPathArr=[...a,i.parentDataProperty]}function c(t){i.data=t,i.dataLevel=r.dataLevel+1,i.dataTypes=[],r.definedProperties=new Set,i.parentData=r.data,i.dataNames=[...r.dataNames,t]}void 0!==o&&(c(o instanceof t.Name?o:u.let("data",o,!0)),void 0!==h&&(i.propertyName=h)),a&&(i.dataTypes=a)},qe.extendSubschemaMode=function(t,{jtdDiscriminator:e,jtdMetadata:i,compositeRule:r,createErrors:n,allErrors:s}){void 0!==r&&(t.compositeRule=r),void 0!==n&&(t.createErrors=n),void 0!==s&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=i},qe}var Be,Ve,Ge={};function He(){return Ve||(Ve=1,Be=function t(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var r,n,s;if(Array.isArray(e)){if((r=e.length)!=i.length)return!1;for(n=r;0!=n--;)if(!t(e[n],i[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((r=(s=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(i,s[n]))return!1;for(n=r;0!=n--;){var o=s[n];if(!t(e[o],i[o]))return!1}return!0}return e!=e&&i!=i}),Be}var Ke,We,Je,Ze={exports:{}};function Xe(){if(Ke)return Ze.exports;Ke=1;var t=Ze.exports=function(t,i,r){"function"==typeof i&&(r=i,i={}),e(i,"function"==typeof(r=i.cb||r)?r:r.pre||function(){},r.post||function(){},t,"",t)};function e(i,r,n,s,o,a,h,u,c,f){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var l in r(s,o,a,h,u,c,f),s){var d=s[l];if(Array.isArray(d)){if(l in t.arrayKeywords)for(var p=0;p<d.length;p++)e(i,r,n,d[p],o+"/"+l+"/"+p,a,o,l,s,p)}else if(l in t.propsKeywords){if(d&&"object"==typeof d)for(var m in d)e(i,r,n,d[m],o+"/"+l+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),a,o,l,s,m)}else(l in t.keywords||i.allKeys&&!(l in t.skipKeywords))&&e(i,r,n,d,o+"/"+l,a,o,l,s)}n(s,o,a,h,u,c,f)}}return t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},Ze.exports}function Qe(){if(We)return Ge;We=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.getSchemaRefs=Ge.resolveUrl=Ge.normalizeId=Ge._getFullPath=Ge.getFullPath=Ge.inlineRef=void 0;const t=pe(),e=He(),i=Xe(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);Ge.inlineRef=function(t,e=!0){return"boolean"==typeof t||(!0===e?!s(t):!!e&&o(t)<=e)};const n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(t){for(const e in t){if(n.has(e))return!0;const i=t[e];if(Array.isArray(i)&&i.some(s))return!0;if("object"==typeof i&&s(i))return!0}return!1}function o(e){let i=0;for(const n in e){if("$ref"===n)return 1/0;if(i++,!r.has(n)&&("object"==typeof e[n]&&(0,t.eachItem)(e[n],(t=>i+=o(t))),i===1/0))return 1/0}return i}function a(t,e="",i){!1!==i&&(e=c(e));const r=t.parse(e);return h(t,r)}function h(t,e){return t.serialize(e).split("#")[0]+"#"}Ge.getFullPath=a,Ge._getFullPath=h;const u=/#\/?$/;function c(t){return t?t.replace(u,""):""}Ge.normalizeId=c,Ge.resolveUrl=function(t,e,i){return i=c(i),t.resolve(e,i)};const f=/^[a-z_][-a-z0-9._]*$/i;return Ge.getSchemaRefs=function(t,r){if("boolean"==typeof t)return{};const{schemaId:n,uriResolver:s}=this.opts,o=c(t[n]||r),h={"":o},u=a(s,o,!1),l={},d=new Set;return i(t,{allKeys:!0},((t,e,i,r)=>{if(void 0===r)return;const s=u+e;let o=h[r];function a(e){if(e=c(o?(0,this.opts.uriResolver.resolve)(o,e):e),d.has(e))throw m(e);d.add(e);let i=this.refs[e];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?p(t,i.schema,e):e!==c(s)&&("#"===e[0]?(p(t,l[e],e),l[e]=t):this.refs[e]=s),e}function v(t){if("string"==typeof t){if(!f.test(t))throw new Error(`invalid anchor "${t}"`);a.call(this,`#${t}`)}}"string"==typeof t[n]&&(o=a.call(this,t[n])),v.call(this,t.$anchor),v.call(this,t.$dynamicAnchor),h[e]=o})),l;function p(t,i,r){if(void 0!==i&&!e(t,i))throw m(r)}function m(t){return new Error(`reference "${t}" resolves to more than one schema`)}},Ge}function Ye(){if(Je)return ee;Je=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.getData=ee.KeywordCxt=ee.validateFunctionCode=void 0;const t=be(),e=Ie(),i=Pe(),r=Ie(),n=Ne(),s=Le(),o=Fe(),a=fe(),h=we(),u=Qe(),c=pe(),f=ge();function l({gen:t,validateName:e,schema:i,schemaEnv:r,opts:n},s){n.code.es5?t.func(e,a._`${h.default.data}, ${h.default.valCxt}`,r.$async,(()=>{t.code(a._`"use strict"; ${d(i,n)}`),function(t,e){t.if(h.default.valCxt,(()=>{t.var(h.default.instancePath,a._`${h.default.valCxt}.${h.default.instancePath}`),t.var(h.default.parentData,a._`${h.default.valCxt}.${h.default.parentData}`),t.var(h.default.parentDataProperty,a._`${h.default.valCxt}.${h.default.parentDataProperty}`),t.var(h.default.rootData,a._`${h.default.valCxt}.${h.default.rootData}`),e.dynamicRef&&t.var(h.default.dynamicAnchors,a._`${h.default.valCxt}.${h.default.dynamicAnchors}`)}),(()=>{t.var(h.default.instancePath,a._`""`),t.var(h.default.parentData,a._`undefined`),t.var(h.default.parentDataProperty,a._`undefined`),t.var(h.default.rootData,h.default.data),e.dynamicRef&&t.var(h.default.dynamicAnchors,a._`{}`)}))}(t,n),t.code(s)})):t.func(e,a._`${h.default.data}, ${function(t){return a._`{${h.default.instancePath}="", ${h.default.parentData}, ${h.default.parentDataProperty}, ${h.default.rootData}=${h.default.data}${t.dynamicRef?a._`, ${h.default.dynamicAnchors}={}`:a.nil}}={}`}(n)}`,r.$async,(()=>t.code(d(i,n)).code(s)))}function d(t,e){const i="object"==typeof t&&t[e.schemaId];return i&&(e.code.source||e.code.process)?a._`/*# sourceURL=${i} */`:a.nil}function p({schema:t,self:e}){if("boolean"==typeof t)return!t;for(const i in t)if(e.RULES.all[i])return!0;return!1}function m(t){return"boolean"!=typeof t.schema}function v(t){(0,c.checkUnknownRules)(t),function(t){const{schema:e,errSchemaPath:i,opts:r,self:n}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}(t)}function y(t,i){if(t.opts.jtd)return w(t,[],!1,i);const r=(0,e.getSchemaTypes)(t.schema);w(t,r,!(0,e.coerceAndCheckDataType)(t,r),i)}function $({gen:t,schemaEnv:e,schema:i,errSchemaPath:r,opts:n}){const s=i.$comment;if(!0===n.$comment)t.code(a._`${h.default.self}.logger.log(${s})`);else if("function"==typeof n.$comment){const i=a.str`${r}/$comment`,n=t.scopeValue("root",{ref:e.root});t.code(a._`${h.default.self}.opts.$comment(${s}, ${i}, ${n}.schema)`)}}function w(t,e,n,s){const{gen:o,schema:u,data:f,allErrors:l,opts:d,self:p}=t,{RULES:m}=p;function v(c){(0,i.shouldUseGroup)(u,c)&&(c.type?(o.if((0,r.checkDataType)(c.type,f,d.strictNumbers)),g(t,c),1===e.length&&e[0]===c.type&&n&&(o.else(),(0,r.reportTypeError)(t)),o.endIf()):g(t,c),l||o.if(a._`${h.default.errors} === ${s||0}`))}!u.$ref||!d.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(u,m)?(d.jtd||function(t,e){!t.schemaEnv.meta&&t.opts.strictTypes&&(function(t,e){e.length&&(t.dataTypes.length?(e.forEach((e=>{b(t.dataTypes,e)||_(t,`type "${e}" not allowed by context "${t.dataTypes.join(",")}"`)})),function(t,e){const i=[];for(const r of t.dataTypes)b(e,r)?i.push(r):e.includes("integer")&&"number"===r&&i.push("integer");t.dataTypes=i}(t,e)):t.dataTypes=e)}(t,e),t.opts.allowUnionTypes||function(t,e){e.length>1&&(2!==e.length||!e.includes("null"))&&_(t,"use allowUnionTypes to allow union type keyword")}(t,e),function(t,e){const r=t.self.RULES.all;for(const n in r){const s=r[n];if("object"==typeof s&&(0,i.shouldUseRule)(t.schema,s)){const{type:i}=s.definition;i.length&&!i.some((t=>{return(i=e).includes(r=t)||"number"===r&&i.includes("integer");var i,r}))&&_(t,`missing type "${i.join(",")}" for keyword "${n}"`)}}}(t,t.dataTypes))}(t,e),o.block((()=>{for(const t of m.rules)v(t);v(m.post)}))):o.block((()=>O(t,"$ref",m.all.$ref.definition)))}function g(t,e){const{gen:r,schema:s,opts:{useDefaults:o}}=t;o&&(0,n.assignDefaults)(t,e.type),r.block((()=>{for(const r of e.rules)(0,i.shouldUseRule)(s,r)&&O(t,r.keyword,r.definition,e.type)}))}function b(t,e){return t.includes(e)||"integer"===e&&t.includes("number")}function _(t,e){(0,c.checkStrictMode)(t,e+=` at "${t.schemaEnv.baseId+t.errSchemaPath}" (strictTypes)`,t.opts.strictTypes)}ee.validateFunctionCode=function(e){m(e)&&(v(e),p(e))?function(t){const{schema:e,opts:i,gen:r}=t;l(t,(()=>{i.$comment&&e.$comment&&$(t),function(t){const{schema:e,opts:i}=t;void 0!==e.default&&i.useDefaults&&i.strictSchema&&(0,c.checkStrictMode)(t,"default is ignored in the schema root")}(t),r.let(h.default.vErrors,null),r.let(h.default.errors,0),i.unevaluated&&function(t){const{gen:e,validateName:i}=t;t.evaluated=e.const("evaluated",a._`${i}.evaluated`),e.if(a._`${t.evaluated}.dynamicProps`,(()=>e.assign(a._`${t.evaluated}.props`,a._`undefined`))),e.if(a._`${t.evaluated}.dynamicItems`,(()=>e.assign(a._`${t.evaluated}.items`,a._`undefined`)))}(t),y(t),function(t){const{gen:e,schemaEnv:i,validateName:r,ValidationError:n,opts:s}=t;i.$async?e.if(a._`${h.default.errors} === 0`,(()=>e.return(h.default.data)),(()=>e.throw(a._`new ${n}(${h.default.vErrors})`))):(e.assign(a._`${r}.errors`,h.default.vErrors),s.unevaluated&&function({gen:t,evaluated:e,props:i,items:r}){i instanceof a.Name&&t.assign(a._`${e}.props`,i),r instanceof a.Name&&t.assign(a._`${e}.items`,r)}(t),e.return(a._`${h.default.errors} === 0`))}(t)}))}(e):l(e,(()=>(0,t.topBoolOrEmptySchema)(e)))};class E{constructor(t,e,i){if((0,s.validateKeywordUsage)(t,e,i),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=i,this.data=t.data,this.schema=t.schema[i],this.$data=e.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(t,this.schema,i,this.$data),this.schemaType=e.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=e,this.$data)this.schemaCode=t.gen.const("vSchema",x(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:!1!==e.errors)&&(this.errsCount=t.gen.const("_errs",h.default.errors))}result(t,e,i){this.failResult((0,a.not)(t),e,i)}failResult(t,e,i){this.gen.if(t),i?i():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,e){this.failResult((0,a.not)(t),void 0,e)}fail(t){if(void 0===t)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:e}=this;this.fail(a._`${e} !== undefined && (${(0,a.or)(this.invalid$data(),t)})`)}error(t,e,i){if(e)return this.setParams(e),this._error(t,i),void this.setParams({});this._error(t,i)}_error(t,e){(t?f.reportExtraError:f.reportError)(this,this.def.error,e)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,e){e?Object.assign(this.params,t):this.params=t}block$data(t,e,i=a.nil){this.gen.block((()=>{this.check$data(t,i),e()}))}check$data(t=a.nil,e=a.nil){if(!this.$data)return;const{gen:i,schemaCode:r,schemaType:n,def:s}=this;i.if((0,a.or)(a._`${r} === undefined`,e)),t!==a.nil&&i.assign(t,!0),(n.length||s.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),t!==a.nil&&i.assign(t,!1)),i.else()}invalid$data(){const{gen:t,schemaCode:e,schemaType:i,def:n,it:s}=this;return(0,a.or)(function(){if(i.length){if(!(e instanceof a.Name))throw new Error("ajv implementation error");const t=Array.isArray(i)?i:[i];return a._`${(0,r.checkDataTypes)(t,e,s.opts.strictNumbers,r.DataType.Wrong)}`}return a.nil}(),function(){if(n.validateSchema){const i=t.scopeValue("validate$data",{ref:n.validateSchema});return a._`!${i}(${e})`}return a.nil}())}subschema(e,i){const r=(0,o.getSubschema)(this.it,e);(0,o.extendSubschemaData)(r,this.it,e),(0,o.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return function(e,i){m(e)&&(v(e),p(e))?function(t,e){const{schema:i,gen:r,opts:n}=t;n.$comment&&i.$comment&&$(t),function(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,u.resolveUrl)(t.opts.uriResolver,t.baseId,e))}(t),function(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}(t);const s=r.const("_errs",h.default.errors);y(t,s),r.var(e,a._`${s} === ${h.default.errors}`)}(e,i):(0,t.boolOrEmptySchema)(e,i)}(n,i),n}mergeEvaluated(t,e){const{it:i,gen:r}=this;i.opts.unevaluated&&(!0!==i.props&&void 0!==t.props&&(i.props=c.mergeEvaluated.props(r,t.props,i.props,e)),!0!==i.items&&void 0!==t.items&&(i.items=c.mergeEvaluated.items(r,t.items,i.items,e)))}mergeValidEvaluated(t,e){const{it:i,gen:r}=this;if(i.opts.unevaluated&&(!0!==i.props||!0!==i.items))return r.if(e,(()=>this.mergeEvaluated(t,a.Name))),!0}}function O(t,e,i,r){const n=new E(t,i,e);"code"in i?i.code(n,r):n.$data&&i.validate?(0,s.funcKeywordCode)(n,i):"macro"in i?(0,s.macroKeywordCode)(n,i):(i.compile||i.validate)&&(0,s.funcKeywordCode)(n,i)}ee.KeywordCxt=E;const j=/^\/(?:[^~]|~0|~1)*$/,S=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function x(t,{dataLevel:e,dataNames:i,dataPathArr:r}){let n,s;if(""===t)return h.default.rootData;if("/"===t[0]){if(!j.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,s=h.default.rootData}else{const o=S.exec(t);if(!o)throw new Error(`Invalid JSON-pointer: ${t}`);const a=+o[1];if(n=o[2],"#"===n){if(a>=e)throw new Error(f("property/index",a));return r[e-a]}if(a>e)throw new Error(f("data",a));if(s=i[e-a],!n)return s}let o=s;const u=n.split("/");for(const t of u)t&&(s=a._`${s}${(0,a.getProperty)((0,c.unescapeJsonPointer)(t))}`,o=a._`${o} && ${s}`);return o;function f(t,i){return`Cannot access ${t} ${i} levels up, current level is ${e}`}}return ee.getData=x,ee}var ti,ei={};function ii(){if(ti)return ei;ti=1,Object.defineProperty(ei,"__esModule",{value:!0});class t extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}return ei.default=t,ei}var ri,ni={};function si(){if(ri)return ni;ri=1,Object.defineProperty(ni,"__esModule",{value:!0});const t=Qe();class e extends Error{constructor(e,i,r,n){super(n||`can't resolve reference ${r} from id ${i}`),this.missingRef=(0,t.resolveUrl)(e,i,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}return ni.default=e,ni}var oi,ai={};function hi(){if(oi)return ai;oi=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.resolveSchema=ai.getCompilingSchema=ai.resolveRef=ai.compileSchema=ai.SchemaEnv=void 0;const t=fe(),e=ii(),i=we(),r=Qe(),n=pe(),s=Ye();class o{constructor(t){var e;let i;this.refs={},this.dynamicAnchors={},"object"==typeof t.schema&&(i=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(e=t.baseId)&&void 0!==e?e:(0,r.normalizeId)(null==i?void 0:i[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null==i?void 0:i.$async,this.refs={}}}function a(n){const o=u.call(this,n);if(o)return o;const a=(0,r.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:h,lines:c}=this.opts.code,{ownProperties:f}=this.opts,l=new t.CodeGen(this.scope,{es5:h,lines:c,ownProperties:f});let d;n.$async&&(d=l.scopeValue("Error",{ref:e.default,code:t._`require("ajv/dist/runtime/validation_error").default`}));const p=l.scopeName("validate");n.validateName=p;const m={gen:l,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:n.schema,code:(0,t.stringify)(n.schema)}:{ref:n.schema}),validateName:p,ValidationError:d,schema:n.schema,schemaEnv:n,rootId:a,baseId:n.baseId||a,schemaPath:t.nil,errSchemaPath:n.schemaPath||(this.opts.jtd?"":"#"),errorPath:t._`""`,opts:this.opts,self:this};let v;try{this._compilations.add(n),(0,s.validateFunctionCode)(m),l.optimize(this.opts.code.optimize);const e=l.toString();v=`${l.scopeRefs(i.default.scope)}return ${e}`,this.opts.code.process&&(v=this.opts.code.process(v,n));const r=new Function(`${i.default.self}`,`${i.default.scope}`,v)(this,this.scope.get());if(this.scope.value(p,{ref:r}),r.errors=null,r.schema=n.schema,r.schemaEnv=n,n.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:p,validateCode:e,scopeValues:l._values}),this.opts.unevaluated){const{props:e,items:i}=m;r.evaluated={props:e instanceof t.Name?void 0:e,items:i instanceof t.Name?void 0:i,dynamicProps:e instanceof t.Name,dynamicItems:i instanceof t.Name},r.source&&(r.source.evaluated=(0,t.stringify)(r.evaluated))}return n.validate=r,n}catch(t){throw delete n.validate,delete n.validateName,v&&this.logger.error("Error compiling schema, function code:",v),t}finally{this._compilations.delete(n)}}function h(t){return(0,r.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:a.call(this,t)}function u(t){for(const r of this._compilations)if((e=r).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return r;var e,i}function c(t,e){let i;for(;"string"==typeof(i=this.refs[e]);)e=i;return i||this.schemas[e]||f.call(this,t,e)}function f(t,e){const i=this.opts.uriResolver.parse(e),n=(0,r._getFullPath)(this.opts.uriResolver,i);let s=(0,r.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===s)return d.call(this,i,t);const h=(0,r.normalizeId)(n),u=this.refs[h]||this.schemas[h];if("string"==typeof u){const e=f.call(this,t,u);if("object"!=typeof(null==e?void 0:e.schema))return;return d.call(this,i,e)}if("object"==typeof(null==u?void 0:u.schema)){if(u.validate||a.call(this,u),h===(0,r.normalizeId)(e)){const{schema:e}=u,{schemaId:i}=this.opts,n=e[i];return n&&(s=(0,r.resolveUrl)(this.opts.uriResolver,s,n)),new o({schema:e,schemaId:i,root:t,baseId:s})}return d.call(this,i,u)}}ai.SchemaEnv=o,ai.compileSchema=a,ai.resolveRef=function(t,e,i){var n;i=(0,r.resolveUrl)(this.opts.uriResolver,e,i);const s=t.refs[i];if(s)return s;let a=c.call(this,t,i);if(void 0===a){const r=null===(n=t.localRefs)||void 0===n?void 0:n[i],{schemaId:s}=this.opts;r&&(a=new o({schema:r,schemaId:s,root:t,baseId:e}))}return void 0!==a?t.refs[i]=h.call(this,a):void 0},ai.getCompilingSchema=u,ai.resolveSchema=f;const l=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function d(t,{baseId:e,schema:i,root:s}){var a;if("/"!==(null===(a=t.fragment)||void 0===a?void 0:a[0]))return;for(const s of t.fragment.slice(1).split("/")){if("boolean"==typeof i)return;const t=i[(0,n.unescapeFragment)(s)];if(void 0===t)return;const o="object"==typeof(i=t)&&i[this.opts.schemaId];!l.has(s)&&o&&(e=(0,r.resolveUrl)(this.opts.uriResolver,e,o))}let h;if("boolean"!=typeof i&&i.$ref&&!(0,n.schemaHasRulesButRef)(i,this.RULES)){const t=(0,r.resolveUrl)(this.opts.uriResolver,e,i.$ref);h=f.call(this,s,t)}const{schemaId:u}=this.opts;return h=h||new o({schema:i,schemaId:u,root:s,baseId:e}),h.schema!==h.root.schema?h:void 0}return ai}var ui,ci,fi,li,di,pi,mi,vi={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},yi={},$i={exports:{}};function wi(){if(ci)return ui;ci=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),r=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),n=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(t){let e="",i=0,r=0;for(r=0;r<t.length;r++)if(i=t[r].charCodeAt(0),48!==i){if(!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(i=t[r].charCodeAt(0),!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102))return"";e+=t[r]}return e}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(t){return t.length=0,!0}function h(t,e,i){if(t.length){const r=s(t);if(""===r)return i.error=!0,!1;e.push(r),t.length=0}return!0}function u(t){if(function(t){let e=0;for(let i=0;i<t.length;i++)":"===t[i]&&e++;return e}(t)<2)return{host:t,isIPV6:!1};const e=function(t){let e=0;const i={error:!1,address:"",zone:""},r=[],n=[];let o=!1,u=!1,c=h;for(let s=0;s<t.length;s++){const h=t[s];if("["!==h&&"]"!==h)if(":"!==h)if("%"===h){if(!c(n,r,i))break;c=a}else n.push(h);else{if(!0===o&&(u=!0),!c(n,r,i))break;if(++e>7){i.error=!0;break}s>0&&":"===t[s-1]&&(o=!0),r.push(":")}}return n.length&&(c===a?i.zone=n.join(""):r.push(u?n.join(""):s(n))),i.address=r.join(""),i}(t);if(e.error)return{host:t,isIPV6:!1};{let t=e.address,i=e.address;return e.zone&&(t+="%"+e.zone,i+="%25"+e.zone),{host:t,isIPV6:!0,escapedHost:i}}}const c={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,l=/[@/?#]/g;function d(t,e){const i=e?l:f;return i.lastIndex=0,t.replace(i,(t=>c[t]))}return ui={nonSimpleDomain:o,recomposeAuthority:function(t){const i=[];if(void 0!==t.userinfo&&(i.push(t.userinfo),i.push("@")),void 0!==t.host){let r=unescape(t.host);if(!e(r)){const t=u(r);r=!0===t.isIPV6?`[${t.escapedHost}]`:d(r,!1)}i.push(r)}return"number"!=typeof t.port&&"string"!=typeof t.port||(i.push(":"),i.push(String(t.port))),i.length?i.join(""):void 0},reescapeHostDelimiters:d,normalizePercentEncoding:function(t,e=!1){if(-1===t.indexOf("%"))return t;let n="";for(let s=0;s<t.length;s++){if("%"===t[s]&&s+2<t.length){const o=t.slice(s+1,s+3);if(i(o)){const t=o.toUpperCase(),i=String.fromCharCode(parseInt(t,16));e&&r(i)?n+=i:n+="%"+t,s+=2;continue}}n+=t[s]}return n},normalizePathEncoding:function(t){let e="";for(let s=0;s<t.length;s++){if("%"===t[s]&&s+2<t.length){const n=t.slice(s+1,s+3);if(i(n)){const t=n.toUpperCase(),i=String.fromCharCode(parseInt(t,16));"."!==i&&r(i)?e+=i:e+="%"+t,s+=2;continue}}n(t[s])?e+=t[s]:e+=escape(t[s])}return e},escapePreservingEscapes:function(t){let e="";for(let r=0;r<t.length;r++){if("%"===t[r]&&r+2<t.length){const n=t.slice(r+1,r+3);if(i(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e},removeDotSegments:function(t){let e=t;const i=[];let r=-1,n=0;for(;n=e.length;){if(1===n){if("."===e)break;if("/"===e){i.push("/");break}i.push(e);break}if(2===n){if("."===e[0]){if("."===e[1])break;if("/"===e[1]){e=e.slice(2);continue}}else if("/"===e[0]&&("."===e[1]||"/"===e[1])){i.push("/");break}}else if(3===n&&"/.."===e){0!==i.length&&i.pop(),i.push("/");break}if("."===e[0]){if("."===e[1]){if("/"===e[2]){e=e.slice(3);continue}}else if("/"===e[1]){e=e.slice(2);continue}}else if("/"===e[0]&&"."===e[1]){if("/"===e[2]){e=e.slice(2);continue}if("."===e[2]&&"/"===e[3]){e=e.slice(3),0!==i.length&&i.pop();continue}}if(-1===(r=e.indexOf("/",1))){i.push(e);break}i.push(e.slice(0,r)),e=e.slice(r)}return i.join("")},isIPv4:e,isUUID:t,normalizeIPv6:u,stringArrayToHexStripped:s},ui}function gi(){if(pi)return yi;pi=1,Object.defineProperty(yi,"__esModule",{value:!0});const t=function(){if(di)return $i.exports;di=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:i,normalizePercentEncoding:r,normalizePathEncoding:n,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:h}=wi(),{SCHEMES:u,getSchemeHandler:c}=function(){if(li)return fi;li=1;const{isUUID:t}=wi(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=["http","https","ws","wss","urn","urn:uuid"];function r(t){return!0===t.secure||!1!==t.secure&&!!t.scheme&&!(3!==t.scheme.length||"w"!==t.scheme[0]&&"W"!==t.scheme[0]||"s"!==t.scheme[1]&&"S"!==t.scheme[1]||"s"!==t.scheme[2]&&"S"!==t.scheme[2])}function n(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function s(t){const e="https"===String(t.scheme).toLowerCase();return t.port!==(e?443:80)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}const o={scheme:"http",domainHost:!0,parse:n,serialize:s},a={scheme:"ws",domainHost:!0,parse:function(t){return t.secure=r(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(t){if(t.port!==(r(t)?443:80)&&""!==t.port||(t.port=void 0),"boolean"==typeof t.secure&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){const[e,i]=t.resourceName.split("?");t.path=e&&"/"!==e?e:void 0,t.query=i,t.resourceName=void 0}return t.fragment=void 0,t}},h={http:o,https:{scheme:"https",domainHost:o.domainHost,parse:n,serialize:s},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(t,i){if(!t.path)return t.error="URN can not be parsed",t;const r=t.path.match(e);if(r){const e=i.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];const n=u(`${e}:${i.nid||t.nid}`);t.path=void 0,n&&(t=n.parse(t,i))}else t.error=t.error||"URN can not be parsed.";return t},serialize:function(t,e){if(void 0===t.nid)throw new Error("URN without nid cannot be serialized");const i=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),n=u(`${i}:${e.nid||r}`);n&&(t=n.serialize(t,e));const s=t;return s.path=`${r||e.nid}:${t.nss}`,e.skipEscape=!0,s},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,i){const r=e;return r.uuid=r.nss,r.nss=void 0,i.tolerant||r.uuid&&t(r.uuid)||(r.error=r.error||"UUID is not valid."),r},serialize:function(t){const e=t;return e.nss=(t.uuid||"").toLowerCase(),e},skipNormalize:!0}};function u(t){return t&&(h[t]||h[t.toLowerCase()])||void 0}return Object.setPrototypeOf(h,null),fi={wsIsSecure:r,SCHEMES:h,isValidSchemeName:function(t){return-1!==i.indexOf(t)},getSchemeHandler:u}}();function f(t,i,r,n){const s={};return n||(t=y(l(t,r),r),i=y(l(i,r),r)),!(r=r||{}).tolerant&&i.scheme?(s.scheme=i.scheme,s.userinfo=i.userinfo,s.host=i.host,s.port=i.port,s.path=e(i.path||""),s.query=i.query):(void 0!==i.userinfo||void 0!==i.host||void 0!==i.port?(s.userinfo=i.userinfo,s.host=i.host,s.port=i.port,s.path=e(i.path||""),s.query=i.query):(i.path?("/"===i.path[0]?s.path=e(i.path):(s.path=void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?t.path.slice(0,t.path.lastIndexOf("/")+1)+i.path:i.path:"/"+i.path,s.path=e(s.path)),s.query=i.query):(s.path=t.path,s.query=void 0!==i.query?i.query:t.query),s.userinfo=t.userinfo,s.host=t.host,s.port=t.port),s.scheme=t.scheme),s.fragment=i.fragment,s}function l(t,n){const o={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},a=Object.assign({},n),h=[],u=c(a.scheme||o.scheme);u&&u.serialize&&u.serialize(o,a),void 0!==o.path&&(a.skipEscape?o.path=r(o.path):(o.path=s(o.path),void 0!==o.scheme&&(o.path=o.path.split("%3A").join(":")))),"suffix"!==a.reference&&o.scheme&&h.push(o.scheme,":");const f=i(o);if(void 0!==f&&("suffix"!==a.reference&&h.push("//"),h.push(f),o.path&&"/"!==o.path[0]&&h.push("/")),void 0!==o.path){let t=o.path;a.absolutePath||u&&u.absolutePath||(t=e(t)),void 0===f&&"/"===t[0]&&"/"===t[1]&&(t="/%2F"+t.slice(2)),h.push(t)}return void 0!==o.query&&h.push("?",o.query),void 0!==o.fragment&&h.push("#",o.fragment),h.join("")}const d=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,p=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,m=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function v(e,i){const r=Object.assign({},i),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let u=!1,f=!1;"suffix"===r.reference&&(e=r.scheme?r.scheme+":"+e:"//"+e);const l=e.match(p);null!==l&&-1!==l[1].indexOf("\\")&&(s.error="URI authority must not contain a literal backslash.",u=!0);const v=e.match(m);if(null!==v){const t=v[1],e=t.replace(/[\t\n\r]/g,"");e.length>=2&&("//"!==e.slice(0,2)?(s.error=s.error||"URI authority must not contain a literal backslash.",u=!0):t.length!==e.length&&(s.error=s.error||"URI authority introducer must not contain whitespace.",u=!0))}const y=e.match(d);if(y){s.scheme=y[1],s.userinfo=y[3],s.host=y[4],s.port=parseInt(y[5],10),s.path=y[6]||"",s.query=y[7],s.fragment=y[8],isNaN(s.port)&&(s.port=y[5]);const i=function(t,e){return void 0!==e[2]&&t.path&&"/"!==t.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof t.port&&(t.port<0||t.port>65535)?"URI port is malformed.":void 0}(s,y);if(void 0!==i&&(s.error=s.error||i,u=!0),s.host)if(!1===a(s.host)){const e=t(s.host);s.host=e.host.toLowerCase(),f=e.isIPV6}else f=!0;s.reference=void 0!==s.scheme||void 0!==s.userinfo||void 0!==s.host||void 0!==s.port||void 0!==s.query||s.path?void 0===s.scheme?"relative":void 0===s.fragment?"absolute":"uri":"same-document",r.reference&&"suffix"!==r.reference&&r.reference!==s.reference&&(s.error=s.error||"URI is not a "+r.reference+" reference.");const l=c(r.scheme||s.scheme);if(!(r.unicodeSupport||l&&l.unicodeSupport)&&s.host&&(r.domainHost||l&&l.domainHost)&&!1===f&&h(s.host))try{s.host=new URL("http://"+s.host).hostname}catch(t){s.error=s.error||"Host's domain name can not be converted to ASCII: "+t}if((!l||l&&!l.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==s.scheme&&(s.scheme=unescape(s.scheme)),void 0!==s.host&&(s.host=o(unescape(s.host),f))),s.path&&(s.path=n(s.path)),s.fragment))try{s.fragment=encodeURI(decodeURIComponent(s.fragment))}catch{s.error=s.error||"URI malformed"}l&&l.parse&&l.parse(s,r)}else s.error=s.error||"URI can not be parsed.";return{parsed:s,malformedAuthorityOrPort:u}}function y(t,e){return v(t,e).parsed}function $(t,e){const{parsed:i,malformedAuthorityOrPort:r}=v(t,e);return{normalized:r?t:l(i,e),malformedAuthorityOrPort:r}}function w(t,e){if("string"==typeof t){const{normalized:i,malformedAuthorityOrPort:r}=$(t,e);return r?void 0:i}if("object"==typeof t)return l(t,e)}const g={SCHEMES:u,normalize:function(t,e){return"string"==typeof t?t=function(t,e){return $(t,e).normalized}(t,e):"object"==typeof t&&(t=y(l(t,e),e)),t},resolve:function(t,e,i){const r=i?Object.assign({scheme:"null"},i):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:s}=v(t,r),{parsed:o,malformedAuthorityOrPort:a}=v(e,r);if(s||a)throw new Error(n.error||o.error||"URI is malformed.");const h=f(n,o,r,!0);return r.skipEscape=!0,l(h,r)},resolveComponent:f,equal:function(t,e,i){const r=w(t,i),n=w(e,i);return void 0!==r&&void 0!==n&&r.toLowerCase()===n.toLowerCase()},serialize:l,parse:y};return $i.exports=g,$i.exports.default=g,$i.exports.fastUri=g,$i.exports}();return t.code='require("ajv/dist/runtime/uri").default',yi.default=t,yi}function bi(){return mi||(mi=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Ye();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var i=fe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const r=ii(),n=si(),s=je(),o=hi(),a=fe(),h=Qe(),u=Ie(),c=pe(),f=vi,l=gi(),d=(t,e)=>new RegExp(t,e);d.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function $(t){var e,i,r,n,s,o,a,h,u,c,f,p,m,v,y,$,w,g,b,_,E,O,j,S,x;const k=t.strict,P=null===(e=t.code)||void 0===e?void 0:e.optimize,I=!0===P||void 0===P?1:P||0,A=null!==(r=null===(i=t.code)||void 0===i?void 0:i.regExp)&&void 0!==r?r:d,C=null!==(n=t.uriResolver)&&void 0!==n?n:l.default;return{strictSchema:null===(o=null!==(s=t.strictSchema)&&void 0!==s?s:k)||void 0===o||o,strictNumbers:null===(h=null!==(a=t.strictNumbers)&&void 0!==a?a:k)||void 0===h||h,strictTypes:null!==(c=null!==(u=t.strictTypes)&&void 0!==u?u:k)&&void 0!==c?c:"log",strictTuples:null!==(p=null!==(f=t.strictTuples)&&void 0!==f?f:k)&&void 0!==p?p:"log",strictRequired:null!==(v=null!==(m=t.strictRequired)&&void 0!==m?m:k)&&void 0!==v&&v,code:t.code?{...t.code,optimize:I,regExp:A}:{optimize:I,regExp:A},loopRequired:null!==(y=t.loopRequired)&&void 0!==y?y:200,loopEnum:null!==($=t.loopEnum)&&void 0!==$?$:200,meta:null===(w=t.meta)||void 0===w||w,messages:null===(g=t.messages)||void 0===g||g,inlineRefs:null===(b=t.inlineRefs)||void 0===b||b,schemaId:null!==(_=t.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(E=t.addUsedSchema)||void 0===E||E,validateSchema:null===(O=t.validateSchema)||void 0===O||O,validateFormats:null===(j=t.validateFormats)||void 0===j||j,unicodeRegExp:null===(S=t.unicodeRegExp)||void 0===S||S,int32range:null===(x=t.int32range)||void 0===x||x,uriResolver:C}}class w{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...$(t)};const{es5:e,lines:i}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:e,lines:i}),this.logger=function(t){if(!1===t)return S;if(void 0===t)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}(t.logger);const r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,s.getRules)(),g.call(this,v,t,"NOT SUPPORTED"),g.call(this,y,t,"DEPRECATED","warn"),this._metaOpts=j.call(this),t.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&O.call(this,t.keywords),"object"==typeof t.meta&&this.addMetaSchema(t.meta),_.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:e,schemaId:i}=this.opts;let r=f;"id"===i&&(r={...f},r.id=r.$id,delete r.$id),e&&t&&this.addMetaSchema(r,r[i],!1)}defaultMeta(){const{meta:t,schemaId:e}=this.opts;return this.opts.defaultMeta="object"==typeof t?t[e]||t:void 0}validate(t,e){let i;if("string"==typeof t){if(i=this.getSchema(t),!i)throw new Error(`no schema with key or ref "${t}"`)}else i=this.compile(t);const r=i(e);return"$async"in i||(this.errors=i.errors),r}compile(t,e){const i=this._addSchema(t,e);return i.validate||this._compileSchemaEnv(i)}compileAsync(t,e){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:i}=this.opts;return r.call(this,t,e);async function r(t,e){await s.call(this,t.$schema);const i=this._addSchema(t,e);return i.validate||o.call(this,i)}async function s(t){t&&!this.getSchema(t)&&await r.call(this,{$ref:t},!0)}async function o(t){try{return this._compileSchemaEnv(t)}catch(e){if(!(e instanceof n.default))throw e;return a.call(this,e),await h.call(this,e.missingSchema),o.call(this,t)}}function a({missingSchema:t,missingRef:e}){if(this.refs[t])throw new Error(`AnySchema ${t} is loaded but ${e} cannot be resolved`)}async function h(t){const i=await u.call(this,t);this.refs[t]||await s.call(this,i.$schema),this.refs[t]||this.addSchema(i,t,e)}async function u(t){const e=this._loading[t];if(e)return e;try{return await(this._loading[t]=i(t))}finally{delete this._loading[t]}}}addSchema(t,e,i,r=this.opts.validateSchema){if(Array.isArray(t)){for(const e of t)this.addSchema(e,void 0,i,r);return this}let n;if("object"==typeof t){const{schemaId:e}=this.opts;if(n=t[e],void 0!==n&&"string"!=typeof n)throw new Error(`schema ${e} must be string`)}return e=(0,h.normalizeId)(e||n),this._checkUnique(e),this.schemas[e]=this._addSchema(t,i,e,r,!0),this}addMetaSchema(t,e,i=this.opts.validateSchema){return this.addSchema(t,e,!0,i),this}validateSchema(t,e){if("boolean"==typeof t)return!0;let i;if(i=t.$schema,void 0!==i&&"string"!=typeof i)throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(i,t);if(!r&&e){const t="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(t);this.logger.error(t)}return r}getSchema(t){let e;for(;"string"==typeof(e=b.call(this,t));)t=e;if(void 0===e){const{schemaId:i}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:i});if(e=o.resolveSchema.call(this,r,t),!e)return;this.refs[t]=e}return e.validate||this._compileSchemaEnv(e)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const e=b.call(this,t);return"object"==typeof e&&this._cache.delete(e.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{this._cache.delete(t);let e=t[this.opts.schemaId];return e&&(e=(0,h.normalizeId)(e),delete this.schemas[e],delete this.refs[e]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const e of t)this.addKeyword(e);return this}addKeyword(t,e){let i;if("string"==typeof t)i=t,"object"==typeof e&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),e.keyword=i);else{if("object"!=typeof t||void 0!==e)throw new Error("invalid addKeywords parameters");if(i=(e=t).keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(k.call(this,i,e),!e)return(0,c.eachItem)(i,(t=>P.call(this,t))),this;A.call(this,e);const r={...e,type:(0,u.getJSONTypes)(e.type),schemaType:(0,u.getJSONTypes)(e.schemaType)};return(0,c.eachItem)(i,0===r.type.length?t=>P.call(this,t,r):t=>r.type.forEach((e=>P.call(this,t,r,e)))),this}getKeyword(t){const e=this.RULES.all[t];return"object"==typeof e?e.definition:!!e}removeKeyword(t){const{RULES:e}=this;delete e.keywords[t],delete e.all[t];for(const i of e.rules){const e=i.rules.findIndex((e=>e.keyword===t));e>=0&&i.rules.splice(e,1)}return this}addFormat(t,e){return"string"==typeof e&&(e=new RegExp(e)),this.formats[t]=e,this}errorsText(t=this.errors,{separator:e=", ",dataVar:i="data"}={}){return t&&0!==t.length?t.map((t=>`${i}${t.instancePath} ${t.message}`)).reduce(((t,i)=>t+e+i)):"No errors"}$dataMetaSchema(t,e){const i=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const r of e){const e=r.split("/").slice(1);let n=t;for(const t of e)n=n[t];for(const t in i){const e=i[t];if("object"!=typeof e)continue;const{$data:r}=e.definition,s=n[t];r&&s&&(n[t]=N(s))}}return t}_removeAllSchemas(t,e){for(const i in t){const r=t[i];e&&!e.test(i)||("string"==typeof r?delete t[i]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[i]))}}_addSchema(t,e,i,r=this.opts.validateSchema,n=this.opts.addUsedSchema){let s;const{schemaId:a}=this.opts;if("object"==typeof t)s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof t)throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(void 0!==u)return u;i=(0,h.normalizeId)(s||i);const c=h.getSchemaRefs.call(this,t,i);return u=new o.SchemaEnv({schema:t,schemaId:a,meta:e,baseId:i,localRefs:c}),this._cache.set(u.schema,u),n&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=u),r&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):o.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const e=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,t)}finally{this.opts=e}}}function g(t,e,i,r="error"){for(const n in t)n in e&&this.logger[r](`${i}: option ${n}. ${t[n]}`)}function b(t){return t=(0,h.normalizeId)(t),this.schemas[t]||this.refs[t]}function _(){const t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(const e in t)this.addSchema(t[e],e)}function E(){for(const t in this.opts.formats){const e=this.opts.formats[t];e&&this.addFormat(t,e)}}function O(t){if(Array.isArray(t))this.addVocabulary(t);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const e in t){const i=t[e];i.keyword||(i.keyword=e),this.addKeyword(i)}}}function j(){const t={...this.opts};for(const e of p)delete t[e];return t}w.ValidationError=r.default,w.MissingRefError=n.default,t.default=w;const S={log(){},warn(){},error(){}},x=/^[a-z_$][a-z0-9_$:-]*$/i;function k(t,e){const{RULES:i}=this;if((0,c.eachItem)(t,(t=>{if(i.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!x.test(t))throw new Error(`Keyword ${t} has invalid name`)})),e&&e.$data&&!("code"in e)&&!("validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function P(t,e,i){var r;const n=null==e?void 0:e.post;if(i&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=n?s.post:s.rules.find((({type:t})=>t===i));if(o||(o={type:i,rules:[]},s.rules.push(o)),s.keywords[t]=!0,!e)return;const a={keyword:t,definition:{...e,type:(0,u.getJSONTypes)(e.type),schemaType:(0,u.getJSONTypes)(e.schemaType)}};e.before?I.call(this,o,a,e.before):o.rules.push(a),s.all[t]=a,null===(r=e.implements)||void 0===r||r.forEach((t=>this.addKeyword(t)))}function I(t,e,i){const r=t.rules.findIndex((t=>t.keyword===i));r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${i} is not defined`))}function A(t){let{metaSchema:e}=t;void 0!==e&&(t.$data&&this.opts.$data&&(e=N(e)),t.validateSchema=this.compile(e,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function N(t){return{anyOf:[t,C]}}}(te)),te}var _i,Ei={},Oi={},ji={};function Si(){return _i||(_i=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.default={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}),ji}var xi,ki,Pi={};function Ii(){if(xi)return Pi;xi=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.callRef=Pi.getValidate=void 0;const t=si(),e=ze(),i=fe(),r=we(),n=hi(),s=pe(),o={keyword:"$ref",schemaType:"string",code(e){const{gen:r,schema:s,it:o}=e,{baseId:u,schemaEnv:c,validateName:f,opts:l,self:d}=o,{root:p}=c;if(("#"===s||"#/"===s)&&u===p.baseId)return function(){if(c===p)return h(e,f,c,c.$async);const t=r.scopeValue("root",{ref:p});return h(e,i._`${t}.validate`,p,p.$async)}();const m=n.resolveRef.call(d,p,u,s);if(void 0===m)throw new t.default(o.opts.uriResolver,u,s);return m instanceof n.SchemaEnv?function(t){const i=a(e,t);h(e,i,t,t.$async)}(m):function(t){const n=r.scopeValue("schema",!0===l.code.source?{ref:t,code:(0,i.stringify)(t)}:{ref:t}),o=r.name("valid"),a=e.subschema({schema:t,dataTypes:[],schemaPath:i.nil,topSchemaRef:n,errSchemaPath:s},o);e.mergeEvaluated(a),e.ok(o)}(m)}};function a(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):i._`${r.scopeValue("wrapper",{ref:e})}.validate`}function h(t,n,o,a){const{gen:h,it:u}=t,{allErrors:c,schemaEnv:f,opts:l}=u,d=l.passContext?r.default.this:i.nil;function p(t){const e=i._`${t}.errors`;h.assign(r.default.vErrors,i._`${r.default.vErrors} === null ? ${e} : ${r.default.vErrors}.concat(${e})`),h.assign(r.default.errors,i._`${r.default.vErrors}.length`)}function m(t){var e;if(!u.opts.unevaluated)return;const r=null===(e=null==o?void 0:o.validate)||void 0===e?void 0:e.evaluated;if(!0!==u.props)if(r&&!r.dynamicProps)void 0!==r.props&&(u.props=s.mergeEvaluated.props(h,r.props,u.props));else{const e=h.var("props",i._`${t}.evaluated.props`);u.props=s.mergeEvaluated.props(h,e,u.props,i.Name)}if(!0!==u.items)if(r&&!r.dynamicItems)void 0!==r.items&&(u.items=s.mergeEvaluated.items(h,r.items,u.items));else{const e=h.var("items",i._`${t}.evaluated.items`);u.items=s.mergeEvaluated.items(h,e,u.items,i.Name)}}a?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=h.let("valid");h.try((()=>{h.code(i._`await ${(0,e.callValidateCode)(t,n,d)}`),m(n),c||h.assign(r,!0)}),(t=>{h.if(i._`!(${t} instanceof ${u.ValidationError})`,(()=>h.throw(t))),p(t),c||h.assign(r,!1)})),t.ok(r)}():t.result((0,e.callValidateCode)(t,n,d),(()=>m(n)),(()=>p(n)))}return Pi.getValidate=a,Pi.callRef=h,Pi.default=o,Pi}function Ai(){return ki||(ki=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Si().default,Ii().default]),Oi}var Ci,Ni={},Ti={};function Mi(){if(Ci)return Ti;Ci=1,Object.defineProperty(Ti,"__esModule",{value:!0});const t=fe(),e=t.operators,i={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},r={message:({keyword:e,schemaCode:r})=>t.str`must be ${i[e].okStr} ${r}`,params:({keyword:e,schemaCode:r})=>t._`{comparison: ${i[e].okStr}, limit: ${r}}`},n={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:r,code(e){const{keyword:r,data:n,schemaCode:s}=e;e.fail$data(t._`${n} ${i[r].fail} ${s} || isNaN(${n})`)}};return Ti.default=n,Ti}var Ri,Di={};function zi(){if(Ri)return Di;Ri=1,Object.defineProperty(Di,"__esModule",{value:!0});const t=fe(),e={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>t.str`must be multiple of ${e}`,params:({schemaCode:e})=>t._`{multipleOf: ${e}}`},code(e){const{gen:i,data:r,schemaCode:n,it:s}=e,o=s.opts.multipleOfPrecision,a=i.let("res"),h=o?t._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:t._`${a} !== parseInt(${a})`;e.fail$data(t._`(${n} === 0 || (${a} = ${r}/${n}, ${h}))`)}};return Di.default=e,Di}var Li,Ui,qi={},Fi={};function Bi(){if(Li)return Fi;function t(t){const e=t.length;let i,r=0,n=0;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),56320==(64512&i)&&n++);return r}return Li=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',Fi}function Vi(){if(Ui)return qi;Ui=1,Object.defineProperty(qi,"__esModule",{value:!0});const t=fe(),e=pe(),i=Bi(),r={message:({keyword:e,schemaCode:i})=>t.str`must NOT have ${"maxLength"===e?"more":"fewer"} than ${i} characters`,params:({schemaCode:e})=>t._`{limit: ${e}}`},n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:r,code(r){const{keyword:n,data:s,schemaCode:o,it:a}=r,h="maxLength"===n?t.operators.GT:t.operators.LT,u=!1===a.opts.unicode?t._`${s}.length`:t._`${(0,e.useFunc)(r.gen,i.default)}(${s})`;r.fail$data(t._`${u} ${h} ${o}`)}};return qi.default=n,qi}var Gi,Hi={};function Ki(){if(Gi)return Hi;Gi=1,Object.defineProperty(Hi,"__esModule",{value:!0});const t=ze(),e=pe(),i=fe(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>i.str`must match pattern "${t}"`,params:({schemaCode:t})=>i._`{pattern: ${t}}`},code(r){const{gen:n,data:s,$data:o,schema:a,schemaCode:h,it:u}=r,c=u.opts.unicodeRegExp?"u":"";if(o){const{regExp:t}=u.opts.code,o="new RegExp"===t.code?i._`new RegExp`:(0,e.useFunc)(n,t),a=n.let("valid");n.try((()=>n.assign(a,i._`${o}(${h}, ${c}).test(${s})`)),(()=>n.assign(a,!1))),r.fail$data(i._`!${a}`)}else{const e=(0,t.usePattern)(r,a);r.fail$data(i._`!${e}.test(${s})`)}}};return Hi.default=r,Hi}var Wi,Ji={};function Zi(){if(Wi)return Ji;Wi=1,Object.defineProperty(Ji,"__esModule",{value:!0});const t=fe(),e={message:({keyword:e,schemaCode:i})=>t.str`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${i} properties`,params:({schemaCode:e})=>t._`{limit: ${e}}`},i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:e,code(e){const{keyword:i,data:r,schemaCode:n}=e;e.fail$data(t._`Object.keys(${r}).length ${"maxProperties"===i?t.operators.GT:t.operators.LT} ${n}`)}};return Ji.default=i,Ji}var Xi,Qi={};function Yi(){if(Xi)return Qi;Xi=1,Object.defineProperty(Qi,"__esModule",{value:!0});const t=ze(),e=fe(),i=pe(),r={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>e.str`must have required property '${t}'`,params:({params:{missingProperty:t}})=>e._`{missingProperty: ${t}}`},code(r){const{gen:n,schema:s,schemaCode:o,data:a,$data:h,it:u}=r,{opts:c}=u;if(!h&&0===s.length)return;const f=s.length>=c.loopRequired;if(u.allErrors?function(){if(f||h)r.block$data(e.nil,l);else for(const e of s)(0,t.checkReportMissingProp)(r,e)}():function(){const i=n.let("missing");if(f||h){const s=n.let("valid",!0);r.block$data(s,(()=>function(i,s){r.setParams({missingProperty:i}),n.forOf(i,o,(()=>{n.assign(s,(0,t.propertyInData)(n,a,i,c.ownProperties)),n.if((0,e.not)(s),(()=>{r.error(),n.break()}))}),e.nil)}(i,s))),r.ok(s)}else n.if((0,t.checkMissingProp)(r,s,i)),(0,t.reportMissingProp)(r,i),n.else()}(),c.strictRequired){const t=r.parentSchema.properties,{definedProperties:e}=r.it;for(const r of s)void 0!==(null==t?void 0:t[r])||e.has(r)||(0,i.checkStrictMode)(u,`required property "${r}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`,u.opts.strictRequired)}function l(){n.forOf("prop",o,(e=>{r.setParams({missingProperty:e}),n.if((0,t.noPropertyInData)(n,a,e,c.ownProperties),(()=>r.error()))}))}}};return Qi.default=r,Qi}var tr,er={};function ir(){if(tr)return er;tr=1,Object.defineProperty(er,"__esModule",{value:!0});const t=fe(),e={message:({keyword:e,schemaCode:i})=>t.str`must NOT have ${"maxItems"===e?"more":"fewer"} than ${i} items`,params:({schemaCode:e})=>t._`{limit: ${e}}`},i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:e,code(e){const{keyword:i,data:r,schemaCode:n}=e;e.fail$data(t._`${r}.length ${"maxItems"===i?t.operators.GT:t.operators.LT} ${n}`)}};return er.default=i,er}var rr,nr,sr={},or={};function ar(){if(rr)return or;rr=1,Object.defineProperty(or,"__esModule",{value:!0});const t=He();return t.code='require("ajv/dist/runtime/equal").default',or.default=t,or}function hr(){if(nr)return sr;nr=1,Object.defineProperty(sr,"__esModule",{value:!0});const t=Ie(),e=fe(),i=pe(),r=ar(),n={message:({params:{i:t,j:i}})=>e.str`must NOT have duplicate items (items ## ${i} and ${t} are identical)`,params:({params:{i:t,j:i}})=>e._`{i: ${t}, j: ${i}}`},s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:n,code(n){const{gen:s,data:o,$data:a,schema:h,parentSchema:u,schemaCode:c,it:f}=n;if(!a&&!h)return;const l=s.let("valid"),d=u.items?(0,t.getSchemaTypes)(u.items):[];function p(i,r){const a=s.name("item"),h=(0,t.checkDataTypes)(d,a,f.opts.strictNumbers,t.DataType.Wrong),u=s.const("indices",e._`{}`);s.for(e._`;${i}--;`,(()=>{s.let(a,e._`${o}[${i}]`),s.if(h,e._`continue`),d.length>1&&s.if(e._`typeof ${a} == "string"`,e._`${a} += "_"`),s.if(e._`typeof ${u}[${a}] == "number"`,(()=>{s.assign(r,e._`${u}[${a}]`),n.error(),s.assign(l,!1).break()})).code(e._`${u}[${a}] = ${i}`)}))}function m(t,a){const h=(0,i.useFunc)(s,r.default),u=s.name("outer");s.label(u).for(e._`;${t}--;`,(()=>s.for(e._`${a} = ${t}; ${a}--;`,(()=>s.if(e._`${h}(${o}[${t}], ${o}[${a}])`,(()=>{n.error(),s.assign(l,!1).break(u)}))))))}n.block$data(l,(function(){const t=s.let("i",e._`${o}.length`),i=s.let("j");n.setParams({i:t,j:i}),s.assign(l,!0),s.if(e._`${t} > 1`,(()=>(d.length>0&&!d.some((t=>"object"===t||"array"===t))?p:m)(t,i)))}),e._`${c} === false`),n.ok(l)}};return sr.default=s,sr}var ur,cr={};function fr(){if(ur)return cr;ur=1,Object.defineProperty(cr,"__esModule",{value:!0});const t=fe(),e=pe(),i=ar(),r={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>t._`{allowedValue: ${e}}`},code(r){const{gen:n,data:s,$data:o,schemaCode:a,schema:h}=r;o||h&&"object"==typeof h?r.fail$data(t._`!${(0,e.useFunc)(n,i.default)}(${s}, ${a})`):r.fail(t._`${h} !== ${s}`)}};return cr.default=r,cr}var lr,dr,pr={};function mr(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0});const t=fe(),e=pe(),i=ar(),r={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>t._`{allowedValues: ${e}}`},code(r){const{gen:n,data:s,$data:o,schema:a,schemaCode:h,it:u}=r;if(!o&&0===a.length)throw new Error("enum must have non-empty array");let c;const f=()=>null!=c?c:c=(0,e.useFunc)(n,i.default);let l;if(a.length>=u.opts.loopEnum||o)l=n.let("valid"),r.block$data(l,(function(){n.assign(l,!1),n.forOf("v",h,(e=>n.if(t._`${f()}(${s}, ${e})`,(()=>n.assign(l,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=n.const("vSchema",h);l=(0,t.or)(...a.map(((i,r)=>function(e,i){const r=a[i];return"object"==typeof r&&null!==r?t._`${f()}(${s}, ${e}[${i}])`:t._`${s} === ${r}`}(e,r))))}r.pass(l)}};return pr.default=r,pr}function vr(){return dr||(dr=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.default=[Mi().default,zi().default,Vi().default,Ki().default,Zi().default,Yi().default,ir().default,hr().default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},fr().default,mr().default]),Ni}var yr,$r={},wr={};function gr(){if(yr)return wr;yr=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.validateAdditionalItems=void 0;const t=fe(),e=pe(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>t.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>t._`{limit: ${e}}`},code(t){const{parentSchema:i,it:n}=t,{items:s}=i;Array.isArray(s)?r(t,s):(0,e.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function r(i,r){const{gen:n,schema:s,data:o,keyword:a,it:h}=i;h.items=!0;const u=n.const("len",t._`${o}.length`);if(!1===s)i.setParams({len:r.length}),i.pass(t._`${u} <= ${r.length}`);else if("object"==typeof s&&!(0,e.alwaysValidSchema)(h,s)){const s=n.var("valid",t._`${u} <= ${r.length}`);n.if((0,t.not)(s),(()=>function(s){n.forRange("i",r.length,u,(r=>{i.subschema({keyword:a,dataProp:r,dataPropType:e.Type.Num},s),h.allErrors||n.if((0,t.not)(s),(()=>n.break()))}))}(s))),i.ok(s)}}return wr.validateAdditionalItems=r,wr.default=i,wr}var br,_r,Er={},Or={};function jr(){if(br)return Or;br=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.validateTuple=void 0;const t=fe(),e=pe(),i=ze(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:r,it:s}=t;if(Array.isArray(r))return n(t,"additionalItems",r);s.items=!0,(0,e.alwaysValidSchema)(s,r)||t.ok((0,i.validateArray)(t))}};function n(i,r,n=i.schema){const{gen:s,parentSchema:o,data:a,keyword:h,it:u}=i;!function(t){const{opts:i,errSchemaPath:s}=u,o=n.length;i.strictTuples&&!(o===t.minItems&&(o===t.maxItems||!1===t[r]))&&(0,e.checkStrictMode)(u,`"${h}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${s}"`,i.strictTuples)}(o),u.opts.unevaluated&&n.length&&!0!==u.items&&(u.items=e.mergeEvaluated.items(s,n.length,u.items));const c=s.name("valid"),f=s.const("len",t._`${a}.length`);n.forEach(((r,n)=>{(0,e.alwaysValidSchema)(u,r)||(s.if(t._`${f} > ${n}`,(()=>i.subschema({keyword:h,schemaProp:n,dataProp:n},c))),i.ok(c))}))}return Or.validateTuple=n,Or.default=r,Or}function Sr(){if(_r)return Er;_r=1,Object.defineProperty(Er,"__esModule",{value:!0});const t=jr();return Er.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")},Er}var xr,kr={};function Pr(){if(xr)return kr;xr=1,Object.defineProperty(kr,"__esModule",{value:!0});const t=fe(),e=pe(),i=ze(),r=gr(),n={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>t.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>t._`{limit: ${e}}`},code(t){const{schema:n,parentSchema:s,it:o}=t,{prefixItems:a}=s;o.items=!0,(0,e.alwaysValidSchema)(o,n)||(a?(0,r.validateAdditionalItems)(t,a):t.ok((0,i.validateArray)(t)))}};return kr.default=n,kr}var Ir,Ar={};function Cr(){if(Ir)return Ar;Ir=1,Object.defineProperty(Ar,"__esModule",{value:!0});const t=fe(),e=pe(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:i}})=>void 0===i?t.str`must contain at least ${e} valid item(s)`:t.str`must contain at least ${e} and no more than ${i} valid item(s)`,params:({params:{min:e,max:i}})=>void 0===i?t._`{minContains: ${e}}`:t._`{minContains: ${e}, maxContains: ${i}}`},code(i){const{gen:r,schema:n,parentSchema:s,data:o,it:a}=i;let h,u;const{minContains:c,maxContains:f}=s;a.opts.next?(h=void 0===c?1:c,u=f):h=1;const l=r.const("len",t._`${o}.length`);if(i.setParams({min:h,max:u}),void 0===u&&0===h)return void(0,e.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==u&&h>u)return(0,e.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void i.fail();if((0,e.alwaysValidSchema)(a,n)){let e=t._`${l} >= ${h}`;return void 0!==u&&(e=t._`${e} && ${l} <= ${u}`),void i.pass(e)}a.items=!0;const d=r.name("valid");function p(){const e=r.name("_valid"),i=r.let("count",0);m(e,(()=>r.if(e,(()=>function(e){r.code(t._`${e}++`),void 0===u?r.if(t._`${e} >= ${h}`,(()=>r.assign(d,!0).break())):(r.if(t._`${e} > ${u}`,(()=>r.assign(d,!1).break())),1===h?r.assign(d,!0):r.if(t._`${e} >= ${h}`,(()=>r.assign(d,!0))))}(i)))))}function m(t,n){r.forRange("i",0,l,(r=>{i.subschema({keyword:"contains",dataProp:r,dataPropType:e.Type.Num,compositeRule:!0},t),n()}))}void 0===u&&1===h?m(d,(()=>r.if(d,(()=>r.break())))):0===h?(r.let(d,!0),void 0!==u&&r.if(t._`${o}.length > 0`,p)):(r.let(d,!1),p()),i.result(d,(()=>i.reset()))}};return Ar.default=i,Ar}var Nr,Tr={};function Mr(){return Nr||(Nr=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=fe(),i=pe(),r=ze();t.error={message:({params:{property:t,depsCount:i,deps:r}})=>e.str`must have ${1===i?"property":"properties"} ${r} when property ${t} is present`,params:({params:{property:t,depsCount:i,deps:r,missingProperty:n}})=>e._`{property: ${t},
4
+ || ${h} === "boolean" || ${s} === null`).assign(c,r._`[${s}]`)}}n.else(),f(t),n.endIf(),n.if(r._`${c} !== undefined`,(()=>{n.assign(s,c),function({gen:t,parentData:e,parentDataProperty:i},n){t.if(r._`${e} !== undefined`,(()=>t.assign(r._`${e}[${i}]`,n)))}(t,c)}))}(t,i,c):f(t)}))}return l};const a=new Set(["string","number","integer","boolean","null"]);function h(t,e,i,n=s.Correct){const o=n===s.Correct?r.operators.EQ:r.operators.NEQ;let a;switch(t){case"null":return r._`${e} ${o} null`;case"array":a=r._`Array.isArray(${e})`;break;case"object":a=r._`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=h(r._`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=h();break;default:return r._`typeof ${e} ${o} ${t}`}return n===s.Correct?a:(0,r.not)(a);function h(t=r.nil){return(0,r.and)(r._`typeof ${e} == "number"`,t,i?r._`isFinite(${e})`:r.nil)}}function u(t,e,i,s){if(1===t.length)return h(t[0],e,i,s);let o;const a=(0,n.toHash)(t);if(a.array&&a.object){const t=r._`typeof ${e} != "object"`;o=a.null?t:r._`!${e} || ${t}`,delete a.null,delete a.array,delete a.object}else o=r.nil;a.number&&delete a.integer;for(const t in a)o=(0,r.and)(o,h(t,e,i,s));return o}Ee.checkDataType=h,Ee.checkDataTypes=u;const c={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>"string"==typeof t?r._`{type: ${t}}`:r._`{type: ${e}}`};function f(t){const e=function(t){const{gen:e,data:i,schema:r}=t,s=(0,n.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:i,schema:r.type,schemaCode:s,schemaValue:s,parentSchema:r,params:{},it:t}}(t);(0,i.reportError)(e,c)}return Ee.reportTypeError=f,Ee}var Ce,Ae={};function Ne(){if(Ce)return Ae;Ce=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.assignDefaults=void 0;const t=fe(),e=pe();function i(i,r,n){const{gen:s,compositeRule:o,data:a,opts:h}=i;if(void 0===n)return;const u=t._`${a}${(0,t.getProperty)(r)}`;if(o)return void(0,e.checkStrictMode)(i,`default is ignored for: ${u}`);let c=t._`${u} === undefined`;"empty"===h.useDefaults&&(c=t._`${c} || ${u} === null || ${u} === ""`),s.if(c,t._`${u} = ${(0,t.stringify)(n)}`)}return Ae.assignDefaults=function(t,e){const{properties:r,items:n}=t.schema;if("object"===e&&r)for(const e in r)i(t,e,r[e].default);else"array"===e&&Array.isArray(n)&&n.forEach(((e,r)=>i(t,r,e.default)))},Ae}var Te,Me,Re={},De={};function Le(){if(Te)return De;Te=1,Object.defineProperty(De,"__esModule",{value:!0}),De.validateUnion=De.validateArray=De.usePattern=De.callValidateCode=De.schemaProperties=De.allSchemaProperties=De.noPropertyInData=De.propertyInData=De.isOwnProperty=De.hasPropFunc=De.reportMissingProp=De.checkMissingProp=De.checkReportMissingProp=void 0;const t=fe(),e=pe(),i=$e(),r=pe();function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:t._`Object.prototype.hasOwnProperty`})}function s(e,i,r){return t._`${n(e)}.call(${i}, ${r})`}function o(e,i,r,n){const o=t._`${i}${(0,t.getProperty)(r)} === undefined`;return n?(0,t.or)(o,(0,t.not)(s(e,i,r))):o}function a(t){return t?Object.keys(t).filter((t=>"__proto__"!==t)):[]}De.checkReportMissingProp=function(e,i){const{gen:r,data:n,it:s}=e;r.if(o(r,n,i,s.opts.ownProperties),(()=>{e.setParams({missingProperty:t._`${i}`},!0),e.error()}))},De.checkMissingProp=function({gen:e,data:i,it:{opts:r}},n,s){return(0,t.or)(...n.map((n=>(0,t.and)(o(e,i,n,r.ownProperties),t._`${s} = ${n}`))))},De.reportMissingProp=function(t,e){t.setParams({missingProperty:e},!0),t.error()},De.hasPropFunc=n,De.isOwnProperty=s,De.propertyInData=function(e,i,r,n){const o=t._`${i}${(0,t.getProperty)(r)} !== undefined`;return n?t._`${o} && ${s(e,i,r)}`:o},De.noPropertyInData=o,De.allSchemaProperties=a,De.schemaProperties=function(t,i){return a(i).filter((r=>!(0,e.alwaysValidSchema)(t,i[r])))},De.callValidateCode=function({schemaCode:e,data:r,it:{gen:n,topSchemaRef:s,schemaPath:o,errorPath:a},it:h},u,c,f){const l=f?t._`${e}, ${r}, ${s}${o}`:r,d=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,a)],[i.default.parentData,h.parentData],[i.default.parentDataProperty,h.parentDataProperty],[i.default.rootData,i.default.rootData]];h.opts.dynamicRef&&d.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const p=t._`${l}, ${n.object(...d)}`;return c!==t.nil?t._`${u}.call(${c}, ${p})`:t._`${u}(${p})`};const h=t._`new RegExp`;return De.usePattern=function({gen:e,it:{opts:i}},n){const s=i.unicodeRegExp?"u":"",{regExp:o}=i.code,a=o(n,s);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:t._`${"new RegExp"===o.code?h:(0,r.useFunc)(e,o)}(${n}, ${s})`})},De.validateArray=function(i){const{gen:r,data:n,keyword:s,it:o}=i,a=r.name("valid");if(o.allErrors){const t=r.let("valid",!0);return h((()=>r.assign(t,!1))),t}return r.var(a,!0),h((()=>r.break())),a;function h(o){const h=r.const("len",t._`${n}.length`);r.forRange("i",0,h,(n=>{i.subschema({keyword:s,dataProp:n,dataPropType:e.Type.Num},a),r.if((0,t.not)(a),o)}))}},De.validateUnion=function(i){const{gen:r,schema:n,keyword:s,it:o}=i;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((t=>(0,e.alwaysValidSchema)(o,t)))&&!o.opts.unevaluated)return;const a=r.let("valid",!1),h=r.name("_valid");r.block((()=>n.forEach(((e,n)=>{const o=i.subschema({keyword:s,schemaProp:n,compositeRule:!0},h);r.assign(a,t._`${a} || ${h}`),i.mergeValidEvaluated(o,h)||r.if((0,t.not)(a))})))),i.result(a,(()=>i.reset()),(()=>i.error(!0)))},De}function ze(){if(Me)return Re;Me=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.validateKeywordUsage=Re.validSchemaType=Re.funcKeywordCode=Re.macroKeywordCode=void 0;const t=fe(),e=$e(),i=Le(),r=we();function n(e){const{gen:i,data:r,it:n}=e;i.if(n.parentData,(()=>i.assign(r,t._`${n.parentData}[${n.parentDataProperty}]`)))}function s(e,i,r){if(void 0===r)throw new Error(`keyword "${i}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}return Re.macroKeywordCode=function(e,i){const{gen:r,keyword:n,schema:o,parentSchema:a,it:h}=e,u=i.macro.call(h.self,o,a,h),c=s(r,n,u);!1!==h.opts.validateSchema&&h.self.validateSchema(u,!0);const f=r.name("valid");e.subschema({schema:u,schemaPath:t.nil,errSchemaPath:`${h.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},Re.funcKeywordCode=function(o,a){var h;const{gen:u,keyword:c,schema:f,parentSchema:l,$data:d,it:p}=o;!function({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}(p,a);const m=!d&&a.compile?a.compile.call(p.self,f,l,p):a.validate,v=s(u,c,m),y=u.let("valid");function g(r=(a.async?t._`await `:t.nil)){u.assign(y,t._`${r}${(0,i.callValidateCode)(o,v,p.opts.passContext?e.default.this:e.default.self,!("compile"in a&&!d||!1===a.schema))}`,a.modifying)}function $(e){var i;u.if((0,t.not)(null!==(i=a.valid)&&void 0!==i?i:y),e)}o.block$data(y,(function(){if(!1===a.errors)g(),a.modifying&&n(o),$((()=>o.error()));else{const i=a.async?function(){const e=u.let("ruleErrs",null);return u.try((()=>g(t._`await `)),(i=>u.assign(y,!1).if(t._`${i} instanceof ${p.ValidationError}`,(()=>u.assign(e,t._`${i}.errors`)),(()=>u.throw(i))))),e}():function(){const e=t._`${v}.errors`;return u.assign(e,null),g(t.nil),e}();a.modifying&&n(o),$((()=>function(i,n){const{gen:s}=i;s.if(t._`Array.isArray(${n})`,(()=>{s.assign(e.default.vErrors,t._`${e.default.vErrors} === null ? ${n} : ${e.default.vErrors}.concat(${n})`).assign(e.default.errors,t._`${e.default.vErrors}.length`),(0,r.extendErrors)(i)}),(()=>i.error()))}(o,i)))}})),o.ok(null!==(h=a.valid)&&void 0!==h?h:y)},Re.validSchemaType=function(t,e,i=!1){return!e.length||e.some((e=>"array"===e?Array.isArray(t):"object"===e?t&&"object"==typeof t&&!Array.isArray(t):typeof t==e||i&&void 0===t))},Re.validateKeywordUsage=function({schema:t,opts:e,self:i,errSchemaPath:r},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw new Error("ajv implementation error");const o=n.dependencies;if(null==o?void 0:o.some((e=>!Object.prototype.hasOwnProperty.call(t,e))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[s])){const t=`keyword "${s}" value is invalid at path "${r}": `+i.errorsText(n.validateSchema.errors);if("log"!==e.validateSchema)throw new Error(t);i.logger.error(t)}},Re}var Ue,qe={};function Fe(){if(Ue)return qe;Ue=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.extendSubschemaMode=qe.extendSubschemaData=qe.getSubschema=void 0;const t=fe(),e=pe();return qe.getSubschema=function(i,{keyword:r,schemaProp:n,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:h}){if(void 0!==r&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==r){const s=i.schema[r];return void 0===n?{schema:s,schemaPath:t._`${i.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${i.errSchemaPath}/${r}`}:{schema:s[n],schemaPath:t._`${i.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(n)}`,errSchemaPath:`${i.errSchemaPath}/${r}/${(0,e.escapeFragment)(n)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===h)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:h,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},qe.extendSubschemaData=function(i,r,{dataProp:n,dataPropType:s,data:o,dataTypes:a,propertyName:h}){if(void 0!==o&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=r;if(void 0!==n){const{errorPath:o,dataPathArr:a,opts:h}=r;c(u.let("data",t._`${r.data}${(0,t.getProperty)(n)}`,!0)),i.errorPath=t.str`${o}${(0,e.getErrorPath)(n,s,h.jsPropertySyntax)}`,i.parentDataProperty=t._`${n}`,i.dataPathArr=[...a,i.parentDataProperty]}function c(t){i.data=t,i.dataLevel=r.dataLevel+1,i.dataTypes=[],r.definedProperties=new Set,i.parentData=r.data,i.dataNames=[...r.dataNames,t]}void 0!==o&&(c(o instanceof t.Name?o:u.let("data",o,!0)),void 0!==h&&(i.propertyName=h)),a&&(i.dataTypes=a)},qe.extendSubschemaMode=function(t,{jtdDiscriminator:e,jtdMetadata:i,compositeRule:r,createErrors:n,allErrors:s}){void 0!==r&&(t.compositeRule=r),void 0!==n&&(t.createErrors=n),void 0!==s&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=i},qe}var Ve,Be,Ge={};function He(){return Be||(Be=1,Ve=function t(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var r,n,s;if(Array.isArray(e)){if((r=e.length)!=i.length)return!1;for(n=r;0!=n--;)if(!t(e[n],i[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((r=(s=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(i,s[n]))return!1;for(n=r;0!=n--;){var o=s[n];if(!t(e[o],i[o]))return!1}return!0}return e!=e&&i!=i}),Ve}var Ke,Je,We,Ze={exports:{}};function Ye(){if(Ke)return Ze.exports;Ke=1;var t=Ze.exports=function(t,i,r){"function"==typeof i&&(r=i,i={}),e(i,"function"==typeof(r=i.cb||r)?r:r.pre||function(){},r.post||function(){},t,"",t)};function e(i,r,n,s,o,a,h,u,c,f){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var l in r(s,o,a,h,u,c,f),s){var d=s[l];if(Array.isArray(d)){if(l in t.arrayKeywords)for(var p=0;p<d.length;p++)e(i,r,n,d[p],o+"/"+l+"/"+p,a,o,l,s,p)}else if(l in t.propsKeywords){if(d&&"object"==typeof d)for(var m in d)e(i,r,n,d[m],o+"/"+l+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),a,o,l,s,m)}else(l in t.keywords||i.allKeys&&!(l in t.skipKeywords))&&e(i,r,n,d,o+"/"+l,a,o,l,s)}n(s,o,a,h,u,c,f)}}return t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},Ze.exports}function Qe(){if(Je)return Ge;Je=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.getSchemaRefs=Ge.resolveUrl=Ge.normalizeId=Ge._getFullPath=Ge.getFullPath=Ge.inlineRef=void 0;const t=pe(),e=He(),i=Ye(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);Ge.inlineRef=function(t,e=!0){return"boolean"==typeof t||(!0===e?!s(t):!!e&&o(t)<=e)};const n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(t){for(const e in t){if(n.has(e))return!0;const i=t[e];if(Array.isArray(i)&&i.some(s))return!0;if("object"==typeof i&&s(i))return!0}return!1}function o(e){let i=0;for(const n in e){if("$ref"===n)return 1/0;if(i++,!r.has(n)&&("object"==typeof e[n]&&(0,t.eachItem)(e[n],(t=>i+=o(t))),i===1/0))return 1/0}return i}function a(t,e="",i){!1!==i&&(e=c(e));const r=t.parse(e);return h(t,r)}function h(t,e){return t.serialize(e).split("#")[0]+"#"}Ge.getFullPath=a,Ge._getFullPath=h;const u=/#\/?$/;function c(t){return t?t.replace(u,""):""}Ge.normalizeId=c,Ge.resolveUrl=function(t,e,i){return i=c(i),t.resolve(e,i)};const f=/^[a-z_][-a-z0-9._]*$/i;return Ge.getSchemaRefs=function(t,r){if("boolean"==typeof t)return{};const{schemaId:n,uriResolver:s}=this.opts,o=c(t[n]||r),h={"":o},u=a(s,o,!1),l={},d=new Set;return i(t,{allKeys:!0},((t,e,i,r)=>{if(void 0===r)return;const s=u+e;let o=h[r];function a(e){if(e=c(o?(0,this.opts.uriResolver.resolve)(o,e):e),d.has(e))throw m(e);d.add(e);let i=this.refs[e];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?p(t,i.schema,e):e!==c(s)&&("#"===e[0]?(p(t,l[e],e),l[e]=t):this.refs[e]=s),e}function v(t){if("string"==typeof t){if(!f.test(t))throw new Error(`invalid anchor "${t}"`);a.call(this,`#${t}`)}}"string"==typeof t[n]&&(o=a.call(this,t[n])),v.call(this,t.$anchor),v.call(this,t.$dynamicAnchor),h[e]=o})),l;function p(t,i,r){if(void 0!==i&&!e(t,i))throw m(r)}function m(t){return new Error(`reference "${t}" resolves to more than one schema`)}},Ge}function Xe(){if(We)return ee;We=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.getData=ee.KeywordCxt=ee.validateFunctionCode=void 0;const t=be(),e=Ie(),i=Pe(),r=Ie(),n=Ne(),s=ze(),o=Fe(),a=fe(),h=$e(),u=Qe(),c=pe(),f=we();function l({gen:t,validateName:e,schema:i,schemaEnv:r,opts:n},s){n.code.es5?t.func(e,a._`${h.default.data}, ${h.default.valCxt}`,r.$async,(()=>{t.code(a._`"use strict"; ${d(i,n)}`),function(t,e){t.if(h.default.valCxt,(()=>{t.var(h.default.instancePath,a._`${h.default.valCxt}.${h.default.instancePath}`),t.var(h.default.parentData,a._`${h.default.valCxt}.${h.default.parentData}`),t.var(h.default.parentDataProperty,a._`${h.default.valCxt}.${h.default.parentDataProperty}`),t.var(h.default.rootData,a._`${h.default.valCxt}.${h.default.rootData}`),e.dynamicRef&&t.var(h.default.dynamicAnchors,a._`${h.default.valCxt}.${h.default.dynamicAnchors}`)}),(()=>{t.var(h.default.instancePath,a._`""`),t.var(h.default.parentData,a._`undefined`),t.var(h.default.parentDataProperty,a._`undefined`),t.var(h.default.rootData,h.default.data),e.dynamicRef&&t.var(h.default.dynamicAnchors,a._`{}`)}))}(t,n),t.code(s)})):t.func(e,a._`${h.default.data}, ${function(t){return a._`{${h.default.instancePath}="", ${h.default.parentData}, ${h.default.parentDataProperty}, ${h.default.rootData}=${h.default.data}${t.dynamicRef?a._`, ${h.default.dynamicAnchors}={}`:a.nil}}={}`}(n)}`,r.$async,(()=>t.code(d(i,n)).code(s)))}function d(t,e){const i="object"==typeof t&&t[e.schemaId];return i&&(e.code.source||e.code.process)?a._`/*# sourceURL=${i} */`:a.nil}function p({schema:t,self:e}){if("boolean"==typeof t)return!t;for(const i in t)if(e.RULES.all[i])return!0;return!1}function m(t){return"boolean"!=typeof t.schema}function v(t){(0,c.checkUnknownRules)(t),function(t){const{schema:e,errSchemaPath:i,opts:r,self:n}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}(t)}function y(t,i){if(t.opts.jtd)return $(t,[],!1,i);const r=(0,e.getSchemaTypes)(t.schema);$(t,r,!(0,e.coerceAndCheckDataType)(t,r),i)}function g({gen:t,schemaEnv:e,schema:i,errSchemaPath:r,opts:n}){const s=i.$comment;if(!0===n.$comment)t.code(a._`${h.default.self}.logger.log(${s})`);else if("function"==typeof n.$comment){const i=a.str`${r}/$comment`,n=t.scopeValue("root",{ref:e.root});t.code(a._`${h.default.self}.opts.$comment(${s}, ${i}, ${n}.schema)`)}}function $(t,e,n,s){const{gen:o,schema:u,data:f,allErrors:l,opts:d,self:p}=t,{RULES:m}=p;function v(c){(0,i.shouldUseGroup)(u,c)&&(c.type?(o.if((0,r.checkDataType)(c.type,f,d.strictNumbers)),w(t,c),1===e.length&&e[0]===c.type&&n&&(o.else(),(0,r.reportTypeError)(t)),o.endIf()):w(t,c),l||o.if(a._`${h.default.errors} === ${s||0}`))}!u.$ref||!d.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(u,m)?(d.jtd||function(t,e){!t.schemaEnv.meta&&t.opts.strictTypes&&(function(t,e){e.length&&(t.dataTypes.length?(e.forEach((e=>{b(t.dataTypes,e)||_(t,`type "${e}" not allowed by context "${t.dataTypes.join(",")}"`)})),function(t,e){const i=[];for(const r of t.dataTypes)b(e,r)?i.push(r):e.includes("integer")&&"number"===r&&i.push("integer");t.dataTypes=i}(t,e)):t.dataTypes=e)}(t,e),t.opts.allowUnionTypes||function(t,e){e.length>1&&(2!==e.length||!e.includes("null"))&&_(t,"use allowUnionTypes to allow union type keyword")}(t,e),function(t,e){const r=t.self.RULES.all;for(const n in r){const s=r[n];if("object"==typeof s&&(0,i.shouldUseRule)(t.schema,s)){const{type:i}=s.definition;i.length&&!i.some((t=>{return(i=e).includes(r=t)||"number"===r&&i.includes("integer");var i,r}))&&_(t,`missing type "${i.join(",")}" for keyword "${n}"`)}}}(t,t.dataTypes))}(t,e),o.block((()=>{for(const t of m.rules)v(t);v(m.post)}))):o.block((()=>k(t,"$ref",m.all.$ref.definition)))}function w(t,e){const{gen:r,schema:s,opts:{useDefaults:o}}=t;o&&(0,n.assignDefaults)(t,e.type),r.block((()=>{for(const r of e.rules)(0,i.shouldUseRule)(s,r)&&k(t,r.keyword,r.definition,e.type)}))}function b(t,e){return t.includes(e)||"integer"===e&&t.includes("number")}function _(t,e){(0,c.checkStrictMode)(t,e+=` at "${t.schemaEnv.baseId+t.errSchemaPath}" (strictTypes)`,t.opts.strictTypes)}ee.validateFunctionCode=function(e){m(e)&&(v(e),p(e))?function(t){const{schema:e,opts:i,gen:r}=t;l(t,(()=>{i.$comment&&e.$comment&&g(t),function(t){const{schema:e,opts:i}=t;void 0!==e.default&&i.useDefaults&&i.strictSchema&&(0,c.checkStrictMode)(t,"default is ignored in the schema root")}(t),r.let(h.default.vErrors,null),r.let(h.default.errors,0),i.unevaluated&&function(t){const{gen:e,validateName:i}=t;t.evaluated=e.const("evaluated",a._`${i}.evaluated`),e.if(a._`${t.evaluated}.dynamicProps`,(()=>e.assign(a._`${t.evaluated}.props`,a._`undefined`))),e.if(a._`${t.evaluated}.dynamicItems`,(()=>e.assign(a._`${t.evaluated}.items`,a._`undefined`)))}(t),y(t),function(t){const{gen:e,schemaEnv:i,validateName:r,ValidationError:n,opts:s}=t;i.$async?e.if(a._`${h.default.errors} === 0`,(()=>e.return(h.default.data)),(()=>e.throw(a._`new ${n}(${h.default.vErrors})`))):(e.assign(a._`${r}.errors`,h.default.vErrors),s.unevaluated&&function({gen:t,evaluated:e,props:i,items:r}){i instanceof a.Name&&t.assign(a._`${e}.props`,i),r instanceof a.Name&&t.assign(a._`${e}.items`,r)}(t),e.return(a._`${h.default.errors} === 0`))}(t)}))}(e):l(e,(()=>(0,t.topBoolOrEmptySchema)(e)))};class E{constructor(t,e,i){if((0,s.validateKeywordUsage)(t,e,i),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=i,this.data=t.data,this.schema=t.schema[i],this.$data=e.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(t,this.schema,i,this.$data),this.schemaType=e.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=e,this.$data)this.schemaCode=t.gen.const("vSchema",O(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:!1!==e.errors)&&(this.errsCount=t.gen.const("_errs",h.default.errors))}result(t,e,i){this.failResult((0,a.not)(t),e,i)}failResult(t,e,i){this.gen.if(t),i?i():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,e){this.failResult((0,a.not)(t),void 0,e)}fail(t){if(void 0===t)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:e}=this;this.fail(a._`${e} !== undefined && (${(0,a.or)(this.invalid$data(),t)})`)}error(t,e,i){if(e)return this.setParams(e),this._error(t,i),void this.setParams({});this._error(t,i)}_error(t,e){(t?f.reportExtraError:f.reportError)(this,this.def.error,e)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,e){e?Object.assign(this.params,t):this.params=t}block$data(t,e,i=a.nil){this.gen.block((()=>{this.check$data(t,i),e()}))}check$data(t=a.nil,e=a.nil){if(!this.$data)return;const{gen:i,schemaCode:r,schemaType:n,def:s}=this;i.if((0,a.or)(a._`${r} === undefined`,e)),t!==a.nil&&i.assign(t,!0),(n.length||s.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),t!==a.nil&&i.assign(t,!1)),i.else()}invalid$data(){const{gen:t,schemaCode:e,schemaType:i,def:n,it:s}=this;return(0,a.or)(function(){if(i.length){if(!(e instanceof a.Name))throw new Error("ajv implementation error");const t=Array.isArray(i)?i:[i];return a._`${(0,r.checkDataTypes)(t,e,s.opts.strictNumbers,r.DataType.Wrong)}`}return a.nil}(),function(){if(n.validateSchema){const i=t.scopeValue("validate$data",{ref:n.validateSchema});return a._`!${i}(${e})`}return a.nil}())}subschema(e,i){const r=(0,o.getSubschema)(this.it,e);(0,o.extendSubschemaData)(r,this.it,e),(0,o.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return function(e,i){m(e)&&(v(e),p(e))?function(t,e){const{schema:i,gen:r,opts:n}=t;n.$comment&&i.$comment&&g(t),function(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,u.resolveUrl)(t.opts.uriResolver,t.baseId,e))}(t),function(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}(t);const s=r.const("_errs",h.default.errors);y(t,s),r.var(e,a._`${s} === ${h.default.errors}`)}(e,i):(0,t.boolOrEmptySchema)(e,i)}(n,i),n}mergeEvaluated(t,e){const{it:i,gen:r}=this;i.opts.unevaluated&&(!0!==i.props&&void 0!==t.props&&(i.props=c.mergeEvaluated.props(r,t.props,i.props,e)),!0!==i.items&&void 0!==t.items&&(i.items=c.mergeEvaluated.items(r,t.items,i.items,e)))}mergeValidEvaluated(t,e){const{it:i,gen:r}=this;if(i.opts.unevaluated&&(!0!==i.props||!0!==i.items))return r.if(e,(()=>this.mergeEvaluated(t,a.Name))),!0}}function k(t,e,i,r){const n=new E(t,i,e);"code"in i?i.code(n,r):n.$data&&i.validate?(0,s.funcKeywordCode)(n,i):"macro"in i?(0,s.macroKeywordCode)(n,i):(i.compile||i.validate)&&(0,s.funcKeywordCode)(n,i)}ee.KeywordCxt=E;const S=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function O(t,{dataLevel:e,dataNames:i,dataPathArr:r}){let n,s;if(""===t)return h.default.rootData;if("/"===t[0]){if(!S.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,s=h.default.rootData}else{const o=x.exec(t);if(!o)throw new Error(`Invalid JSON-pointer: ${t}`);const a=+o[1];if(n=o[2],"#"===n){if(a>=e)throw new Error(f("property/index",a));return r[e-a]}if(a>e)throw new Error(f("data",a));if(s=i[e-a],!n)return s}let o=s;const u=n.split("/");for(const t of u)t&&(s=a._`${s}${(0,a.getProperty)((0,c.unescapeJsonPointer)(t))}`,o=a._`${o} && ${s}`);return o;function f(t,i){return`Cannot access ${t} ${i} levels up, current level is ${e}`}}return ee.getData=O,ee}var ti,ei={};function ii(){if(ti)return ei;ti=1,Object.defineProperty(ei,"__esModule",{value:!0});class t extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}return ei.default=t,ei}var ri,ni={};function si(){if(ri)return ni;ri=1,Object.defineProperty(ni,"__esModule",{value:!0});const t=Qe();class e extends Error{constructor(e,i,r,n){super(n||`can't resolve reference ${r} from id ${i}`),this.missingRef=(0,t.resolveUrl)(e,i,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}return ni.default=e,ni}var oi,ai={};function hi(){if(oi)return ai;oi=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.resolveSchema=ai.getCompilingSchema=ai.resolveRef=ai.compileSchema=ai.SchemaEnv=void 0;const t=fe(),e=ii(),i=$e(),r=Qe(),n=pe(),s=Xe();class o{constructor(t){var e;let i;this.refs={},this.dynamicAnchors={},"object"==typeof t.schema&&(i=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(e=t.baseId)&&void 0!==e?e:(0,r.normalizeId)(null==i?void 0:i[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null==i?void 0:i.$async,this.refs={}}}function a(n){const o=u.call(this,n);if(o)return o;const a=(0,r.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:h,lines:c}=this.opts.code,{ownProperties:f}=this.opts,l=new t.CodeGen(this.scope,{es5:h,lines:c,ownProperties:f});let d;n.$async&&(d=l.scopeValue("Error",{ref:e.default,code:t._`require("ajv/dist/runtime/validation_error").default`}));const p=l.scopeName("validate");n.validateName=p;const m={gen:l,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:n.schema,code:(0,t.stringify)(n.schema)}:{ref:n.schema}),validateName:p,ValidationError:d,schema:n.schema,schemaEnv:n,rootId:a,baseId:n.baseId||a,schemaPath:t.nil,errSchemaPath:n.schemaPath||(this.opts.jtd?"":"#"),errorPath:t._`""`,opts:this.opts,self:this};let v;try{this._compilations.add(n),(0,s.validateFunctionCode)(m),l.optimize(this.opts.code.optimize);const e=l.toString();v=`${l.scopeRefs(i.default.scope)}return ${e}`,this.opts.code.process&&(v=this.opts.code.process(v,n));const r=new Function(`${i.default.self}`,`${i.default.scope}`,v)(this,this.scope.get());if(this.scope.value(p,{ref:r}),r.errors=null,r.schema=n.schema,r.schemaEnv=n,n.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:p,validateCode:e,scopeValues:l._values}),this.opts.unevaluated){const{props:e,items:i}=m;r.evaluated={props:e instanceof t.Name?void 0:e,items:i instanceof t.Name?void 0:i,dynamicProps:e instanceof t.Name,dynamicItems:i instanceof t.Name},r.source&&(r.source.evaluated=(0,t.stringify)(r.evaluated))}return n.validate=r,n}catch(t){throw delete n.validate,delete n.validateName,v&&this.logger.error("Error compiling schema, function code:",v),t}finally{this._compilations.delete(n)}}function h(t){return(0,r.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:a.call(this,t)}function u(t){for(const r of this._compilations)if((e=r).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return r;var e,i}function c(t,e){let i;for(;"string"==typeof(i=this.refs[e]);)e=i;return i||this.schemas[e]||f.call(this,t,e)}function f(t,e){const i=this.opts.uriResolver.parse(e),n=(0,r._getFullPath)(this.opts.uriResolver,i);let s=(0,r.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===s)return d.call(this,i,t);const h=(0,r.normalizeId)(n),u=this.refs[h]||this.schemas[h];if("string"==typeof u){const e=f.call(this,t,u);if("object"!=typeof(null==e?void 0:e.schema))return;return d.call(this,i,e)}if("object"==typeof(null==u?void 0:u.schema)){if(u.validate||a.call(this,u),h===(0,r.normalizeId)(e)){const{schema:e}=u,{schemaId:i}=this.opts,n=e[i];return n&&(s=(0,r.resolveUrl)(this.opts.uriResolver,s,n)),new o({schema:e,schemaId:i,root:t,baseId:s})}return d.call(this,i,u)}}ai.SchemaEnv=o,ai.compileSchema=a,ai.resolveRef=function(t,e,i){var n;i=(0,r.resolveUrl)(this.opts.uriResolver,e,i);const s=t.refs[i];if(s)return s;let a=c.call(this,t,i);if(void 0===a){const r=null===(n=t.localRefs)||void 0===n?void 0:n[i],{schemaId:s}=this.opts;r&&(a=new o({schema:r,schemaId:s,root:t,baseId:e}))}return void 0!==a?t.refs[i]=h.call(this,a):void 0},ai.getCompilingSchema=u,ai.resolveSchema=f;const l=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function d(t,{baseId:e,schema:i,root:s}){var a;if("/"!==(null===(a=t.fragment)||void 0===a?void 0:a[0]))return;for(const s of t.fragment.slice(1).split("/")){if("boolean"==typeof i)return;const t=i[(0,n.unescapeFragment)(s)];if(void 0===t)return;const o="object"==typeof(i=t)&&i[this.opts.schemaId];!l.has(s)&&o&&(e=(0,r.resolveUrl)(this.opts.uriResolver,e,o))}let h;if("boolean"!=typeof i&&i.$ref&&!(0,n.schemaHasRulesButRef)(i,this.RULES)){const t=(0,r.resolveUrl)(this.opts.uriResolver,e,i.$ref);h=f.call(this,s,t)}const{schemaId:u}=this.opts;return h=h||new o({schema:i,schemaId:u,root:s,baseId:e}),h.schema!==h.root.schema?h:void 0}return ai}var ui,ci,fi,li,di,pi,mi,vi={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},yi={},gi={exports:{}};function $i(){if(ci)return ui;ci=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),r=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),n=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(t){let e="",i=0,r=0;for(r=0;r<t.length;r++)if(i=t[r].charCodeAt(0),48!==i){if(!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(i=t[r].charCodeAt(0),!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102))return"";e+=t[r]}return e}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(t){return t.length=0,!0}function h(t,e,i){if(t.length){const r=s(t);if(""===r)return i.error=!0,!1;e.push(r),t.length=0}return!0}function u(t){if(function(t){let e=0;for(let i=0;i<t.length;i++)":"===t[i]&&e++;return e}(t)<2)return{host:t,isIPV6:!1};const e=function(t){let e=0;const i={error:!1,address:"",zone:""},r=[],n=[];let o=!1,u=!1,c=h;for(let s=0;s<t.length;s++){const h=t[s];if("["!==h&&"]"!==h)if(":"!==h)if("%"===h){if(!c(n,r,i))break;c=a}else n.push(h);else{if(!0===o&&(u=!0),!c(n,r,i))break;if(++e>7){i.error=!0;break}s>0&&":"===t[s-1]&&(o=!0),r.push(":")}}return n.length&&(c===a?i.zone=n.join(""):r.push(u?n.join(""):s(n))),i.address=r.join(""),i}(t);if(e.error)return{host:t,isIPV6:!1};{let t=e.address,i=e.address;return e.zone&&(t+="%"+e.zone,i+="%25"+e.zone),{host:t,isIPV6:!0,escapedHost:i}}}const c={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,l=/[@/?#]/g;function d(t,e){const i=e?l:f;return i.lastIndex=0,t.replace(i,(t=>c[t]))}return ui={nonSimpleDomain:o,recomposeAuthority:function(t){const i=[];if(void 0!==t.userinfo&&(i.push(t.userinfo),i.push("@")),void 0!==t.host){let r=unescape(t.host);if(!e(r)){const t=u(r);r=!0===t.isIPV6?`[${t.escapedHost}]`:d(r,!1)}i.push(r)}return"number"!=typeof t.port&&"string"!=typeof t.port||(i.push(":"),i.push(String(t.port))),i.length?i.join(""):void 0},reescapeHostDelimiters:d,normalizePercentEncoding:function(t,e=!1){if(-1===t.indexOf("%"))return t;let n="";for(let s=0;s<t.length;s++){if("%"===t[s]&&s+2<t.length){const o=t.slice(s+1,s+3);if(i(o)){const t=o.toUpperCase(),i=String.fromCharCode(parseInt(t,16));e&&r(i)?n+=i:n+="%"+t,s+=2;continue}}n+=t[s]}return n},normalizePathEncoding:function(t){let e="";for(let s=0;s<t.length;s++){if("%"===t[s]&&s+2<t.length){const n=t.slice(s+1,s+3);if(i(n)){const t=n.toUpperCase(),i=String.fromCharCode(parseInt(t,16));"."!==i&&r(i)?e+=i:e+="%"+t,s+=2;continue}}n(t[s])?e+=t[s]:e+=escape(t[s])}return e},escapePreservingEscapes:function(t){let e="";for(let r=0;r<t.length;r++){if("%"===t[r]&&r+2<t.length){const n=t.slice(r+1,r+3);if(i(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e},removeDotSegments:function(t){let e=t;const i=[];let r=-1,n=0;for(;n=e.length;){if(1===n){if("."===e)break;if("/"===e){i.push("/");break}i.push(e);break}if(2===n){if("."===e[0]){if("."===e[1])break;if("/"===e[1]){e=e.slice(2);continue}}else if("/"===e[0]&&("."===e[1]||"/"===e[1])){i.push("/");break}}else if(3===n&&"/.."===e){0!==i.length&&i.pop(),i.push("/");break}if("."===e[0]){if("."===e[1]){if("/"===e[2]){e=e.slice(3);continue}}else if("/"===e[1]){e=e.slice(2);continue}}else if("/"===e[0]&&"."===e[1]){if("/"===e[2]){e=e.slice(2);continue}if("."===e[2]&&"/"===e[3]){e=e.slice(3),0!==i.length&&i.pop();continue}}if(-1===(r=e.indexOf("/",1))){i.push(e);break}i.push(e.slice(0,r)),e=e.slice(r)}return i.join("")},isIPv4:e,isUUID:t,normalizeIPv6:u,stringArrayToHexStripped:s},ui}function wi(){if(pi)return yi;pi=1,Object.defineProperty(yi,"__esModule",{value:!0});const t=function(){if(di)return gi.exports;di=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:i,normalizePercentEncoding:r,normalizePathEncoding:n,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:h}=$i(),{SCHEMES:u,getSchemeHandler:c}=function(){if(li)return fi;li=1;const{isUUID:t}=$i(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=["http","https","ws","wss","urn","urn:uuid"];function r(t){return!0===t.secure||!1!==t.secure&&!!t.scheme&&!(3!==t.scheme.length||"w"!==t.scheme[0]&&"W"!==t.scheme[0]||"s"!==t.scheme[1]&&"S"!==t.scheme[1]||"s"!==t.scheme[2]&&"S"!==t.scheme[2])}function n(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function s(t){const e="https"===String(t.scheme).toLowerCase();return t.port!==(e?443:80)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}const o={scheme:"http",domainHost:!0,parse:n,serialize:s},a={scheme:"ws",domainHost:!0,parse:function(t){return t.secure=r(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(t){if(t.port!==(r(t)?443:80)&&""!==t.port||(t.port=void 0),"boolean"==typeof t.secure&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){const[e,i]=t.resourceName.split("?");t.path=e&&"/"!==e?e:void 0,t.query=i,t.resourceName=void 0}return t.fragment=void 0,t}},h={http:o,https:{scheme:"https",domainHost:o.domainHost,parse:n,serialize:s},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(t,i){if(!t.path)return t.error="URN can not be parsed",t;const r=t.path.match(e);if(r){const e=i.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];const n=u(`${e}:${i.nid||t.nid}`);t.path=void 0,n&&(t=n.parse(t,i))}else t.error=t.error||"URN can not be parsed.";return t},serialize:function(t,e){if(void 0===t.nid)throw new Error("URN without nid cannot be serialized");const i=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),n=u(`${i}:${e.nid||r}`);n&&(t=n.serialize(t,e));const s=t;return s.path=`${r||e.nid}:${t.nss}`,e.skipEscape=!0,s},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,i){const r=e;return r.uuid=r.nss,r.nss=void 0,i.tolerant||r.uuid&&t(r.uuid)||(r.error=r.error||"UUID is not valid."),r},serialize:function(t){const e=t;return e.nss=(t.uuid||"").toLowerCase(),e},skipNormalize:!0}};function u(t){return t&&(h[t]||h[t.toLowerCase()])||void 0}return Object.setPrototypeOf(h,null),fi={wsIsSecure:r,SCHEMES:h,isValidSchemeName:function(t){return-1!==i.indexOf(t)},getSchemeHandler:u}}();function f(t,i,r,n){const s={};return n||(t=y(l(t,r),r),i=y(l(i,r),r)),!(r=r||{}).tolerant&&i.scheme?(s.scheme=i.scheme,s.userinfo=i.userinfo,s.host=i.host,s.port=i.port,s.path=e(i.path||""),s.query=i.query):(void 0!==i.userinfo||void 0!==i.host||void 0!==i.port?(s.userinfo=i.userinfo,s.host=i.host,s.port=i.port,s.path=e(i.path||""),s.query=i.query):(i.path?("/"===i.path[0]?s.path=e(i.path):(s.path=void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?t.path.slice(0,t.path.lastIndexOf("/")+1)+i.path:i.path:"/"+i.path,s.path=e(s.path)),s.query=i.query):(s.path=t.path,s.query=void 0!==i.query?i.query:t.query),s.userinfo=t.userinfo,s.host=t.host,s.port=t.port),s.scheme=t.scheme),s.fragment=i.fragment,s}function l(t,n){const o={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},a=Object.assign({},n),h=[],u=c(a.scheme||o.scheme);u&&u.serialize&&u.serialize(o,a),void 0!==o.path&&(a.skipEscape?o.path=r(o.path):(o.path=s(o.path),void 0!==o.scheme&&(o.path=o.path.split("%3A").join(":")))),"suffix"!==a.reference&&o.scheme&&h.push(o.scheme,":");const f=i(o);if(void 0!==f&&("suffix"!==a.reference&&h.push("//"),h.push(f),o.path&&"/"!==o.path[0]&&h.push("/")),void 0!==o.path){let t=o.path;a.absolutePath||u&&u.absolutePath||(t=e(t)),void 0===f&&"/"===t[0]&&"/"===t[1]&&(t="/%2F"+t.slice(2)),h.push(t)}return void 0!==o.query&&h.push("?",o.query),void 0!==o.fragment&&h.push("#",o.fragment),h.join("")}const d=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,p=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,m=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function v(e,i){const r=Object.assign({},i),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let u=!1,f=!1;"suffix"===r.reference&&(e=r.scheme?r.scheme+":"+e:"//"+e);const l=e.match(p);null!==l&&-1!==l[1].indexOf("\\")&&(s.error="URI authority must not contain a literal backslash.",u=!0);const v=e.match(m);if(null!==v){const t=v[1],e=t.replace(/[\t\n\r]/g,"");e.length>=2&&("//"!==e.slice(0,2)?(s.error=s.error||"URI authority must not contain a literal backslash.",u=!0):t.length!==e.length&&(s.error=s.error||"URI authority introducer must not contain whitespace.",u=!0))}const y=e.match(d);if(y){s.scheme=y[1],s.userinfo=y[3],s.host=y[4],s.port=parseInt(y[5],10),s.path=y[6]||"",s.query=y[7],s.fragment=y[8],isNaN(s.port)&&(s.port=y[5]);const i=function(t,e){return void 0!==e[2]&&t.path&&"/"!==t.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof t.port&&(t.port<0||t.port>65535)?"URI port is malformed.":void 0}(s,y);if(void 0!==i&&(s.error=s.error||i,u=!0),s.host)if(!1===a(s.host)){const e=t(s.host);s.host=e.host.toLowerCase(),f=e.isIPV6}else f=!0;s.reference=void 0!==s.scheme||void 0!==s.userinfo||void 0!==s.host||void 0!==s.port||void 0!==s.query||s.path?void 0===s.scheme?"relative":void 0===s.fragment?"absolute":"uri":"same-document",r.reference&&"suffix"!==r.reference&&r.reference!==s.reference&&(s.error=s.error||"URI is not a "+r.reference+" reference.");const l=c(r.scheme||s.scheme);if(!(r.unicodeSupport||l&&l.unicodeSupport)&&s.host&&(r.domainHost||l&&l.domainHost)&&!1===f&&h(s.host))try{s.host=new URL("http://"+s.host).hostname}catch(t){s.error=s.error||"Host's domain name can not be converted to ASCII: "+t}if((!l||l&&!l.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==s.scheme&&(s.scheme=unescape(s.scheme)),void 0!==s.host&&(s.host=o(unescape(s.host),f))),s.path&&(s.path=n(s.path)),s.fragment))try{s.fragment=encodeURI(decodeURIComponent(s.fragment))}catch{s.error=s.error||"URI malformed"}l&&l.parse&&l.parse(s,r)}else s.error=s.error||"URI can not be parsed.";return{parsed:s,malformedAuthorityOrPort:u}}function y(t,e){return v(t,e).parsed}function g(t,e){const{parsed:i,malformedAuthorityOrPort:r}=v(t,e);return{normalized:r?t:l(i,e),malformedAuthorityOrPort:r}}function $(t,e){if("string"==typeof t){const{normalized:i,malformedAuthorityOrPort:r}=g(t,e);return r?void 0:i}if("object"==typeof t)return l(t,e)}const w={SCHEMES:u,normalize:function(t,e){return"string"==typeof t?t=function(t,e){return g(t,e).normalized}(t,e):"object"==typeof t&&(t=y(l(t,e),e)),t},resolve:function(t,e,i){const r=i?Object.assign({scheme:"null"},i):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:s}=v(t,r),{parsed:o,malformedAuthorityOrPort:a}=v(e,r);if(s||a)throw new Error(n.error||o.error||"URI is malformed.");const h=f(n,o,r,!0);return r.skipEscape=!0,l(h,r)},resolveComponent:f,equal:function(t,e,i){const r=$(t,i),n=$(e,i);return void 0!==r&&void 0!==n&&r.toLowerCase()===n.toLowerCase()},serialize:l,parse:y};return gi.exports=w,gi.exports.default=w,gi.exports.fastUri=w,gi.exports}();return t.code='require("ajv/dist/runtime/uri").default',yi.default=t,yi}function bi(){return mi||(mi=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Xe();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var i=fe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const r=ii(),n=si(),s=Se(),o=hi(),a=fe(),h=Qe(),u=Ie(),c=pe(),f=vi,l=wi(),d=(t,e)=>new RegExp(t,e);d.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function g(t){var e,i,r,n,s,o,a,h,u,c,f,p,m,v,y,g,$,w,b,_,E,k,S,x,O;const j=t.strict,P=null===(e=t.code)||void 0===e?void 0:e.optimize,I=!0===P||void 0===P?1:P||0,C=null!==(r=null===(i=t.code)||void 0===i?void 0:i.regExp)&&void 0!==r?r:d,A=null!==(n=t.uriResolver)&&void 0!==n?n:l.default;return{strictSchema:null===(o=null!==(s=t.strictSchema)&&void 0!==s?s:j)||void 0===o||o,strictNumbers:null===(h=null!==(a=t.strictNumbers)&&void 0!==a?a:j)||void 0===h||h,strictTypes:null!==(c=null!==(u=t.strictTypes)&&void 0!==u?u:j)&&void 0!==c?c:"log",strictTuples:null!==(p=null!==(f=t.strictTuples)&&void 0!==f?f:j)&&void 0!==p?p:"log",strictRequired:null!==(v=null!==(m=t.strictRequired)&&void 0!==m?m:j)&&void 0!==v&&v,code:t.code?{...t.code,optimize:I,regExp:C}:{optimize:I,regExp:C},loopRequired:null!==(y=t.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(g=t.loopEnum)&&void 0!==g?g:200,meta:null===($=t.meta)||void 0===$||$,messages:null===(w=t.messages)||void 0===w||w,inlineRefs:null===(b=t.inlineRefs)||void 0===b||b,schemaId:null!==(_=t.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(E=t.addUsedSchema)||void 0===E||E,validateSchema:null===(k=t.validateSchema)||void 0===k||k,validateFormats:null===(S=t.validateFormats)||void 0===S||S,unicodeRegExp:null===(x=t.unicodeRegExp)||void 0===x||x,int32range:null===(O=t.int32range)||void 0===O||O,uriResolver:A}}class ${constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...g(t)};const{es5:e,lines:i}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:e,lines:i}),this.logger=function(t){if(!1===t)return x;if(void 0===t)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}(t.logger);const r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,s.getRules)(),w.call(this,v,t,"NOT SUPPORTED"),w.call(this,y,t,"DEPRECATED","warn"),this._metaOpts=S.call(this),t.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&k.call(this,t.keywords),"object"==typeof t.meta&&this.addMetaSchema(t.meta),_.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:e,schemaId:i}=this.opts;let r=f;"id"===i&&(r={...f},r.id=r.$id,delete r.$id),e&&t&&this.addMetaSchema(r,r[i],!1)}defaultMeta(){const{meta:t,schemaId:e}=this.opts;return this.opts.defaultMeta="object"==typeof t?t[e]||t:void 0}validate(t,e){let i;if("string"==typeof t){if(i=this.getSchema(t),!i)throw new Error(`no schema with key or ref "${t}"`)}else i=this.compile(t);const r=i(e);return"$async"in i||(this.errors=i.errors),r}compile(t,e){const i=this._addSchema(t,e);return i.validate||this._compileSchemaEnv(i)}compileAsync(t,e){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:i}=this.opts;return r.call(this,t,e);async function r(t,e){await s.call(this,t.$schema);const i=this._addSchema(t,e);return i.validate||o.call(this,i)}async function s(t){t&&!this.getSchema(t)&&await r.call(this,{$ref:t},!0)}async function o(t){try{return this._compileSchemaEnv(t)}catch(e){if(!(e instanceof n.default))throw e;return a.call(this,e),await h.call(this,e.missingSchema),o.call(this,t)}}function a({missingSchema:t,missingRef:e}){if(this.refs[t])throw new Error(`AnySchema ${t} is loaded but ${e} cannot be resolved`)}async function h(t){const i=await u.call(this,t);this.refs[t]||await s.call(this,i.$schema),this.refs[t]||this.addSchema(i,t,e)}async function u(t){const e=this._loading[t];if(e)return e;try{return await(this._loading[t]=i(t))}finally{delete this._loading[t]}}}addSchema(t,e,i,r=this.opts.validateSchema){if(Array.isArray(t)){for(const e of t)this.addSchema(e,void 0,i,r);return this}let n;if("object"==typeof t){const{schemaId:e}=this.opts;if(n=t[e],void 0!==n&&"string"!=typeof n)throw new Error(`schema ${e} must be string`)}return e=(0,h.normalizeId)(e||n),this._checkUnique(e),this.schemas[e]=this._addSchema(t,i,e,r,!0),this}addMetaSchema(t,e,i=this.opts.validateSchema){return this.addSchema(t,e,!0,i),this}validateSchema(t,e){if("boolean"==typeof t)return!0;let i;if(i=t.$schema,void 0!==i&&"string"!=typeof i)throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(i,t);if(!r&&e){const t="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(t);this.logger.error(t)}return r}getSchema(t){let e;for(;"string"==typeof(e=b.call(this,t));)t=e;if(void 0===e){const{schemaId:i}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:i});if(e=o.resolveSchema.call(this,r,t),!e)return;this.refs[t]=e}return e.validate||this._compileSchemaEnv(e)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const e=b.call(this,t);return"object"==typeof e&&this._cache.delete(e.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{this._cache.delete(t);let e=t[this.opts.schemaId];return e&&(e=(0,h.normalizeId)(e),delete this.schemas[e],delete this.refs[e]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const e of t)this.addKeyword(e);return this}addKeyword(t,e){let i;if("string"==typeof t)i=t,"object"==typeof e&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),e.keyword=i);else{if("object"!=typeof t||void 0!==e)throw new Error("invalid addKeywords parameters");if(i=(e=t).keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(j.call(this,i,e),!e)return(0,c.eachItem)(i,(t=>P.call(this,t))),this;C.call(this,e);const r={...e,type:(0,u.getJSONTypes)(e.type),schemaType:(0,u.getJSONTypes)(e.schemaType)};return(0,c.eachItem)(i,0===r.type.length?t=>P.call(this,t,r):t=>r.type.forEach((e=>P.call(this,t,r,e)))),this}getKeyword(t){const e=this.RULES.all[t];return"object"==typeof e?e.definition:!!e}removeKeyword(t){const{RULES:e}=this;delete e.keywords[t],delete e.all[t];for(const i of e.rules){const e=i.rules.findIndex((e=>e.keyword===t));e>=0&&i.rules.splice(e,1)}return this}addFormat(t,e){return"string"==typeof e&&(e=new RegExp(e)),this.formats[t]=e,this}errorsText(t=this.errors,{separator:e=", ",dataVar:i="data"}={}){return t&&0!==t.length?t.map((t=>`${i}${t.instancePath} ${t.message}`)).reduce(((t,i)=>t+e+i)):"No errors"}$dataMetaSchema(t,e){const i=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const r of e){const e=r.split("/").slice(1);let n=t;for(const t of e)n=n[t];for(const t in i){const e=i[t];if("object"!=typeof e)continue;const{$data:r}=e.definition,s=n[t];r&&s&&(n[t]=N(s))}}return t}_removeAllSchemas(t,e){for(const i in t){const r=t[i];e&&!e.test(i)||("string"==typeof r?delete t[i]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[i]))}}_addSchema(t,e,i,r=this.opts.validateSchema,n=this.opts.addUsedSchema){let s;const{schemaId:a}=this.opts;if("object"==typeof t)s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof t)throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(void 0!==u)return u;i=(0,h.normalizeId)(s||i);const c=h.getSchemaRefs.call(this,t,i);return u=new o.SchemaEnv({schema:t,schemaId:a,meta:e,baseId:i,localRefs:c}),this._cache.set(u.schema,u),n&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=u),r&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):o.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const e=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,t)}finally{this.opts=e}}}function w(t,e,i,r="error"){for(const n in t)n in e&&this.logger[r](`${i}: option ${n}. ${t[n]}`)}function b(t){return t=(0,h.normalizeId)(t),this.schemas[t]||this.refs[t]}function _(){const t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(const e in t)this.addSchema(t[e],e)}function E(){for(const t in this.opts.formats){const e=this.opts.formats[t];e&&this.addFormat(t,e)}}function k(t){if(Array.isArray(t))this.addVocabulary(t);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const e in t){const i=t[e];i.keyword||(i.keyword=e),this.addKeyword(i)}}}function S(){const t={...this.opts};for(const e of p)delete t[e];return t}$.ValidationError=r.default,$.MissingRefError=n.default,t.default=$;const x={log(){},warn(){},error(){}},O=/^[a-z_$][a-z0-9_$:-]*$/i;function j(t,e){const{RULES:i}=this;if((0,c.eachItem)(t,(t=>{if(i.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!O.test(t))throw new Error(`Keyword ${t} has invalid name`)})),e&&e.$data&&!("code"in e)&&!("validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function P(t,e,i){var r;const n=null==e?void 0:e.post;if(i&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=n?s.post:s.rules.find((({type:t})=>t===i));if(o||(o={type:i,rules:[]},s.rules.push(o)),s.keywords[t]=!0,!e)return;const a={keyword:t,definition:{...e,type:(0,u.getJSONTypes)(e.type),schemaType:(0,u.getJSONTypes)(e.schemaType)}};e.before?I.call(this,o,a,e.before):o.rules.push(a),s.all[t]=a,null===(r=e.implements)||void 0===r||r.forEach((t=>this.addKeyword(t)))}function I(t,e,i){const r=t.rules.findIndex((t=>t.keyword===i));r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${i} is not defined`))}function C(t){let{metaSchema:e}=t;void 0!==e&&(t.$data&&this.opts.$data&&(e=N(e)),t.validateSchema=this.compile(e,!0))}const A={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function N(t){return{anyOf:[t,A]}}}(te)),te}var _i,Ei={},ki={},Si={};function xi(){return _i||(_i=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.default={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}),Si}var Oi,ji,Pi={};function Ii(){if(Oi)return Pi;Oi=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.callRef=Pi.getValidate=void 0;const t=si(),e=Le(),i=fe(),r=$e(),n=hi(),s=pe(),o={keyword:"$ref",schemaType:"string",code(e){const{gen:r,schema:s,it:o}=e,{baseId:u,schemaEnv:c,validateName:f,opts:l,self:d}=o,{root:p}=c;if(("#"===s||"#/"===s)&&u===p.baseId)return function(){if(c===p)return h(e,f,c,c.$async);const t=r.scopeValue("root",{ref:p});return h(e,i._`${t}.validate`,p,p.$async)}();const m=n.resolveRef.call(d,p,u,s);if(void 0===m)throw new t.default(o.opts.uriResolver,u,s);return m instanceof n.SchemaEnv?function(t){const i=a(e,t);h(e,i,t,t.$async)}(m):function(t){const n=r.scopeValue("schema",!0===l.code.source?{ref:t,code:(0,i.stringify)(t)}:{ref:t}),o=r.name("valid"),a=e.subschema({schema:t,dataTypes:[],schemaPath:i.nil,topSchemaRef:n,errSchemaPath:s},o);e.mergeEvaluated(a),e.ok(o)}(m)}};function a(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):i._`${r.scopeValue("wrapper",{ref:e})}.validate`}function h(t,n,o,a){const{gen:h,it:u}=t,{allErrors:c,schemaEnv:f,opts:l}=u,d=l.passContext?r.default.this:i.nil;function p(t){const e=i._`${t}.errors`;h.assign(r.default.vErrors,i._`${r.default.vErrors} === null ? ${e} : ${r.default.vErrors}.concat(${e})`),h.assign(r.default.errors,i._`${r.default.vErrors}.length`)}function m(t){var e;if(!u.opts.unevaluated)return;const r=null===(e=null==o?void 0:o.validate)||void 0===e?void 0:e.evaluated;if(!0!==u.props)if(r&&!r.dynamicProps)void 0!==r.props&&(u.props=s.mergeEvaluated.props(h,r.props,u.props));else{const e=h.var("props",i._`${t}.evaluated.props`);u.props=s.mergeEvaluated.props(h,e,u.props,i.Name)}if(!0!==u.items)if(r&&!r.dynamicItems)void 0!==r.items&&(u.items=s.mergeEvaluated.items(h,r.items,u.items));else{const e=h.var("items",i._`${t}.evaluated.items`);u.items=s.mergeEvaluated.items(h,e,u.items,i.Name)}}a?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=h.let("valid");h.try((()=>{h.code(i._`await ${(0,e.callValidateCode)(t,n,d)}`),m(n),c||h.assign(r,!0)}),(t=>{h.if(i._`!(${t} instanceof ${u.ValidationError})`,(()=>h.throw(t))),p(t),c||h.assign(r,!1)})),t.ok(r)}():t.result((0,e.callValidateCode)(t,n,d),(()=>m(n)),(()=>p(n)))}return Pi.getValidate=a,Pi.callRef=h,Pi.default=o,Pi}function Ci(){return ji||(ji=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",xi().default,Ii().default]),ki}var Ai,Ni={},Ti={};function Mi(){if(Ai)return Ti;Ai=1,Object.defineProperty(Ti,"__esModule",{value:!0});const t=fe(),e=t.operators,i={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},r={message:({keyword:e,schemaCode:r})=>t.str`must be ${i[e].okStr} ${r}`,params:({keyword:e,schemaCode:r})=>t._`{comparison: ${i[e].okStr}, limit: ${r}}`},n={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:r,code(e){const{keyword:r,data:n,schemaCode:s}=e;e.fail$data(t._`${n} ${i[r].fail} ${s} || isNaN(${n})`)}};return Ti.default=n,Ti}var Ri,Di={};function Li(){if(Ri)return Di;Ri=1,Object.defineProperty(Di,"__esModule",{value:!0});const t=fe(),e={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>t.str`must be multiple of ${e}`,params:({schemaCode:e})=>t._`{multipleOf: ${e}}`},code(e){const{gen:i,data:r,schemaCode:n,it:s}=e,o=s.opts.multipleOfPrecision,a=i.let("res"),h=o?t._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:t._`${a} !== parseInt(${a})`;e.fail$data(t._`(${n} === 0 || (${a} = ${r}/${n}, ${h}))`)}};return Di.default=e,Di}var zi,Ui,qi={},Fi={};function Vi(){if(zi)return Fi;function t(t){const e=t.length;let i,r=0,n=0;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),56320==(64512&i)&&n++);return r}return zi=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',Fi}function Bi(){if(Ui)return qi;Ui=1,Object.defineProperty(qi,"__esModule",{value:!0});const t=fe(),e=pe(),i=Vi(),r={message:({keyword:e,schemaCode:i})=>t.str`must NOT have ${"maxLength"===e?"more":"fewer"} than ${i} characters`,params:({schemaCode:e})=>t._`{limit: ${e}}`},n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:r,code(r){const{keyword:n,data:s,schemaCode:o,it:a}=r,h="maxLength"===n?t.operators.GT:t.operators.LT,u=!1===a.opts.unicode?t._`${s}.length`:t._`${(0,e.useFunc)(r.gen,i.default)}(${s})`;r.fail$data(t._`${u} ${h} ${o}`)}};return qi.default=n,qi}var Gi,Hi={};function Ki(){if(Gi)return Hi;Gi=1,Object.defineProperty(Hi,"__esModule",{value:!0});const t=Le(),e=pe(),i=fe(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>i.str`must match pattern "${t}"`,params:({schemaCode:t})=>i._`{pattern: ${t}}`},code(r){const{gen:n,data:s,$data:o,schema:a,schemaCode:h,it:u}=r,c=u.opts.unicodeRegExp?"u":"";if(o){const{regExp:t}=u.opts.code,o="new RegExp"===t.code?i._`new RegExp`:(0,e.useFunc)(n,t),a=n.let("valid");n.try((()=>n.assign(a,i._`${o}(${h}, ${c}).test(${s})`)),(()=>n.assign(a,!1))),r.fail$data(i._`!${a}`)}else{const e=(0,t.usePattern)(r,a);r.fail$data(i._`!${e}.test(${s})`)}}};return Hi.default=r,Hi}var Ji,Wi={};function Zi(){if(Ji)return Wi;Ji=1,Object.defineProperty(Wi,"__esModule",{value:!0});const t=fe(),e={message:({keyword:e,schemaCode:i})=>t.str`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${i} properties`,params:({schemaCode:e})=>t._`{limit: ${e}}`},i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:e,code(e){const{keyword:i,data:r,schemaCode:n}=e;e.fail$data(t._`Object.keys(${r}).length ${"maxProperties"===i?t.operators.GT:t.operators.LT} ${n}`)}};return Wi.default=i,Wi}var Yi,Qi={};function Xi(){if(Yi)return Qi;Yi=1,Object.defineProperty(Qi,"__esModule",{value:!0});const t=Le(),e=fe(),i=pe(),r={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>e.str`must have required property '${t}'`,params:({params:{missingProperty:t}})=>e._`{missingProperty: ${t}}`},code(r){const{gen:n,schema:s,schemaCode:o,data:a,$data:h,it:u}=r,{opts:c}=u;if(!h&&0===s.length)return;const f=s.length>=c.loopRequired;if(u.allErrors?function(){if(f||h)r.block$data(e.nil,l);else for(const e of s)(0,t.checkReportMissingProp)(r,e)}():function(){const i=n.let("missing");if(f||h){const s=n.let("valid",!0);r.block$data(s,(()=>function(i,s){r.setParams({missingProperty:i}),n.forOf(i,o,(()=>{n.assign(s,(0,t.propertyInData)(n,a,i,c.ownProperties)),n.if((0,e.not)(s),(()=>{r.error(),n.break()}))}),e.nil)}(i,s))),r.ok(s)}else n.if((0,t.checkMissingProp)(r,s,i)),(0,t.reportMissingProp)(r,i),n.else()}(),c.strictRequired){const t=r.parentSchema.properties,{definedProperties:e}=r.it;for(const r of s)void 0!==(null==t?void 0:t[r])||e.has(r)||(0,i.checkStrictMode)(u,`required property "${r}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`,u.opts.strictRequired)}function l(){n.forOf("prop",o,(e=>{r.setParams({missingProperty:e}),n.if((0,t.noPropertyInData)(n,a,e,c.ownProperties),(()=>r.error()))}))}}};return Qi.default=r,Qi}var tr,er={};function ir(){if(tr)return er;tr=1,Object.defineProperty(er,"__esModule",{value:!0});const t=fe(),e={message:({keyword:e,schemaCode:i})=>t.str`must NOT have ${"maxItems"===e?"more":"fewer"} than ${i} items`,params:({schemaCode:e})=>t._`{limit: ${e}}`},i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:e,code(e){const{keyword:i,data:r,schemaCode:n}=e;e.fail$data(t._`${r}.length ${"maxItems"===i?t.operators.GT:t.operators.LT} ${n}`)}};return er.default=i,er}var rr,nr,sr={},or={};function ar(){if(rr)return or;rr=1,Object.defineProperty(or,"__esModule",{value:!0});const t=He();return t.code='require("ajv/dist/runtime/equal").default',or.default=t,or}function hr(){if(nr)return sr;nr=1,Object.defineProperty(sr,"__esModule",{value:!0});const t=Ie(),e=fe(),i=pe(),r=ar(),n={message:({params:{i:t,j:i}})=>e.str`must NOT have duplicate items (items ## ${i} and ${t} are identical)`,params:({params:{i:t,j:i}})=>e._`{i: ${t}, j: ${i}}`},s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:n,code(n){const{gen:s,data:o,$data:a,schema:h,parentSchema:u,schemaCode:c,it:f}=n;if(!a&&!h)return;const l=s.let("valid"),d=u.items?(0,t.getSchemaTypes)(u.items):[];function p(i,r){const a=s.name("item"),h=(0,t.checkDataTypes)(d,a,f.opts.strictNumbers,t.DataType.Wrong),u=s.const("indices",e._`{}`);s.for(e._`;${i}--;`,(()=>{s.let(a,e._`${o}[${i}]`),s.if(h,e._`continue`),d.length>1&&s.if(e._`typeof ${a} == "string"`,e._`${a} += "_"`),s.if(e._`typeof ${u}[${a}] == "number"`,(()=>{s.assign(r,e._`${u}[${a}]`),n.error(),s.assign(l,!1).break()})).code(e._`${u}[${a}] = ${i}`)}))}function m(t,a){const h=(0,i.useFunc)(s,r.default),u=s.name("outer");s.label(u).for(e._`;${t}--;`,(()=>s.for(e._`${a} = ${t}; ${a}--;`,(()=>s.if(e._`${h}(${o}[${t}], ${o}[${a}])`,(()=>{n.error(),s.assign(l,!1).break(u)}))))))}n.block$data(l,(function(){const t=s.let("i",e._`${o}.length`),i=s.let("j");n.setParams({i:t,j:i}),s.assign(l,!0),s.if(e._`${t} > 1`,(()=>(d.length>0&&!d.some((t=>"object"===t||"array"===t))?p:m)(t,i)))}),e._`${c} === false`),n.ok(l)}};return sr.default=s,sr}var ur,cr={};function fr(){if(ur)return cr;ur=1,Object.defineProperty(cr,"__esModule",{value:!0});const t=fe(),e=pe(),i=ar(),r={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>t._`{allowedValue: ${e}}`},code(r){const{gen:n,data:s,$data:o,schemaCode:a,schema:h}=r;o||h&&"object"==typeof h?r.fail$data(t._`!${(0,e.useFunc)(n,i.default)}(${s}, ${a})`):r.fail(t._`${h} !== ${s}`)}};return cr.default=r,cr}var lr,dr,pr={};function mr(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0});const t=fe(),e=pe(),i=ar(),r={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>t._`{allowedValues: ${e}}`},code(r){const{gen:n,data:s,$data:o,schema:a,schemaCode:h,it:u}=r;if(!o&&0===a.length)throw new Error("enum must have non-empty array");let c;const f=()=>null!=c?c:c=(0,e.useFunc)(n,i.default);let l;if(a.length>=u.opts.loopEnum||o)l=n.let("valid"),r.block$data(l,(function(){n.assign(l,!1),n.forOf("v",h,(e=>n.if(t._`${f()}(${s}, ${e})`,(()=>n.assign(l,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=n.const("vSchema",h);l=(0,t.or)(...a.map(((i,r)=>function(e,i){const r=a[i];return"object"==typeof r&&null!==r?t._`${f()}(${s}, ${e}[${i}])`:t._`${s} === ${r}`}(e,r))))}r.pass(l)}};return pr.default=r,pr}function vr(){return dr||(dr=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.default=[Mi().default,Li().default,Bi().default,Ki().default,Zi().default,Xi().default,ir().default,hr().default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},fr().default,mr().default]),Ni}var yr,gr={},$r={};function wr(){if(yr)return $r;yr=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.validateAdditionalItems=void 0;const t=fe(),e=pe(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>t.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>t._`{limit: ${e}}`},code(t){const{parentSchema:i,it:n}=t,{items:s}=i;Array.isArray(s)?r(t,s):(0,e.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function r(i,r){const{gen:n,schema:s,data:o,keyword:a,it:h}=i;h.items=!0;const u=n.const("len",t._`${o}.length`);if(!1===s)i.setParams({len:r.length}),i.pass(t._`${u} <= ${r.length}`);else if("object"==typeof s&&!(0,e.alwaysValidSchema)(h,s)){const s=n.var("valid",t._`${u} <= ${r.length}`);n.if((0,t.not)(s),(()=>function(s){n.forRange("i",r.length,u,(r=>{i.subschema({keyword:a,dataProp:r,dataPropType:e.Type.Num},s),h.allErrors||n.if((0,t.not)(s),(()=>n.break()))}))}(s))),i.ok(s)}}return $r.validateAdditionalItems=r,$r.default=i,$r}var br,_r,Er={},kr={};function Sr(){if(br)return kr;br=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.validateTuple=void 0;const t=fe(),e=pe(),i=Le(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:r,it:s}=t;if(Array.isArray(r))return n(t,"additionalItems",r);s.items=!0,(0,e.alwaysValidSchema)(s,r)||t.ok((0,i.validateArray)(t))}};function n(i,r,n=i.schema){const{gen:s,parentSchema:o,data:a,keyword:h,it:u}=i;!function(t){const{opts:i,errSchemaPath:s}=u,o=n.length;i.strictTuples&&!(o===t.minItems&&(o===t.maxItems||!1===t[r]))&&(0,e.checkStrictMode)(u,`"${h}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${s}"`,i.strictTuples)}(o),u.opts.unevaluated&&n.length&&!0!==u.items&&(u.items=e.mergeEvaluated.items(s,n.length,u.items));const c=s.name("valid"),f=s.const("len",t._`${a}.length`);n.forEach(((r,n)=>{(0,e.alwaysValidSchema)(u,r)||(s.if(t._`${f} > ${n}`,(()=>i.subschema({keyword:h,schemaProp:n,dataProp:n},c))),i.ok(c))}))}return kr.validateTuple=n,kr.default=r,kr}function xr(){if(_r)return Er;_r=1,Object.defineProperty(Er,"__esModule",{value:!0});const t=Sr();return Er.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")},Er}var Or,jr={};function Pr(){if(Or)return jr;Or=1,Object.defineProperty(jr,"__esModule",{value:!0});const t=fe(),e=pe(),i=Le(),r=wr(),n={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>t.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>t._`{limit: ${e}}`},code(t){const{schema:n,parentSchema:s,it:o}=t,{prefixItems:a}=s;o.items=!0,(0,e.alwaysValidSchema)(o,n)||(a?(0,r.validateAdditionalItems)(t,a):t.ok((0,i.validateArray)(t)))}};return jr.default=n,jr}var Ir,Cr={};function Ar(){if(Ir)return Cr;Ir=1,Object.defineProperty(Cr,"__esModule",{value:!0});const t=fe(),e=pe(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:i}})=>void 0===i?t.str`must contain at least ${e} valid item(s)`:t.str`must contain at least ${e} and no more than ${i} valid item(s)`,params:({params:{min:e,max:i}})=>void 0===i?t._`{minContains: ${e}}`:t._`{minContains: ${e}, maxContains: ${i}}`},code(i){const{gen:r,schema:n,parentSchema:s,data:o,it:a}=i;let h,u;const{minContains:c,maxContains:f}=s;a.opts.next?(h=void 0===c?1:c,u=f):h=1;const l=r.const("len",t._`${o}.length`);if(i.setParams({min:h,max:u}),void 0===u&&0===h)return void(0,e.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==u&&h>u)return(0,e.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void i.fail();if((0,e.alwaysValidSchema)(a,n)){let e=t._`${l} >= ${h}`;return void 0!==u&&(e=t._`${e} && ${l} <= ${u}`),void i.pass(e)}a.items=!0;const d=r.name("valid");function p(){const e=r.name("_valid"),i=r.let("count",0);m(e,(()=>r.if(e,(()=>function(e){r.code(t._`${e}++`),void 0===u?r.if(t._`${e} >= ${h}`,(()=>r.assign(d,!0).break())):(r.if(t._`${e} > ${u}`,(()=>r.assign(d,!1).break())),1===h?r.assign(d,!0):r.if(t._`${e} >= ${h}`,(()=>r.assign(d,!0))))}(i)))))}function m(t,n){r.forRange("i",0,l,(r=>{i.subschema({keyword:"contains",dataProp:r,dataPropType:e.Type.Num,compositeRule:!0},t),n()}))}void 0===u&&1===h?m(d,(()=>r.if(d,(()=>r.break())))):0===h?(r.let(d,!0),void 0!==u&&r.if(t._`${o}.length > 0`,p)):(r.let(d,!1),p()),i.result(d,(()=>i.reset()))}};return Cr.default=i,Cr}var Nr,Tr={};function Mr(){return Nr||(Nr=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=fe(),i=pe(),r=Le();t.error={message:({params:{property:t,depsCount:i,deps:r}})=>e.str`must have ${1===i?"property":"properties"} ${r} when property ${t} is present`,params:({params:{property:t,depsCount:i,deps:r,missingProperty:n}})=>e._`{property: ${t},
5
5
  missingProperty: ${n},
6
6
  depsCount: ${i},
7
- deps: ${r}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(t){const[e,i]=function({schema:t}){const e={},i={};for(const r in t)"__proto__"!==r&&((Array.isArray(t[r])?e:i)[r]=t[r]);return[e,i]}(t);s(t,e),o(t,i)}};function s(t,i=t.schema){const{gen:n,data:s,it:o}=t;if(0===Object.keys(i).length)return;const a=n.let("missing");for(const h in i){const u=i[h];if(0===u.length)continue;const c=(0,r.propertyInData)(n,s,h,o.opts.ownProperties);t.setParams({property:h,depsCount:u.length,deps:u.join(", ")}),o.allErrors?n.if(c,(()=>{for(const e of u)(0,r.checkReportMissingProp)(t,e)})):(n.if(e._`${c} && (${(0,r.checkMissingProp)(t,u,a)})`),(0,r.reportMissingProp)(t,a),n.else())}}function o(t,e=t.schema){const{gen:n,data:s,keyword:o,it:a}=t,h=n.name("valid");for(const u in e)(0,i.alwaysValidSchema)(a,e[u])||(n.if((0,r.propertyInData)(n,s,u,a.opts.ownProperties),(()=>{const e=t.subschema({keyword:o,schemaProp:u},h);t.mergeValidEvaluated(e,h)}),(()=>n.var(h,!0))),t.ok(h))}t.validatePropertyDeps=s,t.validateSchemaDeps=o,t.default=n}(Tr)),Tr}var Rr,Dr={};function zr(){if(Rr)return Dr;Rr=1,Object.defineProperty(Dr,"__esModule",{value:!0});const t=fe(),e=pe(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>t._`{propertyName: ${e.propertyName}}`},code(i){const{gen:r,schema:n,data:s,it:o}=i;if((0,e.alwaysValidSchema)(o,n))return;const a=r.name("valid");r.forIn("key",s,(e=>{i.setParams({propertyName:e}),i.subschema({keyword:"propertyNames",data:e,dataTypes:["string"],propertyName:e,compositeRule:!0},a),r.if((0,t.not)(a),(()=>{i.error(!0),o.allErrors||r.break()}))})),i.ok(a)}};return Dr.default=i,Dr}var Lr,Ur={};function qr(){if(Lr)return Ur;Lr=1,Object.defineProperty(Ur,"__esModule",{value:!0});const t=ze(),e=fe(),i=we(),r=pe(),n={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>e._`{additionalProperty: ${t.additionalProperty}}`},code(n){const{gen:s,schema:o,parentSchema:a,data:h,errsCount:u,it:c}=n;if(!u)throw new Error("ajv implementation error");const{allErrors:f,opts:l}=c;if(c.props=!0,"all"!==l.removeAdditional&&(0,r.alwaysValidSchema)(c,o))return;const d=(0,t.allSchemaProperties)(a.properties),p=(0,t.allSchemaProperties)(a.patternProperties);function m(t){s.code(e._`delete ${h}[${t}]`)}function v(t){if("all"===l.removeAdditional||l.removeAdditional&&!1===o)m(t);else{if(!1===o)return n.setParams({additionalProperty:t}),n.error(),void(f||s.break());if("object"==typeof o&&!(0,r.alwaysValidSchema)(c,o)){const i=s.name("valid");"failing"===l.removeAdditional?(y(t,i,!1),s.if((0,e.not)(i),(()=>{n.reset(),m(t)}))):(y(t,i),f||s.if((0,e.not)(i),(()=>s.break())))}}}function y(t,e,i){const s={keyword:"additionalProperties",dataProp:t,dataPropType:r.Type.Str};!1===i&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(s,e)}s.forIn("key",h,(i=>{d.length||p.length?s.if(function(i){let o;if(d.length>8){const e=(0,r.schemaRefOrVal)(c,a.properties,"properties");o=(0,t.isOwnProperty)(s,e,i)}else o=d.length?(0,e.or)(...d.map((t=>e._`${i} === ${t}`))):e.nil;return p.length&&(o=(0,e.or)(o,...p.map((r=>e._`${(0,t.usePattern)(n,r)}.test(${i})`)))),(0,e.not)(o)}(i),(()=>v(i))):v(i)})),n.ok(e._`${u} === ${i.default.errors}`)}};return Ur.default=n,Ur}var Fr,Br={};function Vr(){if(Fr)return Br;Fr=1,Object.defineProperty(Br,"__esModule",{value:!0});const t=Ye(),e=ze(),i=pe(),r=qr(),n={keyword:"properties",type:"object",schemaType:"object",code(n){const{gen:s,schema:o,parentSchema:a,data:h,it:u}=n;"all"===u.opts.removeAdditional&&void 0===a.additionalProperties&&r.default.code(new t.KeywordCxt(u,r.default,"additionalProperties"));const c=(0,e.allSchemaProperties)(o);for(const t of c)u.definedProperties.add(t);u.opts.unevaluated&&c.length&&!0!==u.props&&(u.props=i.mergeEvaluated.props(s,(0,i.toHash)(c),u.props));const f=c.filter((t=>!(0,i.alwaysValidSchema)(u,o[t])));if(0===f.length)return;const l=s.name("valid");for(const t of f)d(t)?p(t):(s.if((0,e.propertyInData)(s,h,t,u.opts.ownProperties)),p(t),u.allErrors||s.else().var(l,!0),s.endIf()),n.it.definedProperties.add(t),n.ok(l);function d(t){return u.opts.useDefaults&&!u.compositeRule&&void 0!==o[t].default}function p(t){n.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};return Br.default=n,Br}var Gr,Hr={};function Kr(){if(Gr)return Hr;Gr=1,Object.defineProperty(Hr,"__esModule",{value:!0});const t=ze(),e=fe(),i=pe(),r=pe(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(n){const{gen:s,schema:o,data:a,parentSchema:h,it:u}=n,{opts:c}=u,f=(0,t.allSchemaProperties)(o),l=f.filter((t=>(0,i.alwaysValidSchema)(u,o[t])));if(0===f.length||l.length===f.length&&(!u.opts.unevaluated||!0===u.props))return;const d=c.strictSchema&&!c.allowMatchingProperties&&h.properties,p=s.name("valid");!0===u.props||u.props instanceof e.Name||(u.props=(0,r.evaluatedPropsToName)(s,u.props));const{props:m}=u;function v(t){for(const e in d)new RegExp(t).test(e)&&(0,i.checkStrictMode)(u,`property ${e} matches pattern ${t} (use allowMatchingProperties)`)}function y(i){s.forIn("key",a,(o=>{s.if(e._`${(0,t.usePattern)(n,i)}.test(${o})`,(()=>{const t=l.includes(i);t||n.subschema({keyword:"patternProperties",schemaProp:i,dataProp:o,dataPropType:r.Type.Str},p),u.opts.unevaluated&&!0!==m?s.assign(e._`${m}[${o}]`,!0):t||u.allErrors||s.if((0,e.not)(p),(()=>s.break()))}))}))}!function(){for(const t of f)d&&v(t),u.allErrors?y(t):(s.var(p,!0),y(t),s.if(p))}()}};return Hr.default=n,Hr}var Wr,Jr={};function Zr(){if(Wr)return Jr;Wr=1,Object.defineProperty(Jr,"__esModule",{value:!0});const t=pe();return Jr.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:i,schema:r,it:n}=e;if((0,t.alwaysValidSchema)(n,r))return void e.fail();const s=i.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}},Jr}var Xr,Qr={};function Yr(){return Xr||(Xr=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ze().validateUnion,error:{message:"must match a schema in anyOf"}}),Qr}var tn,en={};function rn(){if(tn)return en;tn=1,Object.defineProperty(en,"__esModule",{value:!0});const t=fe(),e=pe(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>t._`{passingSchemas: ${e.passing}}`},code(i){const{gen:r,schema:n,parentSchema:s,it:o}=i;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=n,h=r.let("valid",!1),u=r.let("passing",null),c=r.name("_valid");i.setParams({passing:u}),r.block((function(){a.forEach(((n,s)=>{let a;(0,e.alwaysValidSchema)(o,n)?r.var(c,!0):a=i.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},c),s>0&&r.if(t._`${c} && ${h}`).assign(h,!1).assign(u,t._`[${u}, ${s}]`).else(),r.if(c,(()=>{r.assign(h,!0),r.assign(u,s),a&&i.mergeEvaluated(a,t.Name)}))}))})),i.result(h,(()=>i.reset()),(()=>i.error(!0)))}};return en.default=i,en}var nn,sn={};function on(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const t=pe(),e={keyword:"allOf",schemaType:"array",code(e){const{gen:i,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=i.name("valid");r.forEach(((i,r)=>{if((0,t.alwaysValidSchema)(n,i))return;const o=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(o)}))}};return sn.default=e,sn}var an,hn={};function un(){if(an)return hn;an=1,Object.defineProperty(hn,"__esModule",{value:!0});const t=fe(),e=pe(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>t.str`must match "${e.ifClause}" schema`,params:({params:e})=>t._`{failingKeyword: ${e.ifClause}}`},code(i){const{gen:n,parentSchema:s,it:o}=i;void 0===s.then&&void 0===s.else&&(0,e.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=r(o,"then"),h=r(o,"else");if(!a&&!h)return;const u=n.let("valid",!0),c=n.name("_valid");if(function(){const t=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);i.mergeEvaluated(t)}(),i.reset(),a&&h){const t=n.let("ifClause");i.setParams({ifClause:t}),n.if(c,f("then",t),f("else",t))}else a?n.if(c,f("then")):n.if((0,t.not)(c),f("else"));function f(e,r){return()=>{const s=i.subschema({keyword:e},c);n.assign(u,c),i.mergeValidEvaluated(s,u),r?n.assign(r,t._`${e}`):i.setParams({ifClause:e})}}i.pass(u,(()=>i.error(!0)))}};function r(t,i){const r=t.schema[i];return void 0!==r&&!(0,e.alwaysValidSchema)(t,r)}return hn.default=i,hn}var cn,fn,ln={};function dn(){if(cn)return ln;cn=1,Object.defineProperty(ln,"__esModule",{value:!0});const t=pe(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:i,it:r}){void 0===i.if&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};return ln.default=e,ln}function pn(){if(fn)return $r;fn=1,Object.defineProperty($r,"__esModule",{value:!0});const t=gr(),e=Sr(),i=jr(),r=Pr(),n=Cr(),s=Mr(),o=zr(),a=qr(),h=Vr(),u=Kr(),c=Zr(),f=Yr(),l=rn(),d=on(),p=un(),m=dn();return $r.default=function(v=!1){const y=[c.default,f.default,l.default,d.default,p.default,m.default,o.default,a.default,s.default,h.default,u.default];return v?y.push(e.default,r.default):y.push(t.default,i.default),y.push(n.default),y},$r}var mn,vn,yn={},$n={};function wn(){if(mn)return $n;mn=1,Object.defineProperty($n,"__esModule",{value:!0});const t=fe(),e={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>t.str`must match format "${e}"`,params:({schemaCode:e})=>t._`{format: ${e}}`},code(e,i){const{gen:r,data:n,$data:s,schema:o,schemaCode:a,it:h}=e,{opts:u,errSchemaPath:c,schemaEnv:f,self:l}=h;u.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:l.formats,code:u.code.formats}),o=r.const("fDef",t._`${s}[${a}]`),h=r.let("fType"),c=r.let("format");r.if(t._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(h,t._`${o}.type || "string"`).assign(c,t._`${o}.validate`)),(()=>r.assign(h,t._`"string"`).assign(c,o))),e.fail$data((0,t.or)(!1===u.strictSchema?t.nil:t._`${a} && !${c}`,function(){const e=f.$async?t._`(${o}.async ? await ${c}(${n}) : ${c}(${n}))`:t._`${c}(${n})`,r=t._`(typeof ${c} == "function" ? ${e} : ${c}.test(${n}))`;return t._`${c} && ${c} !== true && ${h} === ${i} && !${r}`}()))}():function(){const s=l.formats[o];if(!s)return void function(){if(!1!==u.strictSchema)throw new Error(t());function t(){return`unknown format "${o}" ignored in schema at path "${c}"`}l.logger.warn(t())}();if(!0===s)return;const[a,h,d]=function(e){const i=e instanceof RegExp?(0,t.regexpCode)(e):u.code.formats?t._`${u.code.formats}${(0,t.getProperty)(o)}`:void 0,n=r.scopeValue("formats",{key:o,ref:e,code:i});return"object"!=typeof e||e instanceof RegExp?["string",e,n]:[e.type||"string",e.validate,t._`${n}.validate`]}(s);a===i&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!f.$async)throw new Error("async format in sync schema");return t._`await ${d}(${n})`}return"function"==typeof h?t._`${d}(${n})`:t._`${d}.test(${n})`}())}())}};return $n.default=e,$n}function gn(){return vn||(vn=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.default=[wn().default]),yn}var bn,_n,En={};function On(){return bn||(bn=1,Object.defineProperty(En,"__esModule",{value:!0}),En.contentVocabulary=En.metadataVocabulary=void 0,En.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],En.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),En}function jn(){if(_n)return Ei;_n=1,Object.defineProperty(Ei,"__esModule",{value:!0});const t=Ai(),e=vr(),i=pn(),r=gn(),n=On(),s=[t.default,e.default,(0,i.default)(),r.default,n.metadataVocabulary,n.contentVocabulary];return Ei.default=s,Ei}var Sn,xn,kn={},Pn={};function In(){return Sn||(Sn=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(t||(Pn.DiscrError=t={}))),Pn;var t}function An(){if(xn)return kn;xn=1,Object.defineProperty(kn,"__esModule",{value:!0});const t=fe(),e=In(),i=hi(),r=si(),n=pe(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:i}})=>t===e.DiscrError.Tag?`tag "${i}" must be string`:`value of tag "${i}" must be in oneOf`,params:({params:{discrError:e,tag:i,tagName:r}})=>t._`{error: ${e}, tag: ${r}, tagValue: ${i}}`},code(s){const{gen:o,data:a,schema:h,parentSchema:u,it:c}=s,{oneOf:f}=u;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=h.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(h.mapping)throw new Error("discriminator: mapping is not supported");if(!f)throw new Error("discriminator: requires oneOf keyword");const d=o.let("valid",!1),p=o.const("tag",t._`${a}${(0,t.getProperty)(l)}`);function m(e){const i=o.name("valid"),r=s.subschema({keyword:"oneOf",schemaProp:e},i);return s.mergeEvaluated(r,t.Name),i}o.if(t._`typeof ${p} == "string"`,(()=>function(){const a=function(){var t;const e={},s=a(u);let o=!0;for(let e=0;e<f.length;e++){let u=f[e];if((null==u?void 0:u.$ref)&&!(0,n.schemaHasRulesButRef)(u,c.self.RULES)){const t=u.$ref;if(u=i.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,t),u instanceof i.SchemaEnv&&(u=u.schema),void 0===u)throw new r.default(c.opts.uriResolver,c.baseId,t)}const d=null===(t=null==u?void 0:u.properties)||void 0===t?void 0:t[l];if("object"!=typeof d)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);o=o&&(s||a(u)),h(d,e)}if(!o)throw new Error(`discriminator: "${l}" must be required`);return e;function a({required:t}){return Array.isArray(t)&&t.includes(l)}function h(t,e){if(t.const)d(t.const,e);else{if(!t.enum)throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`);for(const i of t.enum)d(i,e)}}function d(t,i){if("string"!=typeof t||t in e)throw new Error(`discriminator: "${l}" values must be unique strings`);e[t]=i}}();o.if(!1);for(const e in a)o.elseIf(t._`${p} === ${e}`),o.assign(d,m(a[e]));o.else(),s.error(!1,{discrError:e.DiscrError.Mapping,tag:p,tagName:l}),o.endIf()}()),(()=>s.error(!1,{discrError:e.DiscrError.Tag,tag:p,tagName:l}))),s.ok(d)}};return kn.default=s,kn}var Cn,Nn={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};function Tn(){return Cn||(Cn=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const i=bi(),r=jn(),n=An(),s=Nn,o=["/properties"],a="http://json-schema.org/draft-07/schema";class h extends i.default{_addVocabularies(){super._addVocabularies(),r.default.forEach((t=>this.addVocabulary(t))),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(t,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv=h,t.exports=e=h,t.exports.Ajv=h,Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;var u=Ye();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var c=fe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var f=ii();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var l=si();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return l.default}})}(Yt,Yt.exports)),Yt.exports}var Mn,Rn,Dn,zn,Ln,Un=Tn(),qn={exports:{}},Fn=(Mn||(Mn=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const i=Tn(),r=fe(),n=oe(),s=Ye(),o=ge(),a=we(),h="errorMessage",u=new i.Name("emUsed"),c={required:"missingProperty",dependencies:"property",dependentRequired:"property"},f=/\$\{[^}]+\}/,l=/\$\{([^}]+)\}/g,d=/^""\s*\+\s*|\s*\+\s*""$/g;const p=(t,e={})=>{if(!t.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(t.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return t.addKeyword(function(t){return{keyword:h,schemaType:["string","object"],post:!0,code(e){const{gen:p,data:m,schema:v,schemaValue:y,it:$}=e;if(!1===$.createErrors)return;const w=v,g=r.strConcat(a.default.instancePath,$.errorPath);function b(t,e){return r.and(i._`${t}.keyword !== ${h}`,i._`!${t}.${u}`,i._`${t}.instancePath === ${g}`,i._`${t}.keyword in ${e}`,i._`${t}.schemaPath.indexOf(${$.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${t}.schemaPath.slice(${$.errSchemaPath.length}))`)}function _(t,e){const i=[];for(const r in t){const t=e[r];f.test(t)&&i.push([r,O(t)])}return p.object(...i)}function E(t){return f.test(t)?new n._Code(n.safeStringify(t).replace(l,((t,e)=>`" + JSON.stringify(${s.getData(e,$)}) + "`)).replace(d,"")):i.stringify(t)}function O(t){return i._`function(){return ${E(t)}}`}p.if(i._`${a.default.errors} > 0`,(()=>{if("object"==typeof w){const[n,s]=function(t){let e,i;for(const r in t){if("properties"===r||"items"===r)continue;const n=t[r];if("object"==typeof n){e||(e={});const t=e[r]={};for(const e in n)t[e]=[]}else i||(i={}),i[r]=[]}return[e,i]}(w);s&&function(r){const n=p.const("emErrors",i.stringify(r)),s=p.const("templates",_(r,v));p.forOf("err",a.default.vErrors,(t=>p.if(b(t,n),(()=>p.code(i._`${n}[${t}.keyword].push(${t})`).assign(i._`${t}.${u}`,!0)))));const{singleError:h}=t;if(h){const t=p.let("message",i._`""`),r=p.let("paramsErrors",i._`[]`);c((e=>{p.if(t,(()=>p.code(i._`${t} += ${"string"==typeof h?h:";"}`))),p.code(i._`${t} += ${f(e)}`),p.assign(r,i._`${r}.concat(${n}[${e}])`)})),o.reportError(e,{message:t,params:i._`{errors: ${r}}`})}else c((t=>o.reportError(e,{message:f(t),params:i._`{errors: ${n}[${t}]}`})));function c(t){p.forIn("key",n,(e=>p.if(i._`${n}[${e}].length`,(()=>t(e)))))}function f(t){return i._`${t} in ${s} ? ${s}[${t}]() : ${y}[${t}]`}}(s),n&&function(t){const r=p.const("emErrors",i.stringify(t)),n=[];for(const e in t)n.push([e,_(t[e],v[e])]);const s=p.const("templates",p.object(...n)),h=p.scopeValue("obj",{ref:c,code:i.stringify(c)}),f=p.let("emPropParams"),l=p.let("emParamsErrors");p.forOf("err",a.default.vErrors,(t=>p.if(b(t,r),(()=>{p.assign(f,i._`${h}[${t}.keyword]`),p.assign(l,i._`${r}[${t}.keyword][${t}.params[${f}]]`),p.if(l,(()=>p.code(i._`${l}.push(${t})`).assign(i._`${t}.${u}`,!0)))})))),p.forIn("key",r,(t=>p.forIn("keyProp",i._`${r}[${t}]`,(n=>{p.assign(l,i._`${r}[${t}][${n}]`),p.if(i._`${l}.length`,(()=>{const r=p.const("tmpl",i._`${s}[${t}] && ${s}[${t}][${n}]`);o.reportError(e,{message:i._`${r} ? ${r}() : ${y}[${t}][${n}]`,params:i._`{errors: ${l}}`})}))}))))}(n),function(t){const{props:n,items:s}=t;if(!n&&!s)return;const c=i._`typeof ${m} == "object"`,f=i._`Array.isArray(${m})`,l=p.let("emErrors");let d,$;const w=p.let("templates");function b(t,e){p.assign(l,i.stringify(t)),p.assign(w,_(t,e))}n&&s?(d=p.let("emChildKwd"),p.if(c),p.if(f,(()=>{b(s,v.items),p.assign(d,i.str`items`)}),(()=>{b(n,v.properties),p.assign(d,i.str`properties`)})),$=i._`[${d}]`):s?(p.if(f),b(s,v.items),$=i._`.items`):n&&(p.if(r.and(c,r.not(f))),b(n,v.properties),$=i._`.properties`),p.forOf("err",a.default.vErrors,(t=>function(t,e,n){p.if(r.and(i._`${t}.keyword !== ${h}`,i._`!${t}.${u}`,i._`${t}.instancePath.indexOf(${g}) === 0`),(()=>{const r=p.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=p.const("emMatches",i._`${r}.exec(${t}.instancePath.slice(${g}.length))`),o=p.const("emChild",i._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);p.if(i._`${o} !== undefined && ${o} in ${e}`,(()=>n(o)))}))}(t,l,(e=>p.code(i._`${l}[${e}].push(${t})`).assign(i._`${t}.${u}`,!0))))),p.forIn("key",l,(t=>p.if(i._`${l}[${t}].length`,(()=>{o.reportError(e,{message:i._`${t} in ${w} ? ${w}[${t}]() : ${y}${$}[${t}]`,params:i._`{errors: ${l}[${t}]}`}),p.assign(i._`${a.default.vErrors}[${a.default.errors}-1].instancePath`,i._`${g} + "/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),p.endIf()}(function({properties:t,items:e}){const i={};if(t){i.props={};for(const e in t)i.props[e]=[]}if(e){i.items={};for(let t=0;t<e.length;t++)i.items[t]=[]}return i}(w))}const n="string"==typeof w?w:w._;n&&function(t){const n=p.const("emErrs",i._`[]`);p.forOf("err",a.default.vErrors,(t=>p.if(function(t){return r.and(i._`${t}.keyword !== ${h}`,i._`!${t}.${u}`,r.or(i._`${t}.instancePath === ${g}`,r.and(i._`${t}.instancePath.indexOf(${g}) === 0`,i._`${t}.instancePath[${g}.length] === "/"`)),i._`${t}.schemaPath.indexOf(${$.errSchemaPath}) === 0`,i._`${t}.schemaPath[${$.errSchemaPath}.length] === "/"`)}(t),(()=>p.code(i._`${n}.push(${t})`).assign(i._`${t}.${u}`,!0))))),p.if(i._`${n}.length`,(()=>o.reportError(e,{message:E(t),params:i._`{errors: ${n}}`})))}(n),t.keepErrors||function(){const t=p.const("emErrs",i._`[]`);p.forOf("err",a.default.vErrors,(e=>p.if(i._`!${e}.${u}`,(()=>p.code(i._`${t}.push(${e})`))))),p.assign(a.default.vErrors,t).assign(a.default.errors,i._`${t}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(e))};e.default=p,t.exports=p,t.exports.default=p}(qn,qn.exports)),qn.exports),Bn=t(Fn),Vn={exports:{}},Gn={},Hn={},Kn=(zn||(zn=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const i=(Rn||(Rn=1,function(t){function e(t,e){return{validate:t,compare:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:e(n,s),time:e(a(!0),h),"date-time":e(f(!0),l),"iso-time":e(a(),u),"iso-date-time":e(f(),d),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(t){return p.test(t)&&m.test(t)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(t){if(g.test(t))return!1;try{return!0}catch(t){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(t){return v.lastIndex=0,v.test(t)},int32:{type:"number",validate:function(t){return Number.isInteger(t)&&t<=$&&t>=y}},int64:{type:"number",validate:function(t){return Number.isInteger(t)}},float:{type:"number",validate:w},double:{type:"number",validate:w},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function n(t){const e=i.exec(t);if(!e)return!1;const n=+e[2],s=+e[3];return n>=1&&n<=12&&s>=1&&s<=(2!==n||(o=+e[1])%4!=0||o%100==0&&o%400!=0?r[n]:29);var o}function s(t,e){if(t&&e)return t>e?1:t<e?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function a(t){return function(e){const i=o.exec(e);if(!i)return!1;const r=+i[1],n=+i[2],s=+i[3],a="-"===i[5]?-1:1,h=+(i[6]||0),u=+(i[7]||0);if(h>23||u>59||t&&!i[4])return!1;if(r<=23&&n<=59&&s<60)return!0;const c=n-u*a,f=r-h*a-(c<0?1:0);return(23===f||-1===f)&&(59===c||-1===c)&&s<61}}function h(t,e){if(!t||!e)return;const i=new Date("2020-01-01T"+t).valueOf(),r=new Date("2020-01-01T"+e).valueOf();return i&&r?i-r:void 0}function u(t,e){if(!t||!e)return;const i=o.exec(t),r=o.exec(e);return i&&r?(t=i[1]+i[2]+i[3])>(e=r[1]+r[2]+r[3])?1:t<e?-1:0:void 0}const c=/t|\s/i;function f(t){const e=a(t);return function(t){const i=t.split(c);return 2===i.length&&n(i[0])&&e(i[1])}}function l(t,e){if(!t||!e)return;const i=new Date(t).valueOf(),r=new Date(e).valueOf();return i&&r?i-r:void 0}function d(t,e){if(!t||!e)return;const[i,r]=t.split(c),[n,o]=e.split(c),a=s(i,n);return void 0!==a?a||h(r,o):void 0}const p=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,y=-2147483648,$=2**31-1;function w(){return!0}const g=/[^\\]\\Z/}(Gn)),Gn),r=(Dn||(Dn=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=Tn(),i=fe(),r=i.operators,n={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:t,schemaCode:e})=>i.str`should be ${n[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>i._`{comparison: ${n[t].okStr}, limit: ${e}}`};t.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:s,code(t){const{gen:r,data:s,schemaCode:o,keyword:a,it:h}=t,{opts:u,self:c}=h;if(!u.validateFormats)return;const f=new e.KeywordCxt(h,c.RULES.all.format.definition,"format");function l(t){return i._`${t}.compare(${s}, ${o}) ${n[a].fail} 0`}f.$data?function(){const e=r.scopeValue("formats",{ref:c.formats,code:u.code.formats}),n=r.const("fmt",i._`${e}[${f.schemaCode}]`);t.fail$data((0,i.or)(i._`typeof ${n} != "object"`,i._`${n} instanceof RegExp`,i._`typeof ${n}.compare != "function"`,l(n)))}():function(){const e=f.schema,n=c.formats[e];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${e}" does not define "compare" function`);const s=r.scopeValue("formats",{key:e,ref:n,code:u.code.formats?i._`${u.code.formats}${(0,i.getProperty)(e)}`:void 0});t.fail$data(l(s))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)}(Hn)),Hn),n=fe(),s=new n.Name("fullFormats"),o=new n.Name("fastFormats"),a=(t,e={keywords:!0})=>{if(Array.isArray(e))return h(t,e,i.fullFormats,s),t;const[n,a]="fast"===e.mode?[i.fastFormats,o]:[i.fullFormats,s];return h(t,e.formats||i.formatNames,n,a),e.keywords&&(0,r.default)(t),t};function h(t,e,i,r){var s,o;null!==(s=(o=t.opts.code).formats)&&void 0!==s||(o.formats=n._`require("ajv-formats/dist/formats").${r}`);for(const r of e)t.addFormat(r,i[r])}a.get=(t,e="full")=>{const r=("fast"===e?i.fastFormats:i.fullFormats)[t];if(!r)throw new Error(`Unknown format "${t}"`);return r},t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a}(Vn,Vn.exports)),Vn.exports),Wn=t(Kn),Jn=(Ln=function(t,e){return Ln=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},Ln(t,e)},function(t,e){function i(){this.constructor=t}Ln(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Zn=Object.prototype.hasOwnProperty;function Xn(t,e){return Zn.call(t,e)}function Qn(t){if(Array.isArray(t)){for(var e=new Array(t.length),i=0;i<e.length;i++)e[i]=""+i;return e}if(Object.keys)return Object.keys(t);var r=[];for(var n in t)Xn(t,n)&&r.push(n);return r}function Yn(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function ts(t){for(var e,i=0,r=t.length;i<r;){if(!((e=t.charCodeAt(i))>=48&&e<=57))return!1;i++}return!0}function es(t){return-1===t.indexOf("/")&&-1===t.indexOf("~")?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function is(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function rs(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var e=0,i=t.length;e<i;e++)if(rs(t[e]))return!0}else if("object"==typeof t)for(var r=Qn(t),n=r.length,s=0;s<n;s++)if(rs(t[r[s]]))return!0;return!1}function ns(t,e){var i=[t];for(var r in e){var n="object"==typeof e[r]?JSON.stringify(e[r],null,2):e[r];void 0!==n&&i.push(r+": "+n)}return i.join("\n")}var ss=function(t){function e(e,i,r,n,s){var o=this.constructor,a=t.call(this,ns(e,{name:i,index:r,operation:n,tree:s}))||this;return a.name=i,a.index=r,a.operation=n,a.tree=s,Object.setPrototypeOf(a,o.prototype),a.message=ns(e,{name:i,index:r,operation:n,tree:s}),a}return Jn(e,t),e}(Error),os=ss,as={add:function(t,e,i){return t[e]=this.value,{newDocument:i}},remove:function(t,e,i){var r=t[e];return delete t[e],{newDocument:i,removed:r}},replace:function(t,e,i){var r=t[e];return t[e]=this.value,{newDocument:i,removed:r}},move:function(t,e,i){var r=us(i,this.path);r&&(r=Yn(r));var n=cs(i,{op:"remove",path:this.from}).removed;return cs(i,{op:"add",path:this.path,value:n}),{newDocument:i,removed:r}},copy:function(t,e,i){var r=us(i,this.from);return cs(i,{op:"add",path:this.path,value:Yn(r)}),{newDocument:i}},test:function(t,e,i){return{newDocument:i,test:ms(t[e],this.value)}},_get:function(t,e,i){return this.value=t[e],{newDocument:i}}},hs={add:function(t,e,i){return ts(e)?t.splice(e,0,this.value):t[e]=this.value,{newDocument:i,index:e}},remove:function(t,e,i){return{newDocument:i,removed:t.splice(e,1)[0]}},replace:function(t,e,i){var r=t[e];return t[e]=this.value,{newDocument:i,removed:r}},move:as.move,copy:as.copy,test:as.test,_get:as._get};function us(t,e){if(""==e)return t;var i={op:"_get",path:e};return cs(t,i),i.value}function cs(t,e,i,r,n,s){if(void 0===i&&(i=!1),void 0===r&&(r=!0),void 0===n&&(n=!0),void 0===s&&(s=0),i&&("function"==typeof i?i(e,0,t,e.path):ds(e,0)),""===e.path){var o={newDocument:t};if("add"===e.op)return o.newDocument=e.value,o;if("replace"===e.op)return o.newDocument=e.value,o.removed=t,o;if("move"===e.op||"copy"===e.op)return o.newDocument=us(t,e.from),"move"===e.op&&(o.removed=t),o;if("test"===e.op){if(o.test=ms(t,e.value),!1===o.test)throw new os("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o.newDocument=t,o}if("remove"===e.op)return o.removed=t,o.newDocument=null,o;if("_get"===e.op)return e.value=t,o;if(i)throw new os("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,e,t);return o}r||(t=Yn(t));var a=(e.path||"").split("/"),h=t,u=1,c=a.length,f=void 0,l=void 0,d=void 0;for(d="function"==typeof i?i:ds;;){if((l=a[u])&&-1!=l.indexOf("~")&&(l=is(l)),n&&("__proto__"==l||"prototype"==l&&u>0&&"constructor"==a[u-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(i&&void 0===f&&(void 0===h[l]?f=a.slice(0,u).join("/"):u==c-1&&(f=e.path),void 0!==f&&d(e,0,t,f)),u++,Array.isArray(h)){if("-"===l)l=h.length;else{if(i&&!ts(l))throw new os("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,e,t);ts(l)&&(l=~~l)}if(u>=c){if(i&&"add"===e.op&&l>h.length)throw new os("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,e,t);if(!1===(o=hs[e.op].call(e,h,l,t)).test)throw new os("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}}else if(u>=c){if(!1===(o=as[e.op].call(e,h,l,t)).test)throw new os("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}if(h=h[l],i&&u<c&&(!h||"object"!=typeof h))throw new os("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,e,t)}}function fs(t,e,i,r,n){if(void 0===r&&(r=!0),void 0===n&&(n=!0),i&&!Array.isArray(e))throw new os("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(t=Yn(t));for(var s=new Array(e.length),o=0,a=e.length;o<a;o++)s[o]=cs(t,e[o],i,!0,n,o),t=s[o].newDocument;return s.newDocument=t,s}function ls(t,e,i){var r=cs(t,e);if(!1===r.test)throw new os("Test operation failed","TEST_OPERATION_FAILED",i,e,t);return r.newDocument}function ds(t,e,i,r){if("object"!=typeof t||null===t||Array.isArray(t))throw new os("Operation is not an object","OPERATION_NOT_AN_OBJECT",e,t,i);if(!as[t.op])throw new os("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",e,t,i);if("string"!=typeof t.path)throw new os("Operation `path` property is not a string","OPERATION_PATH_INVALID",e,t,i);if(0!==t.path.indexOf("/")&&t.path.length>0)throw new os('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",e,t,i);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new os("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",e,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new os("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",e,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&rs(t.value))throw new os("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",e,t,i);if(i)if("add"==t.op){var n=t.path.split("/").length,s=r.split("/").length;if(n!==s+1&&n!==s)throw new os("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",e,t,i)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==r)throw new os("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",e,t,i)}else if("move"===t.op||"copy"===t.op){var o=ps([{op:"_get",path:t.from,value:void 0}],i);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new os("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,i)}}function ps(t,e,i){try{if(!Array.isArray(t))throw new os("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)fs(Yn(e),Yn(t),i||!0);else{i=i||ds;for(var r=0;r<t.length;r++)i(t[r],r,e,void 0)}}catch(t){if(t instanceof os)return t;throw t}}function ms(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var i,r,n,s=Array.isArray(t),o=Array.isArray(e);if(s&&o){if((r=t.length)!=e.length)return!1;for(i=r;0!=i--;)if(!ms(t[i],e[i]))return!1;return!0}if(s!=o)return!1;var a=Object.keys(t);if((r=a.length)!==Object.keys(e).length)return!1;for(i=r;0!=i--;)if(!e.hasOwnProperty(a[i]))return!1;for(i=r;0!=i--;)if(!ms(t[n=a[i]],e[n]))return!1;return!0}return t!=t&&e!=e}var vs=Object.freeze({__proto__:null,JsonPatchError:os,_areEquals:ms,applyOperation:cs,applyPatch:fs,applyReducer:ls,deepClone:Yn,getValueByPointer:us,validate:ps,validator:ds}),ys=new WeakMap,$s=function(t){this.observers=new Map,this.obj=t},ws=function(t,e){this.callback=t,this.observer=e};
7
+ deps: ${r}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(t){const[e,i]=function({schema:t}){const e={},i={};for(const r in t)"__proto__"!==r&&((Array.isArray(t[r])?e:i)[r]=t[r]);return[e,i]}(t);s(t,e),o(t,i)}};function s(t,i=t.schema){const{gen:n,data:s,it:o}=t;if(0===Object.keys(i).length)return;const a=n.let("missing");for(const h in i){const u=i[h];if(0===u.length)continue;const c=(0,r.propertyInData)(n,s,h,o.opts.ownProperties);t.setParams({property:h,depsCount:u.length,deps:u.join(", ")}),o.allErrors?n.if(c,(()=>{for(const e of u)(0,r.checkReportMissingProp)(t,e)})):(n.if(e._`${c} && (${(0,r.checkMissingProp)(t,u,a)})`),(0,r.reportMissingProp)(t,a),n.else())}}function o(t,e=t.schema){const{gen:n,data:s,keyword:o,it:a}=t,h=n.name("valid");for(const u in e)(0,i.alwaysValidSchema)(a,e[u])||(n.if((0,r.propertyInData)(n,s,u,a.opts.ownProperties),(()=>{const e=t.subschema({keyword:o,schemaProp:u},h);t.mergeValidEvaluated(e,h)}),(()=>n.var(h,!0))),t.ok(h))}t.validatePropertyDeps=s,t.validateSchemaDeps=o,t.default=n}(Tr)),Tr}var Rr,Dr={};function Lr(){if(Rr)return Dr;Rr=1,Object.defineProperty(Dr,"__esModule",{value:!0});const t=fe(),e=pe(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>t._`{propertyName: ${e.propertyName}}`},code(i){const{gen:r,schema:n,data:s,it:o}=i;if((0,e.alwaysValidSchema)(o,n))return;const a=r.name("valid");r.forIn("key",s,(e=>{i.setParams({propertyName:e}),i.subschema({keyword:"propertyNames",data:e,dataTypes:["string"],propertyName:e,compositeRule:!0},a),r.if((0,t.not)(a),(()=>{i.error(!0),o.allErrors||r.break()}))})),i.ok(a)}};return Dr.default=i,Dr}var zr,Ur={};function qr(){if(zr)return Ur;zr=1,Object.defineProperty(Ur,"__esModule",{value:!0});const t=Le(),e=fe(),i=$e(),r=pe(),n={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>e._`{additionalProperty: ${t.additionalProperty}}`},code(n){const{gen:s,schema:o,parentSchema:a,data:h,errsCount:u,it:c}=n;if(!u)throw new Error("ajv implementation error");const{allErrors:f,opts:l}=c;if(c.props=!0,"all"!==l.removeAdditional&&(0,r.alwaysValidSchema)(c,o))return;const d=(0,t.allSchemaProperties)(a.properties),p=(0,t.allSchemaProperties)(a.patternProperties);function m(t){s.code(e._`delete ${h}[${t}]`)}function v(t){if("all"===l.removeAdditional||l.removeAdditional&&!1===o)m(t);else{if(!1===o)return n.setParams({additionalProperty:t}),n.error(),void(f||s.break());if("object"==typeof o&&!(0,r.alwaysValidSchema)(c,o)){const i=s.name("valid");"failing"===l.removeAdditional?(y(t,i,!1),s.if((0,e.not)(i),(()=>{n.reset(),m(t)}))):(y(t,i),f||s.if((0,e.not)(i),(()=>s.break())))}}}function y(t,e,i){const s={keyword:"additionalProperties",dataProp:t,dataPropType:r.Type.Str};!1===i&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(s,e)}s.forIn("key",h,(i=>{d.length||p.length?s.if(function(i){let o;if(d.length>8){const e=(0,r.schemaRefOrVal)(c,a.properties,"properties");o=(0,t.isOwnProperty)(s,e,i)}else o=d.length?(0,e.or)(...d.map((t=>e._`${i} === ${t}`))):e.nil;return p.length&&(o=(0,e.or)(o,...p.map((r=>e._`${(0,t.usePattern)(n,r)}.test(${i})`)))),(0,e.not)(o)}(i),(()=>v(i))):v(i)})),n.ok(e._`${u} === ${i.default.errors}`)}};return Ur.default=n,Ur}var Fr,Vr={};function Br(){if(Fr)return Vr;Fr=1,Object.defineProperty(Vr,"__esModule",{value:!0});const t=Xe(),e=Le(),i=pe(),r=qr(),n={keyword:"properties",type:"object",schemaType:"object",code(n){const{gen:s,schema:o,parentSchema:a,data:h,it:u}=n;"all"===u.opts.removeAdditional&&void 0===a.additionalProperties&&r.default.code(new t.KeywordCxt(u,r.default,"additionalProperties"));const c=(0,e.allSchemaProperties)(o);for(const t of c)u.definedProperties.add(t);u.opts.unevaluated&&c.length&&!0!==u.props&&(u.props=i.mergeEvaluated.props(s,(0,i.toHash)(c),u.props));const f=c.filter((t=>!(0,i.alwaysValidSchema)(u,o[t])));if(0===f.length)return;const l=s.name("valid");for(const t of f)d(t)?p(t):(s.if((0,e.propertyInData)(s,h,t,u.opts.ownProperties)),p(t),u.allErrors||s.else().var(l,!0),s.endIf()),n.it.definedProperties.add(t),n.ok(l);function d(t){return u.opts.useDefaults&&!u.compositeRule&&void 0!==o[t].default}function p(t){n.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};return Vr.default=n,Vr}var Gr,Hr={};function Kr(){if(Gr)return Hr;Gr=1,Object.defineProperty(Hr,"__esModule",{value:!0});const t=Le(),e=fe(),i=pe(),r=pe(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(n){const{gen:s,schema:o,data:a,parentSchema:h,it:u}=n,{opts:c}=u,f=(0,t.allSchemaProperties)(o),l=f.filter((t=>(0,i.alwaysValidSchema)(u,o[t])));if(0===f.length||l.length===f.length&&(!u.opts.unevaluated||!0===u.props))return;const d=c.strictSchema&&!c.allowMatchingProperties&&h.properties,p=s.name("valid");!0===u.props||u.props instanceof e.Name||(u.props=(0,r.evaluatedPropsToName)(s,u.props));const{props:m}=u;function v(t){for(const e in d)new RegExp(t).test(e)&&(0,i.checkStrictMode)(u,`property ${e} matches pattern ${t} (use allowMatchingProperties)`)}function y(i){s.forIn("key",a,(o=>{s.if(e._`${(0,t.usePattern)(n,i)}.test(${o})`,(()=>{const t=l.includes(i);t||n.subschema({keyword:"patternProperties",schemaProp:i,dataProp:o,dataPropType:r.Type.Str},p),u.opts.unevaluated&&!0!==m?s.assign(e._`${m}[${o}]`,!0):t||u.allErrors||s.if((0,e.not)(p),(()=>s.break()))}))}))}!function(){for(const t of f)d&&v(t),u.allErrors?y(t):(s.var(p,!0),y(t),s.if(p))}()}};return Hr.default=n,Hr}var Jr,Wr={};function Zr(){if(Jr)return Wr;Jr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const t=pe();return Wr.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:i,schema:r,it:n}=e;if((0,t.alwaysValidSchema)(n,r))return void e.fail();const s=i.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}},Wr}var Yr,Qr={};function Xr(){return Yr||(Yr=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Le().validateUnion,error:{message:"must match a schema in anyOf"}}),Qr}var tn,en={};function rn(){if(tn)return en;tn=1,Object.defineProperty(en,"__esModule",{value:!0});const t=fe(),e=pe(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>t._`{passingSchemas: ${e.passing}}`},code(i){const{gen:r,schema:n,parentSchema:s,it:o}=i;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=n,h=r.let("valid",!1),u=r.let("passing",null),c=r.name("_valid");i.setParams({passing:u}),r.block((function(){a.forEach(((n,s)=>{let a;(0,e.alwaysValidSchema)(o,n)?r.var(c,!0):a=i.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},c),s>0&&r.if(t._`${c} && ${h}`).assign(h,!1).assign(u,t._`[${u}, ${s}]`).else(),r.if(c,(()=>{r.assign(h,!0),r.assign(u,s),a&&i.mergeEvaluated(a,t.Name)}))}))})),i.result(h,(()=>i.reset()),(()=>i.error(!0)))}};return en.default=i,en}var nn,sn={};function on(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const t=pe(),e={keyword:"allOf",schemaType:"array",code(e){const{gen:i,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=i.name("valid");r.forEach(((i,r)=>{if((0,t.alwaysValidSchema)(n,i))return;const o=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(o)}))}};return sn.default=e,sn}var an,hn={};function un(){if(an)return hn;an=1,Object.defineProperty(hn,"__esModule",{value:!0});const t=fe(),e=pe(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>t.str`must match "${e.ifClause}" schema`,params:({params:e})=>t._`{failingKeyword: ${e.ifClause}}`},code(i){const{gen:n,parentSchema:s,it:o}=i;void 0===s.then&&void 0===s.else&&(0,e.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=r(o,"then"),h=r(o,"else");if(!a&&!h)return;const u=n.let("valid",!0),c=n.name("_valid");if(function(){const t=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);i.mergeEvaluated(t)}(),i.reset(),a&&h){const t=n.let("ifClause");i.setParams({ifClause:t}),n.if(c,f("then",t),f("else",t))}else a?n.if(c,f("then")):n.if((0,t.not)(c),f("else"));function f(e,r){return()=>{const s=i.subschema({keyword:e},c);n.assign(u,c),i.mergeValidEvaluated(s,u),r?n.assign(r,t._`${e}`):i.setParams({ifClause:e})}}i.pass(u,(()=>i.error(!0)))}};function r(t,i){const r=t.schema[i];return void 0!==r&&!(0,e.alwaysValidSchema)(t,r)}return hn.default=i,hn}var cn,fn,ln={};function dn(){if(cn)return ln;cn=1,Object.defineProperty(ln,"__esModule",{value:!0});const t=pe(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:i,it:r}){void 0===i.if&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};return ln.default=e,ln}function pn(){if(fn)return gr;fn=1,Object.defineProperty(gr,"__esModule",{value:!0});const t=wr(),e=xr(),i=Sr(),r=Pr(),n=Ar(),s=Mr(),o=Lr(),a=qr(),h=Br(),u=Kr(),c=Zr(),f=Xr(),l=rn(),d=on(),p=un(),m=dn();return gr.default=function(v=!1){const y=[c.default,f.default,l.default,d.default,p.default,m.default,o.default,a.default,s.default,h.default,u.default];return v?y.push(e.default,r.default):y.push(t.default,i.default),y.push(n.default),y},gr}var mn,vn,yn={},gn={};function $n(){if(mn)return gn;mn=1,Object.defineProperty(gn,"__esModule",{value:!0});const t=fe(),e={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>t.str`must match format "${e}"`,params:({schemaCode:e})=>t._`{format: ${e}}`},code(e,i){const{gen:r,data:n,$data:s,schema:o,schemaCode:a,it:h}=e,{opts:u,errSchemaPath:c,schemaEnv:f,self:l}=h;u.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:l.formats,code:u.code.formats}),o=r.const("fDef",t._`${s}[${a}]`),h=r.let("fType"),c=r.let("format");r.if(t._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(h,t._`${o}.type || "string"`).assign(c,t._`${o}.validate`)),(()=>r.assign(h,t._`"string"`).assign(c,o))),e.fail$data((0,t.or)(!1===u.strictSchema?t.nil:t._`${a} && !${c}`,function(){const e=f.$async?t._`(${o}.async ? await ${c}(${n}) : ${c}(${n}))`:t._`${c}(${n})`,r=t._`(typeof ${c} == "function" ? ${e} : ${c}.test(${n}))`;return t._`${c} && ${c} !== true && ${h} === ${i} && !${r}`}()))}():function(){const s=l.formats[o];if(!s)return void function(){if(!1!==u.strictSchema)throw new Error(t());function t(){return`unknown format "${o}" ignored in schema at path "${c}"`}l.logger.warn(t())}();if(!0===s)return;const[a,h,d]=function(e){const i=e instanceof RegExp?(0,t.regexpCode)(e):u.code.formats?t._`${u.code.formats}${(0,t.getProperty)(o)}`:void 0,n=r.scopeValue("formats",{key:o,ref:e,code:i});return"object"!=typeof e||e instanceof RegExp?["string",e,n]:[e.type||"string",e.validate,t._`${n}.validate`]}(s);a===i&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!f.$async)throw new Error("async format in sync schema");return t._`await ${d}(${n})`}return"function"==typeof h?t._`${d}(${n})`:t._`${d}.test(${n})`}())}())}};return gn.default=e,gn}function wn(){return vn||(vn=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.default=[$n().default]),yn}var bn,_n,En={};function kn(){return bn||(bn=1,Object.defineProperty(En,"__esModule",{value:!0}),En.contentVocabulary=En.metadataVocabulary=void 0,En.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],En.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),En}function Sn(){if(_n)return Ei;_n=1,Object.defineProperty(Ei,"__esModule",{value:!0});const t=Ci(),e=vr(),i=pn(),r=wn(),n=kn(),s=[t.default,e.default,(0,i.default)(),r.default,n.metadataVocabulary,n.contentVocabulary];return Ei.default=s,Ei}var xn,On,jn={},Pn={};function In(){return xn||(xn=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(t||(Pn.DiscrError=t={}))),Pn;var t}function Cn(){if(On)return jn;On=1,Object.defineProperty(jn,"__esModule",{value:!0});const t=fe(),e=In(),i=hi(),r=si(),n=pe(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:i}})=>t===e.DiscrError.Tag?`tag "${i}" must be string`:`value of tag "${i}" must be in oneOf`,params:({params:{discrError:e,tag:i,tagName:r}})=>t._`{error: ${e}, tag: ${r}, tagValue: ${i}}`},code(s){const{gen:o,data:a,schema:h,parentSchema:u,it:c}=s,{oneOf:f}=u;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=h.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(h.mapping)throw new Error("discriminator: mapping is not supported");if(!f)throw new Error("discriminator: requires oneOf keyword");const d=o.let("valid",!1),p=o.const("tag",t._`${a}${(0,t.getProperty)(l)}`);function m(e){const i=o.name("valid"),r=s.subschema({keyword:"oneOf",schemaProp:e},i);return s.mergeEvaluated(r,t.Name),i}o.if(t._`typeof ${p} == "string"`,(()=>function(){const a=function(){var t;const e={},s=a(u);let o=!0;for(let e=0;e<f.length;e++){let u=f[e];if((null==u?void 0:u.$ref)&&!(0,n.schemaHasRulesButRef)(u,c.self.RULES)){const t=u.$ref;if(u=i.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,t),u instanceof i.SchemaEnv&&(u=u.schema),void 0===u)throw new r.default(c.opts.uriResolver,c.baseId,t)}const d=null===(t=null==u?void 0:u.properties)||void 0===t?void 0:t[l];if("object"!=typeof d)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);o=o&&(s||a(u)),h(d,e)}if(!o)throw new Error(`discriminator: "${l}" must be required`);return e;function a({required:t}){return Array.isArray(t)&&t.includes(l)}function h(t,e){if(t.const)d(t.const,e);else{if(!t.enum)throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`);for(const i of t.enum)d(i,e)}}function d(t,i){if("string"!=typeof t||t in e)throw new Error(`discriminator: "${l}" values must be unique strings`);e[t]=i}}();o.if(!1);for(const e in a)o.elseIf(t._`${p} === ${e}`),o.assign(d,m(a[e]));o.else(),s.error(!1,{discrError:e.DiscrError.Mapping,tag:p,tagName:l}),o.endIf()}()),(()=>s.error(!1,{discrError:e.DiscrError.Tag,tag:p,tagName:l}))),s.ok(d)}};return jn.default=s,jn}var An,Nn={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};function Tn(){return An||(An=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const i=bi(),r=Sn(),n=Cn(),s=Nn,o=["/properties"],a="http://json-schema.org/draft-07/schema";class h extends i.default{_addVocabularies(){super._addVocabularies(),r.default.forEach((t=>this.addVocabulary(t))),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(t,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv=h,t.exports=e=h,t.exports.Ajv=h,Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;var u=Xe();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var c=fe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var f=ii();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var l=si();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return l.default}})}(Xt,Xt.exports)),Xt.exports}var Mn,Rn,Dn,Ln,zn,Un=Tn(),qn={exports:{}},Fn=(Mn||(Mn=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const i=Tn(),r=fe(),n=oe(),s=Xe(),o=we(),a=$e(),h="errorMessage",u=new i.Name("emUsed"),c={required:"missingProperty",dependencies:"property",dependentRequired:"property"},f=/\$\{[^}]+\}/,l=/\$\{([^}]+)\}/g,d=/^""\s*\+\s*|\s*\+\s*""$/g;const p=(t,e={})=>{if(!t.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(t.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return t.addKeyword(function(t){return{keyword:h,schemaType:["string","object"],post:!0,code(e){const{gen:p,data:m,schema:v,schemaValue:y,it:g}=e;if(!1===g.createErrors)return;const $=v,w=r.strConcat(a.default.instancePath,g.errorPath);function b(t,e){return r.and(i._`${t}.keyword !== ${h}`,i._`!${t}.${u}`,i._`${t}.instancePath === ${w}`,i._`${t}.keyword in ${e}`,i._`${t}.schemaPath.indexOf(${g.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${t}.schemaPath.slice(${g.errSchemaPath.length}))`)}function _(t,e){const i=[];for(const r in t){const t=e[r];f.test(t)&&i.push([r,k(t)])}return p.object(...i)}function E(t){return f.test(t)?new n._Code(n.safeStringify(t).replace(l,((t,e)=>`" + JSON.stringify(${s.getData(e,g)}) + "`)).replace(d,"")):i.stringify(t)}function k(t){return i._`function(){return ${E(t)}}`}p.if(i._`${a.default.errors} > 0`,(()=>{if("object"==typeof $){const[n,s]=function(t){let e,i;for(const r in t){if("properties"===r||"items"===r)continue;const n=t[r];if("object"==typeof n){e||(e={});const t=e[r]={};for(const e in n)t[e]=[]}else i||(i={}),i[r]=[]}return[e,i]}($);s&&function(r){const n=p.const("emErrors",i.stringify(r)),s=p.const("templates",_(r,v));p.forOf("err",a.default.vErrors,(t=>p.if(b(t,n),(()=>p.code(i._`${n}[${t}.keyword].push(${t})`).assign(i._`${t}.${u}`,!0)))));const{singleError:h}=t;if(h){const t=p.let("message",i._`""`),r=p.let("paramsErrors",i._`[]`);c((e=>{p.if(t,(()=>p.code(i._`${t} += ${"string"==typeof h?h:";"}`))),p.code(i._`${t} += ${f(e)}`),p.assign(r,i._`${r}.concat(${n}[${e}])`)})),o.reportError(e,{message:t,params:i._`{errors: ${r}}`})}else c((t=>o.reportError(e,{message:f(t),params:i._`{errors: ${n}[${t}]}`})));function c(t){p.forIn("key",n,(e=>p.if(i._`${n}[${e}].length`,(()=>t(e)))))}function f(t){return i._`${t} in ${s} ? ${s}[${t}]() : ${y}[${t}]`}}(s),n&&function(t){const r=p.const("emErrors",i.stringify(t)),n=[];for(const e in t)n.push([e,_(t[e],v[e])]);const s=p.const("templates",p.object(...n)),h=p.scopeValue("obj",{ref:c,code:i.stringify(c)}),f=p.let("emPropParams"),l=p.let("emParamsErrors");p.forOf("err",a.default.vErrors,(t=>p.if(b(t,r),(()=>{p.assign(f,i._`${h}[${t}.keyword]`),p.assign(l,i._`${r}[${t}.keyword][${t}.params[${f}]]`),p.if(l,(()=>p.code(i._`${l}.push(${t})`).assign(i._`${t}.${u}`,!0)))})))),p.forIn("key",r,(t=>p.forIn("keyProp",i._`${r}[${t}]`,(n=>{p.assign(l,i._`${r}[${t}][${n}]`),p.if(i._`${l}.length`,(()=>{const r=p.const("tmpl",i._`${s}[${t}] && ${s}[${t}][${n}]`);o.reportError(e,{message:i._`${r} ? ${r}() : ${y}[${t}][${n}]`,params:i._`{errors: ${l}}`})}))}))))}(n),function(t){const{props:n,items:s}=t;if(!n&&!s)return;const c=i._`typeof ${m} == "object"`,f=i._`Array.isArray(${m})`,l=p.let("emErrors");let d,g;const $=p.let("templates");function b(t,e){p.assign(l,i.stringify(t)),p.assign($,_(t,e))}n&&s?(d=p.let("emChildKwd"),p.if(c),p.if(f,(()=>{b(s,v.items),p.assign(d,i.str`items`)}),(()=>{b(n,v.properties),p.assign(d,i.str`properties`)})),g=i._`[${d}]`):s?(p.if(f),b(s,v.items),g=i._`.items`):n&&(p.if(r.and(c,r.not(f))),b(n,v.properties),g=i._`.properties`),p.forOf("err",a.default.vErrors,(t=>function(t,e,n){p.if(r.and(i._`${t}.keyword !== ${h}`,i._`!${t}.${u}`,i._`${t}.instancePath.indexOf(${w}) === 0`),(()=>{const r=p.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=p.const("emMatches",i._`${r}.exec(${t}.instancePath.slice(${w}.length))`),o=p.const("emChild",i._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);p.if(i._`${o} !== undefined && ${o} in ${e}`,(()=>n(o)))}))}(t,l,(e=>p.code(i._`${l}[${e}].push(${t})`).assign(i._`${t}.${u}`,!0))))),p.forIn("key",l,(t=>p.if(i._`${l}[${t}].length`,(()=>{o.reportError(e,{message:i._`${t} in ${$} ? ${$}[${t}]() : ${y}${g}[${t}]`,params:i._`{errors: ${l}[${t}]}`}),p.assign(i._`${a.default.vErrors}[${a.default.errors}-1].instancePath`,i._`${w} + "/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),p.endIf()}(function({properties:t,items:e}){const i={};if(t){i.props={};for(const e in t)i.props[e]=[]}if(e){i.items={};for(let t=0;t<e.length;t++)i.items[t]=[]}return i}($))}const n="string"==typeof $?$:$._;n&&function(t){const n=p.const("emErrs",i._`[]`);p.forOf("err",a.default.vErrors,(t=>p.if(function(t){return r.and(i._`${t}.keyword !== ${h}`,i._`!${t}.${u}`,r.or(i._`${t}.instancePath === ${w}`,r.and(i._`${t}.instancePath.indexOf(${w}) === 0`,i._`${t}.instancePath[${w}.length] === "/"`)),i._`${t}.schemaPath.indexOf(${g.errSchemaPath}) === 0`,i._`${t}.schemaPath[${g.errSchemaPath}.length] === "/"`)}(t),(()=>p.code(i._`${n}.push(${t})`).assign(i._`${t}.${u}`,!0))))),p.if(i._`${n}.length`,(()=>o.reportError(e,{message:E(t),params:i._`{errors: ${n}}`})))}(n),t.keepErrors||function(){const t=p.const("emErrs",i._`[]`);p.forOf("err",a.default.vErrors,(e=>p.if(i._`!${e}.${u}`,(()=>p.code(i._`${t}.push(${e})`))))),p.assign(a.default.vErrors,t).assign(a.default.errors,i._`${t}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(e))};e.default=p,t.exports=p,t.exports.default=p}(qn,qn.exports)),qn.exports),Vn=t(Fn),Bn={exports:{}},Gn={},Hn={},Kn=(Ln||(Ln=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const i=(Rn||(Rn=1,function(t){function e(t,e){return{validate:t,compare:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:e(n,s),time:e(a(!0),h),"date-time":e(f(!0),l),"iso-time":e(a(),u),"iso-date-time":e(f(),d),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(t){return p.test(t)&&m.test(t)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(t){if(w.test(t))return!1;try{return!0}catch(t){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(t){return v.lastIndex=0,v.test(t)},int32:{type:"number",validate:function(t){return Number.isInteger(t)&&t<=g&&t>=y}},int64:{type:"number",validate:function(t){return Number.isInteger(t)}},float:{type:"number",validate:$},double:{type:"number",validate:$},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function n(t){const e=i.exec(t);if(!e)return!1;const n=+e[2],s=+e[3];return n>=1&&n<=12&&s>=1&&s<=(2!==n||(o=+e[1])%4!=0||o%100==0&&o%400!=0?r[n]:29);var o}function s(t,e){if(t&&e)return t>e?1:t<e?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function a(t){return function(e){const i=o.exec(e);if(!i)return!1;const r=+i[1],n=+i[2],s=+i[3],a="-"===i[5]?-1:1,h=+(i[6]||0),u=+(i[7]||0);if(h>23||u>59||t&&!i[4])return!1;if(r<=23&&n<=59&&s<60)return!0;const c=n-u*a,f=r-h*a-(c<0?1:0);return(23===f||-1===f)&&(59===c||-1===c)&&s<61}}function h(t,e){if(!t||!e)return;const i=new Date("2020-01-01T"+t).valueOf(),r=new Date("2020-01-01T"+e).valueOf();return i&&r?i-r:void 0}function u(t,e){if(!t||!e)return;const i=o.exec(t),r=o.exec(e);return i&&r?(t=i[1]+i[2]+i[3])>(e=r[1]+r[2]+r[3])?1:t<e?-1:0:void 0}const c=/t|\s/i;function f(t){const e=a(t);return function(t){const i=t.split(c);return 2===i.length&&n(i[0])&&e(i[1])}}function l(t,e){if(!t||!e)return;const i=new Date(t).valueOf(),r=new Date(e).valueOf();return i&&r?i-r:void 0}function d(t,e){if(!t||!e)return;const[i,r]=t.split(c),[n,o]=e.split(c),a=s(i,n);return void 0!==a?a||h(r,o):void 0}const p=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,y=-2147483648,g=2**31-1;function $(){return!0}const w=/[^\\]\\Z/}(Gn)),Gn),r=(Dn||(Dn=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=Tn(),i=fe(),r=i.operators,n={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:t,schemaCode:e})=>i.str`should be ${n[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>i._`{comparison: ${n[t].okStr}, limit: ${e}}`};t.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:s,code(t){const{gen:r,data:s,schemaCode:o,keyword:a,it:h}=t,{opts:u,self:c}=h;if(!u.validateFormats)return;const f=new e.KeywordCxt(h,c.RULES.all.format.definition,"format");function l(t){return i._`${t}.compare(${s}, ${o}) ${n[a].fail} 0`}f.$data?function(){const e=r.scopeValue("formats",{ref:c.formats,code:u.code.formats}),n=r.const("fmt",i._`${e}[${f.schemaCode}]`);t.fail$data((0,i.or)(i._`typeof ${n} != "object"`,i._`${n} instanceof RegExp`,i._`typeof ${n}.compare != "function"`,l(n)))}():function(){const e=f.schema,n=c.formats[e];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${e}" does not define "compare" function`);const s=r.scopeValue("formats",{key:e,ref:n,code:u.code.formats?i._`${u.code.formats}${(0,i.getProperty)(e)}`:void 0});t.fail$data(l(s))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)}(Hn)),Hn),n=fe(),s=new n.Name("fullFormats"),o=new n.Name("fastFormats"),a=(t,e={keywords:!0})=>{if(Array.isArray(e))return h(t,e,i.fullFormats,s),t;const[n,a]="fast"===e.mode?[i.fastFormats,o]:[i.fullFormats,s];return h(t,e.formats||i.formatNames,n,a),e.keywords&&(0,r.default)(t),t};function h(t,e,i,r){var s,o;null!==(s=(o=t.opts.code).formats)&&void 0!==s||(o.formats=n._`require("ajv-formats/dist/formats").${r}`);for(const r of e)t.addFormat(r,i[r])}a.get=(t,e="full")=>{const r=("fast"===e?i.fastFormats:i.fullFormats)[t];if(!r)throw new Error(`Unknown format "${t}"`);return r},t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a}(Bn,Bn.exports)),Bn.exports),Jn=t(Kn),Wn=(zn=function(t,e){return zn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},zn(t,e)},function(t,e){function i(){this.constructor=t}zn(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Zn=Object.prototype.hasOwnProperty;function Yn(t,e){return Zn.call(t,e)}function Qn(t){if(Array.isArray(t)){for(var e=new Array(t.length),i=0;i<e.length;i++)e[i]=""+i;return e}if(Object.keys)return Object.keys(t);var r=[];for(var n in t)Yn(t,n)&&r.push(n);return r}function Xn(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function ts(t){for(var e,i=0,r=t.length;i<r;){if(!((e=t.charCodeAt(i))>=48&&e<=57))return!1;i++}return!0}function es(t){return-1===t.indexOf("/")&&-1===t.indexOf("~")?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function is(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function rs(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var e=0,i=t.length;e<i;e++)if(rs(t[e]))return!0}else if("object"==typeof t)for(var r=Qn(t),n=r.length,s=0;s<n;s++)if(rs(t[r[s]]))return!0;return!1}function ns(t,e){var i=[t];for(var r in e){var n="object"==typeof e[r]?JSON.stringify(e[r],null,2):e[r];void 0!==n&&i.push(r+": "+n)}return i.join("\n")}var ss=function(t){function e(e,i,r,n,s){var o=this.constructor,a=t.call(this,ns(e,{name:i,index:r,operation:n,tree:s}))||this;return a.name=i,a.index=r,a.operation=n,a.tree=s,Object.setPrototypeOf(a,o.prototype),a.message=ns(e,{name:i,index:r,operation:n,tree:s}),a}return Wn(e,t),e}(Error),os=ss,as={add:function(t,e,i){return t[e]=this.value,{newDocument:i}},remove:function(t,e,i){var r=t[e];return delete t[e],{newDocument:i,removed:r}},replace:function(t,e,i){var r=t[e];return t[e]=this.value,{newDocument:i,removed:r}},move:function(t,e,i){var r=us(i,this.path);r&&(r=Xn(r));var n=cs(i,{op:"remove",path:this.from}).removed;return cs(i,{op:"add",path:this.path,value:n}),{newDocument:i,removed:r}},copy:function(t,e,i){var r=us(i,this.from);return cs(i,{op:"add",path:this.path,value:Xn(r)}),{newDocument:i}},test:function(t,e,i){return{newDocument:i,test:ms(t[e],this.value)}},_get:function(t,e,i){return this.value=t[e],{newDocument:i}}},hs={add:function(t,e,i){return ts(e)?t.splice(e,0,this.value):t[e]=this.value,{newDocument:i,index:e}},remove:function(t,e,i){return{newDocument:i,removed:t.splice(e,1)[0]}},replace:function(t,e,i){var r=t[e];return t[e]=this.value,{newDocument:i,removed:r}},move:as.move,copy:as.copy,test:as.test,_get:as._get};function us(t,e){if(""==e)return t;var i={op:"_get",path:e};return cs(t,i),i.value}function cs(t,e,i,r,n,s){if(void 0===i&&(i=!1),void 0===r&&(r=!0),void 0===n&&(n=!0),void 0===s&&(s=0),i&&("function"==typeof i?i(e,0,t,e.path):ds(e,0)),""===e.path){var o={newDocument:t};if("add"===e.op)return o.newDocument=e.value,o;if("replace"===e.op)return o.newDocument=e.value,o.removed=t,o;if("move"===e.op||"copy"===e.op)return o.newDocument=us(t,e.from),"move"===e.op&&(o.removed=t),o;if("test"===e.op){if(o.test=ms(t,e.value),!1===o.test)throw new os("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o.newDocument=t,o}if("remove"===e.op)return o.removed=t,o.newDocument=null,o;if("_get"===e.op)return e.value=t,o;if(i)throw new os("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,e,t);return o}r||(t=Xn(t));var a=(e.path||"").split("/"),h=t,u=1,c=a.length,f=void 0,l=void 0,d=void 0;for(d="function"==typeof i?i:ds;;){if((l=a[u])&&-1!=l.indexOf("~")&&(l=is(l)),n&&("__proto__"==l||"prototype"==l&&u>0&&"constructor"==a[u-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(i&&void 0===f&&(void 0===h[l]?f=a.slice(0,u).join("/"):u==c-1&&(f=e.path),void 0!==f&&d(e,0,t,f)),u++,Array.isArray(h)){if("-"===l)l=h.length;else{if(i&&!ts(l))throw new os("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,e,t);ts(l)&&(l=~~l)}if(u>=c){if(i&&"add"===e.op&&l>h.length)throw new os("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,e,t);if(!1===(o=hs[e.op].call(e,h,l,t)).test)throw new os("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}}else if(u>=c){if(!1===(o=as[e.op].call(e,h,l,t)).test)throw new os("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}if(h=h[l],i&&u<c&&(!h||"object"!=typeof h))throw new os("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,e,t)}}function fs(t,e,i,r,n){if(void 0===r&&(r=!0),void 0===n&&(n=!0),i&&!Array.isArray(e))throw new os("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(t=Xn(t));for(var s=new Array(e.length),o=0,a=e.length;o<a;o++)s[o]=cs(t,e[o],i,!0,n,o),t=s[o].newDocument;return s.newDocument=t,s}function ls(t,e,i){var r=cs(t,e);if(!1===r.test)throw new os("Test operation failed","TEST_OPERATION_FAILED",i,e,t);return r.newDocument}function ds(t,e,i,r){if("object"!=typeof t||null===t||Array.isArray(t))throw new os("Operation is not an object","OPERATION_NOT_AN_OBJECT",e,t,i);if(!as[t.op])throw new os("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",e,t,i);if("string"!=typeof t.path)throw new os("Operation `path` property is not a string","OPERATION_PATH_INVALID",e,t,i);if(0!==t.path.indexOf("/")&&t.path.length>0)throw new os('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",e,t,i);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new os("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",e,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new os("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",e,t,i);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&rs(t.value))throw new os("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",e,t,i);if(i)if("add"==t.op){var n=t.path.split("/").length,s=r.split("/").length;if(n!==s+1&&n!==s)throw new os("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",e,t,i)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==r)throw new os("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",e,t,i)}else if("move"===t.op||"copy"===t.op){var o=ps([{op:"_get",path:t.from,value:void 0}],i);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new os("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,i)}}function ps(t,e,i){try{if(!Array.isArray(t))throw new os("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)fs(Xn(e),Xn(t),i||!0);else{i=i||ds;for(var r=0;r<t.length;r++)i(t[r],r,e,void 0)}}catch(t){if(t instanceof os)return t;throw t}}function ms(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var i,r,n,s=Array.isArray(t),o=Array.isArray(e);if(s&&o){if((r=t.length)!=e.length)return!1;for(i=r;0!=i--;)if(!ms(t[i],e[i]))return!1;return!0}if(s!=o)return!1;var a=Object.keys(t);if((r=a.length)!==Object.keys(e).length)return!1;for(i=r;0!=i--;)if(!e.hasOwnProperty(a[i]))return!1;for(i=r;0!=i--;)if(!ms(t[n=a[i]],e[n]))return!1;return!0}return t!=t&&e!=e}var vs=Object.freeze({__proto__:null,JsonPatchError:os,_areEquals:ms,applyOperation:cs,applyPatch:fs,applyReducer:ls,deepClone:Xn,getValueByPointer:us,validate:ps,validator:ds}),ys=new WeakMap,gs=function(t){this.observers=new Map,this.obj=t},$s=function(t,e){this.callback=t,this.observer=e};
8
8
  /*!
9
9
  * https://github.com/Starcounter-Jack/JSON-Patch
10
10
  * (c) 2017-2021 Joachim Wester
11
11
  * MIT license
12
- */function gs(t,e){e.unobserve()}function bs(t,e){var i,r=function(t){return ys.get(t)}(t);if(r){var n=function(t,e){return t.observers.get(e)}(r,e);i=n&&n.observer}else r=new $s(t),ys.set(t,r);if(i)return i;if(i={},r.value=Yn(t),e){i.callback=e,i.next=null;var s=function(){_s(i)},o=function(){clearTimeout(i.next),i.next=setTimeout(s)};"undefined"!=typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return i.patches=[],i.object=t,i.unobserve=function(){_s(i),clearTimeout(i.next),function(t,e){t.observers.delete(e.callback)}(r,i),"undefined"!=typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},r.observers.set(e,new ws(e,i)),i}function _s(t,e){void 0===e&&(e=!1);var i=ys.get(t.object);Es(i.value,t.object,t.patches,"",e),t.patches.length&&fs(i.value,t.patches);var r=t.patches;return r.length>0&&(t.patches=[],t.callback&&t.callback(r)),r}function Es(t,e,i,r,n){if(e!==t){"function"==typeof e.toJSON&&(e=e.toJSON());for(var s=Qn(e),o=Qn(t),a=!1,h=o.length-1;h>=0;h--){var u=t[f=o[h]];if(!Xn(e,f)||void 0===e[f]&&void 0!==u&&!1===Array.isArray(e))Array.isArray(t)===Array.isArray(e)?(n&&i.push({op:"test",path:r+"/"+es(f),value:Yn(u)}),i.push({op:"remove",path:r+"/"+es(f)}),a=!0):(n&&i.push({op:"test",path:r,value:t}),i.push({op:"replace",path:r,value:e}));else{var c=e[f];"object"==typeof u&&null!=u&&"object"==typeof c&&null!=c&&Array.isArray(u)===Array.isArray(c)?Es(u,c,i,r+"/"+es(f),n):u!==c&&(n&&i.push({op:"test",path:r+"/"+es(f),value:Yn(u)}),i.push({op:"replace",path:r+"/"+es(f),value:Yn(c)}))}}if(a||s.length!=o.length)for(h=0;h<s.length;h++){var f;Xn(t,f=s[h])||void 0===e[f]||i.push({op:"add",path:r+"/"+es(f),value:Yn(e[f])})}}}function Os(t,e,i){void 0===i&&(i=!1);var r=[];return Es(t,e,r,"",i),r}var js=Object.assign({},vs,Object.freeze({__proto__:null,compare:Os,generate:_s,observe:bs,unobserve:gs}),{JsonPatchError:ss,deepClone:Yn,escapePathComponent:es,unescapePathComponent:is}),Ss=Object.freeze({__proto__:null,JsonPatchError:ss,_areEquals:ms,applyOperation:cs,applyPatch:fs,applyReducer:ls,compare:Os,deepClone:Yn,default:js,escapePathComponent:es,generate:_s,getValueByPointer:us,observe:bs,unescapePathComponent:is,unobserve:gs,validate:ps,validator:ds});function xs(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&Object.keys(t).length>0&&Object.values(t).every((t=>"string"==typeof t))}function ks(t,e){return xs(t)?e&&void 0!==t[e]?t[e]:Object.values(t)[0]:t}function Ps(t,e){if(!t)return t;const i={};for(const[r,n]of Object.entries(t))i[r]=ks(n,e);return i}var Is={en:{required:"This field is required",minLength:"Must be at least {value} characters",maxLength:"Must be at most {value} characters",min:"Must be at least {value}",max:"Must be at most {value}",pattern:"Invalid format",minItems:"Select at least {value} item(s)",maxItems:"Select at most {value} item(s)",email:"Invalid email address",url:"Invalid URL",type:"Invalid value",custom:"Invalid value"},fr:{required:"Ce champ est obligatoire",minLength:"Minimum {value} caractères",maxLength:"Maximum {value} caractères",min:"Minimum {value}",max:"Maximum {value}",pattern:"Format invalide",minItems:"Sélectionnez au moins {value} élément(s)",maxItems:"Sélectionnez au plus {value} élément(s)",email:"Adresse email invalide",url:"URL invalide",type:"Valeur invalide",custom:"Valeur invalide"}};function As(t,e,i){return((Is[e??"en"]??Is.en)[t]??Is.en[t]??"Invalid value").replace("{value}",String(i??""))}function*Cs(t,e="0"){if(t){yield{brick:t,path:e};for(const[i,r]of(t.children??[]).entries())yield*Cs(r,`${e}.${i}`)}}function*Ns(t){if(t&&(yield t,"collection"!==t.type))for(const e of t.children??[])yield*Ns(e)}class Ts{type;dataType;id;name;configsForm;category;styles;unWrapData;isPrivate;validators;defaultConfigs;constructor(t){this.type=t.type,this.dataType=t.dataType,this.id=t.id,this.name=t.name,this.configsForm=t.configsForm,this.category=t.category,this.styles=t.styles,this.unWrapData=t.unWrapData??!1,this.isPrivate=t.isPrivate??!1,this.validators=t.validators??[],this.defaultConfigs=t.defaultConfigs}getBrickEmptySpec(){return{type:this.type,dataType:this.dataType,id:this.id,name:this.name,...void 0!==this.category?{category:this.category}:{},...void 0!==this.configsForm?{configsForm:this.configsForm}:{},...void 0!==this.styles?{styles:this.styles}:{},...void 0!==this.defaultConfigs?{configs:{...this.defaultConfigs}}:{},validators:this.validators}}}var Ms=new Set(["__proto__","constructor","prototype"]);class Rs{value;constructor(t){this.value=t}}var Ds=(t,e,i)=>{t.scopes[t.scopes.length-1].set(e,i)},zs=t=>{if("number"==typeof t)return t;const e=String(t);if(Ms.has(e))throw new Error(`Access to "${e}" is not allowed`);return e},Ls=(t,e)=>({object:Us(t,e.object),prop:zs(e.computed?Us(t,e.property):e.property.name),optional:!0===e.optional}),Us=(t,e)=>{if(++t.steps>1e5)throw new Error("Sandbox execution budget exceeded");switch(e.type){case"Program":case"BlockStatement":for(const i of e.body){const e=Us(t,i);if(e instanceof Rs)return e}return;case"ReturnStatement":return new Rs(e.argument?Us(t,e.argument):void 0);case"IfStatement":return Us(t,e.test)?Us(t,e.consequent):e.alternate?Us(t,e.alternate):void 0;case"VariableDeclaration":for(const i of e.declarations){const e=i.id;if("Identifier"!==e.type)throw new Error("Only simple variable names are supported");Ds(t,e.name,i.init?Us(t,i.init):void 0)}return;case"ExpressionStatement":return void Us(t,e.expression);case"Literal":return e.value;case"TemplateLiteral":{const i=e.expressions;let r="";return e.quasis.forEach(((e,n)=>{r+=e.value.cooked??"",n<i.length&&(r+=String(Us(t,i[n])))})),r}case"Identifier":return((t,e)=>{for(let i=t.scopes.length-1;i>=0;i--)if(t.scopes[i].has(e))return t.scopes[i].get(e);throw new Error(`Unknown identifier "${e}"`)})(t,e.name);case"ThisExpression":return;case"ChainExpression":return Us(t,e.expression);case"MemberExpression":return((t,e)=>{const{object:i,prop:r,optional:n}=Ls(t,e);if(null==i){if(n)return;throw new Error(`Cannot read "${String(r)}" of ${String(i)}`)}return i[r]})(t,e);case"CallExpression":{const i=e.callee,r=[];for(const i of e.arguments)if("SpreadElement"===i.type){const e=Us(t,i.argument);Array.isArray(e)&&r.push(...e)}else r.push(Us(t,i));if("MemberExpression"===i.type){const{object:n,prop:s,optional:o}=Ls(t,i);if(null==n){if(o||!0===e.optional)return;throw new Error(`Cannot call "${String(s)}" of ${String(n)}`)}const a=n[s];if("function"!=typeof a){if(!0===e.optional&&null==a)return;throw new Error(`"${String(s)}" is not a function`)}if(a===Function||a===eval)throw new Error("This function is not allowed");return a.apply(n,r)}const n=Us(t,i);if("function"!=typeof n){if(!0===e.optional&&null==n)return;throw new Error("Value is not a function")}if(n===Function||n===eval)throw new Error("This function is not allowed");return n(...r)}case"ArrowFunctionExpression":{const i=e.params,r=e.body,n=[...t.scopes];return(...s)=>{const o=new Map;i.forEach(((t,e)=>{if("Identifier"!==t.type)throw new Error("Only simple parameters are supported");o.set(t.name,s[e])}));const a={steps:t.steps,scopes:[...n,o]},h=Us(a,r);return t.steps=a.steps,h instanceof Rs?h.value:!0===e.expression?h:void 0}}case"BinaryExpression":{const i=Us(t,e.left),r=Us(t,e.right);switch(e.operator){case"===":return i===r;case"!==":return i!==r;case"==":return i==r;case"!=":return i!=r;case"<":return i<r;case"<=":return i<=r;case">":return i>r;case">=":return i>=r;case"+":return i+r;case"-":return i-r;case"*":return i*r;case"/":return i/r;case"%":return i%r;case"**":return i**r;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"LogicalExpression":{const i=Us(t,e.left);switch(e.operator){case"&&":return i&&Us(t,e.right);case"||":return i||Us(t,e.right);case"??":return i??Us(t,e.right);default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"UnaryExpression":{const i=Us(t,e.argument);switch(e.operator){case"!":return!i;case"-":return-i;case"+":return+i;case"typeof":return typeof i;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"ConditionalExpression":return Us(t,e.test)?Us(t,e.consequent):Us(t,e.alternate);case"AssignmentExpression":{const i=e.left;if("Identifier"!==i.type||"="!==e.operator)throw new Error("Only simple assignments are supported");const r=Us(t,e.right);return((t,e,i)=>{for(let r=t.scopes.length-1;r>=0;r--)if(t.scopes[r].has(e))return void t.scopes[r].set(e,i);throw new Error(`Cannot assign to unknown identifier "${e}"`)})(t,i.name,r),r}case"ArrayExpression":{const i=[];for(const r of e.elements)if(r)if("SpreadElement"===r.type){const e=Us(t,r.argument);Array.isArray(e)&&i.push(...e)}else i.push(Us(t,r));return i}case"ObjectExpression":{const i={};for(const r of e.properties){if("SpreadElement"===r.type){const e=Us(t,r.argument);if(e&&"object"==typeof e)for(const[t,r]of Object.entries(e))i[String(zs(t))]=r;continue}const e=r.key,n=zs(r.computed?Us(t,e):"Identifier"===e.type?e.name:e.value);i[String(n)]=Us(t,r.value)}return i}default:throw new Error(`Unsupported syntax: ${e.type}`)}},qs={undefined:void 0,NaN:NaN,Infinity:1/0,Math,JSON,Number,String,Boolean,Array,Object,Date,parseInt,parseFloat,isNaN,isFinite};class Fs{defaults;cache=new Map;constructor(t={}){this.defaults=t}resolveUrl(t){return/^https?:\/\//.test(t)||!this.defaults.baseUrl?t:`${this.defaults.baseUrl.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}fetchSpec(t){const e=this.resolveUrl(t);let i=this.cache.get(e);return i||(i=(this.defaults.fetch??globalThis.fetch.bind(globalThis))(e,{headers:this.defaults.headers,credentials:this.defaults.credentials}).then((async e=>{if(!e.ok)throw new Error(`Failed to load spec "${t}" (${e.status})`);return await e.json()})),i.catch((()=>this.cache.delete(e))),this.cache.set(e,i)),i}}class Bs{defaults;cache=new Map;constructor(t={}){this.defaults=t}resolveUrl(t){return/^https?:\/\//.test(t)||!this.defaults.baseUrl?t:`${this.defaults.baseUrl.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}fetchOptions(t){const e=this.resolveUrl(t);let i=this.cache.get(e);return i||(i=(this.defaults.fetch??globalThis.fetch.bind(globalThis))(e,{headers:this.defaults.headers,credentials:this.defaults.credentials}).then((async e=>{if(!e.ok)throw new Error(`Failed to load options "${t}" (${e.status})`);return await e.json()})),i.catch((()=>this.cache.delete(e))),this.cache.set(e,i)),i}}var Vs=Symbol.for("formkrafter.core.services"),Gs=globalThis,Hs=Gs[Vs]??={jsRunnerService:new class{validateJs(t,e={ecmaVersion:"latest",allowReturnOutsideFunction:!0}){try{return Xt(t,e),{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t:new Error(String(t))}}}eval(t,e={}){return function(t,e={}){const i=Xt(t,{ecmaVersion:"latest",allowReturnOutsideFunction:!0}),r={steps:0,scopes:[new Map(Object.entries({...qs,...e})),new Map]},n=Us(r,i);return n instanceof Rs?n.value:void 0}(t,e)}},dataSourceService:new class{defaults;cache=new Map;constructor(t={}){this.defaults=t}fetchOptions(t,e){const i={...this.defaults.headers,...e?.headers},r={};Object.keys(i).length&&(r.headers=i),this.defaults.credentials&&(r.credentials=this.defaults.credentials);const n=`${t}|${JSON.stringify(r)}`;let s=this.cache.get(n);return s||(s=fetch(t,Object.keys(r).length?r:void 0).then((e=>{if(!e.ok)throw new Error(`Data source request failed (${e.status}): ${t}`);return e.json()})).then((t=>Array.isArray(t)?t:[])).catch((t=>{throw this.cache.delete(n),t})),this.cache.set(n,s)),s}},fileUploadService:new class{async upload(t){const e=globalThis.btoa;if(!e)throw new Error("No base64 encoder available");const i=new Uint8Array(await t.arrayBuffer());let r="";for(const t of i)r+=String.fromCharCode(t);return{name:t.name,type:t.type,size:t.size,url:`data:${t.type};base64,${e(r)}`}}},specSourceService:new Fs,optionSourceService:new Bs};Hs.specSourceService??=new Fs,Hs.optionSourceService??=new Bs;var Ks=(t,e)=>{try{return Hs.jsRunnerService.eval(t,{dataMap:e??{}})}catch(t){return t instanceof Error?t:new Error(String(t))}},Ws=(t,e)=>((t,e)=>((t,e)=>t?.filter((t=>((t,e)=>"jsonLogic"===t.type?null!=t.logic&&!0===n.apply(t.logic,e):"javaScript"===t.type&&!!t.code&&!0===Ks(t.code,e))(t,e))))(t,e)?.map((t=>t.effects)).flat().filter((t=>null!=t)))(t,e)?.map((t=>{let i;return t.property?("boolean"===t.property.type?i=t.boolean:"logic"===t.property.type&&null!=t.logic?i=n.apply(t.logic,e):"code"===t.property.type&&t.code?i=Ks(t.code,e):"string"===t.property.type&&(i=t.string),{[t.property.target]:i}):{}})).flat().reduce(((t,e)=>({...t,...e})),{})??{hidden:!1},Js=new Un.Ajv({allErrors:!0});Wn(Js,["email","uri"]),Bn(Js);var Zs=new WeakMap,Xs=t=>{if("required"===t.keyword)return t.params.missingProperty;if("errorMessage"===t.keyword){const e=t.params.errors?.[0];return e?Xs(e):void 0}return t.instancePath.split("/").filter(Boolean)[0]},Qs=(t,e,i)=>{const r={},n=((t,e)=>{let i=Zs.get(t);i||(i=new Map,Zs.set(t,i));const r=e??"";let n=i.get(r);if(!n){const s=function(t,e){if(!t)return;const i={},r=[],n={},s=t=>{const i=ks(t,e);return"string"==typeof i?i:void 0};for(const o of Ns(t)){const t=o.configs?.key,a=!0===o.configs?.multiple&&"object"===o.dataType?"array":o.dataType;if(!t||!a||"void"===a)continue;const h=o.validations?.find((t=>"required"===t.validator)),u={type:a,nullable:!h},c={type:As("type",e)};for(const t of o.validations??[]){const{validator:i,value:r}=t,n=s(t.message)??As(i,e,r);"minLength"===i&&null!=r?(u.minLength=Number(r),c.minLength=n):"maxLength"===i&&null!=r?(u.maxLength=Number(r),c.maxLength=n):"min"===i&&null!=r?(u.minimum=Number(r),c.minimum=n):"max"===i&&null!=r?(u.maximum=Number(r),c.maximum=n):"pattern"===i&&"string"==typeof r&&r?(u.pattern=r,c.pattern=n):"minItems"===i&&null!=r?(u.minItems=Number(r),c.minItems=n):"maxItems"===i&&null!=r?(u.maxItems=Number(r),c.maxItems=n):"email"===i?(u.format="email",c.format=n):"url"===i&&(u.format="uri",c.format=n)}u.errorMessage=c,i[t]=u,h&&(r.push(t),n[t]=s(h.message)??As("required",e))}return{type:"object",properties:i,required:r,...Object.keys(n).length?{errorMessage:{required:n}}:{},additionalProperties:!1}}(t,e);if(!s)return;try{n=Js.compile(s)}catch{return}i.set(r,n)}return n})(t,i);if(n&&!n(e))for(const t of n.errors??[]){const e=Xs(t);e&&!(e in r)&&t.message&&(r[e]=t.message)}for(const[n,s]of Object.entries(((t,e,i)=>{const r={},n=e??{};for(const e of Ns(t)){const t=e.configs?.key;if(t)for(const s of e.validations??[]){if("custom"!==s.validator||!s.customValidator)continue;const e=Ks(`const value = dataMap?.[${JSON.stringify(t)}];\n${s.customValidator}`,n);if(!0!==e&&null!=e&&!(t in r))if("string"==typeof e)r[t]=e;else if(e instanceof Error)r[t]=e.message;else{const e=ks(s.message,i);r[t]="string"==typeof e?e:As("custom",i)}}}return r})(t,e,i)))n in r||(r[n]=s);const s="object"==typeof e&&null!==e?e:void 0;for(const e of((t,e)=>{const i=new Set,r=(t,n)=>{const s=n||!!t.rules?.length&&!0===Ws(t.rules,e).hidden,o=t.configs?.key;if(s&&o&&i.add(o),"collection"!==t.type)for(const e of t.children??[])r(e,s)};return r(t,!1),i})(t,s))delete r[e];return{valid:0===Object.keys(r).length,errors:r}};function Ys(t){return t.split(".").slice(1).map((t=>`/children/${t}`)).join("")}function to(t,e){if(t.configs?.uid===e)return"";for(const[i,r]of(t.children??[]).entries()){const t=to(r,e);if(void 0!==t)return`/children/${i}${t}`}}function eo(t,e){let i=t;for(const t of e.split(".").slice(1))i=i?.children?.[Number(t)];return i}var io=(js??Ss).applyPatch,ro=(t,e,i)=>({spec:io(t,e,!0,!1).newDocument,patches:e,inverse:i}),no=(t,e)=>{const i=eo(t,e);if(!i)throw new Error(`No brick at path "${e}"`);return i},so=(t,e)=>{const i=to(t,e);if(void 0===i)throw new Error(`No brick with uid "${e}"`);let r=t;for(const t of i.split("/children/").slice(1))r=r.children[Number(t)];return{pointer:i,brick:r}},oo=t=>JSON.parse(JSON.stringify(t));function ao(t,e,i,r){const n=no(t,i),s=Ys(i),o=oo(e);if(!n.children){const e=`${s}/children`;return ro(t,[{op:"add",path:e,value:[o]}],[{op:"remove",path:e}])}const a=`${s}/children/${Math.min(r??n.children.length,n.children.length)}`;return ro(t,[{op:"add",path:a,value:o}],[{op:"remove",path:a}])}function ho(t,e){if("0"===e)throw new Error("Cannot remove the root brick");const i=no(t,e),r=Ys(e);return ro(t,[{op:"remove",path:r}],[{op:"add",path:r,value:i}])}function uo(t,e,i){if("0"===e||"0"===i)throw new Error("Cannot move the root brick");const r=no(t,e),n=e.split(".").map(Number),s=i.split(".").map(Number),o=n.length-1,a=n[o],h=s.length>o&&n.slice(0,o).every(((t,e)=>t===s[e])),u=[...s];if(h){if(u[o]===a&&u.length>n.length)throw new Error(`Cannot move a brick into its own subtree ("${e}" → "${i}")`);u[o]>a&&(u[o]-=1)}const c=Ys(e),f=Ys(u.join("."));return ro(t,[{op:"remove",path:c},{op:"add",path:f,value:r}],[{op:"remove",path:f},{op:"add",path:c,value:r}])}var co=t=>({...t,...t.configs?{configs:{...t.configs,uid:crypto.randomUUID()}}:{},...t.children?{children:t.children.map(co)}:{}});function fo(t,e){if("0"===e)throw new Error("Cannot duplicate the root brick");const i=no(t,e),r=e.split("."),n=Number(r[r.length-1])+1,s=Ys([...r.slice(0,-1),String(n)].join(".")),o=co(oo(i));return ro(t,[{op:"add",path:s,value:o}],[{op:"remove",path:s}])}var lo=(t,e,i,r,n)=>{const s=`${e}/${i}`;return void 0===n?ro(t,[{op:"add",path:s,value:r}],[{op:"remove",path:s}]):ro(t,[{op:"replace",path:s,value:r}],[{op:"replace",path:s,value:n}])};function po(t,e,i){const{pointer:r,brick:n}=so(t,e),s={...n.configs,...i};return lo(t,r,"configs",s,n.configs)}function mo(t,e,i){const{pointer:r,brick:n}=so(t,e),s={...n.styles,...i};return lo(t,r,"styles",s,n.styles)}function vo(t,e,i){const{pointer:r,brick:n}=so(t,e);return lo(t,r,"validations",i,n.validations)}function yo(t,e,i){const{pointer:r,brick:n}=so(t,e);return lo(t,r,"rules",i,n.rules)}class $o{past=[];future=[];record(t){this.past.push({patches:t.patches,inverse:t.inverse}),this.future=[]}get canUndo(){return this.past.length>0}get canRedo(){return this.future.length>0}undo(t){const e=this.past.pop();if(e)return this.future.push(e),io(t,e.inverse,!0,!1).newDocument}redo(t){const e=this.future.pop();if(e)return this.past.push(e),io(t,e.patches,!0,!1).newDocument}clear(){this.past=[],this.future=[]}}var wo=t=>"nested-form"===t.id&&"string"==typeof t.configs?.specRef,go=t=>{if(!t)return!1;for(const{brick:e}of Cs(t))if(wo(e)&&e.configs?.specRef)return!0;return!1};async function bo(t,e={}){const i=e.specSourceService??Hs.specSourceService,r=e.maxDepth??5,n=async(t,e)=>{if(wo(t)&&t.configs?.specRef){const s=String(t.configs.specRef);if(e.includes(s))throw new Error(`Circular nested form reference: ${[...e,s].join(" → ")}`);if(e.length>=r)throw new Error(`Nested forms exceed the maximum depth of ${r} (${s})`);const o=await i.fetchSpec(s),a=await n(structuredClone(o),[...e,s]);return{type:"panel",id:"group",name:t.name,configs:{...t.configs,label:t.configs.label??a.name},styles:t.styles,rules:t.rules,children:a.children??[]}}return t.children?.length?{...t,children:await Promise.all(t.children.map((t=>n(t,e))))}:t};return n(structuredClone(t),[])}export{Ts as B,$o as S,xs as a,Ns as b,ao as c,eo as d,bo as e,ho as f,Ws as g,go as h,Cs as i,fo as j,mo as k,vo as l,uo as m,yo as n,Ks as o,ks as p,Ps as r,Hs as s,po as u,Qs as v}
12
+ */function ws(t,e){e.unobserve()}function bs(t,e){var i,r=function(t){return ys.get(t)}(t);if(r){var n=function(t,e){return t.observers.get(e)}(r,e);i=n&&n.observer}else r=new gs(t),ys.set(t,r);if(i)return i;if(i={},r.value=Xn(t),e){i.callback=e,i.next=null;var s=function(){_s(i)},o=function(){clearTimeout(i.next),i.next=setTimeout(s)};"undefined"!=typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return i.patches=[],i.object=t,i.unobserve=function(){_s(i),clearTimeout(i.next),function(t,e){t.observers.delete(e.callback)}(r,i),"undefined"!=typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},r.observers.set(e,new $s(e,i)),i}function _s(t,e){void 0===e&&(e=!1);var i=ys.get(t.object);Es(i.value,t.object,t.patches,"",e),t.patches.length&&fs(i.value,t.patches);var r=t.patches;return r.length>0&&(t.patches=[],t.callback&&t.callback(r)),r}function Es(t,e,i,r,n){if(e!==t){"function"==typeof e.toJSON&&(e=e.toJSON());for(var s=Qn(e),o=Qn(t),a=!1,h=o.length-1;h>=0;h--){var u=t[f=o[h]];if(!Yn(e,f)||void 0===e[f]&&void 0!==u&&!1===Array.isArray(e))Array.isArray(t)===Array.isArray(e)?(n&&i.push({op:"test",path:r+"/"+es(f),value:Xn(u)}),i.push({op:"remove",path:r+"/"+es(f)}),a=!0):(n&&i.push({op:"test",path:r,value:t}),i.push({op:"replace",path:r,value:e}));else{var c=e[f];"object"==typeof u&&null!=u&&"object"==typeof c&&null!=c&&Array.isArray(u)===Array.isArray(c)?Es(u,c,i,r+"/"+es(f),n):u!==c&&(n&&i.push({op:"test",path:r+"/"+es(f),value:Xn(u)}),i.push({op:"replace",path:r+"/"+es(f),value:Xn(c)}))}}if(a||s.length!=o.length)for(h=0;h<s.length;h++){var f;Yn(t,f=s[h])||void 0===e[f]||i.push({op:"add",path:r+"/"+es(f),value:Xn(e[f])})}}}function ks(t,e,i){void 0===i&&(i=!1);var r=[];return Es(t,e,r,"",i),r}var Ss=Object.assign({},vs,Object.freeze({__proto__:null,compare:ks,generate:_s,observe:bs,unobserve:ws}),{JsonPatchError:ss,deepClone:Xn,escapePathComponent:es,unescapePathComponent:is}),xs=Object.freeze({__proto__:null,JsonPatchError:ss,_areEquals:ms,applyOperation:cs,applyPatch:fs,applyReducer:ls,compare:ks,deepClone:Xn,default:Ss,escapePathComponent:es,generate:_s,getValueByPointer:us,observe:bs,unescapePathComponent:is,unobserve:ws,validate:ps,validator:ds});function Os(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&Object.keys(t).length>0&&Object.values(t).every((t=>"string"==typeof t))}function js(t,e){return Os(t)?e&&void 0!==t[e]?t[e]:Object.values(t)[0]:t}function Ps(t,e){if(!t)return t;const i={};for(const[r,n]of Object.entries(t))i[r]=js(n,e);return i}var Is={en:{required:"This field is required",minLength:"Must be at least {value} characters",maxLength:"Must be at most {value} characters",min:"Must be at least {value}",max:"Must be at most {value}",pattern:"Invalid format",minItems:"Select at least {value} item(s)",maxItems:"Select at most {value} item(s)",email:"Invalid email address",url:"Invalid URL",type:"Invalid value",custom:"Invalid value"},fr:{required:"Ce champ est obligatoire",minLength:"Minimum {value} caractères",maxLength:"Maximum {value} caractères",min:"Minimum {value}",max:"Maximum {value}",pattern:"Format invalide",minItems:"Sélectionnez au moins {value} élément(s)",maxItems:"Sélectionnez au plus {value} élément(s)",email:"Adresse email invalide",url:"URL invalide",type:"Valeur invalide",custom:"Valeur invalide"}};function Cs(t,e,i){return((Is[e??"en"]??Is.en)[t]??Is.en[t]??"Invalid value").replace("{value}",String(i??""))}function*As(t,e="0"){if(t){yield{brick:t,path:e};for(const[i,r]of(t.children??[]).entries())yield*As(r,`${e}.${i}`)}}function*Ns(t){if(t&&(yield t,"collection"!==t.type))for(const e of t.children??[])yield*Ns(e)}function Ts(t,e){if(t.configs?.key&&e)return t.unWrapData?e:e[t.configs.key]}function Ms(t,e){if(t.configs?.key)return t.unWrapData?e:{[t.configs.key]:e}}var Rs=(t,e)=>{if(!e.includes("."))return t[e];let i=t;for(const t of e.split(".")){if("object"!=typeof i||null===i)return;i=i[t]}return i};function Ds(t,e="label",i="value"){return Array.isArray(t)?t.map((t=>{if("object"==typeof t&&null!==t){const r=t,n=Rs(r,e)??Rs(r,i),s=Rs(r,i)??Rs(r,e);return{label:String(n??""),value:String(s??"")}}return{label:String(t),value:String(t)}})).filter((t=>""!==t.label)):String(t??"").split("\n").map((t=>t.trim())).filter(Boolean).map((t=>({label:t,value:t})))}class Ls{type;dataType;id;name;configsForm;category;styles;unWrapData;isPrivate;validators;defaultConfigs;constructor(t){this.type=t.type,this.dataType=t.dataType,this.id=t.id,this.name=t.name,this.configsForm=t.configsForm,this.category=t.category,this.styles=t.styles,this.unWrapData=t.unWrapData??!1,this.isPrivate=t.isPrivate??!1,this.validators=t.validators??[],this.defaultConfigs=t.defaultConfigs}getBrickEmptySpec(){return{type:this.type,dataType:this.dataType,id:this.id,name:this.name,...void 0!==this.category?{category:this.category}:{},...void 0!==this.configsForm?{configsForm:this.configsForm}:{},...void 0!==this.styles?{styles:this.styles}:{},...void 0!==this.defaultConfigs?{configs:{...this.defaultConfigs}}:{},validators:this.validators}}}var zs=new Set(["__proto__","constructor","prototype"]);class Us{value;constructor(t){this.value=t}}var qs=(t,e,i)=>{t.scopes[t.scopes.length-1].set(e,i)},Fs=t=>{if("number"==typeof t)return t;const e=String(t);if(zs.has(e))throw new Error(`Access to "${e}" is not allowed`);return e},Vs=(t,e)=>({object:Bs(t,e.object),prop:Fs(e.computed?Bs(t,e.property):e.property.name),optional:!0===e.optional}),Bs=(t,e)=>{if(++t.steps>1e5)throw new Error("Sandbox execution budget exceeded");switch(e.type){case"Program":case"BlockStatement":for(const i of e.body){const e=Bs(t,i);if(e instanceof Us)return e}return;case"ReturnStatement":return new Us(e.argument?Bs(t,e.argument):void 0);case"IfStatement":return Bs(t,e.test)?Bs(t,e.consequent):e.alternate?Bs(t,e.alternate):void 0;case"VariableDeclaration":for(const i of e.declarations){const e=i.id;if("Identifier"!==e.type)throw new Error("Only simple variable names are supported");qs(t,e.name,i.init?Bs(t,i.init):void 0)}return;case"ExpressionStatement":return void Bs(t,e.expression);case"Literal":return e.value;case"TemplateLiteral":{const i=e.expressions;let r="";return e.quasis.forEach(((e,n)=>{r+=e.value.cooked??"",n<i.length&&(r+=String(Bs(t,i[n])))})),r}case"Identifier":return((t,e)=>{for(let i=t.scopes.length-1;i>=0;i--)if(t.scopes[i].has(e))return t.scopes[i].get(e);throw new Error(`Unknown identifier "${e}"`)})(t,e.name);case"ThisExpression":return;case"ChainExpression":return Bs(t,e.expression);case"MemberExpression":return((t,e)=>{const{object:i,prop:r,optional:n}=Vs(t,e);if(null==i){if(n)return;throw new Error(`Cannot read "${String(r)}" of ${String(i)}`)}return i[r]})(t,e);case"CallExpression":{const i=e.callee,r=[];for(const i of e.arguments)if("SpreadElement"===i.type){const e=Bs(t,i.argument);Array.isArray(e)&&r.push(...e)}else r.push(Bs(t,i));if("MemberExpression"===i.type){const{object:n,prop:s,optional:o}=Vs(t,i);if(null==n){if(o||!0===e.optional)return;throw new Error(`Cannot call "${String(s)}" of ${String(n)}`)}const a=n[s];if("function"!=typeof a){if(!0===e.optional&&null==a)return;throw new Error(`"${String(s)}" is not a function`)}if(a===Function||a===eval)throw new Error("This function is not allowed");return a.apply(n,r)}const n=Bs(t,i);if("function"!=typeof n){if(!0===e.optional&&null==n)return;throw new Error("Value is not a function")}if(n===Function||n===eval)throw new Error("This function is not allowed");return n(...r)}case"ArrowFunctionExpression":{const i=e.params,r=e.body,n=[...t.scopes];return(...s)=>{const o=new Map;i.forEach(((t,e)=>{if("Identifier"!==t.type)throw new Error("Only simple parameters are supported");o.set(t.name,s[e])}));const a={steps:t.steps,scopes:[...n,o]},h=Bs(a,r);return t.steps=a.steps,h instanceof Us?h.value:!0===e.expression?h:void 0}}case"BinaryExpression":{const i=Bs(t,e.left),r=Bs(t,e.right);switch(e.operator){case"===":return i===r;case"!==":return i!==r;case"==":return i==r;case"!=":return i!=r;case"<":return i<r;case"<=":return i<=r;case">":return i>r;case">=":return i>=r;case"+":return i+r;case"-":return i-r;case"*":return i*r;case"/":return i/r;case"%":return i%r;case"**":return i**r;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"LogicalExpression":{const i=Bs(t,e.left);switch(e.operator){case"&&":return i&&Bs(t,e.right);case"||":return i||Bs(t,e.right);case"??":return i??Bs(t,e.right);default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"UnaryExpression":{const i=Bs(t,e.argument);switch(e.operator){case"!":return!i;case"-":return-i;case"+":return+i;case"typeof":return typeof i;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"ConditionalExpression":return Bs(t,e.test)?Bs(t,e.consequent):Bs(t,e.alternate);case"AssignmentExpression":{const i=e.left;if("Identifier"!==i.type||"="!==e.operator)throw new Error("Only simple assignments are supported");const r=Bs(t,e.right);return((t,e,i)=>{for(let r=t.scopes.length-1;r>=0;r--)if(t.scopes[r].has(e))return void t.scopes[r].set(e,i);throw new Error(`Cannot assign to unknown identifier "${e}"`)})(t,i.name,r),r}case"ArrayExpression":{const i=[];for(const r of e.elements)if(r)if("SpreadElement"===r.type){const e=Bs(t,r.argument);Array.isArray(e)&&i.push(...e)}else i.push(Bs(t,r));return i}case"ObjectExpression":{const i={};for(const r of e.properties){if("SpreadElement"===r.type){const e=Bs(t,r.argument);if(e&&"object"==typeof e)for(const[t,r]of Object.entries(e))i[String(Fs(t))]=r;continue}const e=r.key,n=Fs(r.computed?Bs(t,e):"Identifier"===e.type?e.name:e.value);i[String(n)]=Bs(t,r.value)}return i}default:throw new Error(`Unsupported syntax: ${e.type}`)}},Gs={undefined:void 0,NaN:NaN,Infinity:1/0,Math,JSON,Number,String,Boolean,Array,Object,Date,parseInt,parseFloat,isNaN,isFinite};class Hs{defaults;cache=new Map;constructor(t={}){this.defaults=t}resolveUrl(t){return/^https?:\/\//.test(t)||!this.defaults.baseUrl?t:`${this.defaults.baseUrl.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}fetchSpec(t){const e=this.resolveUrl(t);let i=this.cache.get(e);return i||(i=(this.defaults.fetch??globalThis.fetch.bind(globalThis))(e,{headers:this.defaults.headers,credentials:this.defaults.credentials}).then((async e=>{if(!e.ok)throw new Error(`Failed to load spec "${t}" (${e.status})`);return await e.json()})),i.catch((()=>this.cache.delete(e))),this.cache.set(e,i)),i}}class Ks{defaults;cache=new Map;constructor(t={}){this.defaults=t}resolveUrl(t){return/^https?:\/\//.test(t)||!this.defaults.baseUrl?t:`${this.defaults.baseUrl.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}fetchOptions(t){const e=this.resolveUrl(t);let i=this.cache.get(e);return i||(i=(this.defaults.fetch??globalThis.fetch.bind(globalThis))(e,{headers:this.defaults.headers,credentials:this.defaults.credentials}).then((async e=>{if(!e.ok)throw new Error(`Failed to load options "${t}" (${e.status})`);return await e.json()})),i.catch((()=>this.cache.delete(e))),this.cache.set(e,i)),i}}var Js=Symbol.for("formkrafter.core.services"),Ws=globalThis,Zs=Ws[Js]??={jsRunnerService:new class{validateJs(t,e={ecmaVersion:"latest",allowReturnOutsideFunction:!0}){try{return Yt(t,e),{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t:new Error(String(t))}}}eval(t,e={}){return function(t,e={}){const i=Yt(t,{ecmaVersion:"latest",allowReturnOutsideFunction:!0}),r={steps:0,scopes:[new Map(Object.entries({...Gs,...e})),new Map]},n=Bs(r,i);return n instanceof Us?n.value:void 0}(t,e)}},dataSourceService:new class{defaults;cache=new Map;constructor(t={}){this.defaults=t}fetchOptions(t,e){const i={...this.defaults.headers,...e?.headers},r={};Object.keys(i).length&&(r.headers=i),this.defaults.credentials&&(r.credentials=this.defaults.credentials);const n=`${t}|${JSON.stringify(r)}`;let s=this.cache.get(n);return s||(s=fetch(t,Object.keys(r).length?r:void 0).then((e=>{if(!e.ok)throw new Error(`Data source request failed (${e.status}): ${t}`);return e.json()})).then((t=>Array.isArray(t)?t:[])).catch((t=>{throw this.cache.delete(n),t})),this.cache.set(n,s)),s}},fileUploadService:new class{async upload(t){const e=globalThis.btoa;if(!e)throw new Error("No base64 encoder available");const i=new Uint8Array(await t.arrayBuffer());let r="";for(const t of i)r+=String.fromCharCode(t);return{name:t.name,type:t.type,size:t.size,url:`data:${t.type};base64,${e(r)}`}}},specSourceService:new Hs,optionSourceService:new Ks};Zs.specSourceService??=new Hs,Zs.optionSourceService??=new Ks;var Ys=(t,e)=>{try{return Zs.jsRunnerService.eval(t,{dataMap:e??{}})}catch(t){return t instanceof Error?t:new Error(String(t))}},Qs=(t,e)=>((t,e)=>((t,e)=>t?.filter((t=>((t,e)=>"jsonLogic"===t.type?null!=t.logic&&!0===n.apply(t.logic,e):"javaScript"===t.type&&!!t.code&&!0===Ys(t.code,e))(t,e))))(t,e)?.map((t=>t.effects)).flat().filter((t=>null!=t)))(t,e)?.map((t=>{let i;return t.property?("boolean"===t.property.type?i=t.boolean:"logic"===t.property.type&&null!=t.logic?i=n.apply(t.logic,e):"code"===t.property.type&&t.code?i=Ys(t.code,e):"string"===t.property.type&&(i=t.string),{[t.property.target]:i}):{}})).flat().reduce(((t,e)=>({...t,...e})),{})??{hidden:!1},Xs=new Un.Ajv({allErrors:!0});Jn(Xs,["email","uri"]),Vn(Xs);var to=new WeakMap,eo=t=>{if("required"===t.keyword)return t.params.missingProperty;if("errorMessage"===t.keyword){const e=t.params.errors?.[0];return e?eo(e):void 0}return t.instancePath.split("/").filter(Boolean)[0]},io=(t,e,i)=>{const r={},n=((t,e)=>{let i=to.get(t);i||(i=new Map,to.set(t,i));const r=e??"";let n=i.get(r);if(!n){const s=function(t,e){if(!t)return;const i={},r=[],n={},s=t=>{const i=js(t,e);return"string"==typeof i?i:void 0};for(const o of Ns(t)){const t=o.configs?.key,a=!0===o.configs?.multiple&&"object"===o.dataType?"array":o.dataType;if(!t||!a||"void"===a)continue;const h=o.validations?.find((t=>"required"===t.validator)),u={type:a,nullable:!h},c={type:Cs("type",e)};for(const t of o.validations??[]){const{validator:i,value:r}=t,n=s(t.message)??Cs(i,e,r);"minLength"===i&&null!=r?(u.minLength=Number(r),c.minLength=n):"maxLength"===i&&null!=r?(u.maxLength=Number(r),c.maxLength=n):"min"===i&&null!=r?(u.minimum=Number(r),c.minimum=n):"max"===i&&null!=r?(u.maximum=Number(r),c.maximum=n):"pattern"===i&&"string"==typeof r&&r?(u.pattern=r,c.pattern=n):"minItems"===i&&null!=r?(u.minItems=Number(r),c.minItems=n):"maxItems"===i&&null!=r?(u.maxItems=Number(r),c.maxItems=n):"email"===i?(u.format="email",c.format=n):"url"===i&&(u.format="uri",c.format=n)}u.errorMessage=c,i[t]=u,h&&(r.push(t),n[t]=s(h.message)??Cs("required",e))}return{type:"object",properties:i,required:r,...Object.keys(n).length?{errorMessage:{required:n}}:{},additionalProperties:!1}}(t,e);if(!s)return;try{n=Xs.compile(s)}catch{return}i.set(r,n)}return n})(t,i);if(n&&!n(e))for(const t of n.errors??[]){const e=eo(t);e&&!(e in r)&&t.message&&(r[e]=t.message)}for(const[n,s]of Object.entries(((t,e,i)=>{const r={},n=e??{};for(const e of Ns(t)){const t=e.configs?.key;if(t)for(const s of e.validations??[]){if("custom"!==s.validator||!s.customValidator)continue;const e=Ys(`const value = dataMap?.[${JSON.stringify(t)}];\n${s.customValidator}`,n);if(!0!==e&&null!=e&&!(t in r))if("string"==typeof e)r[t]=e;else if(e instanceof Error)r[t]=e.message;else{const e=js(s.message,i);r[t]="string"==typeof e?e:Cs("custom",i)}}}return r})(t,e,i)))n in r||(r[n]=s);const s="object"==typeof e&&null!==e?e:void 0;for(const e of((t,e)=>{const i=new Set,r=(t,n)=>{const s=n||!!t.rules?.length&&!0===Qs(t.rules,e).hidden,o=t.configs?.key;if(s&&o&&i.add(o),"collection"!==t.type)for(const e of t.children??[])r(e,s)};return r(t,!1),i})(t,s))delete r[e];return{valid:0===Object.keys(r).length,errors:r}},ro={"palette.search":"Search bricks…","palette.empty":"No brick matches “{query}”","builder.undo":"Undo","builder.redo":"Redo","builder.editLocale":"Editing language","builder.copyJson":"Copy JSON","builder.importJson":"Import JSON","builder.importInvalid":"Invalid form JSON","builder.pasteHint":"Press Ctrl+V to paste a spec","builder.copied":"Copied!","builder.downloadJson":"Download .json","builder.hint":"Select a brick to edit its properties","drop.hint":"Drop a brick here","empty.title":"Your form is empty","empty.hint":"Drag a brick from the palette to get started","actions.move":"Move","actions.duplicate":"Duplicate","actions.delete":"Delete","stepper.back":"← Back","stepper.next":"Next →","stepper.submit":"Submit","panel.cfg.validateSteps":"Validate each step","panel.cfg.allowStepClick":"Allow clicking steps to jump","panel.cfg.showSubmit":"Submit button on last step","panel.cfg.validateTabs":"Validate tab before leaving it","signature.clear":"Clear","panel.tab.config":"Config","panel.tab.validation":"Validation","panel.tab.styles":"Styles","panel.tab.rules":"Rules","panel.key":"Key","panel.label":"Label","panel.placeholder":"Placeholder","panel.prefix":"Prefix","panel.suffix":"Suffix","panel.accept":"Accepted file types","panel.mask":"Input mask (9=digit, a=letter, *=any)","panel.uploadUrl":"Upload URL","panel.cfg.multiple":"Allow multiple files","panel.optionsSource":"Options source","panel.options":"Options (one per line)","panel.content":"Content","panel.dataKey":"Data key","panel.url":"URL","panel.headers":"Headers ({token} reads form data)","panel.searchParam":"Server search param","panel.labelKey":"Label key","panel.valueKey":"Value key","panel.errorMessage":"Error message","panel.required":"Required","panel.minLength":"Min length","panel.maxLength":"Max length","panel.min":"Min","panel.max":"Max","panel.pattern":"Pattern (regex)","panel.minItems":"Min items","panel.maxItems":"Max items","panel.emailFormat":"Email format","panel.urlFormat":"URL format","panel.custom":"Custom (JavaScript)","panel.fallbackMessage":"Fallback message","panel.styleProperty":"property","panel.styleValue":"value","file.choose":"Choose a file…","file.uploading":"Uploading…","file.remove":"Remove file","file.addAnother":"+ Add a file","address.street":"Street","address.city":"City","address.zip":"Postal code","address.country":"Country","grid.addRow":"+ Add row","grid.moveUp":"Move row up","grid.moveDown":"Move row down","grid.removeRow":"Remove row","grid.empty":"No rows yet","grid.columns":"Row template","select.search":"Search…","select.empty":"No options","select.clear":"Clear","rules.when":"When","rules.then":"Then","rules.addRule":"+ Add rule","rules.addEffect":"+ Effect","rules.removeRule":"Remove rule","rules.removeEffect":"Remove effect","rules.mode.simple":"simple","rules.mode.json":"json","rules.mode.js":"JS","category.Inputs":"Inputs","category.Layout":"Layout","category.Data":"Data","brick.text.name":"Text","brick.email.name":"Email","brick.password.name":"Password","brick.url.name":"URL","brick.phone.name":"Phone","brick.textarea.name":"Text area","brick.number.name":"Number","brick.date.name":"Date","brick.time.name":"Time","brick.datetime.name":"Date / Time","brick.select.name":"Select","brick.multi-select.name":"Multi select","brick.radio.name":"Radio","brick.select-boxes.name":"Select boxes","brick.checkbox.name":"Checkbox","brick.tags.name":"Tags","brick.signature.name":"Signature","brick.data-grid.name":"Data grid","brick.address.name":"Address","brick.file.name":"File","brick.hidden.name":"Hidden","brick.content.name":"Content","brick.recap.name":"Recap","brick.nested-form.name":"Nested form","brick.code.name":"Code","nestedForm.ref":"Referenced form","nestedForm.missing":"Set the specRef config to reference a form.","nestedForm.loading":"Loading nested forms…","panel.specRef":"Referenced form (specRef)","panel.optionsRef":"Options catalog (optionsRef)","recap.empty":"Nothing to summarize yet.","recap.yes":"Yes","recap.no":"No","panel.cfg.showEmpty":"Show empty fields","panel.cfg.groupBySections":"Group by section","brick.group.name":"Group","brick.row.name":"Row","brick.column.name":"Column","brick.stepper.name":"Stepper","brick.tabs.name":"Tabs"},no={"palette.search":"Rechercher une brique…","palette.empty":"Aucune brique ne correspond à « {query} »","builder.undo":"Annuler","builder.editLocale":"Langue d'édition","builder.redo":"Rétablir","builder.copyJson":"Copier le JSON","builder.importJson":"Importer le JSON","builder.importInvalid":"JSON de formulaire invalide","builder.pasteHint":"Collez avec Ctrl+V pour importer une spec","builder.copied":"Copié !","builder.downloadJson":"Télécharger le .json","builder.hint":"Sélectionnez une brique pour éditer ses propriétés","drop.hint":"Déposez une brique ici","empty.title":"Votre formulaire est vide","empty.hint":"Glissez une brique depuis la palette pour commencer","actions.move":"Déplacer","actions.duplicate":"Dupliquer","actions.delete":"Supprimer","stepper.back":"← Précédent","stepper.next":"Suivant →","stepper.submit":"Envoyer","panel.cfg.validateSteps":"Valider chaque étape","panel.cfg.allowStepClick":"Autoriser le saut d’étapes au clic","panel.cfg.showSubmit":"Bouton d’envoi à la dernière étape","panel.cfg.validateTabs":"Valider l’onglet avant de le quitter","signature.clear":"Effacer","panel.tab.config":"Config","panel.tab.validation":"Validation","panel.tab.styles":"Styles","panel.tab.rules":"Règles","panel.key":"Clé","panel.label":"Libellé","panel.placeholder":"Placeholder","panel.prefix":"Préfixe","panel.suffix":"Suffixe","panel.accept":"Types de fichiers acceptés","panel.mask":"Masque de saisie (9=chiffre, a=lettre, *=tout)","panel.uploadUrl":"URL d'upload","panel.cfg.multiple":"Autoriser plusieurs fichiers","panel.optionsSource":"Source des options","panel.options":"Options (une par ligne)","panel.content":"Contenu","panel.dataKey":"Clé de données","panel.url":"URL","panel.headers":"En-têtes ({token} lit les données du formulaire)","panel.searchParam":"Paramètre de recherche serveur","panel.labelKey":"Clé du libellé","panel.valueKey":"Clé de la valeur","panel.errorMessage":"Message d'erreur","panel.required":"Obligatoire","panel.minLength":"Longueur min","panel.maxLength":"Longueur max","panel.min":"Min","panel.max":"Max","panel.pattern":"Motif (regex)","panel.minItems":"Éléments min","panel.maxItems":"Éléments max","panel.emailFormat":"Format email","panel.urlFormat":"Format URL","panel.custom":"Personnalisé (JavaScript)","panel.fallbackMessage":"Message par défaut","panel.styleProperty":"propriété","panel.styleValue":"valeur","file.choose":"Choisir un fichier…","file.uploading":"Envoi en cours…","file.remove":"Retirer le fichier","file.addAnother":"+ Ajouter un fichier","address.street":"Rue","address.city":"Ville","address.zip":"Code postal","address.country":"Pays","grid.addRow":"+ Ajouter une ligne","grid.moveUp":"Monter la ligne","grid.moveDown":"Descendre la ligne","grid.removeRow":"Supprimer la ligne","grid.empty":"Aucune ligne","grid.columns":"Modèle de ligne","select.search":"Rechercher…","select.empty":"Aucune option","select.clear":"Effacer","rules.when":"Quand","rules.then":"Alors","rules.addRule":"+ Ajouter une règle","rules.addEffect":"+ Effet","rules.removeRule":"Supprimer la règle","rules.removeEffect":"Supprimer l'effet","rules.mode.simple":"simple","rules.mode.json":"json","rules.mode.js":"JS","category.Inputs":"Champs","category.Layout":"Mise en page","category.Data":"Données","brick.text.name":"Texte","brick.email.name":"Email","brick.password.name":"Mot de passe","brick.url.name":"URL","brick.phone.name":"Téléphone","brick.textarea.name":"Zone de texte","brick.number.name":"Nombre","brick.date.name":"Date","brick.time.name":"Heure","brick.datetime.name":"Date / Heure","brick.select.name":"Liste déroulante","brick.multi-select.name":"Sélection multiple","brick.radio.name":"Boutons radio","brick.select-boxes.name":"Cases à cocher","brick.checkbox.name":"Case à cocher","brick.tags.name":"Étiquettes","brick.signature.name":"Signature","brick.data-grid.name":"Grille de données","brick.address.name":"Adresse","brick.file.name":"Fichier","brick.hidden.name":"Caché","brick.content.name":"Contenu","brick.recap.name":"Récapitulatif","brick.nested-form.name":"Formulaire imbriqué","brick.code.name":"Code","nestedForm.ref":"Formulaire référencé","nestedForm.missing":"Renseignez la config specRef pour référencer un formulaire.","nestedForm.loading":"Chargement des formulaires imbriqués…","panel.specRef":"Formulaire référencé (specRef)","panel.optionsRef":"Catalogue d'options (optionsRef)","recap.empty":"Rien à récapituler pour le moment.","recap.yes":"Oui","recap.no":"Non","panel.cfg.showEmpty":"Afficher les champs vides","panel.cfg.groupBySections":"Regrouper par section","brick.group.name":"Groupe","brick.row.name":"Ligne","brick.column.name":"Colonne","brick.stepper.name":"Étapes","brick.tabs.name":"Onglets"},so=Symbol.for("formkrafter.i18n"),oo=globalThis,ao=oo[so]??={current:{...ro}};function ho(t={}){ao.current={...ro,...t}}function uo(t,e){let i=ao.current[t]??t;for(const[t,r]of Object.entries(e??{}))i=i.replace(`{${t}}`,String(r));return i}function co(t,e){return ao.current[t]??e}function fo(t){return t.split(".").slice(1).map((t=>`/children/${t}`)).join("")}function lo(t,e){if(t.configs?.uid===e)return"";for(const[i,r]of(t.children??[]).entries()){const t=lo(r,e);if(void 0!==t)return`/children/${i}${t}`}}function po(t,e){let i=t;for(const t of e.split(".").slice(1))i=i?.children?.[Number(t)];return i}var mo=(Ss??xs).applyPatch,vo=(t,e,i)=>({spec:mo(t,e,!0,!1).newDocument,patches:e,inverse:i}),yo=(t,e)=>{const i=po(t,e);if(!i)throw new Error(`No brick at path "${e}"`);return i},go=(t,e)=>{const i=lo(t,e);if(void 0===i)throw new Error(`No brick with uid "${e}"`);let r=t;for(const t of i.split("/children/").slice(1))r=r.children[Number(t)];return{pointer:i,brick:r}},$o=t=>JSON.parse(JSON.stringify(t));function wo(t,e,i,r){const n=yo(t,i),s=fo(i),o=$o(e);if(!n.children){const e=`${s}/children`;return vo(t,[{op:"add",path:e,value:[o]}],[{op:"remove",path:e}])}const a=`${s}/children/${Math.min(r??n.children.length,n.children.length)}`;return vo(t,[{op:"add",path:a,value:o}],[{op:"remove",path:a}])}function bo(t,e){if("0"===e)throw new Error("Cannot remove the root brick");const i=yo(t,e),r=fo(e);return vo(t,[{op:"remove",path:r}],[{op:"add",path:r,value:i}])}function _o(t,e,i){if("0"===e||"0"===i)throw new Error("Cannot move the root brick");const r=yo(t,e),n=e.split(".").map(Number),s=i.split(".").map(Number),o=n.length-1,a=n[o],h=s.length>o&&n.slice(0,o).every(((t,e)=>t===s[e])),u=[...s];if(h){if(u[o]===a&&u.length>n.length)throw new Error(`Cannot move a brick into its own subtree ("${e}" → "${i}")`);u[o]>a&&(u[o]-=1)}const c=fo(e),f=fo(u.join("."));return vo(t,[{op:"remove",path:c},{op:"add",path:f,value:r}],[{op:"remove",path:f},{op:"add",path:c,value:r}])}var Eo=t=>({...t,...t.configs?{configs:{...t.configs,uid:crypto.randomUUID()}}:{},...t.children?{children:t.children.map(Eo)}:{}});function ko(t,e){if("0"===e)throw new Error("Cannot duplicate the root brick");const i=yo(t,e),r=e.split("."),n=Number(r[r.length-1])+1,s=fo([...r.slice(0,-1),String(n)].join(".")),o=Eo($o(i));return vo(t,[{op:"add",path:s,value:o}],[{op:"remove",path:s}])}var So=(t,e,i,r,n)=>{const s=`${e}/${i}`;return void 0===n?vo(t,[{op:"add",path:s,value:r}],[{op:"remove",path:s}]):vo(t,[{op:"replace",path:s,value:r}],[{op:"replace",path:s,value:n}])};function xo(t,e,i){const{pointer:r,brick:n}=go(t,e),s={...n.configs,...i};return So(t,r,"configs",s,n.configs)}function Oo(t,e,i){const{pointer:r,brick:n}=go(t,e),s={...n.styles,...i};return So(t,r,"styles",s,n.styles)}function jo(t,e,i){const{pointer:r,brick:n}=go(t,e);return So(t,r,"validations",i,n.validations)}function Po(t,e,i){const{pointer:r,brick:n}=go(t,e);return So(t,r,"rules",i,n.rules)}class Io{past=[];future=[];record(t){this.past.push({patches:t.patches,inverse:t.inverse}),this.future=[]}get canUndo(){return this.past.length>0}get canRedo(){return this.future.length>0}undo(t){const e=this.past.pop();if(e)return this.future.push(e),mo(t,e.inverse,!0,!1).newDocument}redo(t){const e=this.future.pop();if(e)return this.past.push(e),mo(t,e.patches,!0,!1).newDocument}clear(){this.past=[],this.future=[]}}var Co=t=>"nested-form"===t.id&&"string"==typeof t.configs?.specRef,Ao=t=>{if(!t)return!1;for(const{brick:e}of As(t))if(Co(e)&&e.configs?.specRef)return!0;return!1};async function No(t,e={}){const i=e.specSourceService??Zs.specSourceService,r=e.maxDepth??5,n=async(t,e)=>{if(Co(t)&&t.configs?.specRef){const s=String(t.configs.specRef);if(e.includes(s))throw new Error(`Circular nested form reference: ${[...e,s].join(" → ")}`);if(e.length>=r)throw new Error(`Nested forms exceed the maximum depth of ${r} (${s})`);const o=await i.fetchSpec(s),a=await n(structuredClone(o),[...e,s]);return{type:"panel",id:"group",name:t.name,configs:{...t.configs,label:t.configs.label??a.name},styles:t.styles,rules:t.rules,children:a.children??[]}}return t.children?.length?{...t,children:await Promise.all(t.children.map((t=>n(t,e))))}:t};return n(structuredClone(t),[])}export{no as A,Ls as B,Io as S,Ts as a,uo as b,Os as c,Ns as d,No as e,co as f,Qs as g,Ao as h,As as i,wo as j,po as k,bo as l,_o as m,ko as n,Oo as o,jo as p,Po as q,Ps as r,Zs as s,Ds as t,xo as u,io as v,Ms as w,Ys as x,js as y,ho as z}