@streamline-pulse/formkrafter-wc 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cjs/fk-brick-actions_18.cjs.entry.js +41 -40
- package/dist/cjs/formkrafter-wc.cjs.js +2 -2
- package/dist/cjs/{index-By4GGW_q.js → index-Can2MpG5.js} +215 -23
- package/dist/cjs/{index-D_7eGIJ0.js → index-CbyFxLc_.js} +26 -2
- package/dist/cjs/index.cjs.js +3 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/fk-brick-render/fk-brick-render.js +31 -3
- package/dist/collection/components/fk-file-input/fk-file-input.css +26 -5
- package/dist/collection/components/fk-file-input/fk-file-input.js +45 -6
- package/dist/collection/components/fk-form-builder/fk-form-builder.css +30 -0
- package/dist/collection/components/fk-form-render/fk-form-render.js +1 -1
- package/dist/collection/i18n/i18n.js +12 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/registry/default-bricks.js +161 -23
- package/dist/components/fk-brick-actions.js +1 -1
- package/dist/components/fk-brick-list.js +1 -1
- package/dist/components/fk-brick-mold-item.js +1 -1
- package/dist/components/fk-brick-not-found.js +1 -1
- package/dist/components/fk-brick-render.js +1 -1
- package/dist/components/fk-code-editor.js +1 -1
- package/dist/components/fk-data-grid.js +1 -1
- package/dist/components/fk-drop-area.js +1 -1
- package/dist/components/fk-empty-form.js +1 -1
- package/dist/components/fk-file-input.js +1 -1
- package/dist/components/fk-form-builder.js +1 -1
- package/dist/components/fk-form-render.js +1 -1
- package/dist/components/fk-property-panel.js +1 -1
- package/dist/components/fk-rules-editor.js +1 -1
- package/dist/components/fk-select-input.js +1 -1
- package/dist/components/fk-signature-input.js +1 -1
- package/dist/components/fk-stepper.js +1 -1
- package/dist/components/fk-tabs.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-B4vAN-UA.js → p-B0YjIsVn.js} +1 -1
- package/dist/components/{p-BIEpAM4V.js → p-B1t0M_hN.js} +1 -1
- package/dist/components/p-B21cOFRx.js +1 -0
- package/dist/components/{p-DWgjI3TW.js → p-B7ED8qMb.js} +1 -1
- package/dist/components/{p-ZEW2q-4b.js → p-BDvqHJih.js} +1 -1
- package/dist/components/{p-BXFug2Ql.js → p-BSPTuA1p.js} +1 -1
- package/dist/components/{p-BNREw7TY.js → p-BVBfbMl_.js} +1 -1
- package/dist/components/p-BrOXMyOG.js +1 -0
- package/dist/components/{p-DtzMNM4i.js → p-C85zhhpr.js} +1 -1
- package/dist/components/p-CMQ_4Zfv.js +1 -0
- package/dist/components/p-CWQX0sXS.js +1 -0
- package/dist/components/{p-DJDrDvoC.js → p-CXEvsomA.js} +1 -1
- package/dist/components/{p-BCQ-hj6j.js → p-Cq9HSEn8.js} +1 -1
- package/dist/components/{p-BQP1WryV.js → p-D7bf2ztq.js} +1 -1
- package/dist/components/{p-DKGyje7v.js → p-DIPoAaGe.js} +1 -1
- package/dist/components/p-DYBirEew.js +1 -0
- package/dist/components/p-DluDp8V5.js +1 -0
- package/dist/components/{p-BLKRn62s.js → p-Do6-yRva.js} +1 -1
- package/dist/components/{p-D318uFl-.js → p-GjmAhT2E.js} +1 -1
- package/dist/components/{p-dX7Lo8Fe.js → p-LXnm2ogM.js} +1 -1
- package/dist/components/{p-Ctt--jpe.js → p-y0xDvzJR.js} +1 -1
- package/dist/esm/fk-brick-actions_18.entry.js +37 -36
- package/dist/esm/formkrafter-wc.js +3 -3
- package/dist/esm/{index-BTmZ8XET.js → index-BB2OOj__.js} +214 -24
- package/dist/esm/{index-BQqrzKxo.js → index-DMDO6w5-.js} +26 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
- package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
- package/dist/formkrafter-wc/index.esm.js +1 -1
- package/dist/formkrafter-wc/p-0de7cbe1.entry.js +1 -0
- package/dist/formkrafter-wc/{p-BXIsVlA6.js → p-Bp_A8oL5.js} +4 -4
- package/dist/formkrafter-wc/p-DMDO6w5-.js +2 -0
- package/dist/types/components/fk-brick-render/fk-brick-render.d.ts +1 -0
- package/dist/types/components/fk-file-input/fk-file-input.d.ts +3 -0
- package/dist/types/components.d.ts +5 -0
- package/dist/types/home/runner/work/formkrafter/formkrafter/packages/wc/.stencil/stencil.config.d.ts +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/registry/default-bricks.d.ts +73 -54
- package/package.json +11 -2
- package/dist/components/p-BB3BQPr8.js +0 -1
- package/dist/components/p-BOvjVIvo.js +0 -1
- package/dist/components/p-DKoJovNt.js +0 -1
- package/dist/components/p-QC41Uj05.js +0 -1
- package/dist/components/p-TvmRksgg.js +0 -1
- package/dist/formkrafter-wc/p-BQqrzKxo.js +0 -2
- package/dist/formkrafter-wc/p-f6bc0be0.entry.js +0 -1
- package/dist/types/Users/datagnikan/Desktop/WorkSpace/streamline-pulse/formkrafter-js/formkrafter/packages/wc/.stencil/stencil.config.d.ts +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{h as t}from"./p-BQqrzKxo.js";var e;const i=Symbol.for("formkrafter.wc.bricks"),r=globalThis,n=null!==(e=r[i])&&void 0!==e?e:r[i]=new Map,s=(t,e)=>`${t}:${e}`;function o(t){n.set(s(t.type,t.id),t)}function a(t){t.forEach(o)}function u(t,e){return n.get(s(t,e))}function h(){return[...n.values()].filter((t=>!t.isPrivate)).map((t=>({type:t.type,id:t.id,name:t.name,configsForm:t.configsForm,category:t.category,isPrivate:t.isPrivate})))}function c(){var t,e;const i={};for(const r of h()){const n=null!==(t=r.category)&&void 0!==t?t:"Uncategorized";(null!==(e=i[n])&&void 0!==e?e:i[n]=[]).push(r)}return i}function f(t,e){var i,r;const n=u(t,e);if(!n)return;const s=n.getBrickEmptySpec(),o=crypto.randomUUID();return Object.assign(Object.assign({},s),{configs:Object.assign(Object.assign({},s.configs),{uid:o,key:null!==(r=null===(i=s.configs)||void 0===i?void 0:i.key)&&void 0!==r?r:`${e}_${o.slice(0,6)}`})})}function l(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d,p={exports:{}},m=(d||(d=1,p.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,u,h=t.get_operator(i),c=i[h];if(Array.isArray(c)||(c=[c]),"if"===h||"?:"==h){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"===h){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),!t.truthy(s))return s;return s}if("or"===h){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),t.truthy(s))return s;return s}if("filter"===h)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"===h)return a=t.apply(c[0],r),o=c[1],Array.isArray(a)?a.map((function(e){return t.apply(o,e)})):[];if("reduce"===h)return a=t.apply(c[0],r),o=c[1],u=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})}),u):u;if("all"===h){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"===h){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"===h){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(h)&&"function"==typeof e[h])return e[h].apply(r,c);if(h.indexOf(".")>0){var f=String(h).split("."),l=e;for(n=0;n<f.length;n++){if(!l.hasOwnProperty(f[n]))throw new Error("Unrecognized operation "+h+" (failed at "+f.slice(0,n+1).join(".")+")");l=l[f[n]]}return l.apply(r,c)}throw new Error("Unrecognized operation "+h)},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}()),p.exports),v=l(m),y=[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],g=[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],b="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",$={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"},w="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",_={5:w,"5module":w+" export import",6:w+" const class extends export import super"},k=/^in(stanceof)?$/,E=new RegExp("["+b+"]"),S=new RegExp("["+b+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function x(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 O(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&E.test(String.fromCharCode(t)):!1!==e&&x(t,g)))}function j(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&S.test(String.fromCharCode(t)):!1!==e&&(x(t,g)||x(t,y)))))}var P=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 I(t,e){return new P(t,{beforeExpr:!0,binop:e})}var C={beforeExpr:!0},T={startsExpr:!0},A={};function N(t,e){return void 0===e&&(e={}),e.keyword=t,A[t]=new P(t,e)}var M={num:new P("num",T),regexp:new P("regexp",T),string:new P("string",T),name:new P("name",T),privateId:new P("privateId",T),eof:new P("eof"),bracketL:new P("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new P("]"),braceL:new P("{",{beforeExpr:!0,startsExpr:!0}),braceR:new P("}"),parenL:new P("(",{beforeExpr:!0,startsExpr:!0}),parenR:new P(")"),comma:new P(",",C),semi:new P(";",C),colon:new P(":",C),dot:new P("."),question:new P("?",C),questionDot:new P("?."),arrow:new P("=>",C),template:new P("template"),invalidTemplate:new P("invalidTemplate"),ellipsis:new P("...",C),backQuote:new P("`",T),dollarBraceL:new P("${",{beforeExpr:!0,startsExpr:!0}),eq:new P("=",{beforeExpr:!0,isAssign:!0}),assign:new P("_=",{beforeExpr:!0,isAssign:!0}),incDec:new P("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new P("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:I("||",1),logicalAND:I("&&",2),bitwiseOR:I("|",3),bitwiseXOR:I("^",4),bitwiseAND:I("&",5),equality:I("==/!=/===/!==",6),relational:I("</>/<=/>=",7),bitShift:I("<</>>/>>>",8),plusMin:new P("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:I("%",10),star:I("*",10),slash:I("/",10),starstar:new P("**",{beforeExpr:!0}),coalesce:I("??",1),_break:N("break"),_case:N("case",C),_catch:N("catch"),_continue:N("continue"),_debugger:N("debugger"),_default:N("default",C),_do:N("do",{isLoop:!0,beforeExpr:!0}),_else:N("else",C),_finally:N("finally"),_for:N("for",{isLoop:!0}),_function:N("function",T),_if:N("if"),_return:N("return",C),_switch:N("switch"),_throw:N("throw",C),_try:N("try"),_var:N("var"),_const:N("const"),_while:N("while",{isLoop:!0}),_with:N("with"),_new:N("new",{beforeExpr:!0,startsExpr:!0}),_this:N("this",T),_super:N("super",T),_class:N("class",T),_extends:N("extends",C),_export:N("export"),_import:N("import",T),_null:N("null",T),_true:N("true",T),_false:N("false",T),_in:N("in",{beforeExpr:!0,binop:7}),_instanceof:N("instanceof",{beforeExpr:!0,binop:7}),_typeof:N("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:N("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:N("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},R=/\r\n?|\n|\u2028|\u2029/,D=new RegExp(R.source,"g");function L(t){return 10===t||13===t||8232===t||8233===t}function z(t,e,i){void 0===i&&(i=t.length);for(var r=e;r<i;r++){var n=t.charCodeAt(r);if(L(n))return r<i-1&&13===n&&10===t.charCodeAt(r+1)?r+2:r+1}return-1}var U=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,q=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,F=Object.prototype,V=F.hasOwnProperty,B=F.toString,G=Object.hasOwn||function(t,e){return V.call(t,e)},H=Array.isArray||function(t){return"[object Array]"===B.call(t)},K=Object.create(null);function J(t){return K[t]||(K[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function W(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])/,Q=function(t,e){this.line=t,this.column=e};Q.prototype.offset=function(t){return new Q(this.line,this.column+t)};var X=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function Y(t,e){for(var i=1,r=0;;){var n=z(t,r,e);if(n<0)return new Q(i,e-r);++i,r=n}}var tt={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,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},et=!1;function it(t,e){return 2|(t?4:0)|(e?8:0)}var rt=function(t,e,i){this.options=t=function(t){var e={};for(var i in tt)e[i]=t&&G(t,i)?t[i]:tt[i];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!et&&"object"==typeof console&&console.warn&&(et=!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),H(e.onToken)){var r=e.onToken;e.onToken=function(t){return r.push(t)}}if(H(e.onComment)&&(e.onComment=function(t,e){return function(i,r,n,s,o,a){var u={type:i?"Block":"Line",value:r,start:n,end:s};t.locations&&(u.loc=new X(this,o,a)),t.ranges&&(u.range=[n,s]),e.push(u)}}(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=J(_[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var r="";!0!==t.allowReserved&&(r=$[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(r+=" await")),this.reservedWords=J(r);var n=(r?r+" ":"")+$.strict;this.reservedWordsStrict=J(n),this.reservedWordsStrictBind=J(n+" "+$.strictBind),this.input=String(e),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(R).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=M.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=[]},nt={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}};rt.prototype.parse=function(){var t=this,e=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow((function(){return t.parseTopLevel(e)}))},nt.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},nt.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},nt.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},nt.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},nt.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},nt.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},nt.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},nt.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},nt.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},nt.allowUsing.get=function(){var t=this.currentScope().flags;return!(1024&t||!this.inModule&&1&t)},nt.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},rt.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},rt.parse=function(t,e){return new this(e,t).parse()},rt.parseExpressionAt=function(t,e,i){var r=new this(i,t,e);return r.nextToken(),r.parseExpression()},rt.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(rt.prototype,nt);var st=rt.prototype,ot=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;st.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){q.lastIndex=t,t+=q.exec(this.input)[0].length;var e=ot.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){q.lastIndex=t+e[0].length;var i=q.exec(this.input),r=i.index+i[0].length,n=this.input.charAt(r);return";"===n||"}"===n||R.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(r+1))}q.lastIndex=t+=e[0].length,t+=q.exec(this.input)[0].length,";"===this.input[t]&&t++}},st.eat=function(t){return this.type===t&&(this.next(),!0)},st.isContextual=function(t){return this.type===M.name&&this.value===t&&!this.containsEsc},st.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},st.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")}},st.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},st.canInsertSemicolon=function(){return this.type===M.eof||this.type===M.braceR||R.test(this.input.slice(this.lastTokEnd,this.start))},st.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},st.semicolon=function(){this.eat(M.semi)||this.insertSemicolon()||this.unexpected()},st.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},st.expect=function(t){this.eat(t)||this.unexpected()},st.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")};var at=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};st.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")}},st.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")},st.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")},st.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var ut=rt.prototype;ut.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==M.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 ht={kind:"loop"},ct={kind:"switch"};ut.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;q.lastIndex=this.pos;var e=q.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(O(r)){var n=i;do{i+=r<=65535?1:2}while(j(r=this.fullCharCodeAt(i)));if(92===r)return!0;var s=this.input.slice(n,i);if(!k.test(s))return!0}return!1},ut.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;q.lastIndex=this.pos;var t,e=q.exec(this.input),i=this.pos+e[0].length;return!(R.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(j(t=this.fullCharCodeAt(i+8))||92===t))},ut.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;q.lastIndex=this.pos;var i=q.exec(this.input),r=this.pos+i[0].length;if(R.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||j(n=this.fullCharCodeAt(s))||92===n)return!1;q.lastIndex=s;var o=q.exec(this.input);if(r=s+o[0].length,o&&R.test(this.input.slice(s,r)))return!1}var a=this.fullCharCodeAt(r);if(!O(a)&&92!==a)return!1;var u=r;do{r+=a<=65535?1:2}while(j(a=this.fullCharCodeAt(r)));if(92===a)return!0;var h=this.input.slice(u,r);if(k.test(h))return!1;if(e&&!t&&"of"===h){q.lastIndex=r;var c=q.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},ut.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},ut.isUsing=function(t){return this.isUsingKeyword(!1,t)},ut.parseStatement=function(t,e,i){var r,n=this.type,s=this.startNode();switch(this.isLet(t)&&(n=M._var,r="let"),n){case M._break:case M._continue:return this.parseBreakContinueStatement(s,n.keyword);case M._debugger:return this.parseDebuggerStatement(s);case M._do:return this.parseDoStatement(s);case M._for:return this.parseForStatement(s);case M._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!t);case M._class:return t&&this.unexpected(),this.parseClass(s,!0);case M._if:return this.parseIfStatement(s);case M._return:return this.parseReturnStatement(s);case M._switch:return this.parseSwitchStatement(s);case M._throw:return this.parseThrowStatement(s);case M._try:return this.parseTryStatement(s);case M._const:case M._var:return r=r||this.value,t&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case M._while:return this.parseWhileStatement(s);case M._with:return this.parseWithStatement(s);case M.braceL:return this.parseBlock(!0,s);case M.semi:return this.parseEmptyStatement(s);case M._export:case M._import:if(this.options.ecmaVersion>10&&n===M._import){q.lastIndex=this.pos;var o=q.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===M._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!t);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)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"===u&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,!1,u),this.semicolon(),this.finishNode(s,"VariableDeclaration");var h=this.value,c=this.parseExpression();return n===M.name&&"Identifier"===c.type&&this.eat(M.colon)?this.parseLabeledStatement(s,h,c,t):this.parseExpressionStatement(s,c)}},ut.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(M.semi)||this.insertSemicolon()?t.label=null:this.type!==M.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")},ut.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},ut.parseDoStatement=function(t){return this.next(),this.labels.push(ht),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(M._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(M.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},ut.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ht),this.enterScope(0),this.expect(M.parenL),this.type===M.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===M._var||this.type===M._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 u=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(u,!0,a),this.finishNode(u,"VariableDeclaration"),this.parseForAfterInit(t,u,e)}var h=this.containsEsc,c=new at,f=this.start,l=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===M._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===M._in&&this.unexpected(e),t.await=!0):o&&this.options.ecmaVersion>=8&&(l.start!==f||h||"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))},ut.parseForAfterInit=function(t,e,i){return(this.type===M._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.type===M._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))},ut.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,lt|(i?0:dt),!1,e)},ut.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(M._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},ut.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(M.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},ut.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(M.braceL),this.labels.push(ct),this.enterScope(1024);for(var i=!1;this.type!==M.braceR;)if(this.type===M._case||this.type===M._default){var r=this.type===M._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(M.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")},ut.parseThrowStatement=function(t){return this.next(),R.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 ft=[];ut.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?32:0),this.checkLValPattern(t,e?4:2),this.expect(M.parenR),t},ut.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===M._catch){var e=this.startNode();this.next(),this.eat(M.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(M._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},ut.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")},ut.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(ht),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},ut.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")},ut.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},ut.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===M._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var u=this.labels[a];if(u.statementStart!==t.start)break;u.statementStart=this.start,u.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")},ut.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},ut.parseBlock=function(t,e,i){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(M.braceL),t&&this.enterScope(0);this.type!==M.braceR;){var r=this.parseStatement(null);e.body.push(r)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},ut.parseFor=function(t,e){return t.init=e,this.expect(M.semi),t.test=this.type===M.semi?null:this.parseExpression(),this.expect(M.semi),t.update=this.type===M.parenR?null:this.parseExpression(),this.expect(M.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},ut.parseForIn=function(t,e){var i=this.type===M._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(M.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},ut.parseVar=function(t,e,i,r){for(t.declarations=[],t.kind=i;;){var n=this.startNode();if(this.parseVarId(n,i),this.eat(M.eq)?n.init=this.parseMaybeAssign(e):r||"const"!==i||this.type===M._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==i&&"await using"!==i||!(this.options.ecmaVersion>=17)||this.type===M._in||this.isContextual("of")?r||"Identifier"===n.id.type||e&&(this.type===M._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(M.comma))break}return t},ut.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 lt=1,dt=2;function pt(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 mt(t,e){var i=t.key;return!t.computed&&("Identifier"===i.type&&i.name===e||"Literal"===i.type&&i.value===e)}ut.parseFunction=function(t,e,i,r,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===M.star&&e&dt&&this.unexpected(),t.generator=this.eat(M.star)),this.options.ecmaVersion>=8&&(t.async=!!r),e<&&(t.id=4&e&&this.type!==M.name?null:this.parseIdent(),!t.id||e&dt||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(it(t.async,t.generator)),e<||(t.id=this.type===M.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<?"FunctionDeclaration":"FunctionExpression")},ut.parseFunctionParams=function(t){this.expect(M.parenL),t.params=this.parseBindingList(M.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},ut.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(M.braceL);this.type!==M.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&&pt(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")},ut.parseClassElement=function(t){if(this.eat(M.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(M.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===M.star?a=!0:r="static"}if(i.static=a,!r&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==M.star||this.canInsertSemicolon()?r="async":s=!0),!r&&(e>=9||!s)&&this.eat(M.star)&&(n=!0),!r&&!s&&!n){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=u:r=u)}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===M.parenL||"method"!==o||n||s){var h=!i.static&&mt(i,"constructor"),c=h&&t;h&&"method"!==o&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=h?"constructor":o,this.parseClassMethod(i,n,s,c)}else this.parseClassField(i);return i},ut.isClassElementNameStart=function(){return this.type===M.name||this.type===M.privateId||this.type===M.num||this.type===M.string||this.type===M.bracketL||this.type.keyword},ut.parseClassElementName=function(t){this.type===M.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)},ut.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&&mt(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")},ut.parseClassField=function(t){return mt(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&mt(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(M.eq)?(this.enterScope(576),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},ut.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(320);this.type!==M.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},ut.parseClassId=function(t,e){this.type===M.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},ut.parseClassSuper=function(t){t.superClass=this.eat(M._extends)?this.parseExprSubscripts(null,!1):null},ut.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},ut.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];G(e,o.name)||(n?n.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},ut.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!==M.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},ut.parseExport=function(t,e){if(this.next(),this.eat(M.star))return this.parseExportAllDeclaration(t,e);if(this.eat(M._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!==M.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")},ut.parseExportDeclaration=function(){return this.parseStatement(null)},ut.parseExportDefaultDeclaration=function(){var t;if(this.type===M._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,4|lt,!1,t)}if(this.type===M._class){var i=this.startNode();return this.parseClass(i,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},ut.checkExport=function(t,e,i){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),G(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},ut.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)},ut.checkVariableExport=function(t,e){if(t)for(var i=0,r=e;i<r.length;i+=1)this.checkPatternExport(t,r[i].id)},ut.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},ut.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")},ut.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(M.braceL);!this.eat(M.braceR);){if(i)i=!1;else if(this.expect(M.comma),this.afterTrailingComma(M.braceR))break;e.push(this.parseExportSpecifier(t))}return e},ut.parseImport=function(t){return this.next(),this.type===M.string?(t.specifiers=ft,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===M.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},ut.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")},ut.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportDefaultSpecifier")},ut.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")},ut.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===M.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(M.comma)))return t;if(this.type===M.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(M.braceL);!this.eat(M.braceR);){if(e)e=!1;else if(this.expect(M.comma),this.afterTrailingComma(M.braceR))break;t.push(this.parseImportSpecifier())}return t},ut.parseWithClause=function(){var t=[];if(!this.eat(M._with))return t;this.expect(M.braceL);for(var e={},i=!0;!this.eat(M.braceR);){if(i)i=!1;else if(this.expect(M.comma),this.afterTrailingComma(M.braceR))break;var r=this.parseImportAttribute(),n="Identifier"===r.key.type?r.key.name:r.key.value;G(e,n)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+n+"'"),e[n]=!0,t.push(r)}return t},ut.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===M.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(M.colon),this.type!==M.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},ut.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===M.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)},ut.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)},ut.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 vt=rt.prototype;vt.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},vt.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},vt.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},vt.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==M.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},vt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case M.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(M.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case M.braceL:return this.parseObj(!0)}return this.parseIdent()},vt.parseBindingList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);)if(s?s=!1:this.expect(M.comma),e&&this.type===M.comma)n.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===M.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),n.push(o),this.type===M.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}n.push(this.parseAssignableListItem(r))}return n},vt.parseAssignableListItem=function(){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},vt.parseBindingListItem=function(t){return t},vt.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(M.eq))return i;var r=this.startNodeAt(t,e);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},vt.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&&(G(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")}},vt.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)}},vt.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 yt=function(t,e,i,r,n){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=r,this.generator=!!n},gt={b_stat:new yt("{",!1),b_expr:new yt("{",!0),b_tmpl:new yt("${",!1),p_stat:new yt("(",!1),p_expr:new yt("(",!0),q_tmpl:new yt("`",!0,!0,(function(t){return t.tryReadTemplateToken()})),f_stat:new yt("function",!1),f_expr:new yt("function",!0),f_expr_gen:new yt("function",!0,!1,null,!0),f_gen:new yt("function",!1,!1,null,!0)},bt=rt.prototype;bt.initialContext=function(){return[gt.b_stat]},bt.curContext=function(){return this.context[this.context.length-1]},bt.braceIsBlock=function(t){var e=this.curContext();return e===gt.f_expr||e===gt.f_stat||(t!==M.colon||e!==gt.b_stat&&e!==gt.b_expr?t===M._return||t===M.name&&this.exprAllowed?R.test(this.input.slice(this.lastTokEnd,this.start)):t===M._else||t===M.semi||t===M.eof||t===M.parenR||t===M.arrow||(t===M.braceL?e===gt.b_stat:t!==M._var&&t!==M._const&&t!==M.name&&!this.exprAllowed):!e.isExpr)},bt.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},bt.updateContext=function(t){var e,i=this.type;i.keyword&&t===M.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},bt.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},M.parenR.updateContext=M.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===gt.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},M.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?gt.b_stat:gt.b_expr),this.exprAllowed=!0},M.dollarBraceL.updateContext=function(){this.context.push(gt.b_tmpl),this.exprAllowed=!0},M.parenL.updateContext=function(t){this.context.push(t===M._if||t===M._for||t===M._with||t===M._while?gt.p_stat:gt.p_expr),this.exprAllowed=!0},M.incDec.updateContext=function(){},M._function.updateContext=M._class.updateContext=function(t){!t.beforeExpr||t===M._else||t===M.semi&&this.curContext()!==gt.p_stat||t===M._return&&R.test(this.input.slice(this.lastTokEnd,this.start))||(t===M.colon||t===M.braceL)&&this.curContext()===gt.b_stat?this.context.push(gt.f_stat):this.context.push(gt.f_expr),this.exprAllowed=!1},M.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},M.backQuote.updateContext=function(){this.curContext()===gt.q_tmpl?this.context.pop():this.context.push(gt.q_tmpl),this.exprAllowed=!1},M.star.updateContext=function(t){if(t===M._function){var e=this.context.length-1;this.context[e]=this.context[e]===gt.f_expr?gt.f_expr_gen:gt.f_gen}this.exprAllowed=!0},M.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==M.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var $t=rt.prototype;function wt(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&wt(t.expression)}function _t(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&_t(t.expression)||"ParenthesizedExpression"===t.type&&_t(t.expression)}$t.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}}},$t.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===M.comma){var o=i.startNodeAt(r,n);for(o.expressions=[s];i.eat(M.comma);)o.expressions.push(i.parseMaybeAssign(t,e));return i.finishNode(o,"SequenceExpression")}return s}))},$t.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 at,r=!0);var a=this.start,u=this.startLoc;this.type!==M.parenL&&this.type!==M.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var h=this.parseMaybeConditional(t,e);if(i&&(h=i.call(this,h,a,u)),this.type.isAssign){var c=this.startNodeAt(a,u);return c.operator=this.value,this.type===M.eq&&(h=this.toAssignable(h,!1,e)),r||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=h.start&&(e.shorthandAssign=-1),this.type===M.eq?this.checkLValPattern(h):this.checkLValSimple(h),c.left=h,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),h},$t.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(M.question)){var s=this.startNodeAt(i,r);return s.test=n,s.consequent=this.parseMaybeAssign(),this.expect(M.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return n},$t.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)},$t.parseExprOp=function(t,e,i,r,n){var s=this.type.binop;if(null!=s&&(!n||this.type!==M._in)&&s>r){var o=this.type===M.logicalOR||this.type===M.logicalAND,a=this.type===M.coalesce;a&&(s=M.logicalAND.binop);var u=this.value;this.next();var h=this.start,c=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),h,c,s,n),l=this.buildBinary(e,i,t,f,u,o||a);return(o&&this.type===M.coalesce||a&&(this.type===M.logicalOR||this.type===M.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},$t.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")},$t.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(),u=this.type===M.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,u,r),this.checkExpressionErrors(t,!0),u?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&wt(a.argument)?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&_t(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):e=!0,n=this.finishNode(a,u?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==M.privateId){if(n=this.parseExprSubscripts(t,r),this.checkExpressionErrors(t))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var h=this.startNodeAt(s,o);h.operator=this.value,h.prefix=!1,h.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(h,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==M._in&&this.unexpected();return i||!this.eat(M.starstar)?n:e?void this.unexpected(this.lastTokStart):this.buildBinary(s,o,n,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},$t.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},$t.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 u=this.startNodeAt(e,i);u.expression=a,a=this.finishNode(u,"ChainExpression")}return a}t=a}},$t.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(M.arrow)},$t.parseSubscriptAsyncArrow=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,r)},$t.parseSubscript=function(t,e,i,r,n,s,o){var a=this.options.ecmaVersion>=11,u=a&&this.eat(M.questionDot);r&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var h=this.eat(M.bracketL);if(h||u&&this.type!==M.parenL&&this.type!==M.backQuote||this.eat(M.dot)){var c=this.startNodeAt(e,i);c.object=t,h?(c.property=this.parseExpression(),this.expect(M.bracketR)):c.property=this.type===M.privateId&&"Super"!==t.type?this.parsePrivateIdent():this.parseIdent("never"!==this.options.allowReserved),c.computed=!!h,a&&(c.optional=u),t=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(M.parenL)){var f=new at,l=this.yieldPos,d=this.awaitPos,p=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(M.parenR,this.options.ecmaVersion>=8,!1,f);if(n&&!u&&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=u),t=this.finishNode(v,"CallExpression")}else if(this.type===M.backQuote){(u||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},$t.parseExprAtom=function(t,e,i){this.type===M.slash&&this.readRegexp();var r,n=this.potentialArrowAt===this.start;switch(this.type){case M._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==M.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==M.dot&&this.type!==M.bracketL&&this.type!==M.parenL&&this.unexpected(),this.finishNode(r,"Super");case M._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case M.name:var s=this.start,o=this.startLoc,a=this.containsEsc,u=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&"async"===u.name&&!this.canInsertSemicolon()&&this.eat(M._function))return this.overrideContext(gt.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(M.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[u],!1,e);if(this.options.ecmaVersion>=8&&"async"===u.name&&this.type===M.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return u=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(M.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[u],!0,e)}return u;case M.regexp:var h=this.value;return(r=this.parseLiteral(h.value)).regex={pattern:h.pattern,flags:h.flags},r;case M.num:case M.string:return this.parseLiteral(this.value);case M._null:case M._true:case M._false:return(r=this.startNode()).value=this.type===M._null?null:this.type===M._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case M.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 M.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(M.bracketR,!0,!0,t),this.finishNode(r,"ArrayExpression");case M.braceL:return this.overrideContext(gt.b_expr),this.parseObj(!1,t);case M._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case M._class:return this.parseClass(this.startNode(),!1);case M._new:return this.parseNew();case M.backQuote:return this.parseTemplate();case M._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}},$t.parseExprAtomDefault=function(){this.unexpected()},$t.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===M.parenL&&!t)return this.parseDynamicImport(e);if(this.type===M.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()},$t.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(M.parenR)?t.options=null:(this.expect(M.comma),this.afterTrailingComma(M.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(M.parenR)||(this.expect(M.comma),this.afterTrailingComma(M.parenR)||this.unexpected())));else if(!this.eat(M.parenR)){var e=this.start;this.eat(M.comma)&&this.eat(M.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},$t.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")},$t.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")},$t.parseParenExpression=function(){this.expect(M.parenL);var t=this.parseExpression();return this.expect(M.parenR),t},$t.shouldParseArrow=function(){return!this.canInsertSemicolon()},$t.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,u=this.startLoc,h=[],c=!0,f=!1,l=new at,d=this.yieldPos,p=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==M.parenR;){if(c?c=!1:this.expect(M.comma),s&&this.afterTrailingComma(M.parenR,!0)){f=!0;break}if(this.type===M.ellipsis){o=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===M.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}h.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var m=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(M.parenR),t&&this.shouldParseArrow(h)&&this.eat(M.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=p,this.parseParenArrowList(r,n,h,e);h.length&&!f||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(l,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=p||this.awaitPos,h.length>1?((i=this.startNodeAt(a,u)).expressions=h,this.finishNodeAt(i,"SequenceExpression",m,v)):i=h[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},$t.parseParenItem=function(t){return t},$t.parseParenArrowList=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,r)};var kt=[];$t.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===M.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(M.parenL)?this.parseExprList(M.parenR,this.options.ecmaVersion>=8,!1):kt,this.finishNode(t,"NewExpression")},$t.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===M.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===M.backQuote,this.finishNode(i,"TemplateElement")},$t.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===M.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(M.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(M.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},$t.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===M.name||this.type===M.num||this.type===M.string||this.type===M.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===M.star)&&!R.test(this.input.slice(this.lastTokEnd,this.start))},$t.parseObj=function(t,e){var i=this.startNode(),r=!0,n={};for(i.properties=[],this.next();!this.eat(M.braceR);){if(r)r=!1;else if(this.expect(M.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(M.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")},$t.parseProperty=function(t,e){var i,r,n,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(M.ellipsis))return t?(o.argument=this.parseIdent(!1),this.type===M.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===M.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(M.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(M.star),this.parsePropertyName(o)):r=!1,this.parsePropertyValue(o,t,i,r,n,s,e,a),this.finishNode(o,"Property")},$t.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")},$t.parsePropertyValue=function(t,e,i,r,n,s,o,a){(i||r)&&this.type===M.colon&&this.unexpected(),this.eat(M.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init"):this.options.ecmaVersion>=6&&this.type===M.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===M.comma||this.type===M.braceR||this.type===M.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===M.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))},$t.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(M.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(M.bracketR),t.key;t.computed=!1}return t.key=this.type===M.num||this.type===M.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},$t.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},$t.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|it(e,r.generator)|(i?128:0)),this.expect(M.parenL),r.params=this.parseBindingList(M.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")},$t.parseArrowExpression=function(t,e,i,r){var n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|it(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")},$t.parseFunctionBody=function(t,e,i,r){var n=this.strict,s=!1;if(e&&this.type!==M.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()},$t.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1)if("Identifier"!==i[e].type)return!1;return!0},$t.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)},$t.parseExprList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(M.comma),e&&this.afterTrailingComma(t))break;var o=void 0;i&&this.type===M.comma?o=null:this.type===M.ellipsis?(o=this.parseSpread(r),r&&this.type===M.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),n.push(o)}return n},$t.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"))},$t.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},$t.parseIdentNode=function(){var t=this.startNode();return this.type===M.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=M.name):this.unexpected(),t},$t.parsePrivateIdent=function(){var t=this.startNode();return this.type===M.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},$t.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===M.semi||this.canInsertSemicolon()||this.type!==M.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(M.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},$t.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 Et=rt.prototype;Et.raise=function(t,e){var i=Y(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},Et.raiseRecoverable=Et.raise,Et.curPosition=function(){if(this.options.locations)return new Q(this.curLine,this.pos-this.lineStart)};var St=rt.prototype,xt=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};St.enterScope=function(t){this.scopeStack.push(new xt(t))},St.exitScope=function(){this.scopeStack.pop()},St.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},St.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")},St.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},St.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},St.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags)return e}},St.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 Ot=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new X(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},jt=rt.prototype;function Pt(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}jt.startNode=function(){return new Ot(this,this.start,this.startLoc)},jt.startNodeAt=function(t,e){return new Ot(this,t,e)},jt.finishNode=function(t,e){return Pt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},jt.finishNodeAt=function(t,e,i,r){return Pt.call(this,t,e,i,r)},jt.copyNode=function(t){var e=new Ot(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var It,Ct,Tt="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",At=Tt+" Extended_Pictographic",Nt=At+" EBase EComp EMod EPres ExtPict",Mt={9:Tt,10:At,11:At,12:Nt,13:Nt,14:Nt},Rt={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"},Dt="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",Lt="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",zt=Lt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ut=zt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",qt=Ut+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ft=qt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Vt={9:Lt,10:zt,11:Ut,12:qt,13:Ft,14:Ft+" 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"},Bt={};for(var Gt=0,Ht=[9,10,11,12,13,14];Gt<Ht.length;Gt+=1)Ct=void 0,(Ct=Bt[It=Ht[Gt]]={binary:J(Mt[It]+" "+Dt),binaryOfStrings:J(Rt[It]),nonBinary:{General_Category:J(Dt),Script:J(Vt[It])}}).nonBinary.Script_Extensions=Ct.nonBinary.Script,Ct.nonBinary.gc=Ct.nonBinary.General_Category,Ct.nonBinary.sc=Ct.nonBinary.Script,Ct.nonBinary.scx=Ct.nonBinary.Script_Extensions;var Kt=rt.prototype,Jt=function(t,e){this.parent=t,this.base=e||this};Jt.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},Jt.prototype.sibling=function(){return new Jt(this.parent,this.base)};var Wt=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=Bt[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 Qt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function Xt(t){return t>=65&&t<=90||t>=97&&t<=122}function Yt(t){return Xt(t)||95===t}function te(t){return Yt(t)||ee(t)}function ee(t){return t>=48&&t<=57}function ie(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function re(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function ne(t){return t>=48&&t<=55}Wt.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)},Wt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Wt.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},Wt.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},Wt.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},Wt.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},Wt.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},Wt.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},Wt.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},Kt.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")},Kt.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))},Kt.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")},Kt.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Jt(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")},Kt.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},Kt.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)},Kt.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},Kt.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},Kt.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},Kt.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},Kt.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)},Kt.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},Kt.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 u=o.charAt(a);(o.indexOf(u,a+1)>-1||i.indexOf(u)>-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},Kt.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},Kt.regexp_eatModifiers=function(t){for(var e="",i=0;-1!==(i=t.current())&&Zt(i);)e+=W(i),t.advance();return e},Kt.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)},Kt.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},Kt.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Qt(e)&&(t.lastIntValue=e,t.advance(),!0)},Kt.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!Qt(i);)t.advance();return t.pos!==e},Kt.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))},Kt.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}},Kt.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},Kt.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=W(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=W(t.lastIntValue);return!0}return!1},Kt.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 O(t,!0)||36===t||95===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Kt.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 j(t,!0)||36===t||95===t||8204===t||8205===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Kt.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)},Kt.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},Kt.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},Kt.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)},Kt.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},Kt.regexp_eatZero=function(t){return 48===t.current()&&!ee(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},Kt.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)},Kt.regexp_eatControlLetter=function(t){var e=t.current();return!!Xt(e)&&(t.lastIntValue=e%32,t.advance(),!0)},Kt.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},Kt.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))},Kt.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},Kt.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},Kt.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},Kt.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){G(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},Kt.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")},Kt.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";Yt(e=t.current());)t.lastStringValue+=W(e),t.advance();return""!==t.lastStringValue},Kt.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";te(e=t.current());)t.lastStringValue+=W(e),t.advance();return""!==t.lastStringValue},Kt.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},Kt.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},Kt.regexp_classContents=function(t){return 93===t.current()?1:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),1)},Kt.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")}}},Kt.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||ne(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)},Kt.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)},Kt.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)}},Kt.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},Kt.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?1:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},Kt.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},Kt.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},Kt.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)2===this.regexp_classString(t)&&(e=2);return e},Kt.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?1:2},Kt.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))},Kt.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)},Kt.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!ee(e)&&95!==e||(t.lastIntValue=e%32,t.advance(),0))},Kt.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},Kt.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;ee(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},Kt.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;ie(i=t.current());)t.lastIntValue=16*t.lastIntValue+re(i),t.advance();return t.pos!==e},Kt.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},Kt.regexp_eatOctalDigit=function(t){var e=t.current();return ne(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},Kt.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var r=0;r<e;++r){var n=t.current();if(!ie(n))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+re(n),t.advance()}return!0};var se=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new X(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},oe=rt.prototype;function ae(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}oe.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 se(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},oe.getToken=function(){return this.next(),new se(this)},"undefined"!=typeof Symbol&&(oe[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===M.eof,value:e}}}}),oe.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(M.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},oe.readToken=function(t){return O(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},oe.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},oe.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},oe.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=z(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())},oe.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&&!L(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())},oe.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&&U.test(String.fromCharCode(t))))break t;++this.pos}}},oe.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)},oe.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(M.ellipsis)):(++this.pos,this.finishToken(M.dot))},oe.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(M.assign,2):this.finishOp(M.slash,1)},oe.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,r=42===t?M.star:M.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,r=M.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(M.assign,i+1):this.finishOp(r,i)},oe.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(M.assign,3):this.finishOp(124===t?M.logicalOR:M.logicalAND,2):61===e?this.finishOp(M.assign,2):this.finishOp(124===t?M.bitwiseOR:M.bitwiseAND,1)},oe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(M.assign,2):this.finishOp(M.bitwiseXOR,1)},oe.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&&!R.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(M.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(M.assign,2):this.finishOp(M.plusMin,1)},oe.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(M.assign,i+1):this.finishOp(M.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(M.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},oe.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(M.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(M.arrow)):this.finishOp(61===t?M.eq:M.prefix,1)},oe.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(M.questionDot,2)}if(63===e)return t>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(M.assign,3):this.finishOp(M.coalesce,2)}return this.finishOp(M.question,1)},oe.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,O(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(M.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+W(t)+"'")},oe.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(M.parenL);case 41:return++this.pos,this.finishToken(M.parenR);case 59:return++this.pos,this.finishToken(M.semi);case 44:return++this.pos,this.finishToken(M.comma);case 91:return++this.pos,this.finishToken(M.bracketL);case 93:return++this.pos,this.finishToken(M.bracketR);case 123:return++this.pos,this.finishToken(M.braceL);case 125:return++this.pos,this.finishToken(M.braceR);case 58:return++this.pos,this.finishToken(M.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(M.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(M.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+W(t)+"'")},oe.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},oe.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(R.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 Wt(this));a.reset(i,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var u=null;try{u=new RegExp(n,o)}catch(t){}return this.finishToken(M.regexp,{pattern:n,flags:o,value:u})},oe.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,u=0,h=null==e?1/0:e;u<h;++u,++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===u&&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},oe.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=ae(this.input.slice(e,this.pos)),++this.pos):O(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(M.num,i)},oe.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=ae(this.input.slice(e,this.pos));return++this.pos,O(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(M.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")),O(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(M.num,o)},oe.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},oe.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)):(L(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(M.string,e)};var ue={};function he(t,e){return rt.parse(t,e)}oe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==ue)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},oe.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ue;this.raise(t,e)},oe.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!==M.template&&this.type!==M.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(M.template,t)):36===i?(this.pos+=2,this.finishToken(M.dollarBraceL)):(++this.pos,this.finishToken(M.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(L(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}},oe.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(M.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")},oe.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 W(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 L(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},oe.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},oe.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(j(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?O:j)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=W(o),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},oe.readWord=function(){var t=this.readWord1(),e=M.name;return this.keywords.test(t)&&(e=A[t]),this.finishToken(e,t)},rt.acorn={Parser:rt,version:"8.17.0",defaultOptions:tt,Position:Q,SourceLocation:X,getLineInfo:Y,Node:Ot,TokenType:P,tokTypes:M,keywordTypes:A,TokContext:yt,tokContexts:gt,isIdentifierChar:j,isIdentifierStart:O,Token:se,isNewLine:L,lineBreak:R,lineBreakG:D,nonASCIIwhitespace:U};var ce,fe={exports:{}},le={},de={},pe={},me={},ve={},ye={};function ge(){return ce||(ce=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=[h(t[0])];let n=0;for(;n<e.length;)i.push(s),a(i,e[n]),i.push(s,h(t[++n]));return function(t){let e=1;for(;e<t.length-1;){if(t[e]===s){const i=u(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:h(Array.isArray(n)?n.join(","):n))}function u(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 h(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(h(t))},t.safeStringify=h,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())}}(ye)),ye}var be,$e,we={};function _e(){return be||(be=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=ge();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]=[]),u=a.length;return a[u]=e.ref,r.setValue(e,{property:n,itemIndex:u}),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 u=e.nil;for(const h in n){const c=n[h];if(!c)continue;const f=o[h]=o[h]||new Map;c.forEach((n=>{if(f.has(n))return;f.set(n,r.Started);let o=s(n);if(o)u=e._`${u}${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);u=e._`${u}${o}${this.opts._n}`}f.set(n,r.Completed)}))}return u}}}(we)),we}function ke(){return $e||($e=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=ge(),i=_e();var r=ge();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=_e();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 u 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 h 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 b 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 $ 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 w 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 k extends d{render(t){return"return "+super.render(t)}}k.kind="return";class E 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 u(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 b(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 $(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 w("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 w("in",s,o,r),(()=>n(o)))}endFor(){return this._endBlockNode(g)}label(t){return this._leafNode(new h(t))}break(t){return this._leafNode(new c(t))}return(t){const e=new k;if(this._blockNode(e),this.code(t),1!==e.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(t,e,i){if(!e&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new E;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 T=N(t.operators.AND);t.and=function(...t){return t.reduce(T)};const A=N(t.operators.OR);function N(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(A)}}(ve)),ve}var Ee,Se={};function xe(){if(Ee)return Se;Ee=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.checkStrictMode=Se.getErrorPath=Se.Type=Se.useFunc=Se.setEvaluated=Se.evaluatedPropsToName=Se.mergeEvaluated=Se.eachItem=Se.unescapeJsonPointer=Se.escapeJsonPointer=Se.escapeFragment=Se.unescapeFragment=Se.schemaRefOrVal=Se.schemaHasRulesButRef=Se.schemaHasRules=Se.checkUnknownRules=Se.alwaysValidSchema=Se.toHash=void 0;const t=ke(),e=ge();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,u)=>{const h=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 u!==t.Name||h instanceof t.Name?h:n(s,h)}}function a(e,i){if(!0===i)return e.var("props",!0);const r=e.var("props",t._`{}`);return void 0!==i&&u(e,r,i),r}function u(e,i,r){Object.keys(r).forEach((r=>e.assign(t._`${i}${(0,t.getProperty)(r)}`,!0)))}Se.toHash=function(t){const e={};for(const i of t)e[i]=!0;return e},Se.alwaysValidSchema=function(t,e){return"boolean"==typeof e?e:0===Object.keys(e).length||(i(t,e),!r(e,t.self.RULES.all))},Se.checkUnknownRules=i,Se.schemaHasRules=r,Se.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},Se.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)}`},Se.unescapeFragment=function(t){return s(decodeURIComponent(t))},Se.escapeFragment=function(t){return encodeURIComponent(n(t))},Se.escapeJsonPointer=n,Se.unescapeJsonPointer=s,Se.eachItem=function(t,e){if(Array.isArray(t))for(const i of t)e(i);else e(t)},Se.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} || {}`),u(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)})},Se.evaluatedPropsToName=a,Se.setEvaluated=u;const h={};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 Se.useFunc=function(t,i){return t.scopeValue("func",{ref:i,code:h[i.code]||(h[i.code]=new e._Code(i.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(c||(Se.Type=c={})),Se.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)},Se.checkStrictMode=f,Se}var Oe,je,Pe,Ie={};function Ce(){if(Oe)return Ie;Oe=1,Object.defineProperty(Ie,"__esModule",{value:!0});const t=ke(),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 Ie.default=e,Ie}function Te(){return je||(je=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=ke(),i=xe(),r=Ce();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,u){const{it:h}=i,{gen:c,compositeRule:f,allErrors:l}=h,d=a(i,r,o);(null!=u?u:f||l)?n(c,d):s(h,e._`[${d}]`)},t.reportExtraError=function(e,i=t.keywordError,o){const{it:u}=e,{gen:h,compositeRule:c,allErrors:f}=u;n(h,a(e,i,o)),c||f||s(u,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 u=t.name("err");t.forRange("i",o,r.default.errors,(o=>{t.const(u,e._`${r.default.vErrors}[${o}]`),t.if(e._`${u}.instancePath === undefined`,(()=>t.assign(e._`${u}.instancePath`,(0,e.strConcat)(r.default.instancePath,a.errorPath)))),t.assign(e._`${u}.schemaPath`,e.str`${a.errSchemaPath}/${i}`),a.opts.verbose&&(t.assign(e._`${u}.schema`,n),t.assign(e._`${u}.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=[u(a,n),h(t,n)];return function(t,{params:i,message:n},s){const{keyword:a,data:u,schemaValue:h,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,h],[o.parentSchema,e._`${d}${p}`],[r.default.data,u]),l&&s.push([o.propertyName,l])}(t,i,c),s.object(...c)}(t,i,n)}function u({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 h({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]}}(me)),me}function Ae(){if(Pe)return pe;Pe=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.boolOrEmptySchema=pe.topBoolOrEmptySchema=void 0;const t=Te(),e=ke(),i=Ce(),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 pe.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))},pe.boolOrEmptySchema=function(t,e){const{gen:i,schema:r}=t;!1===r?(i.var(e,!1),n(t)):i.var(e,!0)},pe}var Ne,Me={},Re={};function De(){if(Ne)return Re;Ne=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.getRules=Re.isJSONType=void 0;const t=new Set(["string","number","integer","boolean","null","object","array"]);return Re.isJSONType=function(e){return"string"==typeof e&&t.has(e)},Re.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:{}}},Re}var Le,ze,Ue={};function qe(){if(Le)return Ue;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 Le=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.shouldUseRule=Ue.shouldUseGroup=Ue.schemaHasRulesForType=void 0,Ue.schemaHasRulesForType=function({schema:e,self:i},r){const n=i.RULES.types[r];return n&&!0!==n&&t(e,n)},Ue.shouldUseGroup=t,Ue.shouldUseRule=e,Ue}function Fe(){if(ze)return Me;ze=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;const t=De(),e=qe(),i=Te(),r=ke(),n=xe();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||(Me.DataType=s={})),Me.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},Me.getJSONTypes=o,Me.coerceAndCheckDataType=function(t,i){const{gen:n,data:o,opts:u}=t,c=function(t,e){return e?t.filter((t=>a.has(t)||"array"===e&&"array"===t)):[]}(i,u.coerceTypes),l=i.length>0&&!(0===c.length&&1===i.length&&(0,e.schemaHasRulesForType)(t,i[0]));if(l){const e=h(i,o,u.strictNumbers,s.Wrong);n.if(e,(()=>{c.length?function(t,e,i){const{gen:n,data:s,opts:o}=t,u=n.let("dataType",r._`typeof ${s}`),c=n.let("coerced",r._`undefined`);"array"===o.coerceTypes&&n.if(r._`${u} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,r._`${s}[0]`).assign(u,r._`typeof ${s}`).if(h(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._`${u} == "number" || ${u} == "boolean"`).assign(c,r._`"" + ${s}`).elseIf(r._`${s} === null`).assign(c,r._`""`);case"number":return void n.elseIf(r._`${u} == "boolean" || ${s} === null
|
|
1
|
+
import{h as t}from"./p-DMDO6w5-.js";var e;const i=Symbol.for("formkrafter.wc.bricks"),r=globalThis,n=null!==(e=r[i])&&void 0!==e?e:r[i]=new Map,s=(t,e)=>`${t}:${e}`;function o(t){n.set(s(t.type,t.id),t)}function a(t){t.forEach(o)}function u(t,e){return n.get(s(t,e))}function h(){return[...n.values()].filter((t=>!t.isPrivate)).map((t=>({type:t.type,id:t.id,name:t.name,configsForm:t.configsForm,category:t.category,isPrivate:t.isPrivate})))}function c(){var t,e;const i={};for(const r of h()){const n=null!==(t=r.category)&&void 0!==t?t:"Uncategorized";(null!==(e=i[n])&&void 0!==e?e:i[n]=[]).push(r)}return i}function f(t,e){var i,r;const n=u(t,e);if(!n)return;const s=n.getBrickEmptySpec(),o=crypto.randomUUID();return Object.assign(Object.assign({},s),{configs:Object.assign(Object.assign({},s.configs),{uid:o,key:null!==(r=null===(i=s.configs)||void 0===i?void 0:i.key)&&void 0!==r?r:`${e}_${o.slice(0,6)}`})})}function l(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d,p={exports:{}},m=(d||(d=1,p.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,u,h=t.get_operator(i),c=i[h];if(Array.isArray(c)||(c=[c]),"if"===h||"?:"==h){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"===h){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),!t.truthy(s))return s;return s}if("or"===h){for(n=0;n<c.length;n+=1)if(s=t.apply(c[n],r),t.truthy(s))return s;return s}if("filter"===h)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"===h)return a=t.apply(c[0],r),o=c[1],Array.isArray(a)?a.map((function(e){return t.apply(o,e)})):[];if("reduce"===h)return a=t.apply(c[0],r),o=c[1],u=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})}),u):u;if("all"===h){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"===h){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"===h){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(h)&&"function"==typeof e[h])return e[h].apply(r,c);if(h.indexOf(".")>0){var f=String(h).split("."),l=e;for(n=0;n<f.length;n++){if(!l.hasOwnProperty(f[n]))throw new Error("Unrecognized operation "+h+" (failed at "+f.slice(0,n+1).join(".")+")");l=l[f[n]]}return l.apply(r,c)}throw new Error("Unrecognized operation "+h)},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}()),p.exports),v=l(m),y=[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],g=[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],b="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",$={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"},w="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",_={5:w,"5module":w+" export import",6:w+" const class extends export import super"},k=/^in(stanceof)?$/,E=new RegExp("["+b+"]"),S=new RegExp("["+b+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function x(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 O(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&E.test(String.fromCharCode(t)):!1!==e&&x(t,g)))}function j(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&S.test(String.fromCharCode(t)):!1!==e&&(x(t,g)||x(t,y)))))}var P=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 I(t,e){return new P(t,{beforeExpr:!0,binop:e})}var C={beforeExpr:!0},T={startsExpr:!0},A={};function N(t,e){return void 0===e&&(e={}),e.keyword=t,A[t]=new P(t,e)}var M={num:new P("num",T),regexp:new P("regexp",T),string:new P("string",T),name:new P("name",T),privateId:new P("privateId",T),eof:new P("eof"),bracketL:new P("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new P("]"),braceL:new P("{",{beforeExpr:!0,startsExpr:!0}),braceR:new P("}"),parenL:new P("(",{beforeExpr:!0,startsExpr:!0}),parenR:new P(")"),comma:new P(",",C),semi:new P(";",C),colon:new P(":",C),dot:new P("."),question:new P("?",C),questionDot:new P("?."),arrow:new P("=>",C),template:new P("template"),invalidTemplate:new P("invalidTemplate"),ellipsis:new P("...",C),backQuote:new P("`",T),dollarBraceL:new P("${",{beforeExpr:!0,startsExpr:!0}),eq:new P("=",{beforeExpr:!0,isAssign:!0}),assign:new P("_=",{beforeExpr:!0,isAssign:!0}),incDec:new P("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new P("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:I("||",1),logicalAND:I("&&",2),bitwiseOR:I("|",3),bitwiseXOR:I("^",4),bitwiseAND:I("&",5),equality:I("==/!=/===/!==",6),relational:I("</>/<=/>=",7),bitShift:I("<</>>/>>>",8),plusMin:new P("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:I("%",10),star:I("*",10),slash:I("/",10),starstar:new P("**",{beforeExpr:!0}),coalesce:I("??",1),_break:N("break"),_case:N("case",C),_catch:N("catch"),_continue:N("continue"),_debugger:N("debugger"),_default:N("default",C),_do:N("do",{isLoop:!0,beforeExpr:!0}),_else:N("else",C),_finally:N("finally"),_for:N("for",{isLoop:!0}),_function:N("function",T),_if:N("if"),_return:N("return",C),_switch:N("switch"),_throw:N("throw",C),_try:N("try"),_var:N("var"),_const:N("const"),_while:N("while",{isLoop:!0}),_with:N("with"),_new:N("new",{beforeExpr:!0,startsExpr:!0}),_this:N("this",T),_super:N("super",T),_class:N("class",T),_extends:N("extends",C),_export:N("export"),_import:N("import",T),_null:N("null",T),_true:N("true",T),_false:N("false",T),_in:N("in",{beforeExpr:!0,binop:7}),_instanceof:N("instanceof",{beforeExpr:!0,binop:7}),_typeof:N("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:N("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:N("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},R=/\r\n?|\n|\u2028|\u2029/,D=new RegExp(R.source,"g");function L(t){return 10===t||13===t||8232===t||8233===t}function z(t,e,i){void 0===i&&(i=t.length);for(var r=e;r<i;r++){var n=t.charCodeAt(r);if(L(n))return r<i-1&&13===n&&10===t.charCodeAt(r+1)?r+2:r+1}return-1}var U=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,q=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,F=Object.prototype,V=F.hasOwnProperty,B=F.toString,G=Object.hasOwn||function(t,e){return V.call(t,e)},H=Array.isArray||function(t){return"[object Array]"===B.call(t)},K=Object.create(null);function J(t){return K[t]||(K[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function W(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])/,Y=function(t,e){this.line=t,this.column=e};Y.prototype.offset=function(t){return new Y(this.line,this.column+t)};var Q=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function X(t,e){for(var i=1,r=0;;){var n=z(t,r,e);if(n<0)return new Y(i,e-r);++i,r=n}}var tt={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,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},et=!1;function it(t,e){return 2|(t?4:0)|(e?8:0)}var rt=function(t,e,i){this.options=t=function(t){var e={};for(var i in tt)e[i]=t&&G(t,i)?t[i]:tt[i];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!et&&"object"==typeof console&&console.warn&&(et=!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),H(e.onToken)){var r=e.onToken;e.onToken=function(t){return r.push(t)}}if(H(e.onComment)&&(e.onComment=function(t,e){return function(i,r,n,s,o,a){var u={type:i?"Block":"Line",value:r,start:n,end:s};t.locations&&(u.loc=new Q(this,o,a)),t.ranges&&(u.range=[n,s]),e.push(u)}}(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=J(_[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var r="";!0!==t.allowReserved&&(r=$[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(r+=" await")),this.reservedWords=J(r);var n=(r?r+" ":"")+$.strict;this.reservedWordsStrict=J(n),this.reservedWordsStrictBind=J(n+" "+$.strictBind),this.input=String(e),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(R).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=M.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=[]},nt={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}};rt.prototype.parse=function(){var t=this,e=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow((function(){return t.parseTopLevel(e)}))},nt.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},nt.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},nt.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},nt.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},nt.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},nt.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},nt.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},nt.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},nt.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},nt.allowUsing.get=function(){var t=this.currentScope().flags;return!(1024&t||!this.inModule&&1&t)},nt.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},rt.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},rt.parse=function(t,e){return new this(e,t).parse()},rt.parseExpressionAt=function(t,e,i){var r=new this(i,t,e);return r.nextToken(),r.parseExpression()},rt.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(rt.prototype,nt);var st=rt.prototype,ot=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;st.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){q.lastIndex=t,t+=q.exec(this.input)[0].length;var e=ot.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){q.lastIndex=t+e[0].length;var i=q.exec(this.input),r=i.index+i[0].length,n=this.input.charAt(r);return";"===n||"}"===n||R.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(r+1))}q.lastIndex=t+=e[0].length,t+=q.exec(this.input)[0].length,";"===this.input[t]&&t++}},st.eat=function(t){return this.type===t&&(this.next(),!0)},st.isContextual=function(t){return this.type===M.name&&this.value===t&&!this.containsEsc},st.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},st.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")}},st.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},st.canInsertSemicolon=function(){return this.type===M.eof||this.type===M.braceR||R.test(this.input.slice(this.lastTokEnd,this.start))},st.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},st.semicolon=function(){this.eat(M.semi)||this.insertSemicolon()||this.unexpected()},st.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},st.expect=function(t){this.eat(t)||this.unexpected()},st.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")};var at=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};st.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")}},st.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")},st.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")},st.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var ut=rt.prototype;ut.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==M.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 ht={kind:"loop"},ct={kind:"switch"};ut.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;q.lastIndex=this.pos;var e=q.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(O(r)){var n=i;do{i+=r<=65535?1:2}while(j(r=this.fullCharCodeAt(i)));if(92===r)return!0;var s=this.input.slice(n,i);if(!k.test(s))return!0}return!1},ut.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;q.lastIndex=this.pos;var t,e=q.exec(this.input),i=this.pos+e[0].length;return!(R.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(j(t=this.fullCharCodeAt(i+8))||92===t))},ut.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;q.lastIndex=this.pos;var i=q.exec(this.input),r=this.pos+i[0].length;if(R.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||j(n=this.fullCharCodeAt(s))||92===n)return!1;q.lastIndex=s;var o=q.exec(this.input);if(r=s+o[0].length,o&&R.test(this.input.slice(s,r)))return!1}var a=this.fullCharCodeAt(r);if(!O(a)&&92!==a)return!1;var u=r;do{r+=a<=65535?1:2}while(j(a=this.fullCharCodeAt(r)));if(92===a)return!0;var h=this.input.slice(u,r);if(k.test(h))return!1;if(e&&!t&&"of"===h){q.lastIndex=r;var c=q.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},ut.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},ut.isUsing=function(t){return this.isUsingKeyword(!1,t)},ut.parseStatement=function(t,e,i){var r,n=this.type,s=this.startNode();switch(this.isLet(t)&&(n=M._var,r="let"),n){case M._break:case M._continue:return this.parseBreakContinueStatement(s,n.keyword);case M._debugger:return this.parseDebuggerStatement(s);case M._do:return this.parseDoStatement(s);case M._for:return this.parseForStatement(s);case M._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!t);case M._class:return t&&this.unexpected(),this.parseClass(s,!0);case M._if:return this.parseIfStatement(s);case M._return:return this.parseReturnStatement(s);case M._switch:return this.parseSwitchStatement(s);case M._throw:return this.parseThrowStatement(s);case M._try:return this.parseTryStatement(s);case M._const:case M._var:return r=r||this.value,t&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case M._while:return this.parseWhileStatement(s);case M._with:return this.parseWithStatement(s);case M.braceL:return this.parseBlock(!0,s);case M.semi:return this.parseEmptyStatement(s);case M._export:case M._import:if(this.options.ecmaVersion>10&&n===M._import){q.lastIndex=this.pos;var o=q.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===M._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!t);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)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"===u&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,!1,u),this.semicolon(),this.finishNode(s,"VariableDeclaration");var h=this.value,c=this.parseExpression();return n===M.name&&"Identifier"===c.type&&this.eat(M.colon)?this.parseLabeledStatement(s,h,c,t):this.parseExpressionStatement(s,c)}},ut.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(M.semi)||this.insertSemicolon()?t.label=null:this.type!==M.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")},ut.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},ut.parseDoStatement=function(t){return this.next(),this.labels.push(ht),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(M._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(M.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},ut.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ht),this.enterScope(0),this.expect(M.parenL),this.type===M.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===M._var||this.type===M._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 u=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(u,!0,a),this.finishNode(u,"VariableDeclaration"),this.parseForAfterInit(t,u,e)}var h=this.containsEsc,c=new at,f=this.start,l=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===M._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===M._in&&this.unexpected(e),t.await=!0):o&&this.options.ecmaVersion>=8&&(l.start!==f||h||"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))},ut.parseForAfterInit=function(t,e,i){return(this.type===M._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.type===M._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))},ut.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,lt|(i?0:dt),!1,e)},ut.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(M._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},ut.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(M.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},ut.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(M.braceL),this.labels.push(ct),this.enterScope(1024);for(var i=!1;this.type!==M.braceR;)if(this.type===M._case||this.type===M._default){var r=this.type===M._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(M.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")},ut.parseThrowStatement=function(t){return this.next(),R.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 ft=[];ut.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?32:0),this.checkLValPattern(t,e?4:2),this.expect(M.parenR),t},ut.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===M._catch){var e=this.startNode();this.next(),this.eat(M.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(M._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},ut.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")},ut.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(ht),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},ut.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")},ut.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},ut.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===M._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var u=this.labels[a];if(u.statementStart!==t.start)break;u.statementStart=this.start,u.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")},ut.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},ut.parseBlock=function(t,e,i){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(M.braceL),t&&this.enterScope(0);this.type!==M.braceR;){var r=this.parseStatement(null);e.body.push(r)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},ut.parseFor=function(t,e){return t.init=e,this.expect(M.semi),t.test=this.type===M.semi?null:this.parseExpression(),this.expect(M.semi),t.update=this.type===M.parenR?null:this.parseExpression(),this.expect(M.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},ut.parseForIn=function(t,e){var i=this.type===M._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(M.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},ut.parseVar=function(t,e,i,r){for(t.declarations=[],t.kind=i;;){var n=this.startNode();if(this.parseVarId(n,i),this.eat(M.eq)?n.init=this.parseMaybeAssign(e):r||"const"!==i||this.type===M._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==i&&"await using"!==i||!(this.options.ecmaVersion>=17)||this.type===M._in||this.isContextual("of")?r||"Identifier"===n.id.type||e&&(this.type===M._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(M.comma))break}return t},ut.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 lt=1,dt=2;function pt(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 mt(t,e){var i=t.key;return!t.computed&&("Identifier"===i.type&&i.name===e||"Literal"===i.type&&i.value===e)}ut.parseFunction=function(t,e,i,r,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===M.star&&e&dt&&this.unexpected(),t.generator=this.eat(M.star)),this.options.ecmaVersion>=8&&(t.async=!!r),e<&&(t.id=4&e&&this.type!==M.name?null:this.parseIdent(),!t.id||e&dt||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(it(t.async,t.generator)),e<||(t.id=this.type===M.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<?"FunctionDeclaration":"FunctionExpression")},ut.parseFunctionParams=function(t){this.expect(M.parenL),t.params=this.parseBindingList(M.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},ut.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(M.braceL);this.type!==M.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&&pt(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")},ut.parseClassElement=function(t){if(this.eat(M.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(M.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===M.star?a=!0:r="static"}if(i.static=a,!r&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==M.star||this.canInsertSemicolon()?r="async":s=!0),!r&&(e>=9||!s)&&this.eat(M.star)&&(n=!0),!r&&!s&&!n){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=u:r=u)}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===M.parenL||"method"!==o||n||s){var h=!i.static&&mt(i,"constructor"),c=h&&t;h&&"method"!==o&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=h?"constructor":o,this.parseClassMethod(i,n,s,c)}else this.parseClassField(i);return i},ut.isClassElementNameStart=function(){return this.type===M.name||this.type===M.privateId||this.type===M.num||this.type===M.string||this.type===M.bracketL||this.type.keyword},ut.parseClassElementName=function(t){this.type===M.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)},ut.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&&mt(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")},ut.parseClassField=function(t){return mt(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&mt(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(M.eq)?(this.enterScope(576),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},ut.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(320);this.type!==M.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},ut.parseClassId=function(t,e){this.type===M.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},ut.parseClassSuper=function(t){t.superClass=this.eat(M._extends)?this.parseExprSubscripts(null,!1):null},ut.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},ut.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];G(e,o.name)||(n?n.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},ut.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!==M.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},ut.parseExport=function(t,e){if(this.next(),this.eat(M.star))return this.parseExportAllDeclaration(t,e);if(this.eat(M._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!==M.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")},ut.parseExportDeclaration=function(){return this.parseStatement(null)},ut.parseExportDefaultDeclaration=function(){var t;if(this.type===M._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,4|lt,!1,t)}if(this.type===M._class){var i=this.startNode();return this.parseClass(i,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},ut.checkExport=function(t,e,i){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),G(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},ut.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)},ut.checkVariableExport=function(t,e){if(t)for(var i=0,r=e;i<r.length;i+=1)this.checkPatternExport(t,r[i].id)},ut.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},ut.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")},ut.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(M.braceL);!this.eat(M.braceR);){if(i)i=!1;else if(this.expect(M.comma),this.afterTrailingComma(M.braceR))break;e.push(this.parseExportSpecifier(t))}return e},ut.parseImport=function(t){return this.next(),this.type===M.string?(t.specifiers=ft,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===M.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},ut.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")},ut.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportDefaultSpecifier")},ut.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")},ut.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===M.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(M.comma)))return t;if(this.type===M.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(M.braceL);!this.eat(M.braceR);){if(e)e=!1;else if(this.expect(M.comma),this.afterTrailingComma(M.braceR))break;t.push(this.parseImportSpecifier())}return t},ut.parseWithClause=function(){var t=[];if(!this.eat(M._with))return t;this.expect(M.braceL);for(var e={},i=!0;!this.eat(M.braceR);){if(i)i=!1;else if(this.expect(M.comma),this.afterTrailingComma(M.braceR))break;var r=this.parseImportAttribute(),n="Identifier"===r.key.type?r.key.name:r.key.value;G(e,n)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+n+"'"),e[n]=!0,t.push(r)}return t},ut.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===M.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(M.colon),this.type!==M.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},ut.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===M.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)},ut.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)},ut.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 vt=rt.prototype;vt.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},vt.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},vt.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},vt.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==M.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},vt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case M.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(M.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case M.braceL:return this.parseObj(!0)}return this.parseIdent()},vt.parseBindingList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);)if(s?s=!1:this.expect(M.comma),e&&this.type===M.comma)n.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===M.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),n.push(o),this.type===M.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}n.push(this.parseAssignableListItem(r))}return n},vt.parseAssignableListItem=function(){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},vt.parseBindingListItem=function(t){return t},vt.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(M.eq))return i;var r=this.startNodeAt(t,e);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},vt.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&&(G(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")}},vt.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)}},vt.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 yt=function(t,e,i,r,n){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=r,this.generator=!!n},gt={b_stat:new yt("{",!1),b_expr:new yt("{",!0),b_tmpl:new yt("${",!1),p_stat:new yt("(",!1),p_expr:new yt("(",!0),q_tmpl:new yt("`",!0,!0,(function(t){return t.tryReadTemplateToken()})),f_stat:new yt("function",!1),f_expr:new yt("function",!0),f_expr_gen:new yt("function",!0,!1,null,!0),f_gen:new yt("function",!1,!1,null,!0)},bt=rt.prototype;bt.initialContext=function(){return[gt.b_stat]},bt.curContext=function(){return this.context[this.context.length-1]},bt.braceIsBlock=function(t){var e=this.curContext();return e===gt.f_expr||e===gt.f_stat||(t!==M.colon||e!==gt.b_stat&&e!==gt.b_expr?t===M._return||t===M.name&&this.exprAllowed?R.test(this.input.slice(this.lastTokEnd,this.start)):t===M._else||t===M.semi||t===M.eof||t===M.parenR||t===M.arrow||(t===M.braceL?e===gt.b_stat:t!==M._var&&t!==M._const&&t!==M.name&&!this.exprAllowed):!e.isExpr)},bt.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},bt.updateContext=function(t){var e,i=this.type;i.keyword&&t===M.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},bt.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},M.parenR.updateContext=M.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===gt.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},M.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?gt.b_stat:gt.b_expr),this.exprAllowed=!0},M.dollarBraceL.updateContext=function(){this.context.push(gt.b_tmpl),this.exprAllowed=!0},M.parenL.updateContext=function(t){this.context.push(t===M._if||t===M._for||t===M._with||t===M._while?gt.p_stat:gt.p_expr),this.exprAllowed=!0},M.incDec.updateContext=function(){},M._function.updateContext=M._class.updateContext=function(t){!t.beforeExpr||t===M._else||t===M.semi&&this.curContext()!==gt.p_stat||t===M._return&&R.test(this.input.slice(this.lastTokEnd,this.start))||(t===M.colon||t===M.braceL)&&this.curContext()===gt.b_stat?this.context.push(gt.f_stat):this.context.push(gt.f_expr),this.exprAllowed=!1},M.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},M.backQuote.updateContext=function(){this.curContext()===gt.q_tmpl?this.context.pop():this.context.push(gt.q_tmpl),this.exprAllowed=!1},M.star.updateContext=function(t){if(t===M._function){var e=this.context.length-1;this.context[e]=this.context[e]===gt.f_expr?gt.f_expr_gen:gt.f_gen}this.exprAllowed=!0},M.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==M.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var $t=rt.prototype;function wt(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&wt(t.expression)}function _t(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&_t(t.expression)||"ParenthesizedExpression"===t.type&&_t(t.expression)}$t.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}}},$t.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===M.comma){var o=i.startNodeAt(r,n);for(o.expressions=[s];i.eat(M.comma);)o.expressions.push(i.parseMaybeAssign(t,e));return i.finishNode(o,"SequenceExpression")}return s}))},$t.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 at,r=!0);var a=this.start,u=this.startLoc;this.type!==M.parenL&&this.type!==M.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var h=this.parseMaybeConditional(t,e);if(i&&(h=i.call(this,h,a,u)),this.type.isAssign){var c=this.startNodeAt(a,u);return c.operator=this.value,this.type===M.eq&&(h=this.toAssignable(h,!1,e)),r||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=h.start&&(e.shorthandAssign=-1),this.type===M.eq?this.checkLValPattern(h):this.checkLValSimple(h),c.left=h,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),h},$t.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(M.question)){var s=this.startNodeAt(i,r);return s.test=n,s.consequent=this.parseMaybeAssign(),this.expect(M.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return n},$t.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)},$t.parseExprOp=function(t,e,i,r,n){var s=this.type.binop;if(null!=s&&(!n||this.type!==M._in)&&s>r){var o=this.type===M.logicalOR||this.type===M.logicalAND,a=this.type===M.coalesce;a&&(s=M.logicalAND.binop);var u=this.value;this.next();var h=this.start,c=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),h,c,s,n),l=this.buildBinary(e,i,t,f,u,o||a);return(o&&this.type===M.coalesce||a&&(this.type===M.logicalOR||this.type===M.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},$t.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")},$t.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(),u=this.type===M.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,u,r),this.checkExpressionErrors(t,!0),u?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&wt(a.argument)?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&_t(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):e=!0,n=this.finishNode(a,u?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==M.privateId){if(n=this.parseExprSubscripts(t,r),this.checkExpressionErrors(t))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var h=this.startNodeAt(s,o);h.operator=this.value,h.prefix=!1,h.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(h,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==M._in&&this.unexpected();return i||!this.eat(M.starstar)?n:e?void this.unexpected(this.lastTokStart):this.buildBinary(s,o,n,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},$t.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},$t.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 u=this.startNodeAt(e,i);u.expression=a,a=this.finishNode(u,"ChainExpression")}return a}t=a}},$t.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(M.arrow)},$t.parseSubscriptAsyncArrow=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,r)},$t.parseSubscript=function(t,e,i,r,n,s,o){var a=this.options.ecmaVersion>=11,u=a&&this.eat(M.questionDot);r&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var h=this.eat(M.bracketL);if(h||u&&this.type!==M.parenL&&this.type!==M.backQuote||this.eat(M.dot)){var c=this.startNodeAt(e,i);c.object=t,h?(c.property=this.parseExpression(),this.expect(M.bracketR)):c.property=this.type===M.privateId&&"Super"!==t.type?this.parsePrivateIdent():this.parseIdent("never"!==this.options.allowReserved),c.computed=!!h,a&&(c.optional=u),t=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(M.parenL)){var f=new at,l=this.yieldPos,d=this.awaitPos,p=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(M.parenR,this.options.ecmaVersion>=8,!1,f);if(n&&!u&&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=u),t=this.finishNode(v,"CallExpression")}else if(this.type===M.backQuote){(u||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},$t.parseExprAtom=function(t,e,i){this.type===M.slash&&this.readRegexp();var r,n=this.potentialArrowAt===this.start;switch(this.type){case M._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==M.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==M.dot&&this.type!==M.bracketL&&this.type!==M.parenL&&this.unexpected(),this.finishNode(r,"Super");case M._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case M.name:var s=this.start,o=this.startLoc,a=this.containsEsc,u=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&"async"===u.name&&!this.canInsertSemicolon()&&this.eat(M._function))return this.overrideContext(gt.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(M.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[u],!1,e);if(this.options.ecmaVersion>=8&&"async"===u.name&&this.type===M.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return u=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(M.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[u],!0,e)}return u;case M.regexp:var h=this.value;return(r=this.parseLiteral(h.value)).regex={pattern:h.pattern,flags:h.flags},r;case M.num:case M.string:return this.parseLiteral(this.value);case M._null:case M._true:case M._false:return(r=this.startNode()).value=this.type===M._null?null:this.type===M._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case M.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 M.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(M.bracketR,!0,!0,t),this.finishNode(r,"ArrayExpression");case M.braceL:return this.overrideContext(gt.b_expr),this.parseObj(!1,t);case M._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case M._class:return this.parseClass(this.startNode(),!1);case M._new:return this.parseNew();case M.backQuote:return this.parseTemplate();case M._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}},$t.parseExprAtomDefault=function(){this.unexpected()},$t.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===M.parenL&&!t)return this.parseDynamicImport(e);if(this.type===M.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()},$t.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(M.parenR)?t.options=null:(this.expect(M.comma),this.afterTrailingComma(M.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(M.parenR)||(this.expect(M.comma),this.afterTrailingComma(M.parenR)||this.unexpected())));else if(!this.eat(M.parenR)){var e=this.start;this.eat(M.comma)&&this.eat(M.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},$t.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")},$t.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")},$t.parseParenExpression=function(){this.expect(M.parenL);var t=this.parseExpression();return this.expect(M.parenR),t},$t.shouldParseArrow=function(){return!this.canInsertSemicolon()},$t.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,u=this.startLoc,h=[],c=!0,f=!1,l=new at,d=this.yieldPos,p=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==M.parenR;){if(c?c=!1:this.expect(M.comma),s&&this.afterTrailingComma(M.parenR,!0)){f=!0;break}if(this.type===M.ellipsis){o=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===M.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}h.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var m=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(M.parenR),t&&this.shouldParseArrow(h)&&this.eat(M.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=p,this.parseParenArrowList(r,n,h,e);h.length&&!f||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(l,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=p||this.awaitPos,h.length>1?((i=this.startNodeAt(a,u)).expressions=h,this.finishNodeAt(i,"SequenceExpression",m,v)):i=h[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},$t.parseParenItem=function(t){return t},$t.parseParenArrowList=function(t,e,i,r){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,r)};var kt=[];$t.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===M.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(M.parenL)?this.parseExprList(M.parenR,this.options.ecmaVersion>=8,!1):kt,this.finishNode(t,"NewExpression")},$t.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===M.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===M.backQuote,this.finishNode(i,"TemplateElement")},$t.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===M.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(M.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(M.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},$t.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===M.name||this.type===M.num||this.type===M.string||this.type===M.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===M.star)&&!R.test(this.input.slice(this.lastTokEnd,this.start))},$t.parseObj=function(t,e){var i=this.startNode(),r=!0,n={};for(i.properties=[],this.next();!this.eat(M.braceR);){if(r)r=!1;else if(this.expect(M.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(M.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")},$t.parseProperty=function(t,e){var i,r,n,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(M.ellipsis))return t?(o.argument=this.parseIdent(!1),this.type===M.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===M.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(M.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(M.star),this.parsePropertyName(o)):r=!1,this.parsePropertyValue(o,t,i,r,n,s,e,a),this.finishNode(o,"Property")},$t.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")},$t.parsePropertyValue=function(t,e,i,r,n,s,o,a){(i||r)&&this.type===M.colon&&this.unexpected(),this.eat(M.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init"):this.options.ecmaVersion>=6&&this.type===M.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===M.comma||this.type===M.braceR||this.type===M.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===M.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))},$t.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(M.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(M.bracketR),t.key;t.computed=!1}return t.key=this.type===M.num||this.type===M.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},$t.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},$t.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|it(e,r.generator)|(i?128:0)),this.expect(M.parenL),r.params=this.parseBindingList(M.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")},$t.parseArrowExpression=function(t,e,i,r){var n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|it(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")},$t.parseFunctionBody=function(t,e,i,r){var n=this.strict,s=!1;if(e&&this.type!==M.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()},$t.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1)if("Identifier"!==i[e].type)return!1;return!0},$t.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)},$t.parseExprList=function(t,e,i,r){for(var n=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(M.comma),e&&this.afterTrailingComma(t))break;var o=void 0;i&&this.type===M.comma?o=null:this.type===M.ellipsis?(o=this.parseSpread(r),r&&this.type===M.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),n.push(o)}return n},$t.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"))},$t.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},$t.parseIdentNode=function(){var t=this.startNode();return this.type===M.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=M.name):this.unexpected(),t},$t.parsePrivateIdent=function(){var t=this.startNode();return this.type===M.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},$t.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===M.semi||this.canInsertSemicolon()||this.type!==M.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(M.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},$t.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 Et=rt.prototype;Et.raise=function(t,e){var i=X(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},Et.raiseRecoverable=Et.raise,Et.curPosition=function(){if(this.options.locations)return new Y(this.curLine,this.pos-this.lineStart)};var St=rt.prototype,xt=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};St.enterScope=function(t){this.scopeStack.push(new xt(t))},St.exitScope=function(){this.scopeStack.pop()},St.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},St.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")},St.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},St.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},St.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags)return e}},St.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 Ot=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new Q(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},jt=rt.prototype;function Pt(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}jt.startNode=function(){return new Ot(this,this.start,this.startLoc)},jt.startNodeAt=function(t,e){return new Ot(this,t,e)},jt.finishNode=function(t,e){return Pt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},jt.finishNodeAt=function(t,e,i,r){return Pt.call(this,t,e,i,r)},jt.copyNode=function(t){var e=new Ot(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var It,Ct,Tt="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",At=Tt+" Extended_Pictographic",Nt=At+" EBase EComp EMod EPres ExtPict",Mt={9:Tt,10:At,11:At,12:Nt,13:Nt,14:Nt},Rt={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"},Dt="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",Lt="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",zt=Lt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ut=zt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",qt=Ut+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ft=qt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Vt={9:Lt,10:zt,11:Ut,12:qt,13:Ft,14:Ft+" 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"},Bt={};for(var Gt=0,Ht=[9,10,11,12,13,14];Gt<Ht.length;Gt+=1)Ct=void 0,(Ct=Bt[It=Ht[Gt]]={binary:J(Mt[It]+" "+Dt),binaryOfStrings:J(Rt[It]),nonBinary:{General_Category:J(Dt),Script:J(Vt[It])}}).nonBinary.Script_Extensions=Ct.nonBinary.Script,Ct.nonBinary.gc=Ct.nonBinary.General_Category,Ct.nonBinary.sc=Ct.nonBinary.Script,Ct.nonBinary.scx=Ct.nonBinary.Script_Extensions;var Kt=rt.prototype,Jt=function(t,e){this.parent=t,this.base=e||this};Jt.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},Jt.prototype.sibling=function(){return new Jt(this.parent,this.base)};var Wt=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=Bt[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 Yt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function Qt(t){return t>=65&&t<=90||t>=97&&t<=122}function Xt(t){return Qt(t)||95===t}function te(t){return Xt(t)||ee(t)}function ee(t){return t>=48&&t<=57}function ie(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function re(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function ne(t){return t>=48&&t<=55}Wt.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)},Wt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Wt.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},Wt.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},Wt.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},Wt.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},Wt.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},Wt.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},Wt.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},Kt.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")},Kt.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))},Kt.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")},Kt.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Jt(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")},Kt.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},Kt.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)},Kt.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},Kt.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},Kt.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},Kt.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},Kt.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)},Kt.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},Kt.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 u=o.charAt(a);(o.indexOf(u,a+1)>-1||i.indexOf(u)>-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},Kt.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},Kt.regexp_eatModifiers=function(t){for(var e="",i=0;-1!==(i=t.current())&&Zt(i);)e+=W(i),t.advance();return e},Kt.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)},Kt.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},Kt.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Yt(e)&&(t.lastIntValue=e,t.advance(),!0)},Kt.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!Yt(i);)t.advance();return t.pos!==e},Kt.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))},Kt.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}},Kt.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},Kt.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=W(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=W(t.lastIntValue);return!0}return!1},Kt.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 O(t,!0)||36===t||95===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Kt.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 j(t,!0)||36===t||95===t||8204===t||8205===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Kt.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)},Kt.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},Kt.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},Kt.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)},Kt.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},Kt.regexp_eatZero=function(t){return 48===t.current()&&!ee(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},Kt.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)},Kt.regexp_eatControlLetter=function(t){var e=t.current();return!!Qt(e)&&(t.lastIntValue=e%32,t.advance(),!0)},Kt.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},Kt.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))},Kt.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},Kt.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},Kt.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},Kt.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){G(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},Kt.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")},Kt.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";Xt(e=t.current());)t.lastStringValue+=W(e),t.advance();return""!==t.lastStringValue},Kt.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";te(e=t.current());)t.lastStringValue+=W(e),t.advance();return""!==t.lastStringValue},Kt.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},Kt.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},Kt.regexp_classContents=function(t){return 93===t.current()?1:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),1)},Kt.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")}}},Kt.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||ne(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)},Kt.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)},Kt.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)}},Kt.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},Kt.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?1:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},Kt.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},Kt.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},Kt.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)2===this.regexp_classString(t)&&(e=2);return e},Kt.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?1:2},Kt.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))},Kt.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)},Kt.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!ee(e)&&95!==e||(t.lastIntValue=e%32,t.advance(),0))},Kt.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},Kt.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;ee(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},Kt.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;ie(i=t.current());)t.lastIntValue=16*t.lastIntValue+re(i),t.advance();return t.pos!==e},Kt.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},Kt.regexp_eatOctalDigit=function(t){var e=t.current();return ne(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},Kt.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var r=0;r<e;++r){var n=t.current();if(!ie(n))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+re(n),t.advance()}return!0};var se=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Q(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},oe=rt.prototype;function ae(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}oe.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 se(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},oe.getToken=function(){return this.next(),new se(this)},"undefined"!=typeof Symbol&&(oe[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===M.eof,value:e}}}}),oe.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(M.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},oe.readToken=function(t){return O(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},oe.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},oe.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},oe.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=z(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())},oe.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&&!L(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())},oe.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&&U.test(String.fromCharCode(t))))break t;++this.pos}}},oe.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)},oe.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(M.ellipsis)):(++this.pos,this.finishToken(M.dot))},oe.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(M.assign,2):this.finishOp(M.slash,1)},oe.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,r=42===t?M.star:M.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,r=M.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(M.assign,i+1):this.finishOp(r,i)},oe.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(M.assign,3):this.finishOp(124===t?M.logicalOR:M.logicalAND,2):61===e?this.finishOp(M.assign,2):this.finishOp(124===t?M.bitwiseOR:M.bitwiseAND,1)},oe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(M.assign,2):this.finishOp(M.bitwiseXOR,1)},oe.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&&!R.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(M.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(M.assign,2):this.finishOp(M.plusMin,1)},oe.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(M.assign,i+1):this.finishOp(M.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(M.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},oe.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(M.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(M.arrow)):this.finishOp(61===t?M.eq:M.prefix,1)},oe.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(M.questionDot,2)}if(63===e)return t>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(M.assign,3):this.finishOp(M.coalesce,2)}return this.finishOp(M.question,1)},oe.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,O(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(M.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+W(t)+"'")},oe.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(M.parenL);case 41:return++this.pos,this.finishToken(M.parenR);case 59:return++this.pos,this.finishToken(M.semi);case 44:return++this.pos,this.finishToken(M.comma);case 91:return++this.pos,this.finishToken(M.bracketL);case 93:return++this.pos,this.finishToken(M.bracketR);case 123:return++this.pos,this.finishToken(M.braceL);case 125:return++this.pos,this.finishToken(M.braceR);case 58:return++this.pos,this.finishToken(M.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(M.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(M.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+W(t)+"'")},oe.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},oe.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(R.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 Wt(this));a.reset(i,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var u=null;try{u=new RegExp(n,o)}catch(t){}return this.finishToken(M.regexp,{pattern:n,flags:o,value:u})},oe.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,u=0,h=null==e?1/0:e;u<h;++u,++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===u&&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},oe.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=ae(this.input.slice(e,this.pos)),++this.pos):O(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(M.num,i)},oe.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=ae(this.input.slice(e,this.pos));return++this.pos,O(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(M.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")),O(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(M.num,o)},oe.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},oe.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)):(L(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(M.string,e)};var ue={};function he(t,e){return rt.parse(t,e)}oe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==ue)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},oe.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ue;this.raise(t,e)},oe.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!==M.template&&this.type!==M.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(M.template,t)):36===i?(this.pos+=2,this.finishToken(M.dollarBraceL)):(++this.pos,this.finishToken(M.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(L(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}},oe.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(M.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")},oe.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 W(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 L(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},oe.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},oe.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(j(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?O:j)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=W(o),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},oe.readWord=function(){var t=this.readWord1(),e=M.name;return this.keywords.test(t)&&(e=A[t]),this.finishToken(e,t)},rt.acorn={Parser:rt,version:"8.17.0",defaultOptions:tt,Position:Y,SourceLocation:Q,getLineInfo:X,Node:Ot,TokenType:P,tokTypes:M,keywordTypes:A,TokContext:yt,tokContexts:gt,isIdentifierChar:j,isIdentifierStart:O,Token:se,isNewLine:L,lineBreak:R,lineBreakG:D,nonASCIIwhitespace:U};var ce,fe={exports:{}},le={},de={},pe={},me={},ve={},ye={};function ge(){return ce||(ce=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=[h(t[0])];let n=0;for(;n<e.length;)i.push(s),a(i,e[n]),i.push(s,h(t[++n]));return function(t){let e=1;for(;e<t.length-1;){if(t[e]===s){const i=u(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:h(Array.isArray(n)?n.join(","):n))}function u(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 h(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(h(t))},t.safeStringify=h,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())}}(ye)),ye}var be,$e,we={};function _e(){return be||(be=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=ge();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]=[]),u=a.length;return a[u]=e.ref,r.setValue(e,{property:n,itemIndex:u}),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 u=e.nil;for(const h in n){const c=n[h];if(!c)continue;const f=o[h]=o[h]||new Map;c.forEach((n=>{if(f.has(n))return;f.set(n,r.Started);let o=s(n);if(o)u=e._`${u}${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);u=e._`${u}${o}${this.opts._n}`}f.set(n,r.Completed)}))}return u}}}(we)),we}function ke(){return $e||($e=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=ge(),i=_e();var r=ge();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=_e();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 u 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 h 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 b 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 $ 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 w 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 k extends d{render(t){return"return "+super.render(t)}}k.kind="return";class E 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 u(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 b(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 $(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 w("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 w("in",s,o,r),(()=>n(o)))}endFor(){return this._endBlockNode(g)}label(t){return this._leafNode(new h(t))}break(t){return this._leafNode(new c(t))}return(t){const e=new k;if(this._blockNode(e),this.code(t),1!==e.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(t,e,i){if(!e&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new E;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 T=N(t.operators.AND);t.and=function(...t){return t.reduce(T)};const A=N(t.operators.OR);function N(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(A)}}(ve)),ve}var Ee,Se={};function xe(){if(Ee)return Se;Ee=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.checkStrictMode=Se.getErrorPath=Se.Type=Se.useFunc=Se.setEvaluated=Se.evaluatedPropsToName=Se.mergeEvaluated=Se.eachItem=Se.unescapeJsonPointer=Se.escapeJsonPointer=Se.escapeFragment=Se.unescapeFragment=Se.schemaRefOrVal=Se.schemaHasRulesButRef=Se.schemaHasRules=Se.checkUnknownRules=Se.alwaysValidSchema=Se.toHash=void 0;const t=ke(),e=ge();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,u)=>{const h=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 u!==t.Name||h instanceof t.Name?h:n(s,h)}}function a(e,i){if(!0===i)return e.var("props",!0);const r=e.var("props",t._`{}`);return void 0!==i&&u(e,r,i),r}function u(e,i,r){Object.keys(r).forEach((r=>e.assign(t._`${i}${(0,t.getProperty)(r)}`,!0)))}Se.toHash=function(t){const e={};for(const i of t)e[i]=!0;return e},Se.alwaysValidSchema=function(t,e){return"boolean"==typeof e?e:0===Object.keys(e).length||(i(t,e),!r(e,t.self.RULES.all))},Se.checkUnknownRules=i,Se.schemaHasRules=r,Se.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},Se.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)}`},Se.unescapeFragment=function(t){return s(decodeURIComponent(t))},Se.escapeFragment=function(t){return encodeURIComponent(n(t))},Se.escapeJsonPointer=n,Se.unescapeJsonPointer=s,Se.eachItem=function(t,e){if(Array.isArray(t))for(const i of t)e(i);else e(t)},Se.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} || {}`),u(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)})},Se.evaluatedPropsToName=a,Se.setEvaluated=u;const h={};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 Se.useFunc=function(t,i){return t.scopeValue("func",{ref:i,code:h[i.code]||(h[i.code]=new e._Code(i.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(c||(Se.Type=c={})),Se.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)},Se.checkStrictMode=f,Se}var Oe,je,Pe,Ie={};function Ce(){if(Oe)return Ie;Oe=1,Object.defineProperty(Ie,"__esModule",{value:!0});const t=ke(),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 Ie.default=e,Ie}function Te(){return je||(je=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=ke(),i=xe(),r=Ce();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,u){const{it:h}=i,{gen:c,compositeRule:f,allErrors:l}=h,d=a(i,r,o);(null!=u?u:f||l)?n(c,d):s(h,e._`[${d}]`)},t.reportExtraError=function(e,i=t.keywordError,o){const{it:u}=e,{gen:h,compositeRule:c,allErrors:f}=u;n(h,a(e,i,o)),c||f||s(u,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 u=t.name("err");t.forRange("i",o,r.default.errors,(o=>{t.const(u,e._`${r.default.vErrors}[${o}]`),t.if(e._`${u}.instancePath === undefined`,(()=>t.assign(e._`${u}.instancePath`,(0,e.strConcat)(r.default.instancePath,a.errorPath)))),t.assign(e._`${u}.schemaPath`,e.str`${a.errSchemaPath}/${i}`),a.opts.verbose&&(t.assign(e._`${u}.schema`,n),t.assign(e._`${u}.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=[u(a,n),h(t,n)];return function(t,{params:i,message:n},s){const{keyword:a,data:u,schemaValue:h,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,h],[o.parentSchema,e._`${d}${p}`],[r.default.data,u]),l&&s.push([o.propertyName,l])}(t,i,c),s.object(...c)}(t,i,n)}function u({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 h({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]}}(me)),me}function Ae(){if(Pe)return pe;Pe=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.boolOrEmptySchema=pe.topBoolOrEmptySchema=void 0;const t=Te(),e=ke(),i=Ce(),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 pe.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))},pe.boolOrEmptySchema=function(t,e){const{gen:i,schema:r}=t;!1===r?(i.var(e,!1),n(t)):i.var(e,!0)},pe}var Ne,Me={},Re={};function De(){if(Ne)return Re;Ne=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.getRules=Re.isJSONType=void 0;const t=new Set(["string","number","integer","boolean","null","object","array"]);return Re.isJSONType=function(e){return"string"==typeof e&&t.has(e)},Re.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:{}}},Re}var Le,ze,Ue={};function qe(){if(Le)return Ue;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 Le=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.shouldUseRule=Ue.shouldUseGroup=Ue.schemaHasRulesForType=void 0,Ue.schemaHasRulesForType=function({schema:e,self:i},r){const n=i.RULES.types[r];return n&&!0!==n&&t(e,n)},Ue.shouldUseGroup=t,Ue.shouldUseRule=e,Ue}function Fe(){if(ze)return Me;ze=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;const t=De(),e=qe(),i=Te(),r=ke(),n=xe();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||(Me.DataType=s={})),Me.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},Me.getJSONTypes=o,Me.coerceAndCheckDataType=function(t,i){const{gen:n,data:o,opts:u}=t,c=function(t,e){return e?t.filter((t=>a.has(t)||"array"===e&&"array"===t)):[]}(i,u.coerceTypes),l=i.length>0&&!(0===c.length&&1===i.length&&(0,e.schemaHasRulesForType)(t,i[0]));if(l){const e=h(i,o,u.strictNumbers,s.Wrong);n.if(e,(()=>{c.length?function(t,e,i){const{gen:n,data:s,opts:o}=t,u=n.let("dataType",r._`typeof ${s}`),c=n.let("coerced",r._`undefined`);"array"===o.coerceTypes&&n.if(r._`${u} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,r._`${s}[0]`).assign(u,r._`typeof ${s}`).if(h(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._`${u} == "number" || ${u} == "boolean"`).assign(c,r._`"" + ${s}`).elseIf(r._`${s} === null`).assign(c,r._`""`);case"number":return void n.elseIf(r._`${u} == "boolean" || ${s} === null
|
|
2
2
|
|| (${u} == "string" && ${s} && ${s} == +${s})`).assign(c,r._`+${s}`);case"integer":return void n.elseIf(r._`${u} === "boolean" || ${s} === null
|
|
3
3
|
|| (${u} === "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._`${u} === "string" || ${u} === "number"
|
|
4
|
-
|| ${u} === "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 u(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=u(r._`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=u();break;default:return r._`typeof ${e} ${o} ${t}`}return n===s.Correct?a:(0,r.not)(a);function u(t=r.nil){return(0,r.and)(r._`typeof ${e} == "number"`,t,i?r._`isFinite(${e})`:r.nil)}}function h(t,e,i,s){if(1===t.length)return u(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,u(t,e,i,s));return o}Me.checkDataType=u,Me.checkDataTypes=h;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 Me.reportTypeError=f,Me}var Ve,Be={};function Ge(){if(Ve)return Be;Ve=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.assignDefaults=void 0;const t=ke(),e=xe();function i(i,r,n){const{gen:s,compositeRule:o,data:a,opts:u}=i;if(void 0===n)return;const h=t._`${a}${(0,t.getProperty)(r)}`;if(o)return void(0,e.checkStrictMode)(i,`default is ignored for: ${h}`);let c=t._`${h} === undefined`;"empty"===u.useDefaults&&(c=t._`${c} || ${h} === null || ${h} === ""`),s.if(c,t._`${h} = ${(0,t.stringify)(n)}`)}return Be.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)))},Be}var He,Ke,Je={},We={};function Ze(){if(He)return We;He=1,Object.defineProperty(We,"__esModule",{value:!0}),We.validateUnion=We.validateArray=We.usePattern=We.callValidateCode=We.schemaProperties=We.allSchemaProperties=We.noPropertyInData=We.propertyInData=We.isOwnProperty=We.hasPropFunc=We.reportMissingProp=We.checkMissingProp=We.checkReportMissingProp=void 0;const t=ke(),e=xe(),i=Ce(),r=xe();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)):[]}We.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()}))},We.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}`))))},We.reportMissingProp=function(t,e){t.setParams({missingProperty:e},!0),t.error()},We.hasPropFunc=n,We.isOwnProperty=s,We.propertyInData=function(e,i,r,n){const o=t._`${i}${(0,t.getProperty)(r)} !== undefined`;return n?t._`${o} && ${s(e,i,r)}`:o},We.noPropertyInData=o,We.allSchemaProperties=a,We.schemaProperties=function(t,i){return a(i).filter((r=>!(0,e.alwaysValidSchema)(t,i[r])))},We.callValidateCode=function({schemaCode:e,data:r,it:{gen:n,topSchemaRef:s,schemaPath:o,errorPath:a},it:u},h,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,u.parentData],[i.default.parentDataProperty,u.parentDataProperty],[i.default.rootData,i.default.rootData]];u.opts.dynamicRef&&d.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const p=t._`${l}, ${n.object(...d)}`;return c!==t.nil?t._`${h}.call(${c}, ${p})`:t._`${h}(${p})`};const u=t._`new RegExp`;return We.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?u:(0,r.useFunc)(e,o)}(${n}, ${s})`})},We.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 u((()=>r.assign(t,!1))),t}return r.var(a,!0),u((()=>r.break())),a;function u(o){const u=r.const("len",t._`${n}.length`);r.forRange("i",0,u,(n=>{i.subschema({keyword:s,dataProp:n,dataPropType:e.Type.Num},a),r.if((0,t.not)(a),o)}))}},We.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),u=r.name("_valid");r.block((()=>n.forEach(((e,n)=>{const o=i.subschema({keyword:s,schemaProp:n,compositeRule:!0},u);r.assign(a,t._`${a} || ${u}`),i.mergeValidEvaluated(o,u)||r.if((0,t.not)(a))})))),i.result(a,(()=>i.reset()),(()=>i.error(!0)))},We}function Qe(){if(Ke)return Je;Ke=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.validateKeywordUsage=Je.validSchemaType=Je.funcKeywordCode=Je.macroKeywordCode=void 0;const t=ke(),e=Ce(),i=Ze(),r=Te();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 Je.macroKeywordCode=function(e,i){const{gen:r,keyword:n,schema:o,parentSchema:a,it:u}=e,h=i.macro.call(u.self,o,a,u),c=s(r,n,h);!1!==u.opts.validateSchema&&u.self.validateSchema(h,!0);const f=r.name("valid");e.subschema({schema:h,schemaPath:t.nil,errSchemaPath:`${u.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},Je.funcKeywordCode=function(o,a){var u;const{gen:h,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(h,c,m),y=h.let("valid");function g(r=(a.async?t._`await `:t.nil)){h.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 b(e){var i;h.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),b((()=>o.error()));else{const i=a.async?function(){const e=h.let("ruleErrs",null);return h.try((()=>g(t._`await `)),(i=>h.assign(y,!1).if(t._`${i} instanceof ${p.ValidationError}`,(()=>h.assign(e,t._`${i}.errors`)),(()=>h.throw(i))))),e}():function(){const e=t._`${v}.errors`;return h.assign(e,null),g(t.nil),e}();a.modifying&&n(o),b((()=>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!==(u=a.valid)&&void 0!==u?u:y)},Je.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))},Je.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)}},Je}var Xe,Ye={};function ti(){if(Xe)return Ye;Xe=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.extendSubschemaMode=Ye.extendSubschemaData=Ye.getSubschema=void 0;const t=ke(),e=xe();return Ye.getSubschema=function(i,{keyword:r,schemaProp:n,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:u}){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===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:u,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},Ye.extendSubschemaData=function(i,r,{dataProp:n,dataPropType:s,data:o,dataTypes:a,propertyName:u}){if(void 0!==o&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=r;if(void 0!==n){const{errorPath:o,dataPathArr:a,opts:u}=r;c(h.let("data",t._`${r.data}${(0,t.getProperty)(n)}`,!0)),i.errorPath=t.str`${o}${(0,e.getErrorPath)(n,s,u.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:h.let("data",o,!0)),void 0!==u&&(i.propertyName=u)),a&&(i.dataTypes=a)},Ye.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},Ye}var ei,ii,ri={};function ni(){return ii||(ii=1,ei=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}),ei}var si,oi,ai,ui={exports:{}};function hi(){if(si)return ui.exports;si=1;var t=ui.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,u,h,c,f){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var l in r(s,o,a,u,h,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,u,h,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},ui.exports}function ci(){if(oi)return ri;oi=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.getSchemaRefs=ri.resolveUrl=ri.normalizeId=ri._getFullPath=ri.getFullPath=ri.inlineRef=void 0;const t=xe(),e=ni(),i=hi(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);ri.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 u(t,r)}function u(t,e){return t.serialize(e).split("#")[0]+"#"}ri.getFullPath=a,ri._getFullPath=u;const h=/#\/?$/;function c(t){return t?t.replace(h,""):""}ri.normalizeId=c,ri.resolveUrl=function(t,e,i){return i=c(i),t.resolve(e,i)};const f=/^[a-z_][-a-z0-9._]*$/i;return ri.getSchemaRefs=function(t,r){if("boolean"==typeof t)return{};const{schemaId:n,uriResolver:s}=this.opts,o=c(t[n]||r),u={"":o},h=a(s,o,!1),l={},d=new Set;return i(t,{allKeys:!0},((t,e,i,r)=>{if(void 0===r)return;const s=h+e;let o=u[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),u[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`)}},ri}function fi(){if(ai)return de;ai=1,Object.defineProperty(de,"__esModule",{value:!0}),de.getData=de.KeywordCxt=de.validateFunctionCode=void 0;const t=Ae(),e=Fe(),i=qe(),r=Fe(),n=Ge(),s=Qe(),o=ti(),a=ke(),u=Ce(),h=ci(),c=xe(),f=Te();function l({gen:t,validateName:e,schema:i,schemaEnv:r,opts:n},s){n.code.es5?t.func(e,a._`${u.default.data}, ${u.default.valCxt}`,r.$async,(()=>{t.code(a._`"use strict"; ${d(i,n)}`),function(t,e){t.if(u.default.valCxt,(()=>{t.var(u.default.instancePath,a._`${u.default.valCxt}.${u.default.instancePath}`),t.var(u.default.parentData,a._`${u.default.valCxt}.${u.default.parentData}`),t.var(u.default.parentDataProperty,a._`${u.default.valCxt}.${u.default.parentDataProperty}`),t.var(u.default.rootData,a._`${u.default.valCxt}.${u.default.rootData}`),e.dynamicRef&&t.var(u.default.dynamicAnchors,a._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{t.var(u.default.instancePath,a._`""`),t.var(u.default.parentData,a._`undefined`),t.var(u.default.parentDataProperty,a._`undefined`),t.var(u.default.rootData,u.default.data),e.dynamicRef&&t.var(u.default.dynamicAnchors,a._`{}`)}))}(t,n),t.code(s)})):t.func(e,a._`${u.default.data}, ${function(t){return a._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${t.dynamicRef?a._`, ${u.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 b(t,[],!1,i);const r=(0,e.getSchemaTypes)(t.schema);b(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._`${u.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._`${u.default.self}.opts.$comment(${s}, ${i}, ${n}.schema)`)}}function b(t,e,n,s){const{gen:o,schema:h,data:f,allErrors:l,opts:d,self:p}=t,{RULES:m}=p;function v(c){(0,i.shouldUseGroup)(h,c)&&(c.type?(o.if((0,r.checkDataType)(c.type,f,d.strictNumbers)),$(t,c),1===e.length&&e[0]===c.type&&n&&(o.else(),(0,r.reportTypeError)(t)),o.endIf()):$(t,c),l||o.if(a._`${u.default.errors} === ${s||0}`))}!h.$ref||!d.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(h,m)?(d.jtd||function(t,e){!t.schemaEnv.meta&&t.opts.strictTypes&&(function(t,e){e.length&&(t.dataTypes.length?(e.forEach((e=>{w(t.dataTypes,e)||_(t,`type "${e}" not allowed by context "${t.dataTypes.join(",")}"`)})),function(t,e){const i=[];for(const r of t.dataTypes)w(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((()=>E(t,"$ref",m.all.$ref.definition)))}function $(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)&&E(t,r.keyword,r.definition,e.type)}))}function w(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)}de.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(u.default.vErrors,null),r.let(u.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._`${u.default.errors} === 0`,(()=>e.return(u.default.data)),(()=>e.throw(a._`new ${n}(${u.default.vErrors})`))):(e.assign(a._`${r}.errors`,u.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._`${u.default.errors} === 0`))}(t)}))}(e):l(e,(()=>(0,t.topBoolOrEmptySchema)(e)))};class k{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",u.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,h.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",u.default.errors);y(t,s),r.var(e,a._`${s} === ${u.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 E(t,e,i,r){const n=new k(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)}de.KeywordCxt=k;const S=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function O(t,{dataLevel:e,dataNames:i,dataPathArr:r}){let n,s;if(""===t)return u.default.rootData;if("/"===t[0]){if(!S.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,s=u.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 h=n.split("/");for(const t of h)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 de.getData=O,de}var li,di={};function pi(){if(li)return di;li=1,Object.defineProperty(di,"__esModule",{value:!0});class t extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}return di.default=t,di}var mi,vi={};function yi(){if(mi)return vi;mi=1,Object.defineProperty(vi,"__esModule",{value:!0});const t=ci();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 vi.default=e,vi}var gi,bi={};function $i(){if(gi)return bi;gi=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.resolveSchema=bi.getCompilingSchema=bi.resolveRef=bi.compileSchema=bi.SchemaEnv=void 0;const t=ke(),e=pi(),i=Ce(),r=ci(),n=xe(),s=fi();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=h.call(this,n);if(o)return o;const a=(0,r.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:u,lines:c}=this.opts.code,{ownProperties:f}=this.opts,l=new t.CodeGen(this.scope,{es5:u,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 u(t){return(0,r.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:a.call(this,t)}function h(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 u=(0,r.normalizeId)(n),h=this.refs[u]||this.schemas[u];if("string"==typeof h){const e=f.call(this,t,h);if("object"!=typeof(null==e?void 0:e.schema))return;return d.call(this,i,e)}if("object"==typeof(null==h?void 0:h.schema)){if(h.validate||a.call(this,h),u===(0,r.normalizeId)(e)){const{schema:e}=h,{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,h)}}bi.SchemaEnv=o,bi.compileSchema=a,bi.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]=u.call(this,a):void 0},bi.getCompilingSchema=h,bi.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 u;if("boolean"!=typeof i&&i.$ref&&!(0,n.schemaHasRulesButRef)(i,this.RULES)){const t=(0,r.resolveUrl)(this.opts.uriResolver,e,i.$ref);u=f.call(this,s,t)}const{schemaId:h}=this.opts;return u=u||new o({schema:i,schemaId:h,root:s,baseId:e}),u.schema!==u.root.schema?u:void 0}return bi}var wi,_i,ki,Ei,Si,xi,Oi,ji={$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},Pi={},Ii={exports:{}};function Ci(){if(_i)return wi;_i=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 u(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 h(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,h=!1,c=u;for(let s=0;s<t.length;s++){const u=t[s];if("["!==u&&"]"!==u)if(":"!==u)if("%"===u){if(!c(n,r,i))break;c=a}else n.push(u);else{if(!0===o&&(h=!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(h?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 wi={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=h(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:h,stringArrayToHexStripped:s},wi}function Ti(){if(xi)return Pi;xi=1,Object.defineProperty(Pi,"__esModule",{value:!0});const t=function(){if(Si)return Ii.exports;Si=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:i,normalizePercentEncoding:r,normalizePathEncoding:n,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:u}=Ci(),{SCHEMES:h,getSchemeHandler:c}=function(){if(Ei)return ki;Ei=1;const{isUUID:t}=Ci(),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}},u={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=h(`${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=h(`${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 h(t){return t&&(u[t]||u[t.toLowerCase()])||void 0}return Object.setPrototypeOf(u,null),ki={wsIsSecure:r,SCHEMES:u,isValidSchemeName:function(t){return-1!==i.indexOf(t)},getSchemeHandler:h}}();function f(t,i,r,n){const s={};return n||(t=v(l(t,r),r),i=v(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),u=[],h=c(a.scheme||o.scheme);h&&h.serialize&&h.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&&u.push(o.scheme,":");const f=i(o);if(void 0!==f&&("suffix"!==a.reference&&u.push("//"),u.push(f),o.path&&"/"!==o.path[0]&&u.push("/")),void 0!==o.path){let t=o.path;a.absolutePath||h&&h.absolutePath||(t=e(t)),void 0===f&&"/"===t[0]&&"/"===t[1]&&(t="/%2F"+t.slice(2)),u.push(t)}return void 0!==o.query&&u.push("?",o.query),void 0!==o.fragment&&u.push("#",o.fragment),u.join("")}const d=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,p=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function m(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 h=!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.",h=!0);const m=e.match(d);if(m){s.scheme=m[1],s.userinfo=m[3],s.host=m[4],s.port=parseInt(m[5],10),s.path=m[6]||"",s.query=m[7],s.fragment=m[8],isNaN(s.port)&&(s.port=m[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,m);if(void 0!==i&&(s.error=s.error||i,h=!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&&u(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:h}}function v(t,e){return m(t,e).parsed}function y(t,e){const{parsed:i,malformedAuthorityOrPort:r}=m(t,e);return{normalized:r?t:l(i,e),malformedAuthorityOrPort:r}}function g(t,e){if("string"==typeof t){const{normalized:i,malformedAuthorityOrPort:r}=y(t,e);return r?void 0:i}if("object"==typeof t)return l(t,e)}const b={SCHEMES:h,normalize:function(t,e){return"string"==typeof t?t=function(t,e){return y(t,e).normalized}(t,e):"object"==typeof t&&(t=v(l(t,e),e)),t},resolve:function(t,e,i){const r=i?Object.assign({scheme:"null"},i):{scheme:"null"},n=f(v(t,r),v(e,r),r,!0);return r.skipEscape=!0,l(n,r)},resolveComponent:f,equal:function(t,e,i){const r=g(t,i),n=g(e,i);return void 0!==r&&void 0!==n&&r.toLowerCase()===n.toLowerCase()},serialize:l,parse:v};return Ii.exports=b,Ii.exports.default=b,Ii.exports.fastUri=b,Ii.exports}();return t.code='require("ajv/dist/runtime/uri").default',Pi.default=t,Pi}function Ai(){return Oi||(Oi=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=fi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var i=ke();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=pi(),n=yi(),s=De(),o=$i(),a=ke(),u=ci(),h=Fe(),c=xe(),f=ji,l=Ti(),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,u,h,c,f,p,m,v,y,g,b,$,w,_,k,E,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,T=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===(u=null!==(a=t.strictNumbers)&&void 0!==a?a:j)||void 0===u||u,strictTypes:null!==(c=null!==(h=t.strictTypes)&&void 0!==h?h: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===(b=t.meta)||void 0===b||b,messages:null===($=t.messages)||void 0===$||$,inlineRefs:null===(w=t.inlineRefs)||void 0===w||w,schemaId:null!==(_=t.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(k=t.addUsedSchema)||void 0===k||k,validateSchema:null===(E=t.validateSchema)||void 0===E||E,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:T}}class b{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)(),$.call(this,v,t,"NOT SUPPORTED"),$.call(this,y,t,"DEPRECATED","warn"),this._metaOpts=S.call(this),t.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&E.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 u.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 u(t){const i=await h.call(this,t);this.refs[t]||await s.call(this,i.$schema),this.refs[t]||this.addSchema(i,t,e)}async function h(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,u.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=w.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=w.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,u.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,h.getJSONTypes)(e.type),schemaType:(0,h.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]=A(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 h=this._cache.get(t);if(void 0!==h)return h;i=(0,u.normalizeId)(s||i);const c=u.getSchemaRefs.call(this,t,i);return h=new o.SchemaEnv({schema:t,schemaId:a,meta:e,baseId:i,localRefs:c}),this._cache.set(h.schema,h),n&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=h),r&&this.validateSchema(t,!0),h}_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 $(t,e,i,r="error"){for(const n in t)n in e&&this.logger[r](`${i}: option ${n}. ${t[n]}`)}function w(t){return t=(0,u.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 k(){for(const t in this.opts.formats){const e=this.opts.formats[t];e&&this.addFormat(t,e)}}function E(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}b.ValidationError=r.default,b.MissingRefError=n.default,t.default=b;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,h.getJSONTypes)(e.type),schemaType:(0,h.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=A(e)),t.validateSchema=this.compile(e,!0))}const T={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function A(t){return{anyOf:[t,T]}}}(le)),le}var Ni,Mi={},Ri={},Di={};function Li(){return Ni||(Ni=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.default={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}),Di}var zi,Ui,qi={};function Fi(){if(zi)return qi;zi=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.callRef=qi.getValidate=void 0;const t=yi(),e=Ze(),i=ke(),r=Ce(),n=$i(),s=xe(),o={keyword:"$ref",schemaType:"string",code(e){const{gen:r,schema:s,it:o}=e,{baseId:h,schemaEnv:c,validateName:f,opts:l,self:d}=o,{root:p}=c;if(("#"===s||"#/"===s)&&h===p.baseId)return function(){if(c===p)return u(e,f,c,c.$async);const t=r.scopeValue("root",{ref:p});return u(e,i._`${t}.validate`,p,p.$async)}();const m=n.resolveRef.call(d,p,h,s);if(void 0===m)throw new t.default(o.opts.uriResolver,h,s);return m instanceof n.SchemaEnv?function(t){const i=a(e,t);u(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 u(t,n,o,a){const{gen:u,it:h}=t,{allErrors:c,schemaEnv:f,opts:l}=h,d=l.passContext?r.default.this:i.nil;function p(t){const e=i._`${t}.errors`;u.assign(r.default.vErrors,i._`${r.default.vErrors} === null ? ${e} : ${r.default.vErrors}.concat(${e})`),u.assign(r.default.errors,i._`${r.default.vErrors}.length`)}function m(t){var e;if(!h.opts.unevaluated)return;const r=null===(e=null==o?void 0:o.validate)||void 0===e?void 0:e.evaluated;if(!0!==h.props)if(r&&!r.dynamicProps)void 0!==r.props&&(h.props=s.mergeEvaluated.props(u,r.props,h.props));else{const e=u.var("props",i._`${t}.evaluated.props`);h.props=s.mergeEvaluated.props(u,e,h.props,i.Name)}if(!0!==h.items)if(r&&!r.dynamicItems)void 0!==r.items&&(h.items=s.mergeEvaluated.items(u,r.items,h.items));else{const e=u.var("items",i._`${t}.evaluated.items`);h.items=s.mergeEvaluated.items(u,e,h.items,i.Name)}}a?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=u.let("valid");u.try((()=>{u.code(i._`await ${(0,e.callValidateCode)(t,n,d)}`),m(n),c||u.assign(r,!0)}),(t=>{u.if(i._`!(${t} instanceof ${h.ValidationError})`,(()=>u.throw(t))),p(t),c||u.assign(r,!1)})),t.ok(r)}():t.result((0,e.callValidateCode)(t,n,d),(()=>m(n)),(()=>p(n)))}return qi.getValidate=a,qi.callRef=u,qi.default=o,qi}function Vi(){return Ui||(Ui=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Li().default,Fi().default]),Ri}var Bi,Gi={},Hi={};function Ki(){if(Bi)return Hi;Bi=1,Object.defineProperty(Hi,"__esModule",{value:!0});const t=ke(),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 Hi.default=n,Hi}var Ji,Wi={};function Zi(){if(Ji)return Wi;Ji=1,Object.defineProperty(Wi,"__esModule",{value:!0});const t=ke(),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"),u=o?t._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:t._`${a} !== parseInt(${a})`;e.fail$data(t._`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};return Wi.default=e,Wi}var Qi,Xi,Yi={},tr={};function er(){if(Qi)return tr;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 Qi=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',tr}function ir(){if(Xi)return Yi;Xi=1,Object.defineProperty(Yi,"__esModule",{value:!0});const t=ke(),e=xe(),i=er(),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,u="maxLength"===n?t.operators.GT:t.operators.LT,h=!1===a.opts.unicode?t._`${s}.length`:t._`${(0,e.useFunc)(r.gen,i.default)}(${s})`;r.fail$data(t._`${h} ${u} ${o}`)}};return Yi.default=n,Yi}var rr,nr={};function sr(){if(rr)return nr;rr=1,Object.defineProperty(nr,"__esModule",{value:!0});const t=Ze(),e=xe(),i=ke(),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:u,it:h}=r,c=h.opts.unicodeRegExp?"u":"";if(o){const{regExp:t}=h.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}(${u}, ${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 nr.default=r,nr}var or,ar={};function ur(){if(or)return ar;or=1,Object.defineProperty(ar,"__esModule",{value:!0});const t=ke(),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 ar.default=i,ar}var hr,cr={};function fr(){if(hr)return cr;hr=1,Object.defineProperty(cr,"__esModule",{value:!0});const t=Ze(),e=ke(),i=xe(),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:u,it:h}=r,{opts:c}=h;if(!u&&0===s.length)return;const f=s.length>=c.loopRequired;if(h.allErrors?function(){if(f||u)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||u){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)(h,`required property "${r}" is not defined at "${h.schemaEnv.baseId+h.errSchemaPath}" (strictRequired)`,h.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 cr.default=r,cr}var lr,dr={};function pr(){if(lr)return dr;lr=1,Object.defineProperty(dr,"__esModule",{value:!0});const t=ke(),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 dr.default=i,dr}var mr,vr,yr={},gr={};function br(){if(mr)return gr;mr=1,Object.defineProperty(gr,"__esModule",{value:!0});const t=ni();return t.code='require("ajv/dist/runtime/equal").default',gr.default=t,gr}function $r(){if(vr)return yr;vr=1,Object.defineProperty(yr,"__esModule",{value:!0});const t=Fe(),e=ke(),i=xe(),r=br(),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:u,parentSchema:h,schemaCode:c,it:f}=n;if(!a&&!u)return;const l=s.let("valid"),d=h.items?(0,t.getSchemaTypes)(h.items):[];function p(i,r){const a=s.name("item"),u=(0,t.checkDataTypes)(d,a,f.opts.strictNumbers,t.DataType.Wrong),h=s.const("indices",e._`{}`);s.for(e._`;${i}--;`,(()=>{s.let(a,e._`${o}[${i}]`),s.if(u,e._`continue`),d.length>1&&s.if(e._`typeof ${a} == "string"`,e._`${a} += "_"`),s.if(e._`typeof ${h}[${a}] == "number"`,(()=>{s.assign(r,e._`${h}[${a}]`),n.error(),s.assign(l,!1).break()})).code(e._`${h}[${a}] = ${i}`)}))}function m(t,a){const u=(0,i.useFunc)(s,r.default),h=s.name("outer");s.label(h).for(e._`;${t}--;`,(()=>s.for(e._`${a} = ${t}; ${a}--;`,(()=>s.if(e._`${u}(${o}[${t}], ${o}[${a}])`,(()=>{n.error(),s.assign(l,!1).break(h)}))))))}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 yr.default=s,yr}var wr,_r={};function kr(){if(wr)return _r;wr=1,Object.defineProperty(_r,"__esModule",{value:!0});const t=ke(),e=xe(),i=br(),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:u}=r;o||u&&"object"==typeof u?r.fail$data(t._`!${(0,e.useFunc)(n,i.default)}(${s}, ${a})`):r.fail(t._`${u} !== ${s}`)}};return _r.default=r,_r}var Er,Sr,xr={};function Or(){if(Er)return xr;Er=1,Object.defineProperty(xr,"__esModule",{value:!0});const t=ke(),e=xe(),i=br(),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:u,it:h}=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>=h.opts.loopEnum||o)l=n.let("valid"),r.block$data(l,(function(){n.assign(l,!1),n.forOf("v",u,(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",u);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 xr.default=r,xr}function jr(){return Sr||(Sr=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.default=[Ki().default,Zi().default,ir().default,sr().default,ur().default,fr().default,pr().default,$r().default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},kr().default,Or().default]),Gi}var Pr,Ir={},Cr={};function Tr(){if(Pr)return Cr;Pr=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.validateAdditionalItems=void 0;const t=ke(),e=xe(),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:u}=i;u.items=!0;const h=n.const("len",t._`${o}.length`);if(!1===s)i.setParams({len:r.length}),i.pass(t._`${h} <= ${r.length}`);else if("object"==typeof s&&!(0,e.alwaysValidSchema)(u,s)){const s=n.var("valid",t._`${h} <= ${r.length}`);n.if((0,t.not)(s),(()=>function(s){n.forRange("i",r.length,h,(r=>{i.subschema({keyword:a,dataProp:r,dataPropType:e.Type.Num},s),u.allErrors||n.if((0,t.not)(s),(()=>n.break()))}))}(s))),i.ok(s)}}return Cr.validateAdditionalItems=r,Cr.default=i,Cr}var Ar,Nr,Mr={},Rr={};function Dr(){if(Ar)return Rr;Ar=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.validateTuple=void 0;const t=ke(),e=xe(),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:u,it:h}=i;!function(t){const{opts:i,errSchemaPath:s}=h,o=n.length;i.strictTuples&&!(o===t.minItems&&(o===t.maxItems||!1===t[r]))&&(0,e.checkStrictMode)(h,`"${u}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${s}"`,i.strictTuples)}(o),h.opts.unevaluated&&n.length&&!0!==h.items&&(h.items=e.mergeEvaluated.items(s,n.length,h.items));const c=s.name("valid"),f=s.const("len",t._`${a}.length`);n.forEach(((r,n)=>{(0,e.alwaysValidSchema)(h,r)||(s.if(t._`${f} > ${n}`,(()=>i.subschema({keyword:u,schemaProp:n,dataProp:n},c))),i.ok(c))}))}return Rr.validateTuple=n,Rr.default=r,Rr}function Lr(){if(Nr)return Mr;Nr=1,Object.defineProperty(Mr,"__esModule",{value:!0});const t=Dr();return Mr.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")},Mr}var zr,Ur={};function qr(){if(zr)return Ur;zr=1,Object.defineProperty(Ur,"__esModule",{value:!0});const t=ke(),e=xe(),i=Ze(),r=Tr(),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 Ur.default=n,Ur}var Fr,Vr={};function Br(){if(Fr)return Vr;Fr=1,Object.defineProperty(Vr,"__esModule",{value:!0});const t=ke(),e=xe(),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 u,h;const{minContains:c,maxContains:f}=s;a.opts.next?(u=void 0===c?1:c,h=f):u=1;const l=r.const("len",t._`${o}.length`);if(i.setParams({min:u,max:h}),void 0===h&&0===u)return void(0,e.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==h&&u>h)return(0,e.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void i.fail();if((0,e.alwaysValidSchema)(a,n)){let e=t._`${l} >= ${u}`;return void 0!==h&&(e=t._`${e} && ${l} <= ${h}`),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===h?r.if(t._`${e} >= ${u}`,(()=>r.assign(d,!0).break())):(r.if(t._`${e} > ${h}`,(()=>r.assign(d,!1).break())),1===u?r.assign(d,!0):r.if(t._`${e} >= ${u}`,(()=>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===h&&1===u?m(d,(()=>r.if(d,(()=>r.break())))):0===u?(r.let(d,!0),void 0!==h&&r.if(t._`${o}.length > 0`,p)):(r.let(d,!1),p()),i.result(d,(()=>i.reset()))}};return Vr.default=i,Vr}var Gr,Hr={};function Kr(){return Gr||(Gr=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=ke(),i=xe(),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
|
+
|| ${u} === "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 u(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=u(r._`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=u();break;default:return r._`typeof ${e} ${o} ${t}`}return n===s.Correct?a:(0,r.not)(a);function u(t=r.nil){return(0,r.and)(r._`typeof ${e} == "number"`,t,i?r._`isFinite(${e})`:r.nil)}}function h(t,e,i,s){if(1===t.length)return u(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,u(t,e,i,s));return o}Me.checkDataType=u,Me.checkDataTypes=h;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 Me.reportTypeError=f,Me}var Ve,Be={};function Ge(){if(Ve)return Be;Ve=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.assignDefaults=void 0;const t=ke(),e=xe();function i(i,r,n){const{gen:s,compositeRule:o,data:a,opts:u}=i;if(void 0===n)return;const h=t._`${a}${(0,t.getProperty)(r)}`;if(o)return void(0,e.checkStrictMode)(i,`default is ignored for: ${h}`);let c=t._`${h} === undefined`;"empty"===u.useDefaults&&(c=t._`${c} || ${h} === null || ${h} === ""`),s.if(c,t._`${h} = ${(0,t.stringify)(n)}`)}return Be.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)))},Be}var He,Ke,Je={},We={};function Ze(){if(He)return We;He=1,Object.defineProperty(We,"__esModule",{value:!0}),We.validateUnion=We.validateArray=We.usePattern=We.callValidateCode=We.schemaProperties=We.allSchemaProperties=We.noPropertyInData=We.propertyInData=We.isOwnProperty=We.hasPropFunc=We.reportMissingProp=We.checkMissingProp=We.checkReportMissingProp=void 0;const t=ke(),e=xe(),i=Ce(),r=xe();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)):[]}We.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()}))},We.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}`))))},We.reportMissingProp=function(t,e){t.setParams({missingProperty:e},!0),t.error()},We.hasPropFunc=n,We.isOwnProperty=s,We.propertyInData=function(e,i,r,n){const o=t._`${i}${(0,t.getProperty)(r)} !== undefined`;return n?t._`${o} && ${s(e,i,r)}`:o},We.noPropertyInData=o,We.allSchemaProperties=a,We.schemaProperties=function(t,i){return a(i).filter((r=>!(0,e.alwaysValidSchema)(t,i[r])))},We.callValidateCode=function({schemaCode:e,data:r,it:{gen:n,topSchemaRef:s,schemaPath:o,errorPath:a},it:u},h,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,u.parentData],[i.default.parentDataProperty,u.parentDataProperty],[i.default.rootData,i.default.rootData]];u.opts.dynamicRef&&d.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const p=t._`${l}, ${n.object(...d)}`;return c!==t.nil?t._`${h}.call(${c}, ${p})`:t._`${h}(${p})`};const u=t._`new RegExp`;return We.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?u:(0,r.useFunc)(e,o)}(${n}, ${s})`})},We.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 u((()=>r.assign(t,!1))),t}return r.var(a,!0),u((()=>r.break())),a;function u(o){const u=r.const("len",t._`${n}.length`);r.forRange("i",0,u,(n=>{i.subschema({keyword:s,dataProp:n,dataPropType:e.Type.Num},a),r.if((0,t.not)(a),o)}))}},We.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),u=r.name("_valid");r.block((()=>n.forEach(((e,n)=>{const o=i.subschema({keyword:s,schemaProp:n,compositeRule:!0},u);r.assign(a,t._`${a} || ${u}`),i.mergeValidEvaluated(o,u)||r.if((0,t.not)(a))})))),i.result(a,(()=>i.reset()),(()=>i.error(!0)))},We}function Ye(){if(Ke)return Je;Ke=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.validateKeywordUsage=Je.validSchemaType=Je.funcKeywordCode=Je.macroKeywordCode=void 0;const t=ke(),e=Ce(),i=Ze(),r=Te();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 Je.macroKeywordCode=function(e,i){const{gen:r,keyword:n,schema:o,parentSchema:a,it:u}=e,h=i.macro.call(u.self,o,a,u),c=s(r,n,h);!1!==u.opts.validateSchema&&u.self.validateSchema(h,!0);const f=r.name("valid");e.subschema({schema:h,schemaPath:t.nil,errSchemaPath:`${u.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},Je.funcKeywordCode=function(o,a){var u;const{gen:h,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(h,c,m),y=h.let("valid");function g(r=(a.async?t._`await `:t.nil)){h.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 b(e){var i;h.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),b((()=>o.error()));else{const i=a.async?function(){const e=h.let("ruleErrs",null);return h.try((()=>g(t._`await `)),(i=>h.assign(y,!1).if(t._`${i} instanceof ${p.ValidationError}`,(()=>h.assign(e,t._`${i}.errors`)),(()=>h.throw(i))))),e}():function(){const e=t._`${v}.errors`;return h.assign(e,null),g(t.nil),e}();a.modifying&&n(o),b((()=>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!==(u=a.valid)&&void 0!==u?u:y)},Je.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))},Je.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)}},Je}var Qe,Xe={};function ti(){if(Qe)return Xe;Qe=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.extendSubschemaMode=Xe.extendSubschemaData=Xe.getSubschema=void 0;const t=ke(),e=xe();return Xe.getSubschema=function(i,{keyword:r,schemaProp:n,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:u}){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===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:u,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},Xe.extendSubschemaData=function(i,r,{dataProp:n,dataPropType:s,data:o,dataTypes:a,propertyName:u}){if(void 0!==o&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=r;if(void 0!==n){const{errorPath:o,dataPathArr:a,opts:u}=r;c(h.let("data",t._`${r.data}${(0,t.getProperty)(n)}`,!0)),i.errorPath=t.str`${o}${(0,e.getErrorPath)(n,s,u.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:h.let("data",o,!0)),void 0!==u&&(i.propertyName=u)),a&&(i.dataTypes=a)},Xe.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},Xe}var ei,ii,ri={};function ni(){return ii||(ii=1,ei=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}),ei}var si,oi,ai,ui={exports:{}};function hi(){if(si)return ui.exports;si=1;var t=ui.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,u,h,c,f){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var l in r(s,o,a,u,h,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,u,h,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},ui.exports}function ci(){if(oi)return ri;oi=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.getSchemaRefs=ri.resolveUrl=ri.normalizeId=ri._getFullPath=ri.getFullPath=ri.inlineRef=void 0;const t=xe(),e=ni(),i=hi(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);ri.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 u(t,r)}function u(t,e){return t.serialize(e).split("#")[0]+"#"}ri.getFullPath=a,ri._getFullPath=u;const h=/#\/?$/;function c(t){return t?t.replace(h,""):""}ri.normalizeId=c,ri.resolveUrl=function(t,e,i){return i=c(i),t.resolve(e,i)};const f=/^[a-z_][-a-z0-9._]*$/i;return ri.getSchemaRefs=function(t,r){if("boolean"==typeof t)return{};const{schemaId:n,uriResolver:s}=this.opts,o=c(t[n]||r),u={"":o},h=a(s,o,!1),l={},d=new Set;return i(t,{allKeys:!0},((t,e,i,r)=>{if(void 0===r)return;const s=h+e;let o=u[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),u[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`)}},ri}function fi(){if(ai)return de;ai=1,Object.defineProperty(de,"__esModule",{value:!0}),de.getData=de.KeywordCxt=de.validateFunctionCode=void 0;const t=Ae(),e=Fe(),i=qe(),r=Fe(),n=Ge(),s=Ye(),o=ti(),a=ke(),u=Ce(),h=ci(),c=xe(),f=Te();function l({gen:t,validateName:e,schema:i,schemaEnv:r,opts:n},s){n.code.es5?t.func(e,a._`${u.default.data}, ${u.default.valCxt}`,r.$async,(()=>{t.code(a._`"use strict"; ${d(i,n)}`),function(t,e){t.if(u.default.valCxt,(()=>{t.var(u.default.instancePath,a._`${u.default.valCxt}.${u.default.instancePath}`),t.var(u.default.parentData,a._`${u.default.valCxt}.${u.default.parentData}`),t.var(u.default.parentDataProperty,a._`${u.default.valCxt}.${u.default.parentDataProperty}`),t.var(u.default.rootData,a._`${u.default.valCxt}.${u.default.rootData}`),e.dynamicRef&&t.var(u.default.dynamicAnchors,a._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{t.var(u.default.instancePath,a._`""`),t.var(u.default.parentData,a._`undefined`),t.var(u.default.parentDataProperty,a._`undefined`),t.var(u.default.rootData,u.default.data),e.dynamicRef&&t.var(u.default.dynamicAnchors,a._`{}`)}))}(t,n),t.code(s)})):t.func(e,a._`${u.default.data}, ${function(t){return a._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${t.dynamicRef?a._`, ${u.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 b(t,[],!1,i);const r=(0,e.getSchemaTypes)(t.schema);b(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._`${u.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._`${u.default.self}.opts.$comment(${s}, ${i}, ${n}.schema)`)}}function b(t,e,n,s){const{gen:o,schema:h,data:f,allErrors:l,opts:d,self:p}=t,{RULES:m}=p;function v(c){(0,i.shouldUseGroup)(h,c)&&(c.type?(o.if((0,r.checkDataType)(c.type,f,d.strictNumbers)),$(t,c),1===e.length&&e[0]===c.type&&n&&(o.else(),(0,r.reportTypeError)(t)),o.endIf()):$(t,c),l||o.if(a._`${u.default.errors} === ${s||0}`))}!h.$ref||!d.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(h,m)?(d.jtd||function(t,e){!t.schemaEnv.meta&&t.opts.strictTypes&&(function(t,e){e.length&&(t.dataTypes.length?(e.forEach((e=>{w(t.dataTypes,e)||_(t,`type "${e}" not allowed by context "${t.dataTypes.join(",")}"`)})),function(t,e){const i=[];for(const r of t.dataTypes)w(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((()=>E(t,"$ref",m.all.$ref.definition)))}function $(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)&&E(t,r.keyword,r.definition,e.type)}))}function w(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)}de.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(u.default.vErrors,null),r.let(u.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._`${u.default.errors} === 0`,(()=>e.return(u.default.data)),(()=>e.throw(a._`new ${n}(${u.default.vErrors})`))):(e.assign(a._`${r}.errors`,u.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._`${u.default.errors} === 0`))}(t)}))}(e):l(e,(()=>(0,t.topBoolOrEmptySchema)(e)))};class k{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",u.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,h.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",u.default.errors);y(t,s),r.var(e,a._`${s} === ${u.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 E(t,e,i,r){const n=new k(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)}de.KeywordCxt=k;const S=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function O(t,{dataLevel:e,dataNames:i,dataPathArr:r}){let n,s;if(""===t)return u.default.rootData;if("/"===t[0]){if(!S.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,s=u.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 h=n.split("/");for(const t of h)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 de.getData=O,de}var li,di={};function pi(){if(li)return di;li=1,Object.defineProperty(di,"__esModule",{value:!0});class t extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}return di.default=t,di}var mi,vi={};function yi(){if(mi)return vi;mi=1,Object.defineProperty(vi,"__esModule",{value:!0});const t=ci();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 vi.default=e,vi}var gi,bi={};function $i(){if(gi)return bi;gi=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.resolveSchema=bi.getCompilingSchema=bi.resolveRef=bi.compileSchema=bi.SchemaEnv=void 0;const t=ke(),e=pi(),i=Ce(),r=ci(),n=xe(),s=fi();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=h.call(this,n);if(o)return o;const a=(0,r.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:u,lines:c}=this.opts.code,{ownProperties:f}=this.opts,l=new t.CodeGen(this.scope,{es5:u,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 u(t){return(0,r.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:a.call(this,t)}function h(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 u=(0,r.normalizeId)(n),h=this.refs[u]||this.schemas[u];if("string"==typeof h){const e=f.call(this,t,h);if("object"!=typeof(null==e?void 0:e.schema))return;return d.call(this,i,e)}if("object"==typeof(null==h?void 0:h.schema)){if(h.validate||a.call(this,h),u===(0,r.normalizeId)(e)){const{schema:e}=h,{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,h)}}bi.SchemaEnv=o,bi.compileSchema=a,bi.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]=u.call(this,a):void 0},bi.getCompilingSchema=h,bi.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 u;if("boolean"!=typeof i&&i.$ref&&!(0,n.schemaHasRulesButRef)(i,this.RULES)){const t=(0,r.resolveUrl)(this.opts.uriResolver,e,i.$ref);u=f.call(this,s,t)}const{schemaId:h}=this.opts;return u=u||new o({schema:i,schemaId:h,root:s,baseId:e}),u.schema!==u.root.schema?u:void 0}return bi}var wi,_i,ki,Ei,Si,xi,Oi,ji={$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},Pi={},Ii={exports:{}};function Ci(){if(_i)return wi;_i=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 u(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 h(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,h=!1,c=u;for(let s=0;s<t.length;s++){const u=t[s];if("["!==u&&"]"!==u)if(":"!==u)if("%"===u){if(!c(n,r,i))break;c=a}else n.push(u);else{if(!0===o&&(h=!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(h?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 wi={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=h(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:h,stringArrayToHexStripped:s},wi}function Ti(){if(xi)return Pi;xi=1,Object.defineProperty(Pi,"__esModule",{value:!0});const t=function(){if(Si)return Ii.exports;Si=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:i,normalizePercentEncoding:r,normalizePathEncoding:n,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:u}=Ci(),{SCHEMES:h,getSchemeHandler:c}=function(){if(Ei)return ki;Ei=1;const{isUUID:t}=Ci(),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}},u={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=h(`${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=h(`${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 h(t){return t&&(u[t]||u[t.toLowerCase()])||void 0}return Object.setPrototypeOf(u,null),ki={wsIsSecure:r,SCHEMES:u,isValidSchemeName:function(t){return-1!==i.indexOf(t)},getSchemeHandler:h}}();function f(t,i,r,n){const s={};return n||(t=v(l(t,r),r),i=v(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),u=[],h=c(a.scheme||o.scheme);h&&h.serialize&&h.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&&u.push(o.scheme,":");const f=i(o);if(void 0!==f&&("suffix"!==a.reference&&u.push("//"),u.push(f),o.path&&"/"!==o.path[0]&&u.push("/")),void 0!==o.path){let t=o.path;a.absolutePath||h&&h.absolutePath||(t=e(t)),void 0===f&&"/"===t[0]&&"/"===t[1]&&(t="/%2F"+t.slice(2)),u.push(t)}return void 0!==o.query&&u.push("?",o.query),void 0!==o.fragment&&u.push("#",o.fragment),u.join("")}const d=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,p=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function m(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 h=!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.",h=!0);const m=e.match(d);if(m){s.scheme=m[1],s.userinfo=m[3],s.host=m[4],s.port=parseInt(m[5],10),s.path=m[6]||"",s.query=m[7],s.fragment=m[8],isNaN(s.port)&&(s.port=m[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,m);if(void 0!==i&&(s.error=s.error||i,h=!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&&u(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:h}}function v(t,e){return m(t,e).parsed}function y(t,e){const{parsed:i,malformedAuthorityOrPort:r}=m(t,e);return{normalized:r?t:l(i,e),malformedAuthorityOrPort:r}}function g(t,e){if("string"==typeof t){const{normalized:i,malformedAuthorityOrPort:r}=y(t,e);return r?void 0:i}if("object"==typeof t)return l(t,e)}const b={SCHEMES:h,normalize:function(t,e){return"string"==typeof t?t=function(t,e){return y(t,e).normalized}(t,e):"object"==typeof t&&(t=v(l(t,e),e)),t},resolve:function(t,e,i){const r=i?Object.assign({scheme:"null"},i):{scheme:"null"},n=f(v(t,r),v(e,r),r,!0);return r.skipEscape=!0,l(n,r)},resolveComponent:f,equal:function(t,e,i){const r=g(t,i),n=g(e,i);return void 0!==r&&void 0!==n&&r.toLowerCase()===n.toLowerCase()},serialize:l,parse:v};return Ii.exports=b,Ii.exports.default=b,Ii.exports.fastUri=b,Ii.exports}();return t.code='require("ajv/dist/runtime/uri").default',Pi.default=t,Pi}function Ai(){return Oi||(Oi=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=fi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var i=ke();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=pi(),n=yi(),s=De(),o=$i(),a=ke(),u=ci(),h=Fe(),c=xe(),f=ji,l=Ti(),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,u,h,c,f,p,m,v,y,g,b,$,w,_,k,E,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,T=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===(u=null!==(a=t.strictNumbers)&&void 0!==a?a:j)||void 0===u||u,strictTypes:null!==(c=null!==(h=t.strictTypes)&&void 0!==h?h: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===(b=t.meta)||void 0===b||b,messages:null===($=t.messages)||void 0===$||$,inlineRefs:null===(w=t.inlineRefs)||void 0===w||w,schemaId:null!==(_=t.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(k=t.addUsedSchema)||void 0===k||k,validateSchema:null===(E=t.validateSchema)||void 0===E||E,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:T}}class b{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)(),$.call(this,v,t,"NOT SUPPORTED"),$.call(this,y,t,"DEPRECATED","warn"),this._metaOpts=S.call(this),t.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&E.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 u.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 u(t){const i=await h.call(this,t);this.refs[t]||await s.call(this,i.$schema),this.refs[t]||this.addSchema(i,t,e)}async function h(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,u.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=w.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=w.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,u.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,h.getJSONTypes)(e.type),schemaType:(0,h.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]=A(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 h=this._cache.get(t);if(void 0!==h)return h;i=(0,u.normalizeId)(s||i);const c=u.getSchemaRefs.call(this,t,i);return h=new o.SchemaEnv({schema:t,schemaId:a,meta:e,baseId:i,localRefs:c}),this._cache.set(h.schema,h),n&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=h),r&&this.validateSchema(t,!0),h}_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 $(t,e,i,r="error"){for(const n in t)n in e&&this.logger[r](`${i}: option ${n}. ${t[n]}`)}function w(t){return t=(0,u.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 k(){for(const t in this.opts.formats){const e=this.opts.formats[t];e&&this.addFormat(t,e)}}function E(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}b.ValidationError=r.default,b.MissingRefError=n.default,t.default=b;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,h.getJSONTypes)(e.type),schemaType:(0,h.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=A(e)),t.validateSchema=this.compile(e,!0))}const T={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function A(t){return{anyOf:[t,T]}}}(le)),le}var Ni,Mi={},Ri={},Di={};function Li(){return Ni||(Ni=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.default={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}),Di}var zi,Ui,qi={};function Fi(){if(zi)return qi;zi=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.callRef=qi.getValidate=void 0;const t=yi(),e=Ze(),i=ke(),r=Ce(),n=$i(),s=xe(),o={keyword:"$ref",schemaType:"string",code(e){const{gen:r,schema:s,it:o}=e,{baseId:h,schemaEnv:c,validateName:f,opts:l,self:d}=o,{root:p}=c;if(("#"===s||"#/"===s)&&h===p.baseId)return function(){if(c===p)return u(e,f,c,c.$async);const t=r.scopeValue("root",{ref:p});return u(e,i._`${t}.validate`,p,p.$async)}();const m=n.resolveRef.call(d,p,h,s);if(void 0===m)throw new t.default(o.opts.uriResolver,h,s);return m instanceof n.SchemaEnv?function(t){const i=a(e,t);u(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 u(t,n,o,a){const{gen:u,it:h}=t,{allErrors:c,schemaEnv:f,opts:l}=h,d=l.passContext?r.default.this:i.nil;function p(t){const e=i._`${t}.errors`;u.assign(r.default.vErrors,i._`${r.default.vErrors} === null ? ${e} : ${r.default.vErrors}.concat(${e})`),u.assign(r.default.errors,i._`${r.default.vErrors}.length`)}function m(t){var e;if(!h.opts.unevaluated)return;const r=null===(e=null==o?void 0:o.validate)||void 0===e?void 0:e.evaluated;if(!0!==h.props)if(r&&!r.dynamicProps)void 0!==r.props&&(h.props=s.mergeEvaluated.props(u,r.props,h.props));else{const e=u.var("props",i._`${t}.evaluated.props`);h.props=s.mergeEvaluated.props(u,e,h.props,i.Name)}if(!0!==h.items)if(r&&!r.dynamicItems)void 0!==r.items&&(h.items=s.mergeEvaluated.items(u,r.items,h.items));else{const e=u.var("items",i._`${t}.evaluated.items`);h.items=s.mergeEvaluated.items(u,e,h.items,i.Name)}}a?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=u.let("valid");u.try((()=>{u.code(i._`await ${(0,e.callValidateCode)(t,n,d)}`),m(n),c||u.assign(r,!0)}),(t=>{u.if(i._`!(${t} instanceof ${h.ValidationError})`,(()=>u.throw(t))),p(t),c||u.assign(r,!1)})),t.ok(r)}():t.result((0,e.callValidateCode)(t,n,d),(()=>m(n)),(()=>p(n)))}return qi.getValidate=a,qi.callRef=u,qi.default=o,qi}function Vi(){return Ui||(Ui=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Li().default,Fi().default]),Ri}var Bi,Gi={},Hi={};function Ki(){if(Bi)return Hi;Bi=1,Object.defineProperty(Hi,"__esModule",{value:!0});const t=ke(),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 Hi.default=n,Hi}var Ji,Wi={};function Zi(){if(Ji)return Wi;Ji=1,Object.defineProperty(Wi,"__esModule",{value:!0});const t=ke(),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"),u=o?t._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:t._`${a} !== parseInt(${a})`;e.fail$data(t._`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};return Wi.default=e,Wi}var Yi,Qi,Xi={},tr={};function er(){if(Yi)return tr;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 Yi=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',tr}function ir(){if(Qi)return Xi;Qi=1,Object.defineProperty(Xi,"__esModule",{value:!0});const t=ke(),e=xe(),i=er(),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,u="maxLength"===n?t.operators.GT:t.operators.LT,h=!1===a.opts.unicode?t._`${s}.length`:t._`${(0,e.useFunc)(r.gen,i.default)}(${s})`;r.fail$data(t._`${h} ${u} ${o}`)}};return Xi.default=n,Xi}var rr,nr={};function sr(){if(rr)return nr;rr=1,Object.defineProperty(nr,"__esModule",{value:!0});const t=Ze(),e=xe(),i=ke(),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:u,it:h}=r,c=h.opts.unicodeRegExp?"u":"";if(o){const{regExp:t}=h.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}(${u}, ${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 nr.default=r,nr}var or,ar={};function ur(){if(or)return ar;or=1,Object.defineProperty(ar,"__esModule",{value:!0});const t=ke(),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 ar.default=i,ar}var hr,cr={};function fr(){if(hr)return cr;hr=1,Object.defineProperty(cr,"__esModule",{value:!0});const t=Ze(),e=ke(),i=xe(),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:u,it:h}=r,{opts:c}=h;if(!u&&0===s.length)return;const f=s.length>=c.loopRequired;if(h.allErrors?function(){if(f||u)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||u){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)(h,`required property "${r}" is not defined at "${h.schemaEnv.baseId+h.errSchemaPath}" (strictRequired)`,h.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 cr.default=r,cr}var lr,dr={};function pr(){if(lr)return dr;lr=1,Object.defineProperty(dr,"__esModule",{value:!0});const t=ke(),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 dr.default=i,dr}var mr,vr,yr={},gr={};function br(){if(mr)return gr;mr=1,Object.defineProperty(gr,"__esModule",{value:!0});const t=ni();return t.code='require("ajv/dist/runtime/equal").default',gr.default=t,gr}function $r(){if(vr)return yr;vr=1,Object.defineProperty(yr,"__esModule",{value:!0});const t=Fe(),e=ke(),i=xe(),r=br(),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:u,parentSchema:h,schemaCode:c,it:f}=n;if(!a&&!u)return;const l=s.let("valid"),d=h.items?(0,t.getSchemaTypes)(h.items):[];function p(i,r){const a=s.name("item"),u=(0,t.checkDataTypes)(d,a,f.opts.strictNumbers,t.DataType.Wrong),h=s.const("indices",e._`{}`);s.for(e._`;${i}--;`,(()=>{s.let(a,e._`${o}[${i}]`),s.if(u,e._`continue`),d.length>1&&s.if(e._`typeof ${a} == "string"`,e._`${a} += "_"`),s.if(e._`typeof ${h}[${a}] == "number"`,(()=>{s.assign(r,e._`${h}[${a}]`),n.error(),s.assign(l,!1).break()})).code(e._`${h}[${a}] = ${i}`)}))}function m(t,a){const u=(0,i.useFunc)(s,r.default),h=s.name("outer");s.label(h).for(e._`;${t}--;`,(()=>s.for(e._`${a} = ${t}; ${a}--;`,(()=>s.if(e._`${u}(${o}[${t}], ${o}[${a}])`,(()=>{n.error(),s.assign(l,!1).break(h)}))))))}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 yr.default=s,yr}var wr,_r={};function kr(){if(wr)return _r;wr=1,Object.defineProperty(_r,"__esModule",{value:!0});const t=ke(),e=xe(),i=br(),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:u}=r;o||u&&"object"==typeof u?r.fail$data(t._`!${(0,e.useFunc)(n,i.default)}(${s}, ${a})`):r.fail(t._`${u} !== ${s}`)}};return _r.default=r,_r}var Er,Sr,xr={};function Or(){if(Er)return xr;Er=1,Object.defineProperty(xr,"__esModule",{value:!0});const t=ke(),e=xe(),i=br(),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:u,it:h}=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>=h.opts.loopEnum||o)l=n.let("valid"),r.block$data(l,(function(){n.assign(l,!1),n.forOf("v",u,(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",u);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 xr.default=r,xr}function jr(){return Sr||(Sr=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.default=[Ki().default,Zi().default,ir().default,sr().default,ur().default,fr().default,pr().default,$r().default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},kr().default,Or().default]),Gi}var Pr,Ir={},Cr={};function Tr(){if(Pr)return Cr;Pr=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.validateAdditionalItems=void 0;const t=ke(),e=xe(),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:u}=i;u.items=!0;const h=n.const("len",t._`${o}.length`);if(!1===s)i.setParams({len:r.length}),i.pass(t._`${h} <= ${r.length}`);else if("object"==typeof s&&!(0,e.alwaysValidSchema)(u,s)){const s=n.var("valid",t._`${h} <= ${r.length}`);n.if((0,t.not)(s),(()=>function(s){n.forRange("i",r.length,h,(r=>{i.subschema({keyword:a,dataProp:r,dataPropType:e.Type.Num},s),u.allErrors||n.if((0,t.not)(s),(()=>n.break()))}))}(s))),i.ok(s)}}return Cr.validateAdditionalItems=r,Cr.default=i,Cr}var Ar,Nr,Mr={},Rr={};function Dr(){if(Ar)return Rr;Ar=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.validateTuple=void 0;const t=ke(),e=xe(),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:u,it:h}=i;!function(t){const{opts:i,errSchemaPath:s}=h,o=n.length;i.strictTuples&&!(o===t.minItems&&(o===t.maxItems||!1===t[r]))&&(0,e.checkStrictMode)(h,`"${u}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${s}"`,i.strictTuples)}(o),h.opts.unevaluated&&n.length&&!0!==h.items&&(h.items=e.mergeEvaluated.items(s,n.length,h.items));const c=s.name("valid"),f=s.const("len",t._`${a}.length`);n.forEach(((r,n)=>{(0,e.alwaysValidSchema)(h,r)||(s.if(t._`${f} > ${n}`,(()=>i.subschema({keyword:u,schemaProp:n,dataProp:n},c))),i.ok(c))}))}return Rr.validateTuple=n,Rr.default=r,Rr}function Lr(){if(Nr)return Mr;Nr=1,Object.defineProperty(Mr,"__esModule",{value:!0});const t=Dr();return Mr.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")},Mr}var zr,Ur={};function qr(){if(zr)return Ur;zr=1,Object.defineProperty(Ur,"__esModule",{value:!0});const t=ke(),e=xe(),i=Ze(),r=Tr(),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 Ur.default=n,Ur}var Fr,Vr={};function Br(){if(Fr)return Vr;Fr=1,Object.defineProperty(Vr,"__esModule",{value:!0});const t=ke(),e=xe(),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 u,h;const{minContains:c,maxContains:f}=s;a.opts.next?(u=void 0===c?1:c,h=f):u=1;const l=r.const("len",t._`${o}.length`);if(i.setParams({min:u,max:h}),void 0===h&&0===u)return void(0,e.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==h&&u>h)return(0,e.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void i.fail();if((0,e.alwaysValidSchema)(a,n)){let e=t._`${l} >= ${u}`;return void 0!==h&&(e=t._`${e} && ${l} <= ${h}`),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===h?r.if(t._`${e} >= ${u}`,(()=>r.assign(d,!0).break())):(r.if(t._`${e} > ${h}`,(()=>r.assign(d,!1).break())),1===u?r.assign(d,!0):r.if(t._`${e} >= ${u}`,(()=>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===h&&1===u?m(d,(()=>r.if(d,(()=>r.break())))):0===u?(r.let(d,!0),void 0!==h&&r.if(t._`${o}.length > 0`,p)):(r.let(d,!1),p()),i.result(d,(()=>i.reset()))}};return Vr.default=i,Vr}var Gr,Hr={};function Kr(){return Gr||(Gr=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=ke(),i=xe(),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},
|
|
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 u in i){const h=i[u];if(0===h.length)continue;const c=(0,r.propertyInData)(n,s,u,o.opts.ownProperties);t.setParams({property:u,depsCount:h.length,deps:h.join(", ")}),o.allErrors?n.if(c,(()=>{for(const e of h)(0,r.checkReportMissingProp)(t,e)})):(n.if(e._`${c} && (${(0,r.checkMissingProp)(t,h,a)})`),(0,r.reportMissingProp)(t,a),n.else())}}function o(t,e=t.schema){const{gen:n,data:s,keyword:o,it:a}=t,u=n.name("valid");for(const h in e)(0,i.alwaysValidSchema)(a,e[h])||(n.if((0,r.propertyInData)(n,s,h,a.opts.ownProperties),(()=>{const e=t.subschema({keyword:o,schemaProp:h},u);t.mergeValidEvaluated(e,u)}),(()=>n.var(u,!0))),t.ok(u))}t.validatePropertyDeps=s,t.validateSchemaDeps=o,t.default=n}(Hr)),Hr}var Jr,Wr={};function Zr(){if(Jr)return Wr;Jr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const t=ke(),e=xe(),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 Wr.default=i,Wr}var Qr,Xr={};function Yr(){if(Qr)return Xr;Qr=1,Object.defineProperty(Xr,"__esModule",{value:!0});const t=Ze(),e=ke(),i=Ce(),r=xe(),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:u,errsCount:h,it:c}=n;if(!h)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 ${u}[${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",u,(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._`${h} === ${i.default.errors}`)}};return Xr.default=n,Xr}var tn,en={};function rn(){if(tn)return en;tn=1,Object.defineProperty(en,"__esModule",{value:!0});const t=fi(),e=Ze(),i=xe(),r=Yr(),n={keyword:"properties",type:"object",schemaType:"object",code(n){const{gen:s,schema:o,parentSchema:a,data:u,it:h}=n;"all"===h.opts.removeAdditional&&void 0===a.additionalProperties&&r.default.code(new t.KeywordCxt(h,r.default,"additionalProperties"));const c=(0,e.allSchemaProperties)(o);for(const t of c)h.definedProperties.add(t);h.opts.unevaluated&&c.length&&!0!==h.props&&(h.props=i.mergeEvaluated.props(s,(0,i.toHash)(c),h.props));const f=c.filter((t=>!(0,i.alwaysValidSchema)(h,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,u,t,h.opts.ownProperties)),p(t),h.allErrors||s.else().var(l,!0),s.endIf()),n.it.definedProperties.add(t),n.ok(l);function d(t){return h.opts.useDefaults&&!h.compositeRule&&void 0!==o[t].default}function p(t){n.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};return en.default=n,en}var nn,sn={};function on(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const t=Ze(),e=ke(),i=xe(),r=xe(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(n){const{gen:s,schema:o,data:a,parentSchema:u,it:h}=n,{opts:c}=h,f=(0,t.allSchemaProperties)(o),l=f.filter((t=>(0,i.alwaysValidSchema)(h,o[t])));if(0===f.length||l.length===f.length&&(!h.opts.unevaluated||!0===h.props))return;const d=c.strictSchema&&!c.allowMatchingProperties&&u.properties,p=s.name("valid");!0===h.props||h.props instanceof e.Name||(h.props=(0,r.evaluatedPropsToName)(s,h.props));const{props:m}=h;function v(t){for(const e in d)new RegExp(t).test(e)&&(0,i.checkStrictMode)(h,`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),h.opts.unevaluated&&!0!==m?s.assign(e._`${m}[${o}]`,!0):t||h.allErrors||s.if((0,e.not)(p),(()=>s.break()))}))}))}!function(){for(const t of f)d&&v(t),h.allErrors?y(t):(s.var(p,!0),y(t),s.if(p))}()}};return sn.default=n,sn}var an,un={};function hn(){if(an)return un;an=1,Object.defineProperty(un,"__esModule",{value:!0});const t=xe();return un.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"}},un}var cn,fn={};function ln(){return cn||(cn=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ze().validateUnion,error:{message:"must match a schema in anyOf"}}),fn}var dn,pn={};function mn(){if(dn)return pn;dn=1,Object.defineProperty(pn,"__esModule",{value:!0});const t=ke(),e=xe(),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,u=r.let("valid",!1),h=r.let("passing",null),c=r.name("_valid");i.setParams({passing:h}),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} && ${u}`).assign(u,!1).assign(h,t._`[${h}, ${s}]`).else(),r.if(c,(()=>{r.assign(u,!0),r.assign(h,s),a&&i.mergeEvaluated(a,t.Name)}))}))})),i.result(u,(()=>i.reset()),(()=>i.error(!0)))}};return pn.default=i,pn}var vn,yn={};function gn(){if(vn)return yn;vn=1,Object.defineProperty(yn,"__esModule",{value:!0});const t=xe(),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 yn.default=e,yn}var bn,$n={};function wn(){if(bn)return $n;bn=1,Object.defineProperty($n,"__esModule",{value:!0});const t=ke(),e=xe(),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"),u=r(o,"else");if(!a&&!u)return;const h=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&&u){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(h,c),i.mergeValidEvaluated(s,h),r?n.assign(r,t._`${e}`):i.setParams({ifClause:e})}}i.pass(h,(()=>i.error(!0)))}};function r(t,i){const r=t.schema[i];return void 0!==r&&!(0,e.alwaysValidSchema)(t,r)}return $n.default=i,$n}var _n,kn,En={};function Sn(){if(_n)return En;_n=1,Object.defineProperty(En,"__esModule",{value:!0});const t=xe(),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 En.default=e,En}function xn(){if(kn)return Ir;kn=1,Object.defineProperty(Ir,"__esModule",{value:!0});const t=Tr(),e=Lr(),i=Dr(),r=qr(),n=Br(),s=Kr(),o=Zr(),a=Yr(),u=rn(),h=on(),c=hn(),f=ln(),l=mn(),d=gn(),p=wn(),m=Sn();return Ir.default=function(v=!1){const y=[c.default,f.default,l.default,d.default,p.default,m.default,o.default,a.default,s.default,u.default,h.default];return v?y.push(e.default,r.default):y.push(t.default,i.default),y.push(n.default),y},Ir}var On,jn,Pn={},In={};function Cn(){if(On)return In;On=1,Object.defineProperty(In,"__esModule",{value:!0});const t=ke(),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:u}=e,{opts:h,errSchemaPath:c,schemaEnv:f,self:l}=u;h.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:l.formats,code:h.code.formats}),o=r.const("fDef",t._`${s}[${a}]`),u=r.let("fType"),c=r.let("format");r.if(t._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(u,t._`${o}.type || "string"`).assign(c,t._`${o}.validate`)),(()=>r.assign(u,t._`"string"`).assign(c,o))),e.fail$data((0,t.or)(!1===h.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 && ${u} === ${i} && !${r}`}()))}():function(){const s=l.formats[o];if(!s)return void function(){if(!1!==h.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,u,d]=function(e){const i=e instanceof RegExp?(0,t.regexpCode)(e):h.code.formats?t._`${h.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 u?t._`${d}(${n})`:t._`${d}.test(${n})`}())}())}};return In.default=e,In}function Tn(){return jn||(jn=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.default=[Cn().default]),Pn}var An,Nn,Mn={};function Rn(){return An||(An=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.contentVocabulary=Mn.metadataVocabulary=void 0,Mn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Mn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Mn}function Dn(){if(Nn)return Mi;Nn=1,Object.defineProperty(Mi,"__esModule",{value:!0});const t=Vi(),e=jr(),i=xn(),r=Tn(),n=Rn(),s=[t.default,e.default,(0,i.default)(),r.default,n.metadataVocabulary,n.contentVocabulary];return Mi.default=s,Mi}var Ln,zn,Un={},qn={};function Fn(){return Ln||(Ln=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(t||(qn.DiscrError=t={}))),qn;var t}function Vn(){if(zn)return Un;zn=1,Object.defineProperty(Un,"__esModule",{value:!0});const t=ke(),e=Fn(),i=$i(),r=yi(),n=xe(),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:u,parentSchema:h,it:c}=s,{oneOf:f}=h;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=u.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(u.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(h);let o=!0;for(let e=0;e<f.length;e++){let h=f[e];if((null==h?void 0:h.$ref)&&!(0,n.schemaHasRulesButRef)(h,c.self.RULES)){const t=h.$ref;if(h=i.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,t),h instanceof i.SchemaEnv&&(h=h.schema),void 0===h)throw new r.default(c.opts.uriResolver,c.baseId,t)}const d=null===(t=null==h?void 0:h.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(h)),u(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 u(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 Un.default=s,Un}var Bn,Gn={$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 Hn(){return Bn||(Bn=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=Ai(),r=Dn(),n=Vn(),s=Gn,o=["/properties"],a="http://json-schema.org/draft-07/schema";class u 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=u,t.exports=e=u,t.exports.Ajv=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var h=fi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var c=ke();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=pi();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var l=yi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return l.default}})}(fe,fe.exports)),fe.exports}var Kn,Jn,Wn,Zn,Qn,Xn=Hn(),Yn={exports:{}},ts=(Kn||(Kn=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const i=Hn(),r=ke(),n=ge(),s=fi(),o=Te(),a=Ce(),u="errorMessage",h=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:u,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 b=v,$=r.strConcat(a.default.instancePath,g.errorPath);function w(t,e){return r.and(i._`${t}.keyword !== ${u}`,i._`!${t}.${h}`,i._`${t}.instancePath === ${$}`,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,E(t)])}return p.object(...i)}function k(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 E(t){return i._`function(){return ${k(t)}}`}p.if(i._`${a.default.errors} > 0`,(()=>{if("object"==typeof b){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]}(b);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(w(t,n),(()=>p.code(i._`${n}[${t}.keyword].push(${t})`).assign(i._`${t}.${h}`,!0)))));const{singleError:u}=t;if(u){const t=p.let("message",i._`""`),r=p.let("paramsErrors",i._`[]`);c((e=>{p.if(t,(()=>p.code(i._`${t} += ${"string"==typeof u?u:";"}`))),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)),u=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(w(t,r),(()=>{p.assign(f,i._`${u}[${t}.keyword]`),p.assign(l,i._`${r}[${t}.keyword][${t}.params[${f}]]`),p.if(l,(()=>p.code(i._`${l}.push(${t})`).assign(i._`${t}.${h}`,!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 b=p.let("templates");function w(t,e){p.assign(l,i.stringify(t)),p.assign(b,_(t,e))}n&&s?(d=p.let("emChildKwd"),p.if(c),p.if(f,(()=>{w(s,v.items),p.assign(d,i.str`items`)}),(()=>{w(n,v.properties),p.assign(d,i.str`properties`)})),g=i._`[${d}]`):s?(p.if(f),w(s,v.items),g=i._`.items`):n&&(p.if(r.and(c,r.not(f))),w(n,v.properties),g=i._`.properties`),p.forOf("err",a.default.vErrors,(t=>function(t,e,n){p.if(r.and(i._`${t}.keyword !== ${u}`,i._`!${t}.${h}`,i._`${t}.instancePath.indexOf(${$}) === 0`),(()=>{const r=p.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=p.const("emMatches",i._`${r}.exec(${t}.instancePath.slice(${$}.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}.${h}`,!0))))),p.forIn("key",l,(t=>p.if(i._`${l}[${t}].length`,(()=>{o.reportError(e,{message:i._`${t} in ${b} ? ${b}[${t}]() : ${y}${g}[${t}]`,params:i._`{errors: ${l}[${t}]}`}),p.assign(i._`${a.default.vErrors}[${a.default.errors}-1].instancePath`,i._`${$} + "/" + ${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}(b))}const n="string"==typeof b?b:b._;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 !== ${u}`,i._`!${t}.${h}`,r.or(i._`${t}.instancePath === ${$}`,r.and(i._`${t}.instancePath.indexOf(${$}) === 0`,i._`${t}.instancePath[${$}.length] === "/"`)),i._`${t}.schemaPath.indexOf(${g.errSchemaPath}) === 0`,i._`${t}.schemaPath[${g.errSchemaPath}.length] === "/"`)}(t),(()=>p.code(i._`${n}.push(${t})`).assign(i._`${t}.${h}`,!0))))),p.if(i._`${n}.length`,(()=>o.reportError(e,{message:k(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}.${h}`,(()=>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}(Yn,Yn.exports)),Yn.exports),es=l(ts),is={exports:{}},rs={},ns={},ss=(Zn||(Zn=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const i=(Jn||(Jn=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),u),"date-time":e(f(!0),l),"iso-time":e(a(),h),"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($.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:b},double:{type:"number",validate:b},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,u),"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,h),"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,u=+(i[6]||0),h=+(i[7]||0);if(u>23||h>59||t&&!i[4])return!1;if(r<=23&&n<=59&&s<60)return!0;const c=n-h*a,f=r-u*a-(c<0?1:0);return(23===f||-1===f)&&(59===c||-1===c)&&s<61}}function u(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 h(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||u(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 b(){return!0}const $=/[^\\]\\Z/}(rs)),rs),r=(Wn||(Wn=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=Hn(),i=ke(),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:u}=t,{opts:h,self:c}=u;if(!h.validateFormats)return;const f=new e.KeywordCxt(u,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:h.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:h.code.formats?i._`${h.code.formats}${(0,i.getProperty)(e)}`:void 0});t.fail$data(l(s))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)}(ns)),ns),n=ke(),s=new n.Name("fullFormats"),o=new n.Name("fastFormats"),a=(t,e={keywords:!0})=>{if(Array.isArray(e))return u(t,e,i.fullFormats,s),t;const[n,a]="fast"===e.mode?[i.fastFormats,o]:[i.fullFormats,s];return u(t,e.formats||i.formatNames,n,a),e.keywords&&(0,r.default)(t),t};function u(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}(is,is.exports)),is.exports),os=l(ss),as=(Qn=function(t,e){return Qn=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])},Qn(t,e)},function(t,e){function i(){this.constructor=t}Qn(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),us=Object.prototype.hasOwnProperty;function hs(t,e){return us.call(t,e)}function cs(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)hs(t,n)&&r.push(n);return r}function fs(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function ls(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 ds(t){return-1===t.indexOf("/")&&-1===t.indexOf("~")?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function ps(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function ms(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var e=0,i=t.length;e<i;e++)if(ms(t[e]))return!0}else if("object"==typeof t)for(var r=cs(t),n=r.length,s=0;s<n;s++)if(ms(t[r[s]]))return!0;return!1}function vs(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 ys=function(t){function e(e,i,r,n,s){var o=this.constructor,a=t.call(this,vs(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=vs(e,{name:i,index:r,operation:n,tree:s}),a}return as(e,t),e}(Error),gs=ys,bs={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=ws(i,this.path);r&&(r=fs(r));var n=_s(i,{op:"remove",path:this.from}).removed;return _s(i,{op:"add",path:this.path,value:n}),{newDocument:i,removed:r}},copy:function(t,e,i){var r=ws(i,this.from);return _s(i,{op:"add",path:this.path,value:fs(r)}),{newDocument:i}},test:function(t,e,i){return{newDocument:i,test:Os(t[e],this.value)}},_get:function(t,e,i){return this.value=t[e],{newDocument:i}}},$s={add:function(t,e,i){return ls(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:bs.move,copy:bs.copy,test:bs.test,_get:bs._get};function ws(t,e){if(""==e)return t;var i={op:"_get",path:e};return _s(t,i),i.value}function _s(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):Ss(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=ws(t,e.from),"move"===e.op&&(o.removed=t),o;if("test"===e.op){if(o.test=Os(t,e.value),!1===o.test)throw new gs("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 gs("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,e,t);return o}r||(t=fs(t));var a=(e.path||"").split("/"),u=t,h=1,c=a.length,f=void 0,l=void 0,d=void 0;for(d="function"==typeof i?i:Ss;;){if((l=a[h])&&-1!=l.indexOf("~")&&(l=ps(l)),n&&("__proto__"==l||"prototype"==l&&h>0&&"constructor"==a[h-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===u[l]?f=a.slice(0,h).join("/"):h==c-1&&(f=e.path),void 0!==f&&d(e,0,t,f)),h++,Array.isArray(u)){if("-"===l)l=u.length;else{if(i&&!ls(l))throw new gs("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);ls(l)&&(l=~~l)}if(h>=c){if(i&&"add"===e.op&&l>u.length)throw new gs("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=$s[e.op].call(e,u,l,t)).test)throw new gs("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}}else if(h>=c){if(!1===(o=bs[e.op].call(e,u,l,t)).test)throw new gs("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}if(u=u[l],i&&h<c&&(!u||"object"!=typeof u))throw new gs("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,e,t)}}function ks(t,e,i,r,n){if(void 0===r&&(r=!0),void 0===n&&(n=!0),i&&!Array.isArray(e))throw new gs("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(t=fs(t));for(var s=new Array(e.length),o=0,a=e.length;o<a;o++)s[o]=_s(t,e[o],i,!0,n,o),t=s[o].newDocument;return s.newDocument=t,s}function Es(t,e,i){var r=_s(t,e);if(!1===r.test)throw new gs("Test operation failed","TEST_OPERATION_FAILED",i,e,t);return r.newDocument}function Ss(t,e,i,r){if("object"!=typeof t||null===t||Array.isArray(t))throw new gs("Operation is not an object","OPERATION_NOT_AN_OBJECT",e,t,i);if(!bs[t.op])throw new gs("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 gs("Operation `path` property is not a string","OPERATION_PATH_INVALID",e,t,i);if(0!==t.path.indexOf("/")&&t.path.length>0)throw new gs('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 gs("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 gs("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)&&ms(t.value))throw new gs("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 gs("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 gs("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=xs([{op:"_get",path:t.from,value:void 0}],i);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new gs("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,i)}}function xs(t,e,i){try{if(!Array.isArray(t))throw new gs("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)ks(fs(e),fs(t),i||!0);else{i=i||Ss;for(var r=0;r<t.length;r++)i(t[r],r,e,void 0)}}catch(t){if(t instanceof gs)return t;throw t}}function Os(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(!Os(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(!Os(t[n=a[i]],e[n]))return!1;return!0}return t!=t&&e!=e}var js=Object.freeze({__proto__:null,JsonPatchError:gs,_areEquals:Os,applyOperation:_s,applyPatch:ks,applyReducer:Es,deepClone:fs,getValueByPointer:ws,validate:xs,validator:Ss}),Ps=new WeakMap,Is=function(t){this.observers=new Map,this.obj=t},Cs=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 u in i){const h=i[u];if(0===h.length)continue;const c=(0,r.propertyInData)(n,s,u,o.opts.ownProperties);t.setParams({property:u,depsCount:h.length,deps:h.join(", ")}),o.allErrors?n.if(c,(()=>{for(const e of h)(0,r.checkReportMissingProp)(t,e)})):(n.if(e._`${c} && (${(0,r.checkMissingProp)(t,h,a)})`),(0,r.reportMissingProp)(t,a),n.else())}}function o(t,e=t.schema){const{gen:n,data:s,keyword:o,it:a}=t,u=n.name("valid");for(const h in e)(0,i.alwaysValidSchema)(a,e[h])||(n.if((0,r.propertyInData)(n,s,h,a.opts.ownProperties),(()=>{const e=t.subschema({keyword:o,schemaProp:h},u);t.mergeValidEvaluated(e,u)}),(()=>n.var(u,!0))),t.ok(u))}t.validatePropertyDeps=s,t.validateSchemaDeps=o,t.default=n}(Hr)),Hr}var Jr,Wr={};function Zr(){if(Jr)return Wr;Jr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const t=ke(),e=xe(),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 Wr.default=i,Wr}var Yr,Qr={};function Xr(){if(Yr)return Qr;Yr=1,Object.defineProperty(Qr,"__esModule",{value:!0});const t=Ze(),e=ke(),i=Ce(),r=xe(),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:u,errsCount:h,it:c}=n;if(!h)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 ${u}[${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",u,(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._`${h} === ${i.default.errors}`)}};return Qr.default=n,Qr}var tn,en={};function rn(){if(tn)return en;tn=1,Object.defineProperty(en,"__esModule",{value:!0});const t=fi(),e=Ze(),i=xe(),r=Xr(),n={keyword:"properties",type:"object",schemaType:"object",code(n){const{gen:s,schema:o,parentSchema:a,data:u,it:h}=n;"all"===h.opts.removeAdditional&&void 0===a.additionalProperties&&r.default.code(new t.KeywordCxt(h,r.default,"additionalProperties"));const c=(0,e.allSchemaProperties)(o);for(const t of c)h.definedProperties.add(t);h.opts.unevaluated&&c.length&&!0!==h.props&&(h.props=i.mergeEvaluated.props(s,(0,i.toHash)(c),h.props));const f=c.filter((t=>!(0,i.alwaysValidSchema)(h,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,u,t,h.opts.ownProperties)),p(t),h.allErrors||s.else().var(l,!0),s.endIf()),n.it.definedProperties.add(t),n.ok(l);function d(t){return h.opts.useDefaults&&!h.compositeRule&&void 0!==o[t].default}function p(t){n.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};return en.default=n,en}var nn,sn={};function on(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const t=Ze(),e=ke(),i=xe(),r=xe(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(n){const{gen:s,schema:o,data:a,parentSchema:u,it:h}=n,{opts:c}=h,f=(0,t.allSchemaProperties)(o),l=f.filter((t=>(0,i.alwaysValidSchema)(h,o[t])));if(0===f.length||l.length===f.length&&(!h.opts.unevaluated||!0===h.props))return;const d=c.strictSchema&&!c.allowMatchingProperties&&u.properties,p=s.name("valid");!0===h.props||h.props instanceof e.Name||(h.props=(0,r.evaluatedPropsToName)(s,h.props));const{props:m}=h;function v(t){for(const e in d)new RegExp(t).test(e)&&(0,i.checkStrictMode)(h,`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),h.opts.unevaluated&&!0!==m?s.assign(e._`${m}[${o}]`,!0):t||h.allErrors||s.if((0,e.not)(p),(()=>s.break()))}))}))}!function(){for(const t of f)d&&v(t),h.allErrors?y(t):(s.var(p,!0),y(t),s.if(p))}()}};return sn.default=n,sn}var an,un={};function hn(){if(an)return un;an=1,Object.defineProperty(un,"__esModule",{value:!0});const t=xe();return un.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"}},un}var cn,fn={};function ln(){return cn||(cn=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ze().validateUnion,error:{message:"must match a schema in anyOf"}}),fn}var dn,pn={};function mn(){if(dn)return pn;dn=1,Object.defineProperty(pn,"__esModule",{value:!0});const t=ke(),e=xe(),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,u=r.let("valid",!1),h=r.let("passing",null),c=r.name("_valid");i.setParams({passing:h}),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} && ${u}`).assign(u,!1).assign(h,t._`[${h}, ${s}]`).else(),r.if(c,(()=>{r.assign(u,!0),r.assign(h,s),a&&i.mergeEvaluated(a,t.Name)}))}))})),i.result(u,(()=>i.reset()),(()=>i.error(!0)))}};return pn.default=i,pn}var vn,yn={};function gn(){if(vn)return yn;vn=1,Object.defineProperty(yn,"__esModule",{value:!0});const t=xe(),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 yn.default=e,yn}var bn,$n={};function wn(){if(bn)return $n;bn=1,Object.defineProperty($n,"__esModule",{value:!0});const t=ke(),e=xe(),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"),u=r(o,"else");if(!a&&!u)return;const h=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&&u){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(h,c),i.mergeValidEvaluated(s,h),r?n.assign(r,t._`${e}`):i.setParams({ifClause:e})}}i.pass(h,(()=>i.error(!0)))}};function r(t,i){const r=t.schema[i];return void 0!==r&&!(0,e.alwaysValidSchema)(t,r)}return $n.default=i,$n}var _n,kn,En={};function Sn(){if(_n)return En;_n=1,Object.defineProperty(En,"__esModule",{value:!0});const t=xe(),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 En.default=e,En}function xn(){if(kn)return Ir;kn=1,Object.defineProperty(Ir,"__esModule",{value:!0});const t=Tr(),e=Lr(),i=Dr(),r=qr(),n=Br(),s=Kr(),o=Zr(),a=Xr(),u=rn(),h=on(),c=hn(),f=ln(),l=mn(),d=gn(),p=wn(),m=Sn();return Ir.default=function(v=!1){const y=[c.default,f.default,l.default,d.default,p.default,m.default,o.default,a.default,s.default,u.default,h.default];return v?y.push(e.default,r.default):y.push(t.default,i.default),y.push(n.default),y},Ir}var On,jn,Pn={},In={};function Cn(){if(On)return In;On=1,Object.defineProperty(In,"__esModule",{value:!0});const t=ke(),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:u}=e,{opts:h,errSchemaPath:c,schemaEnv:f,self:l}=u;h.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:l.formats,code:h.code.formats}),o=r.const("fDef",t._`${s}[${a}]`),u=r.let("fType"),c=r.let("format");r.if(t._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(u,t._`${o}.type || "string"`).assign(c,t._`${o}.validate`)),(()=>r.assign(u,t._`"string"`).assign(c,o))),e.fail$data((0,t.or)(!1===h.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 && ${u} === ${i} && !${r}`}()))}():function(){const s=l.formats[o];if(!s)return void function(){if(!1!==h.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,u,d]=function(e){const i=e instanceof RegExp?(0,t.regexpCode)(e):h.code.formats?t._`${h.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 u?t._`${d}(${n})`:t._`${d}.test(${n})`}())}())}};return In.default=e,In}function Tn(){return jn||(jn=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.default=[Cn().default]),Pn}var An,Nn,Mn={};function Rn(){return An||(An=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.contentVocabulary=Mn.metadataVocabulary=void 0,Mn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Mn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Mn}function Dn(){if(Nn)return Mi;Nn=1,Object.defineProperty(Mi,"__esModule",{value:!0});const t=Vi(),e=jr(),i=xn(),r=Tn(),n=Rn(),s=[t.default,e.default,(0,i.default)(),r.default,n.metadataVocabulary,n.contentVocabulary];return Mi.default=s,Mi}var Ln,zn,Un={},qn={};function Fn(){return Ln||(Ln=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(t||(qn.DiscrError=t={}))),qn;var t}function Vn(){if(zn)return Un;zn=1,Object.defineProperty(Un,"__esModule",{value:!0});const t=ke(),e=Fn(),i=$i(),r=yi(),n=xe(),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:u,parentSchema:h,it:c}=s,{oneOf:f}=h;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=u.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(u.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(h);let o=!0;for(let e=0;e<f.length;e++){let h=f[e];if((null==h?void 0:h.$ref)&&!(0,n.schemaHasRulesButRef)(h,c.self.RULES)){const t=h.$ref;if(h=i.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,t),h instanceof i.SchemaEnv&&(h=h.schema),void 0===h)throw new r.default(c.opts.uriResolver,c.baseId,t)}const d=null===(t=null==h?void 0:h.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(h)),u(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 u(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 Un.default=s,Un}var Bn,Gn={$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 Hn(){return Bn||(Bn=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=Ai(),r=Dn(),n=Vn(),s=Gn,o=["/properties"],a="http://json-schema.org/draft-07/schema";class u 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=u,t.exports=e=u,t.exports.Ajv=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var h=fi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var c=ke();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=pi();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var l=yi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return l.default}})}(fe,fe.exports)),fe.exports}var Kn,Jn,Wn,Zn,Yn,Qn=Hn(),Xn={exports:{}},ts=(Kn||(Kn=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const i=Hn(),r=ke(),n=ge(),s=fi(),o=Te(),a=Ce(),u="errorMessage",h=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:u,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 b=v,$=r.strConcat(a.default.instancePath,g.errorPath);function w(t,e){return r.and(i._`${t}.keyword !== ${u}`,i._`!${t}.${h}`,i._`${t}.instancePath === ${$}`,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,E(t)])}return p.object(...i)}function k(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 E(t){return i._`function(){return ${k(t)}}`}p.if(i._`${a.default.errors} > 0`,(()=>{if("object"==typeof b){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]}(b);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(w(t,n),(()=>p.code(i._`${n}[${t}.keyword].push(${t})`).assign(i._`${t}.${h}`,!0)))));const{singleError:u}=t;if(u){const t=p.let("message",i._`""`),r=p.let("paramsErrors",i._`[]`);c((e=>{p.if(t,(()=>p.code(i._`${t} += ${"string"==typeof u?u:";"}`))),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)),u=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(w(t,r),(()=>{p.assign(f,i._`${u}[${t}.keyword]`),p.assign(l,i._`${r}[${t}.keyword][${t}.params[${f}]]`),p.if(l,(()=>p.code(i._`${l}.push(${t})`).assign(i._`${t}.${h}`,!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 b=p.let("templates");function w(t,e){p.assign(l,i.stringify(t)),p.assign(b,_(t,e))}n&&s?(d=p.let("emChildKwd"),p.if(c),p.if(f,(()=>{w(s,v.items),p.assign(d,i.str`items`)}),(()=>{w(n,v.properties),p.assign(d,i.str`properties`)})),g=i._`[${d}]`):s?(p.if(f),w(s,v.items),g=i._`.items`):n&&(p.if(r.and(c,r.not(f))),w(n,v.properties),g=i._`.properties`),p.forOf("err",a.default.vErrors,(t=>function(t,e,n){p.if(r.and(i._`${t}.keyword !== ${u}`,i._`!${t}.${h}`,i._`${t}.instancePath.indexOf(${$}) === 0`),(()=>{const r=p.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=p.const("emMatches",i._`${r}.exec(${t}.instancePath.slice(${$}.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}.${h}`,!0))))),p.forIn("key",l,(t=>p.if(i._`${l}[${t}].length`,(()=>{o.reportError(e,{message:i._`${t} in ${b} ? ${b}[${t}]() : ${y}${g}[${t}]`,params:i._`{errors: ${l}[${t}]}`}),p.assign(i._`${a.default.vErrors}[${a.default.errors}-1].instancePath`,i._`${$} + "/" + ${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}(b))}const n="string"==typeof b?b:b._;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 !== ${u}`,i._`!${t}.${h}`,r.or(i._`${t}.instancePath === ${$}`,r.and(i._`${t}.instancePath.indexOf(${$}) === 0`,i._`${t}.instancePath[${$}.length] === "/"`)),i._`${t}.schemaPath.indexOf(${g.errSchemaPath}) === 0`,i._`${t}.schemaPath[${g.errSchemaPath}.length] === "/"`)}(t),(()=>p.code(i._`${n}.push(${t})`).assign(i._`${t}.${h}`,!0))))),p.if(i._`${n}.length`,(()=>o.reportError(e,{message:k(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}.${h}`,(()=>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}(Xn,Xn.exports)),Xn.exports),es=l(ts),is={exports:{}},rs={},ns={},ss=(Zn||(Zn=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const i=(Jn||(Jn=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),u),"date-time":e(f(!0),l),"iso-time":e(a(),h),"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($.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:b},double:{type:"number",validate:b},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,u),"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,h),"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,u=+(i[6]||0),h=+(i[7]||0);if(u>23||h>59||t&&!i[4])return!1;if(r<=23&&n<=59&&s<60)return!0;const c=n-h*a,f=r-u*a-(c<0?1:0);return(23===f||-1===f)&&(59===c||-1===c)&&s<61}}function u(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 h(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||u(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 b(){return!0}const $=/[^\\]\\Z/}(rs)),rs),r=(Wn||(Wn=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=Hn(),i=ke(),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:u}=t,{opts:h,self:c}=u;if(!h.validateFormats)return;const f=new e.KeywordCxt(u,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:h.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:h.code.formats?i._`${h.code.formats}${(0,i.getProperty)(e)}`:void 0});t.fail$data(l(s))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)}(ns)),ns),n=ke(),s=new n.Name("fullFormats"),o=new n.Name("fastFormats"),a=(t,e={keywords:!0})=>{if(Array.isArray(e))return u(t,e,i.fullFormats,s),t;const[n,a]="fast"===e.mode?[i.fastFormats,o]:[i.fullFormats,s];return u(t,e.formats||i.formatNames,n,a),e.keywords&&(0,r.default)(t),t};function u(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}(is,is.exports)),is.exports),os=l(ss),as=(Yn=function(t,e){return Yn=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])},Yn(t,e)},function(t,e){function i(){this.constructor=t}Yn(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),us=Object.prototype.hasOwnProperty;function hs(t,e){return us.call(t,e)}function cs(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)hs(t,n)&&r.push(n);return r}function fs(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function ls(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 ds(t){return-1===t.indexOf("/")&&-1===t.indexOf("~")?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function ps(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function ms(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var e=0,i=t.length;e<i;e++)if(ms(t[e]))return!0}else if("object"==typeof t)for(var r=cs(t),n=r.length,s=0;s<n;s++)if(ms(t[r[s]]))return!0;return!1}function vs(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 ys=function(t){function e(e,i,r,n,s){var o=this.constructor,a=t.call(this,vs(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=vs(e,{name:i,index:r,operation:n,tree:s}),a}return as(e,t),e}(Error),gs=ys,bs={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=ws(i,this.path);r&&(r=fs(r));var n=_s(i,{op:"remove",path:this.from}).removed;return _s(i,{op:"add",path:this.path,value:n}),{newDocument:i,removed:r}},copy:function(t,e,i){var r=ws(i,this.from);return _s(i,{op:"add",path:this.path,value:fs(r)}),{newDocument:i}},test:function(t,e,i){return{newDocument:i,test:Os(t[e],this.value)}},_get:function(t,e,i){return this.value=t[e],{newDocument:i}}},$s={add:function(t,e,i){return ls(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:bs.move,copy:bs.copy,test:bs.test,_get:bs._get};function ws(t,e){if(""==e)return t;var i={op:"_get",path:e};return _s(t,i),i.value}function _s(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):Ss(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=ws(t,e.from),"move"===e.op&&(o.removed=t),o;if("test"===e.op){if(o.test=Os(t,e.value),!1===o.test)throw new gs("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 gs("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,e,t);return o}r||(t=fs(t));var a=(e.path||"").split("/"),u=t,h=1,c=a.length,f=void 0,l=void 0,d=void 0;for(d="function"==typeof i?i:Ss;;){if((l=a[h])&&-1!=l.indexOf("~")&&(l=ps(l)),n&&("__proto__"==l||"prototype"==l&&h>0&&"constructor"==a[h-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===u[l]?f=a.slice(0,h).join("/"):h==c-1&&(f=e.path),void 0!==f&&d(e,0,t,f)),h++,Array.isArray(u)){if("-"===l)l=u.length;else{if(i&&!ls(l))throw new gs("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);ls(l)&&(l=~~l)}if(h>=c){if(i&&"add"===e.op&&l>u.length)throw new gs("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=$s[e.op].call(e,u,l,t)).test)throw new gs("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}}else if(h>=c){if(!1===(o=bs[e.op].call(e,u,l,t)).test)throw new gs("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return o}if(u=u[l],i&&h<c&&(!u||"object"!=typeof u))throw new gs("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,e,t)}}function ks(t,e,i,r,n){if(void 0===r&&(r=!0),void 0===n&&(n=!0),i&&!Array.isArray(e))throw new gs("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(t=fs(t));for(var s=new Array(e.length),o=0,a=e.length;o<a;o++)s[o]=_s(t,e[o],i,!0,n,o),t=s[o].newDocument;return s.newDocument=t,s}function Es(t,e,i){var r=_s(t,e);if(!1===r.test)throw new gs("Test operation failed","TEST_OPERATION_FAILED",i,e,t);return r.newDocument}function Ss(t,e,i,r){if("object"!=typeof t||null===t||Array.isArray(t))throw new gs("Operation is not an object","OPERATION_NOT_AN_OBJECT",e,t,i);if(!bs[t.op])throw new gs("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 gs("Operation `path` property is not a string","OPERATION_PATH_INVALID",e,t,i);if(0!==t.path.indexOf("/")&&t.path.length>0)throw new gs('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 gs("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 gs("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)&&ms(t.value))throw new gs("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 gs("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 gs("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=xs([{op:"_get",path:t.from,value:void 0}],i);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new gs("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,i)}}function xs(t,e,i){try{if(!Array.isArray(t))throw new gs("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)ks(fs(e),fs(t),i||!0);else{i=i||Ss;for(var r=0;r<t.length;r++)i(t[r],r,e,void 0)}}catch(t){if(t instanceof gs)return t;throw t}}function Os(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(!Os(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(!Os(t[n=a[i]],e[n]))return!1;return!0}return t!=t&&e!=e}var js=Object.freeze({__proto__:null,JsonPatchError:gs,_areEquals:Os,applyOperation:_s,applyPatch:ks,applyReducer:Es,deepClone:fs,getValueByPointer:ws,validate:xs,validator:Ss}),Ps=new WeakMap,Is=function(t){this.observers=new Map,this.obj=t},Cs=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 Ts(t,e){e.unobserve()}function As(t,e){var i,r=function(t){return Ps.get(t)}(t);if(r){var n=function(t,e){return t.observers.get(e)}(r,e);i=n&&n.observer}else r=new Is(t),Ps.set(t,r);if(i)return i;if(i={},r.value=fs(t),e){i.callback=e,i.next=null;var s=function(){Ns(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(){Ns(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 Cs(e,i)),i}function Ns(t,e){void 0===e&&(e=!1);var i=Ps.get(t.object);Ms(i.value,t.object,t.patches,"",e),t.patches.length&&ks(i.value,t.patches);var r=t.patches;return r.length>0&&(t.patches=[],t.callback&&t.callback(r)),r}function Ms(t,e,i,r,n){if(e!==t){"function"==typeof e.toJSON&&(e=e.toJSON());for(var s=cs(e),o=cs(t),a=!1,u=o.length-1;u>=0;u--){var h=t[f=o[u]];if(!hs(e,f)||void 0===e[f]&&void 0!==h&&!1===Array.isArray(e))Array.isArray(t)===Array.isArray(e)?(n&&i.push({op:"test",path:r+"/"+ds(f),value:fs(h)}),i.push({op:"remove",path:r+"/"+ds(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 h&&null!=h&&"object"==typeof c&&null!=c&&Array.isArray(h)===Array.isArray(c)?Ms(h,c,i,r+"/"+ds(f),n):h!==c&&(n&&i.push({op:"test",path:r+"/"+ds(f),value:fs(h)}),i.push({op:"replace",path:r+"/"+ds(f),value:fs(c)}))}}if(a||s.length!=o.length)for(u=0;u<s.length;u++){var f;hs(t,f=s[u])||void 0===e[f]||i.push({op:"add",path:r+"/"+ds(f),value:fs(e[f])})}}}function Rs(t,e,i){void 0===i&&(i=!1);var r=[];return Ms(t,e,r,"",i),r}var Ds=Object.assign({},js,Object.freeze({__proto__:null,compare:Rs,generate:Ns,observe:As,unobserve:Ts}),{JsonPatchError:ys,deepClone:fs,escapePathComponent:ds,unescapePathComponent:ps}),Ls=Object.freeze({__proto__:null,JsonPatchError:ys,_areEquals:Os,applyOperation:_s,applyPatch:ks,applyReducer:Es,compare:Rs,deepClone:fs,default:Ds,escapePathComponent:ds,generate:Ns,getValueByPointer:ws,observe:As,unescapePathComponent:ps,unobserve:Ts,validate:xs,validator:Ss});function zs(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&Object.keys(t).length>0&&Object.values(t).every((t=>"string"==typeof t))}function Us(t,e){return zs(t)?e&&void 0!==t[e]?t[e]:Object.values(t)[0]:t}function qs(t,e){if(!t)return t;const i={};for(const[r,n]of Object.entries(t))i[r]=Us(n,e);return i}var Fs={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 Vs(t,e,i){return((Fs[e??"en"]??Fs.en)[t]??Fs.en[t]??"Invalid value").replace("{value}",String(i??""))}function*Bs(t,e="0"){if(t){yield{brick:t,path:e};for(const[i,r]of(t.children??[]).entries())yield*Bs(r,`${e}.${i}`)}}function*Gs(t){if(t&&(yield t,"collection"!==t.type))for(const e of t.children??[])yield*Gs(e)}class Hs{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 Ks=new Set(["__proto__","constructor","prototype"]);class Js{value;constructor(t){this.value=t}}var Ws=(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(Ks.has(e))throw new Error(`Access to "${e}" is not allowed`);return e},Qs=(t,e)=>({object:Xs(t,e.object),prop:Zs(e.computed?Xs(t,e.property):e.property.name),optional:!0===e.optional}),Xs=(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=Xs(t,i);if(e instanceof Js)return e}return;case"ReturnStatement":return new Js(e.argument?Xs(t,e.argument):void 0);case"IfStatement":return Xs(t,e.test)?Xs(t,e.consequent):e.alternate?Xs(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");Ws(t,e.name,i.init?Xs(t,i.init):void 0)}return;case"ExpressionStatement":return void Xs(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(Xs(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 Xs(t,e.expression);case"MemberExpression":return((t,e)=>{const{object:i,prop:r,optional:n}=Qs(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=Xs(t,i.argument);Array.isArray(e)&&r.push(...e)}else r.push(Xs(t,i));if("MemberExpression"===i.type){const{object:n,prop:s,optional:o}=Qs(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=Xs(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]},u=Xs(a,r);return t.steps=a.steps,u instanceof Js?u.value:!0===e.expression?u:void 0}}case"BinaryExpression":{const i=Xs(t,e.left),r=Xs(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=Xs(t,e.left);switch(e.operator){case"&&":return i&&Xs(t,e.right);case"||":return i||Xs(t,e.right);case"??":return i??Xs(t,e.right);default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"UnaryExpression":{const i=Xs(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 Xs(t,e.test)?Xs(t,e.consequent):Xs(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=Xs(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=Xs(t,r.argument);Array.isArray(e)&&i.push(...e)}else i.push(Xs(t,r));return i}case"ObjectExpression":{const i={};for(const r of e.properties){if("SpreadElement"===r.type){const e=Xs(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?Xs(t,e):"Identifier"===e.type?e.name:e.value);i[String(n)]=Xs(t,r.value)}return i}default:throw new Error(`Unsupported syntax: ${e.type}`)}},Ys={undefined:void 0,NaN:NaN,Infinity:1/0,Math,JSON,Number,String,Boolean,Array,Object,Date,parseInt,parseFloat,isNaN,isFinite},to=Symbol.for("formkrafter.core.services"),eo=globalThis,io=eo[to]??={jsRunnerService:new class{validateJs(t,e={ecmaVersion:"latest",allowReturnOutsideFunction:!0}){try{return he(t,e),{valide:!0}}catch(t){return{valide:!1,error:t instanceof Error?t:new Error(String(t))}}}eval(t,e={}){return function(t,e={}){const i=he(t,{ecmaVersion:"latest",allowReturnOutsideFunction:!0}),r={steps:0,scopes:[new Map(Object.entries({...Ys,...e})),new Map]},n=Xs(r,i);return n instanceof Js?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)}`}}}},ro=(t,e)=>{try{return io.jsRunnerService.eval(t,{dataMap:e??{}})}catch(t){return t instanceof Error?t:new Error(String(t))}},no=(t,e)=>((t,e)=>((t,e)=>t?.filter((t=>((t,e)=>"jsonLogic"===t.type?null!=t.logic&&!0===v.apply(t.logic,e):"javaScript"===t.type&&!!t.code&&!0===ro(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=v.apply(t.logic,e):"code"===t.property.type&&t.code?i=ro(t.code,e):"string"===t.property.type&&(i=t.string),{[t.property.target]:i}):{}})).flat().reduce(((t,e)=>({...t,...e})),{})??{hidden:!1},so=new Xn.Ajv({allErrors:!0});os(so,["email","uri"]),es(so);var oo=new WeakMap,ao=t=>{if("required"===t.keyword)return t.params.missingProperty;if("errorMessage"===t.keyword){const e=t.params.errors?.[0];return e?ao(e):void 0}return t.instancePath.split("/").filter(Boolean)[0]},uo=(t,e,i)=>{const r={},n=((t,e)=>{let i=oo.get(t);i||(i=new Map,oo.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=Us(t,e);return"string"==typeof i?i:void 0};for(const o of Gs(t)){const t=o.configs?.key,a=o.dataType;if(!t||!a||"void"===a)continue;const u=o.validations?.find((t=>"required"===t.validator)),h={type:a,nullable:!u},c={type:Vs("type",e)};for(const t of o.validations??[]){const{validator:i,value:r}=t,n=s(t.message)??Vs(i,e,r);"minLength"===i&&null!=r?(h.minLength=Number(r),c.minLength=n):"maxLength"===i&&null!=r?(h.maxLength=Number(r),c.maxLength=n):"min"===i&&null!=r?(h.minimum=Number(r),c.minimum=n):"max"===i&&null!=r?(h.maximum=Number(r),c.maximum=n):"pattern"===i&&"string"==typeof r&&r?(h.pattern=r,c.pattern=n):"minItems"===i&&null!=r?(h.minItems=Number(r),c.minItems=n):"maxItems"===i&&null!=r?(h.maxItems=Number(r),c.maxItems=n):"email"===i?(h.format="email",c.format=n):"url"===i&&(h.format="uri",c.format=n)}h.errorMessage=c,i[t]=h,u&&(r.push(t),n[t]=s(u.message)??Vs("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=so.compile(s)}catch{return}i.set(r,n)}return n})(t,i);if(n&&!n(e))for(const t of n.errors??[]){const e=ao(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 Gs(t)){const t=e.configs?.key;if(t)for(const s of e.validations??[]){if("custom"!==s.validator||!s.customValidator)continue;const e=ro(`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=Us(s.message,i);r[t]="string"==typeof e?e:Vs("custom",i)}}}return r})(t,e,i)))n in r||(r[n]=s);return{valid:0===Object.keys(r).length,errors:r}};function ho(t){return t.split(".").slice(1).map((t=>`/children/${t}`)).join("")}function co(t,e){if(t.configs?.uid===e)return"";for(const[i,r]of(t.children??[]).entries()){const t=co(r,e);if(void 0!==t)return`/children/${i}${t}`}}function fo(t,e){let i=t;for(const t of e.split(".").slice(1))i=i?.children?.[Number(t)];return i}var lo=(Ds??Ls).applyPatch,po=(t,e,i)=>({spec:lo(t,e,!0,!1).newDocument,patches:e,inverse:i}),mo=(t,e)=>{const i=fo(t,e);if(!i)throw new Error(`No brick at path "${e}"`);return i},vo=(t,e)=>{const i=co(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}},yo=t=>JSON.parse(JSON.stringify(t));function go(t,e,i,r){const n=mo(t,i),s=ho(i),o=yo(e);if(!n.children){const e=`${s}/children`;return po(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 po(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=mo(t,e),r=ho(e);return po(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=mo(t,e),n=e.split(".").map(Number),s=i.split(".").map(Number),o=n.length-1,a=n[o],u=s.length>o&&n.slice(0,o).every(((t,e)=>t===s[e])),h=[...s];if(u){if(h[o]===a&&h.length>n.length)throw new Error(`Cannot move a brick into its own subtree ("${e}" → "${i}")`);h[o]>a&&(h[o]-=1)}const c=ho(e),f=ho(h.join("."));return po(t,[{op:"remove",path:c},{op:"add",path:f,value:r}],[{op:"remove",path:f},{op:"add",path:c,value:r}])}var wo=t=>({...t,...t.configs?{configs:{...t.configs,uid:crypto.randomUUID()}}:{},...t.children?{children:t.children.map(wo)}:{}});function _o(t,e){if("0"===e)throw new Error("Cannot duplicate the root brick");const i=mo(t,e),r=e.split("."),n=Number(r[r.length-1])+1,s=ho([...r.slice(0,-1),String(n)].join(".")),o=wo(yo(i));return po(t,[{op:"add",path:s,value:o}],[{op:"remove",path:s}])}var ko=(t,e,i,r,n)=>{const s=`${e}/${i}`;return void 0===n?po(t,[{op:"add",path:s,value:r}],[{op:"remove",path:s}]):po(t,[{op:"replace",path:s,value:r}],[{op:"replace",path:s,value:n}])};function Eo(t,e,i){const{pointer:r,brick:n}=vo(t,e),s={...n.configs,...i};return ko(t,r,"configs",s,n.configs)}function So(t,e,i){const{pointer:r,brick:n}=vo(t,e),s={...n.styles,...i};return ko(t,r,"styles",s,n.styles)}function xo(t,e,i){const{pointer:r,brick:n}=vo(t,e);return ko(t,r,"validations",i,n.validations)}function Oo(t,e,i){const{pointer:r,brick:n}=vo(t,e);return ko(t,r,"rules",i,n.rules)}class jo{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),lo(t,e.inverse,!0,!1).newDocument}redo(t){const e=this.future.pop();if(e)return this.past.push(e),lo(t,e.patches,!0,!1).newDocument}clear(){this.past=[],this.future=[]}}function Po(t){return new class extends Hs{constructor(){var e;super({type:t.type,dataType:t.dataType,id:t.id,name:t.name,category:t.category,configsForm:t.configsForm,styles:null!==(e=t.styles)&&void 0!==e?e:{},validators:t.validators,unWrapData:t.unWrapData,isPrivate:t.isPrivate,defaultConfigs:t.defaultConfigs})}render(e){return t.render(e)}renderBuilder(e){var i;return(null!==(i=t.renderBuilder)&&void 0!==i?i:t.render)(e)}getComponent(t){return this.render(t)}getComponentWithActions(t){return this.renderBuilder(t)}}}const Io=t=>t.replace(/-([a-z])/g,((t,e)=>e.toUpperCase()));function Co(t){const e=Object.entries(null!=t?t:{}).filter((([,t])=>null!=t&&""!==t));if(0===e.length)return;const i={};for(const[t,r]of e)i[Io(t)]=String(r);return i}var To;const Ao={"palette.search":"Search bricks…","palette.empty":"No brick matches “{query}”","builder.undo":"Undo","builder.redo":"Redo","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.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","address.street":"Street","address.city":"City","address.zip":"Postal code","address.country":"Country","grid.addRow":"+ Add row","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.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.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.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","address.street":"Rue","address.city":"Ville","address.zip":"Code postal","address.country":"Pays","grid.addRow":"+ Ajouter une 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.group.name":"Groupe","brick.row.name":"Ligne","brick.column.name":"Colonne","brick.stepper.name":"Étapes","brick.tabs.name":"Onglets"},Mo=Symbol.for("formkrafter.wc.i18n"),Ro=globalThis,Do=null!==(To=Ro[Mo])&&void 0!==To?To:Ro[Mo]={current:Object.assign({},Ao)};function Lo(t={}){Do.current=Object.assign(Object.assign({},Ao),t)}function zo(t,e){var i;let r=null!==(i=Do.current[t])&&void 0!==i?i:t;for(const[t,i]of Object.entries(null!=e?e:{}))r=r.replace(`{${t}}`,String(i));return r}function Uo(t,e){var i;return null!==(i=Do.current[t])&&void 0!==i?i:e}const qo=(t,e)=>{var i,r,n,s;return null!==(s=null!==(r=null===(i=t.configs)||void 0===i?void 0:i.label)&&void 0!==r?r:null===(n=t.configs)||void 0===n?void 0:n.key)&&void 0!==s?s:e},Fo=(e,i)=>{var r,n;const s=null===(r=e.configs)||void 0===r?void 0:r.prefix,o=null===(n=e.configs)||void 0===n?void 0:n.suffix;return s||o?t("div",{class:"fk-adorned"},s?t("span",{class:"fk-adorned__affix"},s):null,i,o?t("span",{class:"fk-adorned__affix"},o):null):i},Vo=(e,i,r)=>t("div",{class:"fk-field",style:Co(e.styles)},t("span",{class:"fk-field__label"},qo(e,i)),r,e.error?t("span",{class:"fk-field__error"},e.error):null),Bo=(e,i,r)=>t("label",{class:"fk-field",style:Co(e.styles)},t("span",{class:"fk-field__label"},qo(e,i)),r,e.error?t("span",{class:"fk-field__error"},e.error):null),Go=e=>Po({type:"input",dataType:"string",id:e.id,name:e.name,category:"Inputs",defaultConfigs:{label:e.name},render:i=>{var r,n;return Bo(i,e.name,Fo(i,t("input",{class:"fk-field__input fk-adorned__input",type:e.inputType,value:null!==(r=i.data)&&void 0!==r?r:"",placeholder:null===(n=i.configs)||void 0===n?void 0:n.placeholder,disabled:i.editable||i.disabled,onInput:t=>{var e;return null===(e=i.onDataChange)||void 0===e?void 0:e.call(i,t.target.value)}})))}}),Ho=Go({id:"text",name:"Text",inputType:"text"}),Ko=Go({id:"email",name:"Email",inputType:"email"}),Jo=Go({id:"password",name:"Password",inputType:"password"}),Wo=Go({id:"url",name:"URL",inputType:"url"}),Zo=Go({id:"phone",name:"Phone",inputType:"tel"}),Qo=Po({type:"input",dataType:"string",id:"textarea",name:"Text area",category:"Inputs",defaultConfigs:{label:"Text area"},render:e=>{var i,r;return Bo(e,"Text area",t("textarea",{class:"fk-field__input fk-field__input--textarea",value:null!==(i=e.data)&&void 0!==i?i:"",placeholder:null===(r=e.configs)||void 0===r?void 0:r.placeholder,disabled:e.editable||e.disabled,onInput:t=>{var i;return null===(i=e.onDataChange)||void 0===i?void 0:i.call(e,t.target.value)}}))}}),Xo=Po({type:"input",dataType:"number",id:"number",name:"Number",category:"Inputs",defaultConfigs:{label:"Number"},render:e=>{var i;return Bo(e,"Number",Fo(e,t("input",{class:"fk-field__input fk-adorned__input",type:"number",value:null==e.data?"":String(e.data),placeholder:null===(i=e.configs)||void 0===i?void 0:i.placeholder,disabled:e.editable||e.disabled,onInput:t=>{var i;const r=t.target.value;null===(i=e.onDataChange)||void 0===i||i.call(e,""===r?void 0:Number(r))}})))}}),Yo=Po({type:"input",dataType:"string",id:"date",name:"Date",category:"Inputs",defaultConfigs:{label:"Date"},render:e=>{var i;return Bo(e,"Date",t("input",{class:"fk-field__input",type:"date",value:null!==(i=e.data)&&void 0!==i?i:"",disabled:e.editable||e.disabled,onInput:t=>{var i;const r=t.target.value;null===(i=e.onDataChange)||void 0===i||i.call(e,""===r?void 0:r)}}))}}),ta=Po({type:"input",dataType:"string",id:"select",name:"Select",category:"Inputs",defaultConfigs:{label:"Select",optionsSource:"static",options:"Option 1\nOption 2"},render:e=>{var i;return Vo(e,"Select",t("fk-select-input",{configs:e.configs,value:null!==(i=e.data)&&void 0!==i?i:"",disabled:e.editable||e.disabled,dataMap:e.dataMap,onSelectValueChange:t=>{var i;t.stopPropagation(),null===(i=e.onDataChange)||void 0===i||i.call(e,t.detail)}}))}}),ea=Po({type:"input",dataType:"array",id:"multi-select",name:"Multi select",category:"Inputs",defaultConfigs:{label:"Multi select",optionsSource:"static",options:"Option 1\nOption 2\nOption 3"},render:e=>Vo(e,"Multi select",t("fk-select-input",{configs:e.configs,value:Array.isArray(e.data)?e.data:[],multiple:!0,disabled:e.editable||e.disabled,dataMap:e.dataMap,onSelectValueChange:t=>{var i;t.stopPropagation(),null===(i=e.onDataChange)||void 0===i||i.call(e,t.detail)}}))}),ia=Go({id:"time",name:"Time",inputType:"time"}),ra=Go({id:"datetime",name:"Date / Time",inputType:"datetime-local"}),na=Po({type:"input",dataType:"array",id:"select-boxes",name:"Select boxes",category:"Inputs",defaultConfigs:{label:"Select boxes",options:"Option 1\nOption 2\nOption 3"},render:e=>{var i;const r=Array.isArray(e.data)?e.data:[];return t("div",{class:"fk-field",style:Co(e.styles)},t("span",{class:"fk-field__label"},qo(e,"Select boxes")),t("div",{class:"fk-radio-group"},(n=null===(i=e.configs)||void 0===i?void 0:i.options,String(null!=n?n:"").split("\n").map((t=>t.trim())).filter(Boolean)).map((i=>t("label",{class:"fk-radio",key:i},t("input",{type:"checkbox",checked:r.includes(i),disabled:e.editable||e.disabled,onChange:t=>{var n;const s=t.target.checked?[...r,i]:r.filter((t=>t!==i));null===(n=e.onDataChange)||void 0===n||n.call(e,s.length?s:void 0)}}),t("span",null,i))))),e.error?t("span",{class:"fk-field__error"},e.error):null);var n}}),sa=Po({type:"input",dataType:"array",id:"tags",name:"Tags",category:"Inputs",defaultConfigs:{label:"Tags"},render:e=>{const i=Array.isArray(e.data)?e.data:[];return Bo(e,"Tags",t("div",{class:"fk-tags"},i.map((r=>t("span",{class:"fk-tags__chip",key:r},r,t("button",{type:"button",class:"fk-tags__remove",disabled:e.editable||e.disabled,onClick:()=>{var t;const n=i.filter((t=>t!==r));null===(t=e.onDataChange)||void 0===t||t.call(e,n.length?n:void 0)}},"✕")))),t("input",{class:"fk-tags__input",type:"text",placeholder:"Add a tag…",disabled:e.editable||e.disabled,onKeyDown:t=>{var r;if("Enter"!==t.key)return;t.preventDefault();const n=t.target,s=n.value.trim();s&&!i.includes(s)&&(null===(r=e.onDataChange)||void 0===r||r.call(e,[...i,s]),n.value="")}})))}}),oa=Po({type:"input",dataType:"string",id:"signature",name:"Signature",category:"Inputs",defaultConfigs:{label:"Signature"},render:e=>{var i;return Bo(e,"Signature",t("fk-signature-input",{value:null!==(i=e.data)&&void 0!==i?i:void 0,disabled:e.editable||e.disabled,onSignatureChange:t=>{var i;t.stopPropagation(),null===(i=e.onDataChange)||void 0===i||i.call(e,t.detail)}}))}}),aa=Po({type:"panel",dataType:"void",id:"tabs",name:"Tabs",category:"Layout",defaultConfigs:{validateTabs:!1},render:e=>{var i,r;const n=(null!==(r=null===(i=e.brickSpec)||void 0===i?void 0:i.children)&&void 0!==r?r:[]).map(((t,i)=>{var r,n;const s=Us(null===(r=t.configs)||void 0===r?void 0:r.label,e.locale);return"string"==typeof s?s:null!==(n=t.name)&&void 0!==n?n:`Tab ${i+1}`}));return t("fk-tabs",{tabLabels:n,editable:e.editable,spec:e.brickSpec,dataMap:e.dataMap,locale:e.locale,style:Co(e.styles)},e.children)}}),ua=Po({type:"input",dataType:"string",id:"radio",name:"Radio",category:"Inputs",defaultConfigs:{label:"Radio",options:"Option 1\nOption 2"},render:e=>{var i,r;return t("div",{class:"fk-field",style:Co(e.styles)},t("span",{class:"fk-field__label"},qo(e,"Radio")),t("div",{class:"fk-radio-group",role:"radiogroup"},String(null!==(r=null===(i=e.configs)||void 0===i?void 0:i.options)&&void 0!==r?r:"").split("\n").map((t=>t.trim())).filter(Boolean).map((i=>{var r,n;return t("label",{class:"fk-radio",key:i},t("input",{type:"radio",name:null!==(n=null===(r=e.configs)||void 0===r?void 0:r.key)&&void 0!==n?n:e.path,checked:e.data===i,disabled:e.editable||e.disabled,onChange:()=>{var t;return null===(t=e.onDataChange)||void 0===t?void 0:t.call(e,i)}}),t("span",null,i))}))),e.error?t("span",{class:"fk-field__error"},e.error):null)}}),ha=[{key:"street",label:()=>zo("address.street"),full:!0},{key:"city",label:()=>zo("address.city"),full:!1},{key:"zip",label:()=>zo("address.zip"),full:!1},{key:"country",label:()=>zo("address.country"),full:!1}],ca=Po({type:"input",dataType:"object",id:"address",name:"Address",category:"Inputs",defaultConfigs:{label:"Address"},render:e=>{var i;const r=null!==(i=e.data)&&void 0!==i?i:{};return Vo(e,"Address",t("div",{class:"fk-address"},ha.map((i=>{var n;return t("label",{class:{"fk-address__part":!0,"fk-address__part--full":i.full},key:i.key},t("span",{class:"fk-address__label"},i.label()),t("input",{class:"fk-field__input",type:"text",value:null!==(n=r[i.key])&&void 0!==n?n:"",disabled:e.editable||e.disabled,onInput:t=>{var n;const s=t.target.value,o=Object.assign(Object.assign({},r),{[i.key]:s||void 0}),a=Object.fromEntries(Object.entries(o).filter((([,t])=>void 0!==t)));null===(n=e.onDataChange)||void 0===n||n.call(e,Object.keys(a).length?a:void 0)}}))}))))}}),fa=Po({type:"input",dataType:"object",id:"file",name:"File",category:"Data",defaultConfigs:{label:"File"},render:e=>{var i;return Vo(e,"File",t("fk-file-input",{value:e.data,accept:null===(i=e.configs)||void 0===i?void 0:i.accept,disabled:e.editable||e.disabled,onFileValueChange:t=>{var i;t.stopPropagation(),null===(i=e.onDataChange)||void 0===i||i.call(e,t.detail)}}))}}),la=Po({type:"collection",dataType:"array",id:"data-grid",name:"Data grid",category:"Data",defaultConfigs:{label:"Data grid"},render:e=>Vo(e,"Data grid",e.editable||!e.brickSpec?t("div",{class:"fk-grid-template"},t("span",{class:"fk-grid-template__hint"},zo("grid.columns")),e.children):t("fk-data-grid",{spec:e.brickSpec,value:e.data,disabled:e.disabled,locale:e.locale,utils:e.utils,onGridValueChange:t=>{var i;t.stopPropagation(),null===(i=e.onDataChange)||void 0===i||i.call(e,t.detail)}}))}),da=Po({type:"input",dataType:"string",id:"hidden",name:"Hidden",category:"Data",defaultConfigs:{},render:e=>{var i,r;return e.editable?t("div",{class:"fk-hidden-chip"},"hidden: ",null===(i=e.configs)||void 0===i?void 0:i.key):t("input",{type:"hidden",value:null!==(r=e.data)&&void 0!==r?r:""})}}),pa=Po({type:"output",dataType:"void",id:"content",name:"Content",category:"Layout",defaultConfigs:{content:"Some text…"},render:e=>{var i,r;return t("div",{class:"fk-content",style:Co(e.styles)},String(null!==(r=null===(i=e.configs)||void 0===i?void 0:i.content)&&void 0!==r?r:"").split("\n").map((e=>t("p",{class:"fk-content__line"},e))))}}),ma=Po({type:"panel",dataType:"void",id:"stepper",name:"Stepper",category:"Layout",defaultConfigs:{validateSteps:!1,allowStepClick:!0,showSubmit:!1},render:e=>{var i,r;const n=(null!==(r=null===(i=e.brickSpec)||void 0===i?void 0:i.children)&&void 0!==r?r:[]).map(((t,i)=>{var r,n;const s=Us(null===(r=t.configs)||void 0===r?void 0:r.label,e.locale);return"string"==typeof s?s:null!==(n=t.name)&&void 0!==n?n:`Step ${i+1}`}));return t("fk-stepper",{stepLabels:n,editable:e.editable,spec:e.brickSpec,dataMap:e.dataMap,locale:e.locale,style:Co(e.styles)},e.children)}}),va=Po({type:"input",dataType:"boolean",id:"checkbox",name:"Checkbox",category:"Inputs",defaultConfigs:{label:"Checkbox"},render:e=>t("label",{class:"fk-field fk-field--inline",style:Co(e.styles)},t("input",{class:"fk-field__checkbox",type:"checkbox",checked:!0===e.data,disabled:e.editable||e.disabled,onChange:t=>{var i;return null===(i=e.onDataChange)||void 0===i?void 0:i.call(e,t.target.checked)}}),t("span",{class:"fk-field__label"},qo(e,"Checkbox")),e.error?t("span",{class:"fk-field__error"},e.error):null)}),ya=Po({type:"panel",dataType:"void",id:"group",name:"Group",category:"Layout",render:e=>{var i;return t("fieldset",{class:"fk-group",style:Co(e.styles)},(null===(i=e.configs)||void 0===i?void 0:i.label)?t("legend",{class:"fk-group__legend"},e.configs.label):null,e.children)}}),ga=Po({type:"panel",dataType:"void",id:"row",name:"Row",category:"Layout",render:e=>t("div",{class:"fk-row",style:Co(e.styles)},e.children)}),ba=Po({type:"panel",dataType:"void",id:"column",name:"Column",category:"Layout",render:e=>t("div",{class:"fk-column",style:Co(e.styles)},e.children)});function $a(){a([Ho,Ko,Jo,Wo,Zo,Qo,Xo,Yo,ia,ra,ta,ea,ua,na,va,sa,oa,ca,fa,la,da,pa,ya,ga,ba,ma,aa])}export{ma as $,Po as A,Ho as B,Ko as C,Jo as D,Wo as E,Zo as F,Qo as G,Xo as H,Yo as I,ia as J,ra as K,ta as L,ea as M,ua as N,na as O,va as P,sa as Q,oa as R,jo as S,ca as T,fa as U,la as V,da as W,pa as X,ya as Y,ga as Z,ba as _,c as a,aa as a0,Lo as a1,No as a2,Uo as b,u as c,no as d,$a as e,zo as f,h as g,go as h,fo as i,bo as j,_o as k,So as l,$o as m,f as n,xo as o,Oo as p,Bs as q,qs as r,io as s,zs as t,Eo as u,uo as v,ro as w,Gs as x,o as y,a as z}
|
|
12
|
+
*/function Ts(t,e){e.unobserve()}function As(t,e){var i,r=function(t){return Ps.get(t)}(t);if(r){var n=function(t,e){return t.observers.get(e)}(r,e);i=n&&n.observer}else r=new Is(t),Ps.set(t,r);if(i)return i;if(i={},r.value=fs(t),e){i.callback=e,i.next=null;var s=function(){Ns(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(){Ns(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 Cs(e,i)),i}function Ns(t,e){void 0===e&&(e=!1);var i=Ps.get(t.object);Ms(i.value,t.object,t.patches,"",e),t.patches.length&&ks(i.value,t.patches);var r=t.patches;return r.length>0&&(t.patches=[],t.callback&&t.callback(r)),r}function Ms(t,e,i,r,n){if(e!==t){"function"==typeof e.toJSON&&(e=e.toJSON());for(var s=cs(e),o=cs(t),a=!1,u=o.length-1;u>=0;u--){var h=t[f=o[u]];if(!hs(e,f)||void 0===e[f]&&void 0!==h&&!1===Array.isArray(e))Array.isArray(t)===Array.isArray(e)?(n&&i.push({op:"test",path:r+"/"+ds(f),value:fs(h)}),i.push({op:"remove",path:r+"/"+ds(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 h&&null!=h&&"object"==typeof c&&null!=c&&Array.isArray(h)===Array.isArray(c)?Ms(h,c,i,r+"/"+ds(f),n):h!==c&&(n&&i.push({op:"test",path:r+"/"+ds(f),value:fs(h)}),i.push({op:"replace",path:r+"/"+ds(f),value:fs(c)}))}}if(a||s.length!=o.length)for(u=0;u<s.length;u++){var f;hs(t,f=s[u])||void 0===e[f]||i.push({op:"add",path:r+"/"+ds(f),value:fs(e[f])})}}}function Rs(t,e,i){void 0===i&&(i=!1);var r=[];return Ms(t,e,r,"",i),r}var Ds=Object.assign({},js,Object.freeze({__proto__:null,compare:Rs,generate:Ns,observe:As,unobserve:Ts}),{JsonPatchError:ys,deepClone:fs,escapePathComponent:ds,unescapePathComponent:ps}),Ls=Object.freeze({__proto__:null,JsonPatchError:ys,_areEquals:Os,applyOperation:_s,applyPatch:ks,applyReducer:Es,compare:Rs,deepClone:fs,default:Ds,escapePathComponent:ds,generate:Ns,getValueByPointer:ws,observe:As,unescapePathComponent:ps,unobserve:Ts,validate:xs,validator:Ss});function zs(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&Object.keys(t).length>0&&Object.values(t).every((t=>"string"==typeof t))}function Us(t,e){return zs(t)?e&&void 0!==t[e]?t[e]:Object.values(t)[0]:t}function qs(t,e){if(!t)return t;const i={};for(const[r,n]of Object.entries(t))i[r]=Us(n,e);return i}var Fs={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 Vs(t,e,i){return((Fs[e??"en"]??Fs.en)[t]??Fs.en[t]??"Invalid value").replace("{value}",String(i??""))}function*Bs(t,e="0"){if(t){yield{brick:t,path:e};for(const[i,r]of(t.children??[]).entries())yield*Bs(r,`${e}.${i}`)}}function*Gs(t){if(t&&(yield t,"collection"!==t.type))for(const e of t.children??[])yield*Gs(e)}class Hs{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 Ks=new Set(["__proto__","constructor","prototype"]);class Js{value;constructor(t){this.value=t}}var Ws=(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(Ks.has(e))throw new Error(`Access to "${e}" is not allowed`);return e},Ys=(t,e)=>({object:Qs(t,e.object),prop:Zs(e.computed?Qs(t,e.property):e.property.name),optional:!0===e.optional}),Qs=(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=Qs(t,i);if(e instanceof Js)return e}return;case"ReturnStatement":return new Js(e.argument?Qs(t,e.argument):void 0);case"IfStatement":return Qs(t,e.test)?Qs(t,e.consequent):e.alternate?Qs(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");Ws(t,e.name,i.init?Qs(t,i.init):void 0)}return;case"ExpressionStatement":return void Qs(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(Qs(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 Qs(t,e.expression);case"MemberExpression":return((t,e)=>{const{object:i,prop:r,optional:n}=Ys(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=Qs(t,i.argument);Array.isArray(e)&&r.push(...e)}else r.push(Qs(t,i));if("MemberExpression"===i.type){const{object:n,prop:s,optional:o}=Ys(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=Qs(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]},u=Qs(a,r);return t.steps=a.steps,u instanceof Js?u.value:!0===e.expression?u:void 0}}case"BinaryExpression":{const i=Qs(t,e.left),r=Qs(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=Qs(t,e.left);switch(e.operator){case"&&":return i&&Qs(t,e.right);case"||":return i||Qs(t,e.right);case"??":return i??Qs(t,e.right);default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"UnaryExpression":{const i=Qs(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 Qs(t,e.test)?Qs(t,e.consequent):Qs(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=Qs(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=Qs(t,r.argument);Array.isArray(e)&&i.push(...e)}else i.push(Qs(t,r));return i}case"ObjectExpression":{const i={};for(const r of e.properties){if("SpreadElement"===r.type){const e=Qs(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?Qs(t,e):"Identifier"===e.type?e.name:e.value);i[String(n)]=Qs(t,r.value)}return i}default:throw new Error(`Unsupported syntax: ${e.type}`)}},Xs={undefined:void 0,NaN:NaN,Infinity:1/0,Math,JSON,Number,String,Boolean,Array,Object,Date,parseInt,parseFloat,isNaN,isFinite},to=Symbol.for("formkrafter.core.services"),eo=globalThis,io=eo[to]??={jsRunnerService:new class{validateJs(t,e={ecmaVersion:"latest",allowReturnOutsideFunction:!0}){try{return he(t,e),{valide:!0}}catch(t){return{valide:!1,error:t instanceof Error?t:new Error(String(t))}}}eval(t,e={}){return function(t,e={}){const i=he(t,{ecmaVersion:"latest",allowReturnOutsideFunction:!0}),r={steps:0,scopes:[new Map(Object.entries({...Xs,...e})),new Map]},n=Qs(r,i);return n instanceof Js?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)}`}}}},ro=(t,e)=>{try{return io.jsRunnerService.eval(t,{dataMap:e??{}})}catch(t){return t instanceof Error?t:new Error(String(t))}},no=(t,e)=>((t,e)=>((t,e)=>t?.filter((t=>((t,e)=>"jsonLogic"===t.type?null!=t.logic&&!0===v.apply(t.logic,e):"javaScript"===t.type&&!!t.code&&!0===ro(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=v.apply(t.logic,e):"code"===t.property.type&&t.code?i=ro(t.code,e):"string"===t.property.type&&(i=t.string),{[t.property.target]:i}):{}})).flat().reduce(((t,e)=>({...t,...e})),{})??{hidden:!1},so=new Qn.Ajv({allErrors:!0});os(so,["email","uri"]),es(so);var oo=new WeakMap,ao=t=>{if("required"===t.keyword)return t.params.missingProperty;if("errorMessage"===t.keyword){const e=t.params.errors?.[0];return e?ao(e):void 0}return t.instancePath.split("/").filter(Boolean)[0]},uo=(t,e,i)=>{const r={},n=((t,e)=>{let i=oo.get(t);i||(i=new Map,oo.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=Us(t,e);return"string"==typeof i?i:void 0};for(const o of Gs(t)){const t=o.configs?.key,a=o.dataType;if(!t||!a||"void"===a)continue;const u=o.validations?.find((t=>"required"===t.validator)),h={type:a,nullable:!u},c={type:Vs("type",e)};for(const t of o.validations??[]){const{validator:i,value:r}=t,n=s(t.message)??Vs(i,e,r);"minLength"===i&&null!=r?(h.minLength=Number(r),c.minLength=n):"maxLength"===i&&null!=r?(h.maxLength=Number(r),c.maxLength=n):"min"===i&&null!=r?(h.minimum=Number(r),c.minimum=n):"max"===i&&null!=r?(h.maximum=Number(r),c.maximum=n):"pattern"===i&&"string"==typeof r&&r?(h.pattern=r,c.pattern=n):"minItems"===i&&null!=r?(h.minItems=Number(r),c.minItems=n):"maxItems"===i&&null!=r?(h.maxItems=Number(r),c.maxItems=n):"email"===i?(h.format="email",c.format=n):"url"===i&&(h.format="uri",c.format=n)}h.errorMessage=c,i[t]=h,u&&(r.push(t),n[t]=s(u.message)??Vs("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=so.compile(s)}catch{return}i.set(r,n)}return n})(t,i);if(n&&!n(e))for(const t of n.errors??[]){const e=ao(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 Gs(t)){const t=e.configs?.key;if(t)for(const s of e.validations??[]){if("custom"!==s.validator||!s.customValidator)continue;const e=ro(`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=Us(s.message,i);r[t]="string"==typeof e?e:Vs("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===no(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 ho(t){return t.split(".").slice(1).map((t=>`/children/${t}`)).join("")}function co(t,e){if(t.configs?.uid===e)return"";for(const[i,r]of(t.children??[]).entries()){const t=co(r,e);if(void 0!==t)return`/children/${i}${t}`}}function fo(t,e){let i=t;for(const t of e.split(".").slice(1))i=i?.children?.[Number(t)];return i}var lo=(Ds??Ls).applyPatch,po=(t,e,i)=>({spec:lo(t,e,!0,!1).newDocument,patches:e,inverse:i}),mo=(t,e)=>{const i=fo(t,e);if(!i)throw new Error(`No brick at path "${e}"`);return i},vo=(t,e)=>{const i=co(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}},yo=t=>JSON.parse(JSON.stringify(t));function go(t,e,i,r){const n=mo(t,i),s=ho(i),o=yo(e);if(!n.children){const e=`${s}/children`;return po(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 po(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=mo(t,e),r=ho(e);return po(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=mo(t,e),n=e.split(".").map(Number),s=i.split(".").map(Number),o=n.length-1,a=n[o],u=s.length>o&&n.slice(0,o).every(((t,e)=>t===s[e])),h=[...s];if(u){if(h[o]===a&&h.length>n.length)throw new Error(`Cannot move a brick into its own subtree ("${e}" → "${i}")`);h[o]>a&&(h[o]-=1)}const c=ho(e),f=ho(h.join("."));return po(t,[{op:"remove",path:c},{op:"add",path:f,value:r}],[{op:"remove",path:f},{op:"add",path:c,value:r}])}var wo=t=>({...t,...t.configs?{configs:{...t.configs,uid:crypto.randomUUID()}}:{},...t.children?{children:t.children.map(wo)}:{}});function _o(t,e){if("0"===e)throw new Error("Cannot duplicate the root brick");const i=mo(t,e),r=e.split("."),n=Number(r[r.length-1])+1,s=ho([...r.slice(0,-1),String(n)].join(".")),o=wo(yo(i));return po(t,[{op:"add",path:s,value:o}],[{op:"remove",path:s}])}var ko=(t,e,i,r,n)=>{const s=`${e}/${i}`;return void 0===n?po(t,[{op:"add",path:s,value:r}],[{op:"remove",path:s}]):po(t,[{op:"replace",path:s,value:r}],[{op:"replace",path:s,value:n}])};function Eo(t,e,i){const{pointer:r,brick:n}=vo(t,e),s={...n.configs,...i};return ko(t,r,"configs",s,n.configs)}function So(t,e,i){const{pointer:r,brick:n}=vo(t,e),s={...n.styles,...i};return ko(t,r,"styles",s,n.styles)}function xo(t,e,i){const{pointer:r,brick:n}=vo(t,e);return ko(t,r,"validations",i,n.validations)}function Oo(t,e,i){const{pointer:r,brick:n}=vo(t,e);return ko(t,r,"rules",i,n.rules)}class jo{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),lo(t,e.inverse,!0,!1).newDocument}redo(t){const e=this.future.pop();if(e)return this.past.push(e),lo(t,e.patches,!0,!1).newDocument}clear(){this.past=[],this.future=[]}}function Po(t){return new class extends Hs{constructor(){var e;super({type:t.type,dataType:t.dataType,id:t.id,name:t.name,category:t.category,configsForm:t.configsForm,styles:null!==(e=t.styles)&&void 0!==e?e:{},validators:t.validators,unWrapData:t.unWrapData,isPrivate:t.isPrivate,defaultConfigs:t.defaultConfigs})}render(e){return t.render(e)}renderBuilder(e){var i;return(null!==(i=t.renderBuilder)&&void 0!==i?i:t.render)(e)}getComponent(t){return this.render(t)}getComponentWithActions(t){return this.renderBuilder(t)}}}const Io=t=>t.replace(/-([a-z])/g,((t,e)=>e.toUpperCase()));function Co(t){const e=Object.entries(null!=t?t:{}).filter((([,t])=>null!=t&&""!==t));if(0===e.length)return;const i={};for(const[t,r]of e)i[Io(t)]=String(r);return i}function To(t,e="label",i="value"){return Array.isArray(t)?t.map((t=>{var r,n;if("object"==typeof t&&null!==t){const s=null!==(r=t[e])&&void 0!==r?r:t[i],o=null!==(n=t[i])&&void 0!==n?n:t[e];return{label:String(null!=s?s:""),value:String(null!=o?o:"")}}return{label:String(t),value:String(t)}})).filter((t=>""!==t.label)):String(null!=t?t:"").split("\n").map((t=>t.trim())).filter(Boolean).map((t=>({label:t,value:t})))}var Ao;const No={"palette.search":"Search bricks…","palette.empty":"No brick matches “{query}”","builder.undo":"Undo","builder.redo":"Redo","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.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","address.street":"Street","address.city":"City","address.zip":"Postal code","address.country":"Country","grid.addRow":"+ Add row","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","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"},Mo={"palette.search":"Rechercher une brique…","palette.empty":"Aucune brique ne correspond à « {query} »","builder.undo":"Annuler","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.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","address.street":"Rue","address.city":"Ville","address.zip":"Code postal","address.country":"Pays","grid.addRow":"+ Ajouter une 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","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"},Ro=Symbol.for("formkrafter.wc.i18n"),Do=globalThis,Lo=null!==(Ao=Do[Ro])&&void 0!==Ao?Ao:Do[Ro]={current:Object.assign({},No)};function zo(t={}){Lo.current=Object.assign(Object.assign({},No),t)}function Uo(t,e){var i;let r=null!==(i=Lo.current[t])&&void 0!==i?i:t;for(const[t,i]of Object.entries(null!=e?e:{}))r=r.replace(`{${t}}`,String(i));return r}function qo(t,e){var i;return null!==(i=Lo.current[t])&&void 0!==i?i:e}const Fo=(t,e)=>{var i,r,n,s;return null!==(s=null!==(r=null===(i=t.configs)||void 0===i?void 0:i.label)&&void 0!==r?r:null===(n=t.configs)||void 0===n?void 0:n.key)&&void 0!==s?s:e},Vo=(e,i)=>{var r,n;const s=null===(r=e.configs)||void 0===r?void 0:r.prefix,o=null===(n=e.configs)||void 0===n?void 0:n.suffix;return s||o?t("div",{class:"fk-adorned"},s?t("span",{class:"fk-adorned__affix"},s):null,i,o?t("span",{class:"fk-adorned__affix"},o):null):i},Bo=(e,i,r)=>t("div",{class:"fk-field",style:Co(e.styles)},t("span",{class:"fk-field__label"},Fo(e,i)),r,e.error?t("span",{class:"fk-field__error"},e.error):null),Go=(e,i,r)=>t("label",{class:"fk-field",style:Co(e.styles)},t("span",{class:"fk-field__label"},Fo(e,i)),r,e.error?t("span",{class:"fk-field__error"},e.error):null),Ho=e=>Po({type:"input",dataType:"string",id:e.id,name:e.name,category:"Inputs",defaultConfigs:{label:e.name},render:i=>{var r,n;return Go(i,e.name,Vo(i,t("input",{class:"fk-field__input fk-adorned__input",type:e.inputType,value:null!==(r=i.data)&&void 0!==r?r:"",placeholder:null===(n=i.configs)||void 0===n?void 0:n.placeholder,disabled:i.editable||i.disabled,onInput:t=>{var e;return null===(e=i.onDataChange)||void 0===e?void 0:e.call(i,t.target.value)}})))}}),Ko=Ho({id:"text",name:"Text",inputType:"text"}),Jo=Ho({id:"email",name:"Email",inputType:"email"}),Wo=Ho({id:"password",name:"Password",inputType:"password"}),Zo=Ho({id:"url",name:"URL",inputType:"url"}),Yo=Ho({id:"phone",name:"Phone",inputType:"tel"}),Qo=Po({type:"input",dataType:"string",id:"textarea",name:"Text area",category:"Inputs",defaultConfigs:{label:"Text area"},render:e=>{var i,r;return Go(e,"Text area",t("textarea",{class:"fk-field__input fk-field__input--textarea",value:null!==(i=e.data)&&void 0!==i?i:"",placeholder:null===(r=e.configs)||void 0===r?void 0:r.placeholder,disabled:e.editable||e.disabled,onInput:t=>{var i;return null===(i=e.onDataChange)||void 0===i?void 0:i.call(e,t.target.value)}}))}}),Xo=Po({type:"input",dataType:"number",id:"number",name:"Number",category:"Inputs",defaultConfigs:{label:"Number"},render:e=>{var i;return Go(e,"Number",Vo(e,t("input",{class:"fk-field__input fk-adorned__input",type:"number",value:null==e.data?"":String(e.data),placeholder:null===(i=e.configs)||void 0===i?void 0:i.placeholder,disabled:e.editable||e.disabled,onInput:t=>{var i;const r=t.target.value;null===(i=e.onDataChange)||void 0===i||i.call(e,""===r?void 0:Number(r))}})))}}),ta=Po({type:"input",dataType:"string",id:"date",name:"Date",category:"Inputs",defaultConfigs:{label:"Date"},render:e=>{var i;return Go(e,"Date",t("input",{class:"fk-field__input",type:"date",value:null!==(i=e.data)&&void 0!==i?i:"",disabled:e.editable||e.disabled,onInput:t=>{var i;const r=t.target.value;null===(i=e.onDataChange)||void 0===i||i.call(e,""===r?void 0:r)}}))}}),ea=Po({type:"input",dataType:"string",id:"select",name:"Select",category:"Inputs",defaultConfigs:{label:"Select",optionsSource:"static",options:"Option 1\nOption 2"},render:e=>{var i;return Bo(e,"Select",t("fk-select-input",{configs:e.configs,value:null!==(i=e.data)&&void 0!==i?i:"",disabled:e.editable||e.disabled,dataMap:e.dataMap,onSelectValueChange:t=>{var i;t.stopPropagation(),null===(i=e.onDataChange)||void 0===i||i.call(e,t.detail)}}))}}),ia=Po({type:"input",dataType:"array",id:"multi-select",name:"Multi select",category:"Inputs",defaultConfigs:{label:"Multi select",optionsSource:"static",options:"Option 1\nOption 2\nOption 3"},render:e=>Bo(e,"Multi select",t("fk-select-input",{configs:e.configs,value:Array.isArray(e.data)?e.data:[],multiple:!0,disabled:e.editable||e.disabled,dataMap:e.dataMap,onSelectValueChange:t=>{var i;t.stopPropagation(),null===(i=e.onDataChange)||void 0===i||i.call(e,t.detail)}}))}),ra=Ho({id:"time",name:"Time",inputType:"time"}),na=Ho({id:"datetime",name:"Date / Time",inputType:"datetime-local"}),sa=t=>{var e,i,r;return To(null===(e=t.configs)||void 0===e?void 0:e.options,"string"==typeof(null===(i=t.configs)||void 0===i?void 0:i.labelKey)?t.configs.labelKey:"label","string"==typeof(null===(r=t.configs)||void 0===r?void 0:r.valueKey)?t.configs.valueKey:"value")},oa=Po({type:"input",dataType:"array",id:"select-boxes",name:"Select boxes",category:"Inputs",defaultConfigs:{label:"Select boxes",options:"Option 1\nOption 2\nOption 3"},render:e=>{const i=Array.isArray(e.data)?e.data:[];return t("div",{class:"fk-field",style:Co(e.styles)},t("span",{class:"fk-field__label"},Fo(e,"Select boxes")),t("div",{class:"fk-radio-group"},sa(e).map((r=>t("label",{class:"fk-radio",key:r.value},t("input",{type:"checkbox",checked:i.includes(r.value),disabled:e.editable||e.disabled,onChange:t=>{var n;const s=t.target.checked?[...i,r.value]:i.filter((t=>t!==r.value));null===(n=e.onDataChange)||void 0===n||n.call(e,s.length?s:void 0)}}),t("span",null,r.label))))),e.error?t("span",{class:"fk-field__error"},e.error):null)}}),aa=Po({type:"input",dataType:"array",id:"tags",name:"Tags",category:"Inputs",defaultConfigs:{label:"Tags"},render:e=>{const i=Array.isArray(e.data)?e.data:[];return Go(e,"Tags",t("div",{class:"fk-tags"},i.map((r=>t("span",{class:"fk-tags__chip",key:r},r,t("button",{type:"button",class:"fk-tags__remove",disabled:e.editable||e.disabled,onClick:()=>{var t;const n=i.filter((t=>t!==r));null===(t=e.onDataChange)||void 0===t||t.call(e,n.length?n:void 0)}},"✕")))),t("input",{class:"fk-tags__input",type:"text",placeholder:"Add a tag…",disabled:e.editable||e.disabled,onKeyDown:t=>{var r;if("Enter"!==t.key)return;t.preventDefault();const n=t.target,s=n.value.trim();s&&!i.includes(s)&&(null===(r=e.onDataChange)||void 0===r||r.call(e,[...i,s]),n.value="")}})))}}),ua=Po({type:"input",dataType:"string",id:"signature",name:"Signature",category:"Inputs",defaultConfigs:{label:"Signature"},render:e=>{var i;return Go(e,"Signature",t("fk-signature-input",{value:null!==(i=e.data)&&void 0!==i?i:void 0,disabled:e.editable||e.disabled,onSignatureChange:t=>{var i;t.stopPropagation(),null===(i=e.onDataChange)||void 0===i||i.call(e,t.detail)}}))}}),ha=Po({type:"panel",dataType:"void",id:"tabs",name:"Tabs",category:"Layout",defaultConfigs:{validateTabs:!1},render:e=>{var i,r;const n=(null!==(r=null===(i=e.brickSpec)||void 0===i?void 0:i.children)&&void 0!==r?r:[]).map(((t,i)=>{var r,n;const s=Us(null===(r=t.configs)||void 0===r?void 0:r.label,e.locale);return"string"==typeof s?s:null!==(n=t.name)&&void 0!==n?n:`Tab ${i+1}`}));return t("fk-tabs",{tabLabels:n,editable:e.editable,spec:e.brickSpec,dataMap:e.dataMap,locale:e.locale,style:Co(e.styles)},e.children)}}),ca=Po({type:"input",dataType:"string",id:"radio",name:"Radio",category:"Inputs",defaultConfigs:{label:"Radio",options:"Option 1\nOption 2"},render:e=>t("div",{class:"fk-field",style:Co(e.styles)},t("span",{class:"fk-field__label"},Fo(e,"Radio")),t("div",{class:"fk-radio-group",role:"radiogroup"},sa(e).map((i=>{var r,n;return t("label",{class:"fk-radio",key:i.value},t("input",{type:"radio",name:null!==(n=null===(r=e.configs)||void 0===r?void 0:r.key)&&void 0!==n?n:e.path,checked:e.data===i.value,disabled:e.editable||e.disabled,onChange:()=>{var t;return null===(t=e.onDataChange)||void 0===t?void 0:t.call(e,i.value)}}),t("span",null,i.label))}))),e.error?t("span",{class:"fk-field__error"},e.error):null)}),fa=[{key:"street",label:()=>Uo("address.street"),full:!0},{key:"city",label:()=>Uo("address.city"),full:!1},{key:"zip",label:()=>Uo("address.zip"),full:!1},{key:"country",label:()=>Uo("address.country"),full:!1}],la=Po({type:"input",dataType:"object",id:"address",name:"Address",category:"Inputs",defaultConfigs:{label:"Address"},render:e=>{var i;const r=null!==(i=e.data)&&void 0!==i?i:{};return Bo(e,"Address",t("div",{class:"fk-address"},fa.map((i=>{var n;return t("label",{class:{"fk-address__part":!0,"fk-address__part--full":i.full},key:i.key},t("span",{class:"fk-address__label"},i.label()),t("input",{class:"fk-field__input",type:"text",value:null!==(n=r[i.key])&&void 0!==n?n:"",disabled:e.editable||e.disabled,onInput:t=>{var n;const s=t.target.value,o=Object.assign(Object.assign({},r),{[i.key]:s||void 0}),a=Object.fromEntries(Object.entries(o).filter((([,t])=>void 0!==t)));null===(n=e.onDataChange)||void 0===n||n.call(e,Object.keys(a).length?a:void 0)}}))}))))}}),da=Po({type:"input",dataType:"object",id:"file",name:"File",category:"Data",defaultConfigs:{label:"File"},render:e=>{var i,r;return Bo(e,"File",t("fk-file-input",{value:e.data,accept:null===(i=e.configs)||void 0===i?void 0:i.accept,uploadUrl:null===(r=e.configs)||void 0===r?void 0:r.uploadUrl,disabled:e.editable||e.disabled,onFileValueChange:t=>{var i;t.stopPropagation(),null===(i=e.onDataChange)||void 0===i||i.call(e,t.detail)}}))}}),pa=Po({type:"collection",dataType:"array",id:"data-grid",name:"Data grid",category:"Data",defaultConfigs:{label:"Data grid"},render:e=>Bo(e,"Data grid",e.editable||!e.brickSpec?t("div",{class:"fk-grid-template"},t("span",{class:"fk-grid-template__hint"},Uo("grid.columns")),e.children):t("fk-data-grid",{spec:e.brickSpec,value:e.data,disabled:e.disabled,locale:e.locale,utils:e.utils,onGridValueChange:t=>{var i;t.stopPropagation(),null===(i=e.onDataChange)||void 0===i||i.call(e,t.detail)}}))}),ma=Po({type:"input",dataType:"string",id:"hidden",name:"Hidden",category:"Data",defaultConfigs:{},render:e=>{var i,r;return e.editable?t("div",{class:"fk-hidden-chip"},"hidden: ",null===(i=e.configs)||void 0===i?void 0:i.key):t("input",{type:"hidden",value:null!==(r=e.data)&&void 0!==r?r:""})}}),va=Po({type:"output",dataType:"void",id:"content",name:"Content",category:"Layout",defaultConfigs:{content:"Some text…"},render:e=>{var i,r;return t("div",{class:"fk-content",style:Co(e.styles)},String(null!==(r=null===(i=e.configs)||void 0===i?void 0:i.content)&&void 0!==r?r:"").split("\n").map((e=>t("p",{class:"fk-content__line"},e))))}}),ya=Po({type:"panel",dataType:"void",id:"stepper",name:"Stepper",category:"Layout",defaultConfigs:{validateSteps:!1,allowStepClick:!0,showSubmit:!1},render:e=>{var i,r;const n=(null!==(r=null===(i=e.brickSpec)||void 0===i?void 0:i.children)&&void 0!==r?r:[]).map(((t,i)=>{var r,n;const s=Us(null===(r=t.configs)||void 0===r?void 0:r.label,e.locale);return"string"==typeof s?s:null!==(n=t.name)&&void 0!==n?n:`Step ${i+1}`}));return t("fk-stepper",{stepLabels:n,editable:e.editable,spec:e.brickSpec,dataMap:e.dataMap,locale:e.locale,style:Co(e.styles)},e.children)}}),ga=Po({type:"input",dataType:"boolean",id:"checkbox",name:"Checkbox",category:"Inputs",defaultConfigs:{label:"Checkbox"},render:e=>t("label",{class:"fk-field fk-field--inline",style:Co(e.styles)},t("input",{class:"fk-field__checkbox",type:"checkbox",checked:!0===e.data,disabled:e.editable||e.disabled,onChange:t=>{var i;return null===(i=e.onDataChange)||void 0===i?void 0:i.call(e,t.target.checked)}}),t("span",{class:"fk-field__label"},Fo(e,"Checkbox")),e.error?t("span",{class:"fk-field__error"},e.error):null)}),ba=Po({type:"panel",dataType:"void",id:"group",name:"Group",category:"Layout",render:e=>{var i;return t("fieldset",{class:"fk-group",style:Co(e.styles)},(null===(i=e.configs)||void 0===i?void 0:i.label)?t("legend",{class:"fk-group__legend"},e.configs.label):null,e.children)}}),$a=Po({type:"panel",dataType:"void",id:"row",name:"Row",category:"Layout",render:e=>t("div",{class:"fk-row",style:Co(e.styles)},e.children)}),wa=Po({type:"panel",dataType:"void",id:"column",name:"Column",category:"Layout",render:e=>t("div",{class:"fk-column",style:Co(e.styles)},e.children)}),_a=(t,e)=>{var i;if(Array.isArray(e))return e.map((e=>_a(t,e))).filter(Boolean).join(", ");if(!0===e)return qo("recap.yes","Yes");if(!1===e)return qo("recap.no","No");if(e&&"object"==typeof e)return"string"==typeof e.name&&"url"in e?e.name:Object.values(e).filter((t=>"string"==typeof t&&t)).join(" ");const r=String(null!=e?e:"");if(null!=(null===(i=t.configs)||void 0===i?void 0:i.options)){const e=To(t.configs.options,"string"==typeof t.configs.labelKey?t.configs.labelKey:"label","string"==typeof t.configs.valueKey?t.configs.valueKey:"value").find((t=>t.value===r));if(e)return e.label}return r},ka=t=>null==t||""===t||Array.isArray(t)&&0===t.length,Ea=(t,e)=>{var i,r,n,s,o;return String(null!==(o=null!==(n=null!==(r=Us(null===(i=t.configs)||void 0===i?void 0:i.label,e))&&void 0!==r?r:t.name)&&void 0!==n?n:null===(s=t.configs)||void 0===s?void 0:s.key)&&void 0!==o?o:"")},Sa=t=>{var e,i;const r=[];for(const n of null!==(e=t.children)&&void 0!==e?e:[]){const t=null===(i=n.configs)||void 0===i?void 0:i.key;"input"===n.type&&t&&!t.startsWith("_")?r.push(n):"panel"===n.type&&r.push(...Sa(n))}return r},xa=(t,e,i,r,n=!1)=>{var s,o,a;if(!t)return[];const u=[];for(const h of null!==(s=t.children)&&void 0!==s?s:[]){if("recap"===h.id||"action"===h.type)continue;if(!0===no(h.rules,e).hidden)continue;const t=null===(o=h.configs)||void 0===o?void 0:o.key,s=Ea(h,i);if("collection"===h.type){const n=t&&Array.isArray(null==e?void 0:e[t])?e[t]:[];if(!n.length&&!r)continue;const o=Sa(h);u.push({kind:"collection",label:s,columns:o.map((t=>Ea(t,i))),rows:n.map((t=>o.map((e=>{const i=null==t?void 0:t[e.configs.key];return ka(i)?"—":_a(e,i)}))))});continue}if("panel"===h.type){const t=Us(null===(a=h.configs)||void 0===a?void 0:a.label,i);if(n&&"string"==typeof t&&t.trim()){const n=xa(h,e,i,r);n.length&&(u.push({kind:"section",label:t}),u.push(...n));continue}u.push(...xa(h,e,i,r,n));continue}if("input"!==h.type||!t||t.startsWith("_"))continue;const c=null==e?void 0:e[t];ka(c)&&!r||u.push({kind:"field",label:s,value:ka(c)?"—":_a(h,c)})}return u},Oa=Po({type:"output",dataType:"void",id:"recap",name:"Recap",category:"Layout",defaultConfigs:{label:"Recap",showEmpty:!1,groupBySections:!1},render:e=>{var i,r;const n=xa(e.rootSpec,e.dataMap,e.locale,!0===(null===(i=e.configs)||void 0===i?void 0:i.showEmpty),!0===(null===(r=e.configs)||void 0===r?void 0:r.groupBySections)),s=[];let o=[];const a=()=>{o.length&&(s.push(t("dl",{class:"fk-recap__list"},o.map((e=>t("div",{class:"fk-recap__row",key:e.label},t("dt",{class:"fk-recap__term"},e.label),t("dd",{class:"fk-recap__value"},e.value)))))),o=[])};for(const e of n)"field"!==e.kind?(a(),s.push("section"!==e.kind?t("section",{class:"fk-recap__section",key:e.label},t("span",{class:"fk-recap__section-title"},e.label),e.rows.length?t("div",{class:"fk-recap__table-wrap"},t("table",{class:"fk-recap__table"},t("thead",null,t("tr",null,t("th",{class:"fk-recap__index-cell"},"#"),e.columns.map((e=>t("th",{key:e},e))))),t("tbody",null,e.rows.map(((e,i)=>t("tr",{key:i},t("td",{class:"fk-recap__index-cell"},i+1),e.map(((e,i)=>t("td",{key:i},e))))))))):t("p",{class:"fk-recap__empty"},qo("recap.empty","Nothing to summarize yet."))):t("span",{class:"fk-recap__group-title",key:`section:${e.label}`},e.label))):o.push(e);return a(),t("div",{class:"fk-field fk-recap",style:Co(e.styles)},t("span",{class:"fk-field__label"},Fo(e,"Recap")),s.length?s:t("p",{class:"fk-recap__empty"},qo("recap.empty","Nothing to summarize yet.")))}});function ja(){a([Ko,Jo,Wo,Zo,Yo,Qo,Xo,ta,ra,na,ea,ia,ca,oa,ga,aa,ua,la,da,pa,ma,va,Oa,ba,$a,wa,ya,ha])}export{$a as $,a as A,Po as B,Ko as C,Jo as D,Wo as E,Zo as F,Yo as G,Qo as H,Xo as I,ta as J,ra as K,na as L,ea as M,ia as N,ca as O,oa as P,ga as Q,aa as R,jo as S,ua as T,la as U,da as V,pa as W,ma as X,va as Y,Oa as Z,ba as _,c as a,wa as a0,ya as a1,ha as a2,zo as a3,Mo as a4,qo as b,u as c,no as d,ja as e,Uo as f,h as g,go as h,fo as i,bo as j,_o as k,So as l,$o as m,f as n,xo as o,Oo as p,Bs as q,qs as r,io as s,zs as t,Eo as u,uo as v,To as w,ro as x,Gs as y,o as z}
|